1// Copyright (c) 2006-2007 The Regents of The University of Michigan 2// All rights reserved. 3// 4// Redistribution and use in source and binary forms, with or without 5// modification, are permitted provided that the following conditions are 6// met: redistributions of source code must retain the above copyright 7// notice, this list of conditions and the following disclaimer; 8// redistributions in binary form must reproduce the above copyright --- 48 unchanged lines hidden (view full) --- 57 } 58 //Branch Never 59 0x0: decode A 60 { 61 0x0: bpn(19, {{ 62 NNPC = NNPC;//Don't do anything 63 }}); 64 0x1: bpn(19, {{ |
65 NNPC = NPC + 8; 66 NPC = NPC + 4; |
67 }}, ',a'); 68 } 69 default: decode BPCC 70 { 71 0x0: bpcci(19, {{ 72 if(passesCondition(Ccr<3:0>, COND2)) 73 NNPC = xc->readPC() + disp; 74 else 75 handle_annul 76 }}); 77 0x2: bpccx(19, {{ 78 if(passesCondition(Ccr<7:4>, COND2)) |
79 NNPC = xc->readPC() + disp; |
80 else |
81 handle_annul |
82 }}); 83 } 84 } 85 //bicc 86 0x2: decode COND2 87 { 88 //Branch Always 89 0x8: decode A --- 8 unchanged lines hidden (view full) --- 98 } 99 //Branch Never 100 0x0: decode A 101 { 102 0x0: bn(22, {{ 103 NNPC = NNPC;//Don't do anything 104 }}); 105 0x1: bn(22, {{ |
106 NNPC = NPC + 8; 107 NPC = NPC + 4; |
108 }}, ',a'); 109 } 110 default: bicc(22, {{ 111 if(passesCondition(Ccr<3:0>, COND2)) 112 NNPC = xc->readPC() + disp; 113 else 114 handle_annul 115 }}); --- 38 unchanged lines hidden (view full) --- 154 NNPC = xc->readPC() + disp; 155 else 156 handle_annul 157 }}); 158 } 159 } 160 //SETHI (or NOP if rd == 0 and imm == 0) 161 0x4: SetHi::sethi({{Rd.udw = imm;}}); |
162 //fbpfcc 163 0x5: decode COND2 { 164 format BranchN { 165 //Branch Always 166 0x8: decode A 167 { 168 0x0: fbpa(22, {{ 169 NNPC = xc->readPC() + disp; 170 }}); 171 0x1: fbpa(22, {{ 172 NPC = xc->readPC() + disp; 173 NNPC = NPC + 4; 174 }}, ',a'); 175 } 176 //Branch Never 177 0x0: decode A 178 { 179 0x0: fbpn(22, {{ 180 NNPC = NNPC;//Don't do anything 181 }}); 182 0x1: fbpn(22, {{ 183 NNPC = NPC + 8; 184 NPC = NPC + 4; 185 }}, ',a'); 186 } 187 default: decode BPCC { 188 0x0: fbpcc0(22, {{ 189 if(passesFpCondition(Fsr<11:10>, COND2)) 190 NNPC = xc->readPC() + disp; 191 else 192 handle_annul 193 }}); 194 0x1: fbpcc1(22, {{ 195 if(passesFpCondition(Fsr<33:32>, COND2)) 196 NNPC = xc->readPC() + disp; 197 else 198 handle_annul 199 }}); 200 0x2: fbpcc2(22, {{ 201 if(passesFpCondition(Fsr<35:34>, COND2)) 202 NNPC = xc->readPC() + disp; 203 else 204 handle_annul 205 }}); 206 0x3: fbpcc3(22, {{ 207 if(passesFpCondition(Fsr<37:36>, COND2)) 208 NNPC = xc->readPC() + disp; 209 else 210 handle_annul 211 }}); 212 } 213 } 214 } 215 //fbfcc 216 0x6: decode COND2 { 217 format BranchN { 218 //Branch Always 219 0x8: decode A 220 { 221 0x0: fba(22, {{ 222 NNPC = xc->readPC() + disp; 223 }}); 224 0x1: fba(22, {{ 225 NPC = xc->readPC() + disp; 226 NNPC = NPC + 4; 227 }}, ',a'); 228 } 229 //Branch Never 230 0x0: decode A 231 { 232 0x0: fbn(22, {{ 233 NNPC = NNPC;//Don't do anything 234 }}); 235 0x1: fbn(22, {{ 236 NNPC = NPC + 8; 237 NPC = NPC + 4; 238 }}, ',a'); 239 } 240 default: fbfcc(22, {{ 241 if(passesFpCondition(Fsr<11:10>, COND2)) 242 NNPC = xc->readPC() + disp; 243 else 244 handle_annul 245 }}); 246 } 247 } |
248 } 249 0x1: BranchN::call(30, {{ 250 if (Pstate<3:>) 251 R15 = (xc->readPC())<31:0>; 252 else 253 R15 = xc->readPC(); 254 NNPC = R15 + disp; 255 }}); --- 584 unchanged lines hidden (view full) --- 840 else 841 fcc = 0; 842 uint8_t firstbit = 10; 843 if(FCMPCC) 844 firstbit = FCMPCC * 2 + 30; 845 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc); 846 }}); 847 0x53: FpUnimpl::fcmpq(); |
848 0x54: fcmpes({{ |
849 uint8_t fcc = 0; 850 if(isnan(Frs1s) || isnan(Frs2s)) 851 fault = new FpExceptionIEEE754; 852 if(Frs1s < Frs2s) 853 fcc = 1; 854 else if(Frs1s > Frs2s) 855 fcc = 2; 856 uint8_t firstbit = 10; 857 if(FCMPCC) 858 firstbit = FCMPCC * 2 + 30; 859 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc); 860 }}); |
861 0x55: fcmped({{ |
862 uint8_t fcc = 0; 863 if(isnan(Frs1s) || isnan(Frs2s)) 864 fault = new FpExceptionIEEE754; 865 if(Frs1s < Frs2s) 866 fcc = 1; 867 else if(Frs1s > Frs2s) 868 fcc = 2; 869 uint8_t firstbit = 10; 870 if(FCMPCC) 871 firstbit = FCMPCC * 2 + 30; 872 Fsr = insertBits(Fsr, firstbit +1, firstbit, fcc); 873 }}); |
874 0x56: FpUnimpl::fcmpeq(); |
875 default: FailUnimpl::fpop2(); 876 } 877 } 878 //This used to be just impdep1, but now it's a whole bunch 879 //of instructions 880 0x36: decode OPF{ 881 0x00: FailUnimpl::edge8(); 882 0x01: FailUnimpl::edge8n(); --- 554 unchanged lines hidden --- |