diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-04-02 11:58:42 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-04-02 12:39:30 (GMT) |
commit | 1db4ef323b7a76093356ae76268132f3760e1631 (patch) | |
tree | fec36ee0ec1b6b2010b62ca4177edca0e31e2114 /plugins/arm/v7/opdefs/Makefile.am | |
parent | 1bc80837dde03a32b5ab185067f7bd4c499a9850 (diff) |
Rewritten the whole instruction definition format.
Diffstat (limited to 'plugins/arm/v7/opdefs/Makefile.am')
-rw-r--r-- | plugins/arm/v7/opdefs/Makefile.am | 81 |
1 files changed, 34 insertions, 47 deletions
diff --git a/plugins/arm/v7/opdefs/Makefile.am b/plugins/arm/v7/opdefs/Makefile.am index 3f69a3f..0538359 100644 --- a/plugins/arm/v7/opdefs/Makefile.am +++ b/plugins/arm/v7/opdefs/Makefile.am @@ -1,60 +1,48 @@ -include ../../../../tools/d2c/d2c.mk +include $(top_srcdir)/tools/d2c/d2c.mk -D2C_BIN = ../../../../tools/d2c/d2c -GEN_BIN = ../../../../tools/d2c/d2c_genmakefile.sh +D2C_BIN = $(top_srcdir)/tools/d2c/d2c +GEN_BIN = $(top_srcdir)/tools/d2c/d2c_genmakefile.sh -D2C_TYPE = raw -D2C_OUTDIR = $(PWD)/.. +D2C_OUTDIR = $(PWD)/../opcodes/ + +D2C_TYPE = raw -D2C_ARCH = armv7 -D2C_HEADER = _ARCH_ARM_V7 +D2C_ARCH = ARMv7 +D2C_ARCH_CN = ARMv7 +D2C_GUARD = PLUGINS_ARM_V7_OPCODES D2C_ENCODINGS = \ - -e A=arm_ \ - -e t=thumb_16_ \ - -e T=thumb_32_ + -e A=arm \ + -e t=thumb_16 \ + -e T=thumb_32 + +D2C_ID_PREFIX = AOP7 +D2C_ID_COUNT = 500 -D2C_MACROS = \ - -M SetFlags=g_armv7_instruction_define_setflags \ - -M Condition=g_arm_instruction_set_cond \ - -M "ExpandImmC32=g_imm_operand_new_from_value(MDS_32_BITS_UNSIGNED, " \ - -M SignExtend=sign_extend_armv7_imm \ - -M SetInsFlag=g_arch_instruction_set_flag \ - -M StoreCondition=g_arm_instruction_set_cond \ - -M ExtendKeyword=g_arm_instruction_extend_keyword +D2C_SPECIFIC = -D2C_OPERANDS = \ - -n BarrierLimitation \ - -n BitDiff \ - -n IncWidth \ - -n DecodeImmShift \ - -n MakeMemoryAccess \ - -n Register \ - -n RegisterShift \ - -n UInt \ - -n ZeroExtend -FIXED_C_INCLUDES = \ - \n\#include <arch/link.h> \ - \n\#include <common/bconst.h> \ - \n \ - \n\#include \"../helpers.h\" \ - \n\#include \"../instruction.h\" \ - \n\#include \"../fetch.h\" \ - \n\#include \"../link.h\" \ - \n\#include \"../post.h\" \ - \n\#include \"../../instruction.h\" \ - \n\#include \"../../link.h\" \ - \n\n +FIXED_C_INCLUDES = \ + \#include <assert.h> \ + \n \ + \n\#include <arch/link.h> \ + \n\#include <common/bconst.h> \ + \n \ + \n\#include "../helpers.h" \ + \n\#include "../instruction.h" \ + \n\#include "../fetch.h" \ + \n\#include "../link.h" \ + \n\#include "../post.h" \ + \n\#include "../../instruction.h" \ + \n\#include "../../link.h" -FIXED_H_INCLUDES = \ - \n\#include <stdint.h> \ - \n \ - \n\#include <arch/instruction.h> \ - \n\n +FIXED_H_INCLUDES = \ + \#include <stdint.h> \ + \n \ + \n\#include <arch/instruction.h> # for i in $(seq 1 426); do test -f *A88$i.d && (ls *A88$i.d | sed 's/^/\t/' | sed 's/$/\t\t\t\t\t\t\\/') ; done @@ -278,7 +266,6 @@ ARMV7_DEFS = \ wfi_A88425.d \ yield_A88426.d -# subs_B9320.d # make dist procède répertoire par répertoire. Or le répertoire opcodes utilise # le contenu du répertoire opdefs. Il faut donc générer les fichiers nécessaires @@ -295,7 +282,7 @@ dist-hook: all: $(ARMV7_DEFS:.d=.g) fmk.done d2c_final_rules fmk.done: $(ARMV7_DEFS) - $(GEN_BIN) ../opcodes/ ../opdefs/.gen ../../../../tools/d2c/globalgen.mk arm thumb_32 thumb_16 + $(GEN_BIN) $(D2C_OUTDIR) arm thumb_32 thumb_16 touch $@ clean: |