1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_exec.h (END_INSN): llvm-gcc may optimize out reg_cfp and cause

Stack/cfp consistency error when the instruction doesn't use reg_cfp.
  Usually instructions use PUSH() but for example trace doesn't.
  This hack cause speed down but you shouldn't use llvm-gcc, use clang.
  [Bug #7938]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-02-27 03:22:50 +00:00
parent 7c4084f9fb
commit 4cc2a6b1b1
2 changed files with 21 additions and 1 deletions

View file

@ -1,3 +1,11 @@
Wed Feb 27 12:13:32 2013 NARUSE, Yui <naruse@ruby-lang.org>
* vm_exec.h (END_INSN): llvm-gcc may optimize out reg_cfp and cause
Stack/cfp consistency error when the instruction doesn't use reg_cfp.
Usually instructions use PUSH() but for example trace doesn't.
This hack cause speed down but you shouldn't use llvm-gcc, use clang.
[Bug #7938]
Wed Feb 27 10:23:00 2013 Zachary Scott <zachary@zacharyscott.net>
* thread.c (thread_raise_m): rdoc formatting

View file

@ -116,9 +116,21 @@ error !
#endif /* DISPATCH_DIRECT_THREADED_CODE */
#if defined(__llvm__) && !defined(__clang__)
/* llvm-gcc may optimize out reg_cfp and cause Stack/cfp consistency error
* when the instruction doesn't use reg_cfp.
* Usually instructions use PUSH() but for example trace doesn't.
* This hack cause speed down but you shouldn't use llvm-gcc, use clang.
*/
#define END_INSN(insn) \
{ rb_control_frame_t *volatile RB_UNUSED_VAR(tmpcfp) = reg_cfp; } \
DEBUG_END_INSN(); \
TC_DISPATCH(insn);
#else
#define END_INSN(insn) \
DEBUG_END_INSN(); \
TC_DISPATCH(insn); \
TC_DISPATCH(insn);
#endif
#define INSN_DISPATCH() \
TC_DISPATCH(__START__) \