From: Matt Birkholz Date: Wed, 8 Feb 2012 04:48:06 +0000 (-0700) Subject: svm: Undo "fix" for copy-block. X-Git-Tag: release-9.2.0~309^2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=16fca1c3dccd3dc73bbdb5e8a646e240b30d60a6;p=mit-scheme.git svm: Undo "fix" for copy-block. There was nothing wrong with copy-block. Presumably define-code- sequence took a separate pattern and "coding" for a reason... Copy-block can remain the sole exercise of the separation... --- diff --git a/src/compiler/machines/svm/assembler-rules.scm b/src/compiler/machines/svm/assembler-rules.scm index e9a2ea951..531c7c97f 100644 --- a/src/compiler/machines/svm/assembler-rules.scm +++ b/src/compiler/machines/svm/assembler-rules.scm @@ -228,18 +228,18 @@ USA. word (_ from word-register) (_ to word-register)) - size + to from - to) + size) (define-code-sequence instruction (copy-block (_ size word-register) word (_ from word-register) (_ to word-register)) - size + to from - to) + size) (define-implicit-coding-type type-operand (define-code-sequence (_ type type-word) diff --git a/src/microcode/svm1-defns.h b/src/microcode/svm1-defns.h index 87cbdf70a..4245af33c 100644 --- a/src/microcode/svm1-defns.h +++ b/src/microcode/svm1-defns.h @@ -2,7 +2,7 @@ DO NOT EDIT: this file was generated by a program. -Copyright (C) 2011 Massachusetts Institute of Technology +Copyright (C) 2010 Massachusetts Institute of Technology This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -485,16 +485,16 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. DECODE_FLOAT (value) #define SVM1_INST_COPY_BLOCK_U8_W 0x0f -#define DECODE_SVM1_INST_COPY_BLOCK_U8_W(size, from, to) \ - DECODE_UNSIGNED_8 (size); \ +#define DECODE_SVM1_INST_COPY_BLOCK_U8_W(to, from, size) \ + DECODE_WORD_REGISTER (to); \ DECODE_WORD_REGISTER (from); \ - DECODE_WORD_REGISTER (to) + DECODE_UNSIGNED_8 (size) #define SVM1_INST_COPY_BLOCK_WR_W 0x10 -#define DECODE_SVM1_INST_COPY_BLOCK_WR_W(size, from, to) \ - DECODE_WORD_REGISTER (size); \ +#define DECODE_SVM1_INST_COPY_BLOCK_WR_W(to, from, size) \ + DECODE_WORD_REGISTER (to); \ DECODE_WORD_REGISTER (from); \ - DECODE_WORD_REGISTER (to) + DECODE_WORD_REGISTER (size) #define SVM1_INST_LOAD_NON_POINTER_TC_U8 0x11 #define DECODE_SVM1_INST_LOAD_NON_POINTER_TC_U8(target, type_1, value) \ diff --git a/src/microcode/svm1-interp.c b/src/microcode/svm1-interp.c index cb148772b..4b25452f1 100644 --- a/src/microcode/svm1-interp.c +++ b/src/microcode/svm1-interp.c @@ -191,7 +191,7 @@ initialize_svm1 (void) WREG_SET (SVM1_REG_STACK_POINTER, ((word_t)stack_pointer)); \ WREG_SET (SVM1_REG_FREE_POINTER, ((word_t)Free)); \ WREG_SET (SVM1_REG_VALUE, GET_VAL); \ - WREG_SET (SVM1_REG_DYNAMIC_LINK, ((word_t)(OBJECT_ADDRESS(GET_VAL)))); \ + WREG_SET (SVM1_REG_DYNAMIC_LINK, BYTE_ADDR(OBJECT_ADDRESS(GET_VAL))); \ } while (0) #define EXPORT_REGS() do \ @@ -589,7 +589,7 @@ copy_block (word_t * to, word_t * from, word_t n_words) DEFINE_INST (copy_block_u8_w) { - DECODE_SVM1_INST_COPY_BLOCK_U8_W (n_words, r_from, r_to); + DECODE_SVM1_INST_COPY_BLOCK_U8_W (r_to, r_from, n_words); copy_block ((WORD_ADDR (WREG_REF (r_to))), (WORD_ADDR (WREG_REF (r_from))), n_words); @@ -598,7 +598,7 @@ DEFINE_INST (copy_block_u8_w) DEFINE_INST (copy_block_wr_w) { - DECODE_SVM1_INST_COPY_BLOCK_WR_W (r_n_words, r_from, r_to); + DECODE_SVM1_INST_COPY_BLOCK_WR_W (r_to, r_from, r_n_words); copy_block ((WORD_ADDR (WREG_REF (r_to))), (WORD_ADDR (WREG_REF (r_from))), (WREG_REF (r_n_words)));