summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-11-08 13:31:59 -0800
committerNathan Binkert <nate@binkert.org>2009-11-08 13:31:59 -0800
commit708faa767763e65a2fded8aa33ac3c63cca9c84c (patch)
treeb0920e30711eebf6d2529b3e51bc52e3e06c3caf
parent48525f581c6233b8f7a8a872c5774d4e245f431c (diff)
downloadgem5-708faa767763e65a2fded8aa33ac3c63cca9c84c.tar.xz
compile: wrap 64bit numbers with ULL() so 32bit compiles work
In the isa_parser, we need to check case statements.
-rwxr-xr-xsrc/arch/isa_parser.py7
-rw-r--r--src/arch/x86/process.cc2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py
index e3da240d2..2db7c6aa6 100755
--- a/src/arch/isa_parser.py
+++ b/src/arch/isa_parser.py
@@ -585,7 +585,12 @@ StaticInstPtr
# 'default'
def p_case_label_0(self, t):
'case_label : intlit_list'
- t[0] = ': '.join(map(lambda a: 'case %#x' % a, t[1]))
+ def make_case(intlit):
+ if intlit >= 2**32:
+ return 'case ULL(%#x)' % intlit
+ else:
+ return 'case %#x' % intlit
+ t[0] = ': '.join(map(make_case, t[1]))
def p_case_label_1(self, t):
'case_label : DEFAULT'
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 7cc889d7c..42ca7b27d 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -175,7 +175,7 @@ I386LiveProcess::I386LiveProcess(LiveProcessParams *params,
int _numSyscallDescs) :
X86LiveProcess(params, objFile, _syscallDescs, _numSyscallDescs)
{
- _gdtStart = 0x100000000;
+ _gdtStart = ULL(0x100000000);
_gdtSize = VMPageSize;
vsyscallPage.base = 0xffffe000ULL;