Correct C sequence point problem. - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年01月30日 00:36:52 -0200
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年01月30日 00:36:52 -0200
commit7c7908c97e5c2a8779993dcdfe198b34c09784fc (patch)
treec9c59bad6f4c8eabdf8b124121bcd418ec260d6f /lib
parent44d4fa5444aa7f4c6e766403c0f8e8a014fdd4f4 (diff)
downloadlightning-7c7908c97e5c2a8779993dcdfe198b34c09784fc.tar.gz
Correct C sequence point problem.
* lib/jit_x86-cpu.c: Correct undefined behavior code. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56143
Diffstat (limited to 'lib')
-rw-r--r--lib/jit_x86-cpu.c 16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/jit_x86-cpu.c b/lib/jit_x86-cpu.c
index 997855d..9ba93c3 100644
--- a/lib/jit_x86-cpu.c
+++ b/lib/jit_x86-cpu.c
@@ -2601,16 +2601,20 @@ _stxi_l(jit_state_t *_jit, jit_word_t i0, jit_int32_t r0, jit_int32_t r1)
static void
_jccs(jit_state_t *_jit, jit_int32_t code, jit_word_t i0)
{
+ jit_word_t w;
ic(0x70 | code);
- ic(i0 - (_jit->pc.w + 1));
+ w = i0 - (_jit->pc.w + 1);
+ ic(w);
}
static void
_jcc(jit_state_t *_jit, jit_int32_t code, jit_word_t i0)
{
+ jit_word_t w;
ic(0x0f);
ic(0x80 | code);
- ii(i0 - (_jit->pc.w + 4));
+ w = i0 - (_jit->pc.w + 4);
+ ii(w);
}
static void
@@ -3040,8 +3044,10 @@ _calli(jit_state_t *_jit, jit_word_t i0)
callr(rn(reg));
jit_unget_reg(reg);
#else
+ jit_word_t w;
ic(0xe8);
- ii(i0 - (_jit->pc.w + 4));
+ w = i0 - (_jit->pc.w + 4);
+ ii(w);
word = _jit->pc.w;
#endif
return (word);
@@ -3058,8 +3064,10 @@ _jmpr(jit_state_t *_jit, jit_int32_t r0)
static jit_word_t
_jmpi(jit_state_t *_jit, jit_word_t i0)
{
+ jit_word_t w;
ic(0xe9);
- ii(i0 - (_jit->pc.w + 4));
+ w = i0 - (_jit->pc.w + 4);
+ ii(w);
return (_jit->pc.w);
}
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月23日 13:43:33 +0000

AltStyle によって変換されたページ (->オリジナル) /