mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
ae440402f5
Reported by Rich Felker when building on 32-bit hosts. Backwards jump negative offsets were not calculated correctly due to improper 32-bit to 64-bit zero-extension. The 64-bit fields are present because we are mixing 32-bit and 64-bit architectures in our cpu descriptions. Removing 64-bit fixes the issue. We don't use 64-bit, there is an architecture spec for 64-bit but no implementations or simulators. My thought is if we need them in the future we should do the proper work to support both 32-bit and 64-bit implementations co-existing then. cpu/ChangeLog: yyyy-mm-dd Stafford Horne <shorne@gmail.com> PR 25184 * or1k.cpu (arch or1k): Remove or64 and or64nd machs. (ORBIS-MACHS, ORFPX32-MACHS): Remove pmacros. (cpu or1k64bf, mach or64, mach or64nd): Remove definitions. * or1kcommon.cpu (h-fdr): Remove hardware. * or1korfpx.cpu (rDDF, rADF, rBDF): Remove operand definitions. (float-regreg-insn): Remove lf- mnemonic -d instruction pattern. (float-setflag-insn-base): Remove lf-sf mnemonic -d pattern. (float-cust-insn): Remove "lf-cust" cust-num "-d" pattern. (lf-rem-d, lf-itof-d, lf-ftoi-d, lf-madd-d): Remove.
104 lines
3.0 KiB
Scheme
104 lines
3.0 KiB
Scheme
; OpenRISC 1000 architecture. -*- Scheme -*-
|
|
; Copyright 2000-2019 Free Software Foundation, Inc.
|
|
; Contributed for OR32 by Johan Rydberg, jrydberg@opencores.org
|
|
; Modified by Julius Baxter, juliusbaxter@gmail.com
|
|
; Modified by Peter Gavin, pgavin@gmail.com
|
|
; Modified by Andrey Bacherov, avbacherov@opencores.org
|
|
;
|
|
; This program is free software; you can redistribute it and/or modify
|
|
; it under the terms of the GNU General Public License as published by
|
|
; the Free Software Foundation; either version 3 of the License, or
|
|
; (at your option) any later version.
|
|
;
|
|
; This program is distributed in the hope that it will be useful,
|
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
; GNU General Public License for more details.
|
|
;
|
|
; You should have received a copy of the GNU General Public License
|
|
; along with this program; if not, see <http://www.gnu.org/licenses/>
|
|
|
|
(include "simplify.inc")
|
|
|
|
; The OpenRISC family is a set of RISC microprocessor architectures with an
|
|
; emphasis on scalability and is targetted at embedded use.
|
|
; The CPU RTL development is a collaborative open source effort.
|
|
; http://opencores.org/or1k
|
|
; http://openrisc.net
|
|
|
|
(define-arch
|
|
(name or1k)
|
|
(comment "OpenRISC 1000")
|
|
(default-alignment aligned)
|
|
(insn-lsb0? #t)
|
|
(machs or32 or32nd)
|
|
(isas openrisc)
|
|
)
|
|
|
|
; Instruction set parameters.
|
|
(define-isa
|
|
; Name of the ISA.
|
|
(name openrisc)
|
|
; Base insturction length. The insns are always 32 bits wide.
|
|
(base-insn-bitsize 32)
|
|
)
|
|
|
|
(define-pmacro OR32-MACHS or32,or32nd)
|
|
(define-pmacro ORBIS-MACHS or32,or32nd)
|
|
(define-pmacro ORFPX32-MACHS or32,or32nd)
|
|
(define-pmacro ORFPX64A32-MACHS or32,or32nd) ; float64 for 32-bit machs
|
|
|
|
(define-attr
|
|
(for model)
|
|
(type boolean)
|
|
(name NO-DELAY-SLOT)
|
|
(comment "does not have delay slots")
|
|
)
|
|
|
|
(if (keep-mach? (or32 or32nd))
|
|
(begin
|
|
(define-cpu
|
|
(name or1k32bf)
|
|
(comment "OpenRISC 1000 32-bit CPU family")
|
|
(insn-endian big)
|
|
(data-endian big)
|
|
(word-bitsize 32)
|
|
(file-transform "")
|
|
)
|
|
|
|
(define-mach
|
|
(name or32)
|
|
(comment "Generic OpenRISC 1000 32-bit CPU")
|
|
(cpu or1k32bf)
|
|
(bfd-name "or1k")
|
|
)
|
|
|
|
(define-mach
|
|
(name or32nd)
|
|
(comment "Generic OpenRISC 1000 32-bit CPU with no branch delay slot")
|
|
(cpu or1k32bf)
|
|
(bfd-name "or1knd")
|
|
)
|
|
|
|
; OpenRISC 1200 - 32-bit or1k CPU implementation
|
|
(define-model
|
|
(name or1200) (comment "OpenRISC 1200 model")
|
|
(attrs)
|
|
(mach or32)
|
|
(unit u-exec "Execution Unit" () 1 1 () () () ())
|
|
)
|
|
|
|
; OpenRISC 1200 - 32-bit or1k CPU implementation
|
|
(define-model
|
|
(name or1200nd) (comment "OpenRISC 1200 model with no branch delay slot")
|
|
(attrs NO-DELAY-SLOT)
|
|
(mach or32nd)
|
|
(unit u-exec "Execution Unit" () 1 1 () () () ())
|
|
)
|
|
)
|
|
)
|
|
|
|
(include "or1kcommon.cpu")
|
|
(include "or1korbis.cpu")
|
|
(include "or1korfpx.cpu")
|