[5299] trunk/binutils-2.17/sim/bfin: sim: bfin: auto generate linux-fixed-code.h
Revision
5299
Author
vapier
Date 2011-03-03 16:29:57 -0500 (Thu, 03 Mar 2011)
Log Message
sim: bfin: auto generate linux-fixed-code.h
Modified Paths
Added Paths
Diff
Modified: trunk/binutils-2.17/sim/bfin/Makefile.in (5298 => 5299)
--- trunk/binutils-2.17/sim/bfin/Makefile.in 2011-03-02 09:39:43 UTC (rev 5298)
+++ trunk/binutils-2.17/sim/bfin/Makefile.in 2011-03-03 21:29:57 UTC (rev 5299)
<at> <at> -49,7 +49,22 <at> <at>
## COMMON_POST_CONFIG_FRAG
-interp.o: interp.c targ-vals.h linux-targ-map.h devices.h $(INCLUDE)
+$(srcdir)/linux-fixed-code.h: $(srcdir)/linux-fixed-code.s Makefile
+ $(AS_FOR_TARGET) $< -o linux-fixed-code.o
+ ( set -e; \
+ echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s. */"; \
+ echo "static const unsigned char bfin_linux_fixed_code[] = {"; \
+ $(OBJDUMP_FOR_TARGET) -d -z linux-fixed-code.o > $ <at> .dis; \
+ sed -n $ <at> .dis \
+ -e 's:^[^ ]* :0x:' \
+ -e '/^0x/{s: .*::;s: *$$:,:;s: :, 0x:g;p}'; \
+ rm -f $ <at> .dis; \
+ echo "};" \
+ ) > $ <at> .tmp
+ rm -f linux-fixed-code.o
+ mv $ <at> .tmp $ <at>
+
+interp.o: interp.c targ-vals.h linux-targ-map.h linux-fixed-code.h devices.h $(INCLUDE)
bfin-sim.o: bfin-sim.c $(INCLUDE)
gui.o: gui.c $(INCLUDE)
machs.o: machs.c $(INCLUDE)
Modified: trunk/binutils-2.17/sim/bfin/linux-fixed-code.h (5298 => 5299)
--- trunk/binutils-2.17/sim/bfin/linux-fixed-code.h 2011-03-02 09:39:43 UTC (rev 5298)
+++ trunk/binutils-2.17/sim/bfin/linux-fixed-code.h 2011-03-03 21:29:57 UTC (rev 5299)
<at> <at> -1,23 +1,74 <at> <at>
-/* DO NOT EDIT: Autogenerated. */
-/* Fixed code region of Linux userspace starting at 0x400. Last produced
- from Linux-2.6.37 (not that the fixed code region changes often). */
+/* DO NOT EDIT: Autogenerated from linux-fixed-code.s. */
static const unsigned char bfin_linux_fixed_code[] = {
-0x28, 0xe1, 0xad, 0x00, 0xa0, 0x00, 0x00, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x91, 0x01, 0x93, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x91, 0x08, 0x08, 0x02, 0x10, 0x02, 0x93,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x50, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x52, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x56, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x54, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x58, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xe1, 0xad, 0x00,
+0xa0, 0x00,
+0x00, 0x20,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x91,
+0x01, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x91,
+0x08, 0x08,
+0x02, 0x10,
+0x02, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x50,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x52,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x56,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x54,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x58,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0xa4, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
};
Added: trunk/binutils-2.17/sim/bfin/linux-fixed-code.s (0 => 5299)
--- trunk/binutils-2.17/sim/bfin/linux-fixed-code.s (rev 0)
+++ trunk/binutils-2.17/sim/bfin/linux-fixed-code.s 2011-03-03 21:29:57 UTC (rev 5299)
<at> <at> -0,0 +1,85 <at> <at>
+/* Linux fixed code userspace ABI
+
+ Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Contributed by Analog Devices, Inc.
+
+ This file is part of simulators.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* For more info, see this page:
+ http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:fixed-code */
+
+.text
+
+.align 16
+_sigreturn_stub:
+ P0 = 173;
+ EXCPT 0;
+0: JUMP.S 0b;
+
+.align 16
+_atomic_xchg32:
+ R0 = [P0];
+ [P0] = R1;
+ rts;
+
+.align 16
+_atomic_cas32:
+ R0 = [P0];
+ CC = R0 == R1;
+ IF !CC JUMP 1f;
+ [P0] = R2;
+1:
+ rts;
+
+.align 16
+_atomic_add32:
+ R1 = [P0];
+ R0 = R1 + R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_sub32:
+ R1 = [P0];
+ R0 = R1 - R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_ior32:
+ R1 = [P0];
+ R0 = R1 | R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_and32:
+ R1 = [P0];
+ R0 = R1 & R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_xor32:
+ R1 = [P0];
+ R0 = R1 ^ R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_safe_user_instruction:
+ NOP; NOP; NOP; NOP;
+ EXCPT 0x4;
<div>
<div>
Revision <a href="http://blackfin.uclinux.org/gf/project/toolchain/scmsvn/?action=browse&path=/&view=rev&root=toolchain&revision=5299">5299</a>
Author <a href="http://blackfin.uclinux.org/gf/user/vapier/">vapier</a>
Date 2011-03-03 16:29:57 -0500 (Thu, 03 Mar 2011)
<h3>Log Message</h3>
sim: bfin: auto generate linux-fixed-code.h
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbinutils217simbfinMakefilein">trunk/binutils-2.17/sim/bfin/Makefile.in</a></li>
<li><a href="#trunkbinutils217simbfinlinuxfixedcodeh">trunk/binutils-2.17/sim/bfin/linux-fixed-code.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkbinutils217simbfinlinuxfixedcodes">trunk/binutils-2.17/sim/bfin/linux-fixed-code.s</a></li>
</ul>
</div>
<div>
<h3>Diff</h3>
<a></a>
<div class="modfile">
<h4>Modified: trunk/binutils-2.17/sim/bfin/Makefile.in (5298 => 5299)</h4>
<span>
<span class="info">--- trunk/binutils-2.17/sim/bfin/Makefile.in 2011-03-02 09:39:43 UTC (rev 5298)
+++ trunk/binutils-2.17/sim/bfin/Makefile.in 2011-03-03 21:29:57 UTC (rev 5299)
</span><span class="lines"> <at> <at> -49,7 +49,22 <at> <at>
</span><span class="cx">
</span><span class="cx"> ## COMMON_POST_CONFIG_FRAG
</span><span class="cx">
</span>-interp.o: interp.c targ-vals.h linux-targ-map.h devices.h $(INCLUDE)
+$(srcdir)/linux-fixed-code.h: $(srcdir)/linux-fixed-code.s Makefile
+ $(AS_FOR_TARGET) $< -o linux-fixed-code.o
+ ( set -e; \
+ echo "/* DO NOT EDIT: Autogenerated from linux-fixed-code.s. */"; \
+ echo "static const unsigned char bfin_linux_fixed_code[] = {"; \
+ $(OBJDUMP_FOR_TARGET) -d -z linux-fixed-code.o > $ <at> .dis; \
+ sed -n $ <at> .dis \
+ -e 's:^[^ ]* :0x:' \
+ -e '/^0x/{s: .*::;s: *$$:,:;s: :, 0x:g;p}'; \
+ rm -f $ <at> .dis; \
+ echo "};" \
+ ) > $ <at> .tmp
+ rm -f linux-fixed-code.o
+ mv $ <at> .tmp $ <at>
+
+interp.o: interp.c targ-vals.h linux-targ-map.h linux-fixed-code.h devices.h $(INCLUDE)
<span class="cx"> bfin-sim.o: bfin-sim.c $(INCLUDE)
</span><span class="cx"> gui.o: gui.c $(INCLUDE)
</span><span class="cx"> machs.o: machs.c $(INCLUDE)
</span></span>
</div>
<a></a>
<div class="modfile">
<h4>Modified: trunk/binutils-2.17/sim/bfin/linux-fixed-code.h (5298 => 5299)</h4>
<span>
<span class="info">--- trunk/binutils-2.17/sim/bfin/linux-fixed-code.h 2011-03-02 09:39:43 UTC (rev 5298)
+++ trunk/binutils-2.17/sim/bfin/linux-fixed-code.h 2011-03-03 21:29:57 UTC (rev 5299)
</span><span class="lines"> <at> <at> -1,23 +1,74 <at> <at>
</span>-/* DO NOT EDIT: Autogenerated. */
-/* Fixed code region of Linux userspace starting at 0x400. Last produced
- from Linux-2.6.37 (not that the fixed code region changes often). */
+/* DO NOT EDIT: Autogenerated from linux-fixed-code.s. */
<span class="cx"> static const unsigned char bfin_linux_fixed_code[] = {
</span>-0x28, 0xe1, 0xad, 0x00, 0xa0, 0x00, 0x00, 0x20,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x91, 0x01, 0x93, 0x10, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x91, 0x08, 0x08, 0x02, 0x10, 0x02, 0x93,
-0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x50, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x52, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x56, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x54, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x01, 0x91, 0x01, 0x58, 0x00, 0x93, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+0x28, 0xe1, 0xad, 0x00,
+0xa0, 0x00,
+0x00, 0x20,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x91,
+0x01, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x91,
+0x08, 0x08,
+0x02, 0x10,
+0x02, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x50,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x52,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x56,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x54,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x01, 0x91,
+0x01, 0x58,
+0x00, 0x93,
+0x10, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0xa4, 0x00,
+0x00, 0x00,
+0x00, 0x00,
+0x00, 0x00,
<span class="cx"> };
</span></span>
</div>
<a></a>
<div class="addfile">
<h4>Added: trunk/binutils-2.17/sim/bfin/linux-fixed-code.s (0 => 5299)</h4>
<span>
<span class="info">--- trunk/binutils-2.17/sim/bfin/linux-fixed-code.s (rev 0)
+++ trunk/binutils-2.17/sim/bfin/linux-fixed-code.s 2011-03-03 21:29:57 UTC (rev 5299)
</span><span class="lines"> <at> <at> -0,0 +1,85 <at> <at>
</span>+/* Linux fixed code userspace ABI
+
+ Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Contributed by Analog Devices, Inc.
+
+ This file is part of simulators.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* For more info, see this page:
+ http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:fixed-code */
+
+.text
+
+.align 16
+_sigreturn_stub:
+ P0 = 173;
+ EXCPT 0;
+0: JUMP.S 0b;
+
+.align 16
+_atomic_xchg32:
+ R0 = [P0];
+ [P0] = R1;
+ rts;
+
+.align 16
+_atomic_cas32:
+ R0 = [P0];
+ CC = R0 == R1;
+ IF !CC JUMP 1f;
+ [P0] = R2;
+1:
+ rts;
+
+.align 16
+_atomic_add32:
+ R1 = [P0];
+ R0 = R1 + R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_sub32:
+ R1 = [P0];
+ R0 = R1 - R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_ior32:
+ R1 = [P0];
+ R0 = R1 | R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_and32:
+ R1 = [P0];
+ R0 = R1 & R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_atomic_xor32:
+ R1 = [P0];
+ R0 = R1 ^ R0;
+ [P0] = R0;
+ rts;
+
+.align 16
+_safe_user_instruction:
+ NOP; NOP; NOP; NOP;
+ EXCPT 0x4;
</span>
</div>
</div>
</div>