ARM: Add a bit to the ExtMachInst to select thumb mode.
This commit is contained in:
parent
4ddeceba96
commit
a59d219989
2 changed files with 17 additions and 0 deletions
|
@ -73,6 +73,7 @@ namespace ArmISA
|
||||||
void moreBytes(Addr pc, Addr fetchPC, MachInst inst)
|
void moreBytes(Addr pc, Addr fetchPC, MachInst inst)
|
||||||
{
|
{
|
||||||
emi = inst;
|
emi = inst;
|
||||||
|
emi.thumb = (pc & (ULL(1) << PcTBitShift));
|
||||||
emi.sevenAndFour = bits(inst, 7) && bits(inst, 4);
|
emi.sevenAndFour = bits(inst, 7) && bits(inst, 4);
|
||||||
emi.isMisc = (bits(inst, 24, 23) == 0x2 && bits(inst, 20) == 0);
|
emi.isMisc = (bits(inst, 24, 23) == 0x2 && bits(inst, 20) == 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2010 ARM Limited
|
||||||
|
* All rights reserved
|
||||||
|
*
|
||||||
|
* The license below extends only to copyright in the software and shall
|
||||||
|
* not be construed as granting a license to any other intellectual
|
||||||
|
* property including but not limited to intellectual property relating
|
||||||
|
* to a hardware implementation of the functionality of the software
|
||||||
|
* licensed hereunder. You may use the software subject to the license
|
||||||
|
* terms below provided that you ensure that this notice is replicated
|
||||||
|
* unmodified and in its entirety in all distributions of the software,
|
||||||
|
* modified or unmodified, in source code or in binary form.
|
||||||
|
*
|
||||||
* Copyright (c) 2007-2008 The Florida State University
|
* Copyright (c) 2007-2008 The Florida State University
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
|
@ -39,6 +51,10 @@ namespace ArmISA
|
||||||
typedef uint32_t MachInst;
|
typedef uint32_t MachInst;
|
||||||
|
|
||||||
BitUnion64(ExtMachInst)
|
BitUnion64(ExtMachInst)
|
||||||
|
// Bitfields to select mode.
|
||||||
|
Bitfield<36> thumb;
|
||||||
|
Bitfield<35> bigThumb;
|
||||||
|
|
||||||
// Made up bitfields that make life easier.
|
// Made up bitfields that make life easier.
|
||||||
Bitfield<33> sevenAndFour;
|
Bitfield<33> sevenAndFour;
|
||||||
Bitfield<32> isMisc;
|
Bitfield<32> isMisc;
|
||||||
|
|
Loading…
Reference in a new issue