Skip to content

Commit

Permalink
Merge branch 'main' of github.com:JasQuirk/AssemblyLine into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dderjoel committed Feb 10, 2025
2 parents 33eb49e + 926980a commit b3ca972
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ TEST_ASM = \
test/ptr.asm \
test/push.asm \
test/pxor.asm \
test/rdpmc.asm \
test/rdtsc.asm \
test/rdtscp.asm \
test/ror.asm \
Expand Down
1 change: 1 addition & 0 deletions src/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ typedef enum {
pxor,
rcr,
rdpmc,
rdpru,
rdtsc,
rdtscp,
ret,
Expand Down
3 changes: 2 additions & 1 deletion src/instructions.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ const struct instr_table INSTR_TABLE[] = {
{"rcr", rcr, {mi, ri}, M, SHIFT, 1, 3, 4, {REX, 0xd0, REG, ib}},
{{'\0'}, rcr, {NA, NA}, M, SHIFT, 1, 2, 4, {REX, 0xc1, REG, ib}},
{"rdpmc", rdpmc, {n, n}, NA, OTHER, NA, NA, 2, {0x0f, 0x33}},
{"rdpru", rdpru, {n, n}, NA, OTHER, NA, NA, 3, {0x0f, 0x01, 0xFD}},
{"rdtsc", rdtsc, {n, n}, NA, OTHER, NA, NA, 2, {0x0f, 0x31}},
{"rdtscp", rdtscp, {n, n}, NA, OTHER, NA, NA, 3, {0x0f, 0x01, 0xf9}},
{"ret", ret, {n, n}, NA, CONTROL_FLOW, NA, NA, 1, {0xc3}},
Expand Down Expand Up @@ -288,7 +289,7 @@ const struct instr_table INSTR_TABLE[] = {
{"shld", shld, {rri, mri}, MR, OTHER, NA, NA, 5, {REX, 0x0f, 0xa4, REG, ib}},
{{'\0'}, shld, {rrr, mrr}, MR, OTHER, NA, NA, 4, {REX, 0x0f, 0xa5, REG}},
{"shlx", shlx, {rrr, rmr}, RMV, VECTOR_EXT, NA, NA, 3, {VEX(NDS,LZ,X66,X0F38,W0_W1), 0xf7, REG}},
{"shr", shr, {mi, ri}, M, SHIFT, 1, 5, 4, {REX, 0xbe, REG, ib}},
{"shr", shr, {mi, ri}, M, SHIFT, 1, 5, 4, {REX, 0xd0, REG, ib}},
{{'\0'}, shr, {NA, NA}, M, SHIFT, 1, 5, 4, {REX, 0xc0, REG, ib}},
{{'\0'}, shr, {mr, rr}, M, SHIFT, 1, 5, 3, {REX, 0xd2, REG}},
{"shrd", shrd, {mri, rri}, MR, OTHER, 2, NA, 4, {REX, 0x0f, 0xa9, REG}},
Expand Down
4 changes: 4 additions & 0 deletions test/rdpmc.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SECTION .text
GLOBAL test
test:
rdpmc
4 changes: 4 additions & 0 deletions test/rdpru.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SECTION .text
GLOBAL test
test:
rdpru
5 changes: 5 additions & 0 deletions test/shr.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SECTION .text
GLOBAL test
test:
shr r10, 0x1
shr r10, 0x13
shr r10, 0x14
shr r10, 0x15
Expand All @@ -17,6 +18,7 @@ shr r10, 0x3e
shr r10, 0x3f
shr r10, 0x8
shr r10, 0x9
shr r11, 0x1
shr r11, 0x13
shr r11, 0x14
shr r11, 0x15
Expand All @@ -37,6 +39,7 @@ shr r11, 0x3e
shr r11, 0x3f
shr r11, 0x8
shr r11, 0x9
shr r12, 0x1
shr r12, 0x14
shr r12, 0x15
shr r12, 0x1c
Expand All @@ -56,6 +59,7 @@ shr r12, 0x3d
shr r12, 0x3e
shr r12, 0x3f
shr r12, 0x9
shr r13, 0x1
shr r13, 0x13
shr r13, 0x14
shr r13, 0x15
Expand Down Expand Up @@ -298,6 +302,7 @@ shr al, 0x13
shr bl, 0x13
shr cl, 0x13
shr dl, 0x13
shr dil, 0x1
shr dil, 0x13
shr r8w, 0x13
shr r9w, 0x13
Expand Down

0 comments on commit b3ca972

Please sign in to comment.