|
From: <sv...@va...> - 2012-11-24 21:07:22
|
florian 2012-11-24 21:07:14 +0000 (Sat, 24 Nov 2012)
New Revision: 2566
Log:
Make some function parameters pointer to const.
Companion patch to valgrind r13138.
Modified files:
trunk/priv/guest_amd64_helpers.c
trunk/priv/guest_arm_helpers.c
trunk/priv/guest_ppc_helpers.c
trunk/priv/guest_x86_helpers.c
trunk/pub/libvex_guest_amd64.h
trunk/pub/libvex_guest_arm.h
trunk/pub/libvex_guest_ppc32.h
trunk/pub/libvex_guest_ppc64.h
trunk/pub/libvex_guest_x86.h
Modified: trunk/pub/libvex_guest_arm.h (+1 -1)
===================================================================
--- trunk/pub/libvex_guest_arm.h 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/pub/libvex_guest_arm.h 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -217,7 +217,7 @@
/* Calculate the ARM flag state from the saved data. */
extern
-UInt LibVEX_GuestARM_get_cpsr ( /*IN*/VexGuestARMState* vex_state );
+UInt LibVEX_GuestARM_get_cpsr ( /*IN*/const VexGuestARMState* vex_state );
#endif /* ndef __LIBVEX_PUB_GUEST_ARM_H */
Modified: trunk/priv/guest_x86_helpers.c (+1 -1)
===================================================================
--- trunk/priv/guest_x86_helpers.c 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/priv/guest_x86_helpers.c 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -713,7 +713,7 @@
/* VISIBLE TO LIBVEX CLIENT */
-UInt LibVEX_GuestX86_get_eflags ( /*IN*/VexGuestX86State* vex_state )
+UInt LibVEX_GuestX86_get_eflags ( /*IN*/const VexGuestX86State* vex_state )
{
UInt eflags = x86g_calculate_eflags_all_WRK(
vex_state->guest_CC_OP,
Modified: trunk/pub/libvex_guest_x86.h (+1 -1)
===================================================================
--- trunk/pub/libvex_guest_x86.h 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/pub/libvex_guest_x86.h 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -277,7 +277,7 @@
/* Extract from the supplied VexGuestX86State structure the
corresponding native %eflags value. */
extern
-UInt LibVEX_GuestX86_get_eflags ( /*IN*/VexGuestX86State* vex_state );
+UInt LibVEX_GuestX86_get_eflags ( /*IN*/const VexGuestX86State* vex_state );
/* Set the carry flag in the given state to 'new_carry_flag', which
should be zero or one. */
Modified: trunk/pub/libvex_guest_amd64.h (+2 -2)
===================================================================
--- trunk/pub/libvex_guest_amd64.h 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/pub/libvex_guest_amd64.h 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -186,7 +186,7 @@
/* Extract from the supplied VexGuestAMD64State structure the
corresponding native %rflags value. */
extern
-ULong LibVEX_GuestAMD64_get_rflags ( /*IN*/VexGuestAMD64State* vex_state );
+ULong LibVEX_GuestAMD64_get_rflags ( /*IN*/const VexGuestAMD64State* vex_state );
/* Set the carry flag in the given state to 'new_carry_flag', which
should be zero or one. */
@@ -208,7 +208,7 @@
/* Extract from the supplied VexGuestX86State structure, an x87 FPU
image. */
extern
-void LibVEX_GuestX86_get_x87 ( /*IN*/VexGuestX86State* vex_state,
+void LibVEX_GuestX86_get_x87 ( /*IN*/const VexGuestX86State* vex_state,
/*OUT*/UChar* x87_state );
Modified: trunk/pub/libvex_guest_ppc64.h (+2 -2)
===================================================================
--- trunk/pub/libvex_guest_ppc64.h 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/pub/libvex_guest_ppc64.h 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -309,7 +309,7 @@
corresponding native %CR value. Note, %CR is 32-bits even for
ppc64. */
extern
-UInt LibVEX_GuestPPC64_get_CR ( /*IN*/VexGuestPPC64State* vex_state );
+UInt LibVEX_GuestPPC64_get_CR ( /*IN*/const VexGuestPPC64State* vex_state );
/* Write the given native %XER value to the supplied
@@ -323,7 +323,7 @@
corresponding native %XER value. Note, %CR is 32-bits even for
ppc64. */
extern
-UInt LibVEX_GuestPPC64_get_XER ( /*IN*/VexGuestPPC64State* vex_state );
+UInt LibVEX_GuestPPC64_get_XER ( /*IN*/const VexGuestPPC64State* vex_state );
#endif /* ndef __LIBVEX_PUB_GUEST_PPC64_H */
Modified: trunk/priv/guest_ppc_helpers.c (+4 -4)
===================================================================
--- trunk/priv/guest_ppc_helpers.c 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/priv/guest_ppc_helpers.c 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -210,7 +210,7 @@
/*----------------------------------------------*/
/* VISIBLE TO LIBVEX CLIENT */
-UInt LibVEX_GuestPPC32_get_CR ( /*IN*/VexGuestPPC32State* vex_state )
+UInt LibVEX_GuestPPC32_get_CR ( /*IN*/const VexGuestPPC32State* vex_state )
{
# define FIELD(_n) \
( ( (UInt) \
@@ -231,7 +231,7 @@
/* VISIBLE TO LIBVEX CLIENT */
/* Note: %CR is 32 bits even for ppc64 */
-UInt LibVEX_GuestPPC64_get_CR ( /*IN*/VexGuestPPC64State* vex_state )
+UInt LibVEX_GuestPPC64_get_CR ( /*IN*/const VexGuestPPC64State* vex_state )
{
# define FIELD(_n) \
( ( (UInt) \
@@ -304,7 +304,7 @@
/* VISIBLE TO LIBVEX CLIENT */
-UInt LibVEX_GuestPPC32_get_XER ( /*IN*/VexGuestPPC32State* vex_state )
+UInt LibVEX_GuestPPC32_get_XER ( /*IN*/const VexGuestPPC32State* vex_state )
{
UInt w = 0;
w |= ( ((UInt)vex_state->guest_XER_BC) & 0xFF );
@@ -317,7 +317,7 @@
/* VISIBLE TO LIBVEX CLIENT */
/* Note: %XER is 32 bits even for ppc64 */
-UInt LibVEX_GuestPPC64_get_XER ( /*IN*/VexGuestPPC64State* vex_state )
+UInt LibVEX_GuestPPC64_get_XER ( /*IN*/const VexGuestPPC64State* vex_state )
{
UInt w = 0;
w |= ( ((UInt)vex_state->guest_XER_BC) & 0xFF );
Modified: trunk/priv/guest_arm_helpers.c (+1 -1)
===================================================================
--- trunk/priv/guest_arm_helpers.c 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/priv/guest_arm_helpers.c 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -910,7 +910,7 @@
#endif
/* VISIBLE TO LIBVEX CLIENT */
-UInt LibVEX_GuestARM_get_cpsr ( /*IN*/VexGuestARMState* vex_state )
+UInt LibVEX_GuestARM_get_cpsr ( /*IN*/const VexGuestARMState* vex_state )
{
UInt cpsr = 0;
// NZCV
Modified: trunk/priv/guest_amd64_helpers.c (+1 -1)
===================================================================
--- trunk/priv/guest_amd64_helpers.c 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/priv/guest_amd64_helpers.c 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -811,7 +811,7 @@
/* VISIBLE TO LIBVEX CLIENT */
-ULong LibVEX_GuestAMD64_get_rflags ( /*IN*/VexGuestAMD64State* vex_state )
+ULong LibVEX_GuestAMD64_get_rflags ( /*IN*/const VexGuestAMD64State* vex_state )
{
ULong rflags = amd64g_calculate_rflags_all_WRK(
vex_state->guest_CC_OP,
Modified: trunk/pub/libvex_guest_ppc32.h (+2 -2)
===================================================================
--- trunk/pub/libvex_guest_ppc32.h 2012-11-23 00:44:37 +00:00 (rev 2565)
+++ trunk/pub/libvex_guest_ppc32.h 2012-11-24 21:07:14 +00:00 (rev 2566)
@@ -265,7 +265,7 @@
/* Extract from the supplied VexGuestPPC32State structure the
corresponding native %CR value. */
extern
-UInt LibVEX_GuestPPC32_get_CR ( /*IN*/VexGuestPPC32State* vex_state );
+UInt LibVEX_GuestPPC32_get_CR ( /*IN*/const VexGuestPPC32State* vex_state );
/* Write the given native %XER value to the supplied VexGuestPPC32State
@@ -277,7 +277,7 @@
/* Extract from the supplied VexGuestPPC32State structure the
corresponding native %XER value. */
extern
-UInt LibVEX_GuestPPC32_get_XER ( /*IN*/VexGuestPPC32State* vex_state );
+UInt LibVEX_GuestPPC32_get_XER ( /*IN*/const VexGuestPPC32State* vex_state );
#endif /* ndef __LIBVEX_PUB_GUEST_PPC32_H */
|