diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-13 12:38:36 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-13 12:38:36 -0700 |
commit | 59a04f794f45864fe0901a9747ca24cfc41a9bb4 (patch) | |
tree | 1bf1fde5a81eb2580aaaca3ebbdb40f43bbd6ac6 /subx | |
parent | cb7b44647e5cf1bdb146986f205dfc71c8263fd5 (diff) | |
download | mu-59a04f794f45864fe0901a9747ca24cfc41a9bb4.tar.gz |
.
Diffstat (limited to 'subx')
-rw-r--r-- | subx/011run.cc | 2 | ||||
-rw-r--r-- | subx/013direct_addressing.cc | 10 | ||||
-rw-r--r-- | subx/015immediate_addressing.cc | 14 |
3 files changed, 13 insertions, 13 deletions
diff --git a/subx/011run.cc b/subx/011run.cc index 9c1bc4b0..d949f87e 100644 --- a/subx/011run.cc +++ b/subx/011run.cc @@ -35,7 +35,7 @@ put_new(Help, "syntax", cerr << " syntax\n"; :(code) -void test_add_imm32_to_eax() { +void test_add_imm32_to_EAX() { // At the lowest level, SubX programs are a series of hex bytes, each // (variable-length) instruction on one line. run( diff --git a/subx/013direct_addressing.cc b/subx/013direct_addressing.cc index d4dcd92a..a2331213 100644 --- a/subx/013direct_addressing.cc +++ b/subx/013direct_addressing.cc @@ -249,7 +249,7 @@ void test_subtract_r32_from_r32_signed_and_unsigned_overflow() { put_new(Name, "f7", "negate/multiply/divide rm32 (with EAX and EDX if necessary) depending on subop (neg/mul/idiv)"); :(code) -void test_multiply_eax_by_r32() { +void test_multiply_EAX_by_r32() { Reg[EAX].i = 4; Reg[ECX].i = 3; run( @@ -388,7 +388,7 @@ void test_negate_can_overflow() { //:: divide with remainder -void test_divide_eax_by_rm32() { +void test_divide_EAX_by_rm32() { Reg[EAX].u = 7; Reg[EDX].u = 0; Reg[ECX].i = 3; @@ -422,7 +422,7 @@ case 7: { // divide EDX:EAX by r/m32, storing quotient in EAX and remainder in } :(code) -void test_divide_eax_by_negative_rm32() { +void test_divide_EAX_by_negative_rm32() { Reg[EAX].u = 7; Reg[EDX].u = 0; Reg[ECX].i = -3; @@ -441,7 +441,7 @@ void test_divide_eax_by_negative_rm32() { ); } -void test_divide_negative_eax_by_rm32() { +void test_divide_negative_EAX_by_rm32() { Reg[EAX].i = -7; Reg[EDX].i = -1; // sign extend Reg[ECX].i = 3; @@ -460,7 +460,7 @@ void test_divide_negative_eax_by_rm32() { ); } -void test_divide_negative_edx_eax_by_rm32() { +void test_divide_negative_EDX_EAX_by_rm32() { Reg[EAX].i = 0; // lower 32 bits are clear Reg[EDX].i = -7; Reg[ECX].i = 0x40000000; // 2^30 (largest positive power of 2) diff --git a/subx/015immediate_addressing.cc b/subx/015immediate_addressing.cc index 959482cb..6682bc6d 100644 --- a/subx/015immediate_addressing.cc +++ b/subx/015immediate_addressing.cc @@ -211,7 +211,7 @@ void test_add_imm32_to_mem_at_r32() { put_new(Name, "2d", "subtract imm32 from EAX (sub)"); :(code) -void test_subtract_imm32_from_eax() { +void test_subtract_imm32_from_EAX() { Reg[EAX].i = 0x0d0c0baa; run( "== 0x1\n" // code segment @@ -612,7 +612,7 @@ void test_shift_right_logical_negative_r32_with_imm8() { put_new(Name, "25", "EAX = bitwise AND of imm32 with EAX (and)"); :(code) -void test_and_imm32_with_eax() { +void test_and_imm32_with_EAX() { Reg[EAX].i = 0xff; run( "== 0x1\n" // code segment @@ -704,7 +704,7 @@ void test_and_imm32_with_r32() { put_new(Name, "0d", "EAX = bitwise OR of imm32 with EAX (or)"); :(code) -void test_or_imm32_with_eax() { +void test_or_imm32_with_EAX() { Reg[EAX].i = 0xd0c0b0a0; run( "== 0x1\n" // code segment @@ -794,7 +794,7 @@ void test_or_imm32_with_r32() { put_new(Name, "35", "EAX = bitwise XOR of imm32 with EAX (xor)"); :(code) -void test_xor_imm32_with_eax() { +void test_xor_imm32_with_EAX() { Reg[EAX].i = 0xddccb0a0; run( "== 0x1\n" // code segment @@ -884,7 +884,7 @@ void test_xor_imm32_with_r32() { put_new(Name, "3d", "compare: set SF if EAX < imm32 (cmp)"); :(code) -void test_compare_imm32_with_eax_greater() { +void test_compare_imm32_with_EAX_greater() { Reg[EAX].i = 0x0d0c0b0a; run( "== 0x1\n" // code segment @@ -917,7 +917,7 @@ case 0x3d: { // compare EAX with imm32 } :(code) -void test_compare_eax_with_imm32_lesser() { +void test_compare_EAX_with_imm32_lesser() { Reg[EAX].i = 0x0d0c0b07; run( "== 0x1\n" // code segment @@ -930,7 +930,7 @@ void test_compare_eax_with_imm32_lesser() { ); } -void test_compare_imm32_with_eax_equal() { +void test_compare_imm32_with_EAX_equal() { Reg[EAX].i = 0x0d0c0b0a; run( "== 0x1\n" // code segment |