Deleted Added
sdiff udiff text old ( 7087:fb8d5786ff30 ) new ( 7872:b21a94bf6a28 )
full compact
1# Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

65 addi rsp, rsp, ssz, dataSize=asz
66 st t1, seg, riprel, disp, dataSize=ssz
67};
68
69def macroop PUSH_R {
70 # Make the default data size of pops 64 bits in 64 bit mode
71 .adjust_env oszIn64Override
72
73 stupd reg, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
74};
75
76def macroop PUSH_I {
77 # Make the default data size of pops 64 bits in 64 bit mode
78 .adjust_env oszIn64Override
79
80 limm t1, imm
81 stupd t1, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
82};
83
84def macroop PUSH_M {
85 # Make the default data size of pops 64 bits in 64 bit mode
86 .adjust_env oszIn64Override
87
88 ld t1, seg, sib, disp, dataSize=ssz
89 stupd t1, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
90};
91
92def macroop PUSH_P {
93 # Make the default data size of pops 64 bits in 64 bit mode
94 .adjust_env oszIn64Override
95
96 rdip t7
97 ld t1, seg, riprel, disp, dataSize=ssz
98 stupd t1, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
99};
100
101def macroop PUSHA {
102 # Check all the stack addresses. We'll assume that if the beginning and
103 # end are ok, then the stuff in the middle should be as well.
104 cda ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
105 cda ss, [1, t0, rsp], "-8 * env.stackSize", dataSize=ssz
106 stupd rax, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
107 stupd rcx, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
108 stupd rdx, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
109 stupd rbx, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
110 stupd rsp, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
111 stupd rbp, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
112 stupd rsi, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
113 stupd rdi, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
114};
115
116def macroop POPA {
117 # Check all the stack addresses. We'll assume that if the beginning and
118 # end are ok, then the stuff in the middle should be as well.
119 ld t1, ss, [1, t0, rsp], "0 * env.stackSize", dataSize=ssz
120 ld t2, ss, [1, t0, rsp], "7 * env.stackSize", dataSize=ssz
121 mov rdi, rdi, t1, dataSize=ssz

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

146 # Pull the different components out of the immediate
147 limm t1, imm, dataSize=8
148 zexti t2, t1, 15, dataSize=8
149 srli t1, t1, 16, dataSize=8
150 zexti t1, t1, 5, dataSize=8
151 # t1 is now the masked nesting level, and t2 is the amount of storage.
152
153 # Push rbp.
154 stupd rbp, ss, [1, t0, rsp], "-env.dataSize"
155
156 # Save the stack pointer for later
157 mov t6, t6, rsp
158
159 # If the nesting level is zero, skip all this stuff.
160 sub t0, t1, t0, flags=(EZF,), dataSize=2
161 br label("skipLoop"), flags=(CEZF,)
162
163 # If the level was 1, only push the saved rbp
164 subi t0, t1, 1, flags=(EZF,)
165 br label("bottomOfLoop"), flags=(CEZF,)
166
167 limm t4, "ULL(-1)", dataSize=8
168topOfLoop:
169 ld t5, ss, [dsz, t4, rbp]
170 stupd t5, ss, [1, t0, rsp], "-env.dataSize"
171
172 # If we're not done yet, loop
173 subi t4, t4, 1, dataSize=8
174 add t0, t4, t1, flags=(EZF,)
175 br label("topOfLoop"), flags=(nCEZF,)
176
177bottomOfLoop:
178 # Push the old rbp onto the stack
179 stupd t6, ss, [1, t0, rsp], "-env.dataSize"
180
181skipLoop:
182 sub rsp, rsp, t2, dataSize=ssz
183 mov rbp, rbp, t6
184};
185'''