aboutsummaryrefslogtreecommitdiff
path: root/x86_64-gen.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-07-18 22:07:42 +0200
committergrischka <grischka>2009-07-18 22:07:42 +0200
commitc998985c744549292ba4abe077aee3950548b083 (patch)
tree671d8f2e10ae9c691d3301a76a29b306e6b4020a /x86_64-gen.c
parent94ae3984b0d4d3d78975d3bd48810cd5b6381618 (diff)
downloadtinycc-c998985c744549292ba4abe077aee3950548b083.tar.gz
tinycc-c998985c744549292ba4abe077aee3950548b083.tar.bz2
cleanup: constify some global data
Diffstat (limited to 'x86_64-gen.c')
-rw-r--r--x86_64-gen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c
index 593cd61..1739e95 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -60,7 +60,7 @@ enum {
#define REX_BASE(reg) (((reg) >> 3) & 1)
#define REG_VALUE(reg) ((reg) & 7)
-int reg_classes[NB_REGS] = {
+const int reg_classes[NB_REGS] = {
/* eax */ RC_INT | RC_RAX,
/* ecx */ RC_INT | RC_RCX,
/* edx */ RC_INT | RC_RDX,
@@ -535,12 +535,12 @@ static void gcall_or_jmp(int is_jmp)
#ifdef TCC_TARGET_PE
#define REGN 4
-static uint8_t arg_regs[] = {
+static const uint8_t arg_regs[] = {
TREG_RCX, TREG_RDX, TREG_R8, TREG_R9
};
#else
#define REGN 6
-static uint8_t arg_regs[REGN] = {
+static const uint8_t arg_regs[REGN] = {
TREG_RDI, TREG_RSI, TREG_RDX, TREG_RCX, TREG_R8, TREG_R9
};
#endif