rtasm: Implement x86_retw.

This commit is contained in:
José Fonseca 2008-04-27 21:09:45 +09:00
parent a8e39b6f5a
commit e3c4159957
2 changed files with 7 additions and 0 deletions

View file

@ -498,6 +498,12 @@ void x86_ret( struct x86_function *p )
emit_1ub(p, 0xc3);
}
void x86_retw( struct x86_function *p, unsigned short imm )
{
DUMP();
emit_3ub(p, 0xc2, imm & 0xff, (imm >> 8) & 0xff);
}
void x86_sahf( struct x86_function *p )
{
DUMP();

View file

@ -219,6 +219,7 @@ void x86_or( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_pop( struct x86_function *p, struct x86_reg reg );
void x86_push( struct x86_function *p, struct x86_reg reg );
void x86_ret( struct x86_function *p );
void x86_retw( struct x86_function *p, unsigned short imm );
void x86_sub( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_test( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_xor( struct x86_function *p, struct x86_reg dst, struct x86_reg src );