diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-16 22:54:06 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-16 22:54:06 +0000 |
commit | 5dd9488c09081a76ff86e0d74e56a9d98d666d64 (patch) | |
tree | 59911b567f66eb5f51f8f7ea427fbfa2519ef187 /opreg_template.h | |
parent | 60cd49d5d7e6dd3858f72916fbcf462ba60bbd6e (diff) |
added cmov instruction
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@32 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'opreg_template.h')
-rw-r--r-- | opreg_template.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/opreg_template.h b/opreg_template.h index 6cf188ffed..d6453f9546 100644 --- a/opreg_template.h +++ b/opreg_template.h @@ -60,6 +60,19 @@ void OPPROTO glue(glue(op_movl,REGNAME),_A0)(void) REG = A0; } +/* mov T1 to REG if T0 is true */ +void OPPROTO glue(glue(op_cmovw,REGNAME),_T1_T0)(void) +{ + if (T0) + REG = (REG & 0xffff0000) | (T1 & 0xffff); +} + +void OPPROTO glue(glue(op_cmovl,REGNAME),_T1_T0)(void) +{ + if (T0) + REG = T1; +} + /* NOTE: T0 high order bits are ignored */ void OPPROTO glue(glue(op_movw,REGNAME),_T0)(void) { |