1# mach: crisv32 2# output: 0\ncafebabe\nbaddbeef\necc0d00d\nc0ceface\npass\n 3 4; Check that the PID register has the right size, 32 bits: check 5; immediate, to/from register and memory. (This has to be done in 6; supervisor mode, so don't set u.) 7 8 .include "testutils.inc" 9 .macro dumpid 10 move $pid,$r3 11 dumpr3 12 .endm 13 14 start 15 moveq -1,$r3 16 move 0,$pid 17 dumpid ; 0 18 move 0xcafebabe,$pid 19 dumpid ; cafebabe 20 move.d 0xbaddbeef,$r2 21 move $r2,$pid 22 dumpid ; baddbeef 23 move.d 0f,$r0 24 move [$r0+],$pid 25 cmp.d 0f+4,$r0 26 beq 1f 27 nop 28dofail: 29 fail 300: 31 .dword 0xecc0d00d 320: 33 .dword 0xc0ceface 341: 35 dumpid ; ecc0d00d 36 move.d 0b,$r1 37 move 0xc0ceface,$pid 38 move $pid,[$r1+] 39 cmp.d 0b+4,$r1 40 bne dofail 41 subq 4,$r1 42 nop 43 move.d [$r1],$r3 44 dumpr3 ; c0ceface 45 pass 46