You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(1) |
2
|
3
(1) |
|
4
(4) |
5
(5) |
6
(6) |
7
(1) |
8
(1) |
9
(3) |
10
(1) |
|
11
(6) |
12
(1) |
13
|
14
|
15
(1) |
16
(5) |
17
|
|
18
|
19
|
20
(3) |
21
(5) |
22
(1) |
23
(5) |
24
|
|
25
|
26
|
27
|
28
|
29
(3) |
30
|
31
|
|
From: <sv...@va...> - 2016-12-23 12:40:39
|
Author: iraisr
Date: Fri Dec 23 12:40:33 2016
New Revision: 16191
Log:
Update NEWS for recent VEX commit r3288.
Fixes BZ#373938.
Modified:
trunk/NEWS
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Dec 23 12:40:33 2016
@@ -92,6 +92,7 @@
373046 Stacks registered by core are never deregistered
373192 Calling posix_spawn in glibc 2.24 completely broken
373555 Rename BBPTR to GSPTR as it denotes guest state pointer only
+373938 const IRExpr arguments for matchIRExpr()
Release 3.12.0 (20 October 2016)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
From: <sv...@va...> - 2016-12-23 12:39:08
|
Author: iraisr
Date: Fri Dec 23 12:38:57 2016
New Revision: 3288
Log:
const IRExpr arguments for matchIRExpr()
Fixes BZ#373938
Gist of the changes is really just:
- Bool matchIRExpr ( MatchInfo* mi, IRExpr* p, IRExpr* e );
+ Bool matchIRExpr ( MatchInfo* mi, const IRExpr* p, const IRExpr* e );
Modified:
trunk/priv/host_amd64_isel.c
trunk/priv/host_arm_isel.c
trunk/priv/host_ppc_isel.c
trunk/priv/host_x86_isel.c
trunk/priv/ir_match.c
trunk/priv/ir_match.h
Modified: trunk/priv/host_amd64_isel.c
==============================================================================
--- trunk/priv/host_amd64_isel.c (original)
+++ trunk/priv/host_amd64_isel.c Fri Dec 23 12:38:57 2016
@@ -216,42 +216,42 @@
checks that all returned registers are virtual. You should not
call the _wrk version directly.
*/
-static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e );
+static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e );
-static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e );
+static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e );
-static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e );
+static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e );
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e );
-static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e );
+static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e );
static void iselInt128Expr_wrk ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselInt128Expr ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
-static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e );
-static AMD64CondCode iselCondCode ( ISelEnv* env, IRExpr* e );
+static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e );
+static AMD64CondCode iselCondCode ( ISelEnv* env, const IRExpr* e );
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e );
static void iselDVecExpr_wrk ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselDVecExpr ( /*OUT*/HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
/*---------------------------------------------------------*/
@@ -896,7 +896,7 @@
mask or sign extend partial values if necessary.
*/
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselIntExpr_R_wrk(env, e);
/* sanity checks ... */
@@ -909,7 +909,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e )
{
/* Used for unary/binary SIMD64 ops. */
HWord fn = 0;
@@ -1379,7 +1379,7 @@
DEFINE_PATTERN( p_1Uto8_64to1,
unop(Iop_1Uto8, unop(Iop_64to1, bind(0))) );
if (matchIRExpr(&mi,p_1Uto8_64to1,e)) {
- IRExpr* expr64 = mi.bindee[0];
+ const IRExpr* expr64 = mi.bindee[0];
HReg dst = newVRegI(env);
HReg src = iselIntExpr_R(env, expr64);
addInstr(env, mk_iMOVsd_RR(src,dst) );
@@ -1934,7 +1934,7 @@
result. The expression may only be a 32-bit one.
*/
-static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e )
+static AMD64AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e )
{
AMD64AMode* am = iselIntExpr_AMode_wrk(env, e);
vassert(sane_AMode(am));
@@ -1942,7 +1942,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
DECLARE_PATTERN(p_complex);
@@ -1961,10 +1961,10 @@
)
);
if (matchIRExpr(&mi, p_complex, e)) {
- IRExpr* expr1 = mi.bindee[0];
- IRExpr* expr2 = mi.bindee[1];
- IRExpr* imm8 = mi.bindee[2];
- IRExpr* simm32 = mi.bindee[3];
+ const IRExpr* expr1 = mi.bindee[0];
+ const IRExpr* expr2 = mi.bindee[1];
+ const IRExpr* imm8 = mi.bindee[2];
+ const IRExpr* simm32 = mi.bindee[3];
if (imm8->tag == Iex_Const
&& imm8->Iex.Const.con->tag == Ico_U8
&& imm8->Iex.Const.con->Ico.U8 < 4
@@ -2023,7 +2023,7 @@
/* Similarly, calculate an expression into an X86RMI operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e )
+static AMD64RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e )
{
AMD64RMI* rmi = iselIntExpr_RMI_wrk(env, e);
/* sanity checks ... */
@@ -2043,7 +2043,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I64 || ty == Ity_I32
@@ -2095,7 +2095,7 @@
iselIntExpr_R, the expression can have type 64, 32, 16 or 8
bits. */
-static AMD64RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e )
+static AMD64RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e )
{
AMD64RI* ri = iselIntExpr_RI_wrk(env, e);
/* sanity checks ... */
@@ -2112,7 +2112,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I64 || ty == Ity_I32
@@ -2151,7 +2151,7 @@
with iselIntExpr_R, the expression can have type 64, 32, 16 or 8
bits. */
-static AMD64RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e )
+static AMD64RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e )
{
AMD64RM* rm = iselIntExpr_RM_wrk(env, e);
/* sanity checks ... */
@@ -2169,7 +2169,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I64 || ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
@@ -2196,14 +2196,14 @@
condition code which would correspond when the expression would
notionally have returned 1. */
-static AMD64CondCode iselCondCode ( ISelEnv* env, IRExpr* e )
+static AMD64CondCode iselCondCode ( ISelEnv* env, const IRExpr* e )
{
/* Uh, there's nothing we can sanity check here, unfortunately. */
return iselCondCode_wrk(env,e);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e )
+static AMD64CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
@@ -2457,7 +2457,7 @@
by subsequent code emitted by the caller. */
static void iselInt128Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
iselInt128Expr_wrk(rHi, rLo, env, e);
# if 0
@@ -2471,7 +2471,7 @@
/* DO NOT CALL THIS DIRECTLY ! */
static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
vassert(e);
vassert(typeOfIRExpr(env->type_env,e) == Ity_I128);
@@ -2550,7 +2550,7 @@
/* Nothing interesting here; really just wrappers for
64-bit stuff. */
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselFltExpr_wrk( env, e );
# if 0
@@ -2562,7 +2562,7 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_F32);
@@ -2737,7 +2737,7 @@
positive zero 0 0 .000000---0
*/
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselDblExpr_wrk( env, e );
# if 0
@@ -2749,7 +2749,7 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(e);
@@ -3104,7 +3104,7 @@
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselVecExpr_wrk( env, e );
# if 0
@@ -3117,7 +3117,7 @@
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
HWord fn = 0; /* address of helper fn, if required */
Bool arg1isEReg = False;
@@ -3719,7 +3719,7 @@
/*---------------------------------------------------------*/
static void iselDVecExpr ( /*OUT*/HReg* rHi, /*OUT*/HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
iselDVecExpr_wrk( rHi, rLo, env, e );
# if 0
@@ -3734,7 +3734,7 @@
/* DO NOT CALL THIS DIRECTLY */
static void iselDVecExpr_wrk ( /*OUT*/HReg* rHi, /*OUT*/HReg* rLo,
- ISelEnv* env, IRExpr* e )
+ ISelEnv* env, const IRExpr* e )
{
HWord fn = 0; /* address of helper fn, if required */
vassert(e);
Modified: trunk/priv/host_arm_isel.c
==============================================================================
--- trunk/priv/host_arm_isel.c (original)
+++ trunk/priv/host_arm_isel.c Fri Dec 23 12:38:57 2016
@@ -233,9 +233,9 @@
static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
@@ -243,11 +243,11 @@
static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
-static HReg iselNeon64Expr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselNeon64Expr ( ISelEnv* env, IRExpr* e );
+static HReg iselNeon64Expr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselNeon64Expr ( ISelEnv* env, const IRExpr* e );
-static HReg iselNeonExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselNeonExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselNeonExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselNeonExpr ( ISelEnv* env, const IRExpr* e );
/*---------------------------------------------------------*/
/*--- ISEL: Misc helpers ---*/
@@ -1655,7 +1655,7 @@
//zz DEFINE_PATTERN(p_32to1_then_1Uto8,
//zz unop(Iop_1Uto8,unop(Iop_32to1,bind(0))));
//zz if (matchIRExpr(&mi,p_32to1_then_1Uto8,e)) {
-//zz IRExpr* expr32 = mi.bindee[0];
+//zz const IRExpr* expr32 = mi.bindee[0];
//zz HReg dst = newVRegI(env);
//zz HReg src = iselIntExpr_R(env, expr32);
//zz addInstr(env, mk_iMOVsd_RR(src,dst) );
@@ -2053,7 +2053,8 @@
either real or virtual regs; in any case they must not be changed
by subsequent code emitted by the caller. */
-static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
iselInt64Expr_wrk(rHi, rLo, env, e);
# if 0
@@ -2066,7 +2067,8 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
vassert(e);
vassert(typeOfIRExpr(env->type_env,e) == Ity_I64);
@@ -2317,7 +2319,7 @@
/*--- ISEL: Vector (NEON) expressions (64 or 128 bit) ---*/
/*---------------------------------------------------------*/
-static HReg iselNeon64Expr ( ISelEnv* env, IRExpr* e )
+static HReg iselNeon64Expr ( ISelEnv* env, const IRExpr* e )
{
HReg r;
vassert(env->hwcaps & VEX_HWCAPS_ARM_NEON);
@@ -2328,7 +2330,7 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselNeon64Expr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselNeon64Expr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env, e);
MatchInfo mi;
@@ -3938,7 +3940,7 @@
}
-static HReg iselNeonExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselNeonExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r;
vassert(env->hwcaps & VEX_HWCAPS_ARM_NEON);
@@ -3949,7 +3951,7 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselNeonExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselNeonExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env, e);
MatchInfo mi;
Modified: trunk/priv/host_ppc_isel.c
==============================================================================
--- trunk/priv/host_ppc_isel.c (original)
+++ trunk/priv/host_ppc_isel.c Fri Dec 23 12:38:57 2016
@@ -379,9 +379,9 @@
*/
/* 32-bit mode: compute an I8/I16/I32 into a GPR.
64-bit mode: compute an I8/I16/I32/I64 into a GPR. */
-static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselWordExpr_R_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselWordExpr_R ( ISelEnv* env, IRExpr* e,
+static HReg iselWordExpr_R ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode: Compute an I8/I16/I32 into a RH
@@ -394,33 +394,33 @@
return can have their sign inverted if need be.
*/
static PPCRH* iselWordExpr_RH_wrk ( ISelEnv* env,
- Bool syned, IRExpr* e,
+ Bool syned, const IRExpr* e,
IREndness IEndianess );
static PPCRH* iselWordExpr_RH ( ISelEnv* env,
- Bool syned, IRExpr* e,
+ Bool syned, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode: compute an I32 into a RI (reg or 32-bit immediate).
64-bit mode: compute an I64 into a RI (reg or 64-bit immediate). */
-static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCRI* iselWordExpr_RI ( ISelEnv* env, IRExpr* e,
+static PPCRI* iselWordExpr_RI ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* In 32 bit mode ONLY, compute an I8 into a
reg-or-5-bit-unsigned-immediate, the latter being an immediate in
the range 1 .. 31 inclusive. Used for doing shift amounts. */
-static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* In 64-bit mode ONLY, compute an I8 into a
reg-or-6-bit-unsigned-immediate, the latter being an immediate in
the range 1 .. 63 inclusive. Used for doing shift amounts. */
-static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode: compute an I32 into an AMode.
@@ -434,77 +434,79 @@
Since there are no such restrictions on 32-bit insns, xferTy is
ignored for 32-bit code generation. */
-static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e,
IRType xferTy,
IREndness IEndianess );
-static PPCAMode* iselWordExpr_AMode ( ISelEnv* env, IRExpr* e,
+static PPCAMode* iselWordExpr_AMode ( ISelEnv* env, const IRExpr* e,
IRType xferTy,
IREndness IEndianess );
static void iselInt128Expr_to_32x4_wrk ( HReg* rHi, HReg* rMedHi,
HReg* rMedLo, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
static void iselInt128Expr_to_32x4 ( HReg* rHi, HReg* rMedHi,
HReg* rMedLo, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 32-bit mode ONLY: compute an I64 into a GPR pair. */
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 64-bit mode ONLY: compute an I128 into a GPR64 pair. */
static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
static void iselInt128Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCCondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static PPCCondCode iselCondCode ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e,
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e,
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e,
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
/* 64-bit mode ONLY. */
-static HReg iselDfp32Expr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp32Expr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDfp32Expr ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp32Expr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDfp64Expr_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp64Expr_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselDfp64Expr ( ISelEnv* env, IRExpr* e,
+static HReg iselDfp64Expr ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess );
-static HReg iselFp128Expr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess);
-static HReg iselFp128Expr ( ISelEnv* env, IRExpr* e, IREndness IEndianess);
+static HReg iselFp128Expr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess);
+static HReg iselFp128Expr ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess);
/* 64-bit mode ONLY: compute an D128 into a GPR64 pair. */
static void iselDfp128Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
- IRExpr* e, IREndness IEndianess );
+ const IRExpr* e, IREndness IEndianess );
static void iselDfp128Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
- IRExpr* e, IREndness IEndianess );
+ const IRExpr* e, IREndness IEndianess );
/*---------------------------------------------------------*/
/*--- ISEL: Misc helpers ---*/
@@ -1396,7 +1398,8 @@
if necessary.
*/
-static HReg iselWordExpr_R ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselWordExpr_R ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
HReg r = iselWordExpr_R_wrk(env, e, IEndianess);
/* sanity checks ... */
@@ -1410,7 +1413,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e,
+static HReg iselWordExpr_R_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
Bool mode64 = env->mode64;
@@ -1871,7 +1874,7 @@
DEFINE_PATTERN(p_32to1_then_1Uto8,
unop(Iop_1Uto8,unop(Iop_32to1,bind(0))));
if (matchIRExpr(&mi,p_32to1_then_1Uto8,e)) {
- IRExpr* expr32 = mi.bindee[0];
+ const IRExpr* expr32 = mi.bindee[0];
HReg r_dst = newVRegI(env);
HReg r_src = iselWordExpr_R(env, expr32, IEndianess);
addInstr(env, PPCInstr_Alu(Palu_AND, r_dst,
@@ -2604,7 +2607,7 @@
}
static
-PPCAMode* iselWordExpr_AMode ( ISelEnv* env, IRExpr* e, IRType xferTy,
+PPCAMode* iselWordExpr_AMode ( ISelEnv* env, const IRExpr* e, IRType xferTy,
IREndness IEndianess )
{
PPCAMode* am = iselWordExpr_AMode_wrk(env, e, xferTy, IEndianess);
@@ -2613,7 +2616,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCAMode* iselWordExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e,
IRType xferTy, IREndness IEndianess )
{
IRType ty = typeOfIRExpr(env->type_env,e);
@@ -2695,7 +2698,7 @@
signed immediates that are return can have their sign inverted if
need be. */
-static PPCRH* iselWordExpr_RH ( ISelEnv* env, Bool syned, IRExpr* e,
+static PPCRH* iselWordExpr_RH ( ISelEnv* env, Bool syned, const IRExpr* e,
IREndness IEndianess )
{
PPCRH* ri = iselWordExpr_RH_wrk(env, syned, e, IEndianess);
@@ -2716,7 +2719,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRH* iselWordExpr_RH_wrk ( ISelEnv* env, Bool syned, IRExpr* e,
+static PPCRH* iselWordExpr_RH_wrk ( ISelEnv* env, Bool syned, const IRExpr* e,
IREndness IEndianess )
{
ULong u;
@@ -2760,7 +2763,8 @@
iselIntExpr_R, the expression can have type 32, 16 or 8 bits, or,
in 64-bit mode, 64 bits. */
-static PPCRI* iselWordExpr_RI ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static PPCRI* iselWordExpr_RI ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
PPCRI* ri = iselWordExpr_RI_wrk(env, e, IEndianess);
/* sanity checks ... */
@@ -2777,7 +2781,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRI* iselWordExpr_RI_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
Long l;
@@ -2810,7 +2814,7 @@
being an immediate in the range 1 .. 31 inclusive. Used for doing
shift amounts. Only used in 32-bit mode. */
-static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
PPCRH* ri;
@@ -2832,7 +2836,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH5u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
IRType ty = typeOfIRExpr(env->type_env,e);
@@ -2857,7 +2861,7 @@
being an immediate in the range 1 .. 63 inclusive. Used for doing
shift amounts. Only used in 64-bit mode. */
-static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
PPCRH* ri;
@@ -2879,7 +2883,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, IRExpr* e,
+static PPCRH* iselWordExpr_RH6u_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
IRType ty = typeOfIRExpr(env->type_env,e);
@@ -2904,7 +2908,7 @@
condition code which would correspond when the expression would
notionally have returned 1. */
-static PPCCondCode iselCondCode ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
/* Uh, there's nothing we can sanity check here, unfortunately. */
@@ -2912,7 +2916,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static PPCCondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e,
+static PPCCondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(e);
@@ -3100,8 +3104,8 @@
case they must not be changed by subsequent code emitted by the
caller. */
-static void iselInt128Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static void iselInt128Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e, IREndness IEndianess )
{
vassert(env->mode64);
iselInt128Expr_wrk(rHi, rLo, env, e, IEndianess);
@@ -3115,8 +3119,8 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e, IREndness IEndianess )
{
Bool mode64 = env->mode64;
@@ -3197,7 +3201,7 @@
/* 32-bit mode ONLY: compute a 128-bit value into a register quad */
static void iselInt128Expr_to_32x4 ( HReg* rHi, HReg* rMedHi, HReg* rMedLo,
- HReg* rLo, ISelEnv* env, IRExpr* e,
+ HReg* rLo, ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(!env->mode64);
@@ -3217,7 +3221,7 @@
static void iselInt128Expr_to_32x4_wrk ( HReg* rHi, HReg* rMedHi,
HReg* rMedLo, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(e);
@@ -3255,7 +3259,7 @@
caller. */
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(!env->mode64);
@@ -3271,7 +3275,7 @@
/* DO NOT CALL THIS DIRECTLY ! */
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e,
+ ISelEnv* env, const IRExpr* e,
IREndness IEndianess )
{
vassert(e);
@@ -3893,7 +3897,7 @@
/* Nothing interesting here; really just wrappers for
64-bit stuff. */
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselFltExpr_wrk( env, e, IEndianess );
# if 0
@@ -3905,7 +3909,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
Bool mode64 = env->mode64;
@@ -4065,7 +4070,7 @@
positive zero 0 0 .000000---0
*/
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselDblExpr_wrk( env, e, IEndianess );
# if 0
@@ -4077,7 +4082,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
Bool mode64 = env->mode64;
IRType ty = typeOfIRExpr(env->type_env,e);
@@ -4431,7 +4437,7 @@
vpanic("iselDblExpr_wrk(ppc)");
}
-static HReg iselDfp32Expr(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp32Expr(ISelEnv* env, const IRExpr* e, IREndness IEndianess)
{
HReg r = iselDfp32Expr_wrk( env, e, IEndianess );
vassert(hregClass(r) == HRcFlt64);
@@ -4440,7 +4446,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDfp32Expr_wrk(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp32Expr_wrk(ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess)
{
Bool mode64 = env->mode64;
IRType ty = typeOfIRExpr( env->type_env, e );
@@ -4483,7 +4490,7 @@
vpanic( "iselDfp32Expr_wrk(ppc)" );
}
-static HReg iselFp128Expr( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselFp128Expr( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselFp128Expr_wrk( env, e, IEndianess );
vassert(hregClass(r) == HRcVec128);
@@ -4492,7 +4499,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFp128Expr_wrk( ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselFp128Expr_wrk( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess)
{
Bool mode64 = env->mode64;
PPCFpOp fpop = Pfp_INVALID;
@@ -4799,7 +4807,7 @@
vpanic( "iselFp128Expr(ppc64)" );
}
-static HReg iselDfp64Expr(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp64Expr(ISelEnv* env, const IRExpr* e, IREndness IEndianess)
{
HReg r = iselDfp64Expr_wrk( env, e, IEndianess );
vassert(hregClass(r) == HRcFlt64);
@@ -4808,7 +4816,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDfp64Expr_wrk(ISelEnv* env, IRExpr* e, IREndness IEndianess)
+static HReg iselDfp64Expr_wrk(ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess)
{
Bool mode64 = env->mode64;
IRType ty = typeOfIRExpr( env->type_env, e );
@@ -5082,7 +5091,7 @@
vpanic( "iselDfp64Expr_wrk(ppc)" );
}
-static void iselDfp128Expr(HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e,
+static void iselDfp128Expr(HReg* rHi, HReg* rLo, ISelEnv* env, const IRExpr* e,
IREndness IEndianess)
{
iselDfp128Expr_wrk( rHi, rLo, env, e, IEndianess );
@@ -5091,8 +5100,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static void iselDfp128Expr_wrk(HReg* rHi, HReg *rLo, ISelEnv* env, IRExpr* e,
- IREndness IEndianess)
+static void iselDfp128Expr_wrk(HReg* rHi, HReg *rLo, ISelEnv* env,
+ const IRExpr* e, IREndness IEndianess)
{
vassert( e );
vassert( typeOfIRExpr(env->type_env,e) == Ity_D128 );
@@ -5359,7 +5368,7 @@
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e, IREndness IEndianess )
{
HReg r = iselVecExpr_wrk( env, e, IEndianess );
# if 0
@@ -5371,7 +5380,8 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e, IREndness IEndianess )
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e,
+ IREndness IEndianess )
{
Bool mode64 = env->mode64;
PPCAvOp op = Pav_INVALID;
Modified: trunk/priv/host_x86_isel.c
==============================================================================
--- trunk/priv/host_x86_isel.c (original)
+++ trunk/priv/host_x86_isel.c Fri Dec 23 12:38:57 2016
@@ -247,37 +247,37 @@
checks that all returned registers are virtual. You should not
call the _wrk version directly.
*/
-static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e );
-static X86RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e );
+static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e );
+static X86RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e );
-static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e );
-static X86RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e );
+static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e );
+static X86RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e );
-static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e );
-static X86RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e );
+static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e );
+static X86RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e );
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e );
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e );
-static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e );
-static X86AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e );
+static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e );
+static X86AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e );
static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
static void iselInt64Expr ( HReg* rHi, HReg* rLo,
- ISelEnv* env, IRExpr* e );
+ ISelEnv* env, const IRExpr* e );
-static X86CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e );
-static X86CondCode iselCondCode ( ISelEnv* env, IRExpr* e );
+static X86CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e );
+static X86CondCode iselCondCode ( ISelEnv* env, const IRExpr* e );
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e );
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e );
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e );
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e );
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e );
/*---------------------------------------------------------*/
@@ -835,7 +835,7 @@
or sign extend partial values if necessary.
*/
-static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselIntExpr_R_wrk(env, e);
/* sanity checks ... */
@@ -848,7 +848,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselIntExpr_R_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
@@ -1161,7 +1161,7 @@
DEFINE_PATTERN(p_32to1_then_1Uto8,
unop(Iop_1Uto8,unop(Iop_32to1,bind(0))));
if (matchIRExpr(&mi,p_32to1_then_1Uto8,e)) {
- IRExpr* expr32 = mi.bindee[0];
+ const IRExpr* expr32 = mi.bindee[0];
HReg dst = newVRegI(env);
HReg src = iselIntExpr_R(env, expr32);
addInstr(env, mk_iMOVsd_RR(src,dst) );
@@ -1546,7 +1546,7 @@
}
}
-static X86AMode* iselIntExpr_AMode ( ISelEnv* env, IRExpr* e )
+static X86AMode* iselIntExpr_AMode ( ISelEnv* env, const IRExpr* e )
{
X86AMode* am = iselIntExpr_AMode_wrk(env, e);
vassert(sane_AMode(am));
@@ -1554,7 +1554,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, IRExpr* e )
+static X86AMode* iselIntExpr_AMode_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32);
@@ -1621,7 +1621,7 @@
/* Similarly, calculate an expression into an X86RMI operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static X86RMI* iselIntExpr_RMI ( ISelEnv* env, IRExpr* e )
+static X86RMI* iselIntExpr_RMI ( ISelEnv* env, const IRExpr* e )
{
X86RMI* rmi = iselIntExpr_RMI_wrk(env, e);
/* sanity checks ... */
@@ -1641,7 +1641,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, IRExpr* e )
+static X86RMI* iselIntExpr_RMI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
@@ -1684,7 +1684,7 @@
/* Calculate an expression into an X86RI operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static X86RI* iselIntExpr_RI ( ISelEnv* env, IRExpr* e )
+static X86RI* iselIntExpr_RI ( ISelEnv* env, const IRExpr* e )
{
X86RI* ri = iselIntExpr_RI_wrk(env, e);
/* sanity checks ... */
@@ -1701,7 +1701,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, IRExpr* e )
+static X86RI* iselIntExpr_RI_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
@@ -1731,7 +1731,7 @@
/* Similarly, calculate an expression into an X86RM operand. As with
iselIntExpr_R, the expression can have type 32, 16 or 8 bits. */
-static X86RM* iselIntExpr_RM ( ISelEnv* env, IRExpr* e )
+static X86RM* iselIntExpr_RM ( ISelEnv* env, const IRExpr* e )
{
X86RM* rm = iselIntExpr_RM_wrk(env, e);
/* sanity checks ... */
@@ -1749,7 +1749,7 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, IRExpr* e )
+static X86RM* iselIntExpr_RM_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8);
@@ -1776,14 +1776,14 @@
condition code which would correspond when the expression would
notionally have returned 1. */
-static X86CondCode iselCondCode ( ISelEnv* env, IRExpr* e )
+static X86CondCode iselCondCode ( ISelEnv* env, const IRExpr* e )
{
/* Uh, there's nothing we can sanity check here, unfortunately. */
return iselCondCode_wrk(env,e);
}
/* DO NOT CALL THIS DIRECTLY ! */
-static X86CondCode iselCondCode_wrk ( ISelEnv* env, IRExpr* e )
+static X86CondCode iselCondCode_wrk ( ISelEnv* env, const IRExpr* e )
{
MatchInfo mi;
@@ -2069,7 +2069,8 @@
either real or virtual regs; in any case they must not be changed
by subsequent code emitted by the caller. */
-static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
iselInt64Expr_wrk(rHi, rLo, env, e);
# if 0
@@ -2082,7 +2083,8 @@
}
/* DO NOT CALL THIS DIRECTLY ! */
-static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
+static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env,
+ const IRExpr* e )
{
MatchInfo mi;
HWord fn = 0; /* helper fn for most SIMD64 stuff */
@@ -2871,7 +2873,7 @@
/* Nothing interesting here; really just wrappers for
64-bit stuff. */
-static HReg iselFltExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselFltExpr_wrk( env, e );
# if 0
@@ -2883,7 +2885,7 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselFltExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselFltExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(ty == Ity_F32);
@@ -2988,7 +2990,7 @@
positive zero 0 0 .000000---0
*/
-static HReg iselDblExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselDblExpr_wrk( env, e );
# if 0
@@ -3000,7 +3002,7 @@
}
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselDblExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
IRType ty = typeOfIRExpr(env->type_env,e);
vassert(e);
@@ -3239,7 +3241,7 @@
/*--- ISEL: SIMD (Vector) expressions, 128 bit. ---*/
/*---------------------------------------------------------*/
-static HReg iselVecExpr ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr ( ISelEnv* env, const IRExpr* e )
{
HReg r = iselVecExpr_wrk( env, e );
# if 0
@@ -3252,7 +3254,7 @@
/* DO NOT CALL THIS DIRECTLY */
-static HReg iselVecExpr_wrk ( ISelEnv* env, IRExpr* e )
+static HReg iselVecExpr_wrk ( ISelEnv* env, const IRExpr* e )
{
# define REQUIRE_SSE1 \
Modified: trunk/priv/ir_match.c
==============================================================================
--- trunk/priv/ir_match.c (original)
+++ trunk/priv/ir_match.c Fri Dec 23 12:38:57 2016
@@ -42,7 +42,7 @@
/* Assign a value to a binder. Checks for obvious stupidities. */
static
-void setBindee ( MatchInfo* mi, Int n, IRExpr* bindee )
+void setBindee ( MatchInfo* mi, Int n, const IRExpr* bindee )
{
if (n < 0 || n >= N_IRMATCH_BINDERS)
vpanic("setBindee: out of range index");
@@ -57,7 +57,8 @@
found into 'mi'. */
static
-Bool matchWrk ( MatchInfo* mi, IRExpr* p/*attern*/, IRExpr* e/*xpr*/ )
+Bool matchWrk ( MatchInfo* mi, const IRExpr* p/*attern*/,
+ const IRExpr* e/*xpr*/ )
{
switch (p->tag) {
case Iex_Binder: /* aha, what we were looking for. */
@@ -96,7 +97,8 @@
/* Top level entry point to the matcher. */
-Bool matchIRExpr ( MatchInfo* mi, IRExpr* p/*attern*/, IRExpr* e/*xpr*/ )
+Bool matchIRExpr ( MatchInfo* mi, const IRExpr* p/*attern*/,
+ const IRExpr* e/*xpr*/ )
{
Int i;
for (i = 0; i < N_IRMATCH_BINDERS; i++)
Modified: trunk/priv/ir_match.h
==============================================================================
--- trunk/priv/ir_match.h (original)
+++ trunk/priv/ir_match.h Fri Dec 23 12:38:57 2016
@@ -68,7 +68,7 @@
typedef
struct {
- IRExpr* bindee[N_IRMATCH_BINDERS];
+ const IRExpr* bindee[N_IRMATCH_BINDERS];
}
MatchInfo;
@@ -78,7 +78,8 @@
succeeded. */
extern
-Bool matchIRExpr ( MatchInfo* mi, IRExpr* p/*attern*/, IRExpr* e/*xpr*/ );
+Bool matchIRExpr ( MatchInfo* mi, const IRExpr* p/*attern*/,
+ const IRExpr* e/*xpr*/ );
#endif /* ndef __VEX_IR_MATCH_H */
|
|
From: Paul F. <pa...@fr...> - 2016-12-23 08:11:07
|
On 23 Dec 2016, at 04:04, Ivo Raisr wrote: > > > 2016-12-21 21:29 GMT+01:00 <pa...@fr...>: > > > It also tells the compiler where aggressive optimization is possible. > > > Unfortunately, mainly due to pointers/references and aliasing, this isn't as often as one might hope. > > For instance see > > http://www.gotw.ca/gotw/081.htm > > An interesting reading, indeed. > > Me being not a great C++ coder, would some please mind explaining the meaning of "const" here for this method: > char operator[]( size_t ) const; Hi Ivo If you have a class C with method f() like this class C { public: void f(); }; then in C++ f has an 'implicit this', which means that the actual code generated will be like void C::f(C* this). Since the 'this' pointer is implicit, there's no way to make it const in the formal parameter list, i.e., you can't write void C:f(C const* this). So in order to make the 'this' pointer const, the language allows putting const after the member declaration,, i.e., class C { public: void f() const; }; A+ Paul |
|
From: Ivo R. <iv...@iv...> - 2016-12-23 03:04:45
|
2016-12-21 21:29 GMT+01:00 <pa...@fr...>: > > > It also tells the compiler where aggressive optimization is possible. > > > Unfortunately, mainly due to pointers/references and aliasing, this isn't > as often as one might hope. > > For instance see > > http://www.gotw.ca/gotw/081.htm > An interesting reading, indeed. Me being not a great C++ coder, would some please mind explaining the meaning of "const" here for this method: char operator[]( size_t ) const; I. |
|
From: Ivo R. <iv...@iv...> - 2016-12-23 03:02:01
|
2016-12-21 17:08 GMT+01:00 John Reiser <jr...@bi...>: > On 12/21/2016 12:57 AM, Ivo Raisr wrote: > > > Are there any objections to the changes for this bug: > > https://bugs.kde.org/show_bug.cgi?id=373938 > > > > The gist of my changes is really just: > > - Bool matchIRExpr ( MatchInfo* mi, IRExpr* p, IRExpr* e ); > > + Bool matchIRExpr ( MatchInfo* mi, const IRExpr* p, const IRExpr* e ); > > I applaud the use of 'const' as often as possible. > It increases understanding and reduces debugging and maintenance costs > because it reduces the places where values can change. > It also tells the compiler where aggressive optimization is possible. > > I believe that 'const' should appear as far to the right as possible: > > IRExpr const *p > > This makes declarations easier to read. Declarations are read > from the inside to the outside; this means right-to-left > (except for function names and order of parameters.) > In the example, what is 'p'? > > spoken or read: p is a pointer to a const IRExpr > transliterated: p * const IRExpr > proper syntax: IRExpr const *p > > This placement of 'const' is especially natural in C++, > where the spoken "by const-ref" becomes the syntax "const&". > Thank you for detailed explanation of your arguments. I think consistency with the rest of VEX code is also important. I did a little research and nowhere in VEX we can see 'T const *'; it is always 'const T *'. I. |