e576bb2002-10-11Martin Nilsson /* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. */
1b10db2002-10-08Martin Nilsson 
dd6bca2001-07-20Henrik Grubbström (Grubba) /* * Generic headerfile for the code-generator. */ #ifndef CODE_PIKECODE_H #define CODE_PIKECODE_H
aeaab72002-04-08Martin Stjernholm #include "program.h"
dd6bca2001-07-20Henrik Grubbström (Grubba) void ins_pointer(INT32 ptr); INT32 read_pointer(INT32 off); void upd_pointer(INT32 off, INT32 ptr); void ins_byte(INT32 val); void ins_data(INT32 val); void ins_align(INT32 align); void ins_f_byte(unsigned int b);
112e5f2006-09-08Henrik Grubbström (Grubba) void ins_f_byte_with_arg(unsigned int a, INT32 b); void ins_f_byte_with_2_args(unsigned int a, INT32 c, INT32 b);
dd6bca2001-07-20Henrik Grubbström (Grubba) 
d346f82006-04-27Tor Edvardsson #if PIKE_BYTECODE_METHOD == PIKE_BYTECODE_AMD64
b6fdcd2011-05-11Henrik Grubbström (Grubba) #ifdef __NT__
d346f82006-04-27Tor Edvardsson #warning using amd64
b6fdcd2011-05-11Henrik Grubbström (Grubba) #endif
13670c2015-05-25Martin Nilsson #endif
ef6d662002-04-07Martin Stjernholm #if PIKE_BYTECODE_METHOD == PIKE_BYTECODE_IA32
dd6bca2001-07-20Henrik Grubbström (Grubba) #include "code/ia32.h"
151a4b2006-03-29Henrik Grubbström (Grubba) #define PIKE_BYTECODE_METHOD_NAME "ia32"
d346f82006-04-27Tor Edvardsson #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_AMD64 #include "code/amd64.h" #define PIKE_BYTECODE_METHOD_NAME "amd64"
ef6d662002-04-07Martin Stjernholm #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_SPARC
dd6bca2001-07-20Henrik Grubbström (Grubba) #include "code/sparc.h"
151a4b2006-03-29Henrik Grubbström (Grubba) #define PIKE_BYTECODE_METHOD_NAME "sparc"
ef6d662002-04-07Martin Stjernholm #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_PPC32
55d3e12001-07-26Marcus Comstedt #include "code/ppc32.h"
151a4b2006-03-29Henrik Grubbström (Grubba) #define PIKE_BYTECODE_METHOD_NAME "ppc32"
a00f6f2007-04-01Marcus Comstedt #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_PPC64 #include "code/ppc64.h" #define PIKE_BYTECODE_METHOD_NAME "ppc64"
c2da762014-12-06Tobias S. Josefowitz #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_ARM32 #include "code/arm32.h" #define PIKE_BYTECODE_METHOD_NAME "arm32"
3ea5d12016-08-15Marcus Comstedt #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_ARM64 #include "code/arm64.h" #define PIKE_BYTECODE_METHOD_NAME "arm64"
74e6f12018-07-12Marcus Comstedt #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_RV32 #include "code/riscv.h" #define PIKE_BYTECODE_METHOD_NAME "rv32" #elif PIKE_BYTECODE_METHOD == PIKE_BYTECODE_RV64 #include "code/riscv.h" #define PIKE_BYTECODE_METHOD_NAME "rv64"
ef6d662002-04-07Martin Stjernholm #else
dd6bca2001-07-20Henrik Grubbström (Grubba) #include "code/bytecode.h"
151a4b2006-03-29Henrik Grubbström (Grubba) #define PIKE_BYTECODE_METHOD_NAME "default"
ef6d662002-04-07Martin Stjernholm #endif
5c03a12001-07-23Henrik Grubbström (Grubba) 
f4ecd22002-05-10Henrik Grubbström (Grubba) #ifndef CHECK_RELOC #define CHECK_RELOC(REL, PROG_SIZE) #endif /* !CHECK_RELOC */
dd6bca2001-07-20Henrik Grubbström (Grubba) #endif /* CODE_PIKECODE_H */