multiply_and_divide.py (5661:443e6f925027) multiply_and_divide.py (6458:d959f578ae42)
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# Redistribution and use of this software in source and binary forms,
5# with or without modification, are permitted provided that the
6# following conditions are met:
7#
8# The software must be used only for Non-Commercial Use which means any

--- 49 unchanged lines hidden (view full) ---

58#
59# Byte version of one operand unsigned multiply.
60#
61
62def macroop MUL_B_R
63{
64 mul1u rax, reg
65 mulel rax
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# Redistribution and use of this software in source and binary forms,
5# with or without modification, are permitted provided that the
6# following conditions are met:
7#
8# The software must be used only for Non-Commercial Use which means any

--- 49 unchanged lines hidden (view full) ---

58#
59# Byte version of one operand unsigned multiply.
60#
61
62def macroop MUL_B_R
63{
64 mul1u rax, reg
65 mulel rax
66 # Really ah
67 muleh rsi, flags=(OF,CF)
66 muleh ah, flags=(OF,CF)
68};
69
70def macroop MUL_B_M
71{
72 ld t1, seg, sib, disp
73 mul1u rax, t1
74 mulel rax
67};
68
69def macroop MUL_B_M
70{
71 ld t1, seg, sib, disp
72 mul1u rax, t1
73 mulel rax
75 # Really ah
76 muleh rsi, flags=(OF,CF)
74 muleh ah, flags=(OF,CF)
77};
78
79def macroop MUL_B_P
80{
81 rdip t7
82 ld t1, seg, riprel, disp
83 mul1u rax, t1
84 mulel rax
75};
76
77def macroop MUL_B_P
78{
79 rdip t7
80 ld t1, seg, riprel, disp
81 mul1u rax, t1
82 mulel rax
85 # Really ah
86 muleh rsi, flags=(OF,CF)
83 muleh ah, flags=(OF,CF)
87};
88
89#
90# One operand unsigned multiply.
91#
92
93def macroop MUL_R
94{

--- 22 unchanged lines hidden (view full) ---

117#
118# Byte version of one operand signed multiply.
119#
120
121def macroop IMUL_B_R
122{
123 mul1s rax, reg
124 mulel rax
84};
85
86#
87# One operand unsigned multiply.
88#
89
90def macroop MUL_R
91{

--- 22 unchanged lines hidden (view full) ---

114#
115# Byte version of one operand signed multiply.
116#
117
118def macroop IMUL_B_R
119{
120 mul1s rax, reg
121 mulel rax
125 # Really ah
126 muleh rsi, flags=(OF,CF)
122 muleh ah, flags=(OF,CF)
127};
128
129def macroop IMUL_B_M
130{
131 ld t1, seg, sib, disp
132 mul1s rax, t1
133 mulel rax
123};
124
125def macroop IMUL_B_M
126{
127 ld t1, seg, sib, disp
128 mul1s rax, t1
129 mulel rax
134 # Really ah
135 muleh rsi, flags=(OF,CF)
130 muleh ah, flags=(OF,CF)
136};
137
138def macroop IMUL_B_P
139{
140 rdip t7
141 ld t1, seg, riprel, disp
142 mul1s rax, t1
143 mulel rax
131};
132
133def macroop IMUL_B_P
134{
135 rdip t7
136 ld t1, seg, riprel, disp
137 mul1s rax, t1
138 mulel rax
144 # Really ah
145 muleh rsi, flags=(OF,CF)
139 muleh ah, flags=(OF,CF)
146};
147
148#
149# One operand signed multiply.
150#
151
152def macroop IMUL_R
153{

--- 680 unchanged lines hidden ---
140};
141
142#
143# One operand signed multiply.
144#
145
146def macroop IMUL_R
147{

--- 680 unchanged lines hidden ---