2012-02-27 21:14:46 +00:00
|
|
|
// ACME - a crossassembler for producing 6502/65c02/65816 code.
|
2014-03-10 00:17:10 +00:00
|
|
|
// Copyright (C) 1998-2014 Marco Baye
|
2012-02-27 21:14:46 +00:00
|
|
|
// Have a look at "acme.c" for further info
|
|
|
|
//
|
2014-03-11 14:22:32 +00:00
|
|
|
// CPU type stuff
|
|
|
|
#ifndef cpu_type_H
|
|
|
|
#define cpu_type_H
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
|
|
// CPU type structure definition
|
2014-03-10 00:17:10 +00:00
|
|
|
struct cpu_type {
|
2012-02-27 21:14:46 +00:00
|
|
|
// This function is not allowed to change GlobalDynaBuf
|
|
|
|
// because that's where the mnemonic is stored!
|
|
|
|
int (*keyword_is_mnemonic)(int);
|
2014-03-11 14:22:32 +00:00
|
|
|
int flags; // see below for bit meanings
|
2012-02-27 21:14:46 +00:00
|
|
|
char default_align_value;
|
|
|
|
};
|
2014-03-10 00:17:10 +00:00
|
|
|
#define CPUFLAG_INDIRECTJMPBUGGY (1u << 0) // warn if "jmp ($xxff)" is assembled
|
|
|
|
#define CPUFLAG_SUPPORTSLONGREGS (1u << 1) // allow "!al" and "!rl" pseudo opcodes
|
2014-11-25 23:57:15 +00:00
|
|
|
#define CPUFLAG_8B_AND_AB_NEED_0_ARG (1u << 2) // warn if "ane/lxa #$xx" uses non-zero arg
|
2014-03-10 00:17:10 +00:00
|
|
|
|
|
|
|
|
2014-12-16 08:21:44 +00:00
|
|
|
// if cpu type and value match, set register length variable to value.
|
|
|
|
// if cpu type and value don't match, complain instead.
|
|
|
|
extern void vcpu_check_and_set_reg_length(int *var, int make_long);
|
2014-03-11 14:22:32 +00:00
|
|
|
// set default value for pass
|
2014-12-16 08:21:44 +00:00
|
|
|
extern void cputype_passinit(const struct cpu_type *cpu_type);
|
2014-12-04 15:31:54 +00:00
|
|
|
// lookup cpu type held in DynaBuf and return its struct pointer (or NULL on failure)
|
|
|
|
extern const struct cpu_type *cputype_find(void);
|
2012-02-27 21:14:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|