isa.hh (7298:1eb75247bdc6) | isa.hh (7310:239ab4e0c7d4) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 256 unchanged lines hidden (view full) --- 265 flattenIntIndex(int reg) 266 { 267 assert(reg >= 0); 268 if (reg < NUM_ARCH_INTREGS) { 269 return intRegMap[reg]; 270 } else if (reg < NUM_INTREGS) { 271 return reg; 272 } else { | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 256 unchanged lines hidden (view full) --- 265 flattenIntIndex(int reg) 266 { 267 assert(reg >= 0); 268 if (reg < NUM_ARCH_INTREGS) { 269 return intRegMap[reg]; 270 } else if (reg < NUM_INTREGS) { 271 return reg; 272 } else { |
273 reg -= NUM_INTREGS; 274 assert(reg < NUM_ARCH_INTREGS); 275 return reg; | 273 int mode = reg / intRegsPerMode; 274 reg = reg % intRegsPerMode; 275 switch (mode) { 276 case MODE_USER: 277 case MODE_SYSTEM: 278 return INTREG_USR(reg); 279 case MODE_FIQ: 280 return INTREG_FIQ(reg); 281 case MODE_IRQ: 282 return INTREG_IRQ(reg); 283 case MODE_SVC: 284 return INTREG_SVC(reg); 285 case MODE_MON: 286 return INTREG_MON(reg); 287 case MODE_ABORT: 288 return INTREG_ABT(reg); 289 case MODE_UNDEFINED: 290 return INTREG_UND(reg); 291 default: 292 panic("Flattening into an unknown mode.\n"); 293 } |
276 } 277 } 278 279 int 280 flattenFloatIndex(int reg) 281 { 282 return reg; 283 } --- 15 unchanged lines hidden --- | 294 } 295 } 296 297 int 298 flattenFloatIndex(int reg) 299 { 300 return reg; 301 } --- 15 unchanged lines hidden --- |