push_and_pop.py (5176:43fb805e1b85) | push_and_pop.py (5426:0bdcc60ccc45) |
---|---|
1# Copyright (c) 2007 The Hewlett-Packard Development Company | 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 9# use which is NOT directed to receiving any direct monetary --- 42 unchanged lines hidden (view full) --- 52# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53# 54# Authors: Gabe Black 55 56microcode = ''' 57def macroop PUSHF { 58 .adjust_env oszIn64Override 59 | 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 9# use which is NOT directed to receiving any direct monetary --- 42 unchanged lines hidden (view full) --- 52# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53# 54# Authors: Gabe Black 55 56microcode = ''' 57def macroop PUSHF { 58 .adjust_env oszIn64Override 59 |
60 # This should really read the whole flags register, not just user flags. 61 ruflags t1 | 60 rflags t1 |
62 stupd t1, ss, [1, t0, rsp], "-env.dataSize" 63}; 64 65def macroop POPF { 66 .adjust_env oszIn64Override 67 68 ld t1, ss, [1, t0, rsp] 69 addi rsp, rsp, dsz | 61 stupd t1, ss, [1, t0, rsp], "-env.dataSize" 62}; 63 64def macroop POPF { 65 .adjust_env oszIn64Override 66 67 ld t1, ss, [1, t0, rsp] 68 addi rsp, rsp, dsz |
70 # This should really write the whole flags register, not just user flags. 71 wruflags t1, t0 | 69 wrflags t1, t0 |
72}; 73''' | 70}; 71''' |