On 01/11/2018 10:20 AM, Peter Maydell wrote: > On 18 December 2017 at 17:45, Richard Henderson > <richard.hender...@linaro.org> wrote: >> Including only 4, as-yet unimplemented, instruction patterns >> so that the whole thing compiles. >> >> Signed-off-by: Richard Henderson <richard.hender...@linaro.org> >> --- >> target/arm/translate-a64.h | 111 >> +++++++++++++++++++++++++++++++++++++++++++++ >> target/arm/translate-a64.c | 91 +++++++------------------------------ >> target/arm/translate-sve.c | 48 ++++++++++++++++++++ >> .gitignore | 1 + >> target/arm/Makefile.objs | 11 +++++ >> target/arm/sve.def | 45 ++++++++++++++++++ >> 6 files changed, 233 insertions(+), 74 deletions(-) >> create mode 100644 target/arm/translate-a64.h >> create mode 100644 target/arm/translate-sve.c >> create mode 100644 target/arm/sve.def > > This will be easier to review if you split the stuff that's > purely code motion from the .c file to the .h into its own > patch.
Ok. >> +target/arm/decode-sve.inc.c: $(SRC_PATH)/target/arm/sve.def $(DECODETREE) >> + $(call quiet-command,\ >> + $(PYTHON) $(DECODETREE) -o $@ --decode disas_sve \ >> + $(SRC_PATH)/target/arm/sve.def || rm -f $@, \ >> + "GEN", $@) >> + >> +target/arm/translate-sve.o: target/arm/decode-sve.inc.c >> +obj-$(TARGET_AARCH64) += translate-sve.o > > If we're serious about the idea that this decoder script is > general purpose, we should have a rules.mak rune for > generally invoking it to create a decode-foo.inc.c from a foo.def. I didn't want to attempt to generalize this until we have two users. Particularly if we wind up with extra options to the script to change other behavior. r~