1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 01:42:24 +02:00

Recognize mips64* as having 32-bit pointers by default.

* module/system/base/target.scm (cpu-word-size): Consider MIPS64 to
  default to n32 or o32.
* test-suite/tests/asm-to-bytecode.test ("cross-compilation")
  ["mips64el-unknown-linux-gnu"]: New test.
This commit is contained in:
Ludovic Courtès 2013-02-27 20:07:12 +01:00
parent 4124994771
commit cc2948aa31
2 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,6 @@
;;; Compilation targets
;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@ -80,6 +80,11 @@
(if (string=? cpu (triplet-cpu %host-type))
%native-word-size
(cond ((string-match "^i[0-9]86$" cpu) 4)
;; See <http://www.linux-mips.org/wiki/WhatsWrongWithO32N32N64>
;; for details on the MIPS ABIs.
((string-match "^mips64" cpu) 4) ; n32 or o32
((string-match "64$" cpu) 8)
((string-match "64[lbe][lbe]$" cpu) 8)
((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)

View file

@ -1,6 +1,6 @@
;;;; Assembly to bytecode compilation -*- mode: scheme; coding: utf-8; -*-
;;;;
;;;; Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
;;;; Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -194,6 +194,9 @@
(test-target "powerpc-unknown-linux-gnu" (endianness big) 4)
(test-target "sparc64-unknown-freebsd8.2" (endianness big) 8)
(test-target "mips64el-unknown-linux-gnu" ; n32 or o32 ABI
(endianness little) 4)
(pass-if-exception "unknown target"
exception:miscellaneous-error
(call-with-values (lambda ()