Skip to content

Commit

Permalink
s390x: prepare for upstreaming
Browse files Browse the repository at this point in the history
disable autodetection for s390x, since it still a work in progress
and not yet optimized, but add put_label and support for alternate
allocators while rebasing/updating the code base.

adjust syntax to match the style used by the rest of the codebase
for easy of maintenance.
  • Loading branch information
carenas committed Sep 8, 2020
1 parent c35b219 commit 8f07d76
Show file tree
Hide file tree
Showing 5 changed files with 747 additions and 474 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ SLJIT_LIR_FILES = $(SRCDIR)/sljitLir.c $(SRCDIR)/sljitUtils.c \
$(SRCDIR)/sljitNativePPC_common.c $(SRCDIR)/sljitNativePPC_32.c $(SRCDIR)/sljitNativePPC_64.c \
$(SRCDIR)/sljitNativeSPARC_common.c $(SRCDIR)/sljitNativeSPARC_32.c \
$(SRCDIR)/sljitNativeTILEGX_64.c \
$(SRCDIR)/sljitNativeS390X.c \
$(SRCDIR)/sljitNativeX86_common.c $(SRCDIR)/sljitNativeX86_32.c $(SRCDIR)/sljitNativeX86_64.c

.PHONY: all clean examples
Expand Down
2 changes: 0 additions & 2 deletions sljit_src/sljitConfigInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ extern "C" {
#define SLJIT_CONFIG_SPARC_32 1
#elif defined(__tilegx__)
#define SLJIT_CONFIG_TILEGX 1
#elif defined(__s390x__)
#define SLJIT_CONFIG_S390X 1
#else
/* Unsupported architecture */
#define SLJIT_CONFIG_UNSUPPORTED 1
Expand Down
7 changes: 5 additions & 2 deletions sljit_src/sljitLir.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,10 @@ static SLJIT_INLINE sljit_s32 get_arg_count(sljit_s32 arg_types)
return arg_count;
}

#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)

/* Only used in RISC architectures where the instruction size is constant */
#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \
&& !(defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X)

static SLJIT_INLINE sljit_uw compute_next_addr(struct sljit_label *label, struct sljit_jump *jump,
struct sljit_const *const_, struct sljit_put_label *put_label)
Expand All @@ -655,7 +658,7 @@ static SLJIT_INLINE sljit_uw compute_next_addr(struct sljit_label *label, struct
return result;
}

#endif /* !SLJIT_CONFIG_X86 */
#endif /* !SLJIT_CONFIG_X86 && !SLJIT_CONFIG_S390X */

static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler,
sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
Expand Down
Loading

0 comments on commit 8f07d76

Please sign in to comment.