qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RCF PATCH 5/8] arm/nwfps: remove use of cpsr_write() and s


From: Alex Bennée
Subject: [Qemu-devel] [RCF PATCH 5/8] arm/nwfps: remove use of cpsr_write() and set flags directly
Date: Mon, 2 Jun 2014 17:21:59 +0100

This is a pre-cursor to removing the cpsr_write function.

diff --git a/linux-user/arm/nwfpe/fpa11.h b/linux-user/arm/nwfpe/fpa11.h
index bb9ac65..0dbdf75 100644
--- a/linux-user/arm/nwfpe/fpa11.h
+++ b/linux-user/arm/nwfpe/fpa11.h
@@ -108,7 +108,10 @@ static inline void writeRegister(unsigned int x, unsigned 
int y)
 
 static inline void writeConditionCodes(unsigned int x)
 {
-        cpsr_write(user_registers,x,CPSR_NZCV);
+        user_registers->ZF = (~val) & CPSR_Z;
+        user_registers->NF = val;
+        user_registers->CF = (val >> 29) & 1;
+        user_registers->VF = (val << 3) & 0x80000000;
 }
 
 #define ARM_REG_PC 15
-- 
2.0.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]