mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-20 18:50:21 +02:00
cherrypick from ludovic courtes
2006-10-31 Paolo Bonzini <bonzini@gnu.org> Ludovic Courtes <ludo@chbouib.org> * tests/divi.c, tests/divi.ok, tests/movi.c, tests/movi.ok: New. * tests/ldxi.c: Ensure large pointer is generated. * tests/Makefile.am: Point to new tests. * lightning.h: Include funcs-common.h before funcs.h. * lightning/sparc/core.h: Fix bugs in modi/divi. Patches applied: * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-11 Fixed a typo in `lightning/sparc/core.h'. * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-12 SPARC: Fixed `jit_immsize' (untested!). * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-13 Added a `divi' test case (does not catch the bug fixed by the previous patch). * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-14 `divi' test case: Return non-zero on failure. * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-15 `ldxi.c' (test case): Make sure we use a large pointer operand. * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-16 Added a `movi' test case (for `jit_movi_p' with large operands). git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-31
This commit is contained in:
parent
1f7feaffe2
commit
147efb8d90
14 changed files with 221 additions and 35 deletions
|
@ -1,13 +1,13 @@
|
|||
/******************************** -*- C -*- ****************************
|
||||
*
|
||||
* Platform-independent layer (Sparc version)
|
||||
* Platform-independent layer (SPARC version)
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
* Copyright 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
|
||||
* Written by Paolo Bonzini.
|
||||
*
|
||||
* This file is part of GNU lightning.
|
||||
|
@ -98,17 +98,17 @@ struct jit_local_state {
|
|||
jit_mul (JIT_BIG, JIT_BIG, s2), \
|
||||
jit_subr_i (d, s1, JIT_BIG))
|
||||
|
||||
#define jit_modi(jit_divi, jit_muli, jit_divr, jit_mulr, d, rs, is) \
|
||||
(_siP(13,(imm)) \
|
||||
? (jit_divi (JIT_BIG, rs, is), \
|
||||
jit_muli (JIT_BIG, JIT_BIG, is), \
|
||||
jit_subr_i (d, rs, JIT_BIG)) \
|
||||
: (SETir ((is), JIT_BIG2), \
|
||||
#define jit_modi(jit_divi, jit_muli, jit_divr, jit_mulr, d, rs, is) \
|
||||
(_siP(13,(is)) \
|
||||
? (jit_divi (JIT_BIG, rs, is), \
|
||||
jit_muli (JIT_BIG, JIT_BIG, is), \
|
||||
jit_subr_i (d, rs, JIT_BIG)) \
|
||||
: (SETir ((is), JIT_BIG2), \
|
||||
jit_modr (jit_divr, jit_mulr, d, rs, JIT_BIG2)))
|
||||
|
||||
/* How many instruction are needed to put imm in a register. */
|
||||
#define jit_immsize(imm) (!(imm) ? 0 : \
|
||||
(!_siP((imm), 13) && ((imm) & 0x3ff) ? 2 : 1))
|
||||
(!_siP(13,(imm)) && ((imm) & 0x3ff) ? 2 : 1))
|
||||
|
||||
|
||||
/* branch instructions return the address of the *delay* instruction -- this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue