1// This input was created by taking the instruction productions in2// the old assembler's (8a's) grammar and hand-writing complete3// instructions for each rule, to guarantee we cover the same space.45#include "../../../../../runtime/textflag.h"67TEXT foo(SB), DUPOK|NOSPLIT, $089// LTYPE1 nonrem { outcode(int($1), &$2); }10 SETCC AX11 SETCC foo+4(SB)1213// LTYPE2 rimnon { outcode(int($1), &$2); }14 DIVB AX15 DIVB foo+4(SB)16 PUSHL $foo+4(SB)17 POPL AX1819// LTYPE3 rimrem { outcode(int($1), &$2); }20 SUBB $1, AX21 SUBB $1, foo+4(SB)22 SUBB BX, AX23 SUBB BX, foo+4(SB)2425// LTYPE4 remrim { outcode(int($1), &$2); }26 CMPB AX, $127 CMPB foo+4(SB), $428 CMPB BX, AX29 CMPB foo+4(SB), BX3031// LTYPER nonrel { outcode(int($1), &$2); }32label:33 JC label // JCS34 JC -1(PC) // JCS -1(PC)3536// LTYPEC spec3 { outcode(int($1), &$2); }37 CALL AX38 JCS 2(PC)39 JMP *AX // JMP AX40 CALL *foo(SB)41 JCS 2(PC)42 JMP $443 JCS 2(PC)44 JMP label // JMP 1645 CALL foo(SB)46// CALL (AX*4) // TODO: This line is silently dropped on the floor!47 CALL foo+4(SB)(AX*4)48 CALL *4(SP) // CALL 4(SP)49 CALL *(AX) // CALL (AX)50 CALL *(SP) // CALL (SP)51// CALL *(AX*4) // TODO: This line is silently dropped on the floor!52 CALL *(AX)(AX*4) // CALL (AX)(AX*4)53 CALL 4(SP)54 CALL (AX)55 CALL (SP)56// CALL (AX*4) // TODO: This line is silently dropped on the floor!57 JCS 2(PC)58 JMP (AX)(AX*4)5960// LTYPEN spec4 { outcode(int($1), &$2); }61 NOP62 NOP AX63 NOP foo+4(SB)6465// LTYPES spec5 { outcode(int($1), &$2); }66 SHLL $4, BX67 SHLL $4, foo+4(SB)68 SHLL $4, foo+4(SB):AX // SHLL $4, AX, foo+4(SB)6970// LTYPEM spec6 { outcode(int($1), &$2); }71 MOVL AX, BX72 MOVL $4, BX7374// LTYPEI spec7 { outcode(int($1), &$2); }75 IMULL AX76 IMULL $4, CX77 IMULL AX, BX7879// LTYPEXC spec9 { outcode(int($1), &$2); }80 CMPPD X0, X1, 481 CMPPD foo+4(SB), X1, 48283// LTYPEX spec10 { outcode(int($1), &$2); }84 PINSRD $1, (AX), X085 PINSRD $2, foo+4(FP), X08687// Was bug: LOOP is a branch instruction.88 JCS 2(PC)89loop:90 LOOP loop // LOOP9192// Tests for TLS reference.93 MOVL (TLS), AX94 MOVL 8(TLS), DX9596// LTYPE0 nonnon { outcode(int($1), &$2); }97 RET98 RET foo(SB)
Findings
✓ No findings reported for this file.