Bitwise test bench

From Zet
Jump to: navigation, search

In this test bench, we test all modes of bitwise operations.

  1. and 1 (w:r,r), 2 (w:m,r), 3 (w:r,m), 4 (w:i,a), 5 (w:i,r), 6 (w:i,m), 7 (b:r,r), 8 (b:m,r), 9 (b:r,m), 10(b:i,a), 11(b:i,r), 12(b:i,m)
  2. or 13(w:r,r), 14(w:m,r), 15(w:r,m), 16(w:i,a), 17(w:i,r), 18(w:i,m), 19(b:r,r), 20(b:m,r), 21(b:r,m), 22(b:i,a), 23(b:i,r), 24(b:i,m)
  3. xor 25(w:r,r), 26(w:m,r), 27(w:r,m), 28(w:i,a), 29(w:i,r), 30(w:i,m), 31(b:r,r), 32(b:m,r), 33(b:r,m), 34(b:i,a), 35(b:i,r), 36(b:i,m)
  4. test 37(w:r,r), 38(w:m,r), 39(w:r,m), 40(w:i,a), 41(w:i,r), 42(w:i,m), 43(b:r,r), 44(b:m,r), 45(b:r,m), 46(b:i,a), 47(b:i,r), 48(b:i,m)
  5. not 49(w:r), 50(w:m), 51(b:r), 52(b:m)

Code

<embed_code>10_bitwise.s</embed_code>

Results

Memory contents at the end should be:

0x00:  0x0000  0x2400  0x30c0  0x57ff  0xff6e  0x3939  0x89ed  0x4a80
0x10:  0xa8a8  0x35f6  0x4f00  0xb419  0xe92d  0xXXXX  0xXXXX  0xXXXX
0x20:  0x4218  0x2400  0x4451  0x0208  0x0040  0x0840  0xfdf7  0x7ae8
0x30:  0x45e3  0xbb7d  0xf8e7  0xf7e3  0xcb0c  0x123a  0xedb7  0xa0cb
0x40:  0x035a  0xa201  0xdbe1  0x6549  0x4d37  0x5cc4  0x494d  0xe137
0x50:  0x405a  0xXXa5  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX
0x60:  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX
0x70:  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX
0x80:  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0xXXXX
0x90:  0xXXXX  0xXXXX  0xXXXX  0xXXXX  0x0293  0x0293  0x0293  0x0293
0xa0:  0x0082  0x0082  0x0046  0x0002  0x0006  0x0006  0x0006  0x0006
0xb0:  0x0006  0x0006  0x0002  0x0006  0x0082  0x0082  0x0002  0x0086
0xc0:  0x0006  0x0006  0x0002  0x0082  0x0086  0x0006  0x0006  0x0086
0xd0:  0x0002  0x0082  0x0082  0x0086  0x0082  0x0086  0x0082  0x0086
0xe0:  0x0002  0x0002  0x0006  0x0082  0x0046  0x0002  0x0002  0x0006
0xf0:  0x0046  0x0002  0x0006  0x0002  0x0002  0x0046  0x0006  0x0006