This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MIPS header file question


I have a question about the MIPS sysdeps/mips/sys/asm.h file in glibc.
It includes a bunch of macros for various assembly language instructions
such as INT_ADD, LONG_ADD, PTR_ADD, etc.  There are also *_SUB macros and
some of these look very odd to me:

% grep _SUB sysdeps/mips/sys/asm.h | grep add
# define INT_SUB	add
# define INT_SUB	dadd
# define LONG_SUB	add
# define LONG_SUB	dadd
# define PTR_SUB	add
# define PTR_SUB	add
# define PTR_SUB	dadd

Why are some of the *_SUB macros defined to do an add instruction?
There are other *_SUB macros (*_SUBU, *_SUBIU, *SUBI) that are defined
to do sub[iu] instructions.  Is there any reason for this or is this
just a cut and paste error that has survived for a decade or so.
It would not surprise me to learn that no one uses these macros.

Steve Ellcey
sellcey@mips.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]