Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279793
b: refs/heads/master
c: e7f626d
h: refs/heads/master
i:
  279791: 3c1c975
v: v3
  • Loading branch information
Leif Lindholm authored and Russell King committed Dec 13, 2011
1 parent 3fa6350 commit 20f9f29
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c9030deaf59d444f9e757ee73d6d81bfe2d3376
refs/heads/master: e7f626db83689f55089717a6d771c57afe1adc1a
8 changes: 5 additions & 3 deletions trunk/arch/arm/nwfpe/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <asm/opcodes.h>

/* This is the kernel's entry point into the floating point emulator.
It is called from the kernel with code similar to this:

Expand Down Expand Up @@ -81,11 +83,11 @@ nwfpe_enter:
mov r6, r0 @ save the opcode
emulate:
ldr r1, [sp, #S_PSR] @ fetch the PSR
bl checkCondition @ check the condition
cmp r0, #0 @ r0 = 0 ==> condition failed
bl arm_check_condition @ check the condition
cmp r0, #ARM_OPCODE_CONDTEST_PASS @ condition passed?

@ if condition code failed to match, next insn
beq next @ get the next instruction;
bne next @ get the next instruction;

mov r0, r6 @ prepare for EmulateAll()
bl EmulateAll @ emulate the instruction
Expand Down
26 changes: 0 additions & 26 deletions trunk/arch/arm/nwfpe/fpopcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,3 @@ const float32 float32Constant[] = {
0x41200000 /* single 10.0 */
};

/* condition code lookup table
index into the table is test code: EQ, NE, ... LT, GT, AL, NV
bit position in short is condition code: NZCV */
static const unsigned short aCC[16] = {
0xF0F0, // EQ == Z set
0x0F0F, // NE
0xCCCC, // CS == C set
0x3333, // CC
0xFF00, // MI == N set
0x00FF, // PL
0xAAAA, // VS == V set
0x5555, // VC
0x0C0C, // HI == C set && Z clear
0xF3F3, // LS == C clear || Z set
0xAA55, // GE == (N==V)
0x55AA, // LT == (N!=V)
0x0A05, // GT == (!Z && (N==V))
0xF5FA, // LE == (Z || (N!=V))
0xFFFF, // AL always
0 // NV
};

unsigned int checkCondition(const unsigned int opcode, const unsigned int ccodes)
{
return (aCC[opcode >> 28] >> (ccodes >> 28)) & 1;
}
3 changes: 0 additions & 3 deletions trunk/arch/arm/nwfpe/fpopcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,6 @@ static inline unsigned int getDestinationSize(const unsigned int opcode)
return (nRc);
}

extern unsigned int checkCondition(const unsigned int opcode,
const unsigned int ccodes);

extern const float64 float64Constant[];
extern const float32 float32Constant[];

Expand Down

0 comments on commit 20f9f29

Please sign in to comment.