From: Matt Birkholz Date: Tue, 7 Feb 2012 19:34:23 +0000 (-0700) Subject: svm: Fix copy-block instruction's parameter list. X-Git-Tag: release-9.2.0~312 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f50159f134c9536b8287fd30a6508e0385458a46;p=mit-scheme.git svm: Fix copy-block instruction's parameter list. --- diff --git a/src/compiler/machines/svm/assembler-rules.scm b/src/compiler/machines/svm/assembler-rules.scm index 531c7c97f..e9a2ea951 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)) - to + size from - size) + to) (define-code-sequence instruction (copy-block (_ size word-register) word (_ from word-register) (_ to word-register)) - to + size from - size) + to) (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 4245af33c..87cbdf70a 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) 2010 Massachusetts Institute of Technology +Copyright (C) 2011 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(to, from, size) \ - DECODE_WORD_REGISTER (to); \ +#define DECODE_SVM1_INST_COPY_BLOCK_U8_W(size, from, to) \ + DECODE_UNSIGNED_8 (size); \ DECODE_WORD_REGISTER (from); \ - DECODE_UNSIGNED_8 (size) + DECODE_WORD_REGISTER (to) #define SVM1_INST_COPY_BLOCK_WR_W 0x10 -#define DECODE_SVM1_INST_COPY_BLOCK_WR_W(to, from, size) \ - DECODE_WORD_REGISTER (to); \ +#define DECODE_SVM1_INST_COPY_BLOCK_WR_W(size, from, to) \ + DECODE_WORD_REGISTER (size); \ DECODE_WORD_REGISTER (from); \ - DECODE_WORD_REGISTER (size) + DECODE_WORD_REGISTER (to) #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 4b25452f1..cb148772b 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, BYTE_ADDR(OBJECT_ADDRESS(GET_VAL))); \ + WREG_SET (SVM1_REG_DYNAMIC_LINK, ((word_t)(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 (r_to, r_from, n_words); + DECODE_SVM1_INST_COPY_BLOCK_U8_W (n_words, r_from, r_to); 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_to, r_from, r_n_words); + DECODE_SVM1_INST_COPY_BLOCK_WR_W (r_n_words, r_from, r_to); copy_block ((WORD_ADDR (WREG_REF (r_to))), (WORD_ADDR (WREG_REF (r_from))), (WREG_REF (r_n_words)));