diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-09-17 22:52:47 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-09-17 22:52:47 +0000 |
commit | f513a41a3db60c27c25147730e3a2bd6290bf622 (patch) | |
tree | 2dcbbd004c3a4129ee7a113bb9d6073494c77376 /op_string.h | |
parent | c106152d26a68e86400d454c86b1e908ba3f77d8 (diff) |
finished simplifying string operations
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@379 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'op_string.h')
-rw-r--r-- | op_string.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/op_string.h b/op_string.h deleted file mode 100644 index 66b598b23a..0000000000 --- a/op_string.h +++ /dev/null @@ -1,94 +0,0 @@ - -void OPPROTO glue(glue(op_repz_scas, SUFFIX), STRING_SUFFIX)(void) -{ - int v1, v2, inc; - - if (CX != 0) { - /* NOTE: the flags are not modified if CX == 0 */ - v1 = EAX & DATA_MASK; - inc = (DF << SHIFT); - do { - v2 = glue(ldu, SUFFIX)(DI_ADDR); - INC_DI(); - DEC_CX(); - if (v1 != v2) - break; - } while (CX != 0); - CC_SRC = v2; - CC_DST = v1 - v2; - CC_OP = CC_OP_SUBB + SHIFT; - } - FORCE_RET(); -} - -void OPPROTO glue(glue(op_repnz_scas, SUFFIX), STRING_SUFFIX)(void) -{ - int v1, v2, inc; - - if (CX != 0) { - /* NOTE: the flags are not modified if CX == 0 */ - v1 = EAX & DATA_MASK; - inc = (DF << SHIFT); - do { - v2 = glue(ldu, SUFFIX)(DI_ADDR); - INC_DI(); - DEC_CX(); - if (v1 == v2) - break; - } while (CX != 0); - CC_SRC = v2; - CC_DST = v1 - v2; - CC_OP = CC_OP_SUBB + SHIFT; - } - FORCE_RET(); -} - -void OPPROTO glue(glue(op_repz_cmps, SUFFIX), STRING_SUFFIX)(void) -{ - int v1, v2, inc; - if (CX != 0) { - inc = (DF << SHIFT); - do { - v1 = glue(ldu, SUFFIX)(SI_ADDR); - v2 = glue(ldu, SUFFIX)(DI_ADDR); - INC_SI(); - INC_DI(); - DEC_CX(); - if (v1 != v2) - break; - } while (CX != 0); - CC_SRC = v2; - CC_DST = v1 - v2; - CC_OP = CC_OP_SUBB + SHIFT; - } - FORCE_RET(); -} - -void OPPROTO glue(glue(op_repnz_cmps, SUFFIX), STRING_SUFFIX)(void) -{ - int v1, v2, inc; - if (CX != 0) { - inc = (DF << SHIFT); - do { - v1 = glue(ldu, SUFFIX)(SI_ADDR); - v2 = glue(ldu, SUFFIX)(DI_ADDR); - INC_SI(); - INC_DI(); - DEC_CX(); - if (v1 == v2) - break; - } while (CX != 0); - CC_SRC = v2; - CC_DST = v1 - v2; - CC_OP = CC_OP_SUBB + SHIFT; - } - FORCE_RET(); -} - -#undef STRING_SUFFIX -#undef SI_ADDR -#undef DI_ADDR -#undef INC_SI -#undef INC_DI -#undef CX -#undef DEC_CX |