regop.isa (5424:d4f80459ad5d) | regop.isa (5426:0bdcc60ccc45) |
---|---|
1// Copyright (c) 2007-2008 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 --- 831 unchanged lines hidden (view full) --- 840 841 class Br(WrRegOp, CondRegOp): 842 code = 'nuIP = psrc1 + op2;' 843 else_code='nuIP = nuIP;' 844 845 class Wruflags(WrRegOp): 846 code = 'ccFlagBits = psrc1 ^ op2' 847 | 1// Copyright (c) 2007-2008 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 --- 831 unchanged lines hidden (view full) --- 840 841 class Br(WrRegOp, CondRegOp): 842 code = 'nuIP = psrc1 + op2;' 843 else_code='nuIP = nuIP;' 844 845 class Wruflags(WrRegOp): 846 code = 'ccFlagBits = psrc1 ^ op2' 847 |
848 class Wrflags(WrRegOp): 849 code = ''' 850 MiscReg newFlags = psrc1 ^ op2; 851 MiscReg userFlagMask = 0xDD5; 852 // Get only the user flags 853 ccFlagBits = newFlags & userFlagMask; 854 // Get everything else 855 nccFlagBits = newFlags & ~userFlagMask; 856 ''' 857 |
|
848 class Rdip(RdRegOp): 849 code = 'DestReg = RIP - CSBase' 850 851 class Ruflags(RdRegOp): 852 code = 'DestReg = ccFlagBits' 853 | 858 class Rdip(RdRegOp): 859 code = 'DestReg = RIP - CSBase' 860 861 class Ruflags(RdRegOp): 862 code = 'DestReg = ccFlagBits' 863 |
864 class Rflags(RdRegOp): 865 code = 'DestReg = ccFlagBits | nccFlagBits' 866 |
|
854 class Ruflag(RegOp): 855 code = ''' 856 int flag = bits(ccFlagBits, imm8); 857 DestReg = merge(DestReg, flag, dataSize); 858 ccFlagBits = (flag == 0) ? (ccFlagBits | EZFBit) : 859 (ccFlagBits & ~EZFBit); 860 ''' 861 def __init__(self, dest, imm, flags=None, \ 862 dataSize="env.dataSize"): 863 super(Ruflag, self).__init__(dest, \ 864 "NUM_INTREGS", imm, flags, dataSize) 865 | 867 class Ruflag(RegOp): 868 code = ''' 869 int flag = bits(ccFlagBits, imm8); 870 DestReg = merge(DestReg, flag, dataSize); 871 ccFlagBits = (flag == 0) ? (ccFlagBits | EZFBit) : 872 (ccFlagBits & ~EZFBit); 873 ''' 874 def __init__(self, dest, imm, flags=None, \ 875 dataSize="env.dataSize"): 876 super(Ruflag, self).__init__(dest, \ 877 "NUM_INTREGS", imm, flags, dataSize) 878 |
879 class Rflag(RegOp): 880 code = ''' 881 MiscReg flagMask = 0x3F7FDD5; 882 MiscReg flags = (nccFlagBits | ccFlagBits) & flagMask; 883 int flag = bits(flags, imm8); 884 DestReg = merge(DestReg, flag, dataSize); 885 ccFlagBits = (flag == 0) ? (ccFlagBits | EZFBit) : 886 (ccFlagBits & ~EZFBit); 887 ''' 888 def __init__(self, dest, imm, flags=None, \ 889 dataSize="env.dataSize"): 890 super(Rflag, self).__init__(dest, \ 891 "NUM_INTREGS", imm, flags, dataSize) 892 |
|
866 class Sext(RegOp): 867 code = ''' 868 IntReg val = psrc1; 869 // Mask the bit position so that it wraps. 870 int bitPos = op2 & (dataSize * 8 - 1); 871 int sign_bit = bits(val, bitPos, bitPos); 872 uint64_t maskVal = mask(bitPos+1); 873 val = sign_bit ? (val | ~maskVal) : (val & maskVal); --- 189 unchanged lines hidden --- | 893 class Sext(RegOp): 894 code = ''' 895 IntReg val = psrc1; 896 // Mask the bit position so that it wraps. 897 int bitPos = op2 & (dataSize * 8 - 1); 898 int sign_bit = bits(val, bitPos, bitPos); 899 uint64_t maskVal = mask(bitPos+1); 900 val = sign_bit ? (val | ~maskVal) : (val & maskVal); --- 189 unchanged lines hidden --- |