compile: wrap 64bit numbers with ULL() so 32bit compiles work
authorNathan Binkert <nate@binkert.org>
Sun, 8 Nov 2009 21:31:59 +0000 (13:31 -0800)
committerNathan Binkert <nate@binkert.org>
Sun, 8 Nov 2009 21:31:59 +0000 (13:31 -0800)
In the isa_parser, we need to check case statements.

src/arch/isa_parser.py
src/arch/x86/process.cc

index e3da240d2550774ad4fc9fb558ed5bf4fe0d1be7..2db7c6aa6d134590286fa5d22143d3718b35e708 100755 (executable)
@@ -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'
index 7cc889d7cc170f2186d121567f8d8ed2c144732a..42ca7b27d797dc5745e34faaa918340a7b2fab00 100644 (file)
@@ -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;