regop.isa (5060:28b30e3e428c) | regop.isa (5061:2ac90228c205) |
---|---|
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): | 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 | 286 code = "uint64_t psrc1 = pick(SrcReg1, 0, dataSize);" + code |
287 matcher = re.compile("(?<!\w)psrc2(?!\w)") 288 if matcher.search(allCode): | 287 matcher = re.compile("(?<!\w)psrc2(?!\w)") 288 if matcher.search(allCode): |
289 code = "IntReg psrc2 = pick(SrcReg2, 1, dataSize);" + code | 289 code = "uint64_t psrc2 = pick(SrcReg2, 1, dataSize);" + code 290 # Also make available versions which do sign extension 291 matcher = re.compile("(?<!\w)spsrc1(?!\w)") 292 if matcher.search(allCode): 293 code = "int64_t spsrc1 = signedPick(SrcReg1, 0, dataSize);" + code 294 matcher = re.compile("(?<!\w)spsrc2(?!\w)") 295 if matcher.search(allCode): 296 code = "int64_t spsrc2 = signedPick(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): | 297 298 base = "X86ISA::RegOp" 299 300 # If imm8 shows up in the code, use the immediate templates, if 301 # not, hopefully the register ones will be correct. 302 templates = regTemplates 303 matcher = re.compile("(?<!\w)imm8(?!\w)") 304 if matcher.search(allCode): --- 368 unchanged lines hidden (view full) --- 673 # Conversion microops 674 class ConvOp(RegOp): 675 abstract = True 676 def __init__(self, dest, src1): 677 super(ConvOp, self).__init__(dest, src1, "NUM_INTREGS") 678 679 #FIXME This needs to always use 32 bits unless REX.W is present 680 class cvtf_i2d(ConvOp): |
674 code = 'FpDestReg = psrc1;' | 681 code = 'FpDestReg = spsrc1;' |
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 --- | 682 683 class cvtf_i2d_hi(ConvOp): 684 code = 'FpDestReg = bits(SrcReg1, 63, 32);' 685 686 class cvtf_d2i(ConvOp): 687 code = ''' 688 int64_t intSrcReg1 = static_cast<int64_t>(FpSrcReg1); 689 DestReg = merge(DestReg, intSrcReg1, dataSize); --- 16 unchanged lines hidden --- |