tests: add cmp register width confusion test

This commit is contained in:
fridtjof 2025-08-22 01:15:55 +02:00
parent 42e103ca1b
commit 39d33a065a

View file

@ -363,5 +363,13 @@ _start:
EXPECTD 0x87654321, r13
RESET
/* CMPd register width confusion */
MOVD $0x7fff1234, (r1,r0) /* r0 = 0x1234, r1 = 0x7fff */
MOVD $0, (r12)
cmpd (r12), (r1,r0) /* this should obviously not affect any of the pair registers */
cmpw r1, r0 /* this should set PSR.N and PSR.L (because r1 > r0) */
EXPECT_COND gt
ENDING
FAIL_HANDLER