Mostly resync our gas with the NetBSD version to obtain support for

.weak as gcc and g++ would like to use.

This includes changes to other architectures mostly for completeness,
I don't expect cross-assemblink would work but I could be wrong.

Obtained from: NetBSD
This commit is contained in:
peter 1996-10-01 00:13:54 +00:00
parent 347be85679
commit acec293561
27 changed files with 286 additions and 257 deletions

View File

@ -1,6 +1,6 @@
.\" Copyright (c) 1991, 1992 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.\" $Id$
.\" $Id: as.1,v 1.5 1996/08/29 18:05:40 wosch Exp $
.TH as 1 "21 January 1992" "cygnus support" "GNU Development Tools"
.SH NAME
@ -17,6 +17,7 @@ as \- the portable GNU assembler.
.I path\c
\&\|]
.RB "[\|" \-k "\|]"
.RB "[\|" \-K "\|]"
.RB "[\|" \-L "\|]"
.RB "[\|" \-o
.I objfile\c
@ -148,6 +149,10 @@ directives.
.B \-k
Handle position independent code, generated by gcc -fpic.
.TP
.B \-K
Handle position independent code, generated by gcc -fPIC.
This is normally the same as -k.
.TP
.B \-L
Keep (in symbol table) local symbols, starting with `\|\c
.B L\c

View File

@ -1,6 +1,6 @@
.\" Copyright (c) 1991, 1992 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.\" $Id$
.\" $Id: as.1,v 1.5 1996/08/29 18:05:40 wosch Exp $
.TH as 1 "21 January 1992" "cygnus support" "GNU Development Tools"
.SH NAME
@ -17,6 +17,7 @@ as \- the portable GNU assembler.
.I path\c
\&\|]
.RB "[\|" \-k "\|]"
.RB "[\|" \-K "\|]"
.RB "[\|" \-L "\|]"
.RB "[\|" \-o
.I objfile\c
@ -148,6 +149,10 @@ directives.
.B \-k
Handle position independent code, generated by gcc -fpic.
.TP
.B \-K
Handle position independent code, generated by gcc -fPIC.
This is normally the same as -k.
.TP
.B \-L
Keep (in symbol table) local symbols, starting with `\|\c
.B L\c

View File

@ -32,7 +32,7 @@
*
*/
#ifndef lint
static char rcsid[] = "$Id: as.c,v 1.2 1993/11/03 00:51:09 paul Exp $";
static char rcsid[] = "$Id: as.c,v 1.3 1995/05/30 04:46:01 rgrimes Exp $";
#endif
#include <stdio.h>
@ -225,11 +225,6 @@ char **argv;
break;
}
#if 00000
case 'k':
break;
#endif
case 'L': /* -L means keep L* symbols */
break;
@ -290,6 +285,10 @@ char **argv;
*/
*work_argv = NULL; /* NULL means 'not a file-name' */
}
#ifdef PIC
if (flagseen['K'] || flagseen['k'])
picmode = 1;
#endif
#ifdef DONTDEF
if (gdb_begin(gdb_symbol_file_name) == 0)
flagseen['G'] = 0; /* Don't do any gdbsym stuff. */

View File

@ -18,7 +18,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* $Id: as.h,v 1.3 1994/12/23 22:36:01 nate Exp $
* $Id: as.h,v 1.4 1995/05/30 04:46:02 rgrimes Exp $
*/
#define GAS 1
@ -295,6 +295,8 @@ COMMON char *
COMMON int need_pass_2; /* TRUE if we need a second pass. */
COMMON int picmode; /* TRUE if "-k" or "-K" seen. */
typedef struct {
char * poc_name; /* assembler mnemonic, lower case, no '.' */
void (*poc_handler)(); /* Do the work */

View File

@ -18,7 +18,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
static char rcsid[] = "$Id: atof-ieee.c,v 1.3 1995/05/30 04:46:46 rgrimes Exp $";
static char rcsid[] = "$Id: atof-ieee.c,v 1.4 1996/09/22 00:55:46 pst Exp $";
#endif
#include "as.h"
@ -128,12 +128,13 @@ static void
LITTLENUM_TYPE *words;
{
as_bad("cannot create floating-point number");
words[0] = LITTLENUM_MASK >> 1; /* Zero the leftmost bit */
words[1] = -1;
words[2] = -1;
words[3] = -1;
words[4] = -1;
words[5] = -1;
/* Zero the leftmost bit */
words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1;
words[1] = (LITTLENUM_TYPE) -1;
words[2] = (LITTLENUM_TYPE) -1;
words[3] = (LITTLENUM_TYPE) -1;
words[4] = (LITTLENUM_TYPE) -1;
words[5] = (LITTLENUM_TYPE) -1;
}
/***********************************************************************\

View File

@ -132,10 +132,11 @@ static void
make_invalid_floating_point_number (words)
LITTLENUM_TYPE * words;
{
words[0]= ((unsigned)-1)>>1; /* Zero the leftmost bit */
words[1]= -1;
words[2]= -1;
words[3]= -1;
/* Zero the leftmost bit */
words[0]= (LITTLENUM_TYPE) ((unsigned)-1)>>1;
words[1]= (LITTLENUM_TYPE) -1;
words[2]= (LITTLENUM_TYPE) -1;
words[3]= (LITTLENUM_TYPE) -1;
}
/***********************************************************************\

View File

@ -101,6 +101,7 @@ const pseudo_typeS obj_pseudo_table[] = {
{ "type", s_type, 0 },
{ "val", s_ignore, 0 },
{ "version", s_ignore, 0 },
{ "weak", s_weak, 0 },
/* stabs-in-coff (?) debug pseudos (ignored) */
{ "optim", s_ignore, 0 }, /* For sun386i cc (?) */
@ -227,17 +228,17 @@ symbolS *symbol_rootP;
temp = S_GET_NAME(symbolP);
S_SET_OFFSET(symbolP, symbolP->sy_name_offset);
/* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
if (!S_IS_DEBUG(symbolP) && !S_IS_DEFINED(symbolP))
S_SET_EXTERNAL(symbolP);
/*
* Put aux info in lower four bits of `n_other' field
* Do this only now, because things like S_IS_DEFINED()
* depend on S_GET_OTHER() for some unspecified reason.
*/
if (symbolP->sy_aux)
S_SET_OTHER(symbolP, (symbolP->sy_aux & 0xf));
/* Any symbol still undefined and is not a dbg symbol is made N_EXT. */
if (!S_IS_DEBUG(symbolP) && !S_IS_DEFINED(symbolP))
S_SET_EXTERNAL(symbolP);
S_SET_OTHER(symbolP,
(symbolP->sy_bind << 4) | (symbolP->sy_aux & 0xf));
if (S_GET_TYPE(symbolP) == N_SIZE) {
expressionS *exp = (expressionS*)symbolP->sy_sizexp;
@ -467,13 +468,19 @@ object_headers *headers;
/* JF deal with forward references first... */
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next(symbolP)) {
if (symbolP->sy_forward) {
if (symbolP->sy_forward && symbolP->sy_forward != symbolP) {
S_SET_SEGMENT(symbolP,
S_GET_SEGMENT(symbolP->sy_forward));
S_SET_VALUE(symbolP, S_GET_VALUE(symbolP)
+ S_GET_VALUE(symbolP->sy_forward)
+ symbolP->sy_forward->sy_frag->fr_address);
symbolP->sy_forward=0;
symbolP->sy_aux |= symbolP->sy_forward->sy_aux;
symbolP->sy_sizexp = symbolP->sy_forward->sy_sizexp;
if (S_IS_EXTERNAL(symbolP->sy_forward))
S_SET_EXTERNAL(symbolP);
} /* if it has a forward reference */
symbolP->sy_forward=0;
} /* walk the symbol chain */
tc_crawl_symbol_chain(headers);
@ -482,7 +489,7 @@ object_headers *headers;
while ((symbolP = *symbolPP) != NULL) {
if (flagseen['R'] && (S_GET_SEGMENT(symbolP) == SEG_DATA)) {
S_SET_SEGMENT(symbolP, SEG_TEXT);
} /* if pusing data into text */
} /* if pushing data into text */
S_SET_VALUE(symbolP, S_GET_VALUE(symbolP) + symbolP->sy_frag->fr_address);
@ -515,12 +522,12 @@ object_headers *headers;
|| (S_GET_NAME(symbolP)[0] != '\001' &&
(flagseen['L'] || ! S_LOCAL_NAME(symbolP))
#ifdef PIC
|| (flagseen['k'] && symbolP->sy_forceout)
|| (picmode && symbolP->sy_forceout)
#endif
)
)
#ifdef PIC
&& (!flagseen['k'] ||
&& (!picmode ||
symbolP != GOT_symbol || got_referenced != 0
)
#endif
@ -544,7 +551,7 @@ object_headers *headers;
* some its terms may not have had their final values
* set. We defer this until `obj_emit_symbols()'
*/
if (flagseen['k'] &&
if (picmode &&
S_GET_TYPE(symbolP) != N_SIZE &&
#ifndef GRACE_PERIOD_EXPIRED
/*Can be enabled when no more old ld's around*/
@ -578,7 +585,7 @@ object_headers *headers;
} else {
if ((S_IS_EXTERNAL(symbolP) || !S_IS_DEFINED(symbolP))
#ifdef PIC
&& (!flagseen['k'] ||
&& (!picmode ||
symbolP != GOT_symbol || got_referenced != 0
)
#endif

View File

@ -17,7 +17,7 @@
License along with GAS; see the file COPYING. If not, write
to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
$Id: obj-aout.h,v 1.3 1994/12/23 22:37:34 nate Exp $
$Id: obj-aout.h,v 1.4 1995/05/30 04:47:04 rgrimes Exp $
*/
@ -201,7 +201,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
#define EX_DYNAMIC 0x20
#define EX_PIC 0x10
#undef AOUT_FLAGS
#define AOUT_FLAGS (flagseen['k'] ? EX_PIC : 0)
#define AOUT_FLAGS (picmode ? EX_PIC : 0)
#define H_GET_DYNAMIC(h) (H_GET_FLAGS(h) & EX_DYNAMIC)

View File

@ -86,12 +86,12 @@ int md_short_jump_size = 4;
int md_long_jump_size = 4;
#if defined(BFD_HEADERS)
#ifdef RELSZ
int md_reloc_size = RELSZ; /* Coff headers */
const int md_reloc_size = RELSZ; /* Coff headers */
#else
int md_reloc_size = 12; /* something else headers */
const int md_reloc_size = 12; /* something else headers */
#endif
#else
int md_reloc_size = 12; /* Not bfdized*/
const int md_reloc_size = 12; /* Not bfdized*/
#endif
/* This array holds the chars that always start a comment. If the

View File

@ -47,7 +47,7 @@ const pseudo_typeS md_pseudo_table[] = {
{ 0,0,0 }
};
int md_reloc_size ;
const int md_reloc_size ;
const char EXP_CHARS[] = "eE";

View File

@ -25,7 +25,7 @@
*/
#ifndef lint
static char rcsid[] = "$Id: tc-i386.c,v 1.3 1994/12/23 22:37:35 nate Exp $";
static char rcsid[] = "$Id: tc-i386.c,v 1.4 1995/05/30 04:47:29 rgrimes Exp $";
#endif
#include "as.h"
@ -1606,7 +1606,7 @@ char *operand_string;
* into a temporary buffer...
*/
register char *cp;
if (flagseen['k'] &&
if (picmode &&
(cp = strchr(input_line_pointer,'@'))) {
char tmpbuf[BUFSIZ];
@ -1759,7 +1759,7 @@ register segT segment;
/* XXX - oops, the JMP_TBL relocation info should have percolated through
* here, define a field in frag to this?
*/
(flagseen['k'] && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
(picmode && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
RELOC_JMP_TBL :
#endif
NO_RELOC, (symbolS *)0);
@ -1776,7 +1776,7 @@ register segT segment;
(symbolS *) 0,
fragP->fr_offset, 1,
#ifdef PIC
/*XXX*/ (flagseen['k'] && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
/*XXX*/ (picmode && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
RELOC_JMP_TBL :
#endif
NO_RELOC, (symbolS *)0);
@ -1871,7 +1871,7 @@ register fragS * fragP;
int md_short_jump_size = 2; /* size of byte displacement jmp */
int md_long_jump_size = 5; /* size of dword displacement jmp */
int md_reloc_size = 8; /* Size of relocation record */
const int md_reloc_size = 8; /* Size of relocation record */
void md_create_short_jump(ptr, from_addr, to_addr, frag, to_symbol)
char *ptr;
@ -1913,8 +1913,10 @@ char **argP;
int *cntP;
char ***vecP;
{
switch (**argP) {
#ifdef PIC
if (argP && *argP && **argP == 'k') {
case 'k':
case 'K':
#if 00
char *tmp = xmalloc(3+1+strlen(operand_special_chars));
strcpy(tmp, operand_special_chars);
@ -1931,8 +1933,12 @@ char ***vecP;
/* Predefine GOT symbol */
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
}
break;
#endif
default:
return 0;
}
return 1;
}
@ -2065,7 +2071,7 @@ relax_addressT segment_address_in_file;
case NO_RELOC:
break;
case RELOC_32:
if (!flagseen['k'] || !S_IS_EXTERNAL(fixP->fx_addsy))
if (!picmode || !S_IS_EXTERNAL(fixP->fx_addsy))
break;
r_symbolnum = fixP->fx_addsy->sy_number;
extrn_bit = 1;

View File

@ -1081,7 +1081,7 @@ char **argP;
int *cntP;
char ***vecP;
{
return 1;
return 0;
}
#ifdef comment
@ -1157,7 +1157,7 @@ relax_addressT segment_address_in_file;
*/
int md_reloc_size = 12;
const int md_reloc_size = 12;
void tc_aout_fix_to_chars(where, fixP, segment_address_in_file)
char *where;

View File

@ -87,9 +87,9 @@ extern struct hash_control *po_hash;
extern char *next_object_file_charP;
#ifdef OBJ_COFF
int md_reloc_size = sizeof(struct reloc);
const int md_reloc_size = sizeof(struct reloc);
#else /* OBJ_COFF */
int md_reloc_size = sizeof(struct relocation_info);
const int md_reloc_size = sizeof(struct relocation_info);
#endif /* OBJ_COFF */
/***************************

View File

@ -64,7 +64,7 @@ const char FLT_CHARS[] = "rRsSfFdDxXeEpP";
but nothing is ideal around here.
*/
int md_reloc_size = 8; /* Size of relocation record */
const int md_reloc_size = 8; /* Size of relocation record */
/* Its an arbitrary name: This means I don't approve of it */
/* See flames below */
@ -1302,7 +1302,7 @@ char *instring;
#ifdef PIC
case ' ':
/* this operand is just here to indicate a jump-table branch */
if (!flagseen['k'])
if (!picmode)
losing++;
break;
#endif /* PIC */
@ -1663,7 +1663,7 @@ char *instring;
#ifdef PIC
/* Use GLOB_DAT for operand references in PIC mode */
if (flagseen['k'])
if (picmode)
reloc_type = RELOC_GLOB_DAT;
else
#endif /* PIC */
@ -1687,7 +1687,7 @@ char *instring;
__GLOBAL_OFFSET_TABLE_ is turned into a pc-relative
reference to __GLOBAL_OFFSET_TABLE_ - 6,
for the sake of Sun compatibility. */
if (s[1] == 'l' && flagseen['k'] && gots(opP->con1)) {
if (s[1] == 'l' && picmode && gots(opP->con1)) {
offs(opP->con1) -= 6;
add_fix(s[1], opP->con1, 1, NO_RELOC);
} else
@ -2119,7 +2119,7 @@ char *instring;
#ifdef PIC
/* If we have the optional kludgey 2nd operand,
make this go via the jump table. */
if (flagseen['k'] && s[2] == ' ') {
if (picmode && s[2] == ' ') {
the_ins.opcode[the_ins.numo-1] |= 0xFF;
add_fix('l', opP->con1, 1, RELOC_JMP_TBL);
addword(0);
@ -3312,7 +3312,7 @@ segT segment;
(symbolS *) 0, fragP->fr_offset, 1,
#ifdef PIC
/* With -k, make all external branches go via the jump table. */
(flagseen['k']? RELOC_JMP_TBL: NO_RELOC), NULL
(picmode? RELOC_JMP_TBL: NO_RELOC), NULL
#else
NO_RELOC
#endif
@ -3515,7 +3515,7 @@ relax_addressT segment_address_in_file;
case NO_RELOC:
break;
case RELOC_32:
if (flagseen['k'] && S_IS_EXTERNAL(fixP->fx_addsy)) {
if (picmode && S_IS_EXTERNAL(fixP->fx_addsy)) {
r_symbolnum = fixP->fx_addsy->sy_number;
r_flags |= 0x10; /* set extern bit */
}
@ -3883,6 +3883,9 @@ char ***vecP;
} else if (!strcmp(*argP, "68040")) {
current_architecture |= m68040 | MAYBE_FLOAT_TOO;
} else if (!strcmp(*argP, "68060")) {
current_architecture |= m68040 | MAYBE_FLOAT_TOO;
#ifndef NO_68881
} else if (!strcmp(*argP, "68881")) {
current_architecture |= m68881;
@ -3914,6 +3917,7 @@ char ***vecP;
#ifdef PIC
case 'k':
case 'K':
/* Predefine GOT symbol */
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
break;

View File

@ -1071,7 +1071,7 @@ void convert_iif() {
#ifdef PIC
int reloc_mode;
if ((i == 4 || i == 6)
&& flagseen['k']
&& picmode
&& (iif.iifP[i].addr_mode == 18 || iif.iifP[i].addr_mode == 26))
reloc_mode = RELOC_GLOB_DAT;
else
@ -1337,7 +1337,7 @@ int *sizeP;
int prec;
LITTLENUM_TYPE words[MAX_LITTLENUMS];
LITTLENUM_TYPE *wordP;
extern char *atof_ns32k();
extern char *atof_ieee();
char *t;
switch (type) {
@ -1352,7 +1352,7 @@ int *sizeP;
*sizeP = 0;
return "Bad call to MD_ATOF()";
}
t = atof_ns32k(input_line_pointer, type, words);
t = atof_ieee(input_line_pointer, type, words);
if (t)
input_line_pointer=t;
@ -1569,7 +1569,7 @@ relax_addressT segment_address_in_file;
| ((!S_IS_DEFINED(fixP->fx_addsy)
&& fixP->fx_pcrel
&& fixP->fx_addsy != got_symbol
&& flagseen['k']) ? 0x10 : 0)
&& picmode) ? 0x10 : 0)
#endif
| (fixP->fx_im_disp & 3) << 5;
@ -1578,7 +1578,7 @@ relax_addressT segment_address_in_file;
case NO_RELOC:
break;
case RELOC_32:
if (flagseen['k'] && S_IS_EXTERNAL(fixP->fx_addsy)) {
if (picmode && S_IS_EXTERNAL(fixP->fx_addsy)) {
r_symbolnum = fixP->fx_addsy->sy_number;
r_flags |= 8; /* set extern bit */
}
@ -1824,7 +1824,7 @@ segT segment;
int md_short_jump_size = 3;
int md_long_jump_size = 5;
int md_reloc_size = 8; /* Size of relocation record */
const int md_reloc_size = 8; /* Size of relocation record */
void
md_create_short_jump(ptr,from_addr,to_addr,frag,to_symbol)
@ -1883,7 +1883,7 @@ char ***vecP;
#ifdef PIC
case 'K':
got_offset_size = 4;
break;
/*FALLTHROUGH*/
case 'k':
got_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
break;

View File

@ -18,7 +18,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
static char rcsid[] = "$Id: tc-sparc.c,v 1.3 1994/12/23 22:37:40 nate Exp $";
static char rcsid[] = "$Id: tc-sparc.c,v 1.4 1995/05/30 04:47:49 rgrimes Exp $";
#endif
#define cypress 1234
@ -435,7 +435,7 @@ void md_begin() {
toHex[i] = i + 10 - 'A';
#if 0
if (flagseen['k'])
if (picmode)
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
#endif
} /* md_begin() */
@ -885,7 +885,7 @@ char *str;
case 'L': /* 30 bit immediate */
the_insn.reloc =
#ifdef PIC
flagseen['k']?RELOC_JMP_TBL:
picmode?RELOC_JMP_TBL:
#endif
RELOC_WDISP30;
the_insn.pcrel = 1;
@ -971,7 +971,7 @@ char *str;
}
}
if (flagseen['k'] && the_insn.exp.X_add_symbol) {
if (picmode && the_insn.exp.X_add_symbol) {
switch (the_insn.reloc) {
case RELOC_LO10:
the_insn.reloc = RELOC_BASE10;
@ -1386,7 +1386,7 @@ long val;
buf[2] = val >> 18;
buf[3] = val >> 10;
} else {
if (flagseen['k'] && fixP->fx_r_type == RELOC_HI22)
if (picmode && fixP->fx_r_type == RELOC_HI22)
as_warn("non-PIC access to %s",
S_GET_NAME(fixP->fx_addsy));
buf[2]=0;
@ -1411,7 +1411,7 @@ long val;
buf[2] |= (val >> 8) & 0x03;
buf[3] = val & 0xff;
} else {
if (flagseen['k'] && fixP->fx_r_type == RELOC_LO10)
if (picmode && fixP->fx_r_type == RELOC_LO10)
as_warn("non-PIC access to %s",
S_GET_NAME(fixP->fx_addsy));
buf[3]=0;
@ -1487,7 +1487,7 @@ relax_addressT segment_address_in_file;
r_extern = 0;
r_index = S_GET_TYPE(fixP->fx_addsy);
#ifdef PIC
if (flagseen['k']) {
if (picmode) {
switch (fixP->fx_r_type) {
case RELOC_BASE10:
case RELOC_BASE13:
@ -1726,7 +1726,7 @@ char ***vecP;
architecture_requested = 1;
}
#ifdef PIC
} else if (**argP == 'k') {
} else if (**argP == 'k' || **argP == 'K') {
/* Predefine GOT symbol */
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
#endif

View File

@ -4,6 +4,7 @@
#define TC_VAX 1
#define LOCAL_LABELS_FB
#define NO_LISTING
/* use this to compare against gas-1.38 */

View File

@ -25,7 +25,7 @@
*/
#ifndef lint
static char rcsid[] = "$Id: expr.c,v 1.2 1993/11/03 00:51:28 paul Exp $";
static char rcsid[] = "$Id: expr.c,v 1.3 1995/05/30 04:46:10 rgrimes Exp $";
#endif
#include <ctype.h>
@ -126,7 +126,7 @@ register expressionS * expressionP;
/* likewise for the b's. xoxorich. */
if ((c == 'f' || c == 'b' || c == 'B')
&& (!*input_line_pointer ||
(!strchr("+-.0123456789",*input_line_pointer) &&
(!strchr("+-.0123456789iInN",*input_line_pointer) &&
!strchr(EXP_CHARS,*input_line_pointer)))) {
maxdig = radix = 10;
too_many_digits = 11;

View File

@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* $Id: i386.h,v 1.2 1994/12/11 20:46:55 sef Exp $ */
/* $Id: i386.h,v 1.3 1995/05/30 04:48:01 rgrimes Exp $ */
static const template i386_optab[] = {
@ -27,7 +27,7 @@ static const template i386_optab[] = {
{ "mov", 2, 0x88, _, DW|Modrm, Reg, Reg|Mem, 0 },
{ "mov", 2, 0xb0, _, ShortFormW, Imm, Reg, 0 },
{ "mov", 2, 0xc6, _, W|Modrm, Imm, Reg|Mem, 0 },
{ "mov", 2, 0x8c, _, D|Modrm, SReg3|SReg2, Reg16|Mem16, 0 },
{ "mov", 2, 0x8c, _, D|Modrm, SReg3|SReg2, WordReg|WordMem, 0 },
/* move to/from control debug registers */
{ "mov", 2, 0x0f20, _, D|Modrm, Control, Reg32, 0},
{ "mov", 2, 0x0f21, _, D|Modrm, Debug, Reg32, 0},
@ -760,6 +760,8 @@ static const reg_entry i386_regtab[] = {
/* debug registers */
{"db0", Debug, 0}, {"db1", Debug, 1}, {"db2", Debug, 2},
{"db3", Debug, 3}, {"db6", Debug, 6}, {"db7", Debug, 7},
{"dr0", Debug, 0}, {"dr1", Debug, 1}, {"dr2", Debug, 2},
{"dr3", Debug, 3}, {"dr6", Debug, 6}, {"dr7", Debug, 7},
/* test registers */
{"tr6", Test, 6}, {"tr7", Test, 7},
/* float registers */

View File

@ -416,14 +416,13 @@ struct m68k_opcode m68k_opcodes[] =
#define SCOPE_LINE (0x1 << 3)
#define SCOPE_PAGE (0x2 << 3)
#define SCOPE_ALL (0x3 << 3)
{"cinva", one(0xf400|SCOPE_ALL), one(0xff38), "ce", m68040 },
{"cinvl", one(0xf400|SCOPE_LINE), one(0xff38), "ceas", m68040 },
{"cinvp", one(0xf400|SCOPE_PAGE), one(0xff38), "ceas", m68040 },
{"cinva", one(0xf400|SCOPE_ALL), one(0xff20), "ce", m68040 },
{"cinvl", one(0xf400|SCOPE_LINE), one(0xff20), "ceas", m68040 },
{"cinvp", one(0xf400|SCOPE_PAGE), one(0xff20), "ceas", m68040 },
{"cpusha", one(0xf420|SCOPE_ALL), one(0xff20), "ce", m68040 },
{"cpushl", one(0xf420|SCOPE_LINE), one(0xff20), "ceas", m68040 },
{"cpushp", one(0xf420|SCOPE_PAGE), one(0xff20), "ceas", m68040 },
{"cpusha", one(0xf420|SCOPE_ALL), one(0xff38), "ce", m68040 },
{"cpushl", one(0xf420|SCOPE_LINE), one(0xff38), "ceas", m68040 },
{"cpushp", one(0xf420|SCOPE_PAGE), one(0xff38), "ceas", m68040 },
#undef SCOPE_LINE
#undef SCOPE_PAGE
@ -525,28 +524,25 @@ struct m68k_opcode m68k_opcodes[] =
in the mean time, if you know the encoding for the opmode field, you
can replace all of the "38),"'s and "3c),"'s below with the corrected
values and these guys should then just work. xoxorich. 31Aug91 */
{"fsabsb", two(0xF000, 0x5858), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsabsd", two(0xF000, 0x5458), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsabsl", two(0xF000, 0x4058), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsabsp", two(0xF000, 0x4C58), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsabss", two(0xF000, 0x4458), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsabsw", two(0xF000, 0x5058), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsabsx", two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsabsx", two(0xF000, 0x4858), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
{"fsabsx", two(0xF000, 0x0058), two(0xF1C0, 0xE07F), "IiFt", m68040 },
#ifdef comment
{"fsabsb", two(0xF000, 0x5838), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsabsd", two(0xF000, 0x5438), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsabsl", two(0xF000, 0x4038), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsabsp", two(0xF000, 0x4C38), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsabss", two(0xF000, 0x4438), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsabsw", two(0xF000, 0x5038), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsabsx", two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsabsx", two(0xF000, 0x4838), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
{"fsabsx", two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiFt", m68040 },
{"fdabsb", two(0xF000, 0x583c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040},
{"fdabsd", two(0xF000, 0x543c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040},
{"fdabsl", two(0xF000, 0x403c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040},
{"fdabsp", two(0xF000, 0x4C3c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040},
{"fdabss", two(0xF000, 0x443c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040},
{"fdabsw", two(0xF000, 0x503c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040},
{"fdabsx", two(0xF000, 0x003c), two(0xF1C0, 0xE07F), "IiF8F7", m68040},
{"fdabsx", two(0xF000, 0x483c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040},
{"fdabsx", two(0xF000, 0x003c), two(0xF1C0, 0xE07F), "IiFt", m68040},
#endif /* comment */
{"fdabsb", two(0xF000, 0x585c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040},
{"fdabsd", two(0xF000, 0x545c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040},
{"fdabsl", two(0xF000, 0x405c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040},
{"fdabsp", two(0xF000, 0x4C5c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040},
{"fdabss", two(0xF000, 0x445c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040},
{"fdabsw", two(0xF000, 0x505c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040},
{"fdabsx", two(0xF000, 0x005c), two(0xF1C0, 0xE07F), "IiF8F7", m68040},
{"fdabsx", two(0xF000, 0x485c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040},
{"fdabsx", two(0xF000, 0x005c), two(0xF1C0, 0xE07F), "IiFt", m68040},
{"facosb", two(0xF000, 0x581C), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
{"facosd", two(0xF000, 0x541C), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
@ -567,26 +563,24 @@ struct m68k_opcode m68k_opcodes[] =
{"faddx", two(0xF000, 0x0022), two(0xF1C0, 0xE07F), "IiF8F7", mfloat },
{"faddx", two(0xF000, 0x4822), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
/* {"faddx", two(0xF000, 0x0022), two(0xF1C0, 0xE07F), "IiFt", mfloat }, JF removed */
{"fsaddb", two(0xF000, 0x5832), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsaddd", two(0xF000, 0x5432), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsaddl", two(0xF000, 0x4032), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsaddp", two(0xF000, 0x4C32), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsadds", two(0xF000, 0x4432), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsaddw", two(0xF000, 0x5032), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsaddx", two(0xF000, 0x0032), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsaddx", two(0xF000, 0x4832), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fsaddx", two(0xF000, 0x0032), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF removed */
{"fdaddb", two(0xF000, 0x5836), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fdaddd", two(0xF000, 0x5436), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fdaddl", two(0xF000, 0x4036), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fdaddp", two(0xF000, 0x4C36), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fdadds", two(0xF000, 0x4436), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fdaddw", two(0xF000, 0x5036), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fdaddx", two(0xF000, 0x0036), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fdaddx", two(0xF000, 0x4836), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"faddx", two(0xF000, 0x0036), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF removed */
{"fsaddb", two(0xF000, 0x5862), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsaddd", two(0xF000, 0x5462), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsaddl", two(0xF000, 0x4062), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsaddp", two(0xF000, 0x4C62), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsadds", two(0xF000, 0x4462), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsaddw", two(0xF000, 0x5062), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsaddx", two(0xF000, 0x0062), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsaddx", two(0xF000, 0x4862), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fsaddx", two(0xF000, 0x0062), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF removed */
{"fdaddb", two(0xF000, 0x5866), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fdaddd", two(0xF000, 0x5466), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fdaddl", two(0xF000, 0x4066), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fdaddp", two(0xF000, 0x4C66), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fdadds", two(0xF000, 0x4466), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fdaddw", two(0xF000, 0x5066), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fdaddx", two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fdaddx", two(0xF000, 0x4866), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"faddx", two(0xF000, 0x0066), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF removed */
{"fasinb", two(0xF000, 0x580C), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
{"fasind", two(0xF000, 0x540C), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
@ -761,25 +755,25 @@ struct m68k_opcode m68k_opcodes[] =
{"fdivx", two(0xF000, 0x4820), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
/* {"fdivx", two(0xF000, 0x0020), two(0xF1C0, 0xE07F), "IiFt", mfloat }, JF */
{"fsdivb", two(0xF000, 0x5830), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsdivd", two(0xF000, 0x5430), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsdivl", two(0xF000, 0x4030), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsdivp", two(0xF000, 0x4C30), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsdivs", two(0xF000, 0x4430), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsdivw", two(0xF000, 0x5030), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsdivx", two(0xF000, 0x0030), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsdivx", two(0xF000, 0x4830), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fsdivx", two(0xF000, 0x0030), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fsdivb", two(0xF000, 0x5860), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsdivd", two(0xF000, 0x5460), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsdivl", two(0xF000, 0x4060), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsdivp", two(0xF000, 0x4C60), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsdivs", two(0xF000, 0x4460), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsdivw", two(0xF000, 0x5060), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsdivx", two(0xF000, 0x0060), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsdivx", two(0xF000, 0x4860), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fsdivx", two(0xF000, 0x0060), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fddivb", two(0xF000, 0x5834), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fddivd", two(0xF000, 0x5434), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fddivl", two(0xF000, 0x4034), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fddivp", two(0xF000, 0x4C34), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fddivs", two(0xF000, 0x4434), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fddivw", two(0xF000, 0x5034), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fddivx", two(0xF000, 0x0034), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fddivx", two(0xF000, 0x4834), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fddivx", two(0xF000, 0x0034), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fddivb", two(0xF000, 0x5864), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fddivd", two(0xF000, 0x5464), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fddivl", two(0xF000, 0x4064), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fddivp", two(0xF000, 0x4C64), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fddivs", two(0xF000, 0x4464), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fddivw", two(0xF000, 0x5064), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fddivx", two(0xF000, 0x0064), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fddivx", two(0xF000, 0x4864), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fddivx", two(0xF000, 0x0064), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fetoxb", two(0xF000, 0x5810), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
{"fetoxd", two(0xF000, 0x5410), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
@ -919,23 +913,23 @@ struct m68k_opcode m68k_opcodes[] =
{"fmovex", two(0xF000, 0x6800), two(0xF1C0, 0xFC7F), "IiF7@x", mfloat }, /* fmove from fp<n> to <ea> */
/* JF removed {"fmovex", two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiFt", mfloat }, / * fmove from <ea> to fp<n> */
{"fsmoveb", two(0xF000, 0x5800), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmoved", two(0xF000, 0x5400), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovel", two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmoves", two(0xF000, 0x4400), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovew", two(0xF000, 0x5000), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovex", two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiF8F7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovex", two(0xF000, 0x4800), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 }, /* fmove from <ea> to fp<n> */
/* JF removed {"fsmovex", two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiFt", m68040 }, / * fmove from <ea> to fp<n> */
{"fsmoveb", two(0xF000, 0x5840), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmoved", two(0xF000, 0x5440), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovel", two(0xF000, 0x4040), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmoves", two(0xF000, 0x4440), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovew", two(0xF000, 0x5040), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovex", two(0xF000, 0x0040), two(0xF1C0, 0xE07F), "IiF8F7", m68040 }, /* fmove from <ea> to fp<n> */
{"fsmovex", two(0xF000, 0x4840), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 }, /* fmove from <ea> to fp<n> */
/* JF removed {"fsmovex", two(0xF000, 0x0040), two(0xF1C0, 0xE07F), "IiFt", m68040 }, / * fmove from <ea> to fp<n> */
{"fdmoveb", two(0xF000, 0x5800), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmoved", two(0xF000, 0x5400), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovel", two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmoves", two(0xF000, 0x4400), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovew", two(0xF000, 0x5000), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovex", two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiF8F7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovex", two(0xF000, 0x4800), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 }, /* fmove from <ea> to fp<n> */
/* JF removed {"fdmovex", two(0xF000, 0x0000), two(0xF1C0, 0xE07F), "IiFt", m68040 }, / * fmove from <ea> to fp<n> */
{"fdmoveb", two(0xF000, 0x5844), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmoved", two(0xF000, 0x5444), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovel", two(0xF000, 0x4044), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmoves", two(0xF000, 0x4444), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovew", two(0xF000, 0x5044), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovex", two(0xF000, 0x0044), two(0xF1C0, 0xE07F), "IiF8F7", m68040 }, /* fmove from <ea> to fp<n> */
{"fdmovex", two(0xF000, 0x4844), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 }, /* fmove from <ea> to fp<n> */
/* JF removed {"fdmovex", two(0xF000, 0x0044), two(0xF1C0, 0xE07F), "IiFt", m68040 }, / * fmove from <ea> to fp<n> */
{"fmovecrx", two(0xF000, 0x5C00), two(0xF1FF, 0xFC00), "Ii#CF7", mfloat }, /* fmovecr.x #ccc, FPn */
{"fmovecr", two(0xF000, 0x5C00), two(0xF1FF, 0xFC00), "Ii#CF7", mfloat },
@ -1003,25 +997,25 @@ struct m68k_opcode m68k_opcodes[] =
{"fmulx", two(0xF000, 0x4823), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
/* {"fmulx", two(0xF000, 0x0023), two(0xF1C0, 0xE07F), "IiFt", mfloat }, JF */
{"fsmulb", two(0xF000, 0x5833), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsmuld", two(0xF000, 0x5433), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsmull", two(0xF000, 0x4033), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsmulp", two(0xF000, 0x4C33), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsmuls", two(0xF000, 0x4433), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsmulw", two(0xF000, 0x5033), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsmulx", two(0xF000, 0x0033), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsmulx", two(0xF000, 0x4833), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fsmulx", two(0xF000, 0x0033), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fsmulb", two(0xF000, 0x5863), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fsmuld", two(0xF000, 0x5463), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fsmull", two(0xF000, 0x4063), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fsmulp", two(0xF000, 0x4C63), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fsmuls", two(0xF000, 0x4463), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fsmulw", two(0xF000, 0x5063), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fsmulx", two(0xF000, 0x0063), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fsmulx", two(0xF000, 0x4863), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"fsmulx", two(0xF000, 0x0063), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fdmulb", two(0xF000, 0x5837), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fdmuld", two(0xF000, 0x5437), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fdmull", two(0xF000, 0x4037), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fdmulp", two(0xF000, 0x4C37), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fdmuls", two(0xF000, 0x4437), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fdmulw", two(0xF000, 0x5037), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fdmulx", two(0xF000, 0x0037), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fdmulx", two(0xF000, 0x4837), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"dfmulx", two(0xF000, 0x0037), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fdmulb", two(0xF000, 0x5867), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fdmuld", two(0xF000, 0x5467), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fdmull", two(0xF000, 0x4067), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fdmulp", two(0xF000, 0x4C67), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fdmuls", two(0xF000, 0x4467), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fdmulw", two(0xF000, 0x5067), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fdmulx", two(0xF000, 0x0067), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fdmulx", two(0xF000, 0x4867), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
/* {"dfmulx", two(0xF000, 0x0067), two(0xF1C0, 0xE07F), "IiFt", m68040 }, JF */
{"fnegb", two(0xF000, 0x581A), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
{"fnegd", two(0xF000, 0x541A), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
@ -1205,25 +1199,25 @@ struct m68k_opcode m68k_opcodes[] =
{"fsubx", two(0xF000, 0x4828), two(0xF1C0, 0xFC7F), "Ii;xF7", mfloat },
{"fsubx", two(0xF000, 0x0028), two(0xF1C0, 0xE07F), "IiFt", mfloat },
{"fssubb", two(0xF000, 0x5838), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fssubd", two(0xF000, 0x5438), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fssubl", two(0xF000, 0x4038), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fssubp", two(0xF000, 0x4C38), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fssubs", two(0xF000, 0x4438), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fssubw", two(0xF000, 0x5038), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fssubx", two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fssubx", two(0xF000, 0x4838), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
{"fssubx", two(0xF000, 0x0038), two(0xF1C0, 0xE07F), "IiFt", m68040 },
{"fssubb", two(0xF000, 0x5868), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fssubd", two(0xF000, 0x5468), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fssubl", two(0xF000, 0x4068), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fssubp", two(0xF000, 0x4C68), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fssubs", two(0xF000, 0x4468), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fssubw", two(0xF000, 0x5068), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fssubx", two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fssubx", two(0xF000, 0x4868), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
{"fssubx", two(0xF000, 0x0068), two(0xF1C0, 0xE07F), "IiFt", m68040 },
{"fdsubb", two(0xF000, 0x583c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fdsubd", two(0xF000, 0x543c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fdsubl", two(0xF000, 0x403c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fdsubp", two(0xF000, 0x4C3c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fdsubs", two(0xF000, 0x443c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fdsubw", two(0xF000, 0x503c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fdsubx", two(0xF000, 0x003c), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fdsubx", two(0xF000, 0x483c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
{"fdsubx", two(0xF000, 0x003c), two(0xF1C0, 0xE07F), "IiFt", m68040 },
{"fdsubb", two(0xF000, 0x586c), two(0xF1C0, 0xFC7F), "Ii;bF7", m68040 },
{"fdsubd", two(0xF000, 0x546c), two(0xF1C0, 0xFC7F), "Ii;FF7", m68040 },
{"fdsubl", two(0xF000, 0x406c), two(0xF1C0, 0xFC7F), "Ii;lF7", m68040 },
{"fdsubp", two(0xF000, 0x4C6c), two(0xF1C0, 0xFC7F), "Ii;pF7", m68040 },
{"fdsubs", two(0xF000, 0x446c), two(0xF1C0, 0xFC7F), "Ii;fF7", m68040 },
{"fdsubw", two(0xF000, 0x506c), two(0xF1C0, 0xFC7F), "Ii;wF7", m68040 },
{"fdsubx", two(0xF000, 0x006c), two(0xF1C0, 0xE07F), "IiF8F7", m68040 },
{"fdsubx", two(0xF000, 0x486c), two(0xF1C0, 0xFC7F), "Ii;xF7", m68040 },
{"fdsubx", two(0xF000, 0x006c), two(0xF1C0, 0xE07F), "IiFt", m68040 },
{"ftanb", two(0xF000, 0x580F), two(0xF1C0, 0xFC7F), "Ii;bF7", mfloat },
{"ftand", two(0xF000, 0x540F), two(0xF1C0, 0xFC7F), "Ii;FF7", mfloat },
@ -1591,7 +1585,7 @@ struct m68k_opcode m68k_opcodes[] =
#ifndef NO_68851
{"pflusha", two(0xf000, 0x2400), two(0xffff, 0xffff), "", m68030 | m68851 },
{"pflusha", one(0xf510), one(0xfff8), "", m68040 },
{"pflusha", one(0xf518), one(0xfff8), "", m68040 },
{"pflush", two(0xf000, 0x3010), two(0xffc0, 0xfe10), "T3T9", m68030 | m68851 },
{"pflush", two(0xf000, 0x3810), two(0xffc0, 0xfe10), "T3T9&s", m68030 | m68851 },
@ -1599,10 +1593,11 @@ struct m68k_opcode m68k_opcodes[] =
{"pflush", two(0xf000, 0x3808), two(0xffc0, 0xfe18), "D3T9&s", m68030 | m68851 },
{"pflush", two(0xf000, 0x3000), two(0xffc0, 0xfe1e), "f3T9", m68030 | m68851 },
{"pflush", two(0xf000, 0x3800), two(0xffc0, 0xfe1e), "f3T9&s", m68030 | m68851 },
{"pflush", one(0xf500), one(0xfff8), "As", m68040 },
{"pflushan", one(0xf518), one(0xfff8), "", m68040 },
{"pflushn", one(0xf508), one(0xfff8), "As", m68040 },
{"pflush", one(0xf508), one(0xfff8), "as", m68040 },
{"pflush", one(0xf508), one(0xfff8), "As", m68040 },
{"pflushan", one(0xf510), one(0xfff8), "", m68040 },
{"pflushn", one(0xf500), one(0xfff8), "as", m68040 },
{"pflushn", one(0xf500), one(0xfff8), "As", m68040 },
{"pflushr", two(0xf000, 0xa000), two(0xffc0, 0xffff), "|s", m68851 },
@ -1665,7 +1660,7 @@ struct m68k_opcode m68k_opcodes[] =
{"ptestr", two(0xf000, 0x8200), two(0xffc0, 0xe3fe), "f3&sQ8", m68030 | m68851 },
{"ptestr", two(0xf000, 0x8300), two(0xffc0, 0xe31e), "f3&sQ8A9", m68030 | m68851 },
{"ptestr", one(0xf568), one(0xfff8), "As", m68040 },
{"ptestr", one(0xf568), one(0xfff8), "as", m68040 },
{"ptestw", two(0xf000, 0x8010), two(0xffc0, 0xe3f0), "T3&sQ8", m68030 | m68851 },
{"ptestw", two(0xf000, 0x8110), two(0xffc0, 0xe310), "T3&sQ8A9", m68030 | m68851 },
@ -1674,7 +1669,7 @@ struct m68k_opcode m68k_opcodes[] =
{"ptestw", two(0xf000, 0x8000), two(0xffc0, 0xe3fe), "f3&sQ8", m68030 | m68851 },
{"ptestw", two(0xf000, 0x8100), two(0xffc0, 0xe31e), "f3&sQ8A9", m68030 | m68851 },
{"ptestw", one(0xf548), one(0xfff8), "As", m68040 },
{"ptestw", one(0xf548), one(0xfff8), "as", m68040 },
{"ptrapacw", two(0xf07a, 0x0007), two(0xffff, 0xffff), "#w", m68851 },
{"ptrapacl", two(0xf07b, 0x0007), two(0xffff, 0xffff), "#l", m68851 },

View File

@ -19,7 +19,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
static char rcsid[] = "$Id: read.c,v 1.5 1994/12/23 22:36:15 nate Exp $";
static char rcsid[] = "$Id: read.c,v 1.6 1995/05/30 04:46:31 rgrimes Exp $";
#endif
#define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will
@ -644,6 +644,7 @@ int arg;
as_bad("Alignment not a power of 2");
temp = i;
if (*input_line_pointer == ',') {
input_line_pointer ++;
temp_fill = get_absolute_expression();
@ -740,11 +741,7 @@ void
register int temp;
temp = get_absolute_expression();
#ifdef MANY_SEGMENTS
subseg_new (SEG_E1, (subsegT)temp);
#else
subseg_new (SEG_DATA, (subsegT)temp);
#endif
#ifdef OBJ_VMS
const_flag = 0;
@ -939,12 +936,7 @@ int needs_align; /* 1 if this was a ".bss" directive, which may require
align = 0;
as_warn("Alignment negative. 0 assumed.");
}
#ifdef MANY_SEGMENTS
#define SEG_BSS SEG_E2
record_alignment(SEG_E2, align);
#else
record_alignment(SEG_BSS, align);
#endif
} /* if needs align */
*p = 0;
@ -1022,15 +1014,8 @@ void s_lsym() {
}
input_line_pointer ++;
segment = expression(& exp);
if (segment != SEG_ABSOLUTE
#ifdef MANY_SEGMENTS
&& ! ( segment >= SEG_E0 && segment <= SEG_UNKNOWN)
#else
&& segment != SEG_DATA
&& segment != SEG_TEXT
&& segment != SEG_BSS
#endif
&& segment != SEG_REGISTER) {
if (segment != SEG_ABSOLUTE && !SEG_NORMAL(segment) &&
segment != SEG_REGISTER) {
as_bad("Bad expression: %s", segment_name(segment));
ignore_rest_of_line();
return;
@ -1274,6 +1259,28 @@ void s_type() {
demand_empty_rest_of_line();
} /* s_type() */
void s_weak() {
register char *name;
register int c;
register symbolS * symbolP;
do {
name = input_line_pointer;
c = get_symbol_end();
symbolP = symbol_find_or_make(name);
* input_line_pointer = c;
SKIP_WHITESPACE();
symbolP->sy_bind = BIND_WEAK;
if (c == ',') {
input_line_pointer++;
SKIP_WHITESPACE();
if (*input_line_pointer == '\n')
c='\n';
}
} while (c == ',');
demand_empty_rest_of_line();
} /* s_weak() */
void s_space() {
long temp_repeat;
register long temp_fill;
@ -1305,11 +1312,7 @@ void
register int temp;
temp = get_absolute_expression();
#ifdef MANY_SEGMENTS
subseg_new (SEG_E0, (subsegT)temp);
#else
subseg_new (SEG_TEXT, (subsegT)temp);
#endif
demand_empty_rest_of_line();
} /* s_text() */
@ -1429,16 +1432,8 @@ symbolS * symbolP;
break;
default:
#ifdef MANY_SEGMENTS
know(SEG_NORMAL(segment));
S_SET_SEGMENT(symbolP, segment);
#else
switch (segment) {
case SEG_DATA: S_SET_SEGMENT(symbolP, SEG_DATA); break;
case SEG_TEXT: S_SET_SEGMENT(symbolP, SEG_TEXT); break;
case SEG_BSS: S_SET_SEGMENT(symbolP, SEG_BSS); break;
default: as_fatal("failed sanity check.");
} /* switch on segment */
#endif
#if defined(OBJ_AOUT) | defined(OBJ_BOUT)
if (ext) {
S_SET_EXTERNAL(symbolP);

View File

@ -18,7 +18,7 @@
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* $Id: read.h,v 1.4 1994/12/23 22:36:17 nate Exp $
* $Id: read.h,v 1.5 1995/05/30 04:46:32 rgrimes Exp $
*/
@ -102,6 +102,7 @@ void s_size(void);
void s_space(void);
void s_text(void);
void s_type(void);
void s_weak(void);
#else /* not __STDC__ */
@ -143,6 +144,7 @@ void s_size();
void s_space();
void s_text();
void s_type();
void s_weak();
#endif /* not __STDC__ */

View File

@ -17,7 +17,7 @@
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* $Id: struc-symbol.h,v 1.4 1994/12/23 22:36:20 nate Exp $
* $Id: struc-symbol.h,v 1.5 1995/05/30 04:46:33 rgrimes Exp $
*/
@ -50,9 +50,13 @@ struct symbol /* our version of an nlist node */
void *sy_sizexp; /* (expressionS *) */
/* Auxiliary type information as given by the .type directive */
int sy_aux;
unsigned char sy_aux;
#define AUX_OBJECT 1
#define AUX_FUNC 2
unsigned char sy_bind;
#define BIND_LOCAL 0 /* currently not used */
#define BIND_GLOBAL 1 /* currently not used */
#define BIND_WEAK 2
};
typedef struct symbol symbolS;

View File

@ -22,7 +22,7 @@
*/
#ifndef lint
static char rcsid[] = "$Id: subsegs.c,v 1.3 1995/03/02 20:29:18 nate Exp $";
static char rcsid[] = "$Id: subsegs.c,v 1.4 1995/05/30 04:46:34 rgrimes Exp $";
#endif
#include "as.h"
@ -133,20 +133,24 @@ register int subseg;
{
now_seg = seg;
now_subseg = subseg;
know(SEG_NORMAL(seg));
#ifdef MANY_SEGMENTS
seg_fix_rootP = &segment_info[seg].fix_root;
seg_fix_tailP = &segment_info[seg].fix_tail;
#else
if (seg == SEG_DATA) {
switch (seg) {
case SEG_DATA:
seg_fix_rootP = &data_fix_root;
seg_fix_tailP = &data_fix_tail;
} else if (seg == SEG_BSS) {
seg_fix_rootP = &bss_fix_root;
seg_fix_tailP = &bss_fix_tail;
} else {
know (seg == SEG_TEXT);
break;
case SEG_TEXT:
seg_fix_rootP = &text_fix_root;
seg_fix_tailP = &text_fix_tail;
break;
case SEG_BSS:
seg_fix_rootP = &bss_fix_root;
seg_fix_tailP = &bss_fix_tail;
break;
}
#endif
}
@ -173,9 +177,7 @@ register segT seg; /* SEG_DATA or SEG_TEXT */
register subsegT subseg;
{
long tmp; /* JF for obstack alignment hacking */
#ifndef MANY_SEGMENTS
know(seg == SEG_DATA || seg == SEG_TEXT || seg == SEG_BSS);
#endif
know(SEG_NORMAL(seg));
if (seg != now_seg || subseg != now_subseg)
{ /* we just changed sub-segments */
register frchainS * frcP; /* crawl frchain chain */

View File

@ -19,7 +19,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
static char rcsid[] = "$Id: symbols.c,v 1.2 1993/11/03 00:52:22 paul Exp $";
static char rcsid[] = "$Id: symbols.c,v 1.3 1995/05/30 04:46:36 rgrimes Exp $";
#endif
#include "as.h"
@ -316,10 +316,6 @@ register char * sym_name; /* symbol name, as a cannonical string */
* on the sparc also depends on it.
*/
/* char New_Type = SEGMENT_TO_SYMBOL_TYPE((int) now_seg); */
#ifdef MANY_SEGMENTS
#define SEG_BSS SEG_E2
#define SEG_DATA SEG_E1
#endif
if (((!S_IS_DEBUG(symbolP) && !S_IS_DEFINED(symbolP) && S_IS_EXTERNAL(symbolP))
|| (S_GET_SEGMENT(symbolP) == SEG_BSS))

View File

@ -18,7 +18,7 @@
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* $Id: tc.h,v 1.1 1993/11/03 00:52:25 paul Exp $
* $Id: tc.h,v 1.2 1995/05/30 04:46:38 rgrimes Exp $
*/
@ -42,7 +42,7 @@ relax_typeS;
extern const relax_typeS md_relax_table[]; /* Define it in MACHINE.c */
extern int md_reloc_size; /* Size of a relocation record */
extern const int md_reloc_size; /* Size of a relocation record */
extern void (*md_emit_relocations)();

View File

@ -21,7 +21,7 @@
/* This thing should be set up to do byteordering correctly. But... */
#ifndef lint
static char rcsid[] = "$Id: write.c,v 1.6 1994/12/23 22:36:22 nate Exp $";
static char rcsid[] = "$Id: write.c,v 1.7 1995/05/30 04:46:40 rgrimes Exp $";
#endif
#include "as.h"
@ -726,11 +726,13 @@ segT segment; /* SEG_DATA or SEG_TEXT */
offset = lie->add->sy_frag->fr_address+ S_GET_VALUE(lie->add) + lie->addnum -
(lie->sub->sy_frag->fr_address+ S_GET_VALUE(lie->sub));
if (offset <= -32768 || offset >= 32767) {
#if 0
if (flagseen['K'])
as_warn(".word %s-%s+%ld didn't fit",
S_GET_NAME(lie->add),
S_GET_NAME(lie->sub),
lie->addnum);
#endif
lie->added=1;
if (fragP->fr_subtype == 0) {
fragP->fr_subtype++;
@ -1005,7 +1007,7 @@ segT this_segment_type; /* N_TYPE bits for segment. */
}
#endif /* TC_I960 */
#ifdef PIC
if (flagseen['k'] &&
if (picmode &&
S_IS_EXTERNAL(add_symbolP)) {
as_bad("Can't reduce difference of external symbols in PIC code");
}
@ -1080,7 +1082,7 @@ segT this_segment_type; /* N_TYPE bits for segment. */
* Do not fixup refs to global data
* even if defined here.
*/
if (!flagseen['k'] ||
if (!picmode ||
#ifdef TC_NS32K
fixP->fx_pcrel ||
#endif