From dad6f1f326c4ff68c7473a192fe9545818c479bb Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 24 Oct 1997 06:43:51 +0000 Subject: Add function to fetch 32bit instructions When address translation of insn fetch fails raise exception immediatly. Use address_word as type of all address variables (instead of unsigned64), the former is configured as either 32 or 64 bit type. Always compile fpu code (no #if has fpu) --- sim/mips/gencode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sim/mips/gencode.c') diff --git a/sim/mips/gencode.c b/sim/mips/gencode.c index ca857c0..1ccaa6c 100644 --- a/sim/mips/gencode.c +++ b/sim/mips/gencode.c @@ -1865,7 +1865,7 @@ build_mips16_operands (bitmap) if ((op->flags & MIPS16_JUMP_ADDR) != 0) { printf (" {\n"); - printf (" uword64 paddr;\n"); + printf (" address_word paddr;\n"); printf (" int uncached;\n"); printf (" if (AddressTranslation (PC &~ (uword64) 1, isINSTRUCTION, isLOAD, &paddr, &uncached, isTARGET, isREAL))\n"); printf (" {\n"); @@ -2766,8 +2766,8 @@ build_instruction (doisa, features, mips16, insn) /* 16-bit offset is sign-extended and added to the base register to make a virtual address */ /* The virtual address is translated to a physical address using the TLB */ /* The hint specifies a cache operation for that address */ - printf(" uword64 vaddr = (op1 + offset);\n"); - printf(" uword64 paddr;\n"); + printf(" address_word vaddr = (op1 + offset);\n"); + printf(" address_word paddr;\n"); printf(" int uncached;\n"); /* NOTE: We are assuming that the AddressTranslation is a load: */ printf(" if (AddressTranslation(vaddr,isDATA,isLOAD,&paddr,&uncached,isTARGET,isREAL))\n"); @@ -2928,10 +2928,10 @@ build_instruction (doisa, features, mips16, insn) } if (insn->flags & REG) - printf(" uword64 vaddr = ((uword64)op1 + op2);\n"); + printf(" address_word vaddr = ((uword64)op1 + op2);\n"); else - printf(" uword64 vaddr = ((uword64)op1 + offset);\n"); - printf(" uword64 paddr;\n"); + printf(" address_word vaddr = ((uword64)op1 + offset);\n"); + printf(" address_word paddr;\n"); printf(" int uncached;\n"); /* The following check should only occur on normal (non-shifted) memory loads */ @@ -3265,8 +3265,8 @@ build_instruction (doisa, features, mips16, insn) case FPPREFX: /* This code could be merged with the PREFIX generation above: */ - printf(" uword64 vaddr = ((uword64)op1 + (uword64)op2);\n"); - printf(" uword64 paddr;\n"); + printf(" address_word vaddr = ((uword64)op1 + (uword64)op2);\n"); + printf(" address_word paddr;\n"); printf(" int uncached;\n"); printf(" if (AddressTranslation(vaddr,isDATA,isLOAD,&paddr,&uncached,isTARGET,isREAL))\n"); printf(" Prefetch(uncached,paddr,vaddr,isDATA,fs);\n"); -- cgit v1.1