Deleted Added
sdiff udiff text old ( 5060:28b30e3e428c ) new ( 5061:2ac90228c205 )
full compact
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

--- 269 unchanged lines hidden (view full) ---

278 self.buildCppClasses(name, Name, suffix,
279 code, "", "true", else_code)
280 suffix = "Flags" + suffix
281
282 # If psrc1 or psrc2 is used, we need to actually insert code to
283 # compute it.
284 matcher = re.compile("(?<!\w)psrc1(?!\w)")
285 if matcher.search(allCode):
286 code = "IntReg psrc1 = pick(SrcReg1, 0, dataSize);" + code
287 matcher = re.compile("(?<!\w)psrc2(?!\w)")
288 if matcher.search(allCode):
289 code = "IntReg psrc2 = pick(SrcReg2, 1, dataSize);" + code
290
291 base = "X86ISA::RegOp"
292
293 # If imm8 shows up in the code, use the immediate templates, if
294 # not, hopefully the register ones will be correct.
295 templates = regTemplates
296 matcher = re.compile("(?<!\w)imm8(?!\w)")
297 if matcher.search(allCode):

--- 368 unchanged lines hidden (view full) ---

666 # Conversion microops
667 class ConvOp(RegOp):
668 abstract = True
669 def __init__(self, dest, src1):
670 super(ConvOp, self).__init__(dest, src1, "NUM_INTREGS")
671
672 #FIXME This needs to always use 32 bits unless REX.W is present
673 class cvtf_i2d(ConvOp):
674 code = 'FpDestReg = psrc1;'
675
676 class cvtf_i2d_hi(ConvOp):
677 code = 'FpDestReg = bits(SrcReg1, 63, 32);'
678
679 class cvtf_d2i(ConvOp):
680 code = '''
681 int64_t intSrcReg1 = static_cast<int64_t>(FpSrcReg1);
682 DestReg = merge(DestReg, intSrcReg1, dataSize);

--- 16 unchanged lines hidden ---