def macroop SYSCALL_64
{
# All 1s.
- limm t1, "(uint64_t)(-1)"
+ limm t1, "(uint64_t)(-1)", dataSize=8
# Save the next RIP.
rdip rcx
# Stick rflags with RF masked into r11.
rflags t2
- limm t3, "~RFBit"
+ limm t3, "~RFBit", dataSize=8
andi r11, t2, t3, dataSize=8
rdval t3, star
# Not writable, read/execute-able, not expandDown,
# dpl=0, defaultSize=0, long mode
limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (1 << 6))
+ (0 << 3) | (0 << 5) | (1 << 6)), dataSize=8
wrattr cs, t4
# Set up SS.
# Writable, readable, not expandDown,
# dpl=0, defaultSize=0, not long mode
limm t4, ((1 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (0 << 6))
+ (0 << 3) | (0 << 5) | (0 << 6)), dataSize=8
wrattr ss, t4
# Set the new rip.
def macroop SYSCALL_COMPAT
{
# All 1s.
- limm t1, "(uint64_t)(-1)"
+ limm t1, "(uint64_t)(-1)", dataSize=8
# Save the next RIP.
rdip rcx
# Stick rflags with RF masked into r11.
rflags t2
- limm t3, "~RFBit"
+ limm t3, "~RFBit", dataSize=8
andi r11, t2, t3, dataSize=8
rdval t3, star
# Not writable, read/execute-able, not expandDown,
# dpl=0, defaultSize=0, long mode
limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (1 << 6))
+ (0 << 3) | (0 << 5) | (1 << 6)), dataSize=8
wrattr cs, t4
# Set up SS.
# Writable, readable, not expandDown,
# dpl=0, defaultSize=0, not long mode
limm t4, ((1 << 0) | (1 << 1) | (0 << 2) | \
- (0 << 3) | (0 << 5) | (0 << 6))
+ (0 << 3) | (0 << 5) | (0 << 6)), dataSize=8
wrattr ss, t4
# Set the new rip.
def macroop SYSRET_TO_64
{
# All 1s.
- limm t1, "(uint64_t)(-1)"
+ limm t1, "(uint64_t)(-1)", dataSize=8
rdval t3, star
srli t3, t3, 48, dataSize=8
ori t3, t3, 3, dataSize=1
# Set rflags to r11 with RF and VM cleared.
- limm t4, "~(RFBit | VMBit)"
+ limm t4, "~(RFBit | VMBit)", dataSize=8
and t4, t4, r11, dataSize=8
wrflags t4, t0
# Not writable, read/execute-able, not expandDown,
# dpl=3, defaultSize=0, long mode
limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (3 << 3) | (0 << 5) | (1 << 6))
+ (3 << 3) | (0 << 5) | (1 << 6)), dataSize=8
wrattr cs, t4
# Only the selector is changed for SS.
def macroop SYSRET_TO_COMPAT
{
# All 1s.
- limm t1, "(uint64_t)(-1)"
+ limm t1, "(uint64_t)(-1)", dataSize=8
rdval t3, star
srli t3, t3, 48, dataSize=8
ori t3, t3, 3, dataSize=1
# Set rflags to r11 with RF and VM cleared.
- limm t4, "~(RFBit | VMBit)"
+ limm t4, "~(RFBit | VMBit)", dataSize=8
and t4, t4, r11, dataSize=8
wrflags t4, t0
# Not writable, read/execute-able, not expandDown,
# dpl=3, defaultSize=1, not long mode
limm t4, ((0 << 0) | (1 << 1) | (0 << 2) | \
- (3 << 3) | (1 << 5) | (0 << 6))
+ (3 << 3) | (1 << 5) | (0 << 6)), dataSize=8
wrattr cs, t4
# Only the selector is changed for SS.
def macroop LTR_R
{
chks reg, t0, TRCheck
- limm t4, 0
+ limm t4, 0, dataSize=8
srli t4, reg, 3, dataSize=2
ldst t1, tsg, [8, t4, t0], dataSize=8
ld t2, tsg, [8, t4, t0], 8, dataSize=8
{
ld t5, seg, sib, disp, dataSize=2
chks t5, t0, TRCheck
- limm t4, 0
+ limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
ldst t1, tsg, [8, t4, t0], dataSize=8
ld t2, tsg, [8, t4, t0], 8, dataSize=8
rdip t7
ld t5, seg, riprel, disp, dataSize=2
chks t5, t0, TRCheck
- limm t4, 0
+ limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
ldst t1, tsg, [8, t4, t0], dataSize=8
ld t2, tsg, [8, t4, t0], 8, dataSize=8
{
chks reg, t0, InGDTCheck, flags=(EZF,)
br label("end"), flags=(CEZF,)
- limm t4, 0
+ limm t4, 0, dataSize=8
srli t4, reg, 3, dataSize=2
ldst t1, tsg, [8, t4, t0], dataSize=8
ld t2, tsg, [8, t4, t0], 8, dataSize=8
ld t5, seg, sib, disp, dataSize=2
chks t5, t0, InGDTCheck, flags=(EZF,)
br label("end"), flags=(CEZF,)
- limm t4, 0
+ limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
ldst t1, tsg, [8, t4, t0], dataSize=8
ld t2, tsg, [8, t4, t0], 8, dataSize=8
ld t5, seg, riprel, disp, dataSize=2
chks t5, t0, InGDTCheck, flags=(EZF,)
br label("end"), flags=(CEZF,)
- limm t4, 0
+ limm t4, 0, dataSize=8
srli t4, t5, 3, dataSize=2
ldst t1, tsg, [8, t4, t0], dataSize=8
ld t2, tsg, [8, t4, t0], 8, dataSize=8