📄 allinsn.sh
字号:
#/bin/sh# Generate test result data for xstormy16 GAS testing.# This script is machine generated.# It is intended to be run in the testsuite source directory.## Syntax: build.sh /path/to/build/gasif [ $# = 0 ] ; then if [ ! -x ../gas/as-new ] ; then echo "Usage: $0 [/path/to/gas/build]" else BUILD=`pwd`/../gas fielse BUILD=$1fiif [ ! -x $BUILD/as-new ] ; then echo "$BUILD is not a gas build directory" exit 1fi# Put results here, so we preserve the existing set for comparison.rm -rf tmpdirmkdir tmpdircd tmpdirfunction gentest { rm -f a.out $BUILD/as-new ${1}.s -o a.out echo "#as:" >${1}.d echo "#objdump: -dr" >>${1}.d echo "#name: $1" >>${1}.d $BUILD/../binutils/objdump -dr a.out | sed -e 's/(/\\(/g' -e 's/)/\\)/g' -e 's/\$/\\$/g' -e 's/\[/\\\[/g' -e 's/\]/\\\]/g' -e 's/[+]/\\+/g' -e 's/[.]/\\./g' -e 's/[*]/\\*/g' | sed -e 's/^.*file format.*$/.*: +file format .*/' >>${1}.d rm -f a.out}# Now come all the testcases.cat > allinsn.s <<EOF .datafoodata: .word 42 .textfootext: .text .global movlmemimmmovlmemimm: mov.b 0,#0 mov.w 255,#65535 mov.w 128,#32768 mov.b 127,#32767 mov.w 1,#1 mov.w 81,#64681 mov.w 247,#42230 mov.b 84,#16647 .text .global movhmemimmmovhmemimm: mov.b 0x7f00+0,#0 mov.w 0x7f00+255,#65535 mov.w 0x7f00+128,#32768 mov.b 0x7f00+127,#32767 mov.w 0x7f00+1,#1 mov.b 0x7f00+165,#1944 mov.w 0x7f00+186,#11517 mov.b 0x7f00+63,#25556 .text .global movlgrmemmovlgrmem: mov.b r0,0 mov.w r7,255 mov.w r4,128 mov.b r3,127 mov.w r1,1 mov.w r6,179 mov.w r0,183 mov.b r3,41 .text .global movhgrmemmovhgrmem: mov.b r0,0x7f00+0 mov.w r7,0x7f00+255 mov.w r4,0x7f00+128 mov.b r3,0x7f00+127 mov.w r1,0x7f00+1 mov.b r2,0x7f00+114 mov.w r2,0x7f00+210 mov.w r5,0x7f00+181 .text .global movlmemgrmovlmemgr: mov.b 0,r0 mov.w 255,r7 mov.w 128,r4 mov.b 127,r3 mov.w 1,r1 mov.w 137,r0 mov.w 26,r0 mov.b 127,r4 .text .global movhmemgrmovhmemgr: mov.b 0x7f00+0,r0 mov.w 0x7f00+255,r7 mov.w 0x7f00+128,r4 mov.b 0x7f00+127,r3 mov.w 0x7f00+1,r1 mov.w 0x7f00+98,r3 mov.w 0x7f00+135,r7 mov.b 0x7f00+229,r2 .text .global movgrgrimovgrgri: mov.b r0,(r0) mov.w r7,(r15) mov.w r4,(r8) mov.b r3,(r7) mov.w r1,(r1) mov.w r6,(r4) mov.b r0,(r12) mov.w r5,(r9) .text .global movgrgripostincmovgrgripostinc: mov.b r0,(r0++) mov.w r7,(r15++) mov.w r4,(r8++) mov.b r3,(r7++) mov.w r1,(r1++) mov.w r4,(r8++) mov.w r3,(r12++) mov.b r6,(r4++) .text .global movgrgripredecmovgrgripredec: mov.b r0,(--r0) mov.w r7,(--r15) mov.w r4,(--r8) mov.b r3,(--r7) mov.w r1,(--r1) mov.w r5,(--r9) mov.w r4,(--r14) mov.b r4,(--r7) .text .global movgrigrmovgrigr: mov.b (r0),r0 mov.w (r15),r7 mov.w (r8),r4 mov.b (r7),r3 mov.w (r1),r1 mov.w (r4),r3 mov.b (r3),r6 mov.w (r7),r0 .text .global movgripostincgrmovgripostincgr: mov.b (r0++),r0 mov.w (r15++),r7 mov.w (r8++),r4 mov.b (r7++),r3 mov.w (r1++),r1 mov.w (r12++),r5 mov.b (r4++),r2 mov.b (r11++),r6 .text .global movgripredecgrmovgripredecgr: mov.b (--r0),r0 mov.w (--r15),r7 mov.w (--r8),r4 mov.b (--r7),r3 mov.w (--r1),r1 mov.b (--r8),r3 mov.b (--r11),r4 mov.w (--r1),r6 .text .global movgrgriimovgrgrii: mov.b r0,(r0,0) mov.w r7,(r15,-1) mov.w r4,(r8,-2048) mov.b r3,(r7,2047) mov.w r1,(r1,1) mov.w r6,(r8,-452) mov.w r4,(r11,572) mov.b r1,(r1,-1718) .text .global movgrgriipostincmovgrgriipostinc: mov.b r0,(r0++,0) mov.w r7,(r15++,-1) mov.w r4,(r8++,-2048) mov.b r3,(r7++,2047) mov.w r1,(r1++,1) mov.w r6,(r0++,-64) mov.b r7,(r15++,1060) mov.b r0,(r7++,847) .text .global movgrgriipredecmovgrgriipredec: mov.b r0,(--r0,0) mov.w r7,(--r15,-1) mov.w r4,(--r8,-2048) mov.b r3,(--r7,2047) mov.w r1,(--r1,1) mov.w r0,(--r15,1780) mov.w r6,(--r1,1506) mov.w r7,(--r3,-2033) .text .global movgriigrmovgriigr: mov.b (r0,0),r0 mov.w (r15,-1),r7 mov.w (r8,-2048),r4 mov.b (r7,2047),r3 mov.w (r1,1),r1 mov.w (r7,1948),r5 mov.b (r3,-844),r4 mov.w (r15,1704),r0 .text .global movgriipostincgrmovgriipostincgr: mov.b (r0++,0),r0 mov.w (r15++,-1),r7 mov.w (r8++,-2048),r4 mov.b (r7++,2047),r3 mov.w (r1++,1),r1 mov.w (r2++,-176),r7 mov.w (r8++,1389),r4 mov.b (r3++,47),r0 .text .global movgriipredecgrmovgriipredecgr: mov.b (--r0,0),r0 mov.w (--r15,-1),r7 mov.w (--r8,-2048),r4 mov.b (--r7,2047),r3 mov.w (--r1,1),r1 mov.b (--r8,1004),r4 mov.w (--r14,-1444),r2 mov.b (--r5,-927),r4 .text .global movgrgrmovgrgr: mov r0,r0 mov r15,r15 mov r8,r8 mov r7,r7 mov r1,r1 mov r9,r14 mov r7,r15 mov r12,r15 .text .global movimm8movimm8: mov Rx,#0 mov Rx,#255 mov Rx,#128 mov Rx,#127 mov Rx,#1 mov Rx,#136 mov Rx,#83 mov Rx,#104 .text .global movwimm8movwimm8: mov.w Rx,#0 mov.w Rx,#255 mov.w Rx,#128 mov.w Rx,#127 mov.w Rx,#1 mov.w Rx,#92 mov.w Rx,#97 mov.w Rx,#4 .text .global movgrimm8movgrimm8: mov r0,#0 mov r7,#255 mov r4,#128 mov r3,#127 mov r1,#1 mov r2,#206 mov r4,#55 mov r2,#3 .text .global movwgrimm8movwgrimm8: mov.w r0,#0 mov.w r7,#255 mov.w r4,#128 mov.w r3,#127 mov.w r1,#1 mov.w r4,#243 mov.w r3,#55 mov.w r2,#108 .text .global movgrimm16movgrimm16: mov r0,#0 mov r15,#65535 mov r8,#32768 mov r7,#32767 mov r1,#1 mov r4,#20066 mov r3,#7190 mov r2,#15972 .text .global movwgrimm16movwgrimm16: mov.w r0,#0 mov.w r15,#65535 mov.w r8,#32768 mov.w r7,#32767 mov.w r1,#1 mov.w r6,#16648 mov.w r8,#26865 mov.w r10,#20010 .text .global movlowgrmovlowgr: mov.b r0,RxL mov.b r15,RxL mov.b r8,RxL mov.b r7,RxL mov.b r1,RxL mov.b r11,RxL mov.b r5,RxL mov.b r2,RxL .text .global movhighgrmovhighgr: mov.b r0,RxH mov.b r15,RxH mov.b r8,RxH mov.b r7,RxH mov.b r1,RxH mov.b r2,RxH mov.b r7,RxH mov.b r2,RxH .text .global movfgrgrimovfgrgri: movf.b r0,(r0) movf.w r7,(r15) movf.w r4,(r8) movf.b r3,(r7) movf.w r1,(r1) movf.b r6,(r15) movf.b r1,(r10) movf.b r6,(r1) .text .global movfgrgripostincmovfgrgripostinc: movf.b r0,(r0++) movf.w r7,(r15++) movf.w r4,(r8++) movf.b r3,(r7++) movf.w r1,(r1++) movf.b r2,(r5++) movf.w r5,(r10++) movf.w r7,(r5++) .text .global movfgrgripredecmovfgrgripredec: movf.b r0,(--r0) movf.w r7,(--r15) movf.w r4,(--r8) movf.b r3,(--r7) movf.w r1,(--r1) movf.w r6,(--r10) movf.b r1,(--r14) movf.w r3,(--r7) .text .global movfgrigrmovfgrigr: movf.b (r0),r0 movf.w (r15),r7 movf.w (r8),r4 movf.b (r7),r3 movf.w (r1),r1 movf.b (r5),r4 movf.b (r3),r4 movf.w (r12),r3 .text .global movfgripostincgrmovfgripostincgr: movf.b (r0++),r0 movf.w (r15++),r7 movf.w (r8++),r4 movf.b (r7++),r3 movf.w (r1++),r1 movf.b (r9++),r5 movf.w (r10++),r4 movf.b (r9++),r1 .text .global movfgripredecgrmovfgripredecgr: movf.b (--r0),r0 movf.w (--r15),r7 movf.w (--r8),r4 movf.b (--r7),r3 movf.w (--r1),r1 movf.b (--r0),r2 movf.w (--r11),r2 movf.b (--r10),r5 .text .global movfgrgriimovfgrgrii: movf.b r0,(r8,r0,0) movf.w r7,(r15,r15,-1) movf.w r4,(r12,r8,-2048) movf.b r3,(r11,r7,2047) movf.w r1,(r9,r1,1) movf.b r7,(r15,r0,1473) movf.w r2,(r8,r9,-1522) movf.w r2,(r13,r1,480) .text .global movfgrgriipostincmovfgrgriipostinc: movf.b r0,(r8,r0++,0) movf.w r7,(r15,r15++,-1) movf.w r4,(r12,r8++,-2048) movf.b r3,(r11,r7++,2047) movf.w r1,(r9,r1++,1) movf.b r1,(r8,r2++,1398) movf.w r4,(r8,r9++,-778) movf.w r1,(r13,r14++,1564) .text .global movfgrgriipredecmovfgrgriipredec: movf.b r0,(r8,--r0,0) movf.w r7,(r15,--r15,-1) movf.w r4,(r12,--r8,-2048) movf.b r3,(r11,--r7,2047) movf.w r1,(r9,--r1,1) movf.b r6,(r8,--r7,254) movf.w r5,(r12,--r12,1673) movf.b r0,(r8,--r10,-38) .text .global movfgriigrmovfgriigr: movf.b (r8,r0,0),r0 movf.w (r15,r15,-1),r7 movf.w (r12,r8,-2048),r4 movf.b (r11,r7,2047),r3 movf.w (r9,r1,1),r1 movf.w (r15,r2,-1636),r3 movf.w (r14,r12,1626),r1 movf.b (r11,r14,1540),r0 .text .global movfgriipostincgrmovfgriipostincgr: movf.b (r8,r0++,0),r0 movf.w (r15,r15++,-1),r7 movf.w (r12,r8++,-2048),r4 movf.b (r11,r7++,2047),r3 movf.w (r9,r1++,1),r1 movf.b (r15,r13++,466),r3 movf.b (r11,r11++,250),r4 movf.b (r10,r10++,-1480),r7 .text .global movfgriipredecgrmovfgriipredecgr: movf.b (r8,--r0,0),r0 movf.w (r15,--r15,-1),r7 movf.w (r12,--r8,-2048),r4 movf.b (r11,--r7,2047),r3 movf.w (r9,--r1,1),r1 movf.b (r13,--r10,-608),r0 movf.b (r9,--r11,831),r7 movf.w (r15,--r15,-2036),r6 .text .global maskgrgrmaskgrgr: mask r0,r0 mask r15,r15 mask r8,r8 mask r7,r7 mask r1,r1 mask r4,r0 mask r6,r11 mask r8,r4 .text .global maskgrimm16maskgrimm16: mask r0,#0 mask r15,#65535 mask r8,#32768 mask r7,#32767 mask r1,#1 mask r7,#18153 mask r15,#7524 mask r14,#34349 .text .global pushgrpushgr: push r0 push r15 push r8 push r7 push r1 push r9 push r4 push r3 .text .global popgrpopgr: pop r0 pop r15 pop r8 pop r7 pop r1 pop r3 pop r2 pop r12 .text .global swpnswpn: swpn r0 swpn r15 swpn r8 swpn r7 swpn r1 swpn r15 swpn r4 swpn r3 .text .global swpbswpb: swpb r0 swpb r15 swpb r8 swpb r7 swpb r1 swpb r2 swpb r12 swpb r2 .text .global swpwswpw: swpw r0,r0 swpw r15,r15 swpw r8,r8 swpw r7,r7 swpw r1,r1 swpw r12,r4 swpw r8,r2 swpw r5,r13 .text .global andgrgrandgrgr: and r0,r0 and r15,r15 and r8,r8 and r7,r7 and r1,r1 and r2,r2 and r15,r5 and r7,r5 .text .global andimm8andimm8: and Rx,#0 and Rx,#255 and Rx,#128 and Rx,#127 and Rx,#1 and Rx,#206 and Rx,#11 and Rx,#232 .text .global andgrimm16andgrimm16: and r0,#0 and r15,#65535 and r8,#32768 and r7,#32767 and r1,#1 and r10,#17229 and r11,#61451 and r5,#46925 .text .global orgrgrorgrgr: or r0,r0 or r15,r15 or r8,r8 or r7,r7 or r1,r1 or r3,r5 or r14,r15 or r5,r12 .text .global orimm8orimm8: or Rx,#0 or Rx,#255 or Rx,#128 or Rx,#127 or Rx,#1 or Rx,#4 or Rx,#38 or Rx,#52 .text .global orgrimm16orgrimm16: or r0,#0 or r15,#65535 or r8,#32768 or r7,#32767 or r1,#1 or r2,#64563 or r2,#18395 or r1,#63059 .text .global xorgrgrxorgrgr: xor r0,r0 xor r15,r15 xor r8,r8 xor r7,r7 xor r1,r1 xor r14,r1 xor r9,r9 xor r12,r8 .text .global xorimm8xorimm8: xor Rx,#0 xor Rx,#255 xor Rx,#128 xor Rx,#127 xor Rx,#1 xor Rx,#208 xor Rx,#126 xor Rx,#55 .text .global xorgrimm16xorgrimm16: xor r0,#0 xor r15,#65535 xor r8,#32768 xor r7,#32767 xor r1,#1 xor r15,#56437 xor r3,#901 xor r2,#37017 .text .global notgrnotgr: not r0 not r15 not r8 not r7 not r1 not r4 not r3 not r3 .text .global addgrgraddgrgr: add r0,r0 add r15,r15 add r8,r8 add r7,r7 add r1,r1 add r12,r7 add r1,r10 add r14,r14 .text .global addgrimm4addgrimm4: add r0,#0 add r15,#15 add r8,#8 add r7,#7 add r1,#1 add r7,#0 add r10,#9 add r7,#8 .text .global addimm8addimm8: add Rx,#0 add Rx,#255 add Rx,#128 add Rx,#127 add Rx,#1 add Rx,#25 add Rx,#247 add Rx,#221 .text .global addgrimm16addgrimm16: add r0,#0 add r15,#255
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -