1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-25 20:50:31 +02:00

Correct C sequence point problem.

* lib/jit_x86-cpu.c: Correct undefined behavior code.
	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56143
This commit is contained in:
pcpa 2013-01-30 00:36:52 -02:00
parent 44d4fa5444
commit 7c7908c97e
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2013-01-30 Paulo Andrade <pcpa@gnu.org>
* lib/jit_x86-cpu.c: Correct undefined behavior code.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56143
2013-01-29 Paulo Andrade <pcpa@gnu.org> 2013-01-29 Paulo Andrade <pcpa@gnu.org>
* configure.ac: Use AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER * configure.ac: Use AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER

View file

@ -2601,16 +2601,20 @@ _stxi_l(jit_state_t *_jit, jit_word_t i0, jit_int32_t r0, jit_int32_t r1)
static void static void
_jccs(jit_state_t *_jit, jit_int32_t code, jit_word_t i0) _jccs(jit_state_t *_jit, jit_int32_t code, jit_word_t i0)
{ {
jit_word_t w;
ic(0x70 | code); ic(0x70 | code);
ic(i0 - (_jit->pc.w + 1)); w = i0 - (_jit->pc.w + 1);
ic(w);
} }
static void static void
_jcc(jit_state_t *_jit, jit_int32_t code, jit_word_t i0) _jcc(jit_state_t *_jit, jit_int32_t code, jit_word_t i0)
{ {
jit_word_t w;
ic(0x0f); ic(0x0f);
ic(0x80 | code); ic(0x80 | code);
ii(i0 - (_jit->pc.w + 4)); w = i0 - (_jit->pc.w + 4);
ii(w);
} }
static void static void
@ -3040,8 +3044,10 @@ _calli(jit_state_t *_jit, jit_word_t i0)
callr(rn(reg)); callr(rn(reg));
jit_unget_reg(reg); jit_unget_reg(reg);
#else #else
jit_word_t w;
ic(0xe8); ic(0xe8);
ii(i0 - (_jit->pc.w + 4)); w = i0 - (_jit->pc.w + 4);
ii(w);
word = _jit->pc.w; word = _jit->pc.w;
#endif #endif
return (word); return (word);
@ -3058,8 +3064,10 @@ _jmpr(jit_state_t *_jit, jit_int32_t r0)
static jit_word_t static jit_word_t
_jmpi(jit_state_t *_jit, jit_word_t i0) _jmpi(jit_state_t *_jit, jit_word_t i0)
{ {
jit_word_t w;
ic(0xe9); ic(0xe9);
ii(i0 - (_jit->pc.w + 4)); w = i0 - (_jit->pc.w + 4);
ii(w);
return (_jit->pc.w); return (_jit->pc.w);
} }