stack_operations.py (5927:5e3367b103da) stack_operations.py (6344:b7104eda0795)
1# Copyright (c) 2007-2008 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

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

158
159def macroop ENTER_I_I {
160 # This needs to check all the addresses it writes to before it actually
161 # writes any values.
162
163 # Pull the different components out of the immediate
164 limm t1, imm
165 zexti t2, t1, 15, dataSize=8
1# Copyright (c) 2007-2008 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

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

158
159def macroop ENTER_I_I {
160 # This needs to check all the addresses it writes to before it actually
161 # writes any values.
162
163 # Pull the different components out of the immediate
164 limm t1, imm
165 zexti t2, t1, 15, dataSize=8
166 srl t1, t1, 16
166 srli t1, t1, 16
167 zexti t1, t1, 5, dataSize=8
168 # t1 is now the masked nesting level, and t2 is the amount of storage.
169
170 # Push rbp.
171 stupd rbp, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
172
173 # Save the stack pointer for later
174 mov t6, t6, rsp, dataSize=asz
175
176 # If the nesting level is zero, skip all this stuff.
167 zexti t1, t1, 5, dataSize=8
168 # t1 is now the masked nesting level, and t2 is the amount of storage.
169
170 # Push rbp.
171 stupd rbp, ss, [1, t0, rsp], "-env.stackSize", dataSize=ssz
172
173 # Save the stack pointer for later
174 mov t6, t6, rsp, dataSize=asz
175
176 # If the nesting level is zero, skip all this stuff.
177 subi t0, t1, t0, flags=(EZF,), dataSize=2
177 sub t0, t1, t0, flags=(EZF,), dataSize=2
178 br label("skipLoop"), flags=(CEZF,)
179
180 # If the level was 1, only push the saved rbp
181 subi t0, t1, 1, flags=(EZF,)
182 br label("bottomOfLoop"), flags=(CEZF,)
183
184 limm t4, "ULL(-1)", dataSize=8
185topOfLoop:

--- 17 unchanged lines hidden ---
178 br label("skipLoop"), flags=(CEZF,)
179
180 # If the level was 1, only push the saved rbp
181 subi t0, t1, 1, flags=(EZF,)
182 br label("bottomOfLoop"), flags=(CEZF,)
183
184 limm t4, "ULL(-1)", dataSize=8
185topOfLoop:

--- 17 unchanged lines hidden ---