Skip to content

Commit

Permalink
Add tests for OR and AND register with itself
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
  • Loading branch information
dthaler committed Jan 20, 2024
1 parent 98022c9 commit 2eb430f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/alu-bit.data
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ jne %r0, 0, exit

or32 %r0, %r5
or32 %r0, 0xa0
or32 %r0, %r0
# %r0 == 0xa5
jne %r0, 0xa5, exit

and32 %r0, 0xa3
mov32 %r9, 0x91
and32 %r0, %r9
and32 %r0, %r0
# %r0 == 0x81
jne %r0, 0x81, exit

Expand Down
2 changes: 2 additions & 0 deletions tests/alu64-bit.data
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ jne %r0, 0, exit

or %r0, %r5
or %r0, 0xa0
or %r0, %r0
# %r0 == 0xa5
jne %r0, 0xa5, exit

and %r0, 0xa3
mov %r9, 0x91
and %r0, %r9
and %r0, %r0
# %r0 == 0x81
jne %r0, 0x81, exit

Expand Down
2 changes: 1 addition & 1 deletion tests/jset-reg.data
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mov32 %r0, 0
mov32 %r1, 0x7
mov32 %r2, 0x8
jset %r1, %r2, exit # Not taken
jset $r1, %r1, +1 # Taken
jset %r1, %r1, +1 # Taken
exit

mov32 %r0, 1
Expand Down

0 comments on commit 2eb430f

Please sign in to comment.