diff options
author | Jason Gross <jgross@mit.edu> | 2017-09-12 21:27:40 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-09-12 21:27:40 -0400 |
commit | e4b51d477289e9fa6b0d5dc5d66df1314be530ed (patch) | |
tree | d1bcd449e4f103111371f3003b6fcd220954fa59 /register-allocate.py | |
parent | 4bbbda67a7adadc2f30de4e88746c777460d12bf (diff) |
Preserved rbp, not rsp
Apparently gcc accessess memory via rbp, according to objdump -D
Diffstat (limited to 'register-allocate.py')
-rwxr-xr-x | register-allocate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/register-allocate.py b/register-allocate.py index be18e0c65..c517078bd 100755 --- a/register-allocate.py +++ b/register-allocate.py @@ -6,8 +6,8 @@ LAMBDA = u'\u03bb' NAMED_REGISTERS = ('RAX', 'RCX', 'RDX', 'RBX', 'RSP', 'RBP', 'RSI', 'RDI') NUMBERED_REGISTERS = tuple('r%d' % i for i in range(16)) -RESERVED_REGISTERS = ('RSP', ) -TO_BE_RESTORED_REGISTERS = ('RBP', ) +RESERVED_REGISTERS = ('RBP', ) +TO_BE_RESTORED_REGISTERS = ('RSP', ) NAMED_REGISTER_MAPPING = dict(('r%d' % i, reg) for i, reg in enumerate(NAMED_REGISTERS)) REAL_REGISTERS = tuple(list(NAMED_REGISTERS) + list(NUMBERED_REGISTERS)) REGISTERS = ['reg%d' % i for i in range(13)] |