1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

Don't use addresses of labels with LLVM.

* libguile/vm-engine.h: If __llvm__ is defined, undef HAVE_LABELS_AS_VALUES.
* libguile/vm-expand.h: Likewise.
This commit is contained in:
Ken Raeburn 2012-05-20 15:00:21 -04:00
parent 19b22475d3
commit ea17899018
2 changed files with 24 additions and 0 deletions

View file

@ -98,6 +98,18 @@
#define JT_REG #define JT_REG
#endif #endif
/*
* As of "gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
* 2336.1.00)" it appears that llvm-gcc doesn't handle labels-as-values
* as efficiently as the basic switch statement, so we want to switch
* them off.
*
* (See also vm-expand.h.)
*/
#ifdef __llvm__
# undef HAVE_LABELS_AS_VALUES
#endif
/* /*
* Cache/Sync * Cache/Sync

View file

@ -16,6 +16,18 @@
* 02110-1301 USA * 02110-1301 USA
*/ */
/*
* As of "gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
* 2336.1.00)" it appears that llvm-gcc doesn't handle labels-as-values
* as efficiently as the basic switch statement, so we want to switch
* them off.
*
* (See also vm-engine.h.)
*/
#ifdef __llvm__
# undef HAVE_LABELS_AS_VALUES
#endif
#ifndef VM_LABEL #ifndef VM_LABEL
#define VM_LABEL(tag) l_##tag #define VM_LABEL(tag) l_##tag
#define VM_OPCODE(tag) scm_op_##tag #define VM_OPCODE(tag) scm_op_##tag