diff options
| author | kx <kx@radix-linux.su> | 2026-10-09 18:00:15 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-09 18:00:15 +0300 |
| commit | 065da3509019b15dd0e678072e6be629e5330bef (patch) | |
| tree | 69c934c9e786ac048b4fbe8f4c4c5571661521f4 /tests/fixtures/byte-swap.s | |
| parent | d130fe27fa753be02ed76fd9b277aa3c3d928eb9 (diff) | |
| download | libmcpu-0.4.0.tar.xz | |
Version 0.4.00.4.0
Diffstat (limited to 'tests/fixtures/byte-swap.s')
| -rw-r--r-- | tests/fixtures/byte-swap.s | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/fixtures/byte-swap.s b/tests/fixtures/byte-swap.s new file mode 100644 index 0000000..7f666d0 --- /dev/null +++ b/tests/fixtures/byte-swap.s @@ -0,0 +1,15 @@ +; Byte-swap example. +; +; Build/run from examples/: +; ../utils/mcpu-as -o byte-swap.o byte-swap.s +; ../utils/mcpu-ld --stack-size=512 -o byte-swap byte-swap.o +; ../utils/mcpu-run --int-reg=r64@0x00010 byte-swap +; +; Expected output: 42 +; +.text +_start_life: + LDI r64@0x00000, 42 + BSWAP r64@0x00008, r64@0x00000 + BSWAP r64@0x00010, r64@0x00008 + HALT |
