1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 18:50:21 +02:00
guile/lightning/i386/asm-32.h
Paolo Bonzini 1f7feaffe2 first merge of x86-64 backend and related configury changes
Patches applied:

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--base-0
   tag of bonzini@gnu.org--2004b/lightning--stable--1.2--patch-28

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-1
   start merging from mzscheme...

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-2
   fix i386

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-3
   fix distribution hiccups

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-4
   adapt for usage outside distribution.

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-6
   fixes for GNU Smalltalk

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-30
2008-01-09 15:49:45 +01:00

61 lines
1.9 KiB
C

/******************************** -*- C -*- ****************************
*
* Run-time assembler for the i386
*
***********************************************************************/
/***********************************************************************
*
* Copyright 2006 Free Software Foundation, Inc.
*
* This file is part of GNU lightning.
*
* GNU lightning is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1, or (at your option)
* any later version.
*
* GNU lightning 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 Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with GNU lightning; see the file COPYING.LESSER; if not, write to the
* Free Software Foundation, 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*
***********************************************************************/
#ifndef __lightning_asm_h
#define __lightning_asm_h
/* OPCODE + i = immediate operand
* + r = register operand
* + m = memory operand (disp,base,index,scale)
* + sr/sm = a star preceding a register or memory
*/
#include "asm-i386.h"
#ifndef LIGHTNING_DEBUG
#define _r_D( R, D ) (_Mrm(_b00,_rN(R),_b101 ) ,_jit_I((long)(D)))
#define CALLm(D,B,I,S) ((_r0P(B) && _r0P(I)) ? _O_D32 (0xe8 ,(long)(D) ) : \
JITFAIL("illegal mode in direct jump"))
#define JCCim(CC,D,B,I,S) ((_r0P(B) && _r0P(I)) ? _OO_D32 (0x0f80|(CC) ,(long)(D) ) : \
JITFAIL("illegal mode in conditional jump"))
#define JMPm(D,B,I,S) ((_r0P(B) && _r0P(I)) ? _O_D32 (0xe9 ,(long)(D) ) : \
JITFAIL("illegal mode in direct jump"))
#endif
#endif /* __lightning_asm_h */