From 708faa767763e65a2fded8aa33ac3c63cca9c84c Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sun, 8 Nov 2009 13:31:59 -0800 Subject: [PATCH] compile: wrap 64bit numbers with ULL() so 32bit compiles work In the isa_parser, we need to check case statements. --- src/arch/isa_parser.py | 7 ++++++- src/arch/x86/process.cc | 2 +- 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; -- 2.30.2