compile: wrap 64bit numbers with ULL() so 32bit compiles work

In the isa_parser, we need to check case statements.
This commit is contained in:
Nathan Binkert
2009-11-08 13:31:59 -08:00
parent 48525f581c
commit 708faa7677
2 changed files with 7 additions and 2 deletions

View File

@@ -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'

View 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;