Skip to content
Snippets Groups Projects
Commit 5bd00a3e authored by jdh8d's avatar jdh8d
Browse files

Former-commit-id: 02816d9454359849c9f9cc12b0e0e31d9ce208cd
parent e8ffa191
No related branches found
No related tags found
No related merge requests found
......@@ -308,17 +308,19 @@ void STARS_IRDB_op_t::SetSIB(char value)
operand.mem.hasSIB=true;
// update the base register. Odd casting to avoid compiler error bcause base is a STARS_RegNo
(*(int*)&operand.mem.base)&=0x7;
(*(int*)&operand.mem.base)&=~0x7;
(*(int*)&operand.mem.base)|=(value&0x7);
// Set scale. Odd casting to avoid compiler error bcause base is a STARS_RegNo
(*(int*)&operand.mem.index)&=(0x7<<3);
(*(int*)&operand.mem.index)&=~(0x7<<3);
(*(int*)&operand.mem.index)|=(value>>3)&0x7;
// set scale
operand.mem.scale= (STARS_RegNo)((value>>6)&0x3);
if(operand.mem.index==STARS_x86_R_sp)
operand.mem.scale=(STARS_RegNo)0;
assert(value==GetSIB());
}
void STARS_IRDB_op_t::Dump()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment