diff --git a/build-devkit.sh b/build-devkit.sh
index 1c7a207..834f8d6 100644
--- a/build-devkit.sh
+++ b/build-devkit.sh
@@ -29,12 +29,14 @@ LIBMIRKO_VER=0.9.7
MAXMOD_VER=1.0.6
FILESYSTEM_VER=0.9.9
LIBFAT_VER=1.0.10
+PSPSDK_VER=20120225
LIBOGC="libogc-src-$LIBOGC_VER.tar.bz2"
LIBGBA="libgba-src-$LIBGBA_VER.tar.bz2"
LIBNDS="libnds-src-$LIBNDS_VER.tar.bz2"
DSWIFI="dswifi-src-$DSWIFI_VER.tar.bz2"
MAXMOD="maxmod-src-$MAXMOD_VER.tar.bz2"
+PSPSDK="pspsdk-$PSPSDK_VER.tar.bz2"
FILESYSTEM="libfilesystem-src-$FILESYSTEM_VER.tar.bz2"
LIBFAT="libfat-src-$LIBFAT_VER.tar.bz2"
DEFAULT_ARM7="default_arm7-src-$DEFAULT_ARM7_VER.tar.bz2"
@@ -48,6 +50,7 @@ DSWIFI_URL="$DEVKITPRO_URL/$DSWIFI"
LIBMIRKO_URL="$DEVKITPRO_URL/$LIBMIRKO"
DEFAULT_ARM7_URL="$DEVKITPRO_URL/$DEFAULT_ARM7"
MAXMOD_URL="$DEVKITPRO_URL/$MAXMOD"
+PSPSDK_URL="$DEVKITPRO_URL/$PSPSDK"
FILESYSTEM_URL="$DEVKITPRO_URL/$FILESYSTEM"
LIBFAT_URL="$DEVKITPRO_URL/$LIBFAT"
@@ -121,10 +124,10 @@ case "$VERSION" in
toolchain=DEVKITPPC
;;
"3" )
- GCC_VER=4.3.6
- BINUTILS_VER=2.16.1
- NEWLIB_VER=1.19.0
- GDB_VER=6.8
+ GCC_VER=4.6.2
+ BINUTILS_VER=2.22
+ NEWLIB_VER=1.20.0
+ GDB_VER=7.4
basedir='dkpsp'
package=devkitPSP
builddir=psp
@@ -344,6 +347,16 @@ then
fi
fi
+ if [ $VERSION -eq 3 ]
+ then
+ if [ ! -f $SRCDIR/$PSPSDK ]
+ then
+ echo "Error: $PSPSDK not found in $SRCDIR"
+ exit 1
+ else
+ FOUND=1
+ fi
+ fi
done
@@ -384,6 +397,11 @@ else
$FETCH $MAXMOD_URL || { echo "Error: Failed to download "$MAXMOD; exit 1; }
$FETCH $FILESYSTEM_URL || { echo "Error: Failed to download "$FILESYSTEM; exit 1; }
fi
+ if [ $VERSION -eq 3 ]
+ then
+ $FETCH $PSPSDK_URL || { echo "Error: Failed to download "$PSPSDK; exit 1; }
+ fi
+
SRCDIR=`pwd`
touch downloaded_sources
fi
@@ -399,6 +417,7 @@ LIBFAT_SRCDIR="libfat-$LIBFAT_VER"
DSWIFI_SRCDIR="dswifi-$DSWIFI_VER"
LIBNDS_SRCDIR="libnds-$LIBNDS_VER"
MAXMOD_SRCDIR="maxmod-$MAXMOD_VER"
+PSPSDK_SRCDIR="pspsdk-$PSPSDK_VER"
FILESYSTEM_SRCDIR="filesystem-$FILESYSTEM_VER"
LIBMIRKO_SRCDIR="libmirko-$LIBMIRKO_VER"
DEFAULT_ARM7_SRCDIR="default_arm7-$DEFAULT_ARM7_VER"
@@ -529,6 +548,12 @@ then
fi
+ if [ $VERSION -eq 3 ]
+ then
+ echo "Extracting $PSPSDK"
+ mkdir -p $PSPSDK_SRCDIR
+ bzip2 -cd $SRCDIR/$PSPSDK | tar -xf - -C $PSPSDK_SRCDIR || { echo "Error extracting "$PSPSDK; exit 1; }
+ fi
touch extracted_archives
fi
diff --git a/dkpsp/patches/binutils-2.16.1.patch b/dkpsp/patches/binutils-2.16.1.patch
deleted file mode 100644
index 35fd3dd..0000000
--- a/dkpsp/patches/binutils-2.16.1.patch
+++ /dev/null
@@ -1,4544 +0,0 @@
-diff -burN binutils-2.16.1/bfd/archures.c binutils-psp/bfd/archures.c
---- binutils-2.16.1/bfd/archures.c 2005-01-17 14:08:03.000000000 +0000
-+++ binutils-psp/bfd/archures.c 2006-01-10 23:31:50.000000000 +0000
-@@ -155,6 +155,7 @@
- .#define bfd_mach_mips16 16
- .#define bfd_mach_mips5 5
- .#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *}
-+.#define bfd_mach_mips_allegrex 10111431 {* octal 'AL', 31 *}
- .#define bfd_mach_mipsisa32 32
- .#define bfd_mach_mipsisa32r2 33
- .#define bfd_mach_mipsisa64 64
-diff -burN binutils-2.16.1/bfd/bfd-in2.h binutils-psp/bfd/bfd-in2.h
---- binutils-2.16.1/bfd/bfd-in2.h 2005-03-02 21:23:20.000000000 +0000
-+++ binutils-psp/bfd/bfd-in2.h 2006-01-10 23:31:50.000000000 +0000
-@@ -1600,6 +1600,7 @@
- #define bfd_mach_mips16 16
- #define bfd_mach_mips5 5
- #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
-+#define bfd_mach_mips_allegrex 10111431 /* octal 'AL', 31 */
- #define bfd_mach_mipsisa32 32
- #define bfd_mach_mipsisa32r2 33
- #define bfd_mach_mipsisa64 64
-diff -burN binutils-2.16.1/bfd/cpu-mips.c binutils-psp/bfd/cpu-mips.c
---- binutils-2.16.1/bfd/cpu-mips.c 2005-03-03 11:40:58.000000000 +0000
-+++ binutils-psp/bfd/cpu-mips.c 2006-01-10 23:31:50.000000000 +0000
-@@ -86,6 +86,7 @@
- I_mipsisa64,
- I_mipsisa64r2,
- I_sb1,
-+ I_allegrex,
- };
-
- #define NN(index) (&arch_info_struct[(index) + 1])
-@@ -118,7 +119,8 @@
- N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)),
- N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)),
- N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)),
-- N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, 0),
-+ N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, NN(I_sb1)),
-+ N (32, 32, bfd_mach_mips_allegrex, "mips:allegrex", FALSE, 0),
- };
-
- /* The default architecture is mips:3000, but with a machine number of
-diff -burN binutils-2.16.1/bfd/elfxx-mips.c binutils-psp/bfd/elfxx-mips.c
---- binutils-2.16.1/bfd/elfxx-mips.c 2005-05-28 22:58:29.000000000 +0100
-+++ binutils-psp/bfd/elfxx-mips.c 2006-01-10 23:31:51.000000000 +0000
-@@ -4669,6 +4669,9 @@
- case E_MIPS_MACH_SB1:
- return bfd_mach_mips_sb1;
-
-+ case E_MIPS_MACH_ALLEGREX:
-+ return bfd_mach_mips_allegrex;
-+
- default:
- switch (flags & EF_MIPS_ARCH)
- {
-@@ -7941,6 +7944,10 @@
- val = E_MIPS_ARCH_64 | E_MIPS_MACH_SB1;
- break;
-
-+ case bfd_mach_mips_allegrex:
-+ val = E_MIPS_ARCH_2 | E_MIPS_MACH_ALLEGREX;
-+ break;
-+
- case bfd_mach_mipsisa32:
- val = E_MIPS_ARCH_32;
- break;
-@@ -8422,6 +8429,8 @@
- if (dynobj != NULL && force_local && h->root.type != STT_TLS)
- {
- got = mips_elf_got_section (dynobj, FALSE);
-+ if (got)
-+ {
- g = mips_elf_section_data (got)->u.got_info;
-
- if (g->next)
-@@ -8472,6 +8481,7 @@
- g->global_gotno--;
- }
- }
-+ }
-
- _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
- }
-@@ -9641,6 +9651,7 @@
- /* MIPS II extensions. */
- { bfd_mach_mips4000, bfd_mach_mips6000 },
- { bfd_mach_mipsisa32, bfd_mach_mips6000 },
-+ { bfd_mach_mips_allegrex, bfd_mach_mips6000 },
-
- /* MIPS I extensions. */
- { bfd_mach_mips6000, bfd_mach_mips3000 },
-diff -burN binutils-2.16.1/bfd/Makefile.am binutils-psp/bfd/Makefile.am
---- binutils-2.16.1/bfd/Makefile.am 2005-06-12 19:58:52.000000000 +0100
-+++ binutils-psp/bfd/Makefile.am 2006-01-10 23:31:50.000000000 +0000
-@@ -3,7 +3,7 @@
- AUTOMAKE_OPTIONS = 1.9 cygnus
-
- # Uncomment the following line when doing a release.
--RELEASE=y
-+#RELEASE=y
-
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
-diff -burN binutils-2.16.1/bfd/Makefile.in binutils-psp/bfd/Makefile.in
---- binutils-2.16.1/bfd/Makefile.in 2005-06-12 19:58:55.000000000 +0100
-+++ binutils-psp/bfd/Makefile.in 2006-01-10 23:31:50.000000000 +0000
-@@ -250,7 +250,7 @@
- AUTOMAKE_OPTIONS = 1.9 cygnus
-
- # Uncomment the following line when doing a release.
--RELEASE=y
-+#RELEASE=y
- INCDIR = $(srcdir)/../include
- CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
- MKDEP = gcc -MM
-diff -burN binutils-2.16.1/bfd/version.h binutils-psp/bfd/version.h
---- binutils-2.16.1/bfd/version.h 2005-06-12 18:37:59.000000000 +0100
-+++ binutils-psp/bfd/version.h 2006-01-10 23:31:51.000000000 +0000
-@@ -1,3 +1,3 @@
--#define BFD_VERSION_DATE 20050612
-+#define BFD_VERSION_DATE (PSPDEV 20060116)
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING @bfd_version_string@
-diff -burN binutils-2.16.1/binutils/readelf.c binutils-psp/binutils/readelf.c
---- binutils-2.16.1/binutils/readelf.c 2005-04-20 19:43:36.000000000 +0100
-+++ binutils-psp/binutils/readelf.c 2006-01-10 23:31:51.000000000 +0000
-@@ -2043,6 +2043,7 @@
- case E_MIPS_MACH_5500: strcat (buf, ", 5500"); break;
- case E_MIPS_MACH_SB1: strcat (buf, ", sb1"); break;
- case E_MIPS_MACH_9000: strcat (buf, ", 9000"); break;
-+ case E_MIPS_MACH_ALLEGREX: strcat (buf, ", allegrex"); break;
- case 0:
- /* We simply ignore the field in this case to avoid confusion:
- MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
-diff -burN binutils-2.16.1/config.sub binutils-psp/config.sub
---- binutils-2.16.1/config.sub 2005-01-19 00:34:56.000000000 +0000
-+++ binutils-psp/config.sub 2006-01-10 23:31:51.000000000 +0000
-@@ -253,6 +253,7 @@
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
-+ | mipsallegrex | mipsallegrexel \
- | mn10200 | mn10300 \
- | msp430 \
- | ns16k | ns32k \
-@@ -326,6 +327,7 @@
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
-+ | mipsallegrex-* | mipsallegrexel-* \
- | mmix-* \
- | msp430-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
-@@ -665,6 +667,10 @@
- basic_machine=m68k-atari
- os=-mint
- ;;
-+ psp)
-+ basic_machine=mipsallegrexel-psp
-+ os=-elf
-+ ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
-diff -burN binutils-2.16.1/gas/config/tc-mips.c binutils-psp/gas/config/tc-mips.c
---- binutils-2.16.1/gas/config/tc-mips.c 2005-06-12 19:07:03.000000000 +0100
-+++ binutils-psp/gas/config/tc-mips.c 2006-01-16 20:05:23.000000000 +0000
-@@ -92,6 +92,32 @@
-
- #define ZERO 0
- #define AT 1
-+#define V0 2
-+#define V1 3
-+#define A0 4
-+#define A1 5
-+#define A2 6
-+#define A3 7
-+#define T0 8
-+#define T1 9
-+#define T2 10
-+#define T3 11
-+#define T4 12
-+#define T5 13
-+#define T6 14
-+#define T7 15
-+#define S0 16
-+#define S1 17
-+#define S2 18
-+#define S3 19
-+#define S4 20
-+#define S5 21
-+#define S6 22
-+#define S7 23
-+#define T8 24
-+#define T9 25
-+#define K0 26
-+#define K1 27
- #define TREG 24
- #define PIC_CALL_REG 25
- #define KT0 26
-@@ -365,11 +391,15 @@
- #define CPU_HAS_MDMX(cpu) (FALSE \
- )
-
-+/* True if the given CPU belongs to the Allegrex family. */
-+#define CPU_IS_ALLEGREX(CPU) ((CPU) == CPU_ALLEGREX \
-+ )
-+
- /* True if CPU has a dror instruction. */
- #define CPU_HAS_DROR(CPU) ((CPU) == CPU_VR5400 || (CPU) == CPU_VR5500)
-
- /* True if CPU has a ror instruction. */
--#define CPU_HAS_ROR(CPU) CPU_HAS_DROR (CPU)
-+#define CPU_HAS_ROR(CPU) CPU_HAS_DROR (CPU) || CPU_IS_ALLEGREX (CPU)
-
- /* True if mflo and mfhi can be immediately followed by instructions
- which write to the HI and LO registers.
-@@ -393,6 +423,7 @@
- || mips_opts.arch == CPU_R12000 \
- || mips_opts.arch == CPU_RM7000 \
- || mips_opts.arch == CPU_VR5500 \
-+ || mips_opts.arch == CPU_ALLEGREX \
- )
-
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -1142,6 +1173,8 @@
- static expressionS imm_expr;
- static expressionS imm2_expr;
- static expressionS offset_expr;
-+static expressionS vimm_expr[4];
-+static expressionS voffset_expr[4];
-
- /* Relocs associated with imm_expr and offset_expr. */
-
-@@ -1150,6 +1183,15 @@
- static bfd_reloc_code_real_type offset_reloc[3]
- = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
-
-+/* set by vfpu code for prefix instructions */
-+
-+static bfd_boolean vfpu_dprefix;
-+static char vfpu_dprefix_str[64];
-+static bfd_boolean vfpu_sprefix;
-+static char vfpu_sprefix_str[64];
-+static bfd_boolean vfpu_tprefix;
-+static char vfpu_tprefix_str[64];
-+
- /* These are set by mips16_ip if an explicit extension is used. */
-
- static bfd_boolean mips16_small, mips16_ext;
-@@ -1641,6 +1683,62 @@
- return;
- }
-
-+ /* If we've generated operands for a VFPU prefix instruction then we need
-+ to assemble and append the prefix instruction before emitting the
-+ instruction it prefixes. Note that in mips_ip prefix operands do not
-+ cause any side effects with imm_expr or offset_expr. If they did
-+ we'd have to save and restore them here. */
-+ if (CPU_IS_ALLEGREX (mips_opts.arch) && ((vfpu_dprefix || vfpu_sprefix || vfpu_tprefix)))
-+ {
-+
-+ if (mips_opts.noreorder
-+ && ( history[0].insn_mo->pinfo & (INSN_UNCOND_BRANCH_DELAY
-+ | INSN_COND_BRANCH_DELAY
-+ | INSN_COND_BRANCH_LIKELY)))
-+ {
-+ as_bad (_("instruction with prefix cannot be used in branch delay slot"));
-+ }
-+
-+ if (vfpu_dprefix)
-+ {
-+ struct mips_cl_insn prefix;
-+ bfd_reloc_code_real_type unused_reloc[3]
-+ = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
-+ char buf[256];
-+
-+ sprintf (buf, "vpfxd %s", vfpu_dprefix_str);
-+ mips_ip (buf, &prefix);
-+ append_insn (&prefix, NULL, unused_reloc);
-+ vfpu_dprefix = FALSE;
-+ }
-+
-+ if (vfpu_sprefix)
-+ {
-+ struct mips_cl_insn prefix;
-+ bfd_reloc_code_real_type unused_reloc[3]
-+ = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
-+ char buf[256];
-+
-+ sprintf (buf, "vpfxs %s", vfpu_sprefix_str);
-+ mips_ip (buf, &prefix);
-+ append_insn ( &prefix, NULL, unused_reloc);
-+ vfpu_sprefix = FALSE;
-+ }
-+
-+ if (vfpu_tprefix)
-+ {
-+ struct mips_cl_insn prefix;
-+ bfd_reloc_code_real_type unused_reloc[3]
-+ = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
-+ char buf[256];
-+
-+ sprintf (buf, "vpfxt %s", vfpu_tprefix_str);
-+ mips_ip (buf, &prefix);
-+ append_insn (&prefix, NULL, unused_reloc);
-+ vfpu_tprefix = FALSE;
-+ }
-+ }
-+
- if (insn.insn_mo->pinfo == INSN_MACRO)
- {
- macro_start ();
-@@ -3128,6 +3226,55 @@
- insn.insn_opcode |= va_arg (args, unsigned long);
- continue;
-
-+ /* VFPU fields */
-+ case '?':
-+ switch (*fmt++)
-+ {
-+ case 'o':
-+ *r = (bfd_reloc_code_real_type) va_arg (args, int);
-+ assert (*r == BFD_RELOC_GPREL16
-+ || *r == BFD_RELOC_MIPS_LITERAL
-+ || *r == BFD_RELOC_MIPS_HIGHER
-+ || *r == BFD_RELOC_HI16_S
-+ || *r == BFD_RELOC_LO16
-+ || *r == BFD_RELOC_MIPS_GOT16
-+ || *r == BFD_RELOC_MIPS_CALL16
-+ || *r == BFD_RELOC_MIPS_GOT_DISP
-+ || *r == BFD_RELOC_MIPS_GOT_PAGE
-+ || *r == BFD_RELOC_MIPS_GOT_OFST
-+ || *r == BFD_RELOC_MIPS_GOT_LO16
-+ || *r == BFD_RELOC_MIPS_CALL_LO16);
-+ break;
-+ case 'd':
-+ insn.insn_opcode |= va_arg (args, int) << VF_SH_VD;
-+ fmt += 2;
-+ break;
-+ case 's':
-+ insn.insn_opcode |= va_arg (args, int) << VF_SH_VS;
-+ fmt += 2;
-+ break;
-+ case 'm':
-+ {
-+ int vtreg = va_arg (args, int);
-+ insn.insn_opcode |= (vtreg & VF_MASK_VML) << VF_SH_VML;
-+ insn.insn_opcode |= ((vtreg >> 5) & VF_MASK_VMH) << VF_SH_VMH;
-+ fmt += 2;
-+ }
-+ break;
-+ case 'n':
-+ {
-+ int vtreg = va_arg (args, int);
-+ insn.insn_opcode |= (vtreg & VF_MASK_VNL) << VF_SH_VNL;
-+ insn.insn_opcode |= ((vtreg >> 5) & VF_MASK_VNH) << VF_SH_VNH;
-+ fmt += 2;
-+ }
-+ break;
-+ case 'e':
-+ insn.insn_opcode |= va_arg (args, int) << VF_SH_MCOND;
-+ break;
-+ }
-+ continue;
-+
- default:
- internalError ();
- }
-@@ -4103,6 +4250,7 @@
- macro (struct mips_cl_insn *ip)
- {
- register int treg, sreg, dreg, breg;
-+ int vsreg, vtreg, vdreg, vmreg, vwb;
- int tempreg;
- int mask;
- int used_at = 0;
-@@ -4128,6 +4276,13 @@
- sreg = breg = (ip->insn_opcode >> 21) & 0x1f;
- mask = ip->insn_mo->mask;
-
-+ vmreg = ((ip->insn_opcode >> 16) & 0x1f)
-+ | ((ip->insn_opcode << 5) & 0x60);
-+ vtreg = (ip->insn_opcode >> 16) & 0x7f;
-+ vsreg = (ip->insn_opcode >> 8) & 0x7f;
-+ vdreg = (ip->insn_opcode >> 0) & 0x7f;
-+ vwb = (ip->insn_opcode >> 1) & 0x1;
-+
- expr1.X_op = O_constant;
- expr1.X_op_symbol = NULL;
- expr1.X_add_symbol = NULL;
-@@ -5654,6 +5809,26 @@
- /* Itbl support may require additional care here. */
- coproc = 1;
- goto ld;
-+ case M_LV_S_AB:
-+ s = "lv.s";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto ld;
-+ case M_LV_Q_AB:
-+ s = "lv.q";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto ld;
-+ case M_LVL_Q_AB:
-+ s = "lvl.q";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto ld;
-+ case M_LVR_Q_AB:
-+ s = "lvr.q";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto ld;
- case M_LWL_AB:
- s = "lwl";
- lr = 1;
-@@ -5738,6 +5913,29 @@
- /* Itbl support may require additional care here. */
- coproc = 1;
- goto st;
-+ case M_SV_S_AB:
-+ s = "sv.s";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto st;
-+ case M_SV_Q_AB:
-+ if (vwb)
-+ s = "vwb.q";
-+ else
-+ s = "sv.q";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto st;
-+ case M_SVL_Q_AB:
-+ s = "svl.q";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto st;
-+ case M_SVR_Q_AB:
-+ s = "svr.q";
-+ /* Itbl support may require additional care here. */
-+ coproc = 1;
-+ goto st;
- case M_SWL_AB:
- s = "swl";
- goto st;
-@@ -5787,6 +5985,22 @@
- || mask == M_L_DAB
- || mask == M_S_DAB)
- fmt = "T,o(b)";
-+ else if (mask == M_LV_S_AB
-+ || mask == M_SV_S_AB)
-+ {
-+ fmt = "?m0x,?o(b)";
-+ treg = vmreg;
-+ }
-+ else if (mask == M_LV_Q_AB
-+ || mask == M_SV_Q_AB
-+ || mask == M_LVL_Q_AB
-+ || mask == M_LVR_Q_AB
-+ || mask == M_SVL_Q_AB
-+ || mask == M_SVR_Q_AB)
-+ {
-+ fmt = "?n3x,?o(b)";
-+ treg = vmreg;
-+ }
- else if (coproc)
- fmt = "E,o(b)";
- else
-@@ -6150,6 +6364,138 @@
- break;
- }
-
-+ case M_LVI_S_SS:
-+ case M_LVI_P_SS:
-+ case M_LVI_T_SS:
-+ case M_LVI_Q_SS:
-+ {
-+ int mtx = (vtreg >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
-+ int idx = (vtreg >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
-+ int fsl = 0;
-+ int rxc = 0;
-+ int vtreg_s = 0;
-+ int vnum = 0;
-+ int vat = 0;
-+ int i;
-+
-+ switch (mask)
-+ {
-+ case M_LVI_S_SS:
-+ vnum = 1;
-+ fsl = (vtreg >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
-+ rxc = 0;
-+ break;
-+ case M_LVI_P_SS:
-+ vnum = 2;
-+ fsl = ((vtreg >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL) << 1;
-+ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
-+ break;
-+ case M_LVI_T_SS:
-+ vnum = 3;
-+ fsl = (vtreg >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL;
-+ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
-+ break;
-+ case M_LVI_Q_SS:
-+ vnum = 4;
-+ fsl = 0;
-+ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
-+ break;
-+ }
-+ if (rxc)
-+ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_FSL)
-+ | (fsl << VF_SH_MR_IDX);
-+ else
-+ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_IDX)
-+ | (fsl << VF_SH_MR_FSL);
-+
-+ for (i = 0; i < vnum; i++) {
-+ imm_expr = vimm_expr[i];
-+ offset_expr = voffset_expr[i];
-+
-+ if (imm_expr.X_op == O_constant)
-+ {
-+ load_register (AT, &imm_expr, 0);
-+ macro_build ((expressionS *) NULL,
-+ "mtv", "t,?d0z", AT, vtreg_s);
-+ vat = 1;
-+ }
-+ else
-+ {
-+ assert (offset_expr.X_op == O_symbol
-+ && strcmp (segment_name (S_GET_SEGMENT
-+ (offset_expr.X_add_symbol)),
-+ ".lit4") == 0
-+ && offset_expr.X_add_number == 0);
-+ macro_build (&offset_expr,
-+ "lv.s", "?m0x,?o(b)", vtreg_s,
-+ (int) BFD_RELOC_MIPS_LITERAL, mips_gp_register);
-+ }
-+
-+ if (rxc)
-+ vtreg_s += (1 << VF_SH_MR_IDX);
-+ else
-+ vtreg_s += (1 << VF_SH_MR_FSL);
-+ }
-+
-+ if (vat)
-+ break;
-+ else
-+ return;
-+ }
-+
-+ case M_LVHI_S_SS:
-+ case M_LVHI_P_SS:
-+ {
-+ int mtx = (vtreg >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
-+ int idx = (vtreg >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
-+ int fsl = 0;
-+ int rxc = 0;
-+ int vtreg_s = 0;
-+ int vnum = 0;
-+ int i;
-+ unsigned int f16v;
-+ char f16v_str[16];
-+
-+ switch (mask)
-+ {
-+ case M_LVHI_S_SS:
-+ vnum = 2;
-+ fsl = (vtreg >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
-+ rxc = 0;
-+ break;
-+ case M_LVHI_P_SS:
-+ vnum = 4;
-+ fsl = ((vtreg >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL) << 1;
-+ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
-+ break;
-+ }
-+ if (rxc)
-+ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_FSL)
-+ | (fsl << VF_SH_MR_IDX);
-+ else
-+ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_IDX)
-+ | (fsl << VF_SH_MR_FSL);
-+
-+
-+ for (i = 0; i < vnum; i += 2) {
-+ f16v = ((vimm_expr[i + 1].X_add_number & 0xffff) << 16)
-+ | (vimm_expr[i].X_add_number & 0xffff);
-+ sprintf(f16v_str, "0x%08x", f16v);
-+ my_getExpression (&imm_expr, f16v_str);
-+
-+ load_register (AT, &imm_expr, 0);
-+ macro_build ((expressionS *) NULL,
-+ "mtv", "t,?d0z", AT, vtreg_s);
-+
-+ if (rxc)
-+ vtreg_s += (1 << VF_SH_MR_IDX);
-+ else
-+ vtreg_s += (1 << VF_SH_MR_FSL);
-+ }
-+
-+ break;
-+ }
-+
- case M_LI_D:
- /* Check if we have a constant in IMM_EXPR. If the GPRs are 64 bits
- wide, IMM_EXPR is the entire value. Otherwise IMM_EXPR is the high
-@@ -6672,6 +7018,27 @@
- move_register (dreg, sreg);
- break;
-
-+ case M_VCMOV_S:
-+ s = "vcmovt.s";
-+ fmt = "?d0d,?s0s,?e";
-+ goto vcmov;
-+ case M_VCMOV_P:
-+ s = "vcmovt.p";
-+ fmt = "?d1d,?s1s,?e";
-+ goto vcmov;
-+ case M_VCMOV_T:
-+ s = "vcmovt.t";
-+ fmt = "?d2d,?s2s,?e";
-+ goto vcmov;
-+ case M_VCMOV_Q:
-+ s = "vcmovt.q";
-+ fmt = "?d3d,?s3s,?e";
-+ vcmov:
-+ macro_build ((expressionS *) NULL, s, fmt,
-+ vdreg, vsreg,
-+ (ip->insn_opcode >> VF_SH_MCOND) & VF_MASK_MCOND);
-+ return;
-+
- #ifdef LOSING_COMPILER
- default:
- /* Try and see if this is a new itbl instruction.
-@@ -7348,6 +7715,39 @@
- move_register (treg, tempreg);
- break;
-
-+ case M_ULV_S:
-+ if (mips_opts.arch == CPU_ALLEGREX)
-+ as_bad (_("opcode not supported on this processor"));
-+ off = 3;
-+ if (offset_expr.X_add_number >= 0x8000 - off)
-+ as_bad (_("operand overflow"));
-+ if (! target_big_endian)
-+ offset_expr.X_add_number += off;
-+ macro_build (&offset_expr, "lwl", "t,o(b)",
-+ AT, (int) BFD_RELOC_LO16, breg);
-+ if (! target_big_endian)
-+ offset_expr.X_add_number -= off;
-+ else
-+ offset_expr.X_add_number += off;
-+ macro_build (&offset_expr, "lwr", "t,o(b)",
-+ AT, (int) BFD_RELOC_LO16, breg);
-+
-+ macro_build ((expressionS *) NULL, "mtv", "t,?d0z",
-+ AT, vmreg);
-+ break;
-+
-+ case M_ULV_Q:
-+ off = 12;
-+ if (offset_expr.X_add_number >= 0x8000 - off)
-+ as_bad (_("operand overflow"));
-+ offset_expr.X_add_number += off;
-+ macro_build (&offset_expr, "lvl.q", "?n3x,?o(b)",
-+ vmreg, (int) BFD_RELOC_LO16, breg);
-+ offset_expr.X_add_number -= off;
-+ macro_build (&offset_expr, "lvr.q", "?n3x,?o(b)",
-+ vmreg, (int) BFD_RELOC_LO16, breg);
-+ return;
-+
- case M_ULD_A:
- s = "ldl";
- s2 = "ldr";
-@@ -7430,6 +7830,55 @@
- macro_build (&offset_expr, s2, "t,o(b)", treg, BFD_RELOC_LO16, breg);
- break;
-
-+ case M_USV_S:
-+ off = 3;
-+ if (offset_expr.X_add_number >= 0x8000 - off)
-+ as_bad (_("operand overflow"));
-+ macro_build ((expressionS *) NULL, "mfv", "t,?d0z",
-+ AT, vmreg);
-+ if (mips_opts.arch != CPU_ALLEGREX)
-+ {
-+ if (! target_big_endian)
-+ offset_expr.X_add_number += off;
-+ macro_build (&offset_expr, "swl", "t,o(b)",
-+ AT, (int) BFD_RELOC_LO16, breg);
-+ if (! target_big_endian)
-+ offset_expr.X_add_number -= off;
-+ else
-+ offset_expr.X_add_number += off;
-+ macro_build (&offset_expr, "swr", "t,o(b)",
-+ AT, (int) BFD_RELOC_LO16, breg);
-+ }
-+ else
-+ {
-+ if (target_big_endian)
-+ offset_expr.X_add_number += off;
-+ while (off-- >= 0)
-+ {
-+ macro_build (&offset_expr, "sb", "t,o(b)",
-+ AT, (int) BFD_RELOC_LO16, breg);
-+ macro_build ((expressionS *) NULL, "ror",
-+ "d,w,<", AT, AT, 8);
-+ if (target_big_endian)
-+ --offset_expr.X_add_number;
-+ else
-+ ++offset_expr.X_add_number;
-+ }
-+ }
-+ break;
-+
-+ case M_USV_Q:
-+ off = 12;
-+ if (offset_expr.X_add_number >= 0x8000 - off)
-+ as_bad (_("operand overflow"));
-+ offset_expr.X_add_number += off;
-+ macro_build (&offset_expr, "svl.q", "?n3x,?o(b)",
-+ vmreg, (int) BFD_RELOC_LO16, breg);
-+ offset_expr.X_add_number -= off;
-+ macro_build (&offset_expr, "svr.q", "?n3x,?o(b)",
-+ vmreg, (int) BFD_RELOC_LO16, breg);
-+ return;
-+
- case M_USD_A:
- s = "sdl";
- s2 = "sdr";
-@@ -7817,6 +8266,103 @@
- case '%': USE_BITS (OP_MASK_VECALIGN, OP_SH_VECALIGN); break;
- case '[': break;
- case ']': break;
-+
-+ /* VFPU fields */
-+ case '?':
-+ switch (c = *p++)
-+ {
-+ case '[': break;
-+ case ']': break;
-+ case 'y':
-+ {
-+ if ((*p != '0') && (*p != '1') && (*p != '2') && (*p != '3'))
-+ {
-+ as_bad (_("internal: bad mips opcode : %s %s"),
-+ opc->name, opc->args);
-+ return 0;
-+ }
-+ p++;
-+ }
-+ break;
-+
-+ case 'o': USE_BITS (VF_MASK_OFFSET, VF_SH_OFFSET); break;
-+
-+ case 's':
-+ case 't':
-+ case 'd':
-+ case 'v':
-+ case 'x':
-+ case 'm':
-+ case 'n':
-+ {
-+ if ((*p != '0') && (*p != '1') && (*p != '2') && (*p != '3')
-+ && (*p != '5') && (*p != '6') && (*p != '7'))
-+ {
-+ as_bad (_("internal: bad mips opcode (vreg type `?%c'): %s %s"),
-+ *p, opc->name, opc->args);
-+ return 0;
-+ }
-+ p++;
-+
-+ if ((*p != 's') && (*p != 't') && (*p != 'd')
-+ && (*p != 'y') && (*p != 'x') && (*p != 'z')
-+ && (*p != 'w') && (*p != 'm'))
-+ {
-+ as_bad (_("internal: bad mips opcode (vreg type `?%c'): %s %s"),
-+ *(p - 1), opc->name, opc->args);
-+ }
-+ p++;
-+
-+ switch (c)
-+ {
-+ case 's': USE_BITS (VF_MASK_VS, VF_SH_VS); break;
-+ case 't': USE_BITS (VF_MASK_VT, VF_SH_VT); break;
-+ case 'd':
-+ case 'v':
-+ case 'x': USE_BITS (VF_MASK_VD, VF_SH_VD); break;
-+ case 'm': USE_BITS (VF_MASK_VML, VF_SH_VML);
-+ USE_BITS (VF_MASK_VMH, VF_SH_VMH); break;
-+ case 'n': USE_BITS (VF_MASK_VNL, VF_SH_VNL);
-+ USE_BITS (VF_MASK_VNH, VF_SH_VNH); break;
-+ }
-+ }
-+ break;
-+
-+ case 'f': USE_BITS (VF_MASK_CC, VF_SH_CC);
-+ p++; break;
-+
-+ case 'a': USE_BITS (VF_MASK_CONST, VF_SH_CONST); break;
-+ case 'b': USE_BITS (VF_MASK_SCALE, VF_SH_SCALE); break;
-+ case 'c': USE_BITS (VF_MASK_BCOND, VF_SH_BCOND); break;
-+ case 'e': USE_BITS (VF_MASK_MCOND, VF_SH_MCOND); break;
-+
-+ case 'i': USE_BITS (VF_MASK_WRAP, VF_SH_WRAP); break;
-+
-+ case 'q': USE_BITS (VF_MASK_VCD, VF_SH_VCD); break;
-+ case 'r': USE_BITS (VF_MASK_VCS, VF_SH_VCS); break;
-+
-+ case 'u': USE_BITS (VF_MASK_HFLOAT, VF_SH_HFLOAT); break;
-+
-+ case 'w': USE_BITS (VF_MASK_ROT, VF_SH_ROT); break;
-+ case 'z': USE_BITS (VF_MASK_RWB, VF_SH_RWB); break;
-+
-+ case '0': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '1': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '2': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '3': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '4': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '5': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '6': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+ case '7': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
-+
-+ default:
-+ as_bad (_("internal: bad mips opcode (unknown extension operand type `?%c'): %s %s"),
-+ c, opc->name, opc->args);
-+ return 0;
-+
-+ }
-+ break;
-+
- default:
- as_bad (_("internal: bad mips opcode (unknown operand type `%c'): %s %s"),
- c, opc->name, opc->args);
-@@ -7845,12 +8391,15 @@
- char c = 0;
- struct mips_opcode *insn;
- char *argsStart;
-- unsigned int regno;
-+ unsigned int regno = 0;
- unsigned int lastregno = 0;
- unsigned int lastpos = 0;
- unsigned int limlo, limhi;
- char *s_reset;
- char save_c = 0;
-+ unsigned int vdregno = 0xffff;
-+ char vdregt = 0;
-+ char vdregl = 0;
-
- insn_error = NULL;
-
-@@ -8238,26 +8787,1171 @@
- s = expr_end;
- continue;
-
-- case 'b': /* base register */
-- case 'd': /* destination register */
-- case 's': /* source register */
-- case 't': /* target register */
-- case 'r': /* both target and source */
-- case 'v': /* both dest and source */
-- case 'w': /* both dest and target */
-- case 'E': /* coprocessor target register */
-- case 'G': /* coprocessor destination register */
-- case 'K': /* 'rdhwr' destination register */
-- case 'x': /* ignore register name */
-- case 'z': /* must be zero register */
-- case 'U': /* destination register (clo/clz). */
-- s_reset = s;
-- if (s[0] == '$')
-+ /* VFPU fields */
-+ case '?':
-+ switch (*++args)
- {
-+ case '[':
-+ case ']':
-+ if (*s++ == *args)
-+ continue;
-+ break;
-
-- if (ISDIGIT (s[1]))
-- {
-- ++s;
-+ case 'y': /* immediate separator */
-+ ++args;
-+ vimm_expr[*args - '0'] = imm_expr;
-+ voffset_expr[*args - '0'] = offset_expr;
-+
-+ imm_expr.X_op = O_absent;
-+ offset_expr.X_op = O_absent;
-+ imm_reloc[0] = BFD_RELOC_UNUSED;
-+ imm_reloc[1] = BFD_RELOC_UNUSED;
-+ imm_reloc[2] = BFD_RELOC_UNUSED;
-+ offset_reloc[0] = BFD_RELOC_UNUSED;
-+ offset_reloc[1] = BFD_RELOC_UNUSED;
-+ offset_reloc[2] = BFD_RELOC_UNUSED;
-+
-+ continue;
-+
-+ case 'o': /* 16 bit offset */
-+ /* Check whether there is only a single bracketed expression
-+ left. If so, it must be the base register and the
-+ constant must be zero. */
-+ if (*s == '(' && strchr (s + 1, '(') == 0)
-+ {
-+ offset_expr.X_op = O_constant;
-+ offset_expr.X_add_number = 0;
-+ continue;
-+ }
-+
-+ /* If this value won't fit into a 16 bit offset, then go
-+ find a macro that will generate the 32 bit offset
-+ code pattern. */
-+ if (my_getSmallExpression (&offset_expr, offset_reloc, s) == 0
-+ && (offset_expr.X_op != O_constant
-+ || offset_expr.X_add_number >= 0x8000
-+ || offset_expr.X_add_number < -0x8000))
-+ break;
-+
-+ s = expr_end;
-+ continue;
-+
-+ case 's': /* VFPU source register */
-+ case 't': /* VFPU target register */
-+ case 'd': /* VFPU destination register */
-+ case 'v': /* VFPU destination register */
-+ case 'x': /* VFPU destination register */
-+ case 'm': /* VFPU target regsiter (load/store) */
-+ case 'n': /* VFPU target regsiter (load/store) */
-+ {
-+ int dtype_err = 0;
-+ int dnum_err = 0;
-+ int dlen = 0;
-+ char dtype = s[0];
-+ char regtype = *(args + 1);
-+
-+ int mtx = 0;
-+ int idx = 0;
-+ int rxc = 0;
-+ int fsl = 0;
-+ int vidx = 0;
-+ int vfsl = 0;
-+
-+ if (ISDIGIT (s[1]))
-+ {
-+ int num = 0;
-+ s++;
-+ do
-+ {
-+ num *= 10;
-+ num += *s - '0';
-+ dlen++;
-+ s++;
-+ }
-+ while (ISDIGIT (*s));
-+
-+ if ((s[0] == '.')
-+ && (s[1] == 's' || s[1] == 'p'
-+ || s[1] == 't' || s[1] == 'q'))
-+ s += 2;
-+
-+ if (ISUPPER(dtype))
-+ dtype -= 'A' - 'a';
-+
-+ if (dtype == '$')
-+ {
-+ regno = num;
-+ if (regno > VF_MAX_MR)
-+ as_bad (_("Invalid VFPU register number (%d)"),
-+ regno);
-+
-+ idx = (num >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
-+ vfsl = (num >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL;
-+ switch (regtype)
-+ {
-+ case '0': /* single word */
-+ break;
-+ case '1': /* pare word */
-+ dnum_err = (vfsl & 0x1);
-+ break;
-+ case '2': /* triple word */
-+ dnum_err = (vfsl > 1);
-+ break;
-+ case '3': /* quad word */
-+ dnum_err = (vfsl > 0);
-+ break;
-+ case '5': /* 2x2 word */
-+ dnum_err = (vfsl & 0x1) || (idx & 0x1);
-+ break;
-+ case '6': /* 3x3 word */
-+ dnum_err = (vfsl > 1) || (idx > 1);
-+ break;
-+ case '7': /* 4x4 word */
-+ dnum_err = (vfsl > 0) || (idx > 0);
-+ break;
-+ }
-+
-+ if (dnum_err)
-+ as_bad (_("Improper VFPU register number (%d)"),
-+ regno);
-+
-+ }
-+ else if ((dlen == 3)
-+ && ((dtype == 's')
-+ || (dtype == 'c') || (dtype == 'r')
-+ || (dtype == 'm') || (dtype == 'e')))
-+ {
-+ mtx = num / 100;
-+ if ((dtype == 'r') || (dtype == 'e'))
-+ {
-+ vfsl = (num / 10) % 10;
-+ vidx = num % 10;
-+ rxc = 1;
-+ }
-+ else
-+ {
-+ vidx = (num / 10) % 10;
-+ vfsl = num % 10;
-+ rxc = 0;
-+ }
-+
-+ switch (regtype)
-+ {
-+ case '0': /* single word */
-+ idx = vidx;
-+ fsl = vfsl;
-+ dtype_err = (dtype != 's');
-+ break;
-+ case '1': /* pare word */
-+ idx = vidx;
-+ fsl = (vfsl & 0x2) | rxc;
-+ dnum_err = (vfsl & 0x1);
-+ dtype_err = (dtype != 'c') && (dtype != 'r');
-+ break;
-+ case '2': /* triple word */
-+ idx = vidx;
-+ fsl = ((vfsl & 0x1) << 1) | rxc;
-+ dnum_err = (vfsl > 1);
-+ dtype_err = (dtype != 'c') && (dtype != 'r');
-+ break;
-+ case '3': /* quad word */
-+ idx = vidx;
-+ fsl = rxc;
-+ dnum_err = (vfsl > 0);
-+ dtype_err = (dtype != 'c') && (dtype != 'r');
-+ break;
-+ case '5': /* 2x2 word */
-+ idx = vidx & 0x2;
-+ fsl = (vfsl & 0x2) | rxc;
-+ dnum_err = (vfsl & 0x1) || (vidx & 0x1);
-+ dtype_err = (dtype != 'm') && (dtype != 'e');
-+ break;
-+ case '6': /* 3x3 word */
-+ idx = vidx & 0x1;
-+ fsl = ((vfsl & 0x1) << 1) | rxc;
-+ dnum_err = (vfsl > 1) || (vidx > 1);
-+ dtype_err = (dtype != 'm') && (dtype != 'e');
-+ break;
-+ case '7': /* 4x4 word */
-+ idx = 0;
-+ fsl = rxc;
-+ dnum_err = (vfsl > 0) || (vidx > 0);
-+ dtype_err = (dtype != 'm') && (dtype != 'e');
-+ break;
-+ }
-+
-+ if (dtype_err)
-+ as_bad (_("Improper VFPU register prefix '%c'"),
-+ dtype);
-+ if (dnum_err)
-+ as_bad (_("Improper VFPU register number (%03d)"),
-+ num);
-+
-+ if (mtx > VF_MAX_MR_MTX)
-+ as_bad (_("VFPU matrix range over %d"), mtx);
-+ if (vidx > VF_MAX_MR_IDX)
-+ as_bad (_("VFPU index range over %d"), idx);
-+ if (vfsl > VF_MAX_MR_FSL)
-+ as_bad (_("VFPU field select range over %d"), fsl);
-+
-+ regno = ((fsl & VF_MASK_MR_FSL) << VF_SH_MR_FSL)
-+ | ((mtx & VF_MASK_MR_MTX) << VF_SH_MR_MTX)
-+ | ((idx & VF_MASK_MR_IDX) << VF_SH_MR_IDX);
-+ }
-+ else
-+ {
-+ as_bad (_("Improper VFPU register prefix '%c'"),
-+ dtype);
-+ }
-+ }
-+ else
-+ {
-+ as_bad (_("bad operand %s"), s);
-+ }
-+
-+ if ((*args == 'v') || (*args == 'x'))
-+ {
-+ vdregno = regno;
-+ vdregt = regtype;
-+ vdregl = (*args == 'v');
-+ }
-+ else if (vdregno <= VF_MAX_MR)
-+ {
-+ static unsigned short used_vreg[8][16] = {
-+ { 0x0001, 0x0010, 0x0100, 0x1000,
-+ 0x0002, 0x0020, 0x0200, 0x2000,
-+ 0x0004, 0x0040, 0x0400, 0x4000,
-+ 0x0008, 0x0080, 0x0800, 0x8000 },
-+ { 0x0003, 0x0030, 0x0300, 0x3000,
-+ 0x0011, 0x0022, 0x0044, 0x0088,
-+ 0x000c, 0x00c0, 0x0c00, 0xc000,
-+ 0x1100, 0x2200, 0x4400, 0x8800 },
-+ { 0x0007, 0x0070, 0x0700, 0x7000,
-+ 0x0111, 0x0222, 0x0444, 0x0888,
-+ 0x000e, 0x00e0, 0x0e00, 0xe000,
-+ 0x1110, 0x2220, 0x4440, 0x8880 },
-+ { 0x000f, 0x00f0, 0x0f00, 0xf000,
-+ 0x1111, 0x2222, 0x4444, 0x8888,
-+ 0x000f, 0x00f0, 0x0f00, 0xf000,
-+ 0x1111, 0x2222, 0x4444, 0x8888 },
-+ { 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000 },
-+ { 0x0033, 0x0033, 0x3300, 0x3300,
-+ 0x0033, 0x0033, 0x00cc, 0x00cc,
-+ 0x00cc, 0x00cc, 0xcc00, 0xcc00,
-+ 0x3300, 0x3300, 0xcc00, 0xcc00 },
-+ { 0x0777, 0x7770, 0x0777, 0x7770,
-+ 0x0777, 0x0eee, 0x0777, 0x0eee,
-+ 0x0eee, 0xeee0, 0x0eee, 0xeee0,
-+ 0x7770, 0xeee0, 0x7770, 0xeee0 },
-+ { 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff },
-+ };
-+ int dmtx, smtx;
-+ int dfsl, sfsl;
-+ int didx, sidx;
-+ int drxc, srxc;
-+
-+ dmtx = (vdregno >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
-+ smtx = (regno >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
-+
-+ if (dmtx == smtx)
-+ {
-+ unsigned short dused, sused;
-+ int dtype, stype;
-+
-+ dfsl = (vdregno >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
-+ didx = (vdregno >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
-+ drxc = (vdregno >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
-+ sfsl = (regno >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
-+ sidx = (regno >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
-+ srxc = (regno >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
-+
-+ dtype = vdregt - '0';
-+ stype = regtype - '0';
-+ dused = used_vreg[dtype][(dfsl << 2) + didx];
-+ sused = used_vreg[stype][(sfsl << 2) + sidx];
-+
-+ if ((dused & sused)
-+ && (vdregl || (dused ^ sused) || (drxc != srxc)))
-+ {
-+ int dvfsl;
-+ dvfsl = (vdregno >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL;
-+ switch (vdregt)
-+ {
-+ case '1':
-+ dvfsl <<= 1;
-+ case '2':
-+ case '3':
-+ if (drxc)
-+ as_bad (_("VFPU register conflict(R%d%d%d)"),
-+ dmtx, dvfsl, didx);
-+ else
-+ as_bad (_("VFPU register conflict(C%d%d%d)"),
-+ dmtx, didx, dvfsl);
-+ break;
-+ case '5':
-+ dvfsl <<= 1;
-+ case '6':
-+ case '7':
-+ if (drxc)
-+ as_bad (_("VFPU register conflict(E%d%d%d)"),
-+ dmtx, dvfsl, didx);
-+ else
-+ as_bad (_("VFPU register conflict(M%d%d%d)"),
-+ dmtx, didx, dvfsl);
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ switch (*args++)
-+ {
-+ case 's':
-+ if (
-+ (ip->insn_opcode
-+ & VFPU_MASK_RPT_MMUL) == VFPU_INST_RPT_MMUL)
-+ {
-+ if (regno & (VF_MASK_MR_RXC << VF_SH_MR_RXC))
-+ regno &= ~(VF_MASK_MR_RXC << VF_SH_MR_RXC);
-+ else
-+ regno |= (VF_MASK_MR_RXC << VF_SH_MR_RXC);
-+ }
-+ ip->insn_opcode |= (regno & VF_MASK_VS) << VF_SH_VS;
-+ break;
-+ case 't':
-+ ip->insn_opcode |= (regno & VF_MASK_VT) << VF_SH_VT;
-+ break;
-+ case 'd':
-+ case 'v':
-+ case 'x':
-+ ip->insn_opcode |= (regno & VF_MASK_VD) << VF_SH_VD;
-+ break;
-+ case 'm':
-+ {
-+ int vmregL = (regno >> 0) & VF_MASK_VML;
-+ int vmregH = (regno >> 5) & VF_MASK_VMH;
-+ ip->insn_opcode |= (vmregL << VF_SH_VML)
-+ | (vmregH << VF_SH_VMH);
-+ }
-+ break;
-+ case 'n':
-+ {
-+ int vmregL = (regno >> 0) & VF_MASK_VNL;
-+ int vmregH = (regno >> 5) & VF_MASK_VNH;
-+ ip->insn_opcode |= (vmregL << VF_SH_VNL)
-+ | (vmregH << VF_SH_VNH);
-+ }
-+ break;
-+ }
-+ args++;
-+
-+ /* now check for vfpu prefixes if necessary */
-+ if (*s == '[')
-+ {
-+ char *prefix_out = NULL;
-+ bfd_boolean *prefix_bool = NULL;
-+ char *prefix_type = NULL;
-+ int num_args = 0;
-+ char *ob = ++s;
-+ bfd_boolean has_w = FALSE;
-+ bfd_boolean has_z = FALSE;
-+ bfd_boolean has_y = FALSE;
-+ bfd_boolean has_operator = FALSE;
-+ bfd_boolean has_saturater = FALSE;
-+
-+ switch (*args)
-+ {
-+ case 'w': /* only swizzle */
-+ case 's': /* source prefix */
-+ prefix_bool = &vfpu_sprefix;
-+ prefix_out = vfpu_sprefix_str;
-+ prefix_type = "source";
-+ break;
-+ case 't': /* target prefix */
-+ prefix_bool = &vfpu_tprefix;
-+ prefix_out = vfpu_tprefix_str;
-+ prefix_type = "target";
-+ break;
-+ case 'm': /* only write mask */
-+ case 'd': /* destination prefix */
-+ prefix_bool = &vfpu_dprefix;
-+ prefix_out = vfpu_dprefix_str;
-+ prefix_type = "destination";
-+ break;
-+ case 'y': /* inhibit */
-+ prefix_bool = NULL;
-+ prefix_type = "source";
-+ break;
-+ case 'x': /* inhibit */
-+ prefix_bool = NULL;
-+ prefix_type = "target";
-+ break;
-+ case 'z': /* inhibit */
-+ prefix_bool = NULL;
-+ prefix_type = "destination";
-+ break;
-+ }
-+
-+ for ( ; *s != '\0' && *s != ']'; s++)
-+ {
-+ switch (*s)
-+ {
-+ case ',':
-+ /* count no. of params for syntax check */
-+ num_args++;
-+ break;
-+ case ' ':
-+ case '\t':
-+ break;
-+ case 'm':
-+ case 'M':
-+ case 'x':
-+ case 'X':
-+ break;
-+ case 'y':
-+ case 'Y':
-+ has_y = TRUE;
-+ break;
-+ case 'z':
-+ case 'Z':
-+ has_z = TRUE;
-+ break;
-+ case 'w':
-+ case 'W':
-+ has_w = TRUE;
-+ break;
-+ default:
-+ if (*args == 'w')
-+ has_operator = TRUE;
-+ if (*args == 'm')
-+ has_saturater = TRUE;
-+ }
-+ }
-+
-+ if (*s == ']')
-+ {
-+ if (prefix_bool)
-+ {
-+ *prefix_bool = TRUE;
-+ strncpy (prefix_out, ob, s - ob);
-+ prefix_out[s - ob] = '\0';
-+ s++;
-+ }
-+ else
-+ {
-+ as_bad (_("%s cannot use %s prefix"),
-+ insn->name, prefix_type);
-+ s++;
-+ continue;
-+ }
-+ }
-+ else
-+ {
-+ as_bad (_("parse error (%s)"), ob - 1);
-+ return;
-+ }
-+
-+ if (num_args != regtype - '0')
-+ {
-+ as_bad (_("%s prefix specification requires %d parameters - [%s]"),
-+ prefix_type, regtype - '0' + 1,
-+ prefix_out);
-+ }
-+ else
-+ {
-+ int i = 8 - ((3 - num_args) * 2);
-+ char dummy_d[] = " m,m,m,m";
-+ char dummy_st[] = " x,y,z,w";
-+
-+ if (*args == 'd' || *args == 'm')
-+ {
-+ strcat (prefix_out, dummy_d + i);
-+ if (has_saturater)
-+ {
-+ as_bad (_("%s is restricted to mask destination prefixes only"),
-+ insn->name);
-+ }
-+ }
-+ else
-+ {
-+ strcat (prefix_out, dummy_st + i);
-+ if (has_operator)
-+ {
-+ as_bad (_("%s is restricted to swizzle %s prefixes only"),
-+ insn->name, prefix_type);
-+ }
-+ /* semantic check, w can't be specified for
-+ s, p, or t instructions same goes for
-+ z for p and s, and y for scalars */
-+ if ((has_y && num_args == 0)
-+ || (has_z && num_args < 2)
-+ || (has_w && num_args < 3))
-+ {
-+ as_bad (_("%s swizzle operand is out of range in [%s]"),
-+ prefix_type, prefix_out);
-+ }
-+ }
-+ }
-+ }
-+
-+ continue;
-+ }
-+ break;
-+
-+ case 'q': /* VFPU destination control register */
-+ case 'r': /* VFPU source control register */
-+ {
-+ if ((s[0] == '$') && ISDIGIT (s[1]))
-+ {
-+ s++;
-+ regno = 0;
-+ do
-+ {
-+ regno *= 10;
-+ regno += *s - '0';
-+ ++s;
-+ }
-+ while (ISDIGIT (*s));
-+
-+ if ((regno < VF_MIN_CR) || (regno > VF_MAX_CR))
-+ as_bad (_("Invalid VFPU control register number (%d)"),
-+ regno);
-+
-+ else if (!((regno >= VF_MIN_VCR) && (regno <= VF_MAX_VCR)))
-+ as_bad (_("Improper VFPU control register number (%d)"),
-+ regno);
-+
-+ switch (*args)
-+ {
-+ case 'q':
-+ ip->insn_opcode |= (regno & VF_MASK_VCD) << VF_SH_VCD;
-+ break;
-+ case 'r':
-+ ip->insn_opcode |= (regno & VF_MASK_VCS) << VF_SH_VCS;
-+ break;
-+ }
-+ }
-+ else
-+ {
-+ as_bad (_("Invalid VFPU control register name (%s)"), s);
-+ }
-+
-+ continue;
-+ }
-+ break;
-+
-+ case 'f': /* condition code */
-+ {
-+ int cond = 0;
-+ if (ISDIGIT (s[0]))
-+ {
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ cond = imm_expr.X_add_number;
-+ if ((cond < VF_MIN_CC) || (cond > VF_MAX_CC))
-+ as_bad (_("Invalid VFPU condition code (%d)"), cond);
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ }
-+ else
-+ {
-+ static const char * const vfpu_cond_names[] = {
-+ "FL", "EQ", "LT", "LE",
-+ "TR", "NE", "GE", "GT",
-+ "EZ", "EN", "EI", "ES",
-+ "NZ", "NN", "NI", "NS" };
-+ for (cond = VF_MIN_CC; cond <= VF_MAX_CC; cond++)
-+ {
-+ if (strncasecmp(vfpu_cond_names[cond], s, 2) == 0)
-+ break;
-+ }
-+ if ((cond < VF_MIN_CC) || (cond > VF_MAX_CC))
-+ as_bad (_("Invalid VFPU condition code (%s)"), s);
-+
-+ s += 2;
-+ }
-+
-+ args++;
-+ if ((cond == 0) || (cond == 4))
-+ {
-+ }
-+ else if (cond & 0x8)
-+ {
-+ if (*args - '0' < 1)
-+ as_bad (_("Invalid VFPU condition oparetion"));
-+ }
-+ else
-+ {
-+ if (*args - '0' < 2)
-+ as_bad (_("Invalid VFPU condition oparetion"));
-+ }
-+
-+ ip->insn_opcode |= (cond & VF_MASK_CC) << VF_SH_CC;
-+ continue;
-+ }
-+ break;
-+
-+ case 'a': /* constant code */
-+ {
-+ int cst = 0;
-+ if (ISDIGIT (s[0]))
-+ {
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ cst = imm_expr.X_add_number;
-+ if ((cst < VF_MIN_CONST) || (cst > VF_MAX_CONST))
-+ {
-+ as_bad (_("Improper constant code (%d)"), cst);
-+ cst &= VF_MASK_CONST;
-+ }
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ }
-+ else
-+ {
-+ static const char * const vfpu_const_names[] = {
-+ "", "VFPU_HUGE", "VFPU_SQRT2", "VFPU_SQRT1_2",
-+ "VFPU_2_SQRTPI", "VFPU_2_PI", "VFPU_1_PI", "VFPU_PI_4",
-+ "VFPU_PI_2", "VFPU_PI", "VFPU_E", "VFPU_LOG2E",
-+ "VFPU_LOG10E", "VFPU_LN2", "VFPU_LN10", "VFPU_2PI",
-+ "VFPU_PI_6", "VFPU_LOG10TWO", "VFPU_LOG2TEN",
-+ "VFPU_SQRT3_2"};
-+ for (cst = VF_MIN_CONST; cst <= VF_MAX_CONST; cst++)
-+ {
-+ if (strcasecmp(vfpu_const_names[cst], s) == 0)
-+ break;
-+ }
-+ if ((cst < VF_MIN_CONST) || (cst > VF_MAX_CONST))
-+ as_bad (_("Invalid constant code (%s)"), s);
-+ else
-+ s += strlen(vfpu_const_names[cst]);
-+ }
-+
-+ ip->insn_opcode |= cst << VF_SH_CONST;
-+ }
-+ continue;
-+
-+ case 'b': /* scale exponent */
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ if ((unsigned long) imm_expr.X_add_number > VF_MAX_SCALE)
-+ {
-+ as_bad (_("Improper scale (%lu)"),
-+ (unsigned long) imm_expr.X_add_number);
-+ imm_expr.X_add_number &= VF_MASK_SCALE;
-+ }
-+ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_SCALE;
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ continue;
-+
-+ case 'c': /* branch condition code bit */
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ if ((unsigned long) imm_expr.X_add_number > VF_MAX_BCOND)
-+ {
-+ as_bad (_("Improper condition bit (%lu)"),
-+ (unsigned long) imm_expr.X_add_number);
-+ imm_expr.X_add_number &= VF_MASK_BCOND;
-+ }
-+ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_BCOND;
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ continue;
-+
-+ case 'e': /* move condition code bit */
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ if ((unsigned long) imm_expr.X_add_number > VF_MAX_MCOND)
-+ {
-+ as_bad (_("Improper condition bit (%lu)"),
-+ (unsigned long) imm_expr.X_add_number);
-+ imm_expr.X_add_number &= VF_MASK_MCOND;
-+ }
-+ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_MCOND;
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ continue;
-+
-+ case 'i': /* wrap exponent */
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ if ((unsigned long) imm_expr.X_add_number > VF_MAX_WRAP)
-+ {
-+ as_bad (_("Improper wrap (%lu)"),
-+ (unsigned long) imm_expr.X_add_number);
-+ imm_expr.X_add_number &= VF_MASK_WRAP;
-+ }
-+ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_WRAP;
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ continue;
-+
-+ case 'w': /* rotation code */
-+ if (s[0] == '[')
-+ {
-+ char *rot_str = s;
-+ int rot_idx = 0;
-+ int rot_neg = 0;
-+ int rot_sin = 3;
-+ int rot_cos = 3;
-+ int rot_err = 0;
-+ int rot_n;
-+ int rot_neg_n = 0;
-+ int rot_sin_n = 0;
-+ int rot_cos_n = 0;
-+ int rot_code;
-+
-+ if ((ip->insn_opcode & VFPU_MASK_DTYPE) == VFPU_PAIR)
-+ rot_n = 2;
-+ else if ((ip->insn_opcode & VFPU_MASK_DTYPE) == VFPU_TRIPLE)
-+ rot_n = 3;
-+ else if ((ip->insn_opcode & VFPU_MASK_DTYPE) == VFPU_QUAD)
-+ rot_n = 4;
-+ else
-+ rot_n = 0;
-+
-+ s++;
-+ while ((s[0] != ']') && (s[0] != '\0'))
-+ {
-+ if (s[0] == '-')
-+ {
-+ if ((s[1] != 's') && (s[1] != 'S'))
-+ {
-+ rot_err = 1;
-+ break;
-+ }
-+ rot_neg = 1;
-+ rot_neg_n++;
-+ s++;
-+ }
-+
-+ if (s[0] == ',')
-+ rot_idx++;
-+ else if ((s[0] == 'c') || (s[0] == 'C'))
-+ {
-+ rot_cos = rot_idx;
-+ rot_cos_n++;
-+ }
-+ else if ((s[0] == 's') || (s[0] == 'S'))
-+ {
-+ rot_sin = rot_idx;
-+ rot_sin_n++;
-+ }
-+ else if (ISSPACE(s[0]) || (s[0] == '0'))
-+ ;
-+ else
-+ {
-+ rot_err = 1;
-+ break;
-+ }
-+
-+ s++;
-+ }
-+
-+ if (s[0] == ']')
-+ rot_idx++;
-+ else
-+ rot_err = 1;
-+ s++;
-+
-+ if ((rot_sin_n == 0) && (rot_cos_n == 0))
-+ {
-+ if (rot_n == 2)
-+ rot_sin = 2;
-+ else if ((rot_n == 4) || (rot_n == 3))
-+ rot_err = 1;
-+ }
-+
-+ if (rot_cos_n > 1)
-+ rot_err = 1;
-+
-+ if (rot_sin_n > 1)
-+ {
-+ if (((rot_sin_n + rot_cos_n) != rot_n)
-+ || ((rot_n == 4) && (rot_cos_n == 0)))
-+ rot_err = 1;
-+ }
-+
-+ if (rot_neg && (rot_neg_n != rot_sin_n))
-+ rot_err = 1;
-+
-+ if (rot_sin_n > 1)
-+ rot_sin = rot_cos;
-+
-+ if (rot_err || (rot_n != rot_idx))
-+ as_bad (_("Invalid rotation code (%s)"), rot_str);
-+
-+ rot_code = ((rot_neg & VF_MASK_ROT_NEG) << VF_SH_ROT_NEG)
-+ | ((rot_cos & VF_MASK_ROT_COS) << VF_SH_ROT_COS)
-+ | ((rot_sin & VF_MASK_ROT_SIN) << VF_SH_ROT_SIN);
-+ ip->insn_opcode |= rot_code << VF_SH_ROT;
-+ }
-+ else
-+ {
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ if ((unsigned long) imm_expr.X_add_number > VF_MAX_ROT)
-+ {
-+ as_bad (_("Improper rotation code (%lu)"),
-+ (unsigned long) imm_expr.X_add_number);
-+ imm_expr.X_add_number &= VF_MASK_ROT;
-+ }
-+ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_ROT;
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ }
-+ continue;
-+
-+ case 'u': /* half float */
-+ if ((s[0] == '0') && ((s[1] == 'x') || (s[1] == 'X')))
-+ {
-+ my_getExpression (&imm_expr, s);
-+ check_absolute_expr (ip, &imm_expr);
-+ if ((unsigned long) imm_expr.X_add_number > VF_MAX_HFLOAT)
-+ {
-+ as_bad (_("Improper half floating point constant: (%lu)"),
-+ (unsigned long) imm_expr.X_add_number);
-+ imm_expr.X_add_number &= VF_MASK_HFLOAT;
-+ }
-+ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_HFLOAT;
-+ imm_expr.X_op = O_absent;
-+ s = expr_end;
-+ continue;
-+ }
-+ else
-+ {
-+ char *save_in;
-+ char *err;
-+ int len;
-+ unsigned int length;
-+ unsigned char temp[8];
-+ unsigned int f32, f16;
-+ int exponent32, exponent16;
-+ int fraction32, fraction16;
-+ int sign;
-+ char f16_str[8];
-+
-+ save_in = input_line_pointer;
-+ input_line_pointer = s;
-+ err = md_atof ('f', (char *) temp, &len);
-+ length = len;
-+ s = input_line_pointer;
-+ input_line_pointer = save_in;
-+ if (err != NULL && *err != '\0')
-+ {
-+ as_bad (_("Bad half floating point constant: %s"), err);
-+ memset (temp, '\0', sizeof temp);
-+ length = 4;
-+ }
-+
-+ if (! target_big_endian)
-+ f32 = bfd_getl32 (temp);
-+ else
-+ f32 = bfd_getb32 (temp);
-+
-+ sign = (f32 >> VF_SH_F32_SIGN) & VF_MASK_F32_SIGN;
-+ exponent32 = (f32 >> VF_SH_F32_EXP) & VF_MASK_F32_EXP;
-+ fraction32 = (f32 >> VF_SH_F32_FRA) & VF_MASK_F32_FRA;
-+ exponent16 = exponent32
-+ - VF_BIAS_F32_EXP + VF_BIAS_F16_EXP;
-+
-+ if (exponent16 < VF_MIN_F16_EXP)
-+ {
-+ if ((exponent32 == VF_MIN_F32_EXP)
-+ && (fraction32 == 0))
-+ { // zero
-+ exponent16 = VF_MIN_F16_EXP;
-+ fraction16 = 0;
-+ }
-+ else
-+ { // underflow
-+ float* p;
-+ p = (float*) &f32;
-+ as_warn (_("Half floating point underflow: %g"),
-+ *p);
-+ exponent16 = VF_MIN_F16_EXP;
-+ fraction16 = 0;
-+ }
-+ }
-+ else if (exponent16 > VF_MAX_F16_EXP)
-+ {
-+ if (exponent32 != VF_MAX_F32_EXP)
-+ { // overflow
-+ as_warn (_("Half floating point overflow: %g"),
-+ *(float *)&f32);
-+ exponent16 = VF_MAX_F16_EXP;
-+ fraction16 = 0;
-+ }
-+ else
-+ {
-+ if (fraction32 == 0)
-+ { // infinity
-+ exponent16 = VF_MAX_F16_EXP;
-+ fraction16 = 0;
-+ }
-+ else
-+ { // NaN
-+ exponent16 = VF_MAX_F16_EXP;
-+ fraction16 = 1;
-+ }
-+ }
-+ }
-+ else
-+ {
-+ fraction16 = (f32 >> (VF_SH_F32_EXP - VF_SH_F16_EXP))
-+ & VF_MASK_F16_FRA;
-+ }
-+
-+ f16 = (sign << VF_SH_F16_SIGN)
-+ | (exponent16 << VF_SH_F16_EXP)
-+ | (fraction16 << VF_SH_F16_FRA);
-+ ip->insn_opcode |= (f16 & VF_MASK_HFLOAT) << VF_SH_HFLOAT;
-+
-+ sprintf(f16_str, "0x%04x", f16);
-+ my_getExpression (&imm_expr, f16_str);
-+
-+ continue;
-+ }
-+ break;
-+
-+ case 'z': /* read/write access code */
-+ {
-+ int rwb = 0;
-+
-+ if (strncasecmp (s, "WT", 2) == 0)
-+ rwb = 0x0;
-+ else if (strncasecmp (s, "WB", 2) == 0)
-+ rwb = 0x1;
-+ else
-+ as_bad (_("Invalid memory access type (%s)"), s);
-+
-+ s += 2;
-+ ip->insn_opcode |= (rwb & VF_MASK_RWB) << VF_SH_RWB;
-+
-+ continue;
-+ }
-+
-+ case '0': /* source or target prefix code (X) */
-+ case '1': /* source or target prefix code (Y) */
-+ case '2': /* source or target prefix code (Z) */
-+ case '3': /* source or target prefix code (W) */
-+ {
-+ int operand;
-+ int shift;
-+
-+ int pfx_neg = 0;
-+ int pfx_cst = 0;
-+ int pfx_abs = 0;
-+ int pfx_swz = 0;
-+ int pfx_err = 0;
-+ int cst = 0;
-+ char *pfx_str = s;
-+
-+ if (s[0] == '-')
-+ { // sign code
-+ pfx_neg = 1;
-+ s++;
-+ }
-+
-+ if (ISDIGIT (s[0]))
-+ { // constant
-+ pfx_cst = 1;
-+
-+ if (s[0] == '0')
-+ cst = 0;
-+ else if (s[0] == '1')
-+ {
-+ if (s[1] == '/')
-+ {
-+ s += 2;
-+ if (s[0] == '2')
-+ cst = 3;
-+ else if (s[0] == '3')
-+ cst = 5;
-+ else if (s[0] == '4')
-+ cst = 6;
-+ else if (s[0] == '6')
-+ cst = 7;
-+ else
-+ pfx_err = 1;
-+ }
-+ else
-+ {
-+ cst = 1;
-+ }
-+ }
-+ else if (s[0] == '2')
-+ cst = 2;
-+ else if (s[0] == '3')
-+ cst = 4;
-+ else
-+ pfx_err = 1;
-+
-+ pfx_abs = (cst >> 2) & 0x1;
-+ pfx_swz = (cst >> 0) & 0x3;
-+ s++;
-+ }
-+ else
-+ { // variable
-+
-+ if (s[0] == '|')
-+ { // abs
-+ pfx_abs = 1;
-+ s++;
-+ }
-+
-+ if ((s[0] == 'X') || (s[0] == 'x'))
-+ {
-+ pfx_swz = 0;
-+ s++;
-+ }
-+ else if ((s[0] == 'Y') || (s[0] == 'y'))
-+ {
-+ pfx_swz = 1;
-+ s++;
-+ }
-+ else if ((s[0] == 'Z') || (s[0] == 'z'))
-+ {
-+ pfx_swz = 2;
-+ s++;
-+ }
-+ else if ((s[0] == 'W') || (s[0] == 'w'))
-+ {
-+ pfx_swz = 3;
-+ s++;
-+ }
-+ else if ((s[0] == ',') || IS_SPACE_OR_NUL (s[0])
-+ || (s[0] == '|'))
-+ {
-+ pfx_swz = *args - '0';
-+ }
-+ else
-+ pfx_err = 1;
-+
-+ if (pfx_err == 0)
-+ {
-+ if (s[0] == '|')
-+ {
-+ s++;
-+ if (pfx_abs == 0)
-+ pfx_err = 1;
-+ }
-+ else
-+ {
-+ if (pfx_abs == 1)
-+ pfx_err = 1;
-+ }
-+ }
-+ }
-+
-+ if (! ((s[0] == ',') || IS_SPACE_OR_NUL (s[0])))
-+ pfx_err = 1;
-+
-+ if (pfx_err)
-+ as_bad (_("Invalid prefix format (%s)"), pfx_str);
-+
-+ shift = *args - '0';
-+
-+ operand = (pfx_neg << (VF_SH_PFX_NEG + shift))
-+ | (pfx_cst << (VF_SH_PFX_CST + shift))
-+ | (pfx_abs << (VF_SH_PFX_ABS + shift))
-+ | (pfx_swz << (VF_SH_PFX_SWZ + shift * 2));
-+
-+ ip->insn_opcode |= operand;
-+ continue;
-+ }
-+
-+ case '4': /* destination prefix code (X) */
-+ case '5': /* destination prefix code (Y) */
-+ case '6': /* destination prefix code (Z) */
-+ case '7': /* destination prefix code (W) */
-+ {
-+ int operand;
-+ int shift;
-+ static const char order[] = "xyzwXYZW";
-+
-+ int pfx_msk = 0;
-+ int pfx_sat = 0;
-+ char *pfx_str = s;
-+
-+ if (s[0] == '[')
-+ s++;
-+ if (s[0] == '-') /* -1:1, skip the minus symbol */
-+ s++;
-+
-+ if ((s[0] == 'm') || (s[0] == 'M'))
-+ {
-+ pfx_msk = 1;
-+ s++;
-+ }
-+ else if (s[0] == '0') /* 0:1 */
-+ {
-+ pfx_sat = 1;
-+ s++;
-+ }
-+ else if (s[0] == '1') /* -1:1 or -1:+1 */
-+ {
-+ pfx_sat = 3;
-+ s++;
-+ }
-+ else if ((s[0] == order[(*args) - '4'])
-+ || (s[0] == order[(*args) - '4' + 4]))
-+ {
-+ pfx_sat = 0;
-+ s++;
-+ }
-+
-+ if (s[0] == ':') /* skip the :1 or :+1 part of the expression */
-+ {
-+ s++;
-+ if (s[0] == '+')
-+ s++;
-+ if (s[0] == '1')
-+ s++;
-+ }
-+ if (s[0] == ']')
-+ s++;
-+
-+ if (! ((s[0] == ',') || IS_SPACE_OR_NUL (s[0])))
-+ as_bad (_("Invalid prefix format (%s)"), pfx_str);
-+
-+ shift = *args - '4';
-+ operand = (pfx_msk << (VF_SH_PFX_MSK + shift))
-+ | (pfx_sat << (VF_SH_PFX_SAT + shift * 2));
-+
-+ ip->insn_opcode |= operand;
-+ continue;
-+ }
-+ }
-+ break;
-+
-+ case 'b': /* base register */
-+ case 'd': /* destination register */
-+ case 's': /* source register */
-+ case 't': /* target register */
-+ case 'r': /* both target and source */
-+ case 'v': /* both dest and source */
-+ case 'w': /* both dest and target */
-+ case 'E': /* coprocessor target register */
-+ case 'G': /* coprocessor destination register */
-+ case 'K': /* 'rdhwr' destination register */
-+ case 'x': /* ignore register name */
-+ case 'z': /* must be zero register */
-+ case 'U': /* destination register (clo/clz). */
-+ s_reset = s;
-+ if (s[0] == '$')
-+ {
-+
-+ if (ISDIGIT (s[1]))
-+ {
-+ ++s;
- regno = 0;
- do
- {
-@@ -8273,30 +9967,27 @@
- goto notreg;
- else
- {
-- if (s[1] == 'r' && s[2] == 'a')
-+ const char regName[32][5] =
- {
-- s += 3;
-- regno = RA;
-- }
-- else if (s[1] == 'f' && s[2] == 'p')
-+ "zero", "at", "v0", "v1", "a0", "a1", "a2", "a3",
-+ "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7",
-+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
-+ "t8", "t9", "k0", "k1", "gp", "sp", "fp", "ra"
-+ };
-+ int i;
-+
-+ for(i = 0; i < 32; i++)
- {
-- s += 3;
-- regno = FP;
-- }
-- else if (s[1] == 's' && s[2] == 'p')
-+ if(strncmp(&s[1], regName[i], strlen(regName[i])) == 0)
- {
-- s += 3;
-- regno = SP;
-+ break;
- }
-- else if (s[1] == 'g' && s[2] == 'p')
-- {
-- s += 3;
-- regno = GP;
- }
-- else if (s[1] == 'a' && s[2] == 't')
-+
-+ if(i < 32)
- {
-- s += 3;
-- regno = AT;
-+ s += strlen(regName[i]) + 1;
-+ regno = i;
- }
- else if (s[1] == 'k' && s[2] == 't' && s[3] == '0')
- {
-@@ -8485,6 +10176,7 @@
-
- if ((regno & 1) != 0
- && HAVE_32BIT_FPRS
-+ && ! CPU_IS_ALLEGREX (mips_opts.arch)
- && ! (strcmp (str, "mtc1") == 0
- || strcmp (str, "mfc1") == 0
- || strcmp (str, "lwc1") == 0
-@@ -13743,6 +15435,8 @@
-
- /* MIPS II */
- { "r6000", 0, ISA_MIPS2, CPU_R6000 },
-+ /* Sony PSP "Allegrex" CPU core */
-+ { "allegrex", 0, ISA_MIPS2, CPU_ALLEGREX },
-
- /* MIPS III */
- { "r4000", 0, ISA_MIPS3, CPU_R4000 },
-diff -burN binutils-2.16.1/gas/configure binutils-psp/gas/configure
---- binutils-2.16.1/gas/configure 2005-03-01 00:43:51.000000000 +0000
-+++ binutils-psp/gas/configure 2006-01-10 23:31:51.000000000 +0000
-@@ -4537,6 +4537,9 @@
- mips64vr | mips64vrel)
- mips_cpu=vr4100
- ;;
-+ mipsallegrex | mipsallegrexel)
-+ mips_cpu=allegrex
-+ ;;
- mipsisa32r2* | mipsisa64r2*)
- mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
- ;;
-diff -burN binutils-2.16.1/gas/configure.in binutils-psp/gas/configure.in
---- binutils-2.16.1/gas/configure.in 2005-03-01 00:43:57.000000000 +0000
-+++ binutils-psp/gas/configure.in 2006-01-10 23:31:51.000000000 +0000
-@@ -222,6 +222,9 @@
- mips64vr | mips64vrel)
- mips_cpu=vr4100
- ;;
-+ mipsallegrex | mipsallegrexel)
-+ mips_cpu=allegrex
-+ ;;
- mipsisa32r2* | mipsisa64r2*)
- changequote(,)dnl
- mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
-diff -burN binutils-2.16.1/gas/testsuite/gas/mips/mips.exp binutils-psp/gas/testsuite/gas/mips/mips.exp
---- binutils-2.16.1/gas/testsuite/gas/mips/mips.exp 2005-04-19 18:09:45.000000000 +0100
-+++ binutils-psp/gas/testsuite/gas/mips/mips.exp 2006-01-10 23:31:51.000000000 +0000
-@@ -382,6 +382,9 @@
- mips_arch_create sb1 64 mips64 { mips3d } \
- { -march=sb1 -mtune=sb1 } { -mmips:sb1 } \
- { mipsisa64sb1-*-* mipsisa64sb1el-*-* }
-+mips_arch_create allegrex 32 mips2 { ror } \
-+ { -march=allegrex -mtune=allegrex } { -mmips:allegrex } \
-+ { mipsallegrex-*-* mipsallegrexel-*-* }
-
-
- #
-diff -burN binutils-2.16.1/include/bin-bugs.h binutils-psp/include/bin-bugs.h
---- binutils-2.16.1/include/bin-bugs.h 2004-07-23 16:40:19.000000000 +0100
-+++ binutils-psp/include/bin-bugs.h 2006-01-10 23:31:51.000000000 +0000
-@@ -1,3 +1,3 @@
- #ifndef REPORT_BUGS_TO
--#define REPORT_BUGS_TO ""
-+#define REPORT_BUGS_TO ""
- #endif
-diff -burN binutils-2.16.1/include/elf/common.h binutils-psp/include/elf/common.h
---- binutils-2.16.1/include/elf/common.h 2004-10-08 14:55:08.000000000 +0100
-+++ binutils-psp/include/elf/common.h 2006-01-10 23:31:51.000000000 +0000
-@@ -93,6 +93,7 @@
- #define ET_HIOS 0xFEFF /* Operating system-specific */
- #define ET_LOPROC 0xFF00 /* Processor-specific */
- #define ET_HIPROC 0xFFFF /* Processor-specific */
-+#define ET_PSPEXEC 0xFFA0 /* Sony PSP executable file */
-
- /* Values for e_machine, which identifies the architecture. These numbers
- are officially assigned by registry@caldera.com. See below for a list of
-diff -burN binutils-2.16.1/include/elf/mips.h binutils-psp/include/elf/mips.h
---- binutils-2.16.1/include/elf/mips.h 2005-03-03 11:58:06.000000000 +0000
-+++ binutils-psp/include/elf/mips.h 2006-01-10 23:31:51.000000000 +0000
-@@ -212,6 +212,7 @@
- #define E_MIPS_MACH_5400 0x00910000
- #define E_MIPS_MACH_5500 0x00980000
- #define E_MIPS_MACH_9000 0x00990000
-+#define E_MIPS_MACH_ALLEGREX 0x00A20000
-
- /* Processor specific section indices. These sections do not actually
- exist. Symbols with a st_shndx field corresponding to one of these
-diff -burN binutils-2.16.1/include/opcode/mips.h binutils-psp/include/opcode/mips.h
---- binutils-2.16.1/include/opcode/mips.h 2005-03-03 11:58:10.000000000 +0000
-+++ binutils-psp/include/opcode/mips.h 2006-01-15 21:51:17.000000000 +0000
-@@ -171,6 +171,228 @@
- #define MDMX_FMTSEL_VEC_QH 0x15
- #define MDMX_FMTSEL_VEC_OB 0x16
-
-+#include "vfpu.h"
-+
-+#define VF_MASK_VT 0x7f
-+#define VF_SH_VT 16
-+#define VF_MASK_VS 0x7f
-+#define VF_SH_VS 8
-+#define VF_MASK_VD 0x7f
-+#define VF_SH_VD 0
-+#define VF_MASK_VML 0x1f
-+#define VF_SH_VML 16
-+#define VF_MASK_VMH 0x3
-+#define VF_SH_VMH 0
-+#define VF_MASK_VNL 0x1f
-+#define VF_SH_VNL 16
-+#define VF_MASK_VNH 0x1
-+#define VF_SH_VNH 0
-+#define VF_MASK_OFFSET 0x3fff
-+#define VF_SH_OFFSET 2
-+#define VF_MASK_CC 0xf
-+#define VF_SH_CC 0
-+#define VF_MASK_CONST 0x1f
-+#define VF_SH_CONST 16
-+#define VF_MASK_SCALE 0x1f
-+#define VF_SH_SCALE 16
-+#define VF_MASK_BCOND 0x7
-+#define VF_SH_BCOND 18
-+#define VF_MASK_MCOND 0x7
-+#define VF_SH_MCOND 16
-+#define VF_MASK_VCD 0xff
-+#define VF_SH_VCD 0
-+#define VF_MASK_VCS 0xff
-+#define VF_SH_VCS 8
-+#define VF_MASK_ROT 0x1f
-+#define VF_SH_ROT 16
-+#define VF_MASK_WRAP 0xff
-+#define VF_SH_WRAP 16
-+#define VF_MASK_TSIGN 0x1
-+#define VF_SH_TSIGN 5
-+#define VF_MASK_BMCOND 0x1f
-+#define VF_SH_BMCOND 0
-+#define VF_MASK_HFLOAT 0xffff
-+#define VF_SH_HFLOAT 0
-+#define VF_MASK_PFX 0xffffff
-+#define VF_SH_PFX 0
-+#define VF_MASK_RWB 0x1
-+#define VF_SH_RWB 1
-+
-+#define VF_MASK_PFX_SWZ 0x3
-+#define VF_SH_PFX_SWZ 0
-+#define VF_MASK_PFX_ABS 0x1
-+#define VF_SH_PFX_ABS 8
-+#define VF_MASK_PFX_CST 0x1
-+#define VF_SH_PFX_CST 12
-+#define VF_MASK_PFX_NEG 0x1
-+#define VF_SH_PFX_NEG 16
-+#define VF_MASK_PFX_SAT 0x3
-+#define VF_SH_PFX_SAT 0
-+#define VF_MASK_PFX_MSK 0x1
-+#define VF_SH_PFX_MSK 8
-+
-+#define VF_MASK_ROT_COS 0x3
-+#define VF_SH_ROT_COS 0
-+#define VF_MASK_ROT_SIN 0x3
-+#define VF_SH_ROT_SIN 2
-+#define VF_MASK_ROT_NEG 0x1
-+#define VF_SH_ROT_NEG 4
-+
-+#define VF_MASK_MR_MTX 0x7
-+#define VF_SH_MR_MTX 2
-+#define VF_MASK_MR_IDX 0x3
-+#define VF_SH_MR_IDX 0
-+#define VF_MASK_MR_FSL 0x3
-+#define VF_SH_MR_FSL 5
-+#define VF_MASK_MR_RXC 0x1
-+#define VF_SH_MR_RXC 5
-+#define VF_MASK_MR_VFSL 0x1
-+#define VF_SH_MR_VFSL 6
-+
-+#define VF_MAX_MR_MTX 7
-+#define VF_MAX_MR_IDX 3
-+#define VF_MAX_MR_FSL 3
-+#define VF_MAX_MR_VIDX 1
-+#define VF_MAX_MR_VFSL 1
-+
-+#define VF_MIN_MR 0
-+#define VF_MAX_MR 127
-+#define VF_MIN_CR 128
-+#define VF_MAX_CR 255
-+#define VF_MIN_VCR 128
-+#define VF_MAX_VCR 143
-+#define VF_MIN_CC 0
-+#define VF_MAX_CC 15
-+#define VF_MIN_CONST 1
-+#define VF_MAX_CONST 19
-+#define VF_MIN_SCALE 0
-+#define VF_MAX_SCALE 31
-+#define VF_MIN_BCOND 0
-+#define VF_MAX_BCOND 5
-+#define VF_MIN_MCOND 0
-+#define VF_MAX_MCOND 6
-+#define VF_MIN_WRAP 0
-+#define VF_MAX_WRAP 255
-+#define VF_MIN_ROT 0
-+#define VF_MAX_ROT 31
-+#define VF_MIN_TSIGN 0
-+#define VF_MAX_TSIGN 1
-+#define VF_MIN_BMCOND 0
-+#define VF_MAX_BMCOND 31
-+#define VF_MIN_HFLOAT 0
-+#define VF_MAX_HFLOAT 0xffff
-+
-+#define VF_MASK_F32_SIGN 0x1
-+#define VF_SH_F32_SIGN 31
-+#define VF_MASK_F32_EXP 0xff
-+#define VF_SH_F32_EXP 23
-+#define VF_MASK_F32_FRA 0x7fffff
-+#define VF_SH_F32_FRA 0
-+#define VF_MASK_F16_SIGN 0x1
-+#define VF_SH_F16_SIGN 15
-+#define VF_MASK_F16_EXP 0x1f
-+#define VF_SH_F16_EXP 10
-+#define VF_MASK_F16_FRA 0x3ff
-+#define VF_SH_F16_FRA 0
-+
-+#define VF_MIN_F32_EXP 0
-+#define VF_MAX_F32_EXP 255
-+#define VF_BIAS_F32_EXP 127
-+#define VF_MIN_F16_EXP 0
-+#define VF_MAX_F16_EXP 31
-+#define VF_BIAS_F16_EXP 15
-+
-+#define OP_SH_VFPU_DELTA 0
-+#define OP_MASK_VFPU_DELTA 0xfffc
-+#define OP_SH_VFPU_IMM3 16
-+#define OP_MASK_VFPU_IMM3 0x7
-+#define OP_SH_VFPU_IMM5 16
-+#define OP_MASK_VFPU_IMM5 0x1f
-+#define OP_SH_VFPU_IMM8 16
-+#define OP_MASK_VFPU_IMM8 0xff
-+#define OP_SH_VFPU_CC 18 /* Condition code. */
-+#define OP_MASK_VFPU_CC 0x7
-+#define OP_SH_VFPU_CONST 16
-+#define OP_MASK_VFPU_CONST 0x1f
-+#define OP_SH_VFPU_COND 0 /* Conditional compare. */
-+#define OP_MASK_VFPU_COND 0xf
-+#define OP_SH_VFPU_VMTVC 0
-+#define OP_MASK_VFPU_VMTVC 0xff
-+#define OP_SH_VFPU_VMFVC 8
-+#define OP_MASK_VFPU_VMFVC 0xff
-+#define OP_SH_VFPU_RWB 1
-+#define OP_MASK_VFPU_RWB 0x1
-+#define OP_SH_VFPU_ROT 16 /* Rotators used in vrot. */
-+#define OP_MASK_VFPU_ROT 0x1f
-+#define OP_SH_VFPU_FLOAT16 0
-+#define OP_MASK_VFPU_FLOAT16 0xffff
-+
-+/* VFPU registers. */
-+#define OP_SH_VFPU_VD 0
-+#define OP_MASK_VFPU_VD 0x7f
-+#define OP_SH_VFPU_VS 8
-+#define OP_MASK_VFPU_VS 0x7f
-+#define OP_SH_VFPU_VT 16
-+#define OP_MASK_VFPU_VT 0x7f
-+#define OP_SH_VFPU_VT_LO 16 /* Bits 0-4 of vt. */
-+#define OP_MASK_VFPU_VT_LO 0x1f
-+#define OP_SH_VFPU_VT_HI 5 /* Right-shifted. */
-+#define OP_MASK_VFPU_VT_HI1 0x1 /* Bit 5 of vt. */
-+#define OP_MASK_VFPU_VT_HI2 0x3 /* Bits 5-6 of vt. */
-+/* Special handling of vs in vmmul instructions. */
-+#define VFPU_OP_VT_VS_VD 0xff800000
-+#define VFPU_OPCODE_VMMUL 0xf0000000
-+
-+/* VFPU condition codes. FL and TR accept no arguments, while any conditions
-+ above and including EZ only accept one argument. The rest require two
-+ arguments. */
-+enum
-+{
-+ VFPU_COND_FL, VFPU_COND_EQ, VFPU_COND_LT, VFPU_COND_LE,
-+ VFPU_COND_TR, VFPU_COND_NE, VFPU_COND_GE, VFPU_COND_GT,
-+ VFPU_COND_EZ, VFPU_COND_EN, VFPU_COND_EI, VFPU_COND_ES,
-+ VFPU_COND_NZ, VFPU_COND_NN, VFPU_COND_NI, VFPU_COND_NS,
-+ VFPU_NUM_CONDS
-+};
-+
-+/* VFPU prefix instruction operands. The *_SH_* values really specify where
-+ the bitfield begins, as VFPU prefix instructions have four operands
-+ encoded within the immediate field. */
-+#define VFPU_SH_PFX_NEG 16
-+#define VFPU_MASK_PFX_NEG 0x1 /* Negation. */
-+#define VFPU_SH_PFX_CST 12
-+#define VFPU_MASK_PFX_CST 0x1 /* Constant. */
-+#define VFPU_SH_PFX_ABS_CSTHI 8
-+#define VFPU_MASK_PFX_ABS_CSTHI 0x1 /* Abs/Constant (bit 2). */
-+#define VFPU_SH_PFX_SWZ_CSTLO 0
-+#define VFPU_MASK_PFX_SWZ_CSTLO 0x3 /* Swizzle/Constant (bits 0-1). */
-+#define VFPU_SH_PFX_MASK 8
-+#define VFPU_MASK_PFX_MASK 0x1 /* Mask. */
-+#define VFPU_SH_PFX_SAT 0
-+#define VFPU_MASK_PFX_SAT 0x3 /* Saturation. */
-+
-+/* Special handling of the vrot instructions. */
-+#define VFPU_MASK_OP_SIZE 0x8080 /* Masks the operand size (pair, triple, quad). */
-+#define VFPU_OP_SIZE_PAIR 0x80
-+#define VFPU_OP_SIZE_TRIPLE 0x8000
-+#define VFPU_OP_SIZE_QUAD 0x8080
-+/* Note that these are within the rotators field, and not the full opcode. */
-+#define VFPU_SH_ROT_HI 2
-+#define VFPU_MASK_ROT_HI 0x3
-+#define VFPU_SH_ROT_LO 0
-+#define VFPU_MASK_ROT_LO 0x3
-+#define VFPU_SH_ROT_NEG 4 /* Negation. */
-+#define VFPU_MASK_ROT_NEG 0x1
-+
-+/* VFPU 16-bit floating-point format. */
-+#define VFPU_FLOAT16_EXP_MAX 0x1f
-+#define VFPU_SH_FLOAT16_SIGN 15
-+#define VFPU_MASK_FLOAT16_SIGN 0x1
-+#define VFPU_SH_FLOAT16_EXP 10
-+#define VFPU_MASK_FLOAT16_EXP 0x1f
-+#define VFPU_SH_FLOAT16_FRAC 0
-+#define VFPU_MASK_FLOAT16_FRAC 0x3ff
-+
- /* This structure holds information for a particular instruction. */
-
- struct mips_opcode
-@@ -258,6 +480,29 @@
- Requires that "+A" or "+E" occur first to set position.
- Enforces: 32 < (pos+size) <= 64.
-
-+ Sony Allegrex VFPU instructions:
-+ "?o"
-+ "?0" - "?3"
-+ "?4" - "?7"
-+ "?a"
-+ "?b"
-+ "?c"
-+ "?e"
-+ "?f"
-+ "?i"
-+ "?q"
-+ "?r"
-+ "?u"
-+ "?w"
-+ "?d"
-+ "?m"
-+ "?n"
-+ "?s"
-+ "?t"
-+ "?v"
-+ "?x"
-+ "?z"
-+
- Floating point instructions:
- "D" 5 bit destination register (OP_*_FD)
- "M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
-@@ -442,6 +687,8 @@
- #define INSN_5400 0x01000000
- /* NEC VR5500 instruction. */
- #define INSN_5500 0x02000000
-+/* Sony Allegrex instruction. */
-+#define INSN_ALLEGREX 0x10000000
-
- /* MIPS ISA defines, use instead of hardcoding ISA level. */
-
-@@ -489,6 +736,7 @@
- #define CPU_MIPS64 64
- #define CPU_MIPS64R2 65
- #define CPU_SB1 12310201 /* octal 'SB', 01. */
-+#define CPU_ALLEGREX 10111431 /* octal 'AL', 31. */
-
- /* Test for membership in an ISA including chip specific ISAs. INSN
- is pointer to an element of the opcode table; ISA is the specified
-@@ -510,6 +758,7 @@
- || (cpu == CPU_VR4120 && ((insn)->membership & INSN_4120) != 0) \
- || (cpu == CPU_VR5400 && ((insn)->membership & INSN_5400) != 0) \
- || (cpu == CPU_VR5500 && ((insn)->membership & INSN_5500) != 0) \
-+ || (cpu == CPU_ALLEGREX && ((insn)->membership & INSN_ALLEGREX) != 0) \
- || 0) /* Please keep this term for easier source merging. */
-
- /* This is a list of macro expanded instructions.
-@@ -622,9 +871,25 @@
- M_LI_DD,
- M_LI_S,
- M_LI_SS,
-+ M_LVHI_S_SS,
-+ M_LVHI_P_SS,
-+ M_LVI_S_SS,
-+ M_LVI_P_SS,
-+ M_LVI_T_SS,
-+ M_LVI_Q_SS,
- M_LL_AB,
- M_LLD_AB,
- M_LS_A,
-+ M_LVHI_P,
-+ M_LVHI_S,
-+ M_LVI_P,
-+ M_LVI_Q,
-+ M_LVI_S,
-+ M_LVI_T,
-+ M_LVL_Q_AB,
-+ M_LVR_Q_AB,
-+ M_LV_Q_AB,
-+ M_LV_Q_AB_2,
- M_LW_A,
- M_LW_AB,
- M_LWC0_A,
-@@ -635,6 +900,7 @@
- M_LWC2_AB,
- M_LWC3_A,
- M_LWC3_AB,
-+ M_LV_S_AB,
- M_LWL_A,
- M_LWL_AB,
- M_LWR_A,
-@@ -714,6 +980,10 @@
- M_SUB_I,
- M_SUBU_I,
- M_SUBU_I_2,
-+ M_SVL_Q_AB,
-+ M_SV_Q_AB,
-+ M_SVR_Q_AB,
-+ M_SV_S_AB,
- M_TEQ_I,
- M_TGE_I,
- M_TGEU_I,
-@@ -728,14 +998,24 @@
- M_ULH_A,
- M_ULHU,
- M_ULHU_A,
-+ M_ULV_Q,
-+ M_ULV_Q_AB,
-+ M_ULV_S,
- M_ULW,
- M_ULW_A,
- M_USH,
- M_USH_A,
-+ M_USV_Q,
-+ M_USV_Q_AB,
-+ M_USV_S,
- M_USW,
- M_USW_A,
- M_USD,
- M_USD_A,
-+ M_VCMOV_P,
-+ M_VCMOV_Q,
-+ M_VCMOV_S,
-+ M_VCMOV_T,
- M_XOR_I,
- M_COP0,
- M_COP1,
-diff -burN binutils-2.16.1/include/opcode/vfpu.h binutils-psp/include/opcode/vfpu.h
---- binutils-2.16.1/include/opcode/vfpu.h 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-psp/include/opcode/vfpu.h 2006-01-15 21:51:21.000000000 +0000
-@@ -0,0 +1,261 @@
-+#ifndef _VFPU_H_
-+#define _VFPU_H_
-+
-+////////////////////////////////////
-+// data type
-+#define VFPU_MASK_DTYPE 0x8080
-+#define VFPU_QUAD 0x8080
-+#define VFPU_TRIPLE 0x8000
-+#define VFPU_PAIR 0x0080
-+#define VFPU_SINGLE 0x0000
-+
-+////////////////////////////////////
-+// register index
-+#define VFPU_MASK_VT 0x7f0000
-+#define VFPU_MASK_VS 0x007f00
-+#define VFPU_MASK_VD 0x00007f
-+
-+////////////////////////////////////
-+// condition and comapre inst
-+#define VFPU_PADD_BIN_CMP 0x70
-+
-+////////////////////////////////////
-+// load/store left/right
-+#define VFPU_MASK_LDST_LR 0x2
-+#define VFPU_LDST_L 0x0
-+#define VFPU_LDST_R 0x2
-+
-+////////////////////////////////////
-+// load/store memory/buffer
-+#define VFPU_MASK_LDST_MB 0x2
-+#define VFPU_LDST_M 0x0
-+#define VFPU_LDST_B 0x2
-+
-+////////////////////////////////////
-+// coprocessor move
-+#define VFPU_MASK_COP_MV 0xff80
-+#define VFPU_MASK_COP_MVC 0xff00
-+
-+////////////////////////////////////
-+// sync code
-+#define VFPU_MASK_SYNC_CODE 0xffff
-+#define VFPU_SYNC_CODE_DEFAULT 0x0320
-+#define VFPU_SYNC_CODE_NOP 0x0000
-+#define VFPU_SYNC_CODE_FLUSH 0x040d
-+
-+////////////////////////////////////
-+#define VFPU_INST_BR_F 0x49000000
-+#define VFPU_MASK_BR_F 0xffe30000
-+#define VFPU_INST_BR_FL 0x49020000
-+#define VFPU_MASK_BR_FL 0xffe30000
-+#define VFPU_INST_BR_T 0x49010000
-+#define VFPU_MASK_BR_T 0xffe30000
-+#define VFPU_INST_BR_TL 0x49030000
-+#define VFPU_MASK_BR_TL 0xffe30000
-+
-+#define VFPU_INST_COP_LD_S 0xc8000000
-+#define VFPU_MASK_COP_LD_S 0xfc000000
-+#define VFPU_INST_COP_ST_S 0xe8000000
-+#define VFPU_MASK_COP_ST_S 0xfc000000
-+#define VFPU_INST_COP_LD_Q 0xd8000000
-+#define VFPU_MASK_COP_LD_Q 0xfc000000
-+#define VFPU_INST_COP_ST_Q 0xf8000000
-+#define VFPU_MASK_COP_ST_Q 0xfc000000
-+#define VFPU_INST_COP_LD_U 0xd4000000
-+#define VFPU_MASK_COP_LD_U 0xfc000000
-+#define VFPU_INST_COP_ST_U 0xf4000000
-+#define VFPU_MASK_COP_ST_U 0xfc000000
-+#define VFPU_INST_COP_MF 0x48600000
-+#define VFPU_MASK_COP_MF 0xffe00000
-+#define VFPU_INST_COP_MT 0x48e00000
-+#define VFPU_MASK_COP_MT 0xffe00000
-+
-+#define VFPU_INST_BIN_ADD 0x60000000
-+#define VFPU_MASK_BIN_ADD 0xff800000
-+#define VFPU_INST_BIN_SUB 0x60800000
-+#define VFPU_MASK_BIN_SUB 0xff800000
-+#define VFPU_INST_BIN_SBN 0x61000000
-+#define VFPU_MASK_BIN_SBN 0xff800000
-+#define VFPU_INST_BIN_DIV 0x63800000
-+#define VFPU_MASK_BIN_DIV 0xff800000
-+#define VFPU_INST_BIN_MUL 0x64000000
-+#define VFPU_MASK_BIN_MUL 0xff800000
-+#define VFPU_INST_BIN_DOT 0x64800000
-+#define VFPU_MASK_BIN_DOT 0xff800000
-+#define VFPU_INST_BIN_SCL 0x65000000
-+#define VFPU_MASK_BIN_SCL 0xff800000
-+#define VFPU_INST_BIN_HDP 0x66000000
-+#define VFPU_MASK_BIN_HDP 0xff800000
-+#define VFPU_INST_BIN_CRS 0x66800000
-+#define VFPU_MASK_BIN_CRS 0xff800000
-+#define VFPU_INST_BIN_DET 0x67000000
-+#define VFPU_MASK_BIN_DET 0xff800000
-+#define VFPU_INST_BIN_CMP 0x6c000000
-+#define VFPU_MASK_BIN_CMP 0xff800000
-+#define VFPU_INST_BIN_MIN 0x6d000000
-+#define VFPU_MASK_BIN_MIN 0xff800000
-+#define VFPU_INST_BIN_MAX 0x6d800000
-+#define VFPU_MASK_BIN_MAX 0xff800000
-+#define VFPU_INST_BIN_SCMP 0x6e800000
-+#define VFPU_MASK_BIN_SCMP 0xff800000
-+#define VFPU_INST_BIN_SGE 0x6f000000
-+#define VFPU_MASK_BIN_SGE 0xff800000
-+#define VFPU_INST_BIN_SLT 0x6f800000
-+#define VFPU_MASK_BIN_SLT 0xff800000
-+
-+#define VFPU_INST_UNR_MOV 0xd0000000
-+#define VFPU_MASK_UNR_MOV 0xffff0000
-+#define VFPU_INST_UNR_ABS 0xd0010000
-+#define VFPU_MASK_UNR_ABS 0xffff0000
-+#define VFPU_INST_UNR_NEG 0xd0020000
-+#define VFPU_MASK_UNR_NEG 0xffff0000
-+#define VFPU_INST_UNR_IDT 0xd0030000
-+#define VFPU_MASK_UNR_IDT 0xffff0000
-+#define VFPU_INST_UNR_SAT0 0xd0040000
-+#define VFPU_MASK_UNR_SAT0 0xffff0000
-+#define VFPU_INST_UNR_SAT1 0xd0050000
-+#define VFPU_MASK_UNR_SAT1 0xffff0000
-+#define VFPU_INST_UNR_ZERO 0xd0060000
-+#define VFPU_MASK_UNR_ZERO 0xffff0000
-+#define VFPU_INST_UNR_ONE 0xd0070000
-+#define VFPU_MASK_UNR_ONE 0xffff0000
-+#define VFPU_INST_UNR_RCP 0xd0100000
-+#define VFPU_MASK_UNR_RCP 0xffff0000
-+#define VFPU_INST_UNR_RSQ 0xd0110000
-+#define VFPU_MASK_UNR_RSQ 0xffff0000
-+#define VFPU_INST_UNR_SIN 0xd0120000
-+#define VFPU_MASK_UNR_SIN 0xffff0000
-+#define VFPU_INST_UNR_COS 0xd0130000
-+#define VFPU_MASK_UNR_COS 0xffff0000
-+#define VFPU_INST_UNR_EXP2 0xd0140000
-+#define VFPU_MASK_UNR_EXP2 0xffff0000
-+#define VFPU_INST_UNR_LOG2 0xd0150000
-+#define VFPU_MASK_UNR_LOG2 0xffff0000
-+#define VFPU_INST_UNR_SQR 0xd0160000
-+#define VFPU_MASK_UNR_SQR 0xffff0000
-+#define VFPU_INST_UNR_ASIN 0xd0170000
-+#define VFPU_MASK_UNR_ASIN 0xffff0000
-+#define VFPU_INST_UNR_NRCP 0xd0180000
-+#define VFPU_MASK_UNR_NRCP 0xffff0000
-+#define VFPU_INST_UNR_NSIN 0xd01a0000
-+#define VFPU_MASK_UNR_NSIN 0xffff0000
-+#define VFPU_INST_UNR_REXP2 0xd01c0000
-+#define VFPU_MASK_UNR_REXP2 0xffff0000
-+#define VFPU_INST_UNR_RNDS 0xd0200000
-+#define VFPU_MASK_UNR_RNDS 0xffff0000
-+#define VFPU_INST_UNR_RNDI 0xd0210000
-+#define VFPU_MASK_UNR_RNDI 0xffff0000
-+#define VFPU_INST_UNR_RNDF1 0xd0220000
-+#define VFPU_MASK_UNR_RNDF1 0xffff0000
-+#define VFPU_INST_UNR_RNDF2 0xd0230000
-+#define VFPU_MASK_UNR_RNDF2 0xffff0000
-+#define VFPU_INST_UNR_F2H 0xd0320000
-+#define VFPU_MASK_UNR_F2H 0xffff0000
-+#define VFPU_INST_UNR_H2F 0xd0330000
-+#define VFPU_MASK_UNR_H2F 0xffff0000
-+#define VFPU_INST_UNR_SBZ 0xd0360000
-+#define VFPU_MASK_UNR_SBZ 0xffff0000
-+#define VFPU_INST_UNR_LGB 0xd0370000
-+#define VFPU_MASK_UNR_LGB 0xffff0000
-+#define VFPU_INST_UNR_US2I 0xd03a0000
-+#define VFPU_MASK_UNR_US2I 0xffff0000
-+#define VFPU_INST_UNR_S2I 0xd03b0000
-+#define VFPU_MASK_UNR_S2I 0xffff0000
-+#define VFPU_INST_UNR_I2UC 0xd03c0000
-+#define VFPU_MASK_UNR_I2UC 0xffff0000
-+#define VFPU_INST_UNR_I2C 0xd03d0000
-+#define VFPU_MASK_UNR_I2C 0xffff0000
-+#define VFPU_INST_UNR_I2US 0xd03e0000
-+#define VFPU_MASK_UNR_I2US 0xffff0000
-+#define VFPU_INST_UNR_I2S 0xd03f0000
-+#define VFPU_MASK_UNR_I2S 0xffff0000
-+#define VFPU_INST_UNR_SRT1 0xd0400000
-+#define VFPU_MASK_UNR_SRT1 0xffff0000
-+#define VFPU_INST_UNR_SRT2 0xd0410000
-+#define VFPU_MASK_UNR_SRT2 0xffff0000
-+#define VFPU_INST_UNR_BFY1 0xd0420000
-+#define VFPU_MASK_UNR_BFY1 0xffff0000
-+#define VFPU_INST_UNR_BFY2 0xd0430000
-+#define VFPU_MASK_UNR_BFY2 0xffff0000
-+#define VFPU_INST_UNR_OCP 0xd0440000
-+#define VFPU_MASK_UNR_OCP 0xffff0000
-+#define VFPU_INST_UNR_SOCP 0xd0450000
-+#define VFPU_MASK_UNR_SOCP 0xffff0000
-+#define VFPU_INST_UNR_FAD 0xd0460000
-+#define VFPU_MASK_UNR_FAD 0xffff0000
-+#define VFPU_INST_UNR_AVG 0xd0470000
-+#define VFPU_MASK_UNR_AVG 0xffff0000
-+#define VFPU_INST_UNR_SRT3 0xd0480000
-+#define VFPU_MASK_UNR_SRT3 0xffff0000
-+#define VFPU_INST_UNR_SRT4 0xd0490000
-+#define VFPU_MASK_UNR_SRT4 0xffff0000
-+#define VFPU_INST_UNR_SGN 0xd04a0000
-+#define VFPU_MASK_UNR_SGN 0xffff0000
-+#define VFPU_INST_UNR_CF 0xd0500000
-+#define VFPU_MASK_UNR_CF 0xffff0080
-+#define VFPU_INST_UNR_CT 0xd0510000
-+#define VFPU_MASK_UNR_CT 0xffff8000
-+#define VFPU_INST_UNR_T4444 0xd0590000
-+#define VFPU_MASK_UNR_T4444 0xffff0000
-+#define VFPU_INST_UNR_T5551 0xd05a0000
-+#define VFPU_MASK_UNR_T5551 0xffff0000
-+#define VFPU_INST_UNR_T5650 0xd05b0000
-+#define VFPU_MASK_UNR_T5650 0xffff0000
-+#define VFPU_INST_UNR_CST 0xd0600000
-+#define VFPU_MASK_UNR_CST 0xffe00000
-+
-+#define VFPU_INST_UNRI_F2I_N 0xd2000000
-+#define VFPU_MASK_UNRI_F2I_N 0xffe00000
-+#define VFPU_INST_UNRI_F2I_Z 0xd2200000
-+#define VFPU_MASK_UNRI_F2I_Z 0xffe00000
-+#define VFPU_INST_UNRI_F2I_U 0xd2400000
-+#define VFPU_MASK_UNRI_F2I_U 0xffe00000
-+#define VFPU_INST_UNRI_F2I_D 0xd2600000
-+#define VFPU_MASK_UNRI_F2I_D 0xffe00000
-+#define VFPU_INST_UNRI_I2F 0xd2800000
-+#define VFPU_MASK_UNRI_I2F 0xffe00000
-+#define VFPU_INST_UNRI_CMOV_T 0xd2a00000
-+#define VFPU_MASK_UNRI_CMOV_T 0xfff80000
-+#define VFPU_INST_UNRI_CMOV_F 0xd2a80000
-+#define VFPU_MASK_UNRI_CMOV_F 0xfff80000
-+#define VFPU_INST_UNRI_WBN 0xd3000000
-+#define VFPU_MASK_UNRI_WBN 0xff000000
-+
-+#define VFPU_INST_PFX_RA 0xdc000000
-+#define VFPU_MASK_PFX_RA 0xff000000
-+#define VFPU_INST_PFX_RB 0xdd000000
-+#define VFPU_MASK_PFX_RB 0xff000000
-+#define VFPU_INST_PFX_W 0xde000000
-+#define VFPU_MASK_PFX_W 0xff000000
-+#define VFPU_INST_IIM 0xdf000000
-+#define VFPU_MASK_IIM 0xff800000
-+#define VFPU_INST_FIM 0xdf800000
-+#define VFPU_MASK_FIM 0xff800000
-+
-+#define VFPU_INST_RPT_MMUL 0xf0000000
-+#define VFPU_MASK_RPT_MMUL 0xff800000
-+#define VFPU_INST_RPT_TFM2 0xf0800000
-+#define VFPU_MASK_RPT_TFM2 0xff800000
-+#define VFPU_INST_RPT_TFM3 0xf1000000
-+#define VFPU_MASK_RPT_TFM3 0xff800000
-+#define VFPU_INST_RPT_TFM4 0xf1800000
-+#define VFPU_MASK_RPT_TFM4 0xff800000
-+#define VFPU_INST_RPT_MSCL 0xf2000000
-+#define VFPU_MASK_RPT_MSCL 0xff800000
-+#define VFPU_INST_RPT_QMUL 0xf2800000
-+#define VFPU_MASK_RPT_QMUL 0xff800000
-+#define VFPU_INST_RPT_MMOV 0xf3800000
-+#define VFPU_MASK_RPT_MMOV 0xffff0000
-+#define VFPU_INST_RPT_MIDT 0xf3830000
-+#define VFPU_MASK_RPT_MIDT 0xffff0000
-+#define VFPU_INST_RPT_MZERO 0xf3860000
-+#define VFPU_MASK_RPT_MZERO 0xffff0000
-+#define VFPU_INST_RPT_MONE 0xf3870000
-+#define VFPU_MASK_RPT_MONE 0xffff0000
-+#define VFPU_INST_RPT_ROT 0xf3a00000
-+#define VFPU_MASK_RPT_ROT 0xffe00000
-+
-+#define VFPU_INST_SYNC 0xffff0000
-+#define VFPU_MASK_SYNC 0xffff0000
-+
-+#endif /* _VFPU_H_ */
-diff -burN binutils-2.16.1/ld/configure.tgt binutils-psp/ld/configure.tgt
---- binutils-2.16.1/ld/configure.tgt 2005-02-08 19:54:27.000000000 +0000
-+++ binutils-psp/ld/configure.tgt 2006-01-10 23:31:51.000000000 +0000
-@@ -428,6 +428,8 @@
- mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
- mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
- mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
-+mips*allegrexel-psp-elf*) targ_emul=elf_mipsallegrexel_psp
-+ targ_extra_emuls="elf32elmip" ;;
- mips*el-*-elf*) targ_emul=elf32elmip ;;
- mips*-*-elf*) targ_emul=elf32ebmip ;;
- mips*el-*-rtems*) targ_emul=elf32elmip ;;
-diff -burN binutils-2.16.1/ld/emulparams/elf_mipsallegrexel_psp.sh binutils-psp/ld/emulparams/elf_mipsallegrexel_psp.sh
---- binutils-2.16.1/ld/emulparams/elf_mipsallegrexel_psp.sh 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-psp/ld/emulparams/elf_mipsallegrexel_psp.sh 2006-01-10 23:31:51.000000000 +0000
-@@ -0,0 +1,22 @@
-+# Based off of the default elf32 MIPS target. However, we use a seperate
-+# script template because the PSP architecture defines sections that normally
-+# cannot be overriden here and would normally get absorbed (i.e.
-+# .rodata.sceModuleInfo would be absorbed into .rodata).
-+
-+EMBEDDED=yes
-+. ${srcdir}/emulparams/elf32lmip.sh
-+unset NONPAGED_TEXT_START_ADDR
-+unset SHLIB_TEXT_START_ADDR
-+unset COMMONPAGESIZE
-+
-+SCRIPT_NAME=elf_psp
-+TEXT_START_ADDR=0x08900000
-+MAXPAGESIZE=256
-+ARCH="mips:allegrex"
-+MACHINE=
-+TEMPLATE_NAME=elf32
-+GENERATE_SHLIB_SCRIPT=yes
-+DYNAMIC_LINK=FALSE
-+
-+# Discard the .comment and .pdr sections.
-+OTHER_SECTIONS="/DISCARD/ : { *(.comment) *(.pdr) }"
-diff -burN binutils-2.16.1/ld/Makefile.am binutils-psp/ld/Makefile.am
---- binutils-2.16.1/ld/Makefile.am 2005-01-20 19:37:49.000000000 +0000
-+++ binutils-psp/ld/Makefile.am 2006-01-10 23:31:51.000000000 +0000
-@@ -190,6 +190,7 @@
- eelf_i386_chaos.o \
- eelf_i386_fbsd.o \
- eelf_i386_ldso.o \
-+ eelf_mipsallegrexel_psp.o \
- eelf_s390.o \
- egld960.o \
- egld960coff.o \
-@@ -864,6 +865,9 @@
- eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
-+eelf_mipsallegrexel_psp.c: $(srcdir)/emulparams/elf_mipsallegrexel_psp.sh \
-+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_psp.sc ${GEN_DEPENDS}
-+ ${GENSCRIPTS} elf_mipsallegrexel_psp "$(tdir_elf_mipsallegrexel_psp)"
- eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
-diff -burN binutils-2.16.1/ld/Makefile.in binutils-psp/ld/Makefile.in
---- binutils-2.16.1/ld/Makefile.in 2005-01-23 05:36:37.000000000 +0000
-+++ binutils-psp/ld/Makefile.in 2006-01-10 23:31:51.000000000 +0000
-@@ -315,6 +315,7 @@
- eelf_i386_chaos.o \
- eelf_i386_fbsd.o \
- eelf_i386_ldso.o \
-+ eelf_mipsallegrexel_psp.o \
- eelf_s390.o \
- egld960.o \
- egld960coff.o \
-@@ -1601,6 +1602,9 @@
- eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
-+eelf_mipsallegrexel_psp.c: $(srcdir)/emulparams/elf_mipsallegrexel_psp.sh \
-+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_psp.sc ${GEN_DEPENDS}
-+ ${GENSCRIPTS} elf_mipsallegrexel_psp "$(tdir_elf_mipsallegrexel_psp)"
- eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
-diff -burN binutils-2.16.1/ld/scripttempl/elf_psp.sc binutils-psp/ld/scripttempl/elf_psp.sc
---- binutils-2.16.1/ld/scripttempl/elf_psp.sc 1970-01-01 01:00:00.000000000 +0100
-+++ binutils-psp/ld/scripttempl/elf_psp.sc 2006-01-10 23:31:51.000000000 +0000
-@@ -0,0 +1,496 @@
-+#
-+# Unusual variables checked by this code:
-+# NOP - four byte opcode for no-op (defaults to 0)
-+# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
-+# empty.
-+# SMALL_DATA_CTOR - .ctors contains small data.
-+# SMALL_DATA_DTOR - .dtors contains small data.
-+# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
-+# INITIAL_READONLY_SECTIONS - at start of text segment
-+# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
-+# (e.g., .PARISC.milli)
-+# OTHER_TEXT_SECTIONS - these get put in .text when relocating
-+# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
-+# (e.g., .PARISC.global)
-+# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
-+# (e.g. PPC32 .fixup, .got[12])
-+# OTHER_BSS_SECTIONS - other than .bss .sbss ...
-+# OTHER_SECTIONS - at the end
-+# EXECUTABLE_SYMBOLS - symbols that must be defined for an
-+# executable (e.g., _DYNAMIC_LINK)
-+# TEXT_START_ADDR - the first byte of the text segment, after any
-+# headers.
-+# TEXT_BASE_ADDRESS - the first byte of the text segment.
-+# TEXT_START_SYMBOLS - symbols that appear at the start of the
-+# .text section.
-+# DATA_START_SYMBOLS - symbols that appear at the start of the
-+# .data section.
-+# OTHER_GOT_SYMBOLS - symbols defined just before .got.
-+# OTHER_GOT_SECTIONS - sections just after .got.
-+# OTHER_SDATA_SECTIONS - sections just after .sdata.
-+# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
-+# .bss section besides __bss_start.
-+# DATA_PLT - .plt should be in data segment, not text segment.
-+# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
-+# BSS_PLT - .plt should be in bss segment
-+# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-+# EMBEDDED - whether this is for an embedded system.
-+# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
-+# start address of shared library.
-+# INPUT_FILES - INPUT command of files to always include
-+# WRITABLE_RODATA - if set, the .rodata section should be writable
-+# INIT_START, INIT_END - statements just before and just after
-+# combination of .init sections.
-+# FINI_START, FINI_END - statements just before and just after
-+# combination of .fini sections.
-+# STACK_ADDR - start of a .stack section.
-+# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
-+# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
-+# so that .got can be in the RELRO area. It should be set to
-+# the number of bytes in the beginning of .got.plt which can be
-+# in the RELRO area as well.
-+#
-+# When adding sections, do note that the names of some sections are used
-+# when specifying the start address of the next.
-+#
-+
-+# Many sections come in three flavours. There is the 'real' section,
-+# like ".data". Then there are the per-procedure or per-variable
-+# sections, generated by -ffunction-sections and -fdata-sections in GCC,
-+# and useful for --gc-sections, which for a variable "foo" might be
-+# ".data.foo". Then there are the linkonce sections, for which the linker
-+# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
-+# The exact correspondences are:
-+#
-+# Section Linkonce section
-+# .text .gnu.linkonce.t.foo
-+# .rodata .gnu.linkonce.r.foo
-+# .data .gnu.linkonce.d.foo
-+# .bss .gnu.linkonce.b.foo
-+# .sdata .gnu.linkonce.s.foo
-+# .sbss .gnu.linkonce.sb.foo
-+# .sdata2 .gnu.linkonce.s2.foo
-+# .sbss2 .gnu.linkonce.sb2.foo
-+# .debug_info .gnu.linkonce.wi.foo
-+# .tdata .gnu.linkonce.td.foo
-+# .tbss .gnu.linkonce.tb.foo
-+#
-+# Each of these can also have corresponding .rel.* and .rela.* sections.
-+
-+test -z "$ENTRY" && ENTRY=_start
-+test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-+test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
-+if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
-+test -z "${ELFSIZE}" && ELFSIZE=32
-+test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
-+test "$LD_FLAG" = "N" && DATA_ADDR=.
-+test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
-+test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
-+test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
-+DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
-+DATA_SEGMENT_RELRO_END=""
-+DATA_SEGMENT_RELRO_GOTPLT_END=""
-+DATA_SEGMENT_END=""
-+if test -n "${COMMONPAGESIZE}"; then
-+ DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
-+ DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
-+ if test -n "${SEPARATE_GOTPLT}"; then
-+ DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT}, .);"
-+ else
-+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (0, .);"
-+ fi
-+fi
-+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-+if test -z "$GOT"; then
-+ if test -z "$SEPARATE_GOTPLT"; then
-+ GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
-+ else
-+ GOT=".got ${RELOCATING-0} : { *(.got) }"
-+ GOTPLT="${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}}
-+ .got.plt ${RELOCATING-0} : { *(.got.plt) }"
-+ fi
-+fi
-+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
-+RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
-+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
-+STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
-+if test -z "${NO_SMALL_DATA}"; then
-+ SBSS=".sbss ${RELOCATING-0} :
-+ {
-+ ${RELOCATING+PROVIDE (__sbss_start = .);}
-+ ${RELOCATING+PROVIDE (___sbss_start = .);}
-+ ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
-+ *(.dynsbss)
-+ *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
-+ *(.scommon)
-+ ${RELOCATING+PROVIDE (__sbss_end = .);}
-+ ${RELOCATING+PROVIDE (___sbss_end = .);}
-+ }"
-+ SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
-+ SDATA="/* We want the small data sections together, so single-instruction offsets
-+ can access them all, and initialized data all before uninitialized, so
-+ we can shorten the on-disk segment size. */
-+ .sdata ${RELOCATING-0} :
-+ {
-+ ${RELOCATING+${SDATA_START_SYMBOLS}}
-+ ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
-+ *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
-+ }"
-+ SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
-+ REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
-+ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
-+ REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
-+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
-+ REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
-+ .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
-+ REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
-+ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
-+else
-+ NO_SMALL_DATA=" "
-+fi
-+test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
-+CTOR=".ctors ${CONSTRUCTING-0} :
-+ {
-+ ${CONSTRUCTING+${CTOR_START}}
-+ /* gcc uses crtbegin.o to find the start of
-+ the constructors, so we make sure it is
-+ first. Because this is a wildcard, it
-+ doesn't matter if the user does not
-+ actually link against crtbegin.o; the
-+ linker won't look for a file to match a
-+ wildcard. The wildcard also means that it
-+ doesn't matter which directory crtbegin.o
-+ is in. */
-+
-+ KEEP (*crtbegin*.o(.ctors))
-+
-+ /* We don't want to include the .ctor section from
-+ from the crtend.o file until after the sorted ctors.
-+ The .ctor section from the crtend file contains the
-+ end of ctors marker and it must be last */
-+
-+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
-+ KEEP (*(SORT(.ctors.*)))
-+ KEEP (*(.ctors))
-+ ${CONSTRUCTING+${CTOR_END}}
-+ }"
-+DTOR=".dtors ${CONSTRUCTING-0} :
-+ {
-+ ${CONSTRUCTING+${DTOR_START}}
-+ KEEP (*crtbegin*.o(.dtors))
-+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
-+ KEEP (*(SORT(.dtors.*)))
-+ KEEP (*(.dtors))
-+ ${CONSTRUCTING+${DTOR_END}}
-+ }"
-+STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
-+ {
-+ ${RELOCATING+_stack = .;}
-+ *(.stack)
-+ }"
-+
-+# if this is for an embedded system, don't add SIZEOF_HEADERS.
-+if [ -z "$EMBEDDED" ]; then
-+ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
-+else
-+ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
-+fi
-+
-+cat <> OP_SH_FT) & OP_MASK_FT);
- break;
-
-+ case '?':
-+ /* VFPU extensions. */
-+ d++;
-+ switch (*d)
-+ {
-+ case '\0':
-+ /* xgettext:c-format */
-+ (*info->fprintf_func) (info->stream,
-+ _("# internal error, incomplete VFPU extension sequence (?)"));
-+ return;
-+
-+ case 'o':
-+ delta = (l >> OP_SH_VFPU_DELTA) & OP_MASK_VFPU_DELTA;
-+ if (delta & 0x8000)
-+ delta |= ~0xffff;
-+ (*info->fprintf_func) (info->stream, "%d",
-+ delta);
-+ break;
-+
-+ case '0':
-+ case '1':
-+ case '2':
-+ case '3':
-+ {
-+ unsigned int pos = *d, base = '0';
-+ unsigned int negation = (l >> (pos - (base - VFPU_SH_PFX_NEG))) & VFPU_MASK_PFX_NEG;
-+ unsigned int constant = (l >> (pos - (base - VFPU_SH_PFX_CST))) & VFPU_MASK_PFX_CST;
-+ unsigned int abs_consthi =
-+ (l >> (pos - (base - VFPU_SH_PFX_ABS_CSTHI))) & VFPU_MASK_PFX_ABS_CSTHI;
-+ unsigned int swz_constlo = (l >> ((pos - base) * 2)) & VFPU_MASK_PFX_SWZ_CSTLO;
-+
-+ if (negation)
-+ (*info->fprintf_func) (info->stream, "-");
-+ if (constant)
-+ {
-+ (*info->fprintf_func) (info->stream, "%s",
-+ pfx_cst_names[(abs_consthi << 2) | swz_constlo]);
-+ }
-+ else
-+ {
-+ if (abs_consthi)
-+ (*info->fprintf_func) (info->stream, "|%s|",
-+ pfx_swz_names[swz_constlo]);
-+ else
-+ (*info->fprintf_func) (info->stream, "%s",
-+ pfx_swz_names[swz_constlo]);
-+ }
-+ }
-+ break;
-+
-+ case '4':
-+ case '5':
-+ case '6':
-+ case '7':
-+ {
-+ unsigned int pos = *d, base = '4';
-+ unsigned int mask = (l >> (pos - (base - VFPU_SH_PFX_MASK))) & VFPU_MASK_PFX_MASK;
-+ unsigned int saturation = (l >> ((pos - base) * 2)) & VFPU_MASK_PFX_SAT;
-+
-+ if (mask)
-+ (*info->fprintf_func) (info->stream, "m");
-+ else
-+ (*info->fprintf_func) (info->stream, "%s",
-+ pfx_sat_names[saturation]);
-+ }
-+ break;
-+
-+ case 'a':
-+ {
-+ unsigned int c = (l >> OP_SH_VFPU_CONST) & OP_MASK_VFPU_CONST;
-+ if (c < vfpu_num_constants)
-+ {
-+ (*info->fprintf_func) (info->stream, "%s",
-+ vfpu_const_names[c]);
-+ }
-+ break;
-+ }
-+
-+ case 'b':
-+ /* 5-bit immediate value. */
-+ (*info->fprintf_func) (info->stream, "%d",
-+ (l >> OP_SH_VFPU_IMM5) & OP_MASK_VFPU_IMM5);
-+ break;
-+
-+ case 'c':
-+ /* VFPU condition code. */
-+ (*info->fprintf_func) (info->stream, "%d",
-+ (l >> OP_SH_VFPU_CC) & OP_MASK_VFPU_CC);
-+ break;
-+
-+ case 'e':
-+ /* 3-bit immediate value. */
-+ (*info->fprintf_func) (info->stream, "%d",
-+ (l >> OP_SH_VFPU_IMM3) & OP_MASK_VFPU_IMM3);
-+ break;
-+
-+ case 'f':
-+ /* Conditional compare. */
-+ (*info->fprintf_func) (info->stream, "%s",
-+ vfpu_cond_names[(l >> OP_SH_VFPU_COND) & OP_MASK_VFPU_COND]);
-+ /* Apparently this specifier is unused. */
-+ d++;
-+ break;
-+
-+ case 'i':
-+ /* 8-bit immediate value. */
-+ (*info->fprintf_func) (info->stream, "0x%02x",
-+ (l >> OP_SH_VFPU_IMM8) & OP_MASK_VFPU_IMM8);
-+ break;
-+
-+ case 'q':
-+ /* VFPU control register (vmtvc). */
-+ (*info->fprintf_func) (info->stream, "$%d",
-+ (l >> OP_SH_VFPU_VMTVC) & OP_MASK_VFPU_VMTVC);
-+ break;
-+
-+ case 'r':
-+ /* VFPU control register (vmfvc). */
-+ (*info->fprintf_func) (info->stream, "$%d",
-+ (l >> OP_SH_VFPU_VMFVC) & OP_MASK_VFPU_VMFVC);
-+ break;
-+
-+ case 'u':
-+ /* Convert a VFPU 16-bit floating-point number to IEEE754. */
-+ {
-+ union float2int {
-+ unsigned int i;
-+ float f;
-+ } float2int;
-+ unsigned short float16 = (l >> OP_SH_VFPU_FLOAT16) & OP_MASK_VFPU_FLOAT16;
-+ unsigned int sign = (float16 >> VFPU_SH_FLOAT16_SIGN) & VFPU_MASK_FLOAT16_SIGN;
-+ int exponent = (float16 >> VFPU_SH_FLOAT16_EXP) & VFPU_MASK_FLOAT16_EXP;
-+ unsigned int fraction = float16 & VFPU_MASK_FLOAT16_FRAC;
-+ char signchar = '+' + ((sign == 1) * 2);
-+
-+ if (exponent == VFPU_FLOAT16_EXP_MAX)
-+ {
-+ if (fraction == 0)
-+ (*info->fprintf_func) (info->stream, "%cInf", signchar);
-+ else
-+ (*info->fprintf_func) (info->stream, "%cNaN", signchar);
-+ }
-+ else if (exponent == 0 && fraction == 0)
-+ {
-+ (*info->fprintf_func) (info->stream, "%c0", signchar);
-+ }
-+ else
-+ {
-+ if (exponent == 0)
-+ {
-+ do
-+ {
-+ fraction <<= 1;
-+ exponent--;
-+ }
-+ while (!(fraction & (VFPU_MASK_FLOAT16_FRAC + 1)));
-+
-+ fraction &= VFPU_MASK_FLOAT16_FRAC;
-+ }
-+
-+ /* Convert to 32-bit single-precision IEEE754. */
-+ float2int.i = sign << 31;
-+ float2int.i |= (exponent + 112) << 23;
-+ float2int.i |= fraction << 13;
-+ (*info->fprintf_func) (info->stream, "%g", float2int.f);
-+ }
-+ }
-+ break;
-+
-+ case 'w':
-+ {
-+ const char *elements[4];
-+ unsigned int opcode = l & VFPU_MASK_OP_SIZE;
-+ unsigned int rotators = (l >> OP_SH_VFPU_ROT) & OP_MASK_VFPU_ROT;
-+ unsigned int opsize, rothi, rotlo, negation, i;
-+
-+ /* Determine the operand size so we'll know how many elements to output. */
-+ if (opcode == VFPU_OP_SIZE_PAIR)
-+ opsize = 2;
-+ else if (opcode == VFPU_OP_SIZE_TRIPLE)
-+ opsize = 3;
-+ else
-+ opsize = (opcode == VFPU_OP_SIZE_QUAD) * 4; /* Sanity check. */
-+
-+ rothi = (rotators >> VFPU_SH_ROT_HI) & VFPU_MASK_ROT_HI;
-+ rotlo = (rotators >> VFPU_SH_ROT_LO) & VFPU_MASK_ROT_LO;
-+ negation = (rotators >> VFPU_SH_ROT_NEG) & VFPU_MASK_ROT_NEG;
-+
-+ if (rothi == rotlo)
-+ {
-+ if (negation)
-+ {
-+ elements[0] = "-s";
-+ elements[1] = "-s";
-+ elements[2] = "-s";
-+ elements[3] = "-s";
-+ }
-+ else
-+ {
-+ elements[0] = "s";
-+ elements[1] = "s";
-+ elements[2] = "s";
-+ elements[3] = "s";
-+ }
-+ }
-+ else
-+ {
-+ elements[0] = "0";
-+ elements[1] = "0";
-+ elements[2] = "0";
-+ elements[3] = "0";
-+ }
-+ if (negation)
-+ elements[rothi] = "-s";
-+ else
-+ elements[rothi] = "s";
-+ elements[rotlo] = "c";
-+
-+ (*info->fprintf_func) (info->stream, "[");
-+ i = 0;
-+ for (;;)
-+ {
-+ (*info->fprintf_func) (info->stream, "%s",
-+ elements[i++]);
-+ if (i >= opsize)
-+ break;
-+ (*info->fprintf_func) (info->stream, ",");
-+ }
-+ (*info->fprintf_func) (info->stream, "]");
-+ }
-+ break;
-+
-+ case 'd':
-+ case 'm':
-+ case 'n':
-+ case 's':
-+ case 't':
-+ case 'v':
-+ case 'x':
-+ {
-+ unsigned int vreg = 0;
-+
-+ /* The first char specifies the bitfield that contains the register number. */
-+ switch (*d)
-+ {
-+ case 'd':
-+ case 'v':
-+ case 'x':
-+ vreg = (l >> OP_SH_VFPU_VD) & OP_MASK_VFPU_VD;
-+ break;
-+
-+ case 'm':
-+ /* Combine bits 0-4 of vt with bits 5-6 of vt. */
-+ vreg = ((l >> OP_SH_VFPU_VT_LO) & OP_MASK_VFPU_VT_LO)
-+ | ((l & OP_MASK_VFPU_VT_HI2) << OP_SH_VFPU_VT_HI);
-+ break;
-+
-+ case 'n':
-+ /* Combine bits 0-4 of vt with bit 5 of vt. */
-+ vreg = ((l >> OP_SH_VFPU_VT_LO) & OP_MASK_VFPU_VT_LO)
-+ | ((l & OP_MASK_VFPU_VT_HI1) << OP_SH_VFPU_VT_HI);
-+ break;
-+
-+ case 's':
-+ {
-+ unsigned int temp_vreg = l >> OP_SH_VFPU_VS;
-+
-+ vreg = temp_vreg & OP_MASK_VFPU_VS;
-+ if ((l & VFPU_OP_VT_VS_VD) == VFPU_OPCODE_VMMUL)
-+ {
-+ /* vmmul instructions have the RXC bit (bit 13) inverted. */
-+ if (temp_vreg & 0x20)
-+ vreg = temp_vreg & 0x5f;
-+ else
-+ vreg |= 0x20;
-+ }
-+ }
-+ break;
-+
-+ case 't':
-+ vreg = (l >> OP_SH_VFPU_VT) & OP_MASK_VFPU_VT;
-+ break;
-+ }
-+
-+ /* The next char is the register set vreg comes from. */
-+ d++;
-+ switch (*d)
-+ {
-+ case '0':
-+ (*info->fprintf_func) (info->stream, "%s.s",
-+ vfpu_sreg_names[vreg]);
-+ break;
-+
-+ case '1':
-+ (*info->fprintf_func) (info->stream, "%s.p",
-+ vfpu_vpreg_names[vreg]);
-+ break;
-+
-+ case '2':
-+ (*info->fprintf_func) (info->stream, "%s.t",
-+ vfpu_vtreg_names[vreg]);
-+ break;
-+
-+ case '3':
-+ (*info->fprintf_func) (info->stream, "%s.q",
-+ vfpu_vqreg_names[vreg]);
-+ break;
-+
-+ case '5':
-+ (*info->fprintf_func) (info->stream, "%s.p",
-+ vfpu_mpreg_names[vreg]);
-+ break;
-+
-+ case '6':
-+ (*info->fprintf_func) (info->stream, "%s.t",
-+ vfpu_mtreg_names[vreg]);
-+ break;
-+
-+ case '7':
-+ (*info->fprintf_func) (info->stream, "%s.q",
-+ vfpu_mqreg_names[vreg]);
-+ break;
-+
-+ default:
-+ /* xgettext:c-format */
-+ (*info->fprintf_func) (info->stream,
-+ _("# internal error, undefined vreg modifier(%c)"),
-+ *d);
-+ break;
-+ }
-+
-+ /* The last char is unused for disassembly. */
-+ d++;
-+ }
-+ break;
-+
-+ case 'z':
-+ (*info->fprintf_func) (info->stream, "%s",
-+ vfpu_rwb_names[(l >> OP_SH_VFPU_RWB) & OP_MASK_VFPU_RWB]);
-+ break;
-+ }
-+ break;
-+
- default:
- /* xgettext:c-format */
- (*info->fprintf_func) (info->stream,
-diff -burN binutils-2.16.1/opcodes/mips-opc.c binutils-psp/opcodes/mips-opc.c
---- binutils-2.16.1/opcodes/mips-opc.c 2005-03-03 11:49:50.000000000 +0000
-+++ binutils-psp/opcodes/mips-opc.c 2006-01-10 23:31:51.000000000 +0000
-@@ -109,6 +109,7 @@
- #define N5 (INSN_5400 | INSN_5500)
- #define N54 INSN_5400
- #define N55 INSN_5500
-+#define AL INSN_ALLEGREX
-
- #define G1 (T3 \
- )
-@@ -271,6 +272,7 @@
- {"bnel", "s,t,p", 0x54000000, 0xfc000000, CBL|RD_s|RD_t, 0, I2|T3 },
- {"bnel", "s,I,p", 0, (int) M_BNEL_I, INSN_MACRO, 0, I2|T3 },
- {"break", "", 0x0000000d, 0xffffffff, TRAP, 0, I1 },
-+{"break", "B", 0x0000000d, 0xfc00003f, TRAP, 0, AL },
- {"break", "c", 0x0000000d, 0xfc00ffff, TRAP, 0, I1 },
- {"break", "c,q", 0x0000000d, 0xfc00003f, TRAP, 0, I1 },
- {"c.f.d", "S,T", 0x46200030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
-@@ -432,7 +434,7 @@
- {"cabs.un.d", "M,S,T", 0x46200071, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, M3D },
- {"cabs.un.ps", "M,S,T", 0x46c00071, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, M3D },
- {"cabs.un.s", "M,S,T", 0x46000071, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, M3D },
--{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, 0, I3|I32|T3},
-+{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, 0, I3|I32|T3|AL},
- {"ceil.l.d", "D,S", 0x4620000a, 0xffff003f, WR_D|RD_S|FP_D, 0, I3 },
- {"ceil.l.s", "D,S", 0x4600000a, 0xffff003f, WR_D|RD_S|FP_S, 0, I3 },
- {"ceil.w.d", "D,S", 0x4620000e, 0xffff003f, WR_D|RD_S|FP_D, 0, I2 },
-@@ -443,7 +445,9 @@
- /* cfc2 is at the bottom of the table. */
- {"cfc3", "t,G", 0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I1 },
- {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_d|WR_t|RD_s, 0, I32|N55 },
-+{"clo", "d,s", 0x00000017, 0xfc1f07ff, WR_d|RD_s, 0, AL },
- {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_d|WR_t|RD_s, 0, I32|N55 },
-+{"clz", "d,s", 0x00000016, 0xfc1f07ff, WR_d|RD_s, 0, AL },
- {"ctc0", "t,G", 0x40c00000, 0xffe007ff, COD|RD_t|WR_CC, 0, I1 },
- {"ctc1", "t,G", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
- {"ctc1", "t,S", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
-@@ -465,13 +469,15 @@
- {"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
- {"cvt.pw.ps", "D,S", 0x46c00024, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, M3D },
- {"dabs", "d,v", 0, (int) M_DABS, INSN_MACRO, 0, I3 },
-+{"max", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
- {"dadd", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
- {"dadd", "t,r,I", 0, (int) M_DADD_I, INSN_MACRO, 0, I3 },
- {"daddi", "t,r,j", 0x60000000, 0xfc000000, WR_t|RD_s, 0, I3 },
- {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_t|RD_s, 0, I3 },
-+{"min", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
- {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
- {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3 },
--{"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5 },
-+{"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5|AL },
- {"dclo", "U,s", 0x70000025, 0xfc0007ff, RD_s|WR_d|WR_t, 0, I64|N55 },
- {"dclz", "U,s", 0x70000024, 0xfc0007ff, RD_s|WR_d|WR_t, 0, I64|N55 },
- /* dctr and dctw are used on the r5000. */
-@@ -558,7 +564,7 @@
- {"dremu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, I3 },
- {"dremu", "d,v,t", 3, (int) M_DREMU_3, INSN_MACRO, 0, I3 },
- {"dremu", "d,v,I", 3, (int) M_DREMU_3I, INSN_MACRO, 0, I3 },
--{"dret", "", 0x7000003e, 0xffffffff, 0, 0, N5 },
-+{"dret", "", 0x7000003e, 0xffffffff, 0, 0, N5|AL },
- {"drol", "d,v,t", 0, (int) M_DROL, INSN_MACRO, 0, I3 },
- {"drol", "d,v,I", 0, (int) M_DROL_I, INSN_MACRO, 0, I3 },
- {"dror", "d,v,t", 0, (int) M_DROR, INSN_MACRO, 0, I3 },
-@@ -595,8 +601,8 @@
- {"dsubu", "d,v,I", 0, (int) M_DSUBU_I, INSN_MACRO, 0, I3 },
- {"ei", "", 0x41606020, 0xffffffff, WR_t|WR_C0, 0, I33 },
- {"ei", "t", 0x41606020, 0xffe0ffff, WR_t|WR_C0, 0, I33 },
--{"eret", "", 0x42000018, 0xffffffff, 0, 0, I3|I32 },
--{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, 0, I33 },
-+{"eret", "", 0x42000018, 0xffffffff, 0, 0, I3|I32|AL },
-+{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, 0, I33|AL },
- {"floor.l.d", "D,S", 0x4620000b, 0xffff003f, WR_D|RD_S|FP_D, 0, I3 },
- {"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S, 0, I3 },
- {"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_D, 0, I2 },
-@@ -605,7 +611,7 @@
- {"flushd", "", 0xbc020000, 0xffffffff, 0, 0, L1 },
- {"flushid", "", 0xbc030000, 0xffffffff, 0, 0, L1 },
- {"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 },
--{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 },
-+{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33|AL },
- {"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 },
- {"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I33 },
- {"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, /* jr */
-@@ -639,18 +645,10 @@
- {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_t|RD_b, 0, I3 },
- {"ld", "t,o(b)", 0, (int) M_LD_OB, INSN_MACRO, 0, I1 },
- {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1 },
--{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
--{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
--{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
--{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
--{"l.d", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 }, /* ldc1 */
--{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, 0, I1 },
--{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, 0, I1 },
--{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
--{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, 0, I2 },
--{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
--{"ldc3", "E,A(b)", 0, (int) M_LDC3_AB, INSN_MACRO, 0, I2 },
--{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3 },
-+/* ldc1 is at the bottom of the table. */
-+/* ldc2 is at the bottom of the table. */
-+/* ldc3 is at the bottom of the table. */
-+{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3|AL },
- {"ldl", "t,A(b)", 0, (int) M_LDL_AB, INSN_MACRO, 0, I3 },
- {"ldr", "t,o(b)", 0x6c000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3 },
- {"ldr", "t,A(b)", 0, (int) M_LDR_AB, INSN_MACRO, 0, I3 },
-@@ -680,8 +678,7 @@
- {"lwc1", "E,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, 0, I1 },
- {"l.s", "T,o(b)", 0xc4000000, 0xfc000000, CLD|RD_b|WR_T|FP_S, 0, I1 }, /* lwc1 */
- {"l.s", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, 0, I1 },
--{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
--{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, 0, I1 },
-+/* lwc2 is at the bottom of the table. */
- {"lwc3", "E,o(b)", 0xcc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
- {"lwc3", "E,A(b)", 0, (int) M_LWC3_AB, INSN_MACRO, 0, I1 },
- {"lwl", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, 0, I1 },
-@@ -713,10 +710,12 @@
- {"madd.s", "D,R,S,T", 0x4c000020, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, 0, I4 },
- {"madd.ps", "D,R,S,T", 0x4c000026, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5 },
- {"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-+{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
- {"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55},
- {"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
- {"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
- {"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-+{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
- {"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55},
- {"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
- {"maddu", "d,s,t", 0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
-@@ -739,7 +738,7 @@
- /* mfhc2 is at the bottom of the table. */
- {"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I1 },
- {"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, 0, I32 },
--{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, 0, N5 },
-+{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, 0, N5|AL },
- {"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, 0, I1 },
- {"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, 0, I1 },
- {"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX|SB1 },
-@@ -756,7 +755,7 @@
- {"movf.l", "X,Y,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
- {"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4|I32 },
- {"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5 },
--{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32 },
-+{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32|AL },
- {"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
- {"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4|I32 },
- {"movn.l", "D,S,t", 0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
-@@ -769,7 +768,7 @@
- {"movt.l", "X,Y,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
- {"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4|I32 },
- {"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5 },
--{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32 },
-+{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32|AL },
- {"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
- {"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4|I32 },
- {"movz.l", "D,S,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
-@@ -786,8 +785,10 @@
- {"msub.s", "D,R,S,T", 0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, 0, I4 },
- {"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5 },
- {"msub", "s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-+{"msub", "s,t", 0x0000002e, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
- {"msub", "s,t", 0x70000004, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
- {"msubu", "s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-+{"msubu", "s,t", 0x0000002f, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
- {"msubu", "s,t", 0x70000005, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
- {"mtpc", "t,P", 0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0, 0, M1|N5 },
- {"mtps", "t,P", 0x4080c800, 0xffe0ffc1, COD|RD_t|WR_C0, 0, M1|N5 },
-@@ -802,7 +803,7 @@
- /* mthc2 is at the bottom of the table. */
- {"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, 0, I1 },
- {"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, 0, I32 },
--{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, 0, N5 },
-+{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, 0, N5|AL },
- {"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, 0, I1 },
- {"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, 0, I1 },
- {"mul.d", "D,V,T", 0x46200002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I1 },
-@@ -936,13 +937,13 @@
- {"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I1 },
- {"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I1 },
- {"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I1 },
--{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, 0, N5|I33 },
--{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, N5|I33 },
--{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, 0, I33 },
--{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I33 },
--{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I33 },
--{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I33 },
--{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, I33 },
-+{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, 0, N5|I33|AL },
-+{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, N5|I33|AL },
-+{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, 0, I33|AL },
-+{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I33|AL },
-+{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I33|AL },
-+{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I33|AL },
-+{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, I33|AL },
- {"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, 0, I3 },
- {"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S, 0, I3 },
- {"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_D, 0, I2 },
-@@ -974,24 +975,17 @@
- {"sdbbp", "c,q", 0x0000000e, 0xfc00003f, TRAP, 0, G2 },
- {"sdbbp", "", 0x7000003f, 0xffffffff, TRAP, 0, I32 },
- {"sdbbp", "B", 0x7000003f, 0xfc00003f, TRAP, 0, I32 },
--{"sdc1", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
--{"sdc1", "E,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
--{"sdc1", "T,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, 0, I2 },
--{"sdc1", "E,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, 0, I2 },
--{"sdc2", "E,o(b)", 0xf8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I2 },
--{"sdc2", "E,A(b)", 0, (int) M_SDC2_AB, INSN_MACRO, 0, I2 },
--{"sdc3", "E,o(b)", 0xfc000000, 0xfc000000, SM|RD_C3|RD_b, 0, I2 },
--{"sdc3", "E,A(b)", 0, (int) M_SDC3_AB, INSN_MACRO, 0, I2 },
--{"s.d", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
--{"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, 0, I1 },
--{"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, 0, I1 },
--{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, I3 },
-+/* sdc1 is at the bottom of the table. */
-+/* sdc2 is at the bottom of the table. */
-+/* sdc3 is at the bottom of the table. */
-+/* s.d (sdc1 is at the bottom of the table. */
-+{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, I3|AL },
- {"sdl", "t,A(b)", 0, (int) M_SDL_AB, INSN_MACRO, 0, I3 },
- {"sdr", "t,o(b)", 0xb4000000, 0xfc000000, SM|RD_t|RD_b, 0, I3 },
- {"sdr", "t,A(b)", 0, (int) M_SDR_AB, INSN_MACRO, 0, I3 },
- {"sdxc1", "S,t(b)", 0x4c000009, 0xfc0007ff, SM|RD_S|RD_t|RD_b, 0, I4 },
--{"seb", "d,w", 0x7c000420, 0xffe007ff, WR_d|RD_t, 0, I33 },
--{"seh", "d,w", 0x7c000620, 0xffe007ff, WR_d|RD_t, 0, I33 },
-+{"seb", "d,w", 0x7c000420, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
-+{"seh", "d,w", 0x7c000620, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
- {"selsl", "d,v,t", 0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t, 0, L1 },
- {"selsr", "d,v,t", 0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t, 0, L1 },
- {"seq", "d,v,t", 0, (int) M_SEQ, INSN_MACRO, 0, I1 },
-@@ -1083,8 +1077,7 @@
- {"swc1", "E,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, 0, I1 },
- {"s.s", "T,o(b)", 0xe4000000, 0xfc000000, SM|RD_T|RD_b|FP_S, 0, I1 }, /* swc1 */
- {"s.s", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, 0, I1 },
--{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I1 },
--{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, 0, I1 },
-+/* swc2 is at the bottom of the table. */
- {"swc3", "E,o(b)", 0xec000000, 0xfc000000, SM|RD_C3|RD_b, 0, I1 },
- {"swc3", "E,A(b)", 0, (int) M_SWC3_AB, INSN_MACRO, 0, I1 },
- {"swl", "t,o(b)", 0xa8000000, 0xfc000000, SM|RD_t|RD_b, 0, I1 },
-@@ -1169,7 +1162,8 @@
- {"waiti", "", 0x42000020, 0xffffffff, TRAP, 0, L1 },
- {"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, 0, L1 },
- {"wrpgpr", "d,w", 0x41c00000, 0xffe007ff, RD_t, 0, I33 },
--{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33 },
-+{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
-+{"wsbw", "d,t", 0x7c0000e0, 0xffe007ff, WR_d|RD_t, 0, AL },
- {"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
- {"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, 0, I1 },
- {"xor.ob", "X,Y,Q", 0x7800000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX|SB1 },
-@@ -1179,6 +1173,319 @@
- {"xor.qh", "X,Y,Q", 0x7820000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
- {"xori", "t,r,i", 0x38000000, 0xfc000000, WR_t|RD_s, 0, I1 },
-
-+/* Sony Allegrex CPU core. */
-+{"bitrev", "d,t", 0x7c000520, 0xffe007ff, WR_d|RD_t, 0, AL },
-+{"mfic", "t,G", 0x70000024, 0xffe007ff, LCD|WR_t|RD_C0, 0, AL },
-+{"mtic", "t,G", 0x70000026, 0xffe007ff, COD|RD_t|WR_C0, 0, AL },
-+
-+/* Sony Allegrex VFPU instructions. */
-+{"bvf", "?c,p", 0x49000000, 0xffe30000, CBD|RD_CC, 0, AL },
-+{"bvfl", "?c,p", 0x49020000, 0xffe30000, CBL|RD_CC, 0, AL },
-+{"bvt", "?c,p", 0x49010000, 0xffe30000, CBD|RD_CC, 0, AL },
-+{"bvtl", "?c,p", 0x49030000, 0xffe30000, CBL|RD_CC, 0, AL },
-+{"lv.s", "?m0x,?o(b)", 0xc8000000, 0xfc000000, CLD|RD_s|WR_CC, 0, AL },
-+{"lv.s", "?m0x,A(b)", 0, (int) M_LV_Q_AB, INSN_MACRO, 0, AL },
-+{"ulv.s", "?m0x,o(b)", 0, (int) M_ULV_S, INSN_MACRO, 0, AL },
-+{"lv.q", "?n3x,?o(b)", 0xd8000000, 0xfc000002, CLD|RD_s|WR_CC, 0, AL },
-+{"lv.q", "?n3x,A(b)", 0, (int) M_LV_Q_AB_2, INSN_MACRO, 0, AL },
-+{"ulv.q", "?n3x,?o(b)", 0, (int) M_ULV_Q, INSN_MACRO, 0, AL },
-+{"ulv.q", "?n3x,A(b)", 0, (int) M_ULV_Q_AB, INSN_MACRO, 0, AL },
-+{"lvi.s", "?t0x,l?y0", 0, (int) M_LVI_S, INSN_MACRO, 0, AL },
-+{"lvi.p", "?t1x,?[l?y0,l?y1?]", 0, (int) M_LVI_P, INSN_MACRO, 0, AL },
-+{"lvi.t", "?t2x,?[l?y0,l?y1,l?y2?]", 0, (int) M_LVI_T, INSN_MACRO, 0, AL },
-+{"lvi.q", "?t3x,?[l?y0,l?y1,l?y2,l?y3?]", 0, (int) M_LVI_Q, INSN_MACRO, 0, AL },
-+{"lvhi.s", "?t0x,?[?u?y0,?u?y1?]", 0, (int) M_LVHI_S, INSN_MACRO, 0, AL },
-+{"lvhi.p", "?t1x,?[?u?y0,?u?y1,?u?y2,?u?y3?]", 0, (int) M_LVHI_P, INSN_MACRO, 0, AL },
-+{"sv.s", "?m0x,?o(b)", 0xe8000000, 0xfc000000, SM|RD_s|RD_C2, 0, AL },
-+{"sv.s", "?m0x,A(b)", 0, (int) M_SV_S_AB, INSN_MACRO, 0, AL },
-+{"usv.s", "?m0x,o(b)", 0, (int) M_USV_S, INSN_MACRO, 0, AL },
-+{"sv.q", "?n3x,?o(b)", 0xf8000000, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
-+{"sv.q", "?n3x,?o(b),?z", 0xf8000000, 0xfc000000, SM|RD_s|RD_C2, 0, AL },
-+{"sv.q", "?n3x,A(b)", 0, (int) M_SV_Q_AB, INSN_MACRO, 0, AL },
-+{"sv.q", "?n3x,A(b),?z", 0, (int) M_SV_Q_AB, INSN_MACRO, 0, AL },
-+{"sv.q", "?n3x,A,?z", 0, (int) M_SV_Q_AB, INSN_MACRO, 0, AL },
-+{"usv.q", "?n3x,?o(b)", 0, (int) M_USV_Q, INSN_MACRO, 0, AL },
-+{"usv.q", "?n3x,A(b)", 0, (int) M_USV_Q_AB, INSN_MACRO, 0, AL },
-+{"vwb.q", "?n3x,?o(b)", 0xf8000002, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
-+{"lvl.q", "?n3x,?o(b)", 0xd4000000, 0xfc000002, CLD|RD_s|WR_CC, 0, AL },
-+{"lvl.q", "?n3x,A(b)", 0, (int) M_LVL_Q_AB, INSN_MACRO, 0, AL },
-+{"lvr.q", "?n3x,?o(b)", 0xd4000002, 0xfc000002, CLD|RD_s|WR_CC, 0, AL },
-+{"lvr.q", "?n3x,A(b)", 0, (int) M_LVR_Q_AB, INSN_MACRO, 0, AL },
-+{"svl.q", "?n3x,?o(b)", 0xf4000000, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
-+{"svl.q", "?n3x,A(b)", 0, (int) M_SVL_Q_AB, INSN_MACRO, 0, AL },
-+{"svr.q", "?n3x,?o(b)", 0xf4000002, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
-+{"svr.q", "?n3x,A(b)", 0, (int) M_SVR_Q_AB, INSN_MACRO, 0, AL },
-+{"mtv", "t,?d0z", 0x48e00000, 0xffe0ff80, LCD|WR_t|WR_C2, 0, AL },
-+{"mfv", "t,?d0z", 0x48600000, 0xffe0ff80, COD|RD_t|WR_CC|RD_C2, 0, AL },
-+{"mtvc", "t,?q", 0x48e00000, 0xffe0ff00, LCD|WR_t|WR_C2, 0, AL },
-+{"mfvc", "t,?q", 0x48600000, 0xffe0ff00, COD|RD_t|WR_CC|RD_C2, 0, AL },
-+{"vmtvc", "?q,?s0y", 0xd0510000, 0xffff8000, WR_C2, 0, AL },
-+{"vmfvc", "?d0z,?r", 0xd0500000, 0xffff0080, RD_C2, 0, AL },
-+{"vadd.q", "?d3d,?s3s,?t3t", 0x60008080, 0xff808080, RD_C2, 0, AL },
-+{"vsub.q", "?d3d,?s3s,?t3t", 0x60808080, 0xff808080, RD_C2, 0, AL },
-+{"vdiv.q", "?x3z,?s3y,?t3x", 0x63808080, 0xff808080, RD_C2, 0, AL },
-+{"vmul.q", "?d3d,?s3s,?t3t", 0x64008080, 0xff808080, RD_C2, 0, AL },
-+{"vdot.q", "?d0d,?s3s,?t3t", 0x64808080, 0xff808080, RD_C2, 0, AL },
-+{"vscl.q", "?d3d,?s3s,?t0x", 0x65008080, 0xff808080, RD_C2, 0, AL },
-+{"vhdp.q", "?d0d,?s3y,?t3t", 0x66008080, 0xff808080, RD_C2, 0, AL },
-+{"vcmp.q", "?f2,?s3s,?t3t", 0x6c008080, 0xff8080f0, RD_C2, 0, AL },
-+{"vcmp.q", "?f1,?s3s", 0x6c008080, 0xffff80f0, RD_C2, 0, AL },
-+{"vcmp.q", "?f0", 0x6c008080, 0xfffffff0, RD_C2, 0, AL },
-+{"vmin.q", "?d3d,?s3s,?t3t", 0x6d008080, 0xff808080, RD_C2, 0, AL },
-+{"vmax.q", "?d3d,?s3s,?t3t", 0x6d808080, 0xff808080, RD_C2, 0, AL },
-+{"vsgn.q", "?d3d,?s3s", 0xd04a8080, 0xffff8080, RD_C2, 0, AL },
-+{"vcst.q", "?d3d,?a", 0xd0608080, 0xffe0ff80, RD_C2, 0, AL },
-+{"vscmp.q", "?d3d,?s3s,?t3t", 0x6e808080, 0xff808080, RD_C2, 0, AL },
-+{"vsge.q", "?d3d,?s3s,?t3t", 0x6f008080, 0xff808080, RD_C2, 0, AL },
-+{"vslt.q", "?d3d,?s3s,?t3t", 0x6f808080, 0xff808080, RD_C2, 0, AL },
-+{"vi2uc.q", "?d0m,?s3w", 0xd03c8080, 0xffff8080, RD_C2, 0, AL },
-+{"vi2c.q", "?d0m,?s3w", 0xd03d8080, 0xffff8080, RD_C2, 0, AL },
-+{"vi2us.q", "?d1m,?s3w", 0xd03e8080, 0xffff8080, RD_C2, 0, AL },
-+{"vi2s.q", "?d1m,?s3w", 0xd03f8080, 0xffff8080, RD_C2, 0, AL },
-+{"vmov.q", "?d3d,?s3s", 0xd0008080, 0xffff8080, RD_C2, 0, AL },
-+{"vabs.q", "?d3d,?s3w", 0xd0018080, 0xffff8080, RD_C2, 0, AL },
-+{"vneg.q", "?d3d,?s3w", 0xd0028080, 0xffff8080, RD_C2, 0, AL },
-+{"vidt.q", "?d3d", 0xd0038080, 0xffffff80, RD_C2, 0, AL },
-+{"vsat0.q", "?d3z,?s3s", 0xd0048080, 0xffff8080, RD_C2, 0, AL },
-+{"vsat1.q", "?d3z,?s3s", 0xd0058080, 0xffff8080, RD_C2, 0, AL },
-+{"vzero.q", "?d3d", 0xd0068080, 0xffffff80, RD_C2, 0, AL },
-+{"vone.q", "?d3d", 0xd0078080, 0xffffff80, RD_C2, 0, AL },
-+{"vrcp.q", "?x3z,?s3y", 0xd0108080, 0xffff8080, RD_C2, 0, AL },
-+{"vrsq.q", "?x3z,?s3y", 0xd0118080, 0xffff8080, RD_C2, 0, AL },
-+{"vsin.q", "?x3z,?s3y", 0xd0128080, 0xffff8080, RD_C2, 0, AL },
-+{"vcos.q", "?x3z,?s3y", 0xd0138080, 0xffff8080, RD_C2, 0, AL },
-+{"vexp2.q", "?x3z,?s3y", 0xd0148080, 0xffff8080, RD_C2, 0, AL },
-+{"vlog2.q", "?x3z,?s3y", 0xd0158080, 0xffff8080, RD_C2, 0, AL },
-+{"vsqrt.q", "?x3z,?s3y", 0xd0168080, 0xffff8080, RD_C2, 0, AL },
-+{"vasin.q", "?x3z,?s3y", 0xd0178080, 0xffff8080, RD_C2, 0, AL },
-+{"vnrcp.q", "?x3z,?s3y", 0xd0188080, 0xffff8080, RD_C2, 0, AL },
-+{"vnsin.q", "?x3z,?s3y", 0xd01a8080, 0xffff8080, RD_C2, 0, AL },
-+{"vrexp2.q", "?x3z,?s3y", 0xd01c8080, 0xffff8080, RD_C2, 0, AL },
-+{"vrndi.q", "?d3z", 0xd0218080, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf1.q", "?d3z", 0xd0228080, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf2.q", "?d3z", 0xd0238080, 0xffffff80, RD_C2, 0, AL },
-+{"vf2h.q", "?d1m,?s3s", 0xd0328080, 0xffff8080, RD_C2, 0, AL },
-+{"vsrt1.q", "?d3d,?s3s", 0xd0408080, 0xffff8080, RD_C2, 0, AL },
-+{"vsrt2.q", "?d3d,?s3s", 0xd0418080, 0xffff8080, RD_C2, 0, AL },
-+{"vsrt3.q", "?d3d,?s3s", 0xd0488080, 0xffff8080, RD_C2, 0, AL },
-+{"vsrt4.q", "?d3d,?s3s", 0xd0498080, 0xffff8080, RD_C2, 0, AL },
-+{"vbfy1.q", "?d3d,?s3s", 0xd0428080, 0xffff8080, RD_C2, 0, AL },
-+{"vbfy2.q", "?d3d,?s3s", 0xd0438080, 0xffff8080, RD_C2, 0, AL },
-+{"vocp.q", "?d3d,?s3y", 0xd0448080, 0xffff8080, RD_C2, 0, AL },
-+{"vfad.q", "?d0d,?s3s", 0xd0468080, 0xffff8080, RD_C2, 0, AL },
-+{"vavg.q", "?d0d,?s3s", 0xd0478080, 0xffff8080, RD_C2, 0, AL },
-+{"vf2in.q", "?d3m,?s3s,?b", 0xd2008080, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iz.q", "?d3m,?s3s,?b", 0xd2208080, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iu.q", "?d3m,?s3s,?b", 0xd2408080, 0xffe08080, RD_C2, 0, AL },
-+{"vf2id.q", "?d3m,?s3s,?b", 0xd2608080, 0xffe08080, RD_C2, 0, AL },
-+{"vi2f.q", "?d3d,?s3w,?b", 0xd2808080, 0xffe08080, RD_C2, 0, AL },
-+{"vcmov.q", "?d3d,?s3s,?e", 0, (int) M_VCMOV_Q, INSN_MACRO, 0, AL },
-+{"vcmovt.q", "?d3d,?s3s,?e", 0xd2a08080, 0xfff88080, RD_C2, 0, AL },
-+{"vcmovf.q", "?d3d,?s3s,?e", 0xd2a88080, 0xfff88080, RD_C2, 0, AL },
-+{"vmmul.q", "?v7z,?s7y,?t7x", 0xf0008080, 0xff808080, RD_C2, 0, AL },
-+{"vtfm4.q", "?v3z,?s7y,?t3x", 0xf1808080, 0xff808080, RD_C2, 0, AL },
-+{"vhtfm4.q", "?v3z,?s7y,?t3x", 0xf1808000, 0xff808080, RD_C2, 0, AL },
-+{"vmscl.q", "?x7z,?s7y,?t0x", 0xf2008080, 0xff808080, RD_C2, 0, AL },
-+{"vqmul.q", "?v3z,?s3y,?t3x", 0xf2808080, 0xff808080, RD_C2, 0, AL },
-+{"vmmov.q", "?x7z,?s7y", 0xf3808080, 0xffff8080, RD_C2, 0, AL },
-+{"vmidt.q", "?d7z", 0xf3838080, 0xffffff80, RD_C2, 0, AL },
-+{"vmzero.q", "?d7z", 0xf3868080, 0xffffff80, RD_C2, 0, AL },
-+{"vmone.q", "?d7z", 0xf3878080, 0xffffff80, RD_C2, 0, AL },
-+{"vrot.q", "?x3z,?s0y,?w", 0xf3a08080, 0xffe08080, RD_C2, 0, AL },
-+{"vt4444.q", "?d1z,?s3w", 0xd0598080, 0xffff8080, RD_C2, 0, AL },
-+{"vt5551.q", "?d1z,?s3w", 0xd05a8080, 0xffff8080, RD_C2, 0, AL },
-+{"vt5650.q", "?d1z,?s3w", 0xd05b8080, 0xffff8080, RD_C2, 0, AL },
-+{"vadd.t", "?d2d,?s2s,?t2t", 0x60008000, 0xff808080, RD_C2, 0, AL },
-+{"vsub.t", "?d2d,?s2s,?t2t", 0x60808000, 0xff808080, RD_C2, 0, AL },
-+{"vdiv.t", "?x2z,?s2y,?t2x", 0x63808000, 0xff808080, RD_C2, 0, AL },
-+{"vmul.t", "?d2d,?s2s,?t2t", 0x64008000, 0xff808080, RD_C2, 0, AL },
-+{"vdot.t", "?d0d,?s2s,?t2t", 0x64808000, 0xff808080, RD_C2, 0, AL },
-+{"vscl.t", "?d2d,?s2s,?t0x", 0x65008000, 0xff808080, RD_C2, 0, AL },
-+{"vhdp.t", "?d0d,?s2y,?t2t", 0x66008000, 0xff808080, RD_C2, 0, AL },
-+{"vcrs.t", "?d2d,?s2y,?t2x", 0x66808000, 0xff808080, RD_C2, 0, AL },
-+{"vcmp.t", "?f2,?s2s,?t2t", 0x6c008000, 0xff8080f0, RD_C2, 0, AL },
-+{"vcmp.t", "?f1,?s2s", 0x6c008000, 0xffff80f0, RD_C2, 0, AL },
-+{"vcmp.t", "?f0", 0x6c008000, 0xfffffff0, RD_C2, 0, AL },
-+{"vmin.t", "?d2d,?s2s,?t2t", 0x6d008000, 0xff808080, RD_C2, 0, AL },
-+{"vmax.t", "?d2d,?s2s,?t2t", 0x6d808000, 0xff808080, RD_C2, 0, AL },
-+{"vsgn.t", "?d2d,?s2s", 0xd04a8000, 0xffff8080, RD_C2, 0, AL },
-+{"vcst.t", "?d2d,?a", 0xd0608000, 0xffe0ff80, RD_C2, 0, AL },
-+{"vscmp.t", "?d2d,?s2s,?t2t", 0x6e808000, 0xff808080, RD_C2, 0, AL },
-+{"vsge.t", "?d2d,?s2s,?t2t", 0x6f008000, 0xff808080, RD_C2, 0, AL },
-+{"vslt.t", "?d2d,?s2s,?t2t", 0x6f808000, 0xff808080, RD_C2, 0, AL },
-+{"vmov.t", "?d2d,?s2s", 0xd0008000, 0xffff8080, RD_C2, 0, AL },
-+{"vabs.t", "?d2d,?s2w", 0xd0018000, 0xffff8080, RD_C2, 0, AL },
-+{"vneg.t", "?d2d,?s2w", 0xd0028000, 0xffff8080, RD_C2, 0, AL },
-+{"vsat0.t", "?d2z,?s2s", 0xd0048000, 0xffff8080, RD_C2, 0, AL },
-+{"vsat1.t", "?d2z,?s2s", 0xd0058000, 0xffff8080, RD_C2, 0, AL },
-+{"vzero.t", "?d2d", 0xd0068000, 0xffffff80, RD_C2, 0, AL },
-+{"vone.t", "?d2d", 0xd0078000, 0xffffff80, RD_C2, 0, AL },
-+{"vrcp.t", "?x2z,?s2y", 0xd0108000, 0xffff8080, RD_C2, 0, AL },
-+{"vrsq.t", "?x2z,?s2y", 0xd0118000, 0xffff8080, RD_C2, 0, AL },
-+{"vsin.t", "?x2z,?s2y", 0xd0128000, 0xffff8080, RD_C2, 0, AL },
-+{"vcos.t", "?x2z,?s2y", 0xd0138000, 0xffff8080, RD_C2, 0, AL },
-+{"vexp2.t", "?x2z,?s2y", 0xd0148000, 0xffff8080, RD_C2, 0, AL },
-+{"vlog2.t", "?x2z,?s2y", 0xd0158000, 0xffff8080, RD_C2, 0, AL },
-+{"vsqrt.t", "?x2z,?s2y", 0xd0168000, 0xffff8080, RD_C2, 0, AL },
-+{"vasin.t", "?x2z,?s2y", 0xd0178000, 0xffff8080, RD_C2, 0, AL },
-+{"vnrcp.t", "?x2z,?s2y", 0xd0188000, 0xffff8080, RD_C2, 0, AL },
-+{"vnsin.t", "?x2z,?s2y", 0xd01a8000, 0xffff8080, RD_C2, 0, AL },
-+{"vrexp2.t", "?x2z,?s2y", 0xd01c8000, 0xffff8080, RD_C2, 0, AL },
-+{"vrndi.t", "?d2z", 0xd0218000, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf1.t", "?d2z", 0xd0228000, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf2.t", "?d2z", 0xd0238000, 0xffffff80, RD_C2, 0, AL },
-+{"vocp.t", "?d2d,?s2y", 0xd0448000, 0xffff8080, RD_C2, 0, AL },
-+{"vfad.t", "?d0d,?s2s", 0xd0468000, 0xffff8080, RD_C2, 0, AL },
-+{"vavg.t", "?d0d,?s2s", 0xd0478000, 0xffff8080, RD_C2, 0, AL },
-+{"vf2in.t", "?d2m,?s2s,?b", 0xd2008000, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iz.t", "?d2m,?s2s,?b", 0xd2208000, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iu.t", "?d2m,?s2s,?b", 0xd2408000, 0xffe08080, RD_C2, 0, AL },
-+{"vf2id.t", "?d2m,?s2s,?b", 0xd2608000, 0xffe08080, RD_C2, 0, AL },
-+{"vi2f.t", "?d2d,?s2w,?b", 0xd2808000, 0xffe08080, RD_C2, 0, AL },
-+{"vcmov.t", "?d2d,?s2s,?e", 0, (int) M_VCMOV_T, INSN_MACRO, 0, AL },
-+{"vcmovt.t", "?d2d,?s2s,?e", 0xd2a08000, 0xfff88080, RD_C2, 0, AL },
-+{"vcmovf.t", "?d2d,?s2s,?e", 0xd2a88000, 0xfff88080, RD_C2, 0, AL },
-+{"vmmul.t", "?v6z,?s6y,?t6x", 0xf0008000, 0xff808080, RD_C2, 0, AL },
-+{"vtfm3.t", "?v2z,?s6y,?t2x", 0xf1008000, 0xff808080, RD_C2, 0, AL },
-+{"vhtfm3.t", "?v2z,?s6y,?t2x", 0xf1000080, 0xff808080, RD_C2, 0, AL },
-+{"vmscl.t", "?x6z,?s6y,?t0x", 0xf2008000, 0xff808080, RD_C2, 0, AL },
-+{"vmmov.t", "?x6z,?s6y", 0xf3808000, 0xffff8080, RD_C2, 0, AL },
-+{"vmidt.t", "?d6z", 0xf3838000, 0xffffff80, RD_C2, 0, AL },
-+{"vmzero.t", "?d6z", 0xf3868000, 0xffffff80, RD_C2, 0, AL },
-+{"vmone.t", "?d6z", 0xf3878000, 0xffffff80, RD_C2, 0, AL },
-+{"vrot.t", "?x2z,?s0y,?w", 0xf3a08000, 0xffe08080, RD_C2, 0, AL },
-+{"vcrsp.t", "?d2z,?s2y,?t2x", 0xf2808000, 0xff808080, RD_C2, 0, AL },
-+{"vadd.p", "?d1d,?s1s,?t1t", 0x60000080, 0xff808080, RD_C2, 0, AL },
-+{"vsub.p", "?d1d,?s1s,?t1t", 0x60800080, 0xff808080, RD_C2, 0, AL },
-+{"vdiv.p", "?x1z,?s1y,?t1x", 0x63800080, 0xff808080, RD_C2, 0, AL },
-+{"vmul.p", "?d1d,?s1s,?t1t", 0x64000080, 0xff808080, RD_C2, 0, AL },
-+{"vdot.p", "?d0d,?s1s,?t1t", 0x64800080, 0xff808080, RD_C2, 0, AL },
-+{"vscl.p", "?d1d,?s1s,?t0x", 0x65000080, 0xff808080, RD_C2, 0, AL },
-+{"vhdp.p", "?d0d,?s1y,?t1t", 0x66000080, 0xff808080, RD_C2, 0, AL },
-+{"vdet.p", "?d0d,?s1s,?t1x", 0x67000080, 0xff808080, RD_C2, 0, AL },
-+{"vcmp.p", "?f2,?s1s,?t1t", 0x6c000080, 0xff8080f0, RD_C2, 0, AL },
-+{"vcmp.p", "?f1,?s1s", 0x6c000080, 0xffff80f0, RD_C2, 0, AL },
-+{"vcmp.p", "?f0", 0x6c000080, 0xfffffff0, RD_C2, 0, AL },
-+{"vmin.p", "?d1d,?s1s,?t1t", 0x6d000080, 0xff808080, RD_C2, 0, AL },
-+{"vmax.p", "?d1d,?s1s,?t1t", 0x6d800080, 0xff808080, RD_C2, 0, AL },
-+{"vsgn.p", "?d1d,?s1s", 0xd04a0080, 0xffff8080, RD_C2, 0, AL },
-+{"vcst.p", "?d1d,?a", 0xd0600080, 0xffe0ff80, RD_C2, 0, AL },
-+{"vscmp.p", "?d1d,?s1s,?t1t", 0x6e800080, 0xff808080, RD_C2, 0, AL },
-+{"vsge.p", "?d1d,?s1s,?t1t", 0x6f000080, 0xff808080, RD_C2, 0, AL },
-+{"vslt.p", "?d1d,?s1s,?t1t", 0x6f800080, 0xff808080, RD_C2, 0, AL },
-+{"vus2i.p", "?d3m,?s1y", 0xd03a0080, 0xffff8080, RD_C2, 0, AL },
-+{"vs2i.p", "?d3m,?s1y", 0xd03b0080, 0xffff8080, RD_C2, 0, AL },
-+{"vi2us.p", "?d0m,?s1w", 0xd03e0080, 0xffff8080, RD_C2, 0, AL },
-+{"vi2s.p", "?d0m,?s1w", 0xd03f0080, 0xffff8080, RD_C2, 0, AL },
-+{"vmov.p", "?d1d,?s1s", 0xd0000080, 0xffff8080, RD_C2, 0, AL },
-+{"vabs.p", "?d1d,?s1w", 0xd0010080, 0xffff8080, RD_C2, 0, AL },
-+{"vneg.p", "?d1d,?s1w", 0xd0020080, 0xffff8080, RD_C2, 0, AL },
-+{"vidt.p", "?d1d", 0xd0030080, 0xffffff80, RD_C2, 0, AL },
-+{"vsat0.p", "?d1z,?s1s", 0xd0040080, 0xffff8080, RD_C2, 0, AL },
-+{"vsat1.p", "?d1z,?s1s", 0xd0050080, 0xffff8080, RD_C2, 0, AL },
-+{"vzero.p", "?d1d", 0xd0060080, 0xffffff80, RD_C2, 0, AL },
-+{"vone.p", "?d1d", 0xd0070080, 0xffffff80, RD_C2, 0, AL },
-+{"vrcp.p", "?x1z,?s1y", 0xd0100080, 0xffff8080, RD_C2, 0, AL },
-+{"vrsq.p", "?x1z,?s1y", 0xd0110080, 0xffff8080, RD_C2, 0, AL },
-+{"vsin.p", "?x1z,?s1y", 0xd0120080, 0xffff8080, RD_C2, 0, AL },
-+{"vcos.p", "?x1z,?s1y", 0xd0130080, 0xffff8080, RD_C2, 0, AL },
-+{"vexp2.p", "?x1z,?s1y", 0xd0140080, 0xffff8080, RD_C2, 0, AL },
-+{"vlog2.p", "?x1z,?s1y", 0xd0150080, 0xffff8080, RD_C2, 0, AL },
-+{"vsqrt.p", "?x1z,?s1y", 0xd0160080, 0xffff8080, RD_C2, 0, AL },
-+{"vasin.p", "?x1z,?s1y", 0xd0170080, 0xffff8080, RD_C2, 0, AL },
-+{"vnrcp.p", "?x1z,?s1y", 0xd0180080, 0xffff8080, RD_C2, 0, AL },
-+{"vnsin.p", "?x1z,?s1y", 0xd01a0080, 0xffff8080, RD_C2, 0, AL },
-+{"vrexp2.p", "?x1z,?s1y", 0xd01c0080, 0xffff8080, RD_C2, 0, AL },
-+{"vrndi.p", "?d1z", 0xd0210080, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf1.p", "?d1z", 0xd0220080, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf2.p", "?d1z", 0xd0230080, 0xffffff80, RD_C2, 0, AL },
-+{"vf2h.p", "?d0m,?s1s", 0xd0320080, 0xffff8080, RD_C2, 0, AL },
-+{"vh2f.p", "?d3d,?s1y", 0xd0330080, 0xffff8080, RD_C2, 0, AL },
-+{"vbfy1.p", "?d1d,?s1s", 0xd0420080, 0xffff8080, RD_C2, 0, AL },
-+{"vocp.p", "?d1d,?s1y", 0xd0440080, 0xffff8080, RD_C2, 0, AL },
-+{"vsocp.p", "?d3z,?s1y", 0xd0450080, 0xffff8080, RD_C2, 0, AL },
-+{"vfad.p", "?d0d,?s1s", 0xd0460080, 0xffff8080, RD_C2, 0, AL },
-+{"vavg.p", "?d0d,?s1s", 0xd0470080, 0xffff8080, RD_C2, 0, AL },
-+{"vf2in.p", "?d1m,?s1s,?b", 0xd2000080, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iz.p", "?d1m,?s1s,?b", 0xd2200080, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iu.p", "?d1m,?s1s,?b", 0xd2400080, 0xffe08080, RD_C2, 0, AL },
-+{"vf2id.p", "?d1m,?s1s,?b", 0xd2600080, 0xffe08080, RD_C2, 0, AL },
-+{"vi2f.p", "?d1d,?s1w,?b", 0xd2800080, 0xffe08080, RD_C2, 0, AL },
-+{"vcmov.p", "?d1d,?s1s,?e", 0, (int) M_VCMOV_P, INSN_MACRO, 0, AL },
-+{"vcmovt.p", "?d1d,?s1s,?e", 0xd2a00080, 0xfff88080, RD_C2, 0, AL },
-+{"vcmovf.p", "?d1d,?s1s,?e", 0xd2a80080, 0xfff88080, RD_C2, 0, AL },
-+{"vmmul.p", "?v5z,?s5y,?t5x", 0xf0000080, 0xff808080, RD_C2, 0, AL },
-+{"vtfm2.p", "?v1z,?s5y,?t1x", 0xf0800080, 0xff808080, RD_C2, 0, AL },
-+{"vhtfm2.p", "?v1z,?s5y,?t1x", 0xf0800000, 0xff808080, RD_C2, 0, AL },
-+{"vmscl.p", "?x5z,?s5y,?t0x", 0xf2000080, 0xff808080, RD_C2, 0, AL },
-+{"vmmov.p", "?x5z,?s5y", 0xf3800080, 0xffff8080, RD_C2, 0, AL },
-+{"vmidt.p", "?d5z", 0xf3830080, 0xffffff80, RD_C2, 0, AL },
-+{"vmzero.p", "?d5z", 0xf3860080, 0xffffff80, RD_C2, 0, AL },
-+{"vmone.p", "?d5z", 0xf3870080, 0xffffff80, RD_C2, 0, AL },
-+{"vrot.p", "?x1z,?s0y,?w", 0xf3a00080, 0xffe08080, RD_C2, 0, AL },
-+{"vadd.s", "?d0d,?s0s,?t0t", 0x60000000, 0xff808080, RD_C2, 0, AL },
-+{"vsub.s", "?d0d,?s0s,?t0t", 0x60800000, 0xff808080, RD_C2, 0, AL },
-+{"vdiv.s", "?x0d,?s0s,?t0t", 0x63800000, 0xff808080, RD_C2, 0, AL },
-+{"vmul.s", "?d0d,?s0s,?t0t", 0x64000000, 0xff808080, RD_C2, 0, AL },
-+{"vcmp.s", "?f2,?s0s,?t0t", 0x6c000000, 0xff8080f0, RD_C2, 0, AL },
-+{"vcmp.s", "?f1,?s0s", 0x6c000000, 0xffff80f0, RD_C2, 0, AL },
-+{"vcmp.s", "?f0", 0x6c000000, 0xfffffff0, RD_C2, 0, AL },
-+{"vmin.s", "?d0d,?s0s,?t0t", 0x6d000000, 0xff808080, RD_C2, 0, AL },
-+{"vmax.s", "?d0d,?s0s,?t0t", 0x6d800000, 0xff808080, RD_C2, 0, AL },
-+{"vsgn.s", "?d0d,?s0s", 0xd04a0000, 0xffff8080, RD_C2, 0, AL },
-+{"vcst.s", "?d0d,?a", 0xd0600000, 0xffe0ff80, RD_C2, 0, AL },
-+{"vscmp.s", "?d0d,?s0s,?t0t", 0x6e800000, 0xff808080, RD_C2, 0, AL },
-+{"vsge.s", "?d0d,?s0s,?t0t", 0x6f000000, 0xff808080, RD_C2, 0, AL },
-+{"vslt.s", "?d0d,?s0s,?t0t", 0x6f800000, 0xff808080, RD_C2, 0, AL },
-+{"vus2i.s", "?d1m,?s0y", 0xd03a0000, 0xffff8080, RD_C2, 0, AL },
-+{"vs2i.s", "?d1m,?s0y", 0xd03b0000, 0xffff8080, RD_C2, 0, AL },
-+{"vmov.s", "?d0d,?s0s", 0xd0000000, 0xffff8080, RD_C2, 0, AL },
-+{"vabs.s", "?d0d,?s0w", 0xd0010000, 0xffff8080, RD_C2, 0, AL },
-+{"vneg.s", "?d0d,?s0w", 0xd0020000, 0xffff8080, RD_C2, 0, AL },
-+{"vsat0.s", "?d0z,?s0s", 0xd0040000, 0xffff8080, RD_C2, 0, AL },
-+{"vsat1.s", "?d0z,?s0s", 0xd0050000, 0xffff8080, RD_C2, 0, AL },
-+{"vzero.s", "?d0d", 0xd0060000, 0xffffff80, RD_C2, 0, AL },
-+{"vone.s", "?d0d", 0xd0070000, 0xffffff80, RD_C2, 0, AL },
-+{"vrcp.s", "?x0d,?s0s", 0xd0100000, 0xffff8080, RD_C2, 0, AL },
-+{"vrsq.s", "?x0d,?s0s", 0xd0110000, 0xffff8080, RD_C2, 0, AL },
-+{"vsin.s", "?x0d,?s0s", 0xd0120000, 0xffff8080, RD_C2, 0, AL },
-+{"vcos.s", "?x0d,?s0s", 0xd0130000, 0xffff8080, RD_C2, 0, AL },
-+{"vexp2.s", "?x0d,?s0s", 0xd0140000, 0xffff8080, RD_C2, 0, AL },
-+{"vlog2.s", "?x0d,?s0s", 0xd0150000, 0xffff8080, RD_C2, 0, AL },
-+{"vsqrt.s", "?x0d,?s0s", 0xd0160000, 0xffff8080, RD_C2, 0, AL },
-+{"vasin.s", "?x0d,?s0s", 0xd0170000, 0xffff8080, RD_C2, 0, AL },
-+{"vnrcp.s", "?x0d,?s0y", 0xd0180000, 0xffff8080, RD_C2, 0, AL },
-+{"vnsin.s", "?x0d,?s0y", 0xd01a0000, 0xffff8080, RD_C2, 0, AL },
-+{"vrexp2.s", "?x0d,?s0y", 0xd01c0000, 0xffff8080, RD_C2, 0, AL },
-+{"vrnds.s", "?s0y", 0xd0200000, 0xffff80ff, RD_C2, 0, AL },
-+{"vrndi.s", "?d0d", 0xd0210000, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf1.s", "?d0d", 0xd0220000, 0xffffff80, RD_C2, 0, AL },
-+{"vrndf2.s", "?d0d", 0xd0230000, 0xffffff80, RD_C2, 0, AL },
-+{"vh2f.s", "?d1d,?s0y", 0xd0330000, 0xffff8080, RD_C2, 0, AL },
-+{"vsbz.s", "?d0d,?s0s", 0xd0360000, 0xffff8080, RD_C2, 0, AL },
-+{"vsbn.s", "?d0d,?s0s,?t0t", 0x61000000, 0xff808080, RD_C2, 0, AL },
-+{"vlgb.s", "?d0d,?s0s", 0xd0370000, 0xffff8080, RD_C2, 0, AL },
-+{"vocp.s", "?d0d,?s0y", 0xd0440000, 0xffff8080, RD_C2, 0, AL },
-+{"vsocp.s", "?d1z,?s0y", 0xd0450000, 0xffff8080, RD_C2, 0, AL },
-+{"vf2in.s", "?d0m,?s0s,?b", 0xd2000000, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iz.s", "?d0m,?s0s,?b", 0xd2200000, 0xffe08080, RD_C2, 0, AL },
-+{"vf2iu.s", "?d0m,?s0s,?b", 0xd2400000, 0xffe08080, RD_C2, 0, AL },
-+{"vf2id.s", "?d0m,?s0s,?b", 0xd2600000, 0xffe08080, RD_C2, 0, AL },
-+{"vi2f.s", "?d0d,?s0w,?b", 0xd2800000, 0xffe08080, RD_C2, 0, AL },
-+{"vcmov.s", "?d0d,?s0s,?e", 0, (int) M_VCMOV_S, INSN_MACRO, 0, AL },
-+{"vcmovt.s", "?d0d,?s0s,?e", 0xd2a00000, 0xfff88080, RD_C2, 0, AL },
-+{"vcmovf.s", "?d0d,?s0s,?e", 0xd2a80000, 0xfff88080, RD_C2, 0, AL },
-+{"vwbn.s", "?d0d,?s0s,?i", 0xd3000000, 0xff008080, RD_C2, 0, AL },
-+{"vpfxs", "?0,?1,?2,?3", 0xdc000000, 0xff000000, RD_C2, 0, AL },
-+{"vpfxt", "?0,?1,?2,?3", 0xdd000000, 0xff000000, RD_C2, 0, AL },
-+{"vpfxd", "?4,?5,?6,?7", 0xde000000, 0xff000000, RD_C2, 0, AL },
-+{"viim.s", "?t0d,j", 0xdf000000, 0xff800000, RD_C2, 0, AL },
-+{"vfim.s", "?t0d,?u", 0xdf800000, 0xff800000, RD_C2, 0, AL },
-+{"vnop", "", 0xffff0000, 0xffffffff, RD_C2, 0, AL },
-+{"vflush", "", 0xffff040d, 0xffffffff, RD_C2, 0, AL },
-+{"vsync", "", 0xffff0320, 0xffffffff, RD_C2, 0, AL },
-+{"vsync", "i", 0xffff0000, 0xffff0000, RD_C2, 0, AL },
-+
- /* Coprocessor 2 move/branch operations overlap with VR5400 .ob format
- instructions so they are here for the latters to take precedence. */
- {"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, 0, I1 },
-@@ -1198,6 +1505,36 @@
- {"mtc2", "t,G,H", 0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, 0, I32 },
- {"mthc2", "t,i", 0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC, 0, I33 },
-
-+/* Coprocessor 2 load/store operations overlap with the Allegrex VFPU
-+ instructions so they are here for the latters to take precedence. */
-+/* COP1 ldc1 and sdc1 and COP3 ldc3 and sdc3 also overlap with the VFPU. */
-+{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
-+{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
-+{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
-+{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
-+{"l.d", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 }, /* ldc1 */
-+{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, 0, I1 },
-+{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, 0, I1 },
-+{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
-+{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, 0, I2 },
-+{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
-+{"ldc3", "E,A(b)", 0, (int) M_LDC3_AB, INSN_MACRO, 0, I2 },
-+{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
-+{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, 0, I1 },
-+{"sdc1", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
-+{"sdc1", "E,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
-+{"sdc1", "T,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, 0, I2 },
-+{"sdc1", "E,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, 0, I2 },
-+{"s.d", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
-+{"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, 0, I1 },
-+{"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, 0, I1 },
-+{"sdc2", "E,o(b)", 0xf8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I2 },
-+{"sdc2", "E,A(b)", 0, (int) M_SDC2_AB, INSN_MACRO, 0, I2 },
-+{"sdc3", "E,o(b)", 0xfc000000, 0xfc000000, SM|RD_C3|RD_b, 0, I2 },
-+{"sdc3", "E,A(b)", 0, (int) M_SDC3_AB, INSN_MACRO, 0, I2 },
-+{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I1 },
-+{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, 0, I1 },
-+
- /* No hazard protection on coprocessor instructions--they shouldn't
- change the state of the processor and if they do it's up to the
- user to put in nops as necessary. These are at the end so that the
diff --git a/dkpsp/patches/binutils-2.22.patch b/dkpsp/patches/binutils-2.22.patch
new file mode 100644
index 0000000..61200c6
--- /dev/null
+++ b/dkpsp/patches/binutils-2.22.patch
@@ -0,0 +1,4473 @@
+diff -Nbaur binutils-2.22/bfd/archures.c binutils-2.22-psp/bfd/archures.c
+--- binutils-2.22/bfd/archures.c 2011-08-02 00:04:19.000000000 +0100
++++ binutils-2.22-psp/bfd/archures.c 2012-02-25 14:09:05.000000000 +0000
+@@ -175,6 +175,7 @@
+ .#define bfd_mach_mips_loongson_2f 3002
+ .#define bfd_mach_mips_loongson_3a 3003
+ .#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *}
++.#define bfd_mach_mips_allegrex 10111431 {* octal 'AL', 31 *}
+ .#define bfd_mach_mips_octeon 6501
+ .#define bfd_mach_mips_xlr 887682 {* decimal 'XLR' *}
+ .#define bfd_mach_mipsisa32 32
+diff -Nbaur binutils-2.22/bfd/bfd-in2.h binutils-2.22-psp/bfd/bfd-in2.h
+--- binutils-2.22/bfd/bfd-in2.h 2011-09-16 02:15:18.000000000 +0100
++++ binutils-2.22-psp/bfd/bfd-in2.h 2012-02-25 14:09:05.000000000 +0000
+@@ -1882,6 +1882,7 @@
+ #define bfd_mach_mips_loongson_2f 3002
+ #define bfd_mach_mips_loongson_3a 3003
+ #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
++#define bfd_mach_mips_allegrex 10111431 /* octal 'AL', 31 */
+ #define bfd_mach_mips_octeon 6501
+ #define bfd_mach_mips_xlr 887682 /* decimal 'XLR' */
+ #define bfd_mach_mipsisa32 32
+diff -Nbaur binutils-2.22/bfd/cpu-mips.c binutils-2.22-psp/bfd/cpu-mips.c
+--- binutils-2.22/bfd/cpu-mips.c 2011-07-24 15:20:05.000000000 +0100
++++ binutils-2.22-psp/bfd/cpu-mips.c 2012-02-25 14:09:05.000000000 +0000
+@@ -89,6 +89,7 @@
+ I_mipsisa64,
+ I_mipsisa64r2,
+ I_sb1,
++ I_allegrex,
+ I_loongson_2e,
+ I_loongson_2f,
+ I_loongson_3a,
+@@ -130,6 +131,7 @@
+ N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)),
+ N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)),
+ N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, NN(I_sb1)),
++ N (32, 32, bfd_mach_mips_allegrex, "mips:allegrex", FALSE, NN(I_allegrex)),
+ N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", FALSE, NN(I_loongson_2e)),
+ N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", FALSE, NN(I_loongson_2f)),
+ N (64, 64, bfd_mach_mips_loongson_3a, "mips:loongson_3a", FALSE, NN(I_loongson_3a)),
+diff -Nbaur binutils-2.22/bfd/elfxx-mips.c binutils-2.22-psp/bfd/elfxx-mips.c
+--- binutils-2.22/bfd/elfxx-mips.c 2011-11-21 09:29:27.000000000 +0000
++++ binutils-2.22-psp/bfd/elfxx-mips.c 2012-02-25 14:09:05.000000000 +0000
+@@ -6173,14 +6173,19 @@
+ case E_MIPS_MACH_SB1:
+ return bfd_mach_mips_sb1;
+
++ case E_MIPS_MACH_ALLEGREX:
++ return bfd_mach_mips_allegrex;
++
+ case E_MIPS_MACH_LS2E:
+ return bfd_mach_mips_loongson_2e;
+
+ case E_MIPS_MACH_LS2F:
+ return bfd_mach_mips_loongson_2f;
+
++ /*
+ case E_MIPS_MACH_LS3A:
+ return bfd_mach_mips_loongson_3a;
++ */
+
+ case E_MIPS_MACH_OCTEON:
+ return bfd_mach_mips_octeon;
+@@ -10882,6 +10887,10 @@
+ val = E_MIPS_ARCH_64 | E_MIPS_MACH_SB1;
+ break;
+
++ case bfd_mach_mips_allegrex:
++ val = E_MIPS_ARCH_2 | E_MIPS_MACH_ALLEGREX;
++ break;
++
+ case bfd_mach_mips_loongson_3a:
+ val = E_MIPS_ARCH_64 | E_MIPS_MACH_LS3A;
+ break;
+@@ -13544,6 +13553,7 @@
+ /* MIPS II extensions. */
+ { bfd_mach_mips4000, bfd_mach_mips6000 },
+ { bfd_mach_mipsisa32, bfd_mach_mips6000 },
++ { bfd_mach_mips_allegrex, bfd_mach_mips6000 },
+
+ /* MIPS I extensions. */
+ { bfd_mach_mips6000, bfd_mach_mips3000 },
+diff -Nbaur binutils-2.22/bfd/version.h binutils-2.22-psp/bfd/version.h
+--- binutils-2.22/bfd/version.h 2011-11-21 09:29:28.000000000 +0000
++++ binutils-2.22-psp/bfd/version.h 2012-02-25 14:09:05.000000000 +0000
+@@ -1,4 +1,4 @@
+-#define BFD_VERSION_DATE 20111121
++#define BFD_VERSION_DATE (PSNPT 20120103)
+ #define BFD_VERSION @bfd_version@
+ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
+ #define REPORT_BUGS_TO @report_bugs_to@
+diff -Nbaur binutils-2.22/binutils/readelf.c binutils-2.22-psp/binutils/readelf.c
+--- binutils-2.22/binutils/readelf.c 2011-09-21 21:49:13.000000000 +0100
++++ binutils-2.22-psp/binutils/readelf.c 2012-02-25 14:09:05.000000000 +0000
+@@ -2395,10 +2395,11 @@
+ case E_MIPS_MACH_9000: strcat (buf, ", 9000"); break;
+ case E_MIPS_MACH_LS2E: strcat (buf, ", loongson-2e"); break;
+ case E_MIPS_MACH_LS2F: strcat (buf, ", loongson-2f"); break;
+- case E_MIPS_MACH_LS3A: strcat (buf, ", loongson-3a"); break;
++ /* case E_MIPS_MACH_LS3A: strcat (buf, ", loongson-3a"); break; */
+ case E_MIPS_MACH_OCTEON: strcat (buf, ", octeon"); break;
+ case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
+ case E_MIPS_MACH_XLR: strcat (buf, ", xlr"); break;
++ case E_MIPS_MACH_ALLEGREX: strcat(buf, ", allegrex"); break;
+ case 0:
+ /* We simply ignore the field in this case to avoid confusion:
+ MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
+diff -Nbaur binutils-2.22/config.sub binutils-2.22-psp/config.sub
+--- binutils-2.22/config.sub 2011-06-06 11:36:06.000000000 +0100
++++ binutils-2.22-psp/config.sub 2012-02-25 14:09:05.000000000 +0000
+@@ -279,6 +279,7 @@
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
++ | mipsallegrex | mipsallegrexel \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+@@ -389,6 +390,7 @@
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
++ | mipsallegrex-* | mipsallegrexel-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+@@ -788,6 +790,10 @@
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
++ psp)
++ basic_machine=mipsallegrexel-psp
++ os=-elf
++ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+diff -Nbaur binutils-2.22/configure binutils-2.22-psp/configure
+--- binutils-2.22/configure 2011-08-14 13:28:15.000000000 +0100
++++ binutils-2.22-psp/configure 2012-02-25 14:09:05.000000000 +0000
+@@ -2667,7 +2667,7 @@
+ # binutils, gas and ld appear in that order because it makes sense to run
+ # "make check" in that particular order.
+ # If --enable-gold is used, "gold" may replace "ld".
+-host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools"
++host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb etc expect dejagnu m4 utils guile fastjar gnattools"
+
+ # libgcj represents the runtime libraries only used by gcj.
+ libgcj="target-libffi \
+@@ -3568,7 +3568,6 @@
+ mips*-*-linux*)
+ ;;
+ mips*-*-*)
+- noconfigdirs="$noconfigdirs gprof"
+ ;;
+ sh-*-* | sh64-*-*)
+ case "${target}" in
+diff -Nbaur binutils-2.22/gas/config/tc-mips.c binutils-2.22-psp/gas/config/tc-mips.c
+--- binutils-2.22/gas/config/tc-mips.c 2011-11-21 09:29:32.000000000 +0000
++++ binutils-2.22-psp/gas/config/tc-mips.c 2012-02-25 14:09:05.000000000 +0000
+@@ -91,8 +91,32 @@
+
+ #define ZERO 0
+ #define ATREG 1
++#define V0 2
++#define V1 3
++#define A0 4
++#define A1 5
++#define A2 6
++#define A3 7
++#define T0 8
++#define T1 9
++#define T2 10
++#define T3 11
++#define T4 12
++#define T5 13
++#define T6 14
++#define T7 15
+ #define S0 16
++#define S1 17
++#define S2 18
++#define S3 19
++#define S4 20
++#define S5 21
++#define S6 22
+ #define S7 23
++#define T8 24
++#define T9 25
++#define K0 26
++#define K1 27
+ #define TREG 24
+ #define PIC_CALL_REG 25
+ #define KT0 26
+@@ -490,11 +514,14 @@
+ /* Return true if the given CPU supports the microMIPS ASE. */
+ #define CPU_HAS_MICROMIPS(cpu) 0
+
++/* True if the given CPU belongs to the Allegrex family. */
++#define CPU_IS_ALLEGREX(CPU) ((CPU) == CPU_ALLEGREX)
++
+ /* True if CPU has a dror instruction. */
+ #define CPU_HAS_DROR(CPU) ((CPU) == CPU_VR5400 || (CPU) == CPU_VR5500)
+
+ /* True if CPU has a ror instruction. */
+-#define CPU_HAS_ROR(CPU) CPU_HAS_DROR (CPU)
++#define CPU_HAS_ROR(CPU) CPU_HAS_DROR (CPU) || CPU_IS_ALLEGREX (CPU)
+
+ /* True if CPU has seq/sne and seqi/snei instructions. */
+ #define CPU_HAS_SEQ(CPU) ((CPU) == CPU_OCTEON)
+@@ -528,6 +555,7 @@
+ || mips_opts.arch == CPU_R16000 \
+ || mips_opts.arch == CPU_RM7000 \
+ || mips_opts.arch == CPU_VR5500 \
++ || mips_opts.arch == CPU_ALLEGREX \
+ || mips_opts.micromips \
+ )
+
+@@ -1563,6 +1591,8 @@
+ static expressionS imm_expr;
+ static expressionS imm2_expr;
+ static expressionS offset_expr;
++static expressionS vimm_expr[4];
++static expressionS voffset_expr[4];
+
+ /* Relocs associated with imm_expr and offset_expr. */
+
+@@ -1571,6 +1601,15 @@
+ static bfd_reloc_code_real_type offset_reloc[3]
+ = {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
+
++/* set by vfpu code for prefix instructions */
++
++static bfd_boolean vfpu_dprefix;
++static char vfpu_dprefix_str[64];
++static bfd_boolean vfpu_sprefix;
++static char vfpu_sprefix_str[64];
++static bfd_boolean vfpu_tprefix;
++static char vfpu_tprefix_str[64];
++
+ /* This is set to the resulting size of the instruction to be produced
+ by mips16_ip if an explicit extension is used or by mips_ip if an
+ explicit size is supplied. */
+@@ -2580,6 +2619,56 @@
+ return;
+ }
+
++ /* If we've generated operands for a VFPU prefix instruction then we need
++ to assemble and append the prefix instruction before emitting the
++ instruction it prefixes. Note that in mips_ip prefix operands do not
++ cause any side effects with imm_expr or offset_expr. If they did
++ we'd have to save and restore them here. */
++ if (CPU_IS_ALLEGREX (mips_opts.arch) && ((vfpu_dprefix || vfpu_sprefix || vfpu_tprefix)))
++ {
++
++ if (mips_opts.noreorder
++ && ( history[0].insn_mo->pinfo & (INSN_UNCOND_BRANCH_DELAY
++ | INSN_COND_BRANCH_DELAY
++ | INSN_COND_BRANCH_LIKELY)))
++ {
++ as_bad (_("instruction with prefix cannot be used in branch delay slot"));
++ }
++
++ if (vfpu_dprefix)
++ {
++ struct mips_cl_insn prefix;
++ char buf[256];
++
++ sprintf (buf, "vpfxd %s", vfpu_dprefix_str);
++ mips_ip (buf, &prefix);
++ append_insn (&prefix, NULL, unused_reloc, FALSE);
++ vfpu_dprefix = FALSE;
++ }
++
++ if (vfpu_sprefix)
++ {
++ struct mips_cl_insn prefix;
++ char buf[256];
++
++ sprintf (buf, "vpfxs %s", vfpu_sprefix_str);
++ mips_ip (buf, &prefix);
++ append_insn ( &prefix, NULL, unused_reloc, FALSE);
++ vfpu_sprefix = FALSE;
++ }
++
++ if (vfpu_tprefix)
++ {
++ struct mips_cl_insn prefix;
++ char buf[256];
++
++ sprintf (buf, "vpfxt %s", vfpu_tprefix_str);
++ mips_ip (buf, &prefix);
++ append_insn (&prefix, NULL, unused_reloc, FALSE);
++ vfpu_tprefix = FALSE;
++ }
++ }
++
+ if (insn.insn_mo->pinfo == INSN_MACRO)
+ {
+ macro_start ();
+@@ -5085,6 +5174,55 @@
+ }
+ continue;
+
++ /* VFPU fields */
++ case '?':
++ switch (*fmt++)
++ {
++ case 'o':
++ *r = (bfd_reloc_code_real_type) va_arg (args, int);
++ gas_assert (*r == BFD_RELOC_GPREL16
++ || *r == BFD_RELOC_MIPS_LITERAL
++ || *r == BFD_RELOC_MIPS_HIGHER
++ || *r == BFD_RELOC_HI16_S
++ || *r == BFD_RELOC_LO16
++ || *r == BFD_RELOC_MIPS_GOT16
++ || *r == BFD_RELOC_MIPS_CALL16
++ || *r == BFD_RELOC_MIPS_GOT_DISP
++ || *r == BFD_RELOC_MIPS_GOT_PAGE
++ || *r == BFD_RELOC_MIPS_GOT_OFST
++ || *r == BFD_RELOC_MIPS_GOT_LO16
++ || *r == BFD_RELOC_MIPS_CALL_LO16);
++ break;
++ case 'd':
++ insn.insn_opcode |= va_arg (args, int) << VF_SH_VD;
++ fmt += 2;
++ break;
++ case 's':
++ insn.insn_opcode |= va_arg (args, int) << VF_SH_VS;
++ fmt += 2;
++ break;
++ case 'm':
++ {
++ int vtreg = va_arg (args, int);
++ insn.insn_opcode |= (vtreg & VF_MASK_VML) << VF_SH_VML;
++ insn.insn_opcode |= ((vtreg >> 5) & VF_MASK_VMH) << VF_SH_VMH;
++ fmt += 2;
++ }
++ break;
++ case 'n':
++ {
++ int vtreg = va_arg (args, int);
++ insn.insn_opcode |= (vtreg & VF_MASK_VNL) << VF_SH_VNL;
++ insn.insn_opcode |= ((vtreg >> 5) & VF_MASK_VNH) << VF_SH_VNH;
++ fmt += 2;
++ }
++ break;
++ case 'e':
++ insn.insn_opcode |= va_arg (args, int) << VF_SH_MCOND;
++ break;
++ }
++ continue;
++
+ default:
+ internalError ();
+ }
+@@ -6241,6 +6379,7 @@
+ macro (struct mips_cl_insn *ip)
+ {
+ unsigned int treg, sreg, dreg, breg;
++ int vsreg, vtreg, vdreg, vmreg, vwb;
+ unsigned int tempreg;
+ int mask;
+ int used_at = 0;
+@@ -6272,6 +6411,13 @@
+ sreg = breg = EXTRACT_OPERAND (mips_opts.micromips, RS, *ip);
+ mask = ip->insn_mo->mask;
+
++ vmreg = ((ip->insn_opcode >> 16) & 0x1f)
++ | ((ip->insn_opcode << 5) & 0x60);
++ vtreg = (ip->insn_opcode >> 16) & 0x7f;
++ vsreg = (ip->insn_opcode >> 8) & 0x7f;
++ vdreg = (ip->insn_opcode >> 0) & 0x7f;
++ vwb = (ip->insn_opcode >> 1) & 0x1;
++
+ label_expr.X_op = O_constant;
+ label_expr.X_op_symbol = NULL;
+ label_expr.X_add_symbol = NULL;
+@@ -7964,6 +8110,34 @@
+ /* Itbl support may require additional care here. */
+ coproc = 1;
+ goto ld_st;
++ case M_LV_S_AB:
++ s = "lv.s";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?m0x,?o(b)";
++ treg = vmreg;
++ goto ld;
++ case M_LV_Q_AB:
++ s = "lv.q";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?n3x,?o(b)";
++ treg = vmreg;
++ goto ld;
++ case M_LVL_Q_AB:
++ s = "lvl.q";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?n3x,?o(b)";
++ treg = vmreg;
++ goto ld;
++ case M_LVR_Q_AB:
++ s = "lvr.q";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?n3x,?o(b)";
++ treg = vmreg;
++ goto ld;
+ case M_LWL_AB:
+ ab = 1;
+ case M_LWL_OB:
+@@ -8125,6 +8299,37 @@
+ /* Itbl support may require additional care here. */
+ coproc = 1;
+ goto ld_st;
++ case M_SV_S_AB:
++ s = "sv.s";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?m0x,?o(b)";
++ treg = vmreg;
++ goto ld_st;
++ case M_SV_Q_AB:
++ if (vwb)
++ s = "vwb.q";
++ else
++ s = "sv.q";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?n3x,?o(b)";
++ treg = vmreg;
++ goto ld_st;
++ case M_SVL_Q_AB:
++ s = "svl.q";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?n3x,?o(b)";
++ treg = vmreg;
++ goto ld_st;
++ case M_SVR_Q_AB:
++ s = "svr.q";
++ /* Itbl support may require additional care here. */
++ coproc = 1;
++ fmt = "?n3x,?o(b)";
++ treg = vmreg;
++ goto ld_st;
+ case M_SWL_AB:
+ ab = 1;
+ case M_SWL_OB:
+@@ -8654,6 +8859,138 @@
+ break;
+ }
+
++ case M_LVI_S_SS:
++ case M_LVI_P_SS:
++ case M_LVI_T_SS:
++ case M_LVI_Q_SS:
++ {
++ int mtx = (vtreg >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
++ int idx = (vtreg >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
++ int fsl = 0;
++ int rxc = 0;
++ int vtreg_s = 0;
++ int vnum = 0;
++ int vat = 0;
++ int i;
++
++ switch (mask)
++ {
++ case M_LVI_S_SS:
++ vnum = 1;
++ fsl = (vtreg >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
++ rxc = 0;
++ break;
++ case M_LVI_P_SS:
++ vnum = 2;
++ fsl = ((vtreg >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL) << 1;
++ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
++ break;
++ case M_LVI_T_SS:
++ vnum = 3;
++ fsl = (vtreg >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL;
++ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
++ break;
++ case M_LVI_Q_SS:
++ vnum = 4;
++ fsl = 0;
++ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
++ break;
++ }
++ if (rxc)
++ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_FSL)
++ | (fsl << VF_SH_MR_IDX);
++ else
++ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_IDX)
++ | (fsl << VF_SH_MR_FSL);
++
++ for (i = 0; i < vnum; i++) {
++ imm_expr = vimm_expr[i];
++ offset_expr = voffset_expr[i];
++
++ if (imm_expr.X_op == O_constant)
++ {
++ load_register (AT, &imm_expr, 0);
++ macro_build ((expressionS *) NULL,
++ "mtv", "t,?d0z", AT, vtreg_s);
++ vat = 1;
++ }
++ else
++ {
++ gas_assert (offset_expr.X_op == O_symbol
++ && strcmp (segment_name (S_GET_SEGMENT
++ (offset_expr.X_add_symbol)),
++ ".lit4") == 0
++ && offset_expr.X_add_number == 0);
++ macro_build (&offset_expr,
++ "lv.s", "?m0x,?o(b)", vtreg_s,
++ (int) BFD_RELOC_MIPS_LITERAL, mips_gp_register);
++ }
++
++ if (rxc)
++ vtreg_s += (1 << VF_SH_MR_IDX);
++ else
++ vtreg_s += (1 << VF_SH_MR_FSL);
++ }
++
++ if (vat)
++ break;
++ else
++ return;
++ }
++
++ case M_LVHI_S_SS:
++ case M_LVHI_P_SS:
++ {
++ int mtx = (vtreg >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
++ int idx = (vtreg >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
++ int fsl = 0;
++ int rxc = 0;
++ int vtreg_s = 0;
++ int vnum = 0;
++ int i;
++ unsigned int f16v;
++ char f16v_str[16];
++
++ switch (mask)
++ {
++ case M_LVHI_S_SS:
++ vnum = 2;
++ fsl = (vtreg >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
++ rxc = 0;
++ break;
++ case M_LVHI_P_SS:
++ vnum = 4;
++ fsl = ((vtreg >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL) << 1;
++ rxc = (vtreg >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
++ break;
++ }
++ if (rxc)
++ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_FSL)
++ | (fsl << VF_SH_MR_IDX);
++ else
++ vtreg_s = (mtx << VF_SH_MR_MTX) | (idx << VF_SH_MR_IDX)
++ | (fsl << VF_SH_MR_FSL);
++
++
++ for (i = 0; i < vnum; i += 2) {
++ f16v = ((vimm_expr[i + 1].X_add_number & 0xffff) << 16)
++ | (vimm_expr[i].X_add_number & 0xffff);
++ sprintf(f16v_str, "0x%08x", f16v);
++ my_getExpression (&imm_expr, f16v_str);
++
++ load_register (AT, &imm_expr, 0);
++ macro_build ((expressionS *) NULL,
++ "mtv", "t,?d0z", AT, vtreg_s);
++
++ if (rxc)
++ vtreg_s += (1 << VF_SH_MR_IDX);
++ else
++ vtreg_s += (1 << VF_SH_MR_FSL);
++ }
++
++ break;
++ }
++
+ case M_LI_D:
+ /* Check if we have a constant in IMM_EXPR. If the GPRs are 64 bits
+ wide, IMM_EXPR is the entire value. Otherwise IMM_EXPR is the high
+@@ -9164,6 +9501,27 @@
+ move_register (dreg, sreg);
+ break;
+
++ case M_VCMOV_S:
++ s = "vcmovt.s";
++ fmt = "?d0d,?s0s,?e";
++ goto vcmov;
++ case M_VCMOV_P:
++ s = "vcmovt.p";
++ fmt = "?d1d,?s1s,?e";
++ goto vcmov;
++ case M_VCMOV_T:
++ s = "vcmovt.t";
++ fmt = "?d2d,?s2s,?e";
++ goto vcmov;
++ case M_VCMOV_Q:
++ s = "vcmovt.q";
++ fmt = "?d3d,?s3s,?e";
++ vcmov:
++ macro_build ((expressionS *) NULL, s, fmt,
++ vdreg, vsreg,
++ (ip->insn_opcode >> VF_SH_MCOND) & VF_MASK_MCOND);
++ return;
++
+ case M_DMUL:
+ dbl = 1;
+ case M_MUL:
+@@ -9779,6 +10137,40 @@
+ off12 = mips_opts.micromips;
+ off = 3;
+ goto uld_st;
++
++ case M_ULV_S:
++ if (mips_opts.arch == CPU_ALLEGREX)
++ as_bad (_("opcode not supported on this processor"));
++ off = 3;
++ if (offset_expr.X_add_number >= 0x8000 - off)
++ as_bad (_("operand overflow"));
++ if (! target_big_endian)
++ offset_expr.X_add_number += off;
++ macro_build (&offset_expr, "lwl", "t,o(b)",
++ AT, (int) BFD_RELOC_LO16, breg);
++ if (! target_big_endian)
++ offset_expr.X_add_number -= off;
++ else
++ offset_expr.X_add_number += off;
++ macro_build (&offset_expr, "lwr", "t,o(b)",
++ AT, (int) BFD_RELOC_LO16, breg);
++
++ macro_build ((expressionS *) NULL, "mtv", "t,?d0z",
++ AT, vmreg);
++ break;
++
++ case M_ULV_Q:
++ off = 12;
++ if (offset_expr.X_add_number >= 0x8000 - off)
++ as_bad (_("operand overflow"));
++ offset_expr.X_add_number += off;
++ macro_build (&offset_expr, "lvl.q", "?n3x,?o(b)",
++ vmreg, (int) BFD_RELOC_LO16, breg);
++ offset_expr.X_add_number -= off;
++ macro_build (&offset_expr, "lvr.q", "?n3x,?o(b)",
++ vmreg, (int) BFD_RELOC_LO16, breg);
++ return;
++
+ case M_ULD_A:
+ ab = 1;
+ case M_ULD:
+@@ -9804,6 +10196,56 @@
+ off = 3;
+ ust = 1;
+ goto uld_st;
++
++ case M_USV_S:
++ off = 3;
++ if (offset_expr.X_add_number >= 0x8000 - off)
++ as_bad (_("operand overflow"));
++ macro_build ((expressionS *) NULL, "mfv", "t,?d0z",
++ AT, vmreg);
++ if (mips_opts.arch != CPU_ALLEGREX)
++ {
++ if (! target_big_endian)
++ offset_expr.X_add_number += off;
++ macro_build (&offset_expr, "swl", "t,o(b)",
++ AT, (int) BFD_RELOC_LO16, breg);
++ if (! target_big_endian)
++ offset_expr.X_add_number -= off;
++ else
++ offset_expr.X_add_number += off;
++ macro_build (&offset_expr, "swr", "t,o(b)",
++ AT, (int) BFD_RELOC_LO16, breg);
++ }
++ else
++ {
++ if (target_big_endian)
++ offset_expr.X_add_number += off;
++ while (off-- >= 0)
++ {
++ macro_build (&offset_expr, "sb", "t,o(b)",
++ AT, (int) BFD_RELOC_LO16, breg);
++ macro_build ((expressionS *) NULL, "ror",
++ "d,w,<", AT, AT, 8);
++ if (target_big_endian)
++ --offset_expr.X_add_number;
++ else
++ ++offset_expr.X_add_number;
++ }
++ }
++ break;
++
++ case M_USV_Q:
++ off = 12;
++ if (offset_expr.X_add_number >= 0x8000 - off)
++ as_bad (_("operand overflow"));
++ offset_expr.X_add_number += off;
++ macro_build (&offset_expr, "svl.q", "?n3x,?o(b)",
++ vmreg, (int) BFD_RELOC_LO16, breg);
++ offset_expr.X_add_number -= off;
++ macro_build (&offset_expr, "svr.q", "?n3x,?o(b)",
++ vmreg, (int) BFD_RELOC_LO16, breg);
++ return;
++
+ case M_USD_A:
+ ab = 1;
+ case M_USD:
+@@ -10279,6 +10721,103 @@
+ case '%': USE_BITS (OP_MASK_VECALIGN, OP_SH_VECALIGN); break;
+ case '[': break;
+ case ']': break;
++
++ /* VFPU fields */
++ case '?':
++ switch (c = *p++)
++ {
++ case '[': break;
++ case ']': break;
++ case 'y':
++ {
++ if ((*p != '0') && (*p != '1') && (*p != '2') && (*p != '3'))
++ {
++ as_bad (_("internal: bad mips opcode : %s %s"),
++ opc->name, opc->args);
++ return 0;
++ }
++ p++;
++ }
++ break;
++
++ case 'o': USE_BITS (VF_MASK_OFFSET, VF_SH_OFFSET); break;
++
++ case 's':
++ case 't':
++ case 'd':
++ case 'v':
++ case 'x':
++ case 'm':
++ case 'n':
++ {
++ if ((*p != '0') && (*p != '1') && (*p != '2') && (*p != '3')
++ && (*p != '5') && (*p != '6') && (*p != '7'))
++ {
++ as_bad (_("internal: bad mips opcode (vreg type `?%c'): %s %s"),
++ *p, opc->name, opc->args);
++ return 0;
++ }
++ p++;
++
++ if ((*p != 's') && (*p != 't') && (*p != 'd')
++ && (*p != 'y') && (*p != 'x') && (*p != 'z')
++ && (*p != 'w') && (*p != 'm'))
++ {
++ as_bad (_("internal: bad mips opcode (vreg type `?%c'): %s %s"),
++ *(p - 1), opc->name, opc->args);
++ }
++ p++;
++
++ switch (c)
++ {
++ case 's': USE_BITS (VF_MASK_VS, VF_SH_VS); break;
++ case 't': USE_BITS (VF_MASK_VT, VF_SH_VT); break;
++ case 'd':
++ case 'v':
++ case 'x': USE_BITS (VF_MASK_VD, VF_SH_VD); break;
++ case 'm': USE_BITS (VF_MASK_VML, VF_SH_VML);
++ USE_BITS (VF_MASK_VMH, VF_SH_VMH); break;
++ case 'n': USE_BITS (VF_MASK_VNL, VF_SH_VNL);
++ USE_BITS (VF_MASK_VNH, VF_SH_VNH); break;
++ }
++ }
++ break;
++
++ case 'f': USE_BITS (VF_MASK_CC, VF_SH_CC);
++ p++; break;
++
++ case 'a': USE_BITS (VF_MASK_CONST, VF_SH_CONST); break;
++ case 'b': USE_BITS (VF_MASK_SCALE, VF_SH_SCALE); break;
++ case 'c': USE_BITS (VF_MASK_BCOND, VF_SH_BCOND); break;
++ case 'e': USE_BITS (VF_MASK_MCOND, VF_SH_MCOND); break;
++
++ case 'i': USE_BITS (VF_MASK_WRAP, VF_SH_WRAP); break;
++
++ case 'q': USE_BITS (VF_MASK_VCD, VF_SH_VCD); break;
++ case 'r': USE_BITS (VF_MASK_VCS, VF_SH_VCS); break;
++
++ case 'u': USE_BITS (VF_MASK_HFLOAT, VF_SH_HFLOAT); break;
++
++ case 'w': USE_BITS (VF_MASK_ROT, VF_SH_ROT); break;
++ case 'z': USE_BITS (VF_MASK_RWB, VF_SH_RWB); break;
++
++ case '0': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '1': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '2': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '3': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '4': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '5': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '6': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++ case '7': USE_BITS (VF_MASK_PFX, VF_SH_PFX); break;
++
++ default:
++ as_bad (_("internal: bad mips opcode (unknown extension operand type `?%c'): %s %s"),
++ c, opc->name, opc->args);
++ return 0;
++
++ }
++ break;
++
+ case '1': USE_BITS (OP_MASK_SHAMT, OP_SH_SHAMT); break;
+ case '2': USE_BITS (OP_MASK_BP, OP_SH_BP); break;
+ case '3': USE_BITS (OP_MASK_SA3, OP_SH_SA3); break;
+@@ -10585,7 +11124,7 @@
+ char c = 0;
+ struct mips_opcode *insn;
+ char *argsStart;
+- unsigned int regno;
++ unsigned int regno = 0;
+ unsigned int lastregno;
+ unsigned int destregno = 0;
+ unsigned int lastpos = 0;
+@@ -10598,6 +11137,9 @@
+ unsigned int rtype;
+ char *dot;
+ long end;
++ unsigned int vdregno = 0xffff;
++ char vdregt = 0;
++ char vdregl = 0;
+
+ insn_error = NULL;
+
+@@ -11683,6 +12225,1151 @@
+ case 'y': /* ALNV.PS source register. */
+ gas_assert (mips_opts.micromips);
+ goto do_reg;
++
++ /* VFPU fields */
++ case '?':
++ switch (*++args)
++ {
++ case '[':
++ case ']':
++ if (*s++ == *args)
++ continue;
++ break;
++
++ case 'y': /* immediate separator */
++ ++args;
++ vimm_expr[*args - '0'] = imm_expr;
++ voffset_expr[*args - '0'] = offset_expr;
++
++ imm_expr.X_op = O_absent;
++ offset_expr.X_op = O_absent;
++ imm_reloc[0] = BFD_RELOC_UNUSED;
++ imm_reloc[1] = BFD_RELOC_UNUSED;
++ imm_reloc[2] = BFD_RELOC_UNUSED;
++ offset_reloc[0] = BFD_RELOC_UNUSED;
++ offset_reloc[1] = BFD_RELOC_UNUSED;
++ offset_reloc[2] = BFD_RELOC_UNUSED;
++
++ continue;
++
++ case 'o': /* 16 bit offset */
++ /* Check whether there is only a single bracketed expression
++ left. If so, it must be the base register and the
++ constant must be zero. */
++ if (*s == '(' && strchr (s + 1, '(') == 0)
++ {
++ offset_expr.X_op = O_constant;
++ offset_expr.X_add_number = 0;
++ continue;
++ }
++
++ /* If this value won't fit into a 16 bit offset, then go
++ find a macro that will generate the 32 bit offset
++ code pattern. */
++ if (my_getSmallExpression (&offset_expr, offset_reloc, s) == 0
++ && (offset_expr.X_op != O_constant
++ || offset_expr.X_add_number >= 0x8000
++ || offset_expr.X_add_number < -0x8000))
++ break;
++
++ s = expr_end;
++ continue;
++
++ case 's': /* VFPU source register */
++ case 't': /* VFPU target register */
++ case 'd': /* VFPU destination register */
++ case 'v': /* VFPU destination register */
++ case 'x': /* VFPU destination register */
++ case 'm': /* VFPU target regsiter (load/store) */
++ case 'n': /* VFPU target regsiter (load/store) */
++ {
++ int dtype_err = 0;
++ int dnum_err = 0;
++ int dlen = 0;
++ char dtype = s[0];
++ char regtype = *(args + 1);
++
++ int mtx = 0;
++ int idx = 0;
++ int rxc = 0;
++ int fsl = 0;
++ int vidx = 0;
++ int vfsl = 0;
++
++ if (ISDIGIT (s[1]))
++ {
++ int num = 0;
++ s++;
++ do
++ {
++ num *= 10;
++ num += *s - '0';
++ dlen++;
++ s++;
++ }
++ while (ISDIGIT (*s));
++
++ if ((s[0] == '.')
++ && (s[1] == 's' || s[1] == 'p'
++ || s[1] == 't' || s[1] == 'q'))
++ s += 2;
++
++ if (ISUPPER(dtype))
++ dtype -= 'A' - 'a';
++
++ if (dtype == '$')
++ {
++ regno = num;
++ if (regno > VF_MAX_MR)
++ as_bad (_("Invalid VFPU register number (%d)"),
++ regno);
++
++ idx = (num >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
++ vfsl = (num >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL;
++ switch (regtype)
++ {
++ case '0': /* single word */
++ break;
++ case '1': /* pare word */
++ dnum_err = (vfsl & 0x1);
++ break;
++ case '2': /* triple word */
++ dnum_err = (vfsl > 1);
++ break;
++ case '3': /* quad word */
++ dnum_err = (vfsl > 0);
++ break;
++ case '5': /* 2x2 word */
++ dnum_err = (vfsl & 0x1) || (idx & 0x1);
++ break;
++ case '6': /* 3x3 word */
++ dnum_err = (vfsl > 1) || (idx > 1);
++ break;
++ case '7': /* 4x4 word */
++ dnum_err = (vfsl > 0) || (idx > 0);
++ break;
++ }
++
++ if (dnum_err)
++ as_bad (_("Improper VFPU register number (%d)"),
++ regno);
++
++ }
++ else if ((dlen == 3)
++ && ((dtype == 's')
++ || (dtype == 'c') || (dtype == 'r')
++ || (dtype == 'm') || (dtype == 'e')))
++ {
++ mtx = num / 100;
++ if ((dtype == 'r') || (dtype == 'e'))
++ {
++ vfsl = (num / 10) % 10;
++ vidx = num % 10;
++ rxc = 1;
++ }
++ else
++ {
++ vidx = (num / 10) % 10;
++ vfsl = num % 10;
++ rxc = 0;
++ }
++
++ switch (regtype)
++ {
++ case '0': /* single word */
++ idx = vidx;
++ fsl = vfsl;
++ dtype_err = (dtype != 's');
++ break;
++ case '1': /* pare word */
++ idx = vidx;
++ fsl = (vfsl & 0x2) | rxc;
++ dnum_err = (vfsl & 0x1);
++ dtype_err = (dtype != 'c') && (dtype != 'r');
++ break;
++ case '2': /* triple word */
++ idx = vidx;
++ fsl = ((vfsl & 0x1) << 1) | rxc;
++ dnum_err = (vfsl > 1);
++ dtype_err = (dtype != 'c') && (dtype != 'r');
++ break;
++ case '3': /* quad word */
++ idx = vidx;
++ fsl = rxc;
++ dnum_err = (vfsl > 0);
++ dtype_err = (dtype != 'c') && (dtype != 'r');
++ break;
++ case '5': /* 2x2 word */
++ idx = vidx & 0x2;
++ fsl = (vfsl & 0x2) | rxc;
++ dnum_err = (vfsl & 0x1) || (vidx & 0x1);
++ dtype_err = (dtype != 'm') && (dtype != 'e');
++ break;
++ case '6': /* 3x3 word */
++ idx = vidx & 0x1;
++ fsl = ((vfsl & 0x1) << 1) | rxc;
++ dnum_err = (vfsl > 1) || (vidx > 1);
++ dtype_err = (dtype != 'm') && (dtype != 'e');
++ break;
++ case '7': /* 4x4 word */
++ idx = 0;
++ fsl = rxc;
++ dnum_err = (vfsl > 0) || (vidx > 0);
++ dtype_err = (dtype != 'm') && (dtype != 'e');
++ break;
++ }
++
++ if (dtype_err)
++ as_bad (_("Improper VFPU register prefix '%c'"),
++ dtype);
++ if (dnum_err)
++ as_bad (_("Improper VFPU register number (%03d)"),
++ num);
++
++ if (mtx > VF_MAX_MR_MTX)
++ as_bad (_("VFPU matrix range over %d"), mtx);
++ if (vidx > VF_MAX_MR_IDX)
++ as_bad (_("VFPU index range over %d"), idx);
++ if (vfsl > VF_MAX_MR_FSL)
++ as_bad (_("VFPU field select range over %d"), fsl);
++
++ regno = ((fsl & VF_MASK_MR_FSL) << VF_SH_MR_FSL)
++ | ((mtx & VF_MASK_MR_MTX) << VF_SH_MR_MTX)
++ | ((idx & VF_MASK_MR_IDX) << VF_SH_MR_IDX);
++ }
++ else
++ {
++ as_bad (_("Improper VFPU register prefix '%c'"),
++ dtype);
++ }
++ }
++ else
++ {
++ as_bad (_("bad operand %s"), s);
++ }
++
++ if ((*args == 'v') || (*args == 'x'))
++ {
++ vdregno = regno;
++ vdregt = regtype;
++ vdregl = (*args == 'v');
++ }
++ else if (vdregno <= VF_MAX_MR)
++ {
++ static unsigned short used_vreg[8][16] = {
++ { 0x0001, 0x0010, 0x0100, 0x1000,
++ 0x0002, 0x0020, 0x0200, 0x2000,
++ 0x0004, 0x0040, 0x0400, 0x4000,
++ 0x0008, 0x0080, 0x0800, 0x8000 },
++ { 0x0003, 0x0030, 0x0300, 0x3000,
++ 0x0011, 0x0022, 0x0044, 0x0088,
++ 0x000c, 0x00c0, 0x0c00, 0xc000,
++ 0x1100, 0x2200, 0x4400, 0x8800 },
++ { 0x0007, 0x0070, 0x0700, 0x7000,
++ 0x0111, 0x0222, 0x0444, 0x0888,
++ 0x000e, 0x00e0, 0x0e00, 0xe000,
++ 0x1110, 0x2220, 0x4440, 0x8880 },
++ { 0x000f, 0x00f0, 0x0f00, 0xf000,
++ 0x1111, 0x2222, 0x4444, 0x8888,
++ 0x000f, 0x00f0, 0x0f00, 0xf000,
++ 0x1111, 0x2222, 0x4444, 0x8888 },
++ { 0x0000, 0x0000, 0x0000, 0x0000,
++ 0x0000, 0x0000, 0x0000, 0x0000,
++ 0x0000, 0x0000, 0x0000, 0x0000,
++ 0x0000, 0x0000, 0x0000, 0x0000 },
++ { 0x0033, 0x0033, 0x3300, 0x3300,
++ 0x0033, 0x0033, 0x00cc, 0x00cc,
++ 0x00cc, 0x00cc, 0xcc00, 0xcc00,
++ 0x3300, 0x3300, 0xcc00, 0xcc00 },
++ { 0x0777, 0x7770, 0x0777, 0x7770,
++ 0x0777, 0x0eee, 0x0777, 0x0eee,
++ 0x0eee, 0xeee0, 0x0eee, 0xeee0,
++ 0x7770, 0xeee0, 0x7770, 0xeee0 },
++ { 0xffff, 0xffff, 0xffff, 0xffff,
++ 0xffff, 0xffff, 0xffff, 0xffff,
++ 0xffff, 0xffff, 0xffff, 0xffff,
++ 0xffff, 0xffff, 0xffff, 0xffff },
++ };
++ int dmtx, smtx;
++ int dfsl, sfsl;
++ int didx, sidx;
++ int drxc, srxc;
++
++ dmtx = (vdregno >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
++ smtx = (regno >> VF_SH_MR_MTX) & VF_MASK_MR_MTX;
++
++ if (dmtx == smtx)
++ {
++ unsigned short dused, sused;
++ int dtype2, stype;
++
++ dfsl = (vdregno >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
++ didx = (vdregno >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
++ drxc = (vdregno >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
++ sfsl = (regno >> VF_SH_MR_FSL) & VF_MASK_MR_FSL;
++ sidx = (regno >> VF_SH_MR_IDX) & VF_MASK_MR_IDX;
++ srxc = (regno >> VF_SH_MR_RXC) & VF_MASK_MR_RXC;
++
++ dtype2 = vdregt - '0';
++ stype = regtype - '0';
++ dused = used_vreg[dtype2][(dfsl << 2) + didx];
++ sused = used_vreg[stype][(sfsl << 2) + sidx];
++
++ if ((dused & sused)
++ && (vdregl || (dused ^ sused) || (drxc != srxc)))
++ {
++ int dvfsl;
++ dvfsl = (vdregno >> VF_SH_MR_VFSL) & VF_MASK_MR_VFSL;
++ switch (vdregt)
++ {
++ case '1':
++ dvfsl <<= 1;
++ case '2':
++ case '3':
++ if (drxc)
++ as_bad (_("VFPU register conflict(R%d%d%d)"),
++ dmtx, dvfsl, didx);
++ else
++ as_bad (_("VFPU register conflict(C%d%d%d)"),
++ dmtx, didx, dvfsl);
++ break;
++ case '5':
++ dvfsl <<= 1;
++ case '6':
++ case '7':
++ if (drxc)
++ as_bad (_("VFPU register conflict(E%d%d%d)"),
++ dmtx, dvfsl, didx);
++ else
++ as_bad (_("VFPU register conflict(M%d%d%d)"),
++ dmtx, didx, dvfsl);
++ break;
++ }
++ }
++ }
++ }
++
++ switch (*args++)
++ {
++ case 's':
++ if (
++ (ip->insn_opcode
++ & VFPU_MASK_RPT_MMUL) == VFPU_INST_RPT_MMUL)
++ {
++ if (regno & (VF_MASK_MR_RXC << VF_SH_MR_RXC))
++ regno &= ~(VF_MASK_MR_RXC << VF_SH_MR_RXC);
++ else
++ regno |= (VF_MASK_MR_RXC << VF_SH_MR_RXC);
++ }
++ ip->insn_opcode |= (regno & VF_MASK_VS) << VF_SH_VS;
++ break;
++ case 't':
++ ip->insn_opcode |= (regno & VF_MASK_VT) << VF_SH_VT;
++ break;
++ case 'd':
++ case 'v':
++ case 'x':
++ ip->insn_opcode |= (regno & VF_MASK_VD) << VF_SH_VD;
++ break;
++ case 'm':
++ {
++ int vmregL = (regno >> 0) & VF_MASK_VML;
++ int vmregH = (regno >> 5) & VF_MASK_VMH;
++ ip->insn_opcode |= (vmregL << VF_SH_VML)
++ | (vmregH << VF_SH_VMH);
++ }
++ break;
++ case 'n':
++ {
++ int vmregL = (regno >> 0) & VF_MASK_VNL;
++ int vmregH = (regno >> 5) & VF_MASK_VNH;
++ ip->insn_opcode |= (vmregL << VF_SH_VNL)
++ | (vmregH << VF_SH_VNH);
++ }
++ break;
++ }
++ args++;
++
++ /* now check for vfpu prefixes if necessary */
++ if (*s == '[')
++ {
++ char *prefix_out = NULL;
++ bfd_boolean *prefix_bool = NULL;
++ char *prefix_type = NULL;
++ int num_args = 0;
++ char *ob = ++s;
++ bfd_boolean has_w = FALSE;
++ bfd_boolean has_z = FALSE;
++ bfd_boolean has_y = FALSE;
++ bfd_boolean has_operator = FALSE;
++ bfd_boolean has_saturater = FALSE;
++
++ switch (*args)
++ {
++ case 'w': /* only swizzle */
++ case 's': /* source prefix */
++ prefix_bool = &vfpu_sprefix;
++ prefix_out = vfpu_sprefix_str;
++ prefix_type = "source";
++ break;
++ case 't': /* target prefix */
++ prefix_bool = &vfpu_tprefix;
++ prefix_out = vfpu_tprefix_str;
++ prefix_type = "target";
++ break;
++ case 'm': /* only write mask */
++ case 'd': /* destination prefix */
++ prefix_bool = &vfpu_dprefix;
++ prefix_out = vfpu_dprefix_str;
++ prefix_type = "destination";
++ break;
++ case 'y': /* inhibit */
++ prefix_bool = NULL;
++ prefix_type = "source";
++ break;
++ case 'x': /* inhibit */
++ prefix_bool = NULL;
++ prefix_type = "target";
++ break;
++ case 'z': /* inhibit */
++ prefix_bool = NULL;
++ prefix_type = "destination";
++ break;
++ }
++
++ for ( ; *s != '\0' && *s != ']'; s++)
++ {
++ switch (*s)
++ {
++ case ',':
++ /* count no. of params for syntax check */
++ num_args++;
++ break;
++ case ' ':
++ case '\t':
++ break;
++ case 'm':
++ case 'M':
++ case 'x':
++ case 'X':
++ break;
++ case 'y':
++ case 'Y':
++ has_y = TRUE;
++ break;
++ case 'z':
++ case 'Z':
++ has_z = TRUE;
++ break;
++ case 'w':
++ case 'W':
++ has_w = TRUE;
++ break;
++ default:
++ if (*args == 'w')
++ has_operator = TRUE;
++ if (*args == 'm')
++ has_saturater = TRUE;
++ }
++ }
++
++ if (*s == ']')
++ {
++ if (prefix_bool)
++ {
++ *prefix_bool = TRUE;
++ strncpy (prefix_out, ob, s - ob);
++ prefix_out[s - ob] = '\0';
++ s++;
++ }
++ else
++ {
++ as_bad (_("%s cannot use %s prefix"),
++ insn->name, prefix_type);
++ s++;
++ continue;
++ }
++ }
++ else
++ {
++ as_bad (_("parse error (%s)"), ob - 1);
++ return;
++ }
++
++ if (num_args != regtype - '0')
++ {
++ as_bad (_("%s prefix specification requires %d parameters - [%s]"),
++ prefix_type, regtype - '0' + 1,
++ prefix_out);
++ }
++ else
++ {
++ int i = 8 - ((3 - num_args) * 2);
++ char dummy_d[] = " m,m,m,m";
++ char dummy_st[] = " x,y,z,w";
++
++ if (*args == 'd' || *args == 'm')
++ {
++ strcat (prefix_out, dummy_d + i);
++ if (has_saturater)
++ {
++ as_bad (_("%s is restricted to mask destination prefixes only"),
++ insn->name);
++ }
++ }
++ else
++ {
++ strcat (prefix_out, dummy_st + i);
++ if (has_operator)
++ {
++ as_bad (_("%s is restricted to swizzle %s prefixes only"),
++ insn->name, prefix_type);
++ }
++ /* semantic check, w can't be specified for
++ s, p, or t instructions same goes for
++ z for p and s, and y for scalars */
++ if ((has_y && num_args == 0)
++ || (has_z && num_args < 2)
++ || (has_w && num_args < 3))
++ {
++ as_bad (_("%s swizzle operand is out of range in [%s]"),
++ prefix_type, prefix_out);
++ }
++ }
++ }
++ }
++
++ continue;
++ }
++ break;
++
++ case 'q': /* VFPU destination control register */
++ case 'r': /* VFPU source control register */
++ {
++ if ((s[0] == '$') && ISDIGIT (s[1]))
++ {
++ s++;
++ regno = 0;
++ do
++ {
++ regno *= 10;
++ regno += *s - '0';
++ ++s;
++ }
++ while (ISDIGIT (*s));
++
++ if ((regno < VF_MIN_CR) || (regno > VF_MAX_CR))
++ as_bad (_("Invalid VFPU control register number (%d)"),
++ regno);
++
++ else if (!((regno >= VF_MIN_VCR) && (regno <= VF_MAX_VCR)))
++ as_bad (_("Improper VFPU control register number (%d)"),
++ regno);
++
++ switch (*args)
++ {
++ case 'q':
++ ip->insn_opcode |= (regno & VF_MASK_VCD) << VF_SH_VCD;
++ break;
++ case 'r':
++ ip->insn_opcode |= (regno & VF_MASK_VCS) << VF_SH_VCS;
++ break;
++ }
++ }
++ else
++ {
++ as_bad (_("Invalid VFPU control register name (%s)"), s);
++ }
++
++ continue;
++ }
++ break;
++
++ case 'f': /* condition code */
++ {
++ int cond = 0;
++ if (ISDIGIT (s[0]))
++ {
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ cond = imm_expr.X_add_number;
++ if ((cond < VF_MIN_CC) || (cond > VF_MAX_CC))
++ as_bad (_("Invalid VFPU condition code (%d)"), cond);
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ }
++ else
++ {
++ static const char * const vfpu_cond_names[] = {
++ "FL", "EQ", "LT", "LE",
++ "TR", "NE", "GE", "GT",
++ "EZ", "EN", "EI", "ES",
++ "NZ", "NN", "NI", "NS" };
++ for (cond = VF_MIN_CC; cond <= VF_MAX_CC; cond++)
++ {
++ if (strncasecmp(vfpu_cond_names[cond], s, 2) == 0)
++ break;
++ }
++ if ((cond < VF_MIN_CC) || (cond > VF_MAX_CC))
++ as_bad (_("Invalid VFPU condition code (%s)"), s);
++
++ s += 2;
++ }
++
++ args++;
++ if ((cond == 0) || (cond == 4))
++ {
++ }
++ else if (cond & 0x8)
++ {
++ if (*args - '0' < 1)
++ as_bad (_("Invalid VFPU condition oparetion"));
++ }
++ else
++ {
++ if (*args - '0' < 2)
++ as_bad (_("Invalid VFPU condition oparetion"));
++ }
++
++ ip->insn_opcode |= (cond & VF_MASK_CC) << VF_SH_CC;
++ continue;
++ }
++ break;
++
++ case 'a': /* constant code */
++ {
++ int cst = 0;
++ if (ISDIGIT (s[0]))
++ {
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ cst = imm_expr.X_add_number;
++ if ((cst < VF_MIN_CONST) || (cst > VF_MAX_CONST))
++ {
++ as_bad (_("Improper constant code (%d)"), cst);
++ cst &= VF_MASK_CONST;
++ }
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ }
++ else
++ {
++ static const char * const vfpu_const_names[] = {
++ "", "VFPU_HUGE", "VFPU_SQRT2", "VFPU_SQRT1_2",
++ "VFPU_2_SQRTPI", "VFPU_2_PI", "VFPU_1_PI", "VFPU_PI_4",
++ "VFPU_PI_2", "VFPU_PI", "VFPU_E", "VFPU_LOG2E",
++ "VFPU_LOG10E", "VFPU_LN2", "VFPU_LN10", "VFPU_2PI",
++ "VFPU_PI_6", "VFPU_LOG10TWO", "VFPU_LOG2TEN",
++ "VFPU_SQRT3_2"};
++ for (cst = VF_MIN_CONST; cst <= VF_MAX_CONST; cst++)
++ {
++ if (strcasecmp(vfpu_const_names[cst], s) == 0)
++ break;
++ }
++ if ((cst < VF_MIN_CONST) || (cst > VF_MAX_CONST))
++ as_bad (_("Invalid constant code (%s)"), s);
++ else
++ s += strlen(vfpu_const_names[cst]);
++ }
++
++ ip->insn_opcode |= cst << VF_SH_CONST;
++ }
++ continue;
++
++ case 'b': /* scale exponent */
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ if ((unsigned long) imm_expr.X_add_number > VF_MAX_SCALE)
++ {
++ as_bad (_("Improper scale (%lu)"),
++ (unsigned long) imm_expr.X_add_number);
++ imm_expr.X_add_number &= VF_MASK_SCALE;
++ }
++ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_SCALE;
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ continue;
++
++ case 'c': /* branch condition code bit */
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ if ((unsigned long) imm_expr.X_add_number > VF_MAX_BCOND)
++ {
++ as_bad (_("Improper condition bit (%lu)"),
++ (unsigned long) imm_expr.X_add_number);
++ imm_expr.X_add_number &= VF_MASK_BCOND;
++ }
++ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_BCOND;
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ continue;
++
++ case 'e': /* move condition code bit */
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ if ((unsigned long) imm_expr.X_add_number > VF_MAX_MCOND)
++ {
++ as_bad (_("Improper condition bit (%lu)"),
++ (unsigned long) imm_expr.X_add_number);
++ imm_expr.X_add_number &= VF_MASK_MCOND;
++ }
++ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_MCOND;
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ continue;
++
++ case 'i': /* wrap exponent */
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ if ((unsigned long) imm_expr.X_add_number > VF_MAX_WRAP)
++ {
++ as_bad (_("Improper wrap (%lu)"),
++ (unsigned long) imm_expr.X_add_number);
++ imm_expr.X_add_number &= VF_MASK_WRAP;
++ }
++ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_WRAP;
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ continue;
++
++ case 'w': /* rotation code */
++ if (s[0] == '[')
++ {
++ char *rot_str = s;
++ int rot_idx = 0;
++ int rot_neg = 0;
++ int rot_sin = 3;
++ int rot_cos = 3;
++ int rot_err = 0;
++ int rot_n;
++ int rot_neg_n = 0;
++ int rot_sin_n = 0;
++ int rot_cos_n = 0;
++ int rot_code;
++
++ if ((ip->insn_opcode & VFPU_MASK_DTYPE) == VFPU_PAIR)
++ rot_n = 2;
++ else if ((ip->insn_opcode & VFPU_MASK_DTYPE) == VFPU_TRIPLE)
++ rot_n = 3;
++ else if ((ip->insn_opcode & VFPU_MASK_DTYPE) == VFPU_QUAD)
++ rot_n = 4;
++ else
++ rot_n = 0;
++
++ s++;
++ while ((s[0] != ']') && (s[0] != '\0'))
++ {
++ if (s[0] == '-')
++ {
++ if ((s[1] != 's') && (s[1] != 'S'))
++ {
++ rot_err = 1;
++ break;
++ }
++ rot_neg = 1;
++ rot_neg_n++;
++ s++;
++ }
++
++ if (s[0] == ',')
++ rot_idx++;
++ else if ((s[0] == 'c') || (s[0] == 'C'))
++ {
++ rot_cos = rot_idx;
++ rot_cos_n++;
++ }
++ else if ((s[0] == 's') || (s[0] == 'S'))
++ {
++ rot_sin = rot_idx;
++ rot_sin_n++;
++ }
++ else if (ISSPACE(s[0]) || (s[0] == '0'))
++ ;
++ else
++ {
++ rot_err = 1;
++ break;
++ }
++
++ s++;
++ }
++
++ if (s[0] == ']')
++ rot_idx++;
++ else
++ rot_err = 1;
++ s++;
++
++ if ((rot_sin_n == 0) && (rot_cos_n == 0))
++ {
++ if (rot_n == 2)
++ rot_sin = 2;
++ else if ((rot_n == 4) || (rot_n == 3))
++ rot_err = 1;
++ }
++
++ if (rot_cos_n > 1)
++ rot_err = 1;
++
++ if (rot_sin_n > 1)
++ {
++ if (((rot_sin_n + rot_cos_n) != rot_n)
++ || ((rot_n == 4) && (rot_cos_n == 0)))
++ rot_err = 1;
++ }
++
++ if (rot_neg && (rot_neg_n != rot_sin_n))
++ rot_err = 1;
++
++ if (rot_sin_n > 1)
++ rot_sin = rot_cos;
++
++ if (rot_err || (rot_n != rot_idx))
++ as_bad (_("Invalid rotation code (%s)"), rot_str);
++
++ rot_code = ((rot_neg & VF_MASK_ROT_NEG) << VF_SH_ROT_NEG)
++ | ((rot_cos & VF_MASK_ROT_COS) << VF_SH_ROT_COS)
++ | ((rot_sin & VF_MASK_ROT_SIN) << VF_SH_ROT_SIN);
++ ip->insn_opcode |= rot_code << VF_SH_ROT;
++ }
++ else
++ {
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ if ((unsigned long) imm_expr.X_add_number > VF_MAX_ROT)
++ {
++ as_bad (_("Improper rotation code (%lu)"),
++ (unsigned long) imm_expr.X_add_number);
++ imm_expr.X_add_number &= VF_MASK_ROT;
++ }
++ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_ROT;
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ }
++ continue;
++
++ case 'u': /* half float */
++ if ((s[0] == '0') && ((s[1] == 'x') || (s[1] == 'X')))
++ {
++ my_getExpression (&imm_expr, s);
++ check_absolute_expr (ip, &imm_expr);
++ if ((unsigned long) imm_expr.X_add_number > VF_MAX_HFLOAT)
++ {
++ as_bad (_("Improper half floating point constant: (%lu)"),
++ (unsigned long) imm_expr.X_add_number);
++ imm_expr.X_add_number &= VF_MASK_HFLOAT;
++ }
++ ip->insn_opcode |= imm_expr.X_add_number << VF_SH_HFLOAT;
++ imm_expr.X_op = O_absent;
++ s = expr_end;
++ continue;
++ }
++ else
++ {
++ char *save_in;
++ char *err;
++ int len;
++ unsigned char temp[8];
++ unsigned int f32, f16;
++ int exponent32, exponent16;
++ int fraction32, fraction16;
++ int sign;
++ char f16_str[8];
++
++ save_in = input_line_pointer;
++ input_line_pointer = s;
++ err = md_atof ('f', (char *) temp, &len);
++ s = input_line_pointer;
++ input_line_pointer = save_in;
++ if (err != NULL && *err != '\0')
++ {
++ as_bad (_("Bad half floating point constant: %s"), err);
++ memset (temp, '\0', sizeof temp);
++ }
++
++ if (! target_big_endian)
++ f32 = bfd_getl32 (temp);
++ else
++ f32 = bfd_getb32 (temp);
++
++ sign = (f32 >> VF_SH_F32_SIGN) & VF_MASK_F32_SIGN;
++ exponent32 = (f32 >> VF_SH_F32_EXP) & VF_MASK_F32_EXP;
++ fraction32 = (f32 >> VF_SH_F32_FRA) & VF_MASK_F32_FRA;
++ exponent16 = exponent32
++ - VF_BIAS_F32_EXP + VF_BIAS_F16_EXP;
++
++ if (exponent16 < VF_MIN_F16_EXP)
++ {
++ if ((exponent32 == VF_MIN_F32_EXP)
++ && (fraction32 == 0))
++ { // zero
++ exponent16 = VF_MIN_F16_EXP;
++ fraction16 = 0;
++ }
++ else
++ { // underflow
++ float* p;
++ p = (float*) &f32;
++ as_warn (_("Half floating point underflow: %g"),
++ *p);
++ exponent16 = VF_MIN_F16_EXP;
++ fraction16 = 0;
++ }
++ }
++ else if (exponent16 > VF_MAX_F16_EXP)
++ {
++ if (exponent32 != VF_MAX_F32_EXP)
++ { // overflow
++ float* p;
++ p = (float*) &f32;
++ as_warn (_("Half floating point overflow: %g"),
++ *p);
++ exponent16 = VF_MAX_F16_EXP;
++ fraction16 = 0;
++ }
++ else
++ {
++ if (fraction32 == 0)
++ { // infinity
++ exponent16 = VF_MAX_F16_EXP;
++ fraction16 = 0;
++ }
++ else
++ { // NaN
++ exponent16 = VF_MAX_F16_EXP;
++ fraction16 = 1;
++ }
++ }
++ }
++ else
++ {
++ fraction16 = (f32 >> (VF_SH_F32_EXP - VF_SH_F16_EXP))
++ & VF_MASK_F16_FRA;
++ }
++
++ f16 = (sign << VF_SH_F16_SIGN)
++ | (exponent16 << VF_SH_F16_EXP)
++ | (fraction16 << VF_SH_F16_FRA);
++ ip->insn_opcode |= (f16 & VF_MASK_HFLOAT) << VF_SH_HFLOAT;
++
++ sprintf(f16_str, "0x%04x", f16);
++ my_getExpression (&imm_expr, f16_str);
++
++ continue;
++ }
++ break;
++
++ case 'z': /* read/write access code */
++ {
++ int rwb = 0;
++
++ if (strncasecmp (s, "WT", 2) == 0)
++ rwb = 0x0;
++ else if (strncasecmp (s, "WB", 2) == 0)
++ rwb = 0x1;
++ else
++ as_bad (_("Invalid memory access type (%s)"), s);
++
++ s += 2;
++ ip->insn_opcode |= (rwb & VF_MASK_RWB) << VF_SH_RWB;
++
++ continue;
++ }
++
++ case '0': /* source or target prefix code (X) */
++ case '1': /* source or target prefix code (Y) */
++ case '2': /* source or target prefix code (Z) */
++ case '3': /* source or target prefix code (W) */
++ {
++ int operand;
++ int shift;
++
++ int pfx_neg = 0;
++ int pfx_cst = 0;
++ int pfx_abs = 0;
++ int pfx_swz = 0;
++ int pfx_err = 0;
++ int cst = 0;
++ char *pfx_str = s;
++
++ if (s[0] == '-')
++ { // sign code
++ pfx_neg = 1;
++ s++;
++ }
++
++ if (ISDIGIT (s[0]))
++ { // constant
++ pfx_cst = 1;
++
++ if (s[0] == '0')
++ cst = 0;
++ else if (s[0] == '1')
++ {
++ if (s[1] == '/')
++ {
++ s += 2;
++ if (s[0] == '2')
++ cst = 3;
++ else if (s[0] == '3')
++ cst = 5;
++ else if (s[0] == '4')
++ cst = 6;
++ else if (s[0] == '6')
++ cst = 7;
++ else
++ pfx_err = 1;
++ }
++ else
++ {
++ cst = 1;
++ }
++ }
++ else if (s[0] == '2')
++ cst = 2;
++ else if (s[0] == '3')
++ cst = 4;
++ else
++ pfx_err = 1;
++
++ pfx_abs = (cst >> 2) & 0x1;
++ pfx_swz = (cst >> 0) & 0x3;
++ s++;
++ }
++ else
++ { // variable
++
++ if (s[0] == '|')
++ { // abs
++ pfx_abs = 1;
++ s++;
++ }
++
++ if ((s[0] == 'X') || (s[0] == 'x'))
++ {
++ pfx_swz = 0;
++ s++;
++ }
++ else if ((s[0] == 'Y') || (s[0] == 'y'))
++ {
++ pfx_swz = 1;
++ s++;
++ }
++ else if ((s[0] == 'Z') || (s[0] == 'z'))
++ {
++ pfx_swz = 2;
++ s++;
++ }
++ else if ((s[0] == 'W') || (s[0] == 'w'))
++ {
++ pfx_swz = 3;
++ s++;
++ }
++ else if ((s[0] == ',') || IS_SPACE_OR_NUL (s[0])
++ || (s[0] == '|'))
++ {
++ pfx_swz = *args - '0';
++ }
++ else
++ pfx_err = 1;
++
++ if (pfx_err == 0)
++ {
++ if (s[0] == '|')
++ {
++ s++;
++ if (pfx_abs == 0)
++ pfx_err = 1;
++ }
++ else
++ {
++ if (pfx_abs == 1)
++ pfx_err = 1;
++ }
++ }
++ }
++
++ if (! ((s[0] == ',') || IS_SPACE_OR_NUL (s[0])))
++ pfx_err = 1;
++
++ if (pfx_err)
++ as_bad (_("Invalid prefix format (%s)"), pfx_str);
++
++ shift = *args - '0';
++
++ operand = (pfx_neg << (VF_SH_PFX_NEG + shift))
++ | (pfx_cst << (VF_SH_PFX_CST + shift))
++ | (pfx_abs << (VF_SH_PFX_ABS + shift))
++ | (pfx_swz << (VF_SH_PFX_SWZ + shift * 2));
++
++ ip->insn_opcode |= operand;
++ continue;
++ }
++
++ case '4': /* destination prefix code (X) */
++ case '5': /* destination prefix code (Y) */
++ case '6': /* destination prefix code (Z) */
++ case '7': /* destination prefix code (W) */
++ {
++ int operand;
++ int shift;
++ static const char order[] = "xyzwXYZW";
++
++ int pfx_msk = 0;
++ int pfx_sat = 0;
++ char *pfx_str = s;
++
++ if (s[0] == '[')
++ s++;
++ if (s[0] == '-') /* -1:1, skip the minus symbol */
++ s++;
++
++ if ((s[0] == 'm') || (s[0] == 'M'))
++ {
++ pfx_msk = 1;
++ s++;
++ }
++ else if (s[0] == '0') /* 0:1 */
++ {
++ pfx_sat = 1;
++ s++;
++ }
++ else if (s[0] == '1') /* -1:1 or -1:+1 */
++ {
++ pfx_sat = 3;
++ s++;
++ }
++ else if ((s[0] == order[(*args) - '4'])
++ || (s[0] == order[(*args) - '4' + 4]))
++ {
++ pfx_sat = 0;
++ s++;
++ }
++
++ if (s[0] == ':') /* skip the :1 or :+1 part of the expression */
++ {
++ s++;
++ if (s[0] == '+')
++ s++;
++ if (s[0] == '1')
++ s++;
++ }
++ if (s[0] == ']')
++ s++;
++
++ if (! ((s[0] == ',') || IS_SPACE_OR_NUL (s[0])))
++ as_bad (_("Invalid prefix format (%s)"), pfx_str);
++
++ shift = *args - '4';
++ operand = (pfx_msk << (VF_SH_PFX_MSK + shift))
++ | (pfx_sat << (VF_SH_PFX_SAT + shift * 2));
++
++ ip->insn_opcode |= operand;
++ continue;
++ }
++ }
++ break;
++
+ case 'x': /* Ignore register name. */
+ case 'U': /* Destination register (CLO/CLZ). */
+ case 'g': /* Coprocessor destination register. */
+@@ -11877,6 +13564,7 @@
+ {
+ if ((regno & 1) != 0
+ && HAVE_32BIT_FPRS
++ && ! CPU_IS_ALLEGREX (mips_opts.arch)
+ && !mips_oddfpreg_ok (ip->insn_mo, argnum))
+ as_warn (_("Float register should be even, was %d"),
+ regno);
+@@ -18227,7 +19915,7 @@
+ | RELAX_DELAY_SLOT_SIZE_SECOND);
+ msg = macro_warning (s);
+ if (msg != NULL)
+- as_warn_where (fragp->fr_file, fragp->fr_line, msg);
++ as_warn_where (fragp->fr_file, fragp->fr_line, "%s", msg);
+ subtype &= ~s;
+ }
+
+@@ -18241,7 +19929,7 @@
+ & (RELAX_SECOND_LONGER | RELAX_NOMACRO | RELAX_DELAY_SLOT));
+ msg = macro_warning (s);
+ if (msg != NULL)
+- as_warn_where (fragp->fr_file, fragp->fr_line, msg);
++ as_warn_where (fragp->fr_file, fragp->fr_line, "%s", msg);
+ subtype &= ~s;
+ }
+
+@@ -18913,6 +20601,8 @@
+
+ /* MIPS II */
+ { "r6000", 0, ISA_MIPS2, CPU_R6000 },
++ /* Sony PSP "Allegrex" CPU core */
++ { "allegrex", 0, ISA_MIPS2, CPU_ALLEGREX },
+
+ /* MIPS III */
+ { "r4000", 0, ISA_MIPS3, CPU_R4000 },
+diff -Nbaur binutils-2.22/gas/configure binutils-2.22-psp/gas/configure
+--- binutils-2.22/gas/configure 2011-05-18 10:41:14.000000000 +0100
++++ binutils-2.22-psp/gas/configure 2012-02-25 14:09:05.000000000 +0000
+@@ -12043,6 +12043,9 @@
+ mips64vr | mips64vrel)
+ mips_cpu=vr4100
+ ;;
++ mipsallegrex | mipsallegrexel)
++ mips_cpu=allegrex
++ ;;
+ mipsisa32r2* | mipsisa64r2*)
+ mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
+ ;;
+diff -Nbaur binutils-2.22/gas/configure.in binutils-2.22-psp/gas/configure.in
+--- binutils-2.22/gas/configure.in 2011-05-18 10:41:14.000000000 +0100
++++ binutils-2.22-psp/gas/configure.in 2012-02-25 14:09:05.000000000 +0000
+@@ -213,6 +213,9 @@
+ mips64vr | mips64vrel)
+ mips_cpu=vr4100
+ ;;
++ mipsallegrex | mipsallegrexel)
++ mips_cpu=allegrex
++ ;;
+ mipsisa32r2* | mipsisa64r2*)
+ changequote(,)dnl
+ mips_cpu=`echo $target_cpu | sed -e 's/[a-z]*..r2//' -e 's/el$//'`
+diff -Nbaur binutils-2.22/gas/testsuite/gas/mips/mips.exp binutils-2.22-psp/gas/testsuite/gas/mips/mips.exp
+--- binutils-2.22/gas/testsuite/gas/mips/mips.exp 2011-11-21 09:29:32.000000000 +0000
++++ binutils-2.22-psp/gas/testsuite/gas/mips/mips.exp 2012-02-25 14:09:05.000000000 +0000
+@@ -409,6 +409,9 @@
+ mips_arch_create sb1 64 mips64 { mips3d } \
+ { -march=sb1 -mtune=sb1 } { -mmips:sb1 } \
+ { mipsisa64sb1-*-* mipsisa64sb1el-*-* }
++mips_arch_create allegrex 32 mips2 { ror } \
++ { -march=allegrex -mtune=allegrex } { -mmips:allegrex } \
++ { mipsallegrex-*-* mipsallegrexel-*-* }
+ mips_arch_create octeon 64 mips64r2 {} \
+ { -march=octeon -mtune=octeon } { -mmips:octeon } \
+ { mips64octeon*-*-* }
+diff -Nbaur binutils-2.22/include/elf/common.h binutils-2.22-psp/include/elf/common.h
+--- binutils-2.22/include/elf/common.h 2011-07-22 21:22:36.000000000 +0100
++++ binutils-2.22-psp/include/elf/common.h 2012-02-25 14:09:05.000000000 +0000
+@@ -96,6 +96,7 @@
+ #define ET_HIOS 0xFEFF /* Operating system-specific */
+ #define ET_LOPROC 0xFF00 /* Processor-specific */
+ #define ET_HIPROC 0xFFFF /* Processor-specific */
++#define ET_PSPEXEC 0xFFA0 /* Sony PSP executable file */
+
+ /* Values for e_machine, which identifies the architecture. These numbers
+ are officially assigned by registry@sco.com. See below for a list of
+diff -Nbaur binutils-2.22/include/elf/mips.h binutils-2.22-psp/include/elf/mips.h
+--- binutils-2.22/include/elf/mips.h 2011-07-24 15:20:12.000000000 +0100
++++ binutils-2.22-psp/include/elf/mips.h 2012-02-25 14:09:05.000000000 +0000
+@@ -265,6 +265,7 @@
+ #define E_MIPS_MACH_5400 0x00910000
+ #define E_MIPS_MACH_5500 0x00980000
+ #define E_MIPS_MACH_9000 0x00990000
++#define E_MIPS_MACH_ALLEGREX 0x00A20000
+ #define E_MIPS_MACH_LS2E 0x00A00000
+ #define E_MIPS_MACH_LS2F 0x00A10000
+ #define E_MIPS_MACH_LS3A 0x00A20000
+diff -Nbaur binutils-2.22/include/opcode/mips.h binutils-2.22-psp/include/opcode/mips.h
+--- binutils-2.22/include/opcode/mips.h 2011-08-09 16:20:03.000000000 +0100
++++ binutils-2.22-psp/include/opcode/mips.h 2012-02-25 14:09:05.000000000 +0000
+@@ -216,6 +216,228 @@
+ #define MDMX_FMTSEL_VEC_QH 0x15
+ #define MDMX_FMTSEL_VEC_OB 0x16
+
++#include "vfpu.h"
++
++#define VF_MASK_VT 0x7f
++#define VF_SH_VT 16
++#define VF_MASK_VS 0x7f
++#define VF_SH_VS 8
++#define VF_MASK_VD 0x7f
++#define VF_SH_VD 0
++#define VF_MASK_VML 0x1f
++#define VF_SH_VML 16
++#define VF_MASK_VMH 0x3
++#define VF_SH_VMH 0
++#define VF_MASK_VNL 0x1f
++#define VF_SH_VNL 16
++#define VF_MASK_VNH 0x1
++#define VF_SH_VNH 0
++#define VF_MASK_OFFSET 0x3fff
++#define VF_SH_OFFSET 2
++#define VF_MASK_CC 0xf
++#define VF_SH_CC 0
++#define VF_MASK_CONST 0x1f
++#define VF_SH_CONST 16
++#define VF_MASK_SCALE 0x1f
++#define VF_SH_SCALE 16
++#define VF_MASK_BCOND 0x7
++#define VF_SH_BCOND 18
++#define VF_MASK_MCOND 0x7
++#define VF_SH_MCOND 16
++#define VF_MASK_VCD 0xff
++#define VF_SH_VCD 0
++#define VF_MASK_VCS 0xff
++#define VF_SH_VCS 8
++#define VF_MASK_ROT 0x1f
++#define VF_SH_ROT 16
++#define VF_MASK_WRAP 0xff
++#define VF_SH_WRAP 16
++#define VF_MASK_TSIGN 0x1
++#define VF_SH_TSIGN 5
++#define VF_MASK_BMCOND 0x1f
++#define VF_SH_BMCOND 0
++#define VF_MASK_HFLOAT 0xffff
++#define VF_SH_HFLOAT 0
++#define VF_MASK_PFX 0xffffff
++#define VF_SH_PFX 0
++#define VF_MASK_RWB 0x1
++#define VF_SH_RWB 1
++
++#define VF_MASK_PFX_SWZ 0x3
++#define VF_SH_PFX_SWZ 0
++#define VF_MASK_PFX_ABS 0x1
++#define VF_SH_PFX_ABS 8
++#define VF_MASK_PFX_CST 0x1
++#define VF_SH_PFX_CST 12
++#define VF_MASK_PFX_NEG 0x1
++#define VF_SH_PFX_NEG 16
++#define VF_MASK_PFX_SAT 0x3
++#define VF_SH_PFX_SAT 0
++#define VF_MASK_PFX_MSK 0x1
++#define VF_SH_PFX_MSK 8
++
++#define VF_MASK_ROT_COS 0x3
++#define VF_SH_ROT_COS 0
++#define VF_MASK_ROT_SIN 0x3
++#define VF_SH_ROT_SIN 2
++#define VF_MASK_ROT_NEG 0x1
++#define VF_SH_ROT_NEG 4
++
++#define VF_MASK_MR_MTX 0x7
++#define VF_SH_MR_MTX 2
++#define VF_MASK_MR_IDX 0x3
++#define VF_SH_MR_IDX 0
++#define VF_MASK_MR_FSL 0x3
++#define VF_SH_MR_FSL 5
++#define VF_MASK_MR_RXC 0x1
++#define VF_SH_MR_RXC 5
++#define VF_MASK_MR_VFSL 0x1
++#define VF_SH_MR_VFSL 6
++
++#define VF_MAX_MR_MTX 7
++#define VF_MAX_MR_IDX 3
++#define VF_MAX_MR_FSL 3
++#define VF_MAX_MR_VIDX 1
++#define VF_MAX_MR_VFSL 1
++
++#define VF_MIN_MR 0
++#define VF_MAX_MR 127
++#define VF_MIN_CR 128
++#define VF_MAX_CR 255
++#define VF_MIN_VCR 128
++#define VF_MAX_VCR 143
++#define VF_MIN_CC 0
++#define VF_MAX_CC 15
++#define VF_MIN_CONST 1
++#define VF_MAX_CONST 19
++#define VF_MIN_SCALE 0
++#define VF_MAX_SCALE 31
++#define VF_MIN_BCOND 0
++#define VF_MAX_BCOND 5
++#define VF_MIN_MCOND 0
++#define VF_MAX_MCOND 6
++#define VF_MIN_WRAP 0
++#define VF_MAX_WRAP 255
++#define VF_MIN_ROT 0
++#define VF_MAX_ROT 31
++#define VF_MIN_TSIGN 0
++#define VF_MAX_TSIGN 1
++#define VF_MIN_BMCOND 0
++#define VF_MAX_BMCOND 31
++#define VF_MIN_HFLOAT 0
++#define VF_MAX_HFLOAT 0xffff
++
++#define VF_MASK_F32_SIGN 0x1
++#define VF_SH_F32_SIGN 31
++#define VF_MASK_F32_EXP 0xff
++#define VF_SH_F32_EXP 23
++#define VF_MASK_F32_FRA 0x7fffff
++#define VF_SH_F32_FRA 0
++#define VF_MASK_F16_SIGN 0x1
++#define VF_SH_F16_SIGN 15
++#define VF_MASK_F16_EXP 0x1f
++#define VF_SH_F16_EXP 10
++#define VF_MASK_F16_FRA 0x3ff
++#define VF_SH_F16_FRA 0
++
++#define VF_MIN_F32_EXP 0
++#define VF_MAX_F32_EXP 255
++#define VF_BIAS_F32_EXP 127
++#define VF_MIN_F16_EXP 0
++#define VF_MAX_F16_EXP 31
++#define VF_BIAS_F16_EXP 15
++
++#define OP_SH_VFPU_DELTA 0
++#define OP_MASK_VFPU_DELTA 0xfffc
++#define OP_SH_VFPU_IMM3 16
++#define OP_MASK_VFPU_IMM3 0x7
++#define OP_SH_VFPU_IMM5 16
++#define OP_MASK_VFPU_IMM5 0x1f
++#define OP_SH_VFPU_IMM8 16
++#define OP_MASK_VFPU_IMM8 0xff
++#define OP_SH_VFPU_CC 18 /* Condition code. */
++#define OP_MASK_VFPU_CC 0x7
++#define OP_SH_VFPU_CONST 16
++#define OP_MASK_VFPU_CONST 0x1f
++#define OP_SH_VFPU_COND 0 /* Conditional compare. */
++#define OP_MASK_VFPU_COND 0xf
++#define OP_SH_VFPU_VMTVC 0
++#define OP_MASK_VFPU_VMTVC 0xff
++#define OP_SH_VFPU_VMFVC 8
++#define OP_MASK_VFPU_VMFVC 0xff
++#define OP_SH_VFPU_RWB 1
++#define OP_MASK_VFPU_RWB 0x1
++#define OP_SH_VFPU_ROT 16 /* Rotators used in vrot. */
++#define OP_MASK_VFPU_ROT 0x1f
++#define OP_SH_VFPU_FLOAT16 0
++#define OP_MASK_VFPU_FLOAT16 0xffff
++
++/* VFPU registers. */
++#define OP_SH_VFPU_VD 0
++#define OP_MASK_VFPU_VD 0x7f
++#define OP_SH_VFPU_VS 8
++#define OP_MASK_VFPU_VS 0x7f
++#define OP_SH_VFPU_VT 16
++#define OP_MASK_VFPU_VT 0x7f
++#define OP_SH_VFPU_VT_LO 16 /* Bits 0-4 of vt. */
++#define OP_MASK_VFPU_VT_LO 0x1f
++#define OP_SH_VFPU_VT_HI 5 /* Right-shifted. */
++#define OP_MASK_VFPU_VT_HI1 0x1 /* Bit 5 of vt. */
++#define OP_MASK_VFPU_VT_HI2 0x3 /* Bits 5-6 of vt. */
++/* Special handling of vs in vmmul instructions. */
++#define VFPU_OP_VT_VS_VD 0xff800000
++#define VFPU_OPCODE_VMMUL 0xf0000000
++
++/* VFPU condition codes. FL and TR accept no arguments, while any conditions
++ above and including EZ only accept one argument. The rest require two
++ arguments. */
++enum
++{
++ VFPU_COND_FL, VFPU_COND_EQ, VFPU_COND_LT, VFPU_COND_LE,
++ VFPU_COND_TR, VFPU_COND_NE, VFPU_COND_GE, VFPU_COND_GT,
++ VFPU_COND_EZ, VFPU_COND_EN, VFPU_COND_EI, VFPU_COND_ES,
++ VFPU_COND_NZ, VFPU_COND_NN, VFPU_COND_NI, VFPU_COND_NS,
++ VFPU_NUM_CONDS
++};
++
++/* VFPU prefix instruction operands. The *_SH_* values really specify where
++ the bitfield begins, as VFPU prefix instructions have four operands
++ encoded within the immediate field. */
++#define VFPU_SH_PFX_NEG 16
++#define VFPU_MASK_PFX_NEG 0x1 /* Negation. */
++#define VFPU_SH_PFX_CST 12
++#define VFPU_MASK_PFX_CST 0x1 /* Constant. */
++#define VFPU_SH_PFX_ABS_CSTHI 8
++#define VFPU_MASK_PFX_ABS_CSTHI 0x1 /* Abs/Constant (bit 2). */
++#define VFPU_SH_PFX_SWZ_CSTLO 0
++#define VFPU_MASK_PFX_SWZ_CSTLO 0x3 /* Swizzle/Constant (bits 0-1). */
++#define VFPU_SH_PFX_MASK 8
++#define VFPU_MASK_PFX_MASK 0x1 /* Mask. */
++#define VFPU_SH_PFX_SAT 0
++#define VFPU_MASK_PFX_SAT 0x3 /* Saturation. */
++
++/* Special handling of the vrot instructions. */
++#define VFPU_MASK_OP_SIZE 0x8080 /* Masks the operand size (pair, triple, quad). */
++#define VFPU_OP_SIZE_PAIR 0x80
++#define VFPU_OP_SIZE_TRIPLE 0x8000
++#define VFPU_OP_SIZE_QUAD 0x8080
++/* Note that these are within the rotators field, and not the full opcode. */
++#define VFPU_SH_ROT_HI 2
++#define VFPU_MASK_ROT_HI 0x3
++#define VFPU_SH_ROT_LO 0
++#define VFPU_MASK_ROT_LO 0x3
++#define VFPU_SH_ROT_NEG 4 /* Negation. */
++#define VFPU_MASK_ROT_NEG 0x1
++
++/* VFPU 16-bit floating-point format. */
++#define VFPU_FLOAT16_EXP_MAX 0x1f
++#define VFPU_SH_FLOAT16_SIGN 15
++#define VFPU_MASK_FLOAT16_SIGN 0x1
++#define VFPU_SH_FLOAT16_EXP 10
++#define VFPU_MASK_FLOAT16_EXP 0x1f
++#define VFPU_SH_FLOAT16_FRAC 0
++#define VFPU_MASK_FLOAT16_FRAC 0x3ff
++
+ /* UDI */
+ #define OP_SH_UDI1 6
+ #define OP_MASK_UDI1 0x1f
+@@ -416,6 +638,29 @@
+ Requires that "+A" or "+E" occur first to set position.
+ Enforces: 32 < (pos+size) <= 64.
+
++ Sony Allegrex VFPU instructions:
++ "?o"
++ "?0" - "?3"
++ "?4" - "?7"
++ "?a"
++ "?b"
++ "?c"
++ "?e"
++ "?f"
++ "?i"
++ "?q"
++ "?r"
++ "?u"
++ "?w"
++ "?d"
++ "?m"
++ "?n"
++ "?s"
++ "?t"
++ "?v"
++ "?x"
++ "?z"
++
+ Floating point instructions:
+ "D" 5 bit destination register (OP_*_FD)
+ "M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
+@@ -750,6 +995,8 @@
+ #define INSN_5400 0x01000000
+ /* NEC VR5500 instruction. */
+ #define INSN_5500 0x02000000
++/* Sony Allegrex instruction. */
++#define INSN_ALLEGREX 0x10000000
+
+ /* MDMX ASE */
+ #define INSN_MDMX 0x04000000
+@@ -819,6 +1066,7 @@
+ #define CPU_MIPS64 64
+ #define CPU_MIPS64R2 65
+ #define CPU_SB1 12310201 /* octal 'SB', 01. */
++#define CPU_ALLEGREX 10111431 /* octal 'AL', 31. */
+ #define CPU_LOONGSON_2E 3001
+ #define CPU_LOONGSON_2F 3002
+ #define CPU_LOONGSON_3A 3003
+@@ -851,6 +1099,7 @@
+ || (cpu == CPU_VR4120 && ((insn)->membership & INSN_4120) != 0) \
+ || (cpu == CPU_VR5400 && ((insn)->membership & INSN_5400) != 0) \
+ || (cpu == CPU_VR5500 && ((insn)->membership & INSN_5500) != 0) \
++ || (cpu == CPU_ALLEGREX && ((insn)->membership & INSN_ALLEGREX) != 0) \
+ || (cpu == CPU_LOONGSON_2E \
+ && ((insn)->membership & INSN_LOONGSON_2E) != 0) \
+ || (cpu == CPU_LOONGSON_2F \
+@@ -1005,11 +1254,27 @@
+ M_LI_DD,
+ M_LI_S,
+ M_LI_SS,
++ M_LVHI_S_SS,
++ M_LVHI_P_SS,
++ M_LVI_S_SS,
++ M_LVI_P_SS,
++ M_LVI_T_SS,
++ M_LVI_Q_SS,
+ M_LL_AB,
+ M_LL_OB,
+ M_LLD_AB,
+ M_LLD_OB,
+ M_LS_A,
++ M_LVHI_P,
++ M_LVHI_S,
++ M_LVI_P,
++ M_LVI_Q,
++ M_LVI_S,
++ M_LVI_T,
++ M_LVL_Q_AB,
++ M_LVR_Q_AB,
++ M_LV_Q_AB,
++ M_LV_Q_AB_2,
+ M_LW_A,
+ M_LW_AB,
+ M_LWC0_A,
+@@ -1021,6 +1286,7 @@
+ M_LWC2_OB,
+ M_LWC3_A,
+ M_LWC3_AB,
++ M_LV_S_AB,
+ M_LWL_A,
+ M_LWL_AB,
+ M_LWL_OB,
+@@ -1130,6 +1396,10 @@
+ M_SUB_I,
+ M_SUBU_I,
+ M_SUBU_I_2,
++ M_SVL_Q_AB,
++ M_SV_Q_AB,
++ M_SVR_Q_AB,
++ M_SV_S_AB,
+ M_TEQ_I,
+ M_TGE_I,
+ M_TGEU_I,
+@@ -1144,14 +1414,24 @@
+ M_ULH_A,
+ M_ULHU,
+ M_ULHU_A,
++ M_ULV_Q,
++ M_ULV_Q_AB,
++ M_ULV_S,
+ M_ULW,
+ M_ULW_A,
+ M_USH,
+ M_USH_A,
++ M_USV_Q,
++ M_USV_Q_AB,
++ M_USV_S,
+ M_USW,
+ M_USW_A,
+ M_USD,
+ M_USD_A,
++ M_VCMOV_P,
++ M_VCMOV_Q,
++ M_VCMOV_S,
++ M_VCMOV_T,
+ M_XOR_I,
+ M_COP0,
+ M_COP1,
+diff -Nbaur binutils-2.22/include/opcode/vfpu.h binutils-2.22-psp/include/opcode/vfpu.h
+--- binutils-2.22/include/opcode/vfpu.h 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.22-psp/include/opcode/vfpu.h 2012-02-25 14:09:05.000000000 +0000
+@@ -0,0 +1,261 @@
++#ifndef _VFPU_H_
++#define _VFPU_H_
++
++////////////////////////////////////
++// data type
++#define VFPU_MASK_DTYPE 0x8080
++#define VFPU_QUAD 0x8080
++#define VFPU_TRIPLE 0x8000
++#define VFPU_PAIR 0x0080
++#define VFPU_SINGLE 0x0000
++
++////////////////////////////////////
++// register index
++#define VFPU_MASK_VT 0x7f0000
++#define VFPU_MASK_VS 0x007f00
++#define VFPU_MASK_VD 0x00007f
++
++////////////////////////////////////
++// condition and comapre inst
++#define VFPU_PADD_BIN_CMP 0x70
++
++////////////////////////////////////
++// load/store left/right
++#define VFPU_MASK_LDST_LR 0x2
++#define VFPU_LDST_L 0x0
++#define VFPU_LDST_R 0x2
++
++////////////////////////////////////
++// load/store memory/buffer
++#define VFPU_MASK_LDST_MB 0x2
++#define VFPU_LDST_M 0x0
++#define VFPU_LDST_B 0x2
++
++////////////////////////////////////
++// coprocessor move
++#define VFPU_MASK_COP_MV 0xff80
++#define VFPU_MASK_COP_MVC 0xff00
++
++////////////////////////////////////
++// sync code
++#define VFPU_MASK_SYNC_CODE 0xffff
++#define VFPU_SYNC_CODE_DEFAULT 0x0320
++#define VFPU_SYNC_CODE_NOP 0x0000
++#define VFPU_SYNC_CODE_FLUSH 0x040d
++
++////////////////////////////////////
++#define VFPU_INST_BR_F 0x49000000
++#define VFPU_MASK_BR_F 0xffe30000
++#define VFPU_INST_BR_FL 0x49020000
++#define VFPU_MASK_BR_FL 0xffe30000
++#define VFPU_INST_BR_T 0x49010000
++#define VFPU_MASK_BR_T 0xffe30000
++#define VFPU_INST_BR_TL 0x49030000
++#define VFPU_MASK_BR_TL 0xffe30000
++
++#define VFPU_INST_COP_LD_S 0xc8000000
++#define VFPU_MASK_COP_LD_S 0xfc000000
++#define VFPU_INST_COP_ST_S 0xe8000000
++#define VFPU_MASK_COP_ST_S 0xfc000000
++#define VFPU_INST_COP_LD_Q 0xd8000000
++#define VFPU_MASK_COP_LD_Q 0xfc000000
++#define VFPU_INST_COP_ST_Q 0xf8000000
++#define VFPU_MASK_COP_ST_Q 0xfc000000
++#define VFPU_INST_COP_LD_U 0xd4000000
++#define VFPU_MASK_COP_LD_U 0xfc000000
++#define VFPU_INST_COP_ST_U 0xf4000000
++#define VFPU_MASK_COP_ST_U 0xfc000000
++#define VFPU_INST_COP_MF 0x48600000
++#define VFPU_MASK_COP_MF 0xffe00000
++#define VFPU_INST_COP_MT 0x48e00000
++#define VFPU_MASK_COP_MT 0xffe00000
++
++#define VFPU_INST_BIN_ADD 0x60000000
++#define VFPU_MASK_BIN_ADD 0xff800000
++#define VFPU_INST_BIN_SUB 0x60800000
++#define VFPU_MASK_BIN_SUB 0xff800000
++#define VFPU_INST_BIN_SBN 0x61000000
++#define VFPU_MASK_BIN_SBN 0xff800000
++#define VFPU_INST_BIN_DIV 0x63800000
++#define VFPU_MASK_BIN_DIV 0xff800000
++#define VFPU_INST_BIN_MUL 0x64000000
++#define VFPU_MASK_BIN_MUL 0xff800000
++#define VFPU_INST_BIN_DOT 0x64800000
++#define VFPU_MASK_BIN_DOT 0xff800000
++#define VFPU_INST_BIN_SCL 0x65000000
++#define VFPU_MASK_BIN_SCL 0xff800000
++#define VFPU_INST_BIN_HDP 0x66000000
++#define VFPU_MASK_BIN_HDP 0xff800000
++#define VFPU_INST_BIN_CRS 0x66800000
++#define VFPU_MASK_BIN_CRS 0xff800000
++#define VFPU_INST_BIN_DET 0x67000000
++#define VFPU_MASK_BIN_DET 0xff800000
++#define VFPU_INST_BIN_CMP 0x6c000000
++#define VFPU_MASK_BIN_CMP 0xff800000
++#define VFPU_INST_BIN_MIN 0x6d000000
++#define VFPU_MASK_BIN_MIN 0xff800000
++#define VFPU_INST_BIN_MAX 0x6d800000
++#define VFPU_MASK_BIN_MAX 0xff800000
++#define VFPU_INST_BIN_SCMP 0x6e800000
++#define VFPU_MASK_BIN_SCMP 0xff800000
++#define VFPU_INST_BIN_SGE 0x6f000000
++#define VFPU_MASK_BIN_SGE 0xff800000
++#define VFPU_INST_BIN_SLT 0x6f800000
++#define VFPU_MASK_BIN_SLT 0xff800000
++
++#define VFPU_INST_UNR_MOV 0xd0000000
++#define VFPU_MASK_UNR_MOV 0xffff0000
++#define VFPU_INST_UNR_ABS 0xd0010000
++#define VFPU_MASK_UNR_ABS 0xffff0000
++#define VFPU_INST_UNR_NEG 0xd0020000
++#define VFPU_MASK_UNR_NEG 0xffff0000
++#define VFPU_INST_UNR_IDT 0xd0030000
++#define VFPU_MASK_UNR_IDT 0xffff0000
++#define VFPU_INST_UNR_SAT0 0xd0040000
++#define VFPU_MASK_UNR_SAT0 0xffff0000
++#define VFPU_INST_UNR_SAT1 0xd0050000
++#define VFPU_MASK_UNR_SAT1 0xffff0000
++#define VFPU_INST_UNR_ZERO 0xd0060000
++#define VFPU_MASK_UNR_ZERO 0xffff0000
++#define VFPU_INST_UNR_ONE 0xd0070000
++#define VFPU_MASK_UNR_ONE 0xffff0000
++#define VFPU_INST_UNR_RCP 0xd0100000
++#define VFPU_MASK_UNR_RCP 0xffff0000
++#define VFPU_INST_UNR_RSQ 0xd0110000
++#define VFPU_MASK_UNR_RSQ 0xffff0000
++#define VFPU_INST_UNR_SIN 0xd0120000
++#define VFPU_MASK_UNR_SIN 0xffff0000
++#define VFPU_INST_UNR_COS 0xd0130000
++#define VFPU_MASK_UNR_COS 0xffff0000
++#define VFPU_INST_UNR_EXP2 0xd0140000
++#define VFPU_MASK_UNR_EXP2 0xffff0000
++#define VFPU_INST_UNR_LOG2 0xd0150000
++#define VFPU_MASK_UNR_LOG2 0xffff0000
++#define VFPU_INST_UNR_SQR 0xd0160000
++#define VFPU_MASK_UNR_SQR 0xffff0000
++#define VFPU_INST_UNR_ASIN 0xd0170000
++#define VFPU_MASK_UNR_ASIN 0xffff0000
++#define VFPU_INST_UNR_NRCP 0xd0180000
++#define VFPU_MASK_UNR_NRCP 0xffff0000
++#define VFPU_INST_UNR_NSIN 0xd01a0000
++#define VFPU_MASK_UNR_NSIN 0xffff0000
++#define VFPU_INST_UNR_REXP2 0xd01c0000
++#define VFPU_MASK_UNR_REXP2 0xffff0000
++#define VFPU_INST_UNR_RNDS 0xd0200000
++#define VFPU_MASK_UNR_RNDS 0xffff0000
++#define VFPU_INST_UNR_RNDI 0xd0210000
++#define VFPU_MASK_UNR_RNDI 0xffff0000
++#define VFPU_INST_UNR_RNDF1 0xd0220000
++#define VFPU_MASK_UNR_RNDF1 0xffff0000
++#define VFPU_INST_UNR_RNDF2 0xd0230000
++#define VFPU_MASK_UNR_RNDF2 0xffff0000
++#define VFPU_INST_UNR_F2H 0xd0320000
++#define VFPU_MASK_UNR_F2H 0xffff0000
++#define VFPU_INST_UNR_H2F 0xd0330000
++#define VFPU_MASK_UNR_H2F 0xffff0000
++#define VFPU_INST_UNR_SBZ 0xd0360000
++#define VFPU_MASK_UNR_SBZ 0xffff0000
++#define VFPU_INST_UNR_LGB 0xd0370000
++#define VFPU_MASK_UNR_LGB 0xffff0000
++#define VFPU_INST_UNR_US2I 0xd03a0000
++#define VFPU_MASK_UNR_US2I 0xffff0000
++#define VFPU_INST_UNR_S2I 0xd03b0000
++#define VFPU_MASK_UNR_S2I 0xffff0000
++#define VFPU_INST_UNR_I2UC 0xd03c0000
++#define VFPU_MASK_UNR_I2UC 0xffff0000
++#define VFPU_INST_UNR_I2C 0xd03d0000
++#define VFPU_MASK_UNR_I2C 0xffff0000
++#define VFPU_INST_UNR_I2US 0xd03e0000
++#define VFPU_MASK_UNR_I2US 0xffff0000
++#define VFPU_INST_UNR_I2S 0xd03f0000
++#define VFPU_MASK_UNR_I2S 0xffff0000
++#define VFPU_INST_UNR_SRT1 0xd0400000
++#define VFPU_MASK_UNR_SRT1 0xffff0000
++#define VFPU_INST_UNR_SRT2 0xd0410000
++#define VFPU_MASK_UNR_SRT2 0xffff0000
++#define VFPU_INST_UNR_BFY1 0xd0420000
++#define VFPU_MASK_UNR_BFY1 0xffff0000
++#define VFPU_INST_UNR_BFY2 0xd0430000
++#define VFPU_MASK_UNR_BFY2 0xffff0000
++#define VFPU_INST_UNR_OCP 0xd0440000
++#define VFPU_MASK_UNR_OCP 0xffff0000
++#define VFPU_INST_UNR_SOCP 0xd0450000
++#define VFPU_MASK_UNR_SOCP 0xffff0000
++#define VFPU_INST_UNR_FAD 0xd0460000
++#define VFPU_MASK_UNR_FAD 0xffff0000
++#define VFPU_INST_UNR_AVG 0xd0470000
++#define VFPU_MASK_UNR_AVG 0xffff0000
++#define VFPU_INST_UNR_SRT3 0xd0480000
++#define VFPU_MASK_UNR_SRT3 0xffff0000
++#define VFPU_INST_UNR_SRT4 0xd0490000
++#define VFPU_MASK_UNR_SRT4 0xffff0000
++#define VFPU_INST_UNR_SGN 0xd04a0000
++#define VFPU_MASK_UNR_SGN 0xffff0000
++#define VFPU_INST_UNR_CF 0xd0500000
++#define VFPU_MASK_UNR_CF 0xffff0080
++#define VFPU_INST_UNR_CT 0xd0510000
++#define VFPU_MASK_UNR_CT 0xffff8000
++#define VFPU_INST_UNR_T4444 0xd0590000
++#define VFPU_MASK_UNR_T4444 0xffff0000
++#define VFPU_INST_UNR_T5551 0xd05a0000
++#define VFPU_MASK_UNR_T5551 0xffff0000
++#define VFPU_INST_UNR_T5650 0xd05b0000
++#define VFPU_MASK_UNR_T5650 0xffff0000
++#define VFPU_INST_UNR_CST 0xd0600000
++#define VFPU_MASK_UNR_CST 0xffe00000
++
++#define VFPU_INST_UNRI_F2I_N 0xd2000000
++#define VFPU_MASK_UNRI_F2I_N 0xffe00000
++#define VFPU_INST_UNRI_F2I_Z 0xd2200000
++#define VFPU_MASK_UNRI_F2I_Z 0xffe00000
++#define VFPU_INST_UNRI_F2I_U 0xd2400000
++#define VFPU_MASK_UNRI_F2I_U 0xffe00000
++#define VFPU_INST_UNRI_F2I_D 0xd2600000
++#define VFPU_MASK_UNRI_F2I_D 0xffe00000
++#define VFPU_INST_UNRI_I2F 0xd2800000
++#define VFPU_MASK_UNRI_I2F 0xffe00000
++#define VFPU_INST_UNRI_CMOV_T 0xd2a00000
++#define VFPU_MASK_UNRI_CMOV_T 0xfff80000
++#define VFPU_INST_UNRI_CMOV_F 0xd2a80000
++#define VFPU_MASK_UNRI_CMOV_F 0xfff80000
++#define VFPU_INST_UNRI_WBN 0xd3000000
++#define VFPU_MASK_UNRI_WBN 0xff000000
++
++#define VFPU_INST_PFX_RA 0xdc000000
++#define VFPU_MASK_PFX_RA 0xff000000
++#define VFPU_INST_PFX_RB 0xdd000000
++#define VFPU_MASK_PFX_RB 0xff000000
++#define VFPU_INST_PFX_W 0xde000000
++#define VFPU_MASK_PFX_W 0xff000000
++#define VFPU_INST_IIM 0xdf000000
++#define VFPU_MASK_IIM 0xff800000
++#define VFPU_INST_FIM 0xdf800000
++#define VFPU_MASK_FIM 0xff800000
++
++#define VFPU_INST_RPT_MMUL 0xf0000000
++#define VFPU_MASK_RPT_MMUL 0xff800000
++#define VFPU_INST_RPT_TFM2 0xf0800000
++#define VFPU_MASK_RPT_TFM2 0xff800000
++#define VFPU_INST_RPT_TFM3 0xf1000000
++#define VFPU_MASK_RPT_TFM3 0xff800000
++#define VFPU_INST_RPT_TFM4 0xf1800000
++#define VFPU_MASK_RPT_TFM4 0xff800000
++#define VFPU_INST_RPT_MSCL 0xf2000000
++#define VFPU_MASK_RPT_MSCL 0xff800000
++#define VFPU_INST_RPT_QMUL 0xf2800000
++#define VFPU_MASK_RPT_QMUL 0xff800000
++#define VFPU_INST_RPT_MMOV 0xf3800000
++#define VFPU_MASK_RPT_MMOV 0xffff0000
++#define VFPU_INST_RPT_MIDT 0xf3830000
++#define VFPU_MASK_RPT_MIDT 0xffff0000
++#define VFPU_INST_RPT_MZERO 0xf3860000
++#define VFPU_MASK_RPT_MZERO 0xffff0000
++#define VFPU_INST_RPT_MONE 0xf3870000
++#define VFPU_MASK_RPT_MONE 0xffff0000
++#define VFPU_INST_RPT_ROT 0xf3a00000
++#define VFPU_MASK_RPT_ROT 0xffe00000
++
++#define VFPU_INST_SYNC 0xffff0000
++#define VFPU_MASK_SYNC 0xffff0000
++
++#endif /* _VFPU_H_ */
+diff -Nbaur binutils-2.22/ld/Makefile.am binutils-2.22-psp/ld/Makefile.am
+--- binutils-2.22/ld/Makefile.am 2011-07-22 21:22:37.000000000 +0100
++++ binutils-2.22-psp/ld/Makefile.am 2012-02-25 14:09:05.000000000 +0000
+@@ -262,6 +262,7 @@
+ eelf_i386_ldso.c \
+ eelf_i386_sol2.c \
+ eelf_i386_vxworks.c \
++ eelf_mipsallegrexel_psp.o \
+ eelf_s390.c \
+ egld960.c \
+ egld960coff.c \
+@@ -1196,6 +1197,9 @@
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
++eelf_mipsallegrexel_psp.c: $(srcdir)/emulparams/elf_mipsallegrexel_psp.sh \
++ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_psp.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} elf_mipsallegrexel_psp "$(tdir_elf_mipsallegrexel_psp)"
+ eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
+diff -Nbaur binutils-2.22/ld/Makefile.in binutils-2.22-psp/ld/Makefile.in
+--- binutils-2.22/ld/Makefile.in 2011-07-22 21:22:37.000000000 +0100
++++ binutils-2.22-psp/ld/Makefile.in 2012-02-25 14:09:05.000000000 +0000
+@@ -568,6 +568,7 @@
+ eelf_i386_ldso.c \
+ eelf_i386_sol2.c \
+ eelf_i386_vxworks.c \
++ eelf_mipsallegrexel_psp.o \
+ eelf_s390.c \
+ egld960.c \
+ egld960coff.c \
+@@ -2649,6 +2650,9 @@
+ $(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
++eelf_mipsallegrexel_psp.c: $(srcdir)/emulparams/elf_mipsallegrexel_psp.sh \
++ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_psp.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} elf_mipsallegrexel_psp "$(tdir_elf_mipsallegrexel_psp)"
+ eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
+diff -Nbaur binutils-2.22/ld/configure.tgt binutils-2.22-psp/ld/configure.tgt
+--- binutils-2.22/ld/configure.tgt 2011-11-21 09:29:37.000000000 +0000
++++ binutils-2.22-psp/ld/configure.tgt 2012-02-25 14:09:05.000000000 +0000
+@@ -383,6 +383,8 @@
+ mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
+ mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
+ mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
++mips*allegrexel-psp-elf*) targ_emul=elf_mipsallegrexel_psp
++ targ_extra_emuls="elf32elmip" ;;
+ mips*el-sde-elf*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
+ mips*-sde-elf*) targ_emul=elf32btsmip
+diff -Nbaur binutils-2.22/ld/emulparams/elf_mipsallegrexel_psp.sh binutils-2.22-psp/ld/emulparams/elf_mipsallegrexel_psp.sh
+--- binutils-2.22/ld/emulparams/elf_mipsallegrexel_psp.sh 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.22-psp/ld/emulparams/elf_mipsallegrexel_psp.sh 2012-02-25 14:09:05.000000000 +0000
+@@ -0,0 +1,22 @@
++# Based off of the default elf32 MIPS target. However, we use a seperate
++# script template because the PSP architecture defines sections that normally
++# cannot be overriden here and would normally get absorbed (i.e.
++# .rodata.sceModuleInfo would be absorbed into .rodata).
++
++EMBEDDED=yes
++. ${srcdir}/emulparams/elf32lmip.sh
++unset NONPAGED_TEXT_START_ADDR
++unset SHLIB_TEXT_START_ADDR
++unset COMMONPAGESIZE
++
++SCRIPT_NAME=elf_psp
++TEXT_START_ADDR=0x08900000
++MAXPAGESIZE=256
++ARCH="mips:allegrex"
++MACHINE=
++TEMPLATE_NAME=elf32
++GENERATE_SHLIB_SCRIPT=yes
++DYNAMIC_LINK=FALSE
++
++# Discard the .comment and .pdr sections.
++OTHER_SECTIONS="/DISCARD/ : { *(.comment) *(.pdr) }"
+diff -Nbaur binutils-2.22/ld/scripttempl/elf_psp.sc binutils-2.22-psp/ld/scripttempl/elf_psp.sc
+--- binutils-2.22/ld/scripttempl/elf_psp.sc 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.22-psp/ld/scripttempl/elf_psp.sc 2012-02-25 14:09:05.000000000 +0000
+@@ -0,0 +1,496 @@
++#
++# Unusual variables checked by this code:
++# NOP - four byte opcode for no-op (defaults to 0)
++# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
++# empty.
++# SMALL_DATA_CTOR - .ctors contains small data.
++# SMALL_DATA_DTOR - .dtors contains small data.
++# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
++# INITIAL_READONLY_SECTIONS - at start of text segment
++# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
++# (e.g., .PARISC.milli)
++# OTHER_TEXT_SECTIONS - these get put in .text when relocating
++# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
++# (e.g., .PARISC.global)
++# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
++# (e.g. PPC32 .fixup, .got[12])
++# OTHER_BSS_SECTIONS - other than .bss .sbss ...
++# OTHER_SECTIONS - at the end
++# EXECUTABLE_SYMBOLS - symbols that must be defined for an
++# executable (e.g., _DYNAMIC_LINK)
++# TEXT_START_ADDR - the first byte of the text segment, after any
++# headers.
++# TEXT_BASE_ADDRESS - the first byte of the text segment.
++# TEXT_START_SYMBOLS - symbols that appear at the start of the
++# .text section.
++# DATA_START_SYMBOLS - symbols that appear at the start of the
++# .data section.
++# OTHER_GOT_SYMBOLS - symbols defined just before .got.
++# OTHER_GOT_SECTIONS - sections just after .got.
++# OTHER_SDATA_SECTIONS - sections just after .sdata.
++# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
++# .bss section besides __bss_start.
++# DATA_PLT - .plt should be in data segment, not text segment.
++# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
++# BSS_PLT - .plt should be in bss segment
++# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
++# EMBEDDED - whether this is for an embedded system.
++# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
++# start address of shared library.
++# INPUT_FILES - INPUT command of files to always include
++# WRITABLE_RODATA - if set, the .rodata section should be writable
++# INIT_START, INIT_END - statements just before and just after
++# combination of .init sections.
++# FINI_START, FINI_END - statements just before and just after
++# combination of .fini sections.
++# STACK_ADDR - start of a .stack section.
++# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
++# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
++# so that .got can be in the RELRO area. It should be set to
++# the number of bytes in the beginning of .got.plt which can be
++# in the RELRO area as well.
++#
++# When adding sections, do note that the names of some sections are used
++# when specifying the start address of the next.
++#
++
++# Many sections come in three flavours. There is the 'real' section,
++# like ".data". Then there are the per-procedure or per-variable
++# sections, generated by -ffunction-sections and -fdata-sections in GCC,
++# and useful for --gc-sections, which for a variable "foo" might be
++# ".data.foo". Then there are the linkonce sections, for which the linker
++# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
++# The exact correspondences are:
++#
++# Section Linkonce section
++# .text .gnu.linkonce.t.foo
++# .rodata .gnu.linkonce.r.foo
++# .data .gnu.linkonce.d.foo
++# .bss .gnu.linkonce.b.foo
++# .sdata .gnu.linkonce.s.foo
++# .sbss .gnu.linkonce.sb.foo
++# .sdata2 .gnu.linkonce.s2.foo
++# .sbss2 .gnu.linkonce.sb2.foo
++# .debug_info .gnu.linkonce.wi.foo
++# .tdata .gnu.linkonce.td.foo
++# .tbss .gnu.linkonce.tb.foo
++#
++# Each of these can also have corresponding .rel.* and .rela.* sections.
++
++test -z "$ENTRY" && ENTRY=_start
++test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
++test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
++if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
++test -z "${ELFSIZE}" && ELFSIZE=32
++test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
++test "$LD_FLAG" = "N" && DATA_ADDR=.
++test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
++test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
++test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
++DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
++DATA_SEGMENT_RELRO_END=""
++DATA_SEGMENT_RELRO_GOTPLT_END=""
++DATA_SEGMENT_END=""
++if test -n "${COMMONPAGESIZE}"; then
++ DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
++ DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
++ if test -n "${SEPARATE_GOTPLT}"; then
++ DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT}, .);"
++ else
++ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (0, .);"
++ fi
++fi
++INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
++PLT=".plt ${RELOCATING-0} : { *(.plt) }"
++if test -z "$GOT"; then
++ if test -z "$SEPARATE_GOTPLT"; then
++ GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
++ else
++ GOT=".got ${RELOCATING-0} : { *(.got) }"
++ GOTPLT="${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}}
++ .got.plt ${RELOCATING-0} : { *(.got.plt) }"
++ fi
++fi
++DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
++RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
++DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
++STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
++if test -z "${NO_SMALL_DATA}"; then
++ SBSS=".sbss ${RELOCATING-0} :
++ {
++ ${RELOCATING+PROVIDE (__sbss_start = .);}
++ ${RELOCATING+PROVIDE (___sbss_start = .);}
++ ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
++ *(.dynsbss)
++ *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
++ *(.scommon)
++ ${RELOCATING+PROVIDE (__sbss_end = .);}
++ ${RELOCATING+PROVIDE (___sbss_end = .);}
++ }"
++ SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
++ SDATA="/* We want the small data sections together, so single-instruction offsets
++ can access them all, and initialized data all before uninitialized, so
++ we can shorten the on-disk segment size. */
++ .sdata ${RELOCATING-0} :
++ {
++ ${RELOCATING+${SDATA_START_SYMBOLS}}
++ ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
++ *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
++ }"
++ SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
++ REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
++ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
++ REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
++ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
++ REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
++ .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
++ REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
++ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
++else
++ NO_SMALL_DATA=" "
++fi
++test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
++CTOR=".ctors ${CONSTRUCTING-0} :
++ {
++ ${CONSTRUCTING+${CTOR_START}}
++ /* gcc uses crtbegin.o to find the start of
++ the constructors, so we make sure it is
++ first. Because this is a wildcard, it
++ doesn't matter if the user does not
++ actually link against crtbegin.o; the
++ linker won't look for a file to match a
++ wildcard. The wildcard also means that it
++ doesn't matter which directory crtbegin.o
++ is in. */
++
++ KEEP (*crtbegin*.o(.ctors))
++
++ /* We don't want to include the .ctor section from
++ from the crtend.o file until after the sorted ctors.
++ The .ctor section from the crtend file contains the
++ end of ctors marker and it must be last */
++
++ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
++ KEEP (*(SORT(.ctors.*)))
++ KEEP (*(.ctors))
++ ${CONSTRUCTING+${CTOR_END}}
++ }"
++DTOR=".dtors ${CONSTRUCTING-0} :
++ {
++ ${CONSTRUCTING+${DTOR_START}}
++ KEEP (*crtbegin*.o(.dtors))
++ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
++ KEEP (*(SORT(.dtors.*)))
++ KEEP (*(.dtors))
++ ${CONSTRUCTING+${DTOR_END}}
++ }"
++STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
++ {
++ ${RELOCATING+_stack = .;}
++ *(.stack)
++ }"
++
++# if this is for an embedded system, don't add SIZEOF_HEADERS.
++if [ -z "$EMBEDDED" ]; then
++ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
++else
++ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
++fi
++
++cat <> OP_SH_FT) & OP_MASK_FT);
+ break;
+
++ case '?':
++ /* VFPU extensions. */
++ d++;
++ switch (*d)
++ {
++ case '\0':
++ /* xgettext:c-format */
++ (*info->fprintf_func) (info->stream,
++ _("# internal error, incomplete VFPU extension sequence (?)"));
++ return;
++
++ case 'o':
++ delta = (l >> OP_SH_VFPU_DELTA) & OP_MASK_VFPU_DELTA;
++ if (delta & 0x8000)
++ delta |= ~0xffff;
++ (*info->fprintf_func) (info->stream, "%d",
++ delta);
++ break;
++
++ case '0':
++ case '1':
++ case '2':
++ case '3':
++ {
++ unsigned int pos = *d, base = '0';
++ unsigned int negation = (l >> (pos - (base - VFPU_SH_PFX_NEG))) & VFPU_MASK_PFX_NEG;
++ unsigned int constant = (l >> (pos - (base - VFPU_SH_PFX_CST))) & VFPU_MASK_PFX_CST;
++ unsigned int abs_consthi =
++ (l >> (pos - (base - VFPU_SH_PFX_ABS_CSTHI))) & VFPU_MASK_PFX_ABS_CSTHI;
++ unsigned int swz_constlo = (l >> ((pos - base) * 2)) & VFPU_MASK_PFX_SWZ_CSTLO;
++
++ if (negation)
++ (*info->fprintf_func) (info->stream, "-");
++ if (constant)
++ {
++ (*info->fprintf_func) (info->stream, "%s",
++ pfx_cst_names[(abs_consthi << 2) | swz_constlo]);
++ }
++ else
++ {
++ if (abs_consthi)
++ (*info->fprintf_func) (info->stream, "|%s|",
++ pfx_swz_names[swz_constlo]);
++ else
++ (*info->fprintf_func) (info->stream, "%s",
++ pfx_swz_names[swz_constlo]);
++ }
++ }
++ break;
++
++ case '4':
++ case '5':
++ case '6':
++ case '7':
++ {
++ unsigned int pos = *d, base = '4';
++ unsigned int mask = (l >> (pos - (base - VFPU_SH_PFX_MASK))) & VFPU_MASK_PFX_MASK;
++ unsigned int saturation = (l >> ((pos - base) * 2)) & VFPU_MASK_PFX_SAT;
++
++ if (mask)
++ (*info->fprintf_func) (info->stream, "m");
++ else
++ (*info->fprintf_func) (info->stream, "%s",
++ pfx_sat_names[saturation]);
++ }
++ break;
++
++ case 'a':
++ {
++ unsigned int c = (l >> OP_SH_VFPU_CONST) & OP_MASK_VFPU_CONST;
++ if (c < vfpu_num_constants)
++ {
++ (*info->fprintf_func) (info->stream, "%s",
++ vfpu_const_names[c]);
++ }
++ break;
++ }
++
++ case 'b':
++ /* 5-bit immediate value. */
++ (*info->fprintf_func) (info->stream, "%d",
++ (l >> OP_SH_VFPU_IMM5) & OP_MASK_VFPU_IMM5);
++ break;
++
++ case 'c':
++ /* VFPU condition code. */
++ (*info->fprintf_func) (info->stream, "%d",
++ (l >> OP_SH_VFPU_CC) & OP_MASK_VFPU_CC);
++ break;
++
++ case 'e':
++ /* 3-bit immediate value. */
++ (*info->fprintf_func) (info->stream, "%d",
++ (l >> OP_SH_VFPU_IMM3) & OP_MASK_VFPU_IMM3);
++ break;
++
++ case 'f':
++ /* Conditional compare. */
++ (*info->fprintf_func) (info->stream, "%s",
++ vfpu_cond_names[(l >> OP_SH_VFPU_COND) & OP_MASK_VFPU_COND]);
++ /* Apparently this specifier is unused. */
++ d++;
++ break;
++
++ case 'i':
++ /* 8-bit immediate value. */
++ (*info->fprintf_func) (info->stream, "0x%02x",
++ (l >> OP_SH_VFPU_IMM8) & OP_MASK_VFPU_IMM8);
++ break;
++
++ case 'q':
++ /* VFPU control register (vmtvc). */
++ (*info->fprintf_func) (info->stream, "$%d",
++ (l >> OP_SH_VFPU_VMTVC) & OP_MASK_VFPU_VMTVC);
++ break;
++
++ case 'r':
++ /* VFPU control register (vmfvc). */
++ (*info->fprintf_func) (info->stream, "$%d",
++ (l >> OP_SH_VFPU_VMFVC) & OP_MASK_VFPU_VMFVC);
++ break;
++
++ case 'u':
++ /* Convert a VFPU 16-bit floating-point number to IEEE754. */
++ {
++ union float2int {
++ unsigned int i;
++ float f;
++ } float2int;
++ unsigned short float16 = (l >> OP_SH_VFPU_FLOAT16) & OP_MASK_VFPU_FLOAT16;
++ unsigned int sign = (float16 >> VFPU_SH_FLOAT16_SIGN) & VFPU_MASK_FLOAT16_SIGN;
++ int exponent = (float16 >> VFPU_SH_FLOAT16_EXP) & VFPU_MASK_FLOAT16_EXP;
++ unsigned int fraction = float16 & VFPU_MASK_FLOAT16_FRAC;
++ char signchar = '+' + ((sign == 1) * 2);
++
++ if (exponent == VFPU_FLOAT16_EXP_MAX)
++ {
++ if (fraction == 0)
++ (*info->fprintf_func) (info->stream, "%cInf", signchar);
++ else
++ (*info->fprintf_func) (info->stream, "%cNaN", signchar);
++ }
++ else if (exponent == 0 && fraction == 0)
++ {
++ (*info->fprintf_func) (info->stream, "%c0", signchar);
++ }
++ else
++ {
++ if (exponent == 0)
++ {
++ do
++ {
++ fraction <<= 1;
++ exponent--;
++ }
++ while (!(fraction & (VFPU_MASK_FLOAT16_FRAC + 1)));
++
++ fraction &= VFPU_MASK_FLOAT16_FRAC;
++ }
++
++ /* Convert to 32-bit single-precision IEEE754. */
++ float2int.i = sign << 31;
++ float2int.i |= (exponent + 112) << 23;
++ float2int.i |= fraction << 13;
++ (*info->fprintf_func) (info->stream, "%g", float2int.f);
++ }
++ }
++ break;
++
++ case 'w':
++ {
++ const char *elements[4];
++ unsigned int opcode = l & VFPU_MASK_OP_SIZE;
++ unsigned int rotators = (l >> OP_SH_VFPU_ROT) & OP_MASK_VFPU_ROT;
++ unsigned int opsize, rothi, rotlo, negation, i;
++
++ /* Determine the operand size so we'll know how many elements to output. */
++ if (opcode == VFPU_OP_SIZE_PAIR)
++ opsize = 2;
++ else if (opcode == VFPU_OP_SIZE_TRIPLE)
++ opsize = 3;
++ else
++ opsize = (opcode == VFPU_OP_SIZE_QUAD) * 4; /* Sanity check. */
++
++ rothi = (rotators >> VFPU_SH_ROT_HI) & VFPU_MASK_ROT_HI;
++ rotlo = (rotators >> VFPU_SH_ROT_LO) & VFPU_MASK_ROT_LO;
++ negation = (rotators >> VFPU_SH_ROT_NEG) & VFPU_MASK_ROT_NEG;
++
++ if (rothi == rotlo)
++ {
++ if (negation)
++ {
++ elements[0] = "-s";
++ elements[1] = "-s";
++ elements[2] = "-s";
++ elements[3] = "-s";
++ }
++ else
++ {
++ elements[0] = "s";
++ elements[1] = "s";
++ elements[2] = "s";
++ elements[3] = "s";
++ }
++ }
++ else
++ {
++ elements[0] = "0";
++ elements[1] = "0";
++ elements[2] = "0";
++ elements[3] = "0";
++ }
++ if (negation)
++ elements[rothi] = "-s";
++ else
++ elements[rothi] = "s";
++ elements[rotlo] = "c";
++
++ (*info->fprintf_func) (info->stream, "[");
++ i = 0;
++ for (;;)
++ {
++ (*info->fprintf_func) (info->stream, "%s",
++ elements[i++]);
++ if (i >= opsize)
++ break;
++ (*info->fprintf_func) (info->stream, ",");
++ }
++ (*info->fprintf_func) (info->stream, "]");
++ }
++ break;
++
++ case 'd':
++ case 'm':
++ case 'n':
++ case 's':
++ case 't':
++ case 'v':
++ case 'x':
++ {
++ unsigned int vreg = 0;
++
++ /* The first char specifies the bitfield that contains the register number. */
++ switch (*d)
++ {
++ case 'd':
++ case 'v':
++ case 'x':
++ vreg = (l >> OP_SH_VFPU_VD) & OP_MASK_VFPU_VD;
++ break;
++
++ case 'm':
++ /* Combine bits 0-4 of vt with bits 5-6 of vt. */
++ vreg = ((l >> OP_SH_VFPU_VT_LO) & OP_MASK_VFPU_VT_LO)
++ | ((l & OP_MASK_VFPU_VT_HI2) << OP_SH_VFPU_VT_HI);
++ break;
++
++ case 'n':
++ /* Combine bits 0-4 of vt with bit 5 of vt. */
++ vreg = ((l >> OP_SH_VFPU_VT_LO) & OP_MASK_VFPU_VT_LO)
++ | ((l & OP_MASK_VFPU_VT_HI1) << OP_SH_VFPU_VT_HI);
++ break;
++
++ case 's':
++ {
++ unsigned int temp_vreg = l >> OP_SH_VFPU_VS;
++
++ vreg = temp_vreg & OP_MASK_VFPU_VS;
++ if ((l & VFPU_OP_VT_VS_VD) == VFPU_OPCODE_VMMUL)
++ {
++ /* vmmul instructions have the RXC bit (bit 13) inverted. */
++ if (temp_vreg & 0x20)
++ vreg = temp_vreg & 0x5f;
++ else
++ vreg |= 0x20;
++ }
++ }
++ break;
++
++ case 't':
++ vreg = (l >> OP_SH_VFPU_VT) & OP_MASK_VFPU_VT;
++ break;
++ }
++
++ /* The next char is the register set vreg comes from. */
++ d++;
++ switch (*d)
++ {
++ case '0':
++ (*info->fprintf_func) (info->stream, "%s.s",
++ vfpu_sreg_names[vreg]);
++ break;
++
++ case '1':
++ (*info->fprintf_func) (info->stream, "%s.p",
++ vfpu_vpreg_names[vreg]);
++ break;
++
++ case '2':
++ (*info->fprintf_func) (info->stream, "%s.t",
++ vfpu_vtreg_names[vreg]);
++ break;
++
++ case '3':
++ (*info->fprintf_func) (info->stream, "%s.q",
++ vfpu_vqreg_names[vreg]);
++ break;
++
++ case '5':
++ (*info->fprintf_func) (info->stream, "%s.p",
++ vfpu_mpreg_names[vreg]);
++ break;
++
++ case '6':
++ (*info->fprintf_func) (info->stream, "%s.t",
++ vfpu_mtreg_names[vreg]);
++ break;
++
++ case '7':
++ (*info->fprintf_func) (info->stream, "%s.q",
++ vfpu_mqreg_names[vreg]);
++ break;
++
++ default:
++ /* xgettext:c-format */
++ (*info->fprintf_func) (info->stream,
++ _("# internal error, undefined vreg modifier(%c)"),
++ *d);
++ break;
++ }
++
++ /* The last char is unused for disassembly. */
++ d++;
++ }
++ break;
++
++ case 'z':
++ (*info->fprintf_func) (info->stream, "%s",
++ vfpu_rwb_names[(l >> OP_SH_VFPU_RWB) & OP_MASK_VFPU_RWB]);
++ break;
++ }
++ break;
++
+ default:
+ /* xgettext:c-format */
+ (*info->fprintf_func) (info->stream,
+diff -Nbaur binutils-2.22/opcodes/mips-opc.c binutils-2.22-psp/opcodes/mips-opc.c
+--- binutils-2.22/opcodes/mips-opc.c 2011-08-09 16:20:03.000000000 +0100
++++ binutils-2.22-psp/opcodes/mips-opc.c 2012-02-25 14:09:05.000000000 +0000
+@@ -121,6 +121,7 @@
+ #define N5 (INSN_5400 | INSN_5500)
+ #define N54 INSN_5400
+ #define N55 INSN_5500
++#define AL INSN_ALLEGREX
+ #define IOCT INSN_OCTEON
+ #define XLR INSN_XLR
+
+@@ -402,6 +403,7 @@
+ {"bnel", "s,t,p", 0x54000000, 0xfc000000, CBL|RD_s|RD_t, 0, I2|T3 },
+ {"bnel", "s,I,p", 0, (int) M_BNEL_I, INSN_MACRO, 0, I2|T3 },
+ {"break", "", 0x0000000d, 0xffffffff, TRAP, 0, I1 },
++{"break", "B", 0x0000000d, 0xfc00003f, TRAP, 0, AL },
+ {"break", "c", 0x0000000d, 0xfc00ffff, TRAP, 0, I1 },
+ {"break", "c,q", 0x0000000d, 0xfc00003f, TRAP, 0, I1 },
+ {"c.f.d", "S,T", 0x46200030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
+@@ -584,7 +586,7 @@
+ {"flushd", "", 0xbc020000, 0xffffffff, 0, 0, L1 },
+ {"flushid", "", 0xbc030000, 0xffffffff, 0, 0, L1 },
+ {"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, 0, L1 },
+-{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, 0, I3_32|T3},
++{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, 0, I3_32|T3|AL},
+ {"cache", "k,A(b)", 0, (int) M_CACHE_AB, INSN_MACRO, 0, I3_32|T3},
+ {"ceil.l.d", "D,S", 0x4620000a, 0xffff003f, WR_D|RD_S|FP_D, 0, I3_33 },
+ {"ceil.l.s", "D,S", 0x4600000a, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3_33 },
+@@ -602,7 +604,9 @@
+ {"cins", "t,r,+P,+S",0x70000033, 0xfc00003f, WR_t|RD_s, 0, IOCT }, /* cins32 */
+ {"cins", "t,r,+p,+s",0x70000032, 0xfc00003f, WR_t|RD_s, 0, IOCT },
+ {"clo", "U,s", 0x70000021, 0xfc0007ff, WR_d|WR_t|RD_s, 0, I32|N55 },
++{"clo", "d,s", 0x00000017, 0xfc1f07ff, WR_d|RD_s, 0, AL },
+ {"clz", "U,s", 0x70000020, 0xfc0007ff, WR_d|WR_t|RD_s, 0, I32|N55 },
++{"clz", "d,s", 0x00000016, 0xfc1f07ff, WR_d|RD_s, 0, AL },
+ {"ctc0", "t,G", 0x40c00000, 0xffe007ff, COD|RD_t|WR_CC, 0, I1 },
+ {"ctc1", "t,G", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
+ {"ctc1", "t,S", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
+@@ -627,16 +631,16 @@
+ {"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_S|FP_D, 0, I5_33 },
+ {"cvt.pw.ps", "D,S", 0x46c00024, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, M3D },
+ {"dabs", "d,v", 0, (int) M_DABS, INSN_MACRO, 0, I3 },
++{"max", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
+ {"dadd", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
+ {"dadd", "t,r,I", 0, (int) M_DADD_I, INSN_MACRO, 0, I3 },
+-{"dadd", "D,S,T", 0x45e00000, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2E },
+-{"dadd", "D,S,T", 0x4b60000c, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F|IL3A },
+ {"daddi", "t,r,j", 0x60000000, 0xfc000000, WR_t|RD_s, 0, I3 },
+ {"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_t|RD_s, 0, I3 },
++{"min", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
+ {"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
+ {"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3 },
+ {"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_d|RD_s|RD_t|WR_C0|RD_C0, 0, XLR },
+-{"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5 },
++{"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5|AL },
+ {"dclo", "U,s", 0x70000025, 0xfc0007ff, RD_s|WR_d|WR_t, 0, I64|N55 },
+ {"dclz", "U,s", 0x70000024, 0xfc0007ff, RD_s|WR_d|WR_t, 0, I64|N55 },
+ /* dctr and dctw are used on the r5000. */
+@@ -725,7 +729,7 @@
+ {"dremu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, I3 },
+ {"dremu", "d,v,t", 0, (int) M_DREMU_3, INSN_MACRO, 0, I3 },
+ {"dremu", "d,v,I", 0, (int) M_DREMU_3I, INSN_MACRO, 0, I3 },
+-{"dret", "", 0x7000003e, 0xffffffff, 0, 0, N5 },
++{"dret", "", 0x7000003e, 0xffffffff, 0, 0, N5|AL },
+ {"drol", "d,v,t", 0, (int) M_DROL, INSN_MACRO, 0, I3 },
+ {"drol", "d,v,I", 0, (int) M_DROL_I, INSN_MACRO, 0, I3 },
+ {"dror", "d,v,t", 0, (int) M_DROR, INSN_MACRO, 0, I3 },
+@@ -774,10 +778,10 @@
+ {"ei", "t", 0x41606020, 0xffe0ffff, WR_t|WR_C0, 0, I33|IOCT},
+ {"emt", "", 0x41600be1, 0xffffffff, TRAP, 0, MT32 },
+ {"emt", "t", 0x41600be1, 0xffe0ffff, TRAP|WR_t, 0, MT32 },
+-{"eret", "", 0x42000018, 0xffffffff, NODS, 0, I3_32 },
++{"eret", "", 0x42000018, 0xffffffff, NODS, 0, I3_32|AL },
+ {"evpe", "", 0x41600021, 0xffffffff, TRAP, 0, MT32 },
+ {"evpe", "t", 0x41600021, 0xffe0ffff, TRAP|WR_t, 0, MT32 },
+-{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, 0, I33 },
++{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, 0, I33|AL },
+ {"exts32", "t,r,+p,+S",0x7000003b, 0xfc00003f, WR_t|RD_s, 0, IOCT },
+ {"exts", "t,r,+P,+S",0x7000003b, 0xfc00003f, WR_t|RD_s, 0, IOCT }, /* exts32 */
+ {"exts", "t,r,+p,+s",0x7000003a, 0xfc00003f, WR_t|RD_s, 0, IOCT },
+@@ -786,7 +790,7 @@
+ {"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
+ {"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
+ {"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 },
+-{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 },
++{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33|AL },
+ {"iret", "", 0x42000038, 0xffffffff, NODS, 0, MC },
+ {"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 },
+ /* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with
+@@ -829,18 +833,10 @@
+ {"ldaddw", "t,b", 0x70000010, 0xfc00ffff, SM|RD_t|WR_t|RD_b, 0, XLR },
+ {"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, SM|RD_t|WR_t|RD_b, 0, XLR },
+ {"ldaddd", "t,b", 0x70000012, 0xfc00ffff, SM|RD_t|WR_t|RD_b, 0, XLR },
+-{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
+-{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
+-{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2 },
+-{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2 },
+-{"l.d", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 }, /* ldc1 */
+-{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, INSN2_M_FP_D, I1 },
+-{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, INSN2_M_FP_D, I1 },
+-{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
+-{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, 0, I2 },
+-{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
+-{"ldc3", "E,A(b)", 0, (int) M_LDC3_AB, INSN_MACRO, 0, I2 },
+-{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3 },
++/* ldc1 is at the bottom of the table. */
++/* ldc2 is at the bottom of the table. */
++/* ldc3 is at the bottom of the table. */
++{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3|AL },
+ {"ldl", "t,A(b)", 0, (int) M_LDL_AB, INSN_MACRO, 0, I3 },
+ {"ldr", "t,o(b)", 0x6c000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3 },
+ {"ldr", "t,A(b)", 0, (int) M_LDR_AB, INSN_MACRO, 0, I3 },
+@@ -870,8 +866,7 @@
+ {"lwc1", "E,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
+ {"l.s", "T,o(b)", 0xc4000000, 0xfc000000, CLD|RD_b|WR_T|FP_S, 0, I1 }, /* lwc1 */
+ {"l.s", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
+-{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
+-{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, 0, I1 },
++/* lwc2 is at the bottom of the table. */
+ {"lwc3", "E,o(b)", 0xcc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
+ {"lwc3", "E,A(b)", 0, (int) M_LWC3_AB, INSN_MACRO, 0, I1 },
+ {"lwl", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, 0, I1 },
+@@ -911,12 +906,14 @@
+ {"madd.ps", "D,S,T", 0x45600018, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2E },
+ {"madd.ps", "D,S,T", 0x71600018, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F },
+ {"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
++{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
+ {"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+ {"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
+ {"madd", "7,s,t", 0x70000000, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+ {"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
+ {"maddp", "s,t", 0x70000441, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, SMT },
+ {"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
++{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
+ {"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+ {"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
+ {"maddu", "7,s,t", 0x70000001, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+@@ -957,7 +954,7 @@
+ /* mfc2 is at the bottom of the table. */
+ /* mfhc2 is at the bottom of the table. */
+ /* mfc3 is at the bottom of the table. */
+-{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, 0, N5 },
++{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, 0, N5|AL },
+ {"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, 0, I1 },
+ {"mfhi", "d,9", 0x00000010, 0xff9f07ff, WR_d|RD_HI, 0, D32 },
+ {"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, 0, I1 },
+@@ -979,7 +976,7 @@
+ {"movf.l", "X,Y,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
+ {"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4_32 },
+ {"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5_33 },
+-{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4_32|IL2E|IL2F },
++{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4_32|IL2E|IL2F|AL },
+ {"movnz", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, IL2E|IL2F|IL3A },
+ {"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
+ {"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4_32 },
+@@ -993,7 +990,7 @@
+ {"movt.l", "X,Y,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
+ {"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4_32 },
+ {"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5_33 },
+-{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4_32|IL2E|IL2F },
++{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4_32|IL2E|IL2F|AL },
+ {"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
+ {"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4_32 },
+ {"movz.l", "D,S,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
+@@ -1021,9 +1018,11 @@
+ {"msub.ps", "D,S,T", 0x45600019, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2E },
+ {"msub.ps", "D,S,T", 0x71600019, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F },
+ {"msub", "s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
++{"msub", "s,t", 0x0000002e, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
+ {"msub", "s,t", 0x70000004, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+ {"msub", "7,s,t", 0x70000004, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+ {"msubu", "s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
++{"msubu", "s,t", 0x0000002f, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
+ {"msubu", "s,t", 0x70000005, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+ {"msubu", "7,s,t", 0x70000005, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+ {"mtpc", "t,P", 0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0, 0, M1|N5 },
+@@ -1038,7 +1037,7 @@
+ /* mtc2 is at the bottom of the table. */
+ /* mthc2 is at the bottom of the table. */
+ /* mtc3 is at the bottom of the table. */
+-{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, 0, N5 },
++{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, 0, N5|AL },
+ {"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, 0, I1 },
+ {"mthi", "s,7", 0x00000011, 0xfc1fe7ff, RD_s|WR_HI, 0, D32 },
+ {"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, 0, I1 },
+@@ -1223,13 +1222,13 @@
+ {"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I1 },
+ {"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I1 },
+ {"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I1 },
+-{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, 0, N5|I33|SMT },
+-{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, N5|I33|SMT },
+-{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, 0, I33|SMT },
+-{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I33|SMT },
+-{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I33|SMT },
+-{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I33|SMT },
+-{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, I33|SMT },
++{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, 0, N5|I33|SMT|AL },
++{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, N5|I33|SMT|AL },
++{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, 0, I33|SMT|AL },
++{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I33|SMT|AL },
++{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I33|SMT|AL },
++{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I33|SMT|AL },
++{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, I33|SMT|AL },
+ {"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, 0, I3_33 },
+ {"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3_33 },
+ {"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
+@@ -1262,24 +1261,17 @@
+ {"sdbbp", "c,q", 0x0000000e, 0xfc00003f, TRAP, 0, G2 },
+ {"sdbbp", "", 0x7000003f, 0xffffffff, TRAP, 0, I32 },
+ {"sdbbp", "B", 0x7000003f, 0xfc00003f, TRAP, 0, I32 },
+-{"sdc1", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
+-{"sdc1", "E,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
+-{"sdc1", "T,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2 },
+-{"sdc1", "E,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2 },
+-{"sdc2", "E,o(b)", 0xf8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I2 },
+-{"sdc2", "E,A(b)", 0, (int) M_SDC2_AB, INSN_MACRO, 0, I2 },
+-{"sdc3", "E,o(b)", 0xfc000000, 0xfc000000, SM|RD_C3|RD_b, 0, I2 },
+-{"sdc3", "E,A(b)", 0, (int) M_SDC3_AB, INSN_MACRO, 0, I2 },
+-{"s.d", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
+-{"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, INSN2_M_FP_D, I1 },
+-{"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, INSN2_M_FP_D, I1 },
+-{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, I3 },
++/* sdc1 is at the bottom of the table. */
++/* sdc2 is at the bottom of the table. */
++/* sdc3 is at the bottom of the table. */
++/* s.d (sdc1 is at the bottom of the table. */
++{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, I3|AL },
+ {"sdl", "t,A(b)", 0, (int) M_SDL_AB, INSN_MACRO, 0, I3 },
+ {"sdr", "t,o(b)", 0xb4000000, 0xfc000000, SM|RD_t|RD_b, 0, I3 },
+ {"sdr", "t,A(b)", 0, (int) M_SDR_AB, INSN_MACRO, 0, I3 },
+ {"sdxc1", "S,t(b)", 0x4c000009, 0xfc0007ff, SM|RD_S|RD_t|RD_b|FP_D, 0, I4_33 },
+-{"seb", "d,w", 0x7c000420, 0xffe007ff, WR_d|RD_t, 0, I33 },
+-{"seh", "d,w", 0x7c000620, 0xffe007ff, WR_d|RD_t, 0, I33 },
++{"seb", "d,w", 0x7c000420, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
++{"seh", "d,w", 0x7c000620, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
+ {"selsl", "d,v,t", 0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t, 0, L1 },
+ {"selsr", "d,v,t", 0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t, 0, L1 },
+ {"seq", "d,v,t", 0x7000002a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, IOCT },
+@@ -1399,8 +1391,7 @@
+ {"swc1", "E,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
+ {"s.s", "T,o(b)", 0xe4000000, 0xfc000000, SM|RD_T|RD_b|FP_S, 0, I1 }, /* swc1 */
+ {"s.s", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
+-{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I1 },
+-{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, 0, I1 },
++/* swc2 is at the bottom of the table. */
+ {"swc3", "E,o(b)", 0xec000000, 0xfc000000, SM|RD_C3|RD_b, 0, I1 },
+ {"swc3", "E,A(b)", 0, (int) M_SWC3_AB, INSN_MACRO, 0, I1 },
+ {"swl", "t,o(b)", 0xa8000000, 0xfc000000, SM|RD_t|RD_b, 0, I1 },
+@@ -1497,7 +1488,8 @@
+ {"wait", "J", 0x42000020, 0xfe00003f, NODS, 0, I32|N55 },
+ {"waiti", "", 0x42000020, 0xffffffff, NODS, 0, L1 },
+ {"wrpgpr", "d,w", 0x41c00000, 0xffe007ff, RD_t, 0, I33 },
+-{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33 },
++{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
++{"wsbw", "d,t", 0x7c0000e0, 0xffe007ff, WR_d|RD_t, 0, AL },
+ {"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
+ {"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, 0, I1 },
+ {"xor", "D,S,T", 0x47800002, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2E },
+@@ -1511,6 +1503,321 @@
+ {"yield", "s", 0x7c000009, 0xfc1fffff, NODS|RD_s, 0, MT32 },
+ {"yield", "d,s", 0x7c000009, 0xfc1f07ff, NODS|WR_d|RD_s, 0, MT32 },
+
++/* Sony Allegrex CPU core. */
++{"bitrev", "d,t", 0x7c000520, 0xffe007ff, WR_d|RD_t, 0, AL },
++/* From "MIPS DSP ASU", because instructions with the same name need to be next to each other */
++{"bitrev", "d,t", 0x7c0006d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
++{"mfic", "t,G", 0x70000024, 0xffe007ff, LCD|WR_t|RD_C0, 0, AL },
++{"mtic", "t,G", 0x70000026, 0xffe007ff, COD|RD_t|WR_C0, 0, AL },
++
++/* Sony Allegrex VFPU instructions. */
++{"bvf", "?c,p", 0x49000000, 0xffe30000, CBD|RD_CC, 0, AL },
++{"bvfl", "?c,p", 0x49020000, 0xffe30000, CBL|RD_CC, 0, AL },
++{"bvt", "?c,p", 0x49010000, 0xffe30000, CBD|RD_CC, 0, AL },
++{"bvtl", "?c,p", 0x49030000, 0xffe30000, CBL|RD_CC, 0, AL },
++{"lv.s", "?m0x,?o(b)", 0xc8000000, 0xfc000000, CLD|RD_s|WR_CC, 0, AL },
++{"lv.s", "?m0x,A(b)", 0, (int) M_LV_Q_AB, INSN_MACRO, 0, AL },
++{"ulv.s", "?m0x,o(b)", 0, (int) M_ULV_S, INSN_MACRO, 0, AL },
++{"lv.q", "?n3x,?o(b)", 0xd8000000, 0xfc000002, CLD|RD_s|WR_CC, 0, AL },
++{"lv.q", "?n3x,A(b)", 0, (int) M_LV_Q_AB_2, INSN_MACRO, 0, AL },
++{"ulv.q", "?n3x,?o(b)", 0, (int) M_ULV_Q, INSN_MACRO, 0, AL },
++{"ulv.q", "?n3x,A(b)", 0, (int) M_ULV_Q_AB, INSN_MACRO, 0, AL },
++{"lvi.s", "?t0x,l?y0", 0, (int) M_LVI_S, INSN_MACRO, 0, AL },
++{"lvi.p", "?t1x,?[l?y0,l?y1?]", 0, (int) M_LVI_P, INSN_MACRO, 0, AL },
++{"lvi.t", "?t2x,?[l?y0,l?y1,l?y2?]", 0, (int) M_LVI_T, INSN_MACRO, 0, AL },
++{"lvi.q", "?t3x,?[l?y0,l?y1,l?y2,l?y3?]", 0, (int) M_LVI_Q, INSN_MACRO, 0, AL },
++{"lvhi.s", "?t0x,?[?u?y0,?u?y1?]", 0, (int) M_LVHI_S, INSN_MACRO, 0, AL },
++{"lvhi.p", "?t1x,?[?u?y0,?u?y1,?u?y2,?u?y3?]", 0, (int) M_LVHI_P, INSN_MACRO, 0, AL },
++{"sv.s", "?m0x,?o(b)", 0xe8000000, 0xfc000000, SM|RD_s|RD_C2, 0, AL },
++{"sv.s", "?m0x,A(b)", 0, (int) M_SV_S_AB, INSN_MACRO, 0, AL },
++{"usv.s", "?m0x,o(b)", 0, (int) M_USV_S, INSN_MACRO, 0, AL },
++{"sv.q", "?n3x,?o(b)", 0xf8000000, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
++{"sv.q", "?n3x,?o(b),?z", 0xf8000000, 0xfc000000, SM|RD_s|RD_C2, 0, AL },
++{"sv.q", "?n3x,A(b)", 0, (int) M_SV_Q_AB, INSN_MACRO, 0, AL },
++{"sv.q", "?n3x,A(b),?z", 0, (int) M_SV_Q_AB, INSN_MACRO, 0, AL },
++{"sv.q", "?n3x,A,?z", 0, (int) M_SV_Q_AB, INSN_MACRO, 0, AL },
++{"usv.q", "?n3x,?o(b)", 0, (int) M_USV_Q, INSN_MACRO, 0, AL },
++{"usv.q", "?n3x,A(b)", 0, (int) M_USV_Q_AB, INSN_MACRO, 0, AL },
++{"vwb.q", "?n3x,?o(b)", 0xf8000002, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
++{"lvl.q", "?n3x,?o(b)", 0xd4000000, 0xfc000002, CLD|RD_s|WR_CC, 0, AL },
++{"lvl.q", "?n3x,A(b)", 0, (int) M_LVL_Q_AB, INSN_MACRO, 0, AL },
++{"lvr.q", "?n3x,?o(b)", 0xd4000002, 0xfc000002, CLD|RD_s|WR_CC, 0, AL },
++{"lvr.q", "?n3x,A(b)", 0, (int) M_LVR_Q_AB, INSN_MACRO, 0, AL },
++{"svl.q", "?n3x,?o(b)", 0xf4000000, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
++{"svl.q", "?n3x,A(b)", 0, (int) M_SVL_Q_AB, INSN_MACRO, 0, AL },
++{"svr.q", "?n3x,?o(b)", 0xf4000002, 0xfc000002, SM|RD_s|RD_C2, 0, AL },
++{"svr.q", "?n3x,A(b)", 0, (int) M_SVR_Q_AB, INSN_MACRO, 0, AL },
++{"mtv", "t,?d0z", 0x48e00000, 0xffe0ff80, LCD|WR_t|WR_C2, 0, AL },
++{"mfv", "t,?d0z", 0x48600000, 0xffe0ff80, COD|RD_t|WR_CC|RD_C2, 0, AL },
++{"mtvc", "t,?q", 0x48e00000, 0xffe0ff00, LCD|WR_t|WR_C2, 0, AL },
++{"mfvc", "t,?q", 0x48600000, 0xffe0ff00, COD|RD_t|WR_CC|RD_C2, 0, AL },
++{"vmtvc", "?q,?s0y", 0xd0510000, 0xffff8000, WR_C2, 0, AL },
++{"vmfvc", "?d0z,?r", 0xd0500000, 0xffff0080, RD_C2, 0, AL },
++{"vadd.q", "?d3d,?s3s,?t3t", 0x60008080, 0xff808080, RD_C2, 0, AL },
++{"vsub.q", "?d3d,?s3s,?t3t", 0x60808080, 0xff808080, RD_C2, 0, AL },
++{"vdiv.q", "?x3z,?s3y,?t3x", 0x63808080, 0xff808080, RD_C2, 0, AL },
++{"vmul.q", "?d3d,?s3s,?t3t", 0x64008080, 0xff808080, RD_C2, 0, AL },
++{"vdot.q", "?d0d,?s3s,?t3t", 0x64808080, 0xff808080, RD_C2, 0, AL },
++{"vscl.q", "?d3d,?s3s,?t0x", 0x65008080, 0xff808080, RD_C2, 0, AL },
++{"vhdp.q", "?d0d,?s3y,?t3t", 0x66008080, 0xff808080, RD_C2, 0, AL },
++{"vcmp.q", "?f2,?s3s,?t3t", 0x6c008080, 0xff8080f0, RD_C2, 0, AL },
++{"vcmp.q", "?f1,?s3s", 0x6c008080, 0xffff80f0, RD_C2, 0, AL },
++{"vcmp.q", "?f0", 0x6c008080, 0xfffffff0, RD_C2, 0, AL },
++{"vmin.q", "?d3d,?s3s,?t3t", 0x6d008080, 0xff808080, RD_C2, 0, AL },
++{"vmax.q", "?d3d,?s3s,?t3t", 0x6d808080, 0xff808080, RD_C2, 0, AL },
++{"vsgn.q", "?d3d,?s3s", 0xd04a8080, 0xffff8080, RD_C2, 0, AL },
++{"vcst.q", "?d3d,?a", 0xd0608080, 0xffe0ff80, RD_C2, 0, AL },
++{"vscmp.q", "?d3d,?s3s,?t3t", 0x6e808080, 0xff808080, RD_C2, 0, AL },
++{"vsge.q", "?d3d,?s3s,?t3t", 0x6f008080, 0xff808080, RD_C2, 0, AL },
++{"vslt.q", "?d3d,?s3s,?t3t", 0x6f808080, 0xff808080, RD_C2, 0, AL },
++{"vi2uc.q", "?d0m,?s3w", 0xd03c8080, 0xffff8080, RD_C2, 0, AL },
++{"vi2c.q", "?d0m,?s3w", 0xd03d8080, 0xffff8080, RD_C2, 0, AL },
++{"vi2us.q", "?d1m,?s3w", 0xd03e8080, 0xffff8080, RD_C2, 0, AL },
++{"vi2s.q", "?d1m,?s3w", 0xd03f8080, 0xffff8080, RD_C2, 0, AL },
++{"vmov.q", "?d3d,?s3s", 0xd0008080, 0xffff8080, RD_C2, 0, AL },
++{"vabs.q", "?d3d,?s3w", 0xd0018080, 0xffff8080, RD_C2, 0, AL },
++{"vneg.q", "?d3d,?s3w", 0xd0028080, 0xffff8080, RD_C2, 0, AL },
++{"vidt.q", "?d3d", 0xd0038080, 0xffffff80, RD_C2, 0, AL },
++{"vsat0.q", "?d3z,?s3s", 0xd0048080, 0xffff8080, RD_C2, 0, AL },
++{"vsat1.q", "?d3z,?s3s", 0xd0058080, 0xffff8080, RD_C2, 0, AL },
++{"vzero.q", "?d3d", 0xd0068080, 0xffffff80, RD_C2, 0, AL },
++{"vone.q", "?d3d", 0xd0078080, 0xffffff80, RD_C2, 0, AL },
++{"vrcp.q", "?x3z,?s3y", 0xd0108080, 0xffff8080, RD_C2, 0, AL },
++{"vrsq.q", "?x3z,?s3y", 0xd0118080, 0xffff8080, RD_C2, 0, AL },
++{"vsin.q", "?x3z,?s3y", 0xd0128080, 0xffff8080, RD_C2, 0, AL },
++{"vcos.q", "?x3z,?s3y", 0xd0138080, 0xffff8080, RD_C2, 0, AL },
++{"vexp2.q", "?x3z,?s3y", 0xd0148080, 0xffff8080, RD_C2, 0, AL },
++{"vlog2.q", "?x3z,?s3y", 0xd0158080, 0xffff8080, RD_C2, 0, AL },
++{"vsqrt.q", "?x3z,?s3y", 0xd0168080, 0xffff8080, RD_C2, 0, AL },
++{"vasin.q", "?x3z,?s3y", 0xd0178080, 0xffff8080, RD_C2, 0, AL },
++{"vnrcp.q", "?x3z,?s3y", 0xd0188080, 0xffff8080, RD_C2, 0, AL },
++{"vnsin.q", "?x3z,?s3y", 0xd01a8080, 0xffff8080, RD_C2, 0, AL },
++{"vrexp2.q", "?x3z,?s3y", 0xd01c8080, 0xffff8080, RD_C2, 0, AL },
++{"vrndi.q", "?d3z", 0xd0218080, 0xffffff80, RD_C2, 0, AL },
++{"vrndf1.q", "?d3z", 0xd0228080, 0xffffff80, RD_C2, 0, AL },
++{"vrndf2.q", "?d3z", 0xd0238080, 0xffffff80, RD_C2, 0, AL },
++{"vf2h.q", "?d1m,?s3s", 0xd0328080, 0xffff8080, RD_C2, 0, AL },
++{"vsrt1.q", "?d3d,?s3s", 0xd0408080, 0xffff8080, RD_C2, 0, AL },
++{"vsrt2.q", "?d3d,?s3s", 0xd0418080, 0xffff8080, RD_C2, 0, AL },
++{"vsrt3.q", "?d3d,?s3s", 0xd0488080, 0xffff8080, RD_C2, 0, AL },
++{"vsrt4.q", "?d3d,?s3s", 0xd0498080, 0xffff8080, RD_C2, 0, AL },
++{"vbfy1.q", "?d3d,?s3s", 0xd0428080, 0xffff8080, RD_C2, 0, AL },
++{"vbfy2.q", "?d3d,?s3s", 0xd0438080, 0xffff8080, RD_C2, 0, AL },
++{"vocp.q", "?d3d,?s3y", 0xd0448080, 0xffff8080, RD_C2, 0, AL },
++{"vfad.q", "?d0d,?s3s", 0xd0468080, 0xffff8080, RD_C2, 0, AL },
++{"vavg.q", "?d0d,?s3s", 0xd0478080, 0xffff8080, RD_C2, 0, AL },
++{"vf2in.q", "?d3m,?s3s,?b", 0xd2008080, 0xffe08080, RD_C2, 0, AL },
++{"vf2iz.q", "?d3m,?s3s,?b", 0xd2208080, 0xffe08080, RD_C2, 0, AL },
++{"vf2iu.q", "?d3m,?s3s,?b", 0xd2408080, 0xffe08080, RD_C2, 0, AL },
++{"vf2id.q", "?d3m,?s3s,?b", 0xd2608080, 0xffe08080, RD_C2, 0, AL },
++{"vi2f.q", "?d3d,?s3w,?b", 0xd2808080, 0xffe08080, RD_C2, 0, AL },
++{"vcmov.q", "?d3d,?s3s,?e", 0, (int) M_VCMOV_Q, INSN_MACRO, 0, AL },
++{"vcmovt.q", "?d3d,?s3s,?e", 0xd2a08080, 0xfff88080, RD_C2, 0, AL },
++{"vcmovf.q", "?d3d,?s3s,?e", 0xd2a88080, 0xfff88080, RD_C2, 0, AL },
++{"vmmul.q", "?v7z,?s7y,?t7x", 0xf0008080, 0xff808080, RD_C2, 0, AL },
++{"vtfm4.q", "?v3z,?s7y,?t3x", 0xf1808080, 0xff808080, RD_C2, 0, AL },
++{"vhtfm4.q", "?v3z,?s7y,?t3x", 0xf1808000, 0xff808080, RD_C2, 0, AL },
++{"vmscl.q", "?x7z,?s7y,?t0x", 0xf2008080, 0xff808080, RD_C2, 0, AL },
++{"vqmul.q", "?v3z,?s3y,?t3x", 0xf2808080, 0xff808080, RD_C2, 0, AL },
++{"vmmov.q", "?x7z,?s7y", 0xf3808080, 0xffff8080, RD_C2, 0, AL },
++{"vmidt.q", "?d7z", 0xf3838080, 0xffffff80, RD_C2, 0, AL },
++{"vmzero.q", "?d7z", 0xf3868080, 0xffffff80, RD_C2, 0, AL },
++{"vmone.q", "?d7z", 0xf3878080, 0xffffff80, RD_C2, 0, AL },
++{"vrot.q", "?x3z,?s0y,?w", 0xf3a08080, 0xffe08080, RD_C2, 0, AL },
++{"vt4444.q", "?d1z,?s3w", 0xd0598080, 0xffff8080, RD_C2, 0, AL },
++{"vt5551.q", "?d1z,?s3w", 0xd05a8080, 0xffff8080, RD_C2, 0, AL },
++{"vt5650.q", "?d1z,?s3w", 0xd05b8080, 0xffff8080, RD_C2, 0, AL },
++{"vadd.t", "?d2d,?s2s,?t2t", 0x60008000, 0xff808080, RD_C2, 0, AL },
++{"vsub.t", "?d2d,?s2s,?t2t", 0x60808000, 0xff808080, RD_C2, 0, AL },
++{"vdiv.t", "?x2z,?s2y,?t2x", 0x63808000, 0xff808080, RD_C2, 0, AL },
++{"vmul.t", "?d2d,?s2s,?t2t", 0x64008000, 0xff808080, RD_C2, 0, AL },
++{"vdot.t", "?d0d,?s2s,?t2t", 0x64808000, 0xff808080, RD_C2, 0, AL },
++{"vscl.t", "?d2d,?s2s,?t0x", 0x65008000, 0xff808080, RD_C2, 0, AL },
++{"vhdp.t", "?d0d,?s2y,?t2t", 0x66008000, 0xff808080, RD_C2, 0, AL },
++{"vcrs.t", "?d2d,?s2y,?t2x", 0x66808000, 0xff808080, RD_C2, 0, AL },
++{"vcmp.t", "?f2,?s2s,?t2t", 0x6c008000, 0xff8080f0, RD_C2, 0, AL },
++{"vcmp.t", "?f1,?s2s", 0x6c008000, 0xffff80f0, RD_C2, 0, AL },
++{"vcmp.t", "?f0", 0x6c008000, 0xfffffff0, RD_C2, 0, AL },
++{"vmin.t", "?d2d,?s2s,?t2t", 0x6d008000, 0xff808080, RD_C2, 0, AL },
++{"vmax.t", "?d2d,?s2s,?t2t", 0x6d808000, 0xff808080, RD_C2, 0, AL },
++{"vsgn.t", "?d2d,?s2s", 0xd04a8000, 0xffff8080, RD_C2, 0, AL },
++{"vcst.t", "?d2d,?a", 0xd0608000, 0xffe0ff80, RD_C2, 0, AL },
++{"vscmp.t", "?d2d,?s2s,?t2t", 0x6e808000, 0xff808080, RD_C2, 0, AL },
++{"vsge.t", "?d2d,?s2s,?t2t", 0x6f008000, 0xff808080, RD_C2, 0, AL },
++{"vslt.t", "?d2d,?s2s,?t2t", 0x6f808000, 0xff808080, RD_C2, 0, AL },
++{"vmov.t", "?d2d,?s2s", 0xd0008000, 0xffff8080, RD_C2, 0, AL },
++{"vabs.t", "?d2d,?s2w", 0xd0018000, 0xffff8080, RD_C2, 0, AL },
++{"vneg.t", "?d2d,?s2w", 0xd0028000, 0xffff8080, RD_C2, 0, AL },
++{"vsat0.t", "?d2z,?s2s", 0xd0048000, 0xffff8080, RD_C2, 0, AL },
++{"vsat1.t", "?d2z,?s2s", 0xd0058000, 0xffff8080, RD_C2, 0, AL },
++{"vzero.t", "?d2d", 0xd0068000, 0xffffff80, RD_C2, 0, AL },
++{"vone.t", "?d2d", 0xd0078000, 0xffffff80, RD_C2, 0, AL },
++{"vrcp.t", "?x2z,?s2y", 0xd0108000, 0xffff8080, RD_C2, 0, AL },
++{"vrsq.t", "?x2z,?s2y", 0xd0118000, 0xffff8080, RD_C2, 0, AL },
++{"vsin.t", "?x2z,?s2y", 0xd0128000, 0xffff8080, RD_C2, 0, AL },
++{"vcos.t", "?x2z,?s2y", 0xd0138000, 0xffff8080, RD_C2, 0, AL },
++{"vexp2.t", "?x2z,?s2y", 0xd0148000, 0xffff8080, RD_C2, 0, AL },
++{"vlog2.t", "?x2z,?s2y", 0xd0158000, 0xffff8080, RD_C2, 0, AL },
++{"vsqrt.t", "?x2z,?s2y", 0xd0168000, 0xffff8080, RD_C2, 0, AL },
++{"vasin.t", "?x2z,?s2y", 0xd0178000, 0xffff8080, RD_C2, 0, AL },
++{"vnrcp.t", "?x2z,?s2y", 0xd0188000, 0xffff8080, RD_C2, 0, AL },
++{"vnsin.t", "?x2z,?s2y", 0xd01a8000, 0xffff8080, RD_C2, 0, AL },
++{"vrexp2.t", "?x2z,?s2y", 0xd01c8000, 0xffff8080, RD_C2, 0, AL },
++{"vrndi.t", "?d2z", 0xd0218000, 0xffffff80, RD_C2, 0, AL },
++{"vrndf1.t", "?d2z", 0xd0228000, 0xffffff80, RD_C2, 0, AL },
++{"vrndf2.t", "?d2z", 0xd0238000, 0xffffff80, RD_C2, 0, AL },
++{"vocp.t", "?d2d,?s2y", 0xd0448000, 0xffff8080, RD_C2, 0, AL },
++{"vfad.t", "?d0d,?s2s", 0xd0468000, 0xffff8080, RD_C2, 0, AL },
++{"vavg.t", "?d0d,?s2s", 0xd0478000, 0xffff8080, RD_C2, 0, AL },
++{"vf2in.t", "?d2m,?s2s,?b", 0xd2008000, 0xffe08080, RD_C2, 0, AL },
++{"vf2iz.t", "?d2m,?s2s,?b", 0xd2208000, 0xffe08080, RD_C2, 0, AL },
++{"vf2iu.t", "?d2m,?s2s,?b", 0xd2408000, 0xffe08080, RD_C2, 0, AL },
++{"vf2id.t", "?d2m,?s2s,?b", 0xd2608000, 0xffe08080, RD_C2, 0, AL },
++{"vi2f.t", "?d2d,?s2w,?b", 0xd2808000, 0xffe08080, RD_C2, 0, AL },
++{"vcmov.t", "?d2d,?s2s,?e", 0, (int) M_VCMOV_T, INSN_MACRO, 0, AL },
++{"vcmovt.t", "?d2d,?s2s,?e", 0xd2a08000, 0xfff88080, RD_C2, 0, AL },
++{"vcmovf.t", "?d2d,?s2s,?e", 0xd2a88000, 0xfff88080, RD_C2, 0, AL },
++{"vmmul.t", "?v6z,?s6y,?t6x", 0xf0008000, 0xff808080, RD_C2, 0, AL },
++{"vtfm3.t", "?v2z,?s6y,?t2x", 0xf1008000, 0xff808080, RD_C2, 0, AL },
++{"vhtfm3.t", "?v2z,?s6y,?t2x", 0xf1000080, 0xff808080, RD_C2, 0, AL },
++{"vmscl.t", "?x6z,?s6y,?t0x", 0xf2008000, 0xff808080, RD_C2, 0, AL },
++{"vmmov.t", "?x6z,?s6y", 0xf3808000, 0xffff8080, RD_C2, 0, AL },
++{"vmidt.t", "?d6z", 0xf3838000, 0xffffff80, RD_C2, 0, AL },
++{"vmzero.t", "?d6z", 0xf3868000, 0xffffff80, RD_C2, 0, AL },
++{"vmone.t", "?d6z", 0xf3878000, 0xffffff80, RD_C2, 0, AL },
++{"vrot.t", "?x2z,?s0y,?w", 0xf3a08000, 0xffe08080, RD_C2, 0, AL },
++{"vcrsp.t", "?d2z,?s2y,?t2x", 0xf2808000, 0xff808080, RD_C2, 0, AL },
++{"vadd.p", "?d1d,?s1s,?t1t", 0x60000080, 0xff808080, RD_C2, 0, AL },
++{"vsub.p", "?d1d,?s1s,?t1t", 0x60800080, 0xff808080, RD_C2, 0, AL },
++{"vdiv.p", "?x1z,?s1y,?t1x", 0x63800080, 0xff808080, RD_C2, 0, AL },
++{"vmul.p", "?d1d,?s1s,?t1t", 0x64000080, 0xff808080, RD_C2, 0, AL },
++{"vdot.p", "?d0d,?s1s,?t1t", 0x64800080, 0xff808080, RD_C2, 0, AL },
++{"vscl.p", "?d1d,?s1s,?t0x", 0x65000080, 0xff808080, RD_C2, 0, AL },
++{"vhdp.p", "?d0d,?s1y,?t1t", 0x66000080, 0xff808080, RD_C2, 0, AL },
++{"vdet.p", "?d0d,?s1s,?t1x", 0x67000080, 0xff808080, RD_C2, 0, AL },
++{"vcmp.p", "?f2,?s1s,?t1t", 0x6c000080, 0xff8080f0, RD_C2, 0, AL },
++{"vcmp.p", "?f1,?s1s", 0x6c000080, 0xffff80f0, RD_C2, 0, AL },
++{"vcmp.p", "?f0", 0x6c000080, 0xfffffff0, RD_C2, 0, AL },
++{"vmin.p", "?d1d,?s1s,?t1t", 0x6d000080, 0xff808080, RD_C2, 0, AL },
++{"vmax.p", "?d1d,?s1s,?t1t", 0x6d800080, 0xff808080, RD_C2, 0, AL },
++{"vsgn.p", "?d1d,?s1s", 0xd04a0080, 0xffff8080, RD_C2, 0, AL },
++{"vcst.p", "?d1d,?a", 0xd0600080, 0xffe0ff80, RD_C2, 0, AL },
++{"vscmp.p", "?d1d,?s1s,?t1t", 0x6e800080, 0xff808080, RD_C2, 0, AL },
++{"vsge.p", "?d1d,?s1s,?t1t", 0x6f000080, 0xff808080, RD_C2, 0, AL },
++{"vslt.p", "?d1d,?s1s,?t1t", 0x6f800080, 0xff808080, RD_C2, 0, AL },
++{"vus2i.p", "?d3m,?s1y", 0xd03a0080, 0xffff8080, RD_C2, 0, AL },
++{"vs2i.p", "?d3m,?s1y", 0xd03b0080, 0xffff8080, RD_C2, 0, AL },
++{"vi2us.p", "?d0m,?s1w", 0xd03e0080, 0xffff8080, RD_C2, 0, AL },
++{"vi2s.p", "?d0m,?s1w", 0xd03f0080, 0xffff8080, RD_C2, 0, AL },
++{"vmov.p", "?d1d,?s1s", 0xd0000080, 0xffff8080, RD_C2, 0, AL },
++{"vabs.p", "?d1d,?s1w", 0xd0010080, 0xffff8080, RD_C2, 0, AL },
++{"vneg.p", "?d1d,?s1w", 0xd0020080, 0xffff8080, RD_C2, 0, AL },
++{"vidt.p", "?d1d", 0xd0030080, 0xffffff80, RD_C2, 0, AL },
++{"vsat0.p", "?d1z,?s1s", 0xd0040080, 0xffff8080, RD_C2, 0, AL },
++{"vsat1.p", "?d1z,?s1s", 0xd0050080, 0xffff8080, RD_C2, 0, AL },
++{"vzero.p", "?d1d", 0xd0060080, 0xffffff80, RD_C2, 0, AL },
++{"vone.p", "?d1d", 0xd0070080, 0xffffff80, RD_C2, 0, AL },
++{"vrcp.p", "?x1z,?s1y", 0xd0100080, 0xffff8080, RD_C2, 0, AL },
++{"vrsq.p", "?x1z,?s1y", 0xd0110080, 0xffff8080, RD_C2, 0, AL },
++{"vsin.p", "?x1z,?s1y", 0xd0120080, 0xffff8080, RD_C2, 0, AL },
++{"vcos.p", "?x1z,?s1y", 0xd0130080, 0xffff8080, RD_C2, 0, AL },
++{"vexp2.p", "?x1z,?s1y", 0xd0140080, 0xffff8080, RD_C2, 0, AL },
++{"vlog2.p", "?x1z,?s1y", 0xd0150080, 0xffff8080, RD_C2, 0, AL },
++{"vsqrt.p", "?x1z,?s1y", 0xd0160080, 0xffff8080, RD_C2, 0, AL },
++{"vasin.p", "?x1z,?s1y", 0xd0170080, 0xffff8080, RD_C2, 0, AL },
++{"vnrcp.p", "?x1z,?s1y", 0xd0180080, 0xffff8080, RD_C2, 0, AL },
++{"vnsin.p", "?x1z,?s1y", 0xd01a0080, 0xffff8080, RD_C2, 0, AL },
++{"vrexp2.p", "?x1z,?s1y", 0xd01c0080, 0xffff8080, RD_C2, 0, AL },
++{"vrndi.p", "?d1z", 0xd0210080, 0xffffff80, RD_C2, 0, AL },
++{"vrndf1.p", "?d1z", 0xd0220080, 0xffffff80, RD_C2, 0, AL },
++{"vrndf2.p", "?d1z", 0xd0230080, 0xffffff80, RD_C2, 0, AL },
++{"vf2h.p", "?d0m,?s1s", 0xd0320080, 0xffff8080, RD_C2, 0, AL },
++{"vh2f.p", "?d3d,?s1y", 0xd0330080, 0xffff8080, RD_C2, 0, AL },
++{"vbfy1.p", "?d1d,?s1s", 0xd0420080, 0xffff8080, RD_C2, 0, AL },
++{"vocp.p", "?d1d,?s1y", 0xd0440080, 0xffff8080, RD_C2, 0, AL },
++{"vsocp.p", "?d3z,?s1y", 0xd0450080, 0xffff8080, RD_C2, 0, AL },
++{"vfad.p", "?d0d,?s1s", 0xd0460080, 0xffff8080, RD_C2, 0, AL },
++{"vavg.p", "?d0d,?s1s", 0xd0470080, 0xffff8080, RD_C2, 0, AL },
++{"vf2in.p", "?d1m,?s1s,?b", 0xd2000080, 0xffe08080, RD_C2, 0, AL },
++{"vf2iz.p", "?d1m,?s1s,?b", 0xd2200080, 0xffe08080, RD_C2, 0, AL },
++{"vf2iu.p", "?d1m,?s1s,?b", 0xd2400080, 0xffe08080, RD_C2, 0, AL },
++{"vf2id.p", "?d1m,?s1s,?b", 0xd2600080, 0xffe08080, RD_C2, 0, AL },
++{"vi2f.p", "?d1d,?s1w,?b", 0xd2800080, 0xffe08080, RD_C2, 0, AL },
++{"vcmov.p", "?d1d,?s1s,?e", 0, (int) M_VCMOV_P, INSN_MACRO, 0, AL },
++{"vcmovt.p", "?d1d,?s1s,?e", 0xd2a00080, 0xfff88080, RD_C2, 0, AL },
++{"vcmovf.p", "?d1d,?s1s,?e", 0xd2a80080, 0xfff88080, RD_C2, 0, AL },
++{"vmmul.p", "?v5z,?s5y,?t5x", 0xf0000080, 0xff808080, RD_C2, 0, AL },
++{"vtfm2.p", "?v1z,?s5y,?t1x", 0xf0800080, 0xff808080, RD_C2, 0, AL },
++{"vhtfm2.p", "?v1z,?s5y,?t1x", 0xf0800000, 0xff808080, RD_C2, 0, AL },
++{"vmscl.p", "?x5z,?s5y,?t0x", 0xf2000080, 0xff808080, RD_C2, 0, AL },
++{"vmmov.p", "?x5z,?s5y", 0xf3800080, 0xffff8080, RD_C2, 0, AL },
++{"vmidt.p", "?d5z", 0xf3830080, 0xffffff80, RD_C2, 0, AL },
++{"vmzero.p", "?d5z", 0xf3860080, 0xffffff80, RD_C2, 0, AL },
++{"vmone.p", "?d5z", 0xf3870080, 0xffffff80, RD_C2, 0, AL },
++{"vrot.p", "?x1z,?s0y,?w", 0xf3a00080, 0xffe08080, RD_C2, 0, AL },
++{"vadd.s", "?d0d,?s0s,?t0t", 0x60000000, 0xff808080, RD_C2, 0, AL },
++{"vsub.s", "?d0d,?s0s,?t0t", 0x60800000, 0xff808080, RD_C2, 0, AL },
++{"vdiv.s", "?x0d,?s0s,?t0t", 0x63800000, 0xff808080, RD_C2, 0, AL },
++{"vmul.s", "?d0d,?s0s,?t0t", 0x64000000, 0xff808080, RD_C2, 0, AL },
++{"vcmp.s", "?f2,?s0s,?t0t", 0x6c000000, 0xff8080f0, RD_C2, 0, AL },
++{"vcmp.s", "?f1,?s0s", 0x6c000000, 0xffff80f0, RD_C2, 0, AL },
++{"vcmp.s", "?f0", 0x6c000000, 0xfffffff0, RD_C2, 0, AL },
++{"vmin.s", "?d0d,?s0s,?t0t", 0x6d000000, 0xff808080, RD_C2, 0, AL },
++{"vmax.s", "?d0d,?s0s,?t0t", 0x6d800000, 0xff808080, RD_C2, 0, AL },
++{"vsgn.s", "?d0d,?s0s", 0xd04a0000, 0xffff8080, RD_C2, 0, AL },
++{"vcst.s", "?d0d,?a", 0xd0600000, 0xffe0ff80, RD_C2, 0, AL },
++{"vscmp.s", "?d0d,?s0s,?t0t", 0x6e800000, 0xff808080, RD_C2, 0, AL },
++{"vsge.s", "?d0d,?s0s,?t0t", 0x6f000000, 0xff808080, RD_C2, 0, AL },
++{"vslt.s", "?d0d,?s0s,?t0t", 0x6f800000, 0xff808080, RD_C2, 0, AL },
++{"vus2i.s", "?d1m,?s0y", 0xd03a0000, 0xffff8080, RD_C2, 0, AL },
++{"vs2i.s", "?d1m,?s0y", 0xd03b0000, 0xffff8080, RD_C2, 0, AL },
++{"vmov.s", "?d0d,?s0s", 0xd0000000, 0xffff8080, RD_C2, 0, AL },
++{"vabs.s", "?d0d,?s0w", 0xd0010000, 0xffff8080, RD_C2, 0, AL },
++{"vneg.s", "?d0d,?s0w", 0xd0020000, 0xffff8080, RD_C2, 0, AL },
++{"vsat0.s", "?d0z,?s0s", 0xd0040000, 0xffff8080, RD_C2, 0, AL },
++{"vsat1.s", "?d0z,?s0s", 0xd0050000, 0xffff8080, RD_C2, 0, AL },
++{"vzero.s", "?d0d", 0xd0060000, 0xffffff80, RD_C2, 0, AL },
++{"vone.s", "?d0d", 0xd0070000, 0xffffff80, RD_C2, 0, AL },
++{"vrcp.s", "?x0d,?s0s", 0xd0100000, 0xffff8080, RD_C2, 0, AL },
++{"vrsq.s", "?x0d,?s0s", 0xd0110000, 0xffff8080, RD_C2, 0, AL },
++{"vsin.s", "?x0d,?s0s", 0xd0120000, 0xffff8080, RD_C2, 0, AL },
++{"vcos.s", "?x0d,?s0s", 0xd0130000, 0xffff8080, RD_C2, 0, AL },
++{"vexp2.s", "?x0d,?s0s", 0xd0140000, 0xffff8080, RD_C2, 0, AL },
++{"vlog2.s", "?x0d,?s0s", 0xd0150000, 0xffff8080, RD_C2, 0, AL },
++{"vsqrt.s", "?x0d,?s0s", 0xd0160000, 0xffff8080, RD_C2, 0, AL },
++{"vasin.s", "?x0d,?s0s", 0xd0170000, 0xffff8080, RD_C2, 0, AL },
++{"vnrcp.s", "?x0d,?s0y", 0xd0180000, 0xffff8080, RD_C2, 0, AL },
++{"vnsin.s", "?x0d,?s0y", 0xd01a0000, 0xffff8080, RD_C2, 0, AL },
++{"vrexp2.s", "?x0d,?s0y", 0xd01c0000, 0xffff8080, RD_C2, 0, AL },
++{"vrnds.s", "?s0y", 0xd0200000, 0xffff80ff, RD_C2, 0, AL },
++{"vrndi.s", "?d0d", 0xd0210000, 0xffffff80, RD_C2, 0, AL },
++{"vrndf1.s", "?d0d", 0xd0220000, 0xffffff80, RD_C2, 0, AL },
++{"vrndf2.s", "?d0d", 0xd0230000, 0xffffff80, RD_C2, 0, AL },
++{"vh2f.s", "?d1d,?s0y", 0xd0330000, 0xffff8080, RD_C2, 0, AL },
++{"vsbz.s", "?d0d,?s0s", 0xd0360000, 0xffff8080, RD_C2, 0, AL },
++{"vsbn.s", "?d0d,?s0s,?t0t", 0x61000000, 0xff808080, RD_C2, 0, AL },
++{"vlgb.s", "?d0d,?s0s", 0xd0370000, 0xffff8080, RD_C2, 0, AL },
++{"vocp.s", "?d0d,?s0y", 0xd0440000, 0xffff8080, RD_C2, 0, AL },
++{"vsocp.s", "?d1z,?s0y", 0xd0450000, 0xffff8080, RD_C2, 0, AL },
++{"vf2in.s", "?d0m,?s0s,?b", 0xd2000000, 0xffe08080, RD_C2, 0, AL },
++{"vf2iz.s", "?d0m,?s0s,?b", 0xd2200000, 0xffe08080, RD_C2, 0, AL },
++{"vf2iu.s", "?d0m,?s0s,?b", 0xd2400000, 0xffe08080, RD_C2, 0, AL },
++{"vf2id.s", "?d0m,?s0s,?b", 0xd2600000, 0xffe08080, RD_C2, 0, AL },
++{"vi2f.s", "?d0d,?s0w,?b", 0xd2800000, 0xffe08080, RD_C2, 0, AL },
++{"vcmov.s", "?d0d,?s0s,?e", 0, (int) M_VCMOV_S, INSN_MACRO, 0, AL },
++{"vcmovt.s", "?d0d,?s0s,?e", 0xd2a00000, 0xfff88080, RD_C2, 0, AL },
++{"vcmovf.s", "?d0d,?s0s,?e", 0xd2a80000, 0xfff88080, RD_C2, 0, AL },
++{"vwbn.s", "?d0d,?s0s,?i", 0xd3000000, 0xff008080, RD_C2, 0, AL },
++{"vpfxs", "?0,?1,?2,?3", 0xdc000000, 0xff000000, RD_C2, 0, AL },
++{"vpfxt", "?0,?1,?2,?3", 0xdd000000, 0xff000000, RD_C2, 0, AL },
++{"vpfxd", "?4,?5,?6,?7", 0xde000000, 0xff000000, RD_C2, 0, AL },
++{"viim.s", "?t0d,j", 0xdf000000, 0xff800000, RD_C2, 0, AL },
++{"vfim.s", "?t0d,?u", 0xdf800000, 0xff800000, RD_C2, 0, AL },
++{"vnop", "", 0xffff0000, 0xffffffff, RD_C2, 0, AL },
++{"vflush", "", 0xffff040d, 0xffffffff, RD_C2, 0, AL },
++{"vsync", "", 0xffff0320, 0xffffffff, RD_C2, 0, AL },
++{"vsync", "i", 0xffff0000, 0xffff0000, RD_C2, 0, AL },
++
+ /* User Defined Instruction. */
+ {"udi0", "s,t,d,+1",0x70000010, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+ {"udi0", "s,t,+2", 0x70000010, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+@@ -1606,6 +1913,36 @@
+ {"mthc2", "t,G,H", 0x48e00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, 0, I33 },
+ {"mthc2", "t,i", 0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC, 0, I33 },
+
++/* Coprocessor 2 load/store operations overlap with the Allegrex VFPU
++ instructions so they are here for the latters to take precedence. */
++/* COP1 ldc1 and sdc1 and COP3 ldc3 and sdc3 also overlap with the VFPU. */
++{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
++{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
++{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
++{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
++{"l.d", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 }, /* ldc1 */
++{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, 0, I1 },
++{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, 0, I1 },
++{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
++{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, 0, I2 },
++{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
++{"ldc3", "E,A(b)", 0, (int) M_LDC3_AB, INSN_MACRO, 0, I2 },
++{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
++{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, 0, I1 },
++{"sdc1", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
++{"sdc1", "E,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
++{"sdc1", "T,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, 0, I2 },
++{"sdc1", "E,A(b)", 0, (int) M_SDC1_AB, INSN_MACRO, 0, I2 },
++{"s.d", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
++{"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, 0, I1 },
++{"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, 0, I1 },
++{"sdc2", "E,o(b)", 0xf8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I2 },
++{"sdc2", "E,A(b)", 0, (int) M_SDC2_AB, INSN_MACRO, 0, I2 },
++{"sdc3", "E,o(b)", 0xfc000000, 0xfc000000, SM|RD_C3|RD_b, 0, I2 },
++{"sdc3", "E,A(b)", 0, (int) M_SDC3_AB, INSN_MACRO, 0, I2 },
++{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I1 },
++{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, 0, I1 },
++
+ /* Coprocessor 3 move/branch operations overlap with MIPS IV COP1X
+ instructions, so they are here for the latters to take precedence. */
+ {"bc3f", "p", 0x4d000000, 0xffff0000, CBD|RD_CC, 0, I1 },
+@@ -1643,7 +1980,6 @@
+ {"addu_s.ob", "d,s,t", 0x7c000114, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+ {"addu_s.qb", "d,s,t", 0x7c000110, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+ {"addwc", "d,s,t", 0x7c000450, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+-{"bitrev", "d,t", 0x7c0006d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
+ {"bposge32", "p", 0x041c0000, 0xffff0000, CBD, 0, D32 },
+ {"bposge64", "p", 0x041d0000, 0xffff0000, CBD, 0, D64 },
+ {"cmp.eq.ph", "s,t", 0x7c000211, 0xfc00ffff, RD_s|RD_t, 0, D32 },
diff --git a/dkpsp/patches/gcc-4.3.6.patch b/dkpsp/patches/gcc-4.6.2.patch
similarity index 54%
rename from dkpsp/patches/gcc-4.3.6.patch
rename to dkpsp/patches/gcc-4.6.2.patch
index 515db9b..baee3fc 100644
--- a/dkpsp/patches/gcc-4.3.6.patch
+++ b/dkpsp/patches/gcc-4.6.2.patch
@@ -1,27 +1,15 @@
-diff -Nbaur gcc-4.3.6/Makefile.in gcc-4.3.6-psp/Makefile.in
---- gcc-4.3.6/Makefile.in 2009-04-25 06:55:24.000000000 +0100
-+++ gcc-4.3.6-psp/Makefile.in 2011-07-29 15:21:37.000000000 +0100
-@@ -380,7 +380,7 @@
- # We want to ensure that TARGET libraries (which we know are built with
- # gcc) are built with "-O2 -g", so prepend those options when setting
- # CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
--CFLAGS_FOR_TARGET = -O2 -g $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
-+CFLAGS_FOR_TARGET = -O2 -g $(SYSROOT_CFLAGS_FOR_TARGET) \
- $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
- SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
- DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
-diff -Nbaur gcc-4.3.6/config.sub gcc-4.3.6-psp/config.sub
---- gcc-4.3.6/config.sub 2008-01-23 02:37:40.000000000 +0000
-+++ gcc-4.3.6-psp/config.sub 2011-07-29 15:21:37.000000000 +0100
-@@ -267,6 +267,7 @@
+diff -Nbaur gcc-4.6.2/config.sub gcc-4.6.2-psp/config.sub
+--- gcc-4.6.2/config.sub 2010-05-25 14:22:07.000000000 +0100
++++ gcc-4.6.2-psp/config.sub 2012-02-25 14:09:47.000000000 +0000
+@@ -279,6 +279,7 @@
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
+ | mipsallegrex | mipsallegrexel \
| mn10200 | mn10300 \
+ | moxie \
| mt \
- | msp430 \
-@@ -348,6 +349,7 @@
+@@ -375,6 +376,7 @@
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
@@ -29,7 +17,7 @@ diff -Nbaur gcc-4.3.6/config.sub gcc-4.3.6-psp/config.sub
| mmix-* \
| mt-* \
| msp430-* \
-@@ -714,6 +716,10 @@
+@@ -771,6 +773,10 @@
basic_machine=m68k-atari
os=-mint
;;
@@ -40,10 +28,10 @@ diff -Nbaur gcc-4.3.6/config.sub gcc-4.3.6-psp/config.sub
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
-diff -Nbaur gcc-4.3.6/gcc/config/mips/allegrex.md gcc-4.3.6-psp/gcc/config/mips/allegrex.md
---- gcc-4.3.6/gcc/config/mips/allegrex.md 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/allegrex.md 2011-07-29 15:21:37.000000000 +0100
-@@ -0,0 +1,183 @@
+diff -Nbaur gcc-4.6.2/gcc/config/mips/allegrex.md gcc-4.6.2-psp/gcc/config/mips/allegrex.md
+--- gcc-4.6.2/gcc/config/mips/allegrex.md 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.6.2-psp/gcc/config/mips/allegrex.md 2012-02-25 14:09:47.000000000 +0000
+@@ -0,0 +1,191 @@
+;; Sony ALLEGREX instructions.
+;; Copyright (C) 2005 Free Software Foundation, Inc.
+;;
@@ -64,32 +52,41 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/allegrex.md gcc-4.3.6-psp/gcc/config/mips/
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
-+; Multiply Add and Subtract.
++(define_c_enum "unspec" [
++ UNSPEC_WSBH
++ UNSPEC_CLO
++ UNSPEC_CTO
++ UNSPEC_CACHE
++ UNSPEC_CEIL_W_S
++ UNSPEC_FLOOR_W_S
++ UNSPEC_ROUND_W_S
++])
++
++;; Multiply Add and Subtract.
++;; Note: removed clobbering for madd and msub (testing needed)
+
+(define_insn "allegrex_madd"
+ [(set (match_operand:SI 0 "register_operand" "+l")
-+ (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d")
-+ (match_operand:SI 2 "register_operand" "d"))
-+ (match_dup 0)))
-+ (clobber (match_scratch:SI 3 "=h"))]
++ (plus:SI (mult:SI (match_operand:SI 1 "register_operand" "d")
++ (match_operand:SI 2 "register_operand" "d"))
++ (match_dup 0)))]
+ "TARGET_ALLEGREX"
+ "madd\t%1,%2"
-+ [(set_attr "type" "imadd")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "imadd")
++ (set_attr "mode" "SI")])
+
+(define_insn "allegrex_msub"
+ [(set (match_operand:SI 0 "register_operand" "+l")
-+ (minus:SI (match_dup 0)
-+ (mult:SI (match_operand:SI 1 "register_operand" "d")
-+ (match_operand:SI 2 "register_operand" "d"))))
-+ (clobber (match_scratch:SI 3 "=h"))]
++ (minus:SI (match_dup 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "d")
++ (match_operand:SI 2 "register_operand" "d"))))]
+ "TARGET_ALLEGREX"
+ "msub\t%1,%2"
-+ [(set_attr "type" "imadd")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "imadd")
++ (set_attr "mode" "SI")])
+
+
-+; Min and max.
++;; Min and max.
+
+(define_insn "sminsi3"
+ [(set (match_operand:SI 0 "register_operand" "=d")
@@ -97,8 +94,8 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/allegrex.md gcc-4.3.6-psp/gcc/config/mips/
+ (match_operand:SI 2 "register_operand" "d")))]
+ "TARGET_ALLEGREX"
+ "min\t%0,%1,%2"
-+ [(set_attr "type" "arith")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "arith")
++ (set_attr "mode" "SI")])
+
+(define_insn "smaxsi3"
+ [(set (match_operand:SI 0 "register_operand" "=d")
@@ -106,55 +103,54 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/allegrex.md gcc-4.3.6-psp/gcc/config/mips/
+ (match_operand:SI 2 "register_operand" "d")))]
+ "TARGET_ALLEGREX"
+ "max\t%0,%1,%2"
-+ [(set_attr "type" "arith")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "arith")
++ (set_attr "mode" "SI")])
+
+
-+; Extended shift instructions.
++;; Extended shift instructions.
+
+(define_insn "allegrex_bitrev"
+ [(set (match_operand:SI 0 "register_operand" "=d")
-+ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
-+ UNSPEC_BITREV))]
++ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
++ UNSPEC_BITREV))]
+ "TARGET_ALLEGREX"
+ "bitrev\t%0,%1"
-+ [(set_attr "type" "arith")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "arith")
++ (set_attr "mode" "SI")])
+
+(define_insn "allegrex_wsbh"
+ [(set (match_operand:SI 0 "register_operand" "=d")
-+ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
-+ UNSPEC_WSBH))]
++ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
++ UNSPEC_WSBH))]
+ "TARGET_ALLEGREX"
+ "wsbh\t%0,%1"
-+ [(set_attr "type" "arith")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "arith")
++ (set_attr "mode" "SI")])
+
-+(define_insn "allegrex_wsbw"
++(define_insn "bswapsi2"
+ [(set (match_operand:SI 0 "register_operand" "=d")
-+ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
-+ UNSPEC_WSBW))]
++ (bswap:SI (match_operand:SI 1 "register_operand" "d")))]
+ "TARGET_ALLEGREX"
+ "wsbw\t%0,%1"
-+ [(set_attr "type" "arith")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "shift")
++ (set_attr "mode" "SI")])
+
+
-+; Count leading ones, count trailing zeros, and count trailing ones (clz is
-+; already defined).
++;; Count leading ones, count trailing zeros, and count trailing ones (clz is
++;; already defined).
+
+(define_insn "allegrex_clo"
+ [(set (match_operand:SI 0 "register_operand" "=d")
-+ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
-+ UNSPEC_CLO))]
++ (unspec:SI [(match_operand:SI 1 "register_operand" "d")]
++ UNSPEC_CLO))]
+ "TARGET_ALLEGREX"
+ "clo\t%0,%1"
-+ [(set_attr "type" "clz")
-+ (set_attr "mode" "SI")])
++ [(set_attr "type" "clz")
++ (set_attr "mode" "SI")])
+
+(define_expand "ctzsi2"
+ [(set (match_operand:SI 0 "register_operand")
-+ (ctz:SI (match_operand:SI 1 "register_operand")))]
++ (ctz:SI (match_operand:SI 1 "register_operand")))]
+ "TARGET_ALLEGREX"
+{
+ rtx r1;
@@ -167,8 +163,8 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/allegrex.md gcc-4.3.6-psp/gcc/config/mips/
+
+(define_expand "allegrex_cto"
+ [(set (match_operand:SI 0 "register_operand")
-+ (unspec:SI [(match_operand:SI 1 "register_operand")]
-+ UNSPEC_CTO))]
++ (unspec:SI [(match_operand:SI 1 "register_operand")]
++ UNSPEC_CTO))]
+ "TARGET_ALLEGREX"
+{
+ rtx r1;
@@ -180,56 +176,56 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/allegrex.md gcc-4.3.6-psp/gcc/config/mips/
+})
+
+
-+; Misc.
++;; Misc.
+
+(define_insn "allegrex_sync"
+ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
+ "TARGET_ALLEGREX"
+ "sync"
-+ [(set_attr "type" "unknown")
-+ (set_attr "mode" "none")])
++ [(set_attr "type" "unknown")
++ (set_attr "mode" "none")])
+
+(define_insn "allegrex_cache"
+ [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")
-+ (match_operand:SI 1 "register_operand" "d")]
-+ UNSPEC_CACHE)]
++ (match_operand:SI 1 "register_operand" "d")]
++ UNSPEC_CACHE)]
+ "TARGET_ALLEGREX"
+ "cache\t%0,0(%1)"
-+ [(set_attr "type" "unknown")
-+ (set_attr "mode" "none")])
++ [(set_attr "type" "unknown")
++ (set_attr "mode" "none")])
+
+
-+; Floating-point builtins.
++;; Floating-point builtins.
+
+(define_insn "allegrex_ceil_w_s"
+ [(set (match_operand:SI 0 "register_operand" "=f")
-+ (unspec:SI [(match_operand:SF 1 "register_operand" "f")]
-+ UNSPEC_CEIL_W_S))]
++ (unspec:SI [(match_operand:SF 1 "register_operand" "f")]
++ UNSPEC_CEIL_W_S))]
+ "TARGET_ALLEGREX"
+ "ceil.w.s\t%0,%1"
-+ [(set_attr "type" "fcvt")
-+ (set_attr "mode" "SF")])
++ [(set_attr "type" "fcvt")
++ (set_attr "mode" "SF")])
+
+(define_insn "allegrex_floor_w_s"
+ [(set (match_operand:SI 0 "register_operand" "=f")
-+ (unspec:SI [(match_operand:SF 1 "register_operand" "f")]
-+ UNSPEC_FLOOR_W_S))]
++ (unspec:SI [(match_operand:SF 1 "register_operand" "f")]
++ UNSPEC_FLOOR_W_S))]
+ "TARGET_ALLEGREX"
+ "floor.w.s\t%0,%1"
-+ [(set_attr "type" "fcvt")
-+ (set_attr "mode" "SF")])
++ [(set_attr "type" "fcvt")
++ (set_attr "mode" "SF")])
+
+(define_insn "allegrex_round_w_s"
+ [(set (match_operand:SI 0 "register_operand" "=f")
-+ (unspec:SI [(match_operand:SF 1 "register_operand" "f")]
-+ UNSPEC_ROUND_W_S))]
++ (unspec:SI [(match_operand:SF 1 "register_operand" "f")]
++ UNSPEC_ROUND_W_S))]
+ "TARGET_ALLEGREX"
+ "round.w.s\t%0,%1"
-+ [(set_attr "type" "fcvt")
-+ (set_attr "mode" "SF")])
-diff -Nbaur gcc-4.3.6/gcc/config/mips/mips-ftypes.def gcc-4.3.6-psp/gcc/config/mips/mips-ftypes.def
---- gcc-4.3.6/gcc/config/mips/mips-ftypes.def 2007-10-18 20:12:17.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/mips-ftypes.def 2011-07-29 15:21:37.000000000 +0100
++ [(set_attr "type" "fcvt")
++ (set_attr "mode" "SF")])
+diff -Nbaur gcc-4.6.2/gcc/config/mips/mips-ftypes.def gcc-4.6.2-psp/gcc/config/mips/mips-ftypes.def
+--- gcc-4.6.2/gcc/config/mips/mips-ftypes.def 2009-02-20 15:20:38.000000000 +0000
++++ gcc-4.6.2-psp/gcc/config/mips/mips-ftypes.def 2012-02-25 14:09:47.000000000 +0000
@@ -53,9 +53,12 @@
DEF_MIPS_FTYPE (2, (SI, DI, SI))
@@ -243,39 +239,40 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips-ftypes.def gcc-4.3.6-psp/gcc/config/m
DEF_MIPS_FTYPE (1, (SI, V2HI))
DEF_MIPS_FTYPE (2, (SI, V2HI, V2HI))
DEF_MIPS_FTYPE (1, (SI, V4QI))
-@@ -90,3 +93,4 @@
+@@ -124,3 +127,4 @@
DEF_MIPS_FTYPE (2, (VOID, SI, SI))
DEF_MIPS_FTYPE (2, (VOID, V2HI, V2HI))
DEF_MIPS_FTYPE (2, (VOID, V4QI, V4QI))
+DEF_MIPS_FTYPE (1, (VOID, VOID))
-diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.c
---- gcc-4.3.6/gcc/config/mips/mips.c 2009-03-02 20:42:24.000000000 +0000
-+++ gcc-4.3.6-psp/gcc/config/mips/mips.c 2011-07-29 15:21:37.000000000 +0100
-@@ -197,6 +197,12 @@
- /* As above, but the instruction only sets a single $fcc register. */
+diff -Nbaur gcc-4.6.2/gcc/config/mips/mips.c gcc-4.6.2-psp/gcc/config/mips/mips.c
+--- gcc-4.6.2/gcc/config/mips/mips.c 2011-05-29 18:48:14.000000000 +0100
++++ gcc-4.6.2-psp/gcc/config/mips/mips.c 2012-02-25 14:09:47.000000000 +0000
+@@ -239,7 +239,12 @@
MIPS_BUILTIN_CMP_SINGLE,
+ /* For generating bposge32 branch instructions in MIPS32 DSP ASE. */
+- MIPS_BUILTIN_BPOSGE32
++ MIPS_BUILTIN_BPOSGE32,
++
+ /* The builtin corresponds to the ALLEGREX cache instruction. Operand 0
+ is the function code (must be less than 32) and operand 1 is the base
+ address. */
-+ MIPS_BUILTIN_CACHE,
-+
-+
- /* For generating bposge32 branch instructions in MIPS32 DSP ASE. */
- MIPS_BUILTIN_BPOSGE32
++ MIPS_BUILTIN_CACHE
};
-@@ -417,6 +423,10 @@
- /* The operands passed to the last cmpMM expander. */
- rtx cmp_operands[2];
+
+ /* Invoke MACRO (COND) for each C.cond.fmt condition. */
+@@ -516,6 +521,10 @@
+ normal branch. */
+ static bool mips_branch_likely;
+/* Preferred stack boundary for proper stack vars alignment */
+unsigned int mips_preferred_stack_boundary;
+unsigned int mips_preferred_stack_align;
+
/* The current instruction-set architecture. */
- enum processor_type mips_arch;
+ enum processor mips_arch;
const struct mips_cpu_info *mips_arch_info;
-@@ -572,6 +582,7 @@
+@@ -691,6 +700,7 @@
/* MIPS II processors. */
{ "r6000", PROCESSOR_R6000, 2, 0 },
@@ -283,13 +280,62 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.
/* MIPS III processors. */
{ "r4000", PROCESSOR_R4000, 3, 0 },
-@@ -10196,6 +10207,67 @@
- DIRECT_BUILTIN (dpsqx_sa_w_ph, MIPS_DI_FTYPE_DI_V2HI_V2HI, MASK_DSPR2)
- };
+@@ -969,6 +979,9 @@
+ 1, /* branch_cost */
+ 4 /* memory_latency */
+ },
++ { /* Allegrex */
++ DEFAULT_COSTS
++ },
+ { /* Loongson-2E */
+ DEFAULT_COSTS
+ },
+@@ -12605,6 +12618,7 @@
+ AVAIL_NON_MIPS16 (dspr2_32, !TARGET_64BIT && TARGET_DSPR2)
+ AVAIL_NON_MIPS16 (loongson, TARGET_LOONGSON_VECTORS)
+ AVAIL_NON_MIPS16 (cache, TARGET_CACHE_BUILTIN)
++AVAIL_NON_MIPS16 (allegrex, TARGET_ALLEGREX)
+
+ /* Construct a mips_builtin_description from the given arguments.
+
+@@ -12701,6 +12715,30 @@
+ MIPS_BUILTIN (bposge, f, "bposge" #VALUE, \
+ MIPS_BUILTIN_BPOSGE ## VALUE, MIPS_SI_FTYPE_VOID, AVAIL)
+
++/* Define a MIPS_BUILTIN_DIRECT function for instruction CODE_FOR_allegrex_.
++ FUNCTION_TYPE and TARGET_FLAGS are builtin_description fields. */
++#define DIRECT_ALLEGREX_BUILTIN(INSN, FUNCTION_TYPE, TARGET_FLAGS) \
++ { CODE_FOR_allegrex_ ## INSN, MIPS_FP_COND_f, "__builtin_allegrex_" #INSN, \
++ MIPS_BUILTIN_DIRECT, FUNCTION_TYPE, mips_builtin_avail_allegrex }
++
++/* Same as the above, but mapped to an instruction that doesn't share the
++ NAME. NAME is the name of the builtin without the builtin prefix. */
++#define DIRECT_ALLEGREX_NAMED_BUILTIN(NAME, INSN, FUNCTION_TYPE, TARGET_FLAGS) \
++ { CODE_FOR_ ## INSN, MIPS_FP_COND_f, "__builtin_allegrex_" #NAME, \
++ MIPS_BUILTIN_DIRECT, FUNCTION_TYPE, mips_builtin_avail_allegrex }
++
++/* Define a MIPS_BUILTIN_DIRECT_NO_TARGET function for instruction
++ CODE_FOR_allegrex_. FUNCTION_TYPE and TARGET_FLAGS are
++ builtin_description fields. */
++#define DIRECT_ALLEGREX_NO_TARGET_BUILTIN(INSN, FUNCTION_TYPE, TARGET_FLAGS) \
++ { CODE_FOR_allegrex_ ## INSN, MIPS_FP_COND_f, "__builtin_allegrex_" #INSN, \
++ MIPS_BUILTIN_DIRECT_NO_TARGET, FUNCTION_TYPE, mips_builtin_avail_allegrex }
++
++/* Define a builtin with a specific function TYPE. */
++#define SPECIAL_ALLEGREX_BUILTIN(TYPE, INSN, FUNCTION_TYPE, TARGET_FLAGS) \
++ { CODE_FOR_allegrex_ ## INSN, MIPS_FP_COND_f, "__builtin_allegrex_" #INSN, \
++ MIPS_BUILTIN_ ## TYPE, FUNCTION_TYPE, mips_builtin_avail_allegrex }
++
+ /* Define a Loongson MIPS_BUILTIN_DIRECT function __builtin_loongson_
+ for instruction CODE_FOR_loongson_. FUNCTION_TYPE is a
+ builtin_description field. */
+@@ -12945,6 +12983,40 @@
+ DIRECT_BUILTIN (dpsqx_s_w_ph, MIPS_DI_FTYPE_DI_V2HI_V2HI, dspr2_32),
+ DIRECT_BUILTIN (dpsqx_sa_w_ph, MIPS_DI_FTYPE_DI_V2HI_V2HI, dspr2_32),
+/* Builtin functions for the Sony ALLEGREX processor.
+
-+ These have the `__builtin_allgrex_' prefix instead of `__builtin_mips_'
++ These have the `__builtin_allegrex_' prefix instead of `__builtin_mips_'
+ to maintain compatibility with Sony's ALLEGREX GCC port.
+
+ Some of the builtins may seem redundant, but they are the same as the
@@ -297,35 +343,9 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.
+ trivial builtins to the original instruction instead of creating
+ duplicate patterns specifically for the ALLEGREX (as Sony does). */
+
-+/* Define a MIPS_BUILTIN_DIRECT function for instruction CODE_FOR_allegrex_.
-+ FUNCTION_TYPE and TARGET_FLAGS are builtin_description fields. */
-+#define DIRECT_ALLEGREX_BUILTIN(INSN, FUNCTION_TYPE, TARGET_FLAGS) \
-+ { CODE_FOR_allegrex_ ## INSN, 0, "__builtin_allegrex_" #INSN, \
-+ MIPS_BUILTIN_DIRECT, FUNCTION_TYPE, TARGET_FLAGS }
-+
-+/* Same as the above, but mapped to an instruction that doesn't share the
-+ NAME. NAME is the name of the builtin without the builtin prefix. */
-+#define DIRECT_ALLEGREX_NAMED_BUILTIN(NAME, INSN, FUNCTION_TYPE, TARGET_FLAGS) \
-+ { CODE_FOR_ ## INSN, 0, "__builtin_allegrex_" #NAME, \
-+ MIPS_BUILTIN_DIRECT, FUNCTION_TYPE, TARGET_FLAGS }
-+
-+/* Define a MIPS_BUILTIN_DIRECT_NO_TARGET function for instruction
-+ CODE_FOR_allegrex_. FUNCTION_TYPE and TARGET_FLAGS are
-+ builtin_description fields. */
-+#define DIRECT_ALLEGREX_NO_TARGET_BUILTIN(INSN, FUNCTION_TYPE, TARGET_FLAGS) \
-+ { CODE_FOR_allegrex_ ## INSN, 0, "__builtin_allegrex_" #INSN, \
-+ MIPS_BUILTIN_DIRECT_NO_TARGET, FUNCTION_TYPE, TARGET_FLAGS }
-+
-+/* Define a builtin with a specific function TYPE. */
-+#define SPECIAL_ALLEGREX_BUILTIN(TYPE, INSN, FUNCTION_TYPE, TARGET_FLAGS) \
-+ { CODE_FOR_allegrex_ ## INSN, 0, "__builtin_allegrex_" #INSN, \
-+ MIPS_BUILTIN_ ## TYPE, FUNCTION_TYPE, TARGET_FLAGS }
-+
-+static const struct mips_builtin_description allegrex_bdesc[] =
-+{
+ DIRECT_ALLEGREX_BUILTIN(bitrev, MIPS_SI_FTYPE_SI, 0),
+ DIRECT_ALLEGREX_BUILTIN(wsbh, MIPS_SI_FTYPE_SI, 0),
-+ DIRECT_ALLEGREX_BUILTIN(wsbw, MIPS_SI_FTYPE_SI, 0),
++ DIRECT_ALLEGREX_NAMED_BUILTIN(wsbw, bswapsi2, MIPS_SI_FTYPE_SI, 0),
+ DIRECT_ALLEGREX_NAMED_BUILTIN(clz, clzsi2, MIPS_SI_FTYPE_SI, 0),
+ DIRECT_ALLEGREX_BUILTIN(clo, MIPS_SI_FTYPE_SI, 0),
+ DIRECT_ALLEGREX_NAMED_BUILTIN(ctz, ctzsi2, MIPS_SI_FTYPE_SI, 0),
@@ -345,41 +365,31 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.
+ DIRECT_ALLEGREX_BUILTIN(ceil_w_s, MIPS_SI_FTYPE_SF, 0),
+ DIRECT_ALLEGREX_BUILTIN(floor_w_s, MIPS_SI_FTYPE_SF, 0),
+ DIRECT_ALLEGREX_BUILTIN(round_w_s, MIPS_SI_FTYPE_SF, 0),
-+ DIRECT_ALLEGREX_NAMED_BUILTIN(trunc_w_s, fix_truncsfsi2_insn, MIPS_SI_FTYPE_SF, 0)
-+};
++ DIRECT_ALLEGREX_NAMED_BUILTIN(trunc_w_s, fix_truncsfsi2_insn, MIPS_SI_FTYPE_SF, 0),
+
- /* This structure describes an array of mips_builtin_description entries. */
- struct mips_bdesc_map {
- /* The array that this entry describes. */
-@@ -10217,6 +10289,7 @@
- static const struct mips_bdesc_map mips_bdesc_arrays[] = {
- { mips_ps_bdesc, ARRAY_SIZE (mips_ps_bdesc), PROCESSOR_MAX, 0 },
- { mips_sb1_bdesc, ARRAY_SIZE (mips_sb1_bdesc), PROCESSOR_SB1, 0 },
-+ { allegrex_bdesc, ARRAY_SIZE (allegrex_bdesc), PROCESSOR_ALLEGREX },
- { mips_dsp_bdesc, ARRAY_SIZE (mips_dsp_bdesc), PROCESSOR_MAX, 0 },
- { mips_dsp_32only_bdesc, ARRAY_SIZE (mips_dsp_32only_bdesc),
- PROCESSOR_MAX, MASK_64BIT }
-@@ -10242,6 +10315,8 @@
-
+ /* Builtin functions for ST Microelectronics Loongson-2E/2F cores. */
+ LOONGSON_BUILTIN (packsswh, MIPS_V4HI_FTYPE_V2SI_V2SI),
+ LOONGSON_BUILTIN (packsshb, MIPS_V8QI_FTYPE_V4HI_V4HI),
+@@ -13096,6 +13168,8 @@
/* Standard mode-based argument types. */
+ #define MIPS_ATYPE_UQI unsigned_intQI_type_node
#define MIPS_ATYPE_SI intSI_type_node
+#define MIPS_ATYPE_HI intHI_type_node
+#define MIPS_ATYPE_QI intQI_type_node
#define MIPS_ATYPE_USI unsigned_intSI_type_node
#define MIPS_ATYPE_DI intDI_type_node
- #define MIPS_ATYPE_SF float_type_node
-@@ -10392,6 +10467,10 @@
+ #define MIPS_ATYPE_UDI unsigned_intDI_type_node
+@@ -13270,6 +13344,9 @@
switch (opno)
{
+ case 0:
+ emit_insn (GEN_FCN (icode) (0));
+ break;
-+
case 2:
emit_insn (GEN_FCN (icode) (ops[0], ops[1]));
break;
-@@ -10561,6 +10640,29 @@
+@@ -13439,6 +13516,28 @@
const1_rtx, const0_rtx);
}
@@ -397,32 +407,31 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.
+ if (GET_CODE (op0) == CONST_INT)
+ if (INTVAL (op0) < 0 || INTVAL (op0) > 0x1f)
+ {
-+ error ("invalid function code '%d'", INTVAL (op0));
-+ return const0_rtx;
++ error ("invalid function code '%d'", INTVAL (op0));
++ return const0_rtx;
+ }
+
+ emit_insn (GEN_FCN (icode) (op0, op1));
+ return target;
+}
-+
+
- /* EXP is a CALL_EXPR that calls the function described by BDESC.
- Expand the call and return an rtx for its return value.
- TARGET, if nonnull, suggests a good place to put this value. */
-@@ -10590,6 +10692,9 @@
- return mips_expand_builtin_compare (bdesc->builtin_type, bdesc->icode,
- bdesc->cond, target, exp);
+ /* Implement TARGET_EXPAND_BUILTIN. */
+
+ static rtx
+@@ -13484,6 +13583,9 @@
-+ case MIPS_BUILTIN_CACHE:
-+ return mips_expand_builtin_cache (bdesc->icode, target, exp);
-+
case MIPS_BUILTIN_BPOSGE32:
- return mips_expand_builtin_bposge (bdesc->builtin_type, target);
+ return mips_expand_builtin_bposge (d->builtin_type, target);
++
++ case MIPS_BUILTIN_CACHE:
++ return mips_expand_builtin_cache (d->icode, target, exp);
}
-@@ -12290,6 +12395,22 @@
-
- /* We call dbr_schedule from within mips_reorg. */
- flag_delayed_branch = 0;
+ gcc_unreachable ();
+ }
+@@ -15918,6 +16020,22 @@
+ Do all CPP-sensitive stuff in non-MIPS16 mode; we'll switch to
+ MIPS16 mode afterwards if need be. */
+ mips_set_mips16_mode (false);
+
+ /* Validate -mpreferred-stack-boundary= value, or provide default.
+ The default of 128-bit is for newABI else 64-bit. */
@@ -432,7 +441,7 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.
+ {
+ i = atoi (mips_preferred_stack_boundary_string);
+ if (i < 2 || i > 12)
-+ error ("-mpreferred-stack-boundary=%d is not between 2 and 12", i);
++ error ("-mpreferred-stack-boundary=%d is not between 2 and 12", i);
+ else
+ {
+ mips_preferred_stack_align = (1 << i);
@@ -441,104 +450,94 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.c gcc-4.3.6-psp/gcc/config/mips/mips.
+ }
}
- /* Swap the register information for registers I and I + 1, which
-diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.h gcc-4.3.6-psp/gcc/config/mips/mips.h
---- gcc-4.3.6/gcc/config/mips/mips.h 2008-07-12 09:00:46.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/mips.h 2011-07-29 15:21:37.000000000 +0100
-@@ -67,6 +67,7 @@
- PROCESSOR_SB1,
- PROCESSOR_SB1A,
- PROCESSOR_SR71000,
-+ PROCESSOR_ALLEGREX,
- PROCESSOR_MAX
- };
-
-@@ -237,6 +238,7 @@
+ /* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */
+diff -Nbaur gcc-4.6.2/gcc/config/mips/mips.h gcc-4.6.2-psp/gcc/config/mips/mips.h
+--- gcc-4.6.2/gcc/config/mips/mips.h 2011-03-08 20:51:11.000000000 +0000
++++ gcc-4.6.2-psp/gcc/config/mips/mips.h 2012-02-25 14:09:47.000000000 +0000
+@@ -231,6 +231,7 @@
#define TARGET_SB1 (mips_arch == PROCESSOR_SB1 \
|| mips_arch == PROCESSOR_SB1A)
#define TARGET_SR71K (mips_arch == PROCESSOR_SR71000)
+#define TARGET_ALLEGREX (mips_arch == PROCESSOR_ALLEGREX)
/* Scheduling target defines. */
- #define TUNE_MIPS3000 (mips_tune == PROCESSOR_R3000)
-@@ -260,6 +262,7 @@
- || mips_tune == PROCESSOR_74KF1_1 \
- || mips_tune == PROCESSOR_74KF3_2)
#define TUNE_20KC (mips_tune == PROCESSOR_20KC)
+@@ -258,6 +259,7 @@
+ #define TUNE_OCTEON (mips_tune == PROCESSOR_OCTEON)
+ #define TUNE_SB1 (mips_tune == PROCESSOR_SB1 \
+ || mips_tune == PROCESSOR_SB1A)
+#define TUNE_ALLEGREX (mips_tune == PROCESSOR_ALLEGREX)
- /* True if the pre-reload scheduler should try to create chains of
- multiply-add or multiply-subtract instructions. For example,
-@@ -738,6 +741,9 @@
+ /* Whether vector modes and intrinsics for ST Microelectronics
+ Loongson-2E/2F processors should be enabled. In o32 pairs of
+@@ -852,6 +854,9 @@
/* ISA has LDC1 and SDC1. */
#define ISA_HAS_LDC1_SDC1 (!ISA_MIPS1 && !TARGET_MIPS16)
+/* ISA has just the integer condition move instructions (movn,movz) */
-+#define ISA_HAS_INT_CONDMOVE (TARGET_ALLEGREX)
++#define ISA_HAS_INT_CONDMOVE (TARGET_ALLEGREX)
+
/* ISA has the mips4 FP condition code instructions: FP-compare to CC,
branch on CC, and move (both FP and non-FP) on CC. */
#define ISA_HAS_8CC (ISA_MIPS4 \
-@@ -758,6 +764,7 @@
+@@ -874,6 +879,7 @@
/* ISA has conditional trap instructions. */
#define ISA_HAS_COND_TRAP (!ISA_MIPS1 \
-+ && !TARGET_ALLEGREX \
++ && !TARGET_ALLEGREX \
&& !TARGET_MIPS16)
/* ISA has integer multiply-accumulate instructions, madd and msub. */
-@@ -780,6 +787,7 @@
+@@ -910,6 +916,7 @@
/* ISA has count leading zeroes/ones instruction (not implemented). */
#define ISA_HAS_CLZ_CLO ((ISA_MIPS32 \
|| ISA_MIPS32R2 \
-+ || TARGET_ALLEGREX \
- || ISA_MIPS64) \
++ || TARGET_ALLEGREX \
+ || ISA_MIPS64 \
+ || ISA_MIPS64R2) \
&& !TARGET_MIPS16)
-
-@@ -823,6 +831,7 @@
+@@ -955,6 +962,7 @@
|| TARGET_MIPS5400 \
|| TARGET_MIPS5500 \
|| TARGET_SR71K \
-+ || TARGET_ALLEGREX \
++ || TARGET_ALLEGREX \
|| TARGET_SMARTMIPS) \
&& !TARGET_MIPS16)
-@@ -848,11 +857,13 @@
- #define ISA_HAS_TRUNC_W (!ISA_MIPS1)
+@@ -984,11 +992,13 @@
/* ISA includes the MIPS32r2 seb and seh instructions. */
--#define ISA_HAS_SEB_SEH (ISA_MIPS32R2 \
-+#define ISA_HAS_SEB_SEH ((ISA_MIPS32R2 \
-+ || TARGET_ALLEGREX) \
+ #define ISA_HAS_SEB_SEH ((ISA_MIPS32R2 \
++ || TARGET_ALLEGREX \
+ || ISA_MIPS64R2) \
&& !TARGET_MIPS16)
/* ISA includes the MIPS32/64 rev 2 ext and ins instructions. */
--#define ISA_HAS_EXT_INS (ISA_MIPS32R2 \
-+#define ISA_HAS_EXT_INS ((ISA_MIPS32R2 \
-+ || TARGET_ALLEGREX) \
+ #define ISA_HAS_EXT_INS ((ISA_MIPS32R2 \
++ || TARGET_ALLEGREX \
+ || ISA_MIPS64R2) \
&& !TARGET_MIPS16)
- /* ISA has instructions for accessing top part of 64-bit fp regs. */
-@@ -895,7 +906,8 @@
- #define ISA_HAS_HILO_INTERLOCKS (ISA_MIPS32 \
- || ISA_MIPS32R2 \
+@@ -1038,7 +1048,8 @@
|| ISA_MIPS64 \
-- || TARGET_MIPS5500)
-+ || TARGET_MIPS5500 \
+ || ISA_MIPS64R2 \
+ || TARGET_MIPS5500 \
+- || TARGET_LOONGSON_2EF)
++ || TARGET_LOONGSON_2EF \
+ || TARGET_ALLEGREX)
/* ISA includes synci, jr.hb and jalr.hb. */
- #define ISA_HAS_SYNCI (ISA_MIPS32R2 && !TARGET_MIPS16)
-@@ -1939,7 +1951,7 @@
- `current_function_outgoing_args_size'. */
- #define OUTGOING_REG_PARM_STACK_SPACE 1
+ #define ISA_HAS_SYNCI ((ISA_MIPS32R2 \
+@@ -2133,7 +2144,7 @@
+ `crtl->outgoing_args_size'. */
+ #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
-#define STACK_BOUNDARY (TARGET_NEWABI ? 128 : 64)
+#define STACK_BOUNDARY (mips_preferred_stack_boundary)
- #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
-
-@@ -2099,7 +2111,7 @@
+ /* Symbolic macros for the registers used to return integer and floating
+ point values. */
+@@ -2259,7 +2270,7 @@
/* Treat LOC as a byte offset from the stack pointer and round it up
to the next fully-aligned offset. */
#define MIPS_STACK_ALIGN(LOC) \
@@ -547,87 +546,83 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.h gcc-4.3.6-psp/gcc/config/mips/mips.
/* Output assembler code to FILE to increment profiler label # LABELNO
-@@ -2881,6 +2893,10 @@
+@@ -2911,6 +2922,9 @@
#endif
#endif
+extern unsigned int mips_preferred_stack_boundary;
+extern unsigned int mips_preferred_stack_align;
-+extern const char *mips_preferred_stack_boundary_string;
+
#ifndef HAVE_AS_TLS
#define HAVE_AS_TLS 0
#endif
-diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.md gcc-4.3.6-psp/gcc/config/mips/mips.md
---- gcc-4.3.6/gcc/config/mips/mips.md 2008-07-09 21:06:20.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/mips.md 2011-07-29 15:21:37.000000000 +0100
-@@ -210,6 +210,19 @@
- (UNSPEC_DPAQX_SA_W_PH 446)
- (UNSPEC_DPSQX_S_W_PH 447)
- (UNSPEC_DPSQX_SA_W_PH 448)
-+
-+ ;; Sony ALLEGREX instructions
-+ (UNSPEC_WSBH 449)
-+ (UNSPEC_WSBW 450)
-+
-+ (UNSPEC_CLO 451)
-+ (UNSPEC_CTO 452)
-+
-+ (UNSPEC_CACHE 453)
-+
-+ (UNSPEC_CEIL_W_S 455)
-+ (UNSPEC_FLOOR_W_S 456)
-+ (UNSPEC_ROUND_W_S 457)
- ]
- )
+diff -Nbaur gcc-4.6.2/gcc/config/mips/mips.md gcc-4.6.2-psp/gcc/config/mips/mips.md
+--- gcc-4.6.2/gcc/config/mips/mips.md 2011-03-03 21:56:58.000000000 +0000
++++ gcc-4.6.2-psp/gcc/config/mips/mips.md 2012-02-25 14:09:47.000000000 +0000
+@@ -37,6 +37,7 @@
+ 74kf2_1
+ 74kf1_1
+ 74kf3_2
++ allegrex
+ loongson_2e
+ loongson_2f
+ loongson_3a
+@@ -598,7 +599,7 @@
+ ;; This mode iterator allows :MOVECC to be used anywhere that a
+ ;; conditional-move-type condition is needed.
+ (define_mode_iterator MOVECC [SI (DI "TARGET_64BIT")
+- (CC "TARGET_HARD_FLOAT && !TARGET_LOONGSON_2EF")])
++ (CC "TARGET_HARD_FLOAT && !TARGET_LOONGSON_2EF && !TARGET_ALLEGREX")])
-@@ -1707,11 +1720,11 @@
+ ;; 32-bit integer moves for which we provide move patterns.
+ (define_mode_iterator IMOVE32
+@@ -1885,11 +1886,11 @@
(mult:DI
(any_extend:DI (match_operand:SI 1 "register_operand" "d"))
(any_extend:DI (match_operand:SI 2 "register_operand" "d")))))]
-- "!TARGET_64BIT && (ISA_HAS_MSAC || GENERATE_MADD_MSUB || ISA_HAS_DSPR2)"
-+ "!TARGET_64BIT && (ISA_HAS_MSAC || GENERATE_MADD_MSUB || ISA_HAS_DSPR2 || TARGET_ALLEGREX)"
+- "!TARGET_64BIT && (ISA_HAS_MSAC || GENERATE_MADD_MSUB || ISA_HAS_DSP)"
++ "!TARGET_64BIT && (ISA_HAS_MSAC || GENERATE_MADD_MSUB || ISA_HAS_DSP || TARGET_ALLEGREX)"
{
- if (ISA_HAS_DSPR2)
+ if (ISA_HAS_DSP_MULT)
return "msub\t%q0,%1,%2";
- else if (TARGET_MIPS5500 || GENERATE_MADD_MSUB)
+ else if (TARGET_MIPS5500 || GENERATE_MADD_MSUB || TARGET_ALLEGREX)
return "msub\t%1,%2";
else
return "msac\t$0,%1,%2";
-@@ -1826,14 +1839,14 @@
+@@ -2066,14 +2067,14 @@
(mult:DI (any_extend:DI (match_operand:SI 1 "register_operand" "d"))
(any_extend:DI (match_operand:SI 2 "register_operand" "d")))
(match_operand:DI 3 "register_operand" "0")))]
-- "(TARGET_MAD || ISA_HAS_MACC || GENERATE_MADD_MSUB || ISA_HAS_DSPR2)
-+ "(TARGET_MAD || ISA_HAS_MACC || GENERATE_MADD_MSUB || ISA_HAS_DSPR2 || TARGET_ALLEGREX)
+- "(TARGET_MAD || ISA_HAS_MACC || GENERATE_MADD_MSUB || ISA_HAS_DSP)
++ "(TARGET_MAD || ISA_HAS_MACC || GENERATE_MADD_MSUB || ISA_HAS_DSP || TARGET_ALLEGREX)
&& !TARGET_64BIT"
{
if (TARGET_MAD)
return "mad\t%1,%2";
- else if (ISA_HAS_DSPR2)
+ else if (ISA_HAS_DSP_MULT)
return "madd\t%q0,%1,%2";
- else if (GENERATE_MADD_MSUB || TARGET_MIPS5500)
+ else if (GENERATE_MADD_MSUB || TARGET_MIPS5500 || TARGET_ALLEGREX)
return "madd\t%1,%2";
else
/* See comment in *macc. */
-@@ -2117,6 +2130,32 @@
+@@ -2500,6 +2501,33 @@
;;
;; ....................
;;
-+;; FIND FIRST BIT INSTRUCTION
++;; FIND FIRST BIT INSTRUCTION
+;;
+;; ....................
+;;
+
+(define_expand "ffs2"
+ [(set (match_operand:GPR 0 "register_operand" "")
-+ (ffs:GPR (match_operand:GPR 1 "register_operand" "")))]
++ (ffs:GPR (match_operand:GPR 1 "register_operand" "")))]
+ "ISA_HAS_CLZ_CLO"
+{
+ rtx r1, r2, r3, r4;
-+
++
+ r1 = gen_reg_rtx (mode);
+ r2 = gen_reg_rtx (mode);
+ r3 = gen_reg_rtx (mode);
@@ -639,20 +634,21 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.md gcc-4.3.6-psp/gcc/config/mips/mips
+ emit_insn (gen_sub3 (operands[0], r4, r3));
+ DONE;
+})
++
+;;
+;; ....................
+;;
;; NEGATION and ONE'S COMPLEMENT
;;
;; ....................
-@@ -2167,6 +2206,25 @@
- [(set_attr "type" "logical")
+@@ -2550,6 +2578,25 @@
+ [(set_attr "alu_type" "not")
(set_attr "mode" "")])
+(define_expand "rotl3"
+ [(set (match_operand:GPR 0 "register_operand")
-+ (rotate:GPR (match_operand:GPR 1 "register_operand")
-+ (match_operand:SI 2 "arith_operand")))]
++ (rotate:GPR (match_operand:GPR 1 "register_operand")
++ (match_operand:SI 2 "arith_operand")))]
+ "ISA_HAS_ROR"
+{
+ rtx temp;
@@ -671,7 +667,7 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.md gcc-4.3.6-psp/gcc/config/mips/mips
;;
;; ....................
;;
-@@ -6031,7 +6089,7 @@
+@@ -6301,7 +6348,7 @@
(const_int 0)])
(match_operand:GPR 2 "reg_or_0_operand" "dJ,0")
(match_operand:GPR 3 "reg_or_0_operand" "0,dJ")))]
@@ -680,7 +676,7 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.md gcc-4.3.6-psp/gcc/config/mips/mips
"@
mov%T4\t%0,%z2,%1
mov%t4\t%0,%z3,%1"
-@@ -6061,8 +6119,12 @@
+@@ -6331,8 +6378,12 @@
(if_then_else:GPR (match_dup 5)
(match_operand:GPR 2 "reg_or_0_operand")
(match_operand:GPR 3 "reg_or_0_operand")))]
@@ -688,33 +684,38 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.md gcc-4.3.6-psp/gcc/config/mips/mips
+ "ISA_HAS_CONDMOVE || ISA_HAS_INT_CONDMOVE"
{
+ if (ISA_HAS_INT_CONDMOVE
-+ && GET_MODE_CLASS (GET_MODE (cmp_operands[0])) == MODE_FLOAT)
++ && GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_FLOAT)
+ FAIL;
+
mips_expand_conditional_move (operands);
DONE;
})
-@@ -6203,3 +6265,6 @@
+@@ -6481,6 +6532,9 @@
+ ; ST-Microelectronics Loongson-2E/2F-specific patterns.
+ (include "loongson.md")
- ; MIPS fixed-point instructions.
- (include "mips-fixed.md")
-+
+; Sony ALLEGREX instructions.
+(include "allegrex.md")
-diff -Nbaur gcc-4.3.6/gcc/config/mips/mips.opt gcc-4.3.6-psp/gcc/config/mips/mips.opt
---- gcc-4.3.6/gcc/config/mips/mips.opt 2008-10-22 23:31:03.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/mips.opt 2011-07-29 15:21:37.000000000 +0100
-@@ -271,3 +271,7 @@
- mxgot
++
+ (define_c_enum "unspec" [
+ UNSPEC_ADDRESS_FIRST
+ ])
+diff -Nbaur gcc-4.6.2/gcc/config/mips/mips.opt gcc-4.6.2-psp/gcc/config/mips/mips.opt
+--- gcc-4.6.2/gcc/config/mips/mips.opt 2011-02-17 01:59:04.000000000 +0000
++++ gcc-4.6.2-psp/gcc/config/mips/mips.opt 2012-02-25 14:09:47.000000000 +0000
+@@ -306,5 +306,9 @@
Target Report Var(TARGET_XGOT)
Lift restrictions on GOT size
-+
+
+mpreferred-stack-boundary=
+Target RejectNegative Joined Var(mips_preferred_stack_boundary_string)
+Attempt to keep stack aligned to this power of 2
-diff -Nbaur gcc-4.3.6/gcc/config/mips/psp.h gcc-4.3.6-psp/gcc/config/mips/psp.h
---- gcc-4.3.6/gcc/config/mips/psp.h 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/psp.h 2011-07-29 15:21:37.000000000 +0100
++
+ noasmopt
+ Driver
+diff -Nbaur gcc-4.6.2/gcc/config/mips/psp.h gcc-4.6.2-psp/gcc/config/mips/psp.h
+--- gcc-4.6.2/gcc/config/mips/psp.h 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.6.2-psp/gcc/config/mips/psp.h 2012-02-25 14:09:47.000000000 +0000
@@ -0,0 +1,31 @@
+/* Support for Sony's Playstation Portable (PSP).
+ Copyright (C) 2005 Free Software Foundation, Inc.
@@ -747,175 +748,95 @@ diff -Nbaur gcc-4.3.6/gcc/config/mips/psp.h gcc-4.3.6-psp/gcc/config/mips/psp.h
+/* Get rid of the .pdr section. */
+#undef SUBTARGET_ASM_SPEC
+#define SUBTARGET_ASM_SPEC "-mno-pdr"
-diff -Nbaur gcc-4.3.6/gcc/config/mips/t-allegrex gcc-4.3.6-psp/gcc/config/mips/t-allegrex
---- gcc-4.3.6/gcc/config/mips/t-allegrex 1970-01-01 01:00:00.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/config/mips/t-allegrex 2011-07-29 15:21:37.000000000 +0100
+diff -Nbaur gcc-4.6.2/gcc/config/mips/t-allegrex gcc-4.6.2-psp/gcc/config/mips/t-allegrex
+--- gcc-4.6.2/gcc/config/mips/t-allegrex 1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.6.2-psp/gcc/config/mips/t-allegrex 2012-02-25 14:09:47.000000000 +0000
@@ -0,0 +1,29 @@
-+# Suppress building libgcc1.a, since the MIPS compiler port is complete
-+# and does not need anything from libgcc1.a.
-+LIBGCC1 =
-+CROSS_LIBGCC1 =
-+
-+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
-+# Don't let CTOR_LIST end up in sdata section.
-+CRTSTUFF_T_CFLAGS = -G 0
-+
-+# Assemble startup files.
-+$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm
-+
-+$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES)
-+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
-+ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm
-+
-+# We must build libgcc2.a with -G 0, in case the user wants to link
-+# without the $gp register.
-+TARGET_LIBGCC2_CFLAGS = -G 0
-+
-+# Build the libraries for both hard and soft floating point
-+
-+MULTILIB_OPTIONS =
-+MULTILIB_DIRNAMES =
-+
-+LIBGCC = stmp-multilib
-+INSTALL_LIBGCC = install-multilib
-diff -Nbaur gcc-4.3.6/gcc/config.gcc gcc-4.3.6-psp/gcc/config.gcc
---- gcc-4.3.6/gcc/config.gcc 2011-02-24 23:02:14.000000000 +0000
-+++ gcc-4.3.6-psp/gcc/config.gcc 2011-07-29 15:21:37.000000000 +0100
-@@ -1823,6 +1823,18 @@
++# Suppress building libgcc1.a, since the MIPS compiler port is complete
++# and does not need anything from libgcc1.a.
++LIBGCC1 =
++CROSS_LIBGCC1 =
++
++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
++# Don't let CTOR_LIST end up in sdata section.
++CRTSTUFF_T_CFLAGS = -G 0
++
++# Assemble startup files.
++$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm
++
++$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm
++
++# We must build libgcc2.a with -G 0, in case the user wants to link
++# without the $gp register.
++TARGET_LIBGCC2_CFLAGS = -G 0
++
++# Build the libraries for both hard and soft floating point
++
++MULTILIB_OPTIONS =
++MULTILIB_DIRNAMES =
++
++LIBGCC = stmp-multilib
++INSTALL_LIBGCC = install-multilib
+diff -Nbaur gcc-4.6.2/gcc/config.gcc gcc-4.6.2-psp/gcc/config.gcc
+--- gcc-4.6.2/gcc/config.gcc 2011-07-22 17:44:50.000000000 +0100
++++ gcc-4.6.2-psp/gcc/config.gcc 2012-02-25 14:09:47.000000000 +0000
+@@ -2033,6 +2033,18 @@
+ tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
tmake_file="mips/t-r3900 mips/t-libgcc-mips16"
- use_fixproto=yes
;;
+mipsallegrex-*-elf* | mipsallegrexel-*-elf*)
-+ tm_file="elfos.h ${tm_file} mips/elf.h"
-+ tmake_file=mips/t-allegrex
-+ target_cpu_default="MASK_SINGLE_FLOAT|MASK_DIVIDE_BREAKS"
-+ tm_defines="MIPS_ISA_DEFAULT=2 MIPS_CPU_STRING_DEFAULT=\\\"allegrex\\\" MIPS_ABI_DEFAULT=ABI_EABI"
-+ case ${target} in
-+ mipsallegrex*-psp-elf*)
-+ tm_file="${tm_file} mips/psp.h"
-+ ;;
-+ esac
-+ use_fixproto=yes
-+ ;;
++ tm_file="elfos.h ${tm_file} mips/elf.h"
++ tmake_file=mips/t-allegrex
++ target_cpu_default="MASK_SINGLE_FLOAT|MASK_DIVIDE_BREAKS"
++ tm_defines="MIPS_ISA_DEFAULT=2 MIPS_CPU_STRING_DEFAULT=\\\"allegrex\\\" MIPS_ABI_DEFAULT=ABI_EABI"
++ case ${target} in
++ mipsallegrex*-psp-elf*)
++ tm_file="${tm_file} mips/psp.h"
++ ;;
++ esac
++ use_fixproto=yes
++ ;;
mmix-knuth-mmixware)
+ tm_file="${tm_file} newlib-stdint.h"
need_64bit_hwint=yes
- ;;
-diff -Nbaur gcc-4.3.6/gcc/gcc.c gcc-4.3.6-psp/gcc/gcc.c
---- gcc-4.3.6/gcc/gcc.c 2008-03-02 22:55:19.000000000 +0000
-+++ gcc-4.3.6-psp/gcc/gcc.c 2011-07-29 15:21:37.000000000 +0100
-@@ -635,6 +635,7 @@
- #endif
- #endif
-
-+
- /* config.h can define STARTFILE_SPEC to override the default crt0 files. */
- #ifndef STARTFILE_SPEC
- #define STARTFILE_SPEC \
-@@ -3418,8 +3419,6 @@
- gcc_libexec_prefix = make_relative_prefix (argv[0],
- standard_bindir_prefix,
- standard_libexec_prefix);
-- if (gcc_exec_prefix)
-- xputenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
- }
- else
- {
-@@ -6264,10 +6263,21 @@
-
- /* We need to check standard_exec_prefix/just_machine_suffix/specs
- for any override of as, ld and libraries. */
-+ if ( gcc_exec_prefix )
-+ {
-+ specs_file = alloca (strlen (gcc_exec_prefix)
-+ + strlen (just_machine_suffix) + sizeof ("specs"));
-+
-+ strcpy (specs_file, gcc_exec_prefix);
-+ } else {
-+
- specs_file = alloca (strlen (standard_exec_prefix)
- + strlen (just_machine_suffix) + sizeof ("specs"));
-
- strcpy (specs_file, standard_exec_prefix);
-+
-+ }
-+
- strcat (specs_file, just_machine_suffix);
- strcat (specs_file, "specs");
- if (access (specs_file, R_OK) == 0)
-diff -Nbaur gcc-4.3.6/gcc/prefix.c gcc-4.3.6-psp/gcc/prefix.c
---- gcc-4.3.6/gcc/prefix.c 2007-09-03 18:09:20.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/prefix.c 2011-07-29 15:21:37.000000000 +0100
-@@ -245,13 +245,16 @@
- The returned string is always malloc-ed, and the caller is
- responsible for freeing it. */
-
-+
-+static const char *old_prefix = PREFIX;
-+
- char *
- update_path (const char *path, const char *key)
- {
- char *result, *p;
-- const int len = strlen (std_prefix);
-+ const int len = strlen (old_prefix);
-
-- if (! strncmp (path, std_prefix, len)
-+ if (! strncmp (path, old_prefix, len)
- && (IS_DIR_SEPARATOR(path[len])
- || path[len] == '\0')
- && key != 0)
-@@ -353,4 +356,6 @@
- set_std_prefix (const char *prefix, int len)
- {
- std_prefix = save_string (prefix, len);
-+
-+ putenv (concat ("GCC_EXEC_PREFIX=", std_prefix, NULL));
- }
-diff -Nbaur gcc-4.3.6/gcc/toplev.c gcc-4.3.6-psp/gcc/toplev.c
---- gcc-4.3.6/gcc/toplev.c 2009-04-29 07:24:21.000000000 +0100
-+++ gcc-4.3.6-psp/gcc/toplev.c 2011-07-29 15:21:37.000000000 +0100
-@@ -82,6 +82,7 @@
- #include "alloc-pool.h"
- #include "tree-mudflap.h"
- #include "tree-pass.h"
-+#include "prefix.h"
-
- #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
- #include "dwarf2out.h"
-@@ -1627,6 +1628,10 @@
-
- xmalloc_set_program_name (progname);
-
-+ p = getenv("GCC_EXEC_PREFIX");
-+ if (p && strlen(p)) set_std_prefix (p, strlen(p));
-+
-+
- hex_init ();
-
- /* Unlock the stdio streams. */
-diff -Nbaur gcc-4.3.6/libcpp/Makefile.in gcc-4.3.6-psp/libcpp/Makefile.in
---- gcc-4.3.6/libcpp/Makefile.in 2011-06-27 12:28:31.000000000 +0100
-+++ gcc-4.3.6-psp/libcpp/Makefile.in 2011-07-29 15:21:37.000000000 +0100
-@@ -197,7 +197,7 @@
- # Dependency rule.
- COMPILE.base = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c
- ifeq ($(DEPMODE),depmode=gcc3)
--COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Po
-+COMPILE = $(COMPILE.base) -o $@
+diff -Nbaur gcc-4.6.2/libcpp/Makefile.in gcc-4.6.2-psp/libcpp/Makefile.in
+--- gcc-4.6.2/libcpp/Makefile.in 2011-10-26 10:30:24.000000000 +0100
++++ gcc-4.6.2-psp/libcpp/Makefile.in 2012-02-25 15:56:41.000000000 +0000
+@@ -212,8 +212,7 @@
+ # Note that we put the dependencies into a .Tpo file, then move them
+ # into place if the compile succeeds. We need this because gcc does
+ # not atomically write the dependency output file.
+-COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
+-POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
++COMPILE = $(COMPILE.base) -o $@
else
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
$(depcomp) $(COMPILE.base)
-diff -Nbaur gcc-4.3.6/libgcc/config.host gcc-4.3.6-psp/libgcc/config.host
---- gcc-4.3.6/libgcc/config.host 2008-11-20 17:09:53.000000000 +0000
-+++ gcc-4.3.6-psp/libgcc/config.host 2011-07-29 15:21:37.000000000 +0100
-@@ -469,6 +469,8 @@
+diff -Nbaur gcc-4.6.2/libgcc/config.host gcc-4.6.2-psp/libgcc/config.host
+--- gcc-4.6.2/libgcc/config.host 2011-03-14 06:06:23.000000000 +0000
++++ gcc-4.6.2-psp/libgcc/config.host 2012-02-25 14:09:47.000000000 +0000
+@@ -445,6 +445,8 @@
;;
mipstx39-*-elf* | mipstx39el-*-elf*)
;;
+mips*-psp-elf)
+ ;;
mmix-knuth-mmixware)
- ;;
- mn10300-*-*)
+ extra_parts="crti.o crtn.o crtbegin.o crtend.o"
+ tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
+diff -Nbaur gcc-4.6.2/libobjc/Makefile.in gcc-4.6.2-psp/libobjc/Makefile.in
+--- gcc-4.6.2/libobjc/Makefile.in 2010-12-23 11:26:14.000000000 +0000
++++ gcc-4.6.2-psp/libobjc/Makefile.in 2012-02-25 14:09:47.000000000 +0000
+@@ -74,7 +74,7 @@
+ RANLIB = @RANLIB@
+
+ CC = @CC@
+-CFLAGS = @CFLAGS@
++CFLAGS = -G 0 -G0 @CFLAGS@
+ WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes
+ ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \
+ -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
diff --git a/dkpsp/patches/gdb-6.8.patch b/dkpsp/patches/gdb-7.4.patch
similarity index 87%
rename from dkpsp/patches/gdb-6.8.patch
rename to dkpsp/patches/gdb-7.4.patch
index 667b314..8973a7c 100644
--- a/dkpsp/patches/gdb-6.8.patch
+++ b/dkpsp/patches/gdb-7.4.patch
@@ -1,48 +1,48 @@
-diff -Nbaur gdb-6.8/bfd/archures.c gdb-6.8-psp/bfd/archures.c
---- gdb-6.8/bfd/archures.c 2008-02-04 19:15:50.000000000 +0000
-+++ gdb-6.8-psp/bfd/archures.c 2009-02-11 11:19:19.000000000 +0000
-@@ -172,6 +172,7 @@
- .#define bfd_mach_mips_loongson_2e 3001
+diff -Nbaur gdb-7.4/bfd/archures.c gdb-7.4-psp/bfd/archures.c
+--- gdb-7.4/bfd/archures.c 2011-12-08 20:47:24.000000000 +0000
++++ gdb-7.4-psp/bfd/archures.c 2012-02-25 14:11:29.000000000 +0000
+@@ -175,6 +175,7 @@
.#define bfd_mach_mips_loongson_2f 3002
+ .#define bfd_mach_mips_loongson_3a 3003
.#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *}
+.#define bfd_mach_mips_allegrex 10111431 {* octal 'AL', 31 *}
.#define bfd_mach_mips_octeon 6501
- .#define bfd_mach_mipsisa32 32
- .#define bfd_mach_mipsisa32r2 33
-diff -Nbaur gdb-6.8/bfd/bfd-in2.h gdb-6.8-psp/bfd/bfd-in2.h
---- gdb-6.8/bfd/bfd-in2.h 2008-02-20 15:17:56.000000000 +0000
-+++ gdb-6.8-psp/bfd/bfd-in2.h 2009-02-11 11:19:19.000000000 +0000
-@@ -1849,6 +1849,7 @@
- #define bfd_mach_mips_loongson_2e 3001
+ .#define bfd_mach_mips_octeonp 6601
+ .#define bfd_mach_mips_octeon2 6502
+diff -Nbaur gdb-7.4/bfd/bfd-in2.h gdb-7.4-psp/bfd/bfd-in2.h
+--- gdb-7.4/bfd/bfd-in2.h 2011-12-08 20:47:24.000000000 +0000
++++ gdb-7.4-psp/bfd/bfd-in2.h 2012-02-25 14:11:29.000000000 +0000
+@@ -1881,6 +1881,7 @@
#define bfd_mach_mips_loongson_2f 3002
+ #define bfd_mach_mips_loongson_3a 3003
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
+#define bfd_mach_mips_allegrex 10111431 /* octal 'AL', 31 */
#define bfd_mach_mips_octeon 6501
- #define bfd_mach_mipsisa32 32
- #define bfd_mach_mipsisa32r2 33
-diff -Nbaur gdb-6.8/bfd/cpu-mips.c gdb-6.8-psp/bfd/cpu-mips.c
---- gdb-6.8/bfd/cpu-mips.c 2008-02-04 19:15:52.000000000 +0000
-+++ gdb-6.8-psp/bfd/cpu-mips.c 2009-02-11 11:19:19.000000000 +0000
-@@ -87,6 +87,7 @@
+ #define bfd_mach_mips_octeonp 6601
+ #define bfd_mach_mips_octeon2 6502
+diff -Nbaur gdb-7.4/bfd/cpu-mips.c gdb-7.4-psp/bfd/cpu-mips.c
+--- gdb-7.4/bfd/cpu-mips.c 2011-12-08 20:47:24.000000000 +0000
++++ gdb-7.4-psp/bfd/cpu-mips.c 2012-02-25 14:11:29.000000000 +0000
+@@ -89,6 +89,7 @@
I_mipsisa64,
I_mipsisa64r2,
I_sb1,
+ I_allegrex,
I_loongson_2e,
I_loongson_2f,
- I_mipsocteon
-@@ -123,6 +124,7 @@
+ I_loongson_3a,
+@@ -132,6 +133,7 @@
N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)),
N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)),
N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, NN(I_sb1)),
-+ N (32, 32, bfd_mach_mips_allegrex, "mips:allegrex", FALSE, 0),
++ N (32, 32, bfd_mach_mips_allegrex, "mips:allegrex", FALSE, NN(I_allegrex)),
N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", FALSE, NN(I_loongson_2e)),
N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", FALSE, NN(I_loongson_2f)),
- N (64, 64, bfd_mach_mips_octeon, "mips:octeon", FALSE, 0)
-diff -Nbaur gdb-6.8/bfd/elfxx-mips.c gdb-6.8-psp/bfd/elfxx-mips.c
---- gdb-6.8/bfd/elfxx-mips.c 2008-02-15 03:35:52.000000000 +0000
-+++ gdb-6.8-psp/bfd/elfxx-mips.c 2009-02-11 11:19:19.000000000 +0000
-@@ -5221,6 +5221,9 @@
+ N (64, 64, bfd_mach_mips_loongson_3a, "mips:loongson_3a", FALSE, NN(I_loongson_3a)),
+diff -Nbaur gdb-7.4/bfd/elfxx-mips.c gdb-7.4-psp/bfd/elfxx-mips.c
+--- gdb-7.4/bfd/elfxx-mips.c 2011-12-13 06:22:01.000000000 +0000
++++ gdb-7.4-psp/bfd/elfxx-mips.c 2012-02-25 14:11:29.000000000 +0000
+@@ -6178,14 +6178,19 @@
case E_MIPS_MACH_SB1:
return bfd_mach_mips_sb1;
@@ -52,7 +52,17 @@ diff -Nbaur gdb-6.8/bfd/elfxx-mips.c gdb-6.8-psp/bfd/elfxx-mips.c
case E_MIPS_MACH_LS2E:
return bfd_mach_mips_loongson_2e;
-@@ -11271,6 +11274,7 @@
+ case E_MIPS_MACH_LS2F:
+ return bfd_mach_mips_loongson_2f;
+
++ /*
+ case E_MIPS_MACH_LS3A:
+ return bfd_mach_mips_loongson_3a;
++ */
+
+ case E_MIPS_MACH_OCTEON2:
+ return bfd_mach_mips_octeon2;
+@@ -13547,6 +13552,7 @@
/* MIPS II extensions. */
{ bfd_mach_mips4000, bfd_mach_mips6000 },
{ bfd_mach_mipsisa32, bfd_mach_mips6000 },
@@ -60,18 +70,30 @@ diff -Nbaur gdb-6.8/bfd/elfxx-mips.c gdb-6.8-psp/bfd/elfxx-mips.c
/* MIPS I extensions. */
{ bfd_mach_mips6000, bfd_mach_mips3000 },
-diff -Nbaur gdb-6.8/config.sub gdb-6.8-psp/config.sub
---- gdb-6.8/config.sub 2008-01-23 02:43:51.000000000 +0000
-+++ gdb-6.8-psp/config.sub 2009-02-11 11:19:19.000000000 +0000
-@@ -267,6 +267,7 @@
+diff -Nbaur gdb-7.4/bfd/sysdep.h gdb-7.4-psp/bfd/sysdep.h
+--- gdb-7.4/bfd/sysdep.h 2009-09-02 08:18:37.000000000 +0100
++++ gdb-7.4-psp/bfd/sysdep.h 2012-02-25 14:19:29.000000000 +0000
+@@ -131,7 +131,7 @@
+ extern PTR realloc ();
+ #endif
+
+-#if !HAVE_DECL_STPCPY
++#if !HAVE_DECL_STPCPY && !defined(stpcpy)
+ extern char *stpcpy (char *__dest, const char *__src);
+ #endif
+
+diff -Nbaur gdb-7.4/config.sub gdb-7.4-psp/config.sub
+--- gdb-7.4/config.sub 2011-11-02 00:56:53.000000000 +0000
++++ gdb-7.4-psp/config.sub 2012-02-25 14:11:30.000000000 +0000
+@@ -283,6 +283,7 @@
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
+ | mipsallegrex | mipsallegrexel \
| mn10200 | mn10300 \
+ | moxie \
| mt \
- | msp430 \
-@@ -348,6 +349,7 @@
+@@ -396,6 +397,7 @@
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
@@ -79,7 +101,7 @@ diff -Nbaur gdb-6.8/config.sub gdb-6.8-psp/config.sub
| mmix-* \
| mt-* \
| msp430-* \
-@@ -714,6 +716,10 @@
+@@ -795,6 +797,10 @@
basic_machine=m68k-atari
os=-mint
;;
@@ -90,34 +112,34 @@ diff -Nbaur gdb-6.8/config.sub gdb-6.8-psp/config.sub
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
-diff -Nbaur gdb-6.8/include/elf/common.h gdb-6.8-psp/include/elf/common.h
---- gdb-6.8/include/elf/common.h 2008-01-16 22:01:42.000000000 +0000
-+++ gdb-6.8-psp/include/elf/common.h 2009-02-11 11:19:19.000000000 +0000
-@@ -93,6 +93,7 @@
+diff -Nbaur gdb-7.4/include/elf/common.h gdb-7.4-psp/include/elf/common.h
+--- gdb-7.4/include/elf/common.h 2011-12-06 14:09:12.000000000 +0000
++++ gdb-7.4-psp/include/elf/common.h 2012-02-25 14:11:30.000000000 +0000
+@@ -96,6 +96,7 @@
#define ET_HIOS 0xFEFF /* Operating system-specific */
#define ET_LOPROC 0xFF00 /* Processor-specific */
#define ET_HIPROC 0xFFFF /* Processor-specific */
-+#define ET_PSPEXEC 0xFFA0 /* Sony PSP executable file */
++#define ET_PSPEXEC 0xFFA0 /* Sony PSP executable file */
/* Values for e_machine, which identifies the architecture. These numbers
- are officially assigned by registry@caldera.com. See below for a list of
-diff -Nbaur gdb-6.8/include/elf/mips.h gdb-6.8-psp/include/elf/mips.h
---- gdb-6.8/include/elf/mips.h 2008-02-04 19:21:25.000000000 +0000
-+++ gdb-6.8-psp/include/elf/mips.h 2009-02-11 11:19:19.000000000 +0000
-@@ -217,6 +217,7 @@
+ are officially assigned by registry@sco.com. See below for a list of
+diff -Nbaur gdb-7.4/include/elf/mips.h gdb-7.4-psp/include/elf/mips.h
+--- gdb-7.4/include/elf/mips.h 2011-07-24 15:20:12.000000000 +0100
++++ gdb-7.4-psp/include/elf/mips.h 2012-02-25 14:11:30.000000000 +0000
+@@ -265,6 +265,7 @@
#define E_MIPS_MACH_5400 0x00910000
#define E_MIPS_MACH_5500 0x00980000
#define E_MIPS_MACH_9000 0x00990000
+#define E_MIPS_MACH_ALLEGREX 0x00A20000
#define E_MIPS_MACH_LS2E 0x00A00000
#define E_MIPS_MACH_LS2F 0x00A10000
-
-diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
---- gdb-6.8/include/opcode/mips.h 2008-02-04 19:25:05.000000000 +0000
-+++ gdb-6.8-psp/include/opcode/mips.h 2009-02-11 11:19:19.000000000 +0000
-@@ -215,6 +215,83 @@
- #define OP_SH_UDI4 6
- #define OP_MASK_UDI4 0xfffff
+ #define E_MIPS_MACH_LS3A 0x00A20000
+diff -Nbaur gdb-7.4/include/opcode/mips.h gdb-7.4-psp/include/opcode/mips.h
+--- gdb-7.4/include/opcode/mips.h 2011-12-08 20:47:27.000000000 +0000
++++ gdb-7.4-psp/include/opcode/mips.h 2012-02-25 14:11:30.000000000 +0000
+@@ -326,6 +326,83 @@
+ #define OP_MASK_IMMY 0
+ #define OP_SH_IMMY 0
+#define OP_SH_VFPU_DELTA 0
+#define OP_MASK_VFPU_DELTA 0xfffc
@@ -199,7 +221,7 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
/* This structure holds information for a particular instruction. */
struct mips_opcode
-@@ -303,6 +380,29 @@
+@@ -416,6 +493,29 @@
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
@@ -229,7 +251,7 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
Floating point instructions:
"D" 5 bit destination register (OP_*_FD)
"M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
-@@ -556,6 +656,8 @@
+@@ -761,6 +861,8 @@
#define INSN_SMARTMIPS 0x10000000
/* DSP R2 ASE */
#define INSN_DSPR2 0x20000000
@@ -238,15 +260,15 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
/* ST Microelectronics Loongson 2E. */
#define INSN_LOONGSON_2E 0x40000000
/* ST Microelectronics Loongson 2F. */
-@@ -607,6 +709,7 @@
+@@ -821,6 +923,7 @@
#define CPU_MIPS64 64
#define CPU_MIPS64R2 65
#define CPU_SB1 12310201 /* octal 'SB', 01. */
+#define CPU_ALLEGREX 10111431 /* octal 'AL', 31. */
#define CPU_LOONGSON_2E 3001
#define CPU_LOONGSON_2F 3002
- #define CPU_OCTEON 6501
-@@ -636,6 +739,7 @@
+ #define CPU_LOONGSON_3A 3003
+@@ -855,6 +958,7 @@
|| (cpu == CPU_VR4120 && ((insn)->membership & INSN_4120) != 0) \
|| (cpu == CPU_VR5400 && ((insn)->membership & INSN_5400) != 0) \
|| (cpu == CPU_VR5500 && ((insn)->membership & INSN_5500) != 0) \
@@ -254,9 +276,9 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
|| (cpu == CPU_LOONGSON_2E \
&& ((insn)->membership & INSN_LOONGSON_2E) != 0) \
|| (cpu == CPU_LOONGSON_2F \
-@@ -759,6 +863,16 @@
- M_LL_AB,
+@@ -1018,6 +1122,16 @@
M_LLD_AB,
+ M_LLD_OB,
M_LS_A,
+ M_LVHIP,
+ M_LVHIS,
@@ -271,7 +293,7 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
M_LW_A,
M_LW_AB,
M_LWC0_A,
-@@ -848,6 +962,10 @@
+@@ -1142,6 +1256,10 @@
M_SUB_I,
M_SUBU_I,
M_SUBU_I_2,
@@ -282,7 +304,7 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
M_TEQ_I,
M_TGE_I,
M_TGEU_I,
-@@ -862,14 +980,24 @@
+@@ -1156,14 +1274,24 @@
M_ULH_A,
M_ULHU,
M_ULHU_A,
@@ -307,10 +329,10 @@ diff -Nbaur gdb-6.8/include/opcode/mips.h gdb-6.8-psp/include/opcode/mips.h
M_XOR_I,
M_COP0,
M_COP1,
-diff -Nbaur gdb-6.8/opcodes/mips-dis.c gdb-6.8-psp/opcodes/mips-dis.c
---- gdb-6.8/opcodes/mips-dis.c 2008-02-04 19:26:11.000000000 +0000
-+++ gdb-6.8-psp/opcodes/mips-dis.c 2009-02-11 11:19:19.000000000 +0000
-@@ -160,6 +160,139 @@
+diff -Nbaur gdb-7.4/opcodes/mips-dis.c gdb-7.4-psp/opcodes/mips-dis.c
+--- gdb-7.4/opcodes/mips-dis.c 2011-12-08 20:47:27.000000000 +0000
++++ gdb-7.4-psp/opcodes/mips-dis.c 2012-02-25 14:11:30.000000000 +0000
+@@ -245,6 +245,139 @@
"c0_taglo", "c0_taghi", "c0_errorepc", "c0_desave",
};
@@ -450,7 +472,7 @@ diff -Nbaur gdb-6.8/opcodes/mips-dis.c gdb-6.8-psp/opcodes/mips-dis.c
static const struct mips_cp0sel_name mips_cp0sel_names_mips3264[] =
{
{ 16, 1, "c0_config1" },
-@@ -336,6 +469,54 @@
+@@ -471,6 +604,54 @@
"$24", "$25", "$26", "$27", "$28", "$29", "$30", "$31"
};
@@ -505,7 +527,7 @@ diff -Nbaur gdb-6.8/opcodes/mips-dis.c gdb-6.8-psp/opcodes/mips-dis.c
struct mips_abi_choice
{
const char * name;
-@@ -411,7 +592,8 @@
+@@ -550,7 +731,8 @@
mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
{ "mips5", 1, bfd_mach_mips5, CPU_MIPS5, ISA_MIPS5,
mips_cp0_names_numeric, NULL, 0, mips_hwr_names_numeric },
@@ -515,7 +537,7 @@ diff -Nbaur gdb-6.8/opcodes/mips-dis.c gdb-6.8-psp/opcodes/mips-dis.c
/* For stock MIPS32, disassemble all applicable MIPS-specified ASEs.
Note that MIPS-3D and MDMX are not applicable to MIPS32. (See
_MIPS32 Architecture For Programmers Volume I: Introduction to the
-@@ -1241,6 +1423,349 @@
+@@ -1487,6 +1669,349 @@
(l >> OP_SH_FT) & OP_MASK_FT);
break;
@@ -865,18 +887,18 @@ diff -Nbaur gdb-6.8/opcodes/mips-dis.c gdb-6.8-psp/opcodes/mips-dis.c
default:
/* xgettext:c-format */
(*info->fprintf_func) (info->stream,
-diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
---- gdb-6.8/opcodes/mips-opc.c 2008-02-04 19:26:11.000000000 +0000
-+++ gdb-6.8-psp/opcodes/mips-opc.c 2009-02-11 11:19:19.000000000 +0000
+diff -Nbaur gdb-7.4/opcodes/mips-opc.c gdb-7.4-psp/opcodes/mips-opc.c
+--- gdb-7.4/opcodes/mips-opc.c 2011-12-08 20:52:42.000000000 +0000
++++ gdb-7.4-psp/opcodes/mips-opc.c 2012-02-25 14:15:40.000000000 +0000
@@ -121,6 +121,7 @@
#define N5 (INSN_5400 | INSN_5500)
#define N54 INSN_5400
#define N55 INSN_5500
+#define AL INSN_ALLEGREX
- #define IOCT INSN_OCTEON
-
- #define G1 (T3 \
-@@ -318,6 +319,7 @@
+ #define IOCT (INSN_OCTEON | INSN_OCTEONP | INSN_OCTEON2)
+ #define IOCTP (INSN_OCTEONP | INSN_OCTEON2)
+ #define IOCT2 INSN_OCTEON2
+@@ -404,6 +405,7 @@
{"bnel", "s,t,p", 0x54000000, 0xfc000000, CBL|RD_s|RD_t, 0, I2|T3 },
{"bnel", "s,I,p", 0, (int) M_BNEL_I, INSN_MACRO, 0, I2|T3 },
{"break", "", 0x0000000d, 0xffffffff, TRAP, 0, I1 },
@@ -884,7 +906,7 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"break", "c", 0x0000000d, 0xfc00ffff, TRAP, 0, I1 },
{"break", "c,q", 0x0000000d, 0xfc00003f, TRAP, 0, I1 },
{"c.f.d", "S,T", 0x46200030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
-@@ -500,7 +502,7 @@
+@@ -586,7 +588,7 @@
{"flushd", "", 0xbc020000, 0xffffffff, 0, 0, L1 },
{"flushid", "", 0xbc030000, 0xffffffff, 0, 0, L1 },
{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, 0, L1 },
@@ -893,9 +915,9 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"cache", "k,A(b)", 0, (int) M_CACHE_AB, INSN_MACRO, 0, I3_32|T3},
{"ceil.l.d", "D,S", 0x4620000a, 0xffff003f, WR_D|RD_S|FP_D, 0, I3_33 },
{"ceil.l.s", "D,S", 0x4600000a, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3_33 },
-@@ -515,7 +517,9 @@
- {"cftc1", "d,T", 0x41000023, 0xffe007ff, TRAP|LCD|WR_d|RD_C1|FP_S, 0, MT32 },
- {"cftc2", "d,E", 0x41000025, 0xffe007ff, TRAP|LCD|WR_d|RD_C2, 0, MT32 },
+@@ -604,7 +606,9 @@
+ {"cins", "t,r,+P,+S",0x70000033, 0xfc00003f, WR_t|RD_s, 0, IOCT }, /* cins32 */
+ {"cins", "t,r,+p,+s",0x70000032, 0xfc00003f, WR_t|RD_s, 0, IOCT },
{"clo", "U,s", 0x70000021, 0xfc0007ff, WR_d|WR_t|RD_s, 0, I32|N55 },
+{"clo", "d,s", 0x00000017, 0xfc1f07ff, WR_d|RD_s, 0, AL },
{"clz", "U,s", 0x70000020, 0xfc0007ff, WR_d|WR_t|RD_s, 0, I32|N55 },
@@ -903,65 +925,68 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"ctc0", "t,G", 0x40c00000, 0xffe007ff, COD|RD_t|WR_CC, 0, I1 },
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
-@@ -540,15 +544,15 @@
+@@ -629,16 +633,16 @@
{"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_S|FP_D, 0, I5_33 },
{"cvt.pw.ps", "D,S", 0x46c00024, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, M3D },
{"dabs", "d,v", 0, (int) M_DABS, INSN_MACRO, 0, I3 },
-+{"max", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
++{"max", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
{"dadd", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
{"dadd", "t,r,I", 0, (int) M_DADD_I, INSN_MACRO, 0, I3 },
-{"dadd", "D,S,T", 0x45e00000, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2E },
--{"dadd", "D,S,T", 0x4b60000c, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F },
+-{"dadd", "D,S,T", 0x4b60000c, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F|IL3A },
{"daddi", "t,r,j", 0x60000000, 0xfc000000, WR_t|RD_s, 0, I3 },
{"daddiu", "t,r,j", 0x64000000, 0xfc000000, WR_t|RD_s, 0, I3 },
-+{"min", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
++{"min", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, AL },
{"daddu", "d,v,t", 0x0000002d, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
{"daddu", "t,r,I", 0, (int) M_DADDU_I, INSN_MACRO, 0, I3 },
+ {"daddwc", "d,s,t", 0x70000038, 0xfc0007ff, WR_d|RD_s|RD_t|WR_C0|RD_C0, 0, XLR },
-{"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5 },
+{"dbreak", "", 0x7000003f, 0xffffffff, 0, 0, N5|AL },
{"dclo", "U,s", 0x70000025, 0xfc0007ff, RD_s|WR_d|WR_t, 0, I64|N55 },
{"dclz", "U,s", 0x70000024, 0xfc0007ff, RD_s|WR_d|WR_t, 0, I64|N55 },
/* dctr and dctw are used on the r5000. */
-@@ -635,7 +639,7 @@
+@@ -727,7 +731,7 @@
{"dremu", "z,s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, I3 },
- {"dremu", "d,v,t", 3, (int) M_DREMU_3, INSN_MACRO, 0, I3 },
- {"dremu", "d,v,I", 3, (int) M_DREMU_3I, INSN_MACRO, 0, I3 },
+ {"dremu", "d,v,t", 0, (int) M_DREMU_3, INSN_MACRO, 0, I3 },
+ {"dremu", "d,v,I", 0, (int) M_DREMU_3I, INSN_MACRO, 0, I3 },
-{"dret", "", 0x7000003e, 0xffffffff, 0, 0, N5 },
+{"dret", "", 0x7000003e, 0xffffffff, 0, 0, N5|AL },
{"drol", "d,v,t", 0, (int) M_DROL, INSN_MACRO, 0, I3 },
{"drol", "d,v,I", 0, (int) M_DROL_I, INSN_MACRO, 0, I3 },
{"dror", "d,v,t", 0, (int) M_DROR, INSN_MACRO, 0, I3 },
-@@ -684,16 +688,16 @@
- {"ei", "t", 0x41606020, 0xffe0ffff, WR_t|WR_C0, 0, I33 },
+@@ -776,10 +780,10 @@
+ {"ei", "t", 0x41606020, 0xffe0ffff, WR_t|WR_C0, 0, I33|IOCT},
{"emt", "", 0x41600be1, 0xffffffff, TRAP, 0, MT32 },
{"emt", "t", 0x41600be1, 0xffe0ffff, TRAP|WR_t, 0, MT32 },
--{"eret", "", 0x42000018, 0xffffffff, 0, 0, I3_32 },
-+{"eret", "", 0x42000018, 0xffffffff, 0, 0, I3|I32|AL },
+-{"eret", "", 0x42000018, 0xffffffff, NODS, 0, I3_32 },
++{"eret", "", 0x42000018, 0xffffffff, NODS, 0, I3_32|AL },
{"evpe", "", 0x41600021, 0xffffffff, TRAP, 0, MT32 },
{"evpe", "t", 0x41600021, 0xffe0ffff, TRAP|WR_t, 0, MT32 },
-{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, 0, I33 },
+{"ext", "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s, 0, I33|AL },
- {"floor.l.d", "D,S", 0x4620000b, 0xffff003f, WR_D|RD_S|FP_D, 0, I3_33 },
- {"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3_33 },
+ {"exts32", "t,r,+p,+S",0x7000003b, 0xfc00003f, WR_t|RD_s, 0, IOCT },
+ {"exts", "t,r,+P,+S",0x7000003b, 0xfc00003f, WR_t|RD_s, 0, IOCT }, /* exts32 */
+ {"exts", "t,r,+p,+s",0x7000003a, 0xfc00003f, WR_t|RD_s, 0, IOCT },
+@@ -788,7 +792,7 @@
{"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
{"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
{"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 },
-{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 },
+{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33|AL },
+ {"iret", "", 0x42000038, 0xffffffff, NODS, 0, MC },
{"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 },
/* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with
- the same hazard barrier effect. */
-@@ -731,18 +735,10 @@
- {"ld", "t,o(b)", 0xdc000000, 0xfc000000, WR_t|RD_b, 0, I3 },
- {"ld", "t,o(b)", 0, (int) M_LD_OB, INSN_MACRO, 0, I1 },
- {"ld", "t,A(b)", 0, (int) M_LD_AB, INSN_MACRO, 0, I1 },
+@@ -850,18 +854,10 @@
+ {"ldaddw", "t,b", 0x70000010, 0xfc00ffff, SM|RD_t|WR_t|RD_b, 0, XLR },
+ {"ldaddwu", "t,b", 0x70000011, 0xfc00ffff, SM|RD_t|WR_t|RD_b, 0, XLR },
+ {"ldaddd", "t,b", 0x70000012, 0xfc00ffff, SM|RD_t|WR_t|RD_b, 0, XLR },
-{"ldc1", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
-{"ldc1", "E,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 },
--{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
--{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, 0, I2 },
+-{"ldc1", "T,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2 },
+-{"ldc1", "E,A(b)", 0, (int) M_LDC1_AB, INSN_MACRO, INSN2_M_FP_D, I2 },
-{"l.d", "T,o(b)", 0xd4000000, 0xfc000000, CLD|RD_b|WR_T|FP_D, 0, I2 }, /* ldc1 */
--{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, 0, I1 },
--{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, 0, I1 },
+-{"l.d", "T,o(b)", 0, (int) M_L_DOB, INSN_MACRO, INSN2_M_FP_D, I1 },
+-{"l.d", "T,A(b)", 0, (int) M_L_DAB, INSN_MACRO, INSN2_M_FP_D, I1 },
-{"ldc2", "E,o(b)", 0xd8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
-{"ldc2", "E,A(b)", 0, (int) M_LDC2_AB, INSN_MACRO, 0, I2 },
-{"ldc3", "E,o(b)", 0xdc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I2 },
@@ -970,38 +995,37 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
+/* ldc1 is at the bottom of the table. */
+/* ldc2 is at the bottom of the table. */
+/* ldc3 is at the bottom of the table. */
-+{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3|AL },
++{"ldl", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3|AL },
{"ldl", "t,A(b)", 0, (int) M_LDL_AB, INSN_MACRO, 0, I3 },
{"ldr", "t,o(b)", 0x6c000000, 0xfc000000, LDD|WR_t|RD_b, 0, I3 },
{"ldr", "t,A(b)", 0, (int) M_LDR_AB, INSN_MACRO, 0, I3 },
-@@ -772,8 +768,8 @@
- {"lwc1", "E,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, 0, I1 },
+@@ -891,8 +887,7 @@
+ {"lwc1", "E,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
{"l.s", "T,o(b)", 0xc4000000, 0xfc000000, CLD|RD_b|WR_T|FP_S, 0, I1 }, /* lwc1 */
- {"l.s", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, 0, I1 },
+ {"l.s", "T,A(b)", 0, (int) M_LWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
-{"lwc2", "E,o(b)", 0xc8000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
-{"lwc2", "E,A(b)", 0, (int) M_LWC2_AB, INSN_MACRO, 0, I1 },
+/* lwc2 is at the bottom of the table. */
-+
{"lwc3", "E,o(b)", 0xcc000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
{"lwc3", "E,A(b)", 0, (int) M_LWC3_AB, INSN_MACRO, 0, I1 },
{"lwl", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, 0, I1 },
-@@ -814,13 +810,13 @@
+@@ -933,13 +928,13 @@
{"madd.ps", "D,S,T", 0x71600018, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F },
{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
-{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
+{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1|AL },
- {"madd", "7,s,t", 0x70000000, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+ {"madd", "7,s,t", 0x70000000, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
{"maddp", "s,t", 0x70000441, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, SMT },
{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
-{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
+{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1|AL },
- {"maddu", "7,s,t", 0x70000001, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+ {"maddu", "7,s,t", 0x70000001, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"maddu", "d,s,t", 0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
{"madd16", "s,t", 0x00000028, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, N411 },
-@@ -859,7 +855,7 @@
+@@ -978,7 +973,7 @@
/* mfc2 is at the bottom of the table. */
/* mfhc2 is at the bottom of the table. */
/* mfc3 is at the bottom of the table. */
@@ -1010,16 +1034,16 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, 0, I1 },
{"mfhi", "d,9", 0x00000010, 0xff9f07ff, WR_d|RD_HI, 0, D32 },
{"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, 0, I1 },
-@@ -880,7 +876,7 @@
+@@ -1000,7 +995,7 @@
{"movf.l", "X,Y,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
{"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4_32 },
{"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5_33 },
-{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4_32|IL2E|IL2F },
-+{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32|AL },
- {"movnz", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, IL2E|IL2F },
++{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4_32|IL2E|IL2F|AL },
+ {"movnz", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, IL2E|IL2F|IL3A },
{"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
{"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4_32 },
-@@ -894,7 +890,7 @@
+@@ -1014,7 +1009,7 @@
{"movt.l", "X,Y,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
{"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4_32 },
{"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5_33 },
@@ -1028,18 +1052,18 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
{"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4_32 },
{"movz.l", "D,S,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
-@@ -918,8 +914,10 @@
+@@ -1043,8 +1038,10 @@
{"msub.ps", "D,S,T", 0x71600019, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2F },
{"msub", "s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
{"msub", "s,t", 0x70000004, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
-+{"msub", "s,t", 0x0000002e, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
- {"msub", "7,s,t", 0x70000004, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
++{"msub", "s,t", 0x0000002e, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
+ {"msub", "7,s,t", 0x70000004, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"msubu", "s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-+{"msubu", "s,t", 0x0000002f, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
++{"msubu", "s,t", 0x0000002f, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, AL },
{"msubu", "s,t", 0x70000005, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
- {"msubu", "7,s,t", 0x70000005, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+ {"msubu", "7,s,t", 0x70000005, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"mtpc", "t,P", 0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0, 0, M1|N5 },
-@@ -934,7 +932,7 @@
+@@ -1059,7 +1056,7 @@
/* mtc2 is at the bottom of the table. */
/* mthc2 is at the bottom of the table. */
/* mtc3 is at the bottom of the table. */
@@ -1048,7 +1072,7 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, 0, I1 },
{"mthi", "s,7", 0x00000011, 0xfc1fe7ff, RD_s|WR_HI, 0, D32 },
{"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, 0, I1 },
-@@ -1111,13 +1109,13 @@
+@@ -1253,13 +1250,13 @@
{"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I1 },
{"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I1 },
{"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I1 },
@@ -1069,10 +1093,10 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, 0, I3_33 },
{"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3_33 },
{"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
-@@ -1160,13 +1158,13 @@
+@@ -1309,13 +1306,13 @@
{"s.d", "T,o(b)", 0xf4000000, 0xfc000000, SM|RD_T|RD_b|FP_D, 0, I2 },
- {"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, 0, I1 },
- {"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, 0, I1 },
+ {"s.d", "T,o(b)", 0, (int) M_S_DOB, INSN_MACRO, INSN2_M_FP_D, I1 },
+ {"s.d", "T,A(b)", 0, (int) M_S_DAB, INSN_MACRO, INSN2_M_FP_D, I1 },
-{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, I3 },
+{"sdl", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, I3|AL },
{"sdl", "t,A(b)", 0, (int) M_SDL_AB, INSN_MACRO, 0, I3 },
@@ -1085,21 +1109,20 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
+{"seh", "d,w", 0x7c000620, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
{"selsl", "d,v,t", 0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t, 0, L1 },
{"selsr", "d,v,t", 0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t, 0, L1 },
- {"seq", "d,v,t", 0, (int) M_SEQ, INSN_MACRO, 0, I1 },
-@@ -1279,8 +1277,8 @@
- {"swc1", "E,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, 0, I1 },
+ {"seq", "d,v,t", 0x7000002a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, IOCT },
+@@ -1435,8 +1432,7 @@
+ {"swc1", "E,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
{"s.s", "T,o(b)", 0xe4000000, 0xfc000000, SM|RD_T|RD_b|FP_S, 0, I1 }, /* swc1 */
- {"s.s", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, 0, I1 },
+ {"s.s", "T,A(b)", 0, (int) M_SWC1_AB, INSN_MACRO, INSN2_M_FP_S, I1 },
-{"swc2", "E,o(b)", 0xe8000000, 0xfc000000, SM|RD_C2|RD_b, 0, I1 },
-{"swc2", "E,A(b)", 0, (int) M_SWC2_AB, INSN_MACRO, 0, I1 },
+/* swc2 is at the bottom of the table. */
-+
{"swc3", "E,o(b)", 0xec000000, 0xfc000000, SM|RD_C3|RD_b, 0, I1 },
{"swc3", "E,A(b)", 0, (int) M_SWC3_AB, INSN_MACRO, 0, I1 },
{"swl", "t,o(b)", 0xa8000000, 0xfc000000, SM|RD_t|RD_b, 0, I1 },
-@@ -1365,7 +1363,8 @@
- {"wait", "J", 0x42000020, 0xfe00003f, TRAP, 0, I32|N55 },
- {"waiti", "", 0x42000020, 0xffffffff, TRAP, 0, L1 },
+@@ -1533,7 +1529,8 @@
+ {"wait", "J", 0x42000020, 0xfe00003f, NODS, 0, I32|N55 },
+ {"waiti", "", 0x42000020, 0xffffffff, NODS, 0, L1 },
{"wrpgpr", "d,w", 0x41c00000, 0xffe007ff, RD_t, 0, I33 },
-{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33 },
+{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33|AL },
@@ -1107,15 +1130,16 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
{"xor", "t,r,I", 0, (int) M_XOR_I, INSN_MACRO, 0, I1 },
{"xor", "D,S,T", 0x47800002, 0xffe0003f, RD_S|RD_T|WR_D|FP_D, 0, IL2E },
-@@ -1444,7 +1443,318 @@
+@@ -1614,7 +1611,318 @@
{"udi15", "s,t,+2", 0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
{"udi15", "s,+3", 0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
{"udi15", "+4", 0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+-
+/* Sony Allegrex CPU core. */
+{"bitrev", "d,t", 0x7c000520, 0xffe007ff, WR_d|RD_t, 0, AL },
+{"mfic", "t,G", 0x70000024, 0xffe007ff, LCD|WR_t|RD_C0, 0, AL },
+{"mtic", "t,G", 0x70000026, 0xffe007ff, COD|RD_t|WR_C0, 0, AL },
-
++
+/* Sony Allegrex VFPU instructions. */
+{"bvf", "?c,p", 0x49000000, 0xffe30000, CBD|RD_CC, 0, AL },
+{"bvfl", "?c,p", 0x49020000, 0xffe30000, CBL|RD_CC, 0, AL },
@@ -1426,7 +1450,7 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
/* Coprocessor 2 move/branch operations overlap with VR5400 .ob format
instructions so they are here for the latters to take precedence. */
{"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, 0, I1 },
-@@ -1487,6 +1797,38 @@
+@@ -1659,6 +1967,38 @@
{"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, 0, I1 },
{"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, 0, I32 },
@@ -1465,153 +1489,15 @@ diff -Nbaur gdb-6.8/opcodes/mips-opc.c gdb-6.8-psp/opcodes/mips-opc.c
/* Conflicts with the 4650's "mul" instruction. Nobody's using the
4010 any more, so move this insn out of the way. If the object
format gave us more info, we could do this right. */
-diff -Nbaur gdb-6.8/sim/common/sim-signal.c gdb-6.8-psp/sim/common/sim-signal.c
---- gdb-6.8/sim/common/sim-signal.c 2008-01-01 22:53:23.000000000 +0000
-+++ gdb-6.8-psp/sim/common/sim-signal.c 2009-02-11 11:19:19.000000000 +0000
+diff -Nbaur gdb-7.4/sim/common/sim-signal.c gdb-7.4-psp/sim/common/sim-signal.c
+--- gdb-7.4/sim/common/sim-signal.c 2012-01-06 04:54:40.000000000 +0000
++++ gdb-7.4-psp/sim/common/sim-signal.c 2012-02-25 14:11:30.000000000 +0000
@@ -26,7 +26,7 @@
to not think the process has died (so it can be debugged at the point of
failure). */
--#ifdef _MSC_VER
-+#if defined(__MINGW32__) && !defined(__CYGWIN__)
+-#ifdef _WIN32
++#if defined(_WIN32) && !defined(__CYGWIN__)
#ifndef SIGTRAP
#define SIGTRAP 5
#endif
-diff -Nbaur gdb-6.8/sim/common/sim-signal.c.orig gdb-6.8-psp/sim/common/sim-signal.c.orig
---- gdb-6.8/sim/common/sim-signal.c.orig 1970-01-01 01:00:00.000000000 +0100
-+++ gdb-6.8-psp/sim/common/sim-signal.c.orig 2008-01-01 22:53:23.000000000 +0000
-@@ -0,0 +1,134 @@
-+/* Simulator signal support
-+ Copyright (C) 1997, 2007, 2008 Free Software Foundation, Inc.
-+ Contributed by Cygnus Support
-+
-+This file is part of the GNU Simulators.
-+
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3 of the License, or
-+(at your option) any later version.
-+
-+This program 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 General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with this program. If not, see . */
-+
-+#include
-+#include "sim-main.h"
-+
-+/* Convert SIM_SIGFOO to SIGFOO.
-+ What to do when the host doesn't have SIGFOO is handled on a case by case
-+ basis. Generally, in the case of passing a value back to gdb, we want gdb
-+ to not think the process has died (so it can be debugged at the point of
-+ failure). */
-+
-+#ifdef _MSC_VER
-+#ifndef SIGTRAP
-+#define SIGTRAP 5
-+#endif
-+#ifndef SIGBUS
-+#define SIGBUS 10
-+#endif
-+#ifndef SIGQUIT
-+#define SIGQUIT 3
-+#endif
-+#endif
-+
-+int
-+sim_signal_to_host (SIM_DESC sd, SIM_SIGNAL sig)
-+{
-+ switch (sig)
-+ {
-+ case SIM_SIGINT :
-+ return SIGINT;
-+
-+ case SIM_SIGABRT :
-+ return SIGABRT;
-+
-+ case SIM_SIGILL :
-+#ifdef SIGILL
-+ return SIGILL;
-+#else
-+ return SIGSEGV;
-+#endif
-+
-+ case SIM_SIGTRAP :
-+ return SIGTRAP;
-+
-+ case SIM_SIGBUS :
-+#ifdef SIGBUS
-+ return SIGBUS;
-+#else
-+ return SIGSEGV;
-+#endif
-+
-+ case SIM_SIGSEGV :
-+ return SIGSEGV;
-+
-+ case SIM_SIGXCPU :
-+#ifdef SIGXCPU
-+ return SIGXCPU;
-+#endif
-+ break;
-+
-+ case SIM_SIGFPE:
-+#ifdef SIGFPE
-+ return SIGFPE;
-+#endif
-+ break;
-+
-+ case SIM_SIGNONE:
-+ return 0;
-+ break;
-+ }
-+
-+ sim_io_eprintf (sd, "sim_signal_to_host: unknown signal: %d\n", sig);
-+#ifdef SIGHUP
-+ return SIGHUP; /* FIXME: Suggestions? */
-+#else
-+ return 1;
-+#endif
-+}
-+
-+enum target_signal
-+sim_signal_to_target (SIM_DESC sd, SIM_SIGNAL sig)
-+{
-+ switch (sig)
-+ {
-+ case SIM_SIGINT :
-+ return TARGET_SIGNAL_INT;
-+
-+ case SIM_SIGABRT :
-+ return TARGET_SIGNAL_ABRT;
-+
-+ case SIM_SIGILL :
-+ return TARGET_SIGNAL_ILL;
-+
-+ case SIM_SIGTRAP :
-+ return TARGET_SIGNAL_TRAP;
-+
-+ case SIM_SIGBUS :
-+ return TARGET_SIGNAL_BUS;
-+
-+ case SIM_SIGSEGV :
-+ return TARGET_SIGNAL_SEGV;
-+
-+ case SIM_SIGXCPU :
-+ return TARGET_SIGNAL_XCPU;
-+
-+ case SIM_SIGFPE:
-+ return TARGET_SIGNAL_FPE;
-+ break;
-+
-+ case SIM_SIGNONE:
-+ return TARGET_SIGNAL_0;
-+ break;
-+ }
-+
-+ sim_io_eprintf (sd, "sim_signal_to_host: unknown signal: %d\n", sig);
-+ return TARGET_SIGNAL_HUP;
-+}
diff --git a/dkpsp/patches/newlib-1.19.0.patch b/dkpsp/patches/newlib-1.20.0.patch
similarity index 65%
rename from dkpsp/patches/newlib-1.19.0.patch
rename to dkpsp/patches/newlib-1.20.0.patch
index 035ce61..54fc131 100644
--- a/dkpsp/patches/newlib-1.19.0.patch
+++ b/dkpsp/patches/newlib-1.20.0.patch
@@ -1,7 +1,7 @@
-diff -Nbaur newlib-1.19.0/config.sub newlib-1.19.0-psp/config.sub
---- newlib-1.19.0/config.sub 2010-06-01 18:53:40.000000000 +0100
-+++ newlib-1.19.0-psp/config.sub 2011-07-29 14:24:56.000000000 +0100
-@@ -279,6 +279,7 @@
+diff -Nbaur newlib-1.20.0/config.sub newlib-1.20.0-psp/config.sub
+--- newlib-1.20.0/config.sub 2011-11-02 00:56:53.000000000 +0000
++++ newlib-1.20.0-psp/config.sub 2012-02-25 14:10:34.000000000 +0000
+@@ -283,6 +283,7 @@
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
@@ -9,7 +9,7 @@ diff -Nbaur newlib-1.19.0/config.sub newlib-1.19.0-psp/config.sub
| mn10200 | mn10300 \
| moxie \
| mt \
-@@ -375,6 +376,7 @@
+@@ -396,6 +397,7 @@
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
@@ -17,7 +17,7 @@ diff -Nbaur newlib-1.19.0/config.sub newlib-1.19.0-psp/config.sub
| mmix-* \
| mt-* \
| msp430-* \
-@@ -771,6 +773,10 @@
+@@ -795,6 +797,10 @@
basic_machine=m68k-atari
os=-mint
;;
@@ -28,161 +28,134 @@ diff -Nbaur newlib-1.19.0/config.sub newlib-1.19.0-psp/config.sub
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
-diff -Nbaur newlib-1.19.0/configure newlib-1.19.0-psp/configure
---- newlib-1.19.0/configure 2010-12-10 14:50:10.000000000 +0000
-+++ newlib-1.19.0-psp/configure 2011-07-29 14:24:56.000000000 +0100
-@@ -3529,6 +3529,9 @@
+diff -Nbaur newlib-1.20.0/configure newlib-1.20.0-psp/configure
+--- newlib-1.20.0/configure 2011-12-18 10:20:51.000000000 +0000
++++ newlib-1.20.0-psp/configure 2012-02-25 14:10:35.000000000 +0000
+@@ -3598,6 +3598,9 @@
+ ;;
mips*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ mipsallegrex*-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
mips*-*-*)
- noconfigdirs="$noconfigdirs gprof ${libgcj}"
- libgloss_dir=mips
-diff -Nbaur newlib-1.19.0/configure.ac newlib-1.19.0-psp/configure.ac
---- newlib-1.19.0/configure.ac 2010-12-10 14:50:10.000000000 +0000
-+++ newlib-1.19.0-psp/configure.ac 2011-07-29 14:24:56.000000000 +0100
-@@ -980,6 +980,9 @@
+ noconfigdirs="$noconfigdirs gprof"
+ ;;
+diff -Nbaur newlib-1.20.0/configure.ac newlib-1.20.0-psp/configure.ac
+--- newlib-1.20.0/configure.ac 2011-11-09 18:57:28.000000000 +0000
++++ newlib-1.20.0-psp/configure.ac 2012-02-25 14:10:35.000000000 +0000
+@@ -1024,6 +1024,9 @@
+ ;;
mips*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ mipsallegrex*-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
mips*-*-*)
- noconfigdirs="$noconfigdirs gprof ${libgcj}"
- libgloss_dir=mips
-diff -Nbaur newlib-1.19.0/newlib/Makefile.am newlib-1.19.0-psp/newlib/Makefile.am
---- newlib-1.19.0/newlib/Makefile.am 2010-12-16 21:58:38.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/Makefile.am 2011-07-29 14:24:56.000000000 +0100
+ noconfigdirs="$noconfigdirs gprof"
+ ;;
+diff -Nbaur newlib-1.20.0/newlib/Makefile.am newlib-1.20.0-psp/newlib/Makefile.am
+--- newlib-1.20.0/newlib/Makefile.am 2011-05-19 07:04:59.000000000 +0100
++++ newlib-1.20.0-psp/newlib/Makefile.am 2012-02-25 14:10:35.000000000 +0000
@@ -283,6 +283,18 @@
for i in $(srcdir)/libc/include/rpc/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
+ for i in $(srcdir)/libc/sys/$(sys_dir)/netinet/*.h; do \
-+ if [ -f $$i ]; then \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
-+ else true; fi ; \
++ if [ -f $$i ]; then \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
++ else true; fi ; \
+ done ; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
+ for i in $(srcdir)/libc/sys/$(sys_dir)/arpa/*.h; do \
-+ if [ -f $$i ]; then \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
-+ else true; fi ; \
++ if [ -f $$i ]; then \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
++ else true; fi ; \
+ done ; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
for i in $(srcdir)/libc/include/sys/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
-diff -Nbaur newlib-1.19.0/newlib/Makefile.in newlib-1.19.0-psp/newlib/Makefile.in
---- newlib-1.19.0/newlib/Makefile.in 2010-12-16 21:58:38.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/Makefile.in 2011-07-29 14:24:56.000000000 +0100
-@@ -989,6 +989,18 @@
+diff -Nbaur newlib-1.20.0/newlib/Makefile.in newlib-1.20.0-psp/newlib/Makefile.in
+--- newlib-1.20.0/newlib/Makefile.in 2011-05-19 07:04:59.000000000 +0100
++++ newlib-1.20.0-psp/newlib/Makefile.in 2012-02-25 14:10:35.000000000 +0000
+@@ -990,6 +990,18 @@
for i in $(srcdir)/libc/include/rpc/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
+ for i in $(srcdir)/libc/sys/$(sys_dir)/netinet/*.h; do \
-+ if [ -f $$i ]; then \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
-+ else true; fi ; \
++ if [ -f $$i ]; then \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
++ else true; fi ; \
+ done ; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
+ for i in $(srcdir)/libc/sys/$(sys_dir)/arpa/*.h; do \
-+ if [ -f $$i ]; then \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
-+ else true; fi ; \
++ if [ -f $$i ]; then \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
++ else true; fi ; \
+ done ; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/sys; \
for i in $(srcdir)/libc/include/sys/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/sys/`basename $$i`; \
-diff -Nbaur newlib-1.19.0/newlib/configure.host newlib-1.19.0-psp/newlib/configure.host
---- newlib-1.19.0/newlib/configure.host 2010-12-02 19:30:46.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/configure.host 2011-07-29 14:24:56.000000000 +0100
-@@ -704,7 +704,14 @@
+diff -Nbaur newlib-1.20.0/newlib/configure.host newlib-1.20.0-psp/newlib/configure.host
+--- newlib-1.20.0/newlib/configure.host 2011-11-29 06:33:48.000000000 +0000
++++ newlib-1.20.0-psp/newlib/configure.host 2012-02-25 14:10:35.000000000 +0000
+@@ -535,7 +535,7 @@
+ default_newlib_io_long_long="yes"
+ default_newlib_io_c99_formats="yes"
+ newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
+- newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
++ newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -DHAVE_RENAME"
+ # turn off unsupported items in posix directory
+ newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN"
;;
+@@ -665,6 +665,12 @@
+ default_newlib_io_long_long="yes"
+ newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
+ ;;
++ mipsallegrex*-psp-*)
++ default_newlib_io_long_long="yes"
++ sys_dir=psp
++ syscall_dir=syscalls
++ newlib_cflags="${newlib_cflags} -G0 -mno-explicit-relocs -DCOMPACT_CTYPE -DCLOCK_PROVIDED -DHAVE_FCNTL -DHAVE_RENAME -DMALLOC_ALIGNMENT=16 -I${prefix}/psp/sdk/include"
++ ;;
mips*-*-elf*)
default_newlib_io_long_long="yes"
-- newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
-+ case "${host}" in
-+ mipsallegrex*-psp-*)
-+ sys_dir=psp
-+ syscall_dir=syscalls
-+ newlib_cflags="${newlib_cflags} -G0 -mno-explicit-relocs -DCOMPACT_CTYPE -DCLOCK_PROVIDED -DHAVE_FCNTL -DHAVE_RENAME -DMALLOC_ALIGNMENT=16 -I${prefix}/psp/sdk/include" ;;
-+ *)
-+ newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES" ;;
-+ esac
- ;;
- mmix-*)
- syscall_dir=syscalls
-diff -Nbaur newlib-1.19.0/newlib/libc/include/machine/fastmath.h newlib-1.19.0-psp/newlib/libc/include/machine/fastmath.h
---- newlib-1.19.0/newlib/libc/include/machine/fastmath.h 2000-02-17 19:39:46.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/include/machine/fastmath.h 2011-07-29 14:24:56.000000000 +0100
-@@ -98,3 +98,33 @@
- /* Override the functions defined in math.h */
- #endif /* __sysvnecv70_target */
-
-+#ifdef __psp__
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+float _EXFUN(fast_sinf,(float));
-+float _EXFUN(fast_cosf,(float));
-+
-+float _EXFUN(fast_asinf,(float));
-+float _EXFUN(fast_acosf,(float));
-+float _EXFUN(fast_atanf,(float));
-+
-+float _EXFUN(fast_absf,(float));
-+float _EXFUN(fast_sqrtf,(float));
-+float _EXFUN(fast_expef,(float));
-+float _EXFUN(fast_logef,(float));
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#define sinf(x) fast_sinf(x)
-+#define cosf(x) fast_cosf(x)
-+#define asinf(x) fast_asinf(x)
-+#define acosf(x) fast_acosf(x)
-+#define atanf(x) fast_atanf(x)
-+#define absf(x) fast_absf(x)
-+#define sqrtf(x) fast_sqrtf(x)
-+#define expef(x) fast_expef(x)
-+#define logef(x) fast_logef(x)
-+/* Override the functions defined in math.h */
-+#endif /* __psp__ */
-diff -Nbaur newlib-1.19.0/newlib/libc/include/machine/time.h newlib-1.19.0-psp/newlib/libc/include/machine/time.h
---- newlib-1.19.0/newlib/libc/include/machine/time.h 2009-04-06 23:04:33.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/include/machine/time.h 2011-07-29 14:24:56.000000000 +0100
-@@ -14,6 +14,10 @@
- int nanosleep (const struct timespec *, struct timespec *);
+ newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
+diff -Nbaur newlib-1.20.0/newlib/libc/include/machine/time.h newlib-1.20.0-psp/newlib/libc/include/machine/time.h
+--- newlib-1.20.0/newlib/libc/include/machine/time.h 2009-04-06 23:04:33.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/include/machine/time.h 2012-02-25 14:10:35.000000000 +0000
+@@ -9,6 +9,10 @@
#endif
+ #endif /* !__rtems__ */
+#if defined(__psp__)
+#define _CLOCKS_PER_SEC_ 1000000
+#endif
+
- #endif /* _MACHTIME_H_ */
+ #ifdef __SPU__
+ #include
+ int nanosleep (const struct timespec *, struct timespec *);
+diff -Nbaur newlib-1.20.0/newlib/libc/include/stdint.h newlib-1.20.0-psp/newlib/libc/include/stdint.h
+--- newlib-1.20.0/newlib/libc/include/stdint.h 2009-04-24 22:55:07.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/include/stdint.h 2012-02-25 14:10:35.000000000 +0000
+@@ -30,11 +30,9 @@
+ #define __have_longlong64 1
+ #endif
-
-diff -Nbaur newlib-1.19.0/newlib/libc/include/stdint.h newlib-1.19.0-psp/newlib/libc/include/stdint.h
---- newlib-1.19.0/newlib/libc/include/stdint.h 2009-04-24 22:55:07.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/include/stdint.h 2011-07-29 14:24:56.000000000 +0100
-@@ -33,7 +33,7 @@
- /* Check if "long" is 64bit or 32bit wide */
+-/* Check if "long" is 64bit or 32bit wide */
++/* Check if "long" is 64bit */
#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
#define __have_long64 1
-#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
-+#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) && !defined(__psp__)
- #define __have_long32 1
+-#define __have_long32 1
#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/config.h newlib-1.19.0-psp/newlib/libc/include/sys/config.h
---- newlib-1.19.0/newlib/libc/include/sys/config.h 2010-12-02 19:30:46.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/include/sys/config.h 2011-07-29 14:24:57.000000000 +0100
+ #if __STDINT_EXP(SCHAR_MAX) == 0x7f
+diff -Nbaur newlib-1.20.0/newlib/libc/include/sys/config.h newlib-1.20.0-psp/newlib/libc/include/sys/config.h
+--- newlib-1.20.0/newlib/libc/include/sys/config.h 2010-12-02 19:30:46.000000000 +0000
++++ newlib-1.20.0-psp/newlib/libc/include/sys/config.h 2012-02-25 14:10:35.000000000 +0000
@@ -130,6 +130,12 @@
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
#endif
@@ -196,10 +169,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/config.h newlib-1.19.0-psp/new
#ifdef __xstormy16__
#define __SMALL_BITFIELDS
#undef INT_MAX
-diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/types.h newlib-1.19.0-psp/newlib/libc/include/sys/types.h
---- newlib-1.19.0/newlib/libc/include/sys/types.h 2010-12-08 14:44:06.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/include/sys/types.h 2011-07-29 14:24:57.000000000 +0100
-@@ -199,6 +199,7 @@
+diff -Nbaur newlib-1.20.0/newlib/libc/include/sys/types.h newlib-1.20.0-psp/newlib/libc/include/sys/types.h
+--- newlib-1.20.0/newlib/libc/include/sys/types.h 2011-08-01 18:22:18.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/include/sys/types.h 2012-02-25 14:10:35.000000000 +0000
+@@ -200,6 +200,7 @@
typedef unsigned short nlink_t;
@@ -207,7 +180,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/types.h newlib-1.19.0-psp/newl
/* We don't define fd_set and friends if we are compiling POSIX
source, or if we have included (or may include as indicated
by __USE_W32_SOCKETS) the W32api winsock[2].h header which
-@@ -244,6 +245,7 @@
+@@ -245,6 +246,7 @@
}))
# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) */
@@ -215,412 +188,48 @@ diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/types.h newlib-1.19.0-psp/newl
#undef __MS_types__
#undef _ST_INT32
-diff -Nbaur newlib-1.19.0/newlib/libc/include/sys/unistd.h newlib-1.19.0-psp/newlib/libc/include/sys/unistd.h
---- newlib-1.19.0/newlib/libc/include/sys/unistd.h 2010-10-08 16:28:49.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/include/sys/unistd.h 2011-07-29 14:24:57.000000000 +0100
-@@ -238,11 +238,15 @@
+diff -Nbaur newlib-1.20.0/newlib/libc/include/sys/unistd.h newlib-1.20.0-psp/newlib/libc/include/sys/unistd.h
+--- newlib-1.20.0/newlib/libc/include/sys/unistd.h 2011-08-19 15:29:34.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/include/sys/unistd.h 2012-02-25 14:10:35.000000000 +0000
+@@ -241,6 +241,7 @@
void _EXFUN(sync, (void));
#endif
+#if !defined(__psp__)
ssize_t _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
-+#endif
#if defined(__CYGWIN__)
ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__path, char *__buf, size_t __buflen));
- #endif
-+#if !defined(__psp__)
- int _EXFUN(symlink, (const char *__name1, const char *__name2));
-+#endif
- #if defined(__CYGWIN__)
+@@ -250,6 +251,7 @@
int _EXFUN(symlinkat, (const char *, int, const char *));
int _EXFUN(unlinkat, (int, const char *, int));
-diff -Nbaur newlib-1.19.0/newlib/libc/include/time.h newlib-1.19.0-psp/newlib/libc/include/time.h
---- newlib-1.19.0/newlib/libc/include/time.h 2008-10-16 22:53:58.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/include/time.h 2011-07-29 14:24:57.000000000 +0100
-@@ -175,6 +175,17 @@
#endif
- #endif /* _POSIX_TIMERS */
-
-+#if defined(__psp__)
-+#ifdef __cplusplus
-+extern "C" {
+#endif
-+int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp));
-+#ifdef __cplusplus
-+}
-+#endif
-+#endif /* __psp__ */
-+
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-diff -Nbaur newlib-1.19.0/newlib/libc/machine/mips/Makefile.am newlib-1.19.0-psp/newlib/libc/machine/mips/Makefile.am
---- newlib-1.19.0/newlib/libc/machine/mips/Makefile.am 2007-05-24 18:33:35.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/machine/mips/Makefile.am 2011-07-29 14:24:57.000000000 +0100
-@@ -8,7 +8,7 @@
- noinst_LIBRARIES = lib.a
-
--lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.c memcpy.c
-+lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.c memcpy.c fastmath.c
- lib_a_CCASFLAGS=$(AM_CCASFLAGS)
- lib_a_CFLAGS=$(AM_CFLAGS)
-
-diff -Nbaur newlib-1.19.0/newlib/libc/machine/mips/Makefile.in newlib-1.19.0-psp/newlib/libc/machine/mips/Makefile.in
---- newlib-1.19.0/newlib/libc/machine/mips/Makefile.in 2010-12-16 21:58:50.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/machine/mips/Makefile.in 2011-07-29 14:24:57.000000000 +0100
-@@ -54,7 +54,8 @@
- lib_a_LIBADD =
- am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
- lib_a-strcmp.$(OBJEXT) lib_a-strncpy.$(OBJEXT) \
-- lib_a-memset.$(OBJEXT) lib_a-memcpy.$(OBJEXT)
-+ lib_a-memset.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \
-+ lib_a-fastmath.$(OBJEXT)
- lib_a_OBJECTS = $(am_lib_a_OBJECTS)
- DEFAULT_INCLUDES = -I.@am__isrc@
- depcomp =
-@@ -174,7 +175,7 @@
- INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
- AM_CCASFLAGS = $(INCLUDES)
- noinst_LIBRARIES = lib.a
--lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.c memcpy.c
-+lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.c memcpy.c fastmath.c
- lib_a_CCASFLAGS = $(AM_CCASFLAGS)
- lib_a_CFLAGS = $(AM_CFLAGS)
- ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
-@@ -279,6 +280,12 @@
- lib_a-memcpy.obj: memcpy.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.c'; then $(CYGPATH_W) 'memcpy.c'; else $(CYGPATH_W) '$(srcdir)/memcpy.c'; fi`
-
-+lib_a-fastmath.o: fastmath.c
-+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fastmath.o `test -f 'fastmath.c' || echo '$(srcdir)/'`fastmath.c
-+
-+lib_a-fastmath.obj: fastmath.c
-+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fastmath.obj `if test -f 'fastmath.c'; then $(CYGPATH_W) 'fastmath.c'; else $(CYGPATH_W) '$(srcdir)/fastmath.c'; fi`
-+
- ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
-diff -Nbaur newlib-1.19.0/newlib/libc/machine/mips/fastmath.c newlib-1.19.0-psp/newlib/libc/machine/mips/fastmath.c
---- newlib-1.19.0/newlib/libc/machine/mips/fastmath.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/machine/mips/fastmath.c 2011-07-29 14:24:57.000000000 +0100
-@@ -0,0 +1,277 @@
-+#include
-+
-+#define PSP_MATH_PI 3.14159265358979323846
-+#define PSP_MATH_TWOPI (PSP_MATH_PI * 2.0)
-+#define PSP_MATH_SQRT2 1.41421356237309504880
-+#define PSP_MATH_LN2 0.69314718055994530942
-+#define PSP_MATH_LOG2E 1.4426950408889634074
-+#define COS_SIN_DIV 0.208
-+
-+static const float logPoly[] = {
-+ 4194305.0 / (1024.0 * 1024.0 * 2.0), /* arround 2.0 */
-+ 5590817.0 / (1024.0 * 1024.0 * 8.0), /* arround 2.0/3.0 */
-+ 13890687.0 / (1024.0 * 1024.0 * 32.0), /* arround 2.0/5.0 */
-+};
-+
-+static const float triPoly[] = {
-+ (float)(2.0*PSP_MATH_PI),
-+ (float)(1.0),
-+ (float)(-0xAAAA98/(1024.0*1024*64)),
-+ (float)( 0x88801C/(1024.0*1024*1024)),
-+ (float)(-0xCB9F27/(1024.0*1024*1024*64)),
-+
-+ (float)(-0xFFFFF9/(1024.0*1024*32)),
-+ (float)( 0xAAA6FB/(1024.0*1024*256)),
-+ (float)(-0xB3D431/(1024.0*1024*1024*8)),
-+
-+ (float)(-0xAAAAAA/(1024.0*1024*32)),
-+ (float)( 0xCCCCCD/(1024.0*1024*64)),
-+ (float)(-0x8F5C29/(1024.0*1024*64)),
-+};
-+
-+static float _pspFpuSinMain(float x)
-+{
-+ float y = x*x;
-+ return x * (((triPoly[4] * y
-+ + triPoly[3]) * y
-+ + triPoly[2]) * y
-+ + triPoly[1]);
-+}
-+
-+static float _pspFpuCosMain(float x)
-+{
-+ float y = x*x;
-+ return ((triPoly[7] * y
-+ + triPoly[6]) * y
-+ + triPoly[5]) * y
-+ + triPoly[1];
-+}
-+
-+static float _pspFpuAtanMain(float x)
-+{
-+ float y = x*x;
-+ return x * (((triPoly[10] * y
-+ + triPoly[9]) * y
-+ + triPoly[8]) * y
-+ + triPoly[1]);
-+}
-+
-+static float _atanf(float x)
-+{
-+ if (x < 0.19890f) {
-+ return _pspFpuAtanMain(x);
-+ }
-+ if (x < 0.668106f) {
-+ return (float)(PSP_MATH_PI / 8)
-+ + _pspFpuAtanMain((x - (float)(PSP_MATH_SQRT2 - 1)) / (1.0f + ((float)(PSP_MATH_SQRT2 - 1)*x)));
-+ }
-+ return ((float)PSP_MATH_PI / 4) + _pspFpuAtanMain((x - 1.0f) / (x + 1.0f));
-+}
-+
-+float fast_absf(float fs)
-+{
-+ register float fd;
-+ asm (
-+ "abs.s %0, %1\n"
-+ : "=f"(fd)
-+ : "f"(fs)
-+ );
-+ return (fd);
-+}
-+
-+float fast_sinf(float x)
-+{
-+ float pi2;
-+ int sign = 1;
-+
-+ /* NaN */
-+ if (x != x) {
-+ return x;
-+ }
-+
-+ pi2 = triPoly[0];
-+ if (x < 0.0f) {
-+ sign = -1;
-+ x = -x;
-+ }
-+
-+ if (x > pi2) {
-+ float y = x / pi2;
-+ x -= (float)((int)y) * pi2;
-+ }
-+
-+ pi2 *= 0.5f;
-+ if (x > pi2) {
-+ x -= pi2;
-+ sign = -sign;
-+ }
-+
-+ if (x > pi2*0.5f) {
-+ x = pi2 - x;
-+ }
-+ if (x > (float)(PSP_MATH_PI * (0.5 - COS_SIN_DIV))) {
-+ return _pspFpuCosMain(pi2*0.5f - x) * sign;
-+ }
-+
-+ return _pspFpuSinMain(x) * sign;
-+}
-+
-+float fast_cosf(float x)
-+{
-+ float pi2;
-+ int sign = 1;
-+
-+ /* NaN */
-+ if (x != x) {
-+ return x;
-+ }
-+
-+ pi2 = triPoly[0];
-+ if (x < 0.0f) {
-+ x = -x;
-+ }
-+
-+ if (x > pi2) {
-+ float y = x / pi2;
-+ x -= (float)((int)y) * pi2;
-+ }
-+
-+ pi2 *= 0.5f; // pi2 = PI
-+ if (x > pi2) {
-+ x -= pi2;
-+ sign = -1;
-+ }
-+
-+ if (x > pi2*0.5f) {
-+ sign = -sign;
-+ x = pi2 - x;
-+ }
-+ if (x > (float) (PSP_MATH_PI * COS_SIN_DIV)) {
-+ return _pspFpuSinMain(pi2*0.5f - x) * sign;
-+ }
-+
-+ return _pspFpuCosMain(x) * sign;
-+}
-+
-+float fast_atanf(float x)
-+{
-+ int sign = 1;
-+
-+ /* NaN */
-+ if (x != x) {
-+ return x;
-+ }
-+
-+ if (x < 0.0f) {
-+ x = -x;
-+ sign = -1;
-+ }
-+ if (x >= 1.0f) {
-+ /*J atan(x) = pi/2 - atan(1/x) */
-+ x = 1.0f / x;
-+ x = ((float)(PSP_MATH_PI / 2)) - _atanf(x);
-+ } else {
-+ x = _atanf(x);
-+ }
-+ return x * (float)sign;
-+}
-+
-+float fast_asinf(float x)
-+{
-+ x = x*x;
-+ return fast_atanf(__builtin_allegrex_sqrt_s(x/(1.0f-x)));
-+}
-+
-+float fast_acosf(float x)
-+{
-+ x = x*x;
-+ return fast_atanf(__builtin_allegrex_sqrt_s((1.0f-x)/x));
-+}
-+
-+float fast_sqrtf(float fs)
-+{
-+ return (__builtin_allegrex_sqrt_s(fs));
-+}
-+
-+float fast_logef(float x)
-+{
-+ union {
-+ float f;
-+ int i;
-+ } fi;
-+ int a, b, exponent;
-+ float y, z;
-+ fi.f = x;
-+ if (fi.i <= 0) {
-+ if ((fi.i & 0x7fffffff) == 0) {
-+ fi.i = 0xff800000; /* -INF */
-+ return fi.f;
-+ }
-+ fi.i = 0xff80ffff; /* Quiet NaN */
-+ return fi.f;
-+ }
-+
-+ b = (fi.i & 0x007fffff);
-+ a = b - (1<<23);
-+ exponent = fi.i;
-+ if (b <= 0x3504F3) {
-+ a = b;
-+ b = b - (1 << 23);
-+ exponent -= (1<<23);
-+ }
-+ b = b - (1 << 23) + (1<<25);
-+
-+ x = (float)(a) / (float)(b);
-+ z = (((exponent>>23)-126) * 0xB17218) * (float)(1.0/(1<<24));
-+ y = x * x;
-+ return z + x * (((logPoly[2] * y + logPoly[1]) * y) + logPoly[0]);
-+}
-+
-+float fast_expef(float x)
-+{
-+ /*
-+ * exp(x)=e^x=e^(y * log2)=2^Y
-+ * =2^z * 2^y
-+ * =2^z * (2^(y/2))^2
-+ * =2^z * (e^(f/2))^2
-+ * =2^z * (e^(f/4))^4
-+ * where y=x/log 2
-+ * z=nearest(y) , -0.5 <= f=y-z < 0.5
-+ */
-+ union {
-+ float f;
-+ int i;
-+ } fi;
-+ float z, f;
-+
-+ fi.f = x;
-+ fi.i &= 0x7fffffff;
-+ if (fi.i >= 0x42b00f34) {/* arround 88.03 */
-+ /* overflow */
-+ if (x != x) {
-+ return x; /* NaN */
-+ }
-+ if (fi.i < 0) {
-+ return 0.0; /* underflow */
-+ }
-+ fi.i = 0x7f800000;
-+ return fi.f; /* +INF */
-+ }
-+
-+ f = fi.f * (float)PSP_MATH_LOG2E;
-+
-+ z = __builtin_allegrex_round_w_s(f);
-+ f = f-z;
-+ fi.i = z;
-+ if (x < 0)
-+ fi.i = -fi.i;
-+ fi.i = (fi.i+127) << 23;
-+
-+ /* use Pade aprox. */
-+ f = (6.0f + (float)(4.0*PSP_MATH_LN2 * 0.25)*f
-+ + (float)(0.9996*PSP_MATH_LN2*0.25*PSP_MATH_LN2*0.25)*f*f)
-+ / (6.0f - (float)(2.0*PSP_MATH_LN2 * 0.25)*f);
-+ f *= f;
-+ fi.f *= f*f;
-+ return fi.f;
-+}
-diff -Nbaur newlib-1.19.0/newlib/libc/machine/mips/strlen.c newlib-1.19.0-psp/newlib/libc/machine/mips/strlen.c
---- newlib-1.19.0/newlib/libc/machine/mips/strlen.c 2002-03-14 02:41:43.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/machine/mips/strlen.c 2011-07-29 14:24:57.000000000 +0100
-@@ -20,7 +20,7 @@
-
- /* MIPS16 needs to come first. */
-
--#if defined(__mips16)
-+#if defined(__mips16) || defined(__psp__)
- size_t
- strlen (const char *str)
- {
-diff -Nbaur newlib-1.19.0/newlib/libc/stdlib/strtod.c newlib-1.19.0-psp/newlib/libc/stdlib/strtod.c
---- newlib-1.19.0/newlib/libc/stdlib/strtod.c 2010-12-07 21:26:45.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/stdlib/strtod.c 2011-07-29 14:24:57.000000000 +0100
-@@ -1181,6 +1181,7 @@
- return _strtod_r (_REENT, s00, se);
- }
-
-+__attribute__((weak))
- float
- _DEFUN (strtof, (s00, se),
- _CONST char *s00 _AND
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/configure newlib-1.19.0-psp/newlib/libc/sys/configure
---- newlib-1.19.0/newlib/libc/sys/configure 2010-12-16 21:59:03.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/sys/configure 2011-07-29 14:24:57.000000000 +0100
-@@ -11796,6 +11796,8 @@
+ #define F_OK 0
+ #define R_OK 4
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/configure newlib-1.20.0-psp/newlib/libc/sys/configure
+--- newlib-1.20.0/newlib/libc/sys/configure 2011-12-19 22:03:37.000000000 +0000
++++ newlib-1.20.0-psp/newlib/libc/sys/configure 2012-02-25 14:10:35.000000000 +0000
+@@ -796,6 +796,7 @@
+ mmixware
+ netware
+ rdos
++psp
+ rtems
+ sh
+ sparc64
+@@ -11808,6 +11809,8 @@
;;
- netware) subdirs="$subdirs netware"
+ rdos) subdirs="$subdirs rdos"
;;
+ psp) subdirs="$subdirs psp"
+ ;;
- rdos) subdirs="$subdirs rdos"
- ;;
rtems) subdirs="$subdirs rtems"
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/configure.in newlib-1.19.0-psp/newlib/libc/sys/configure.in
---- newlib-1.19.0/newlib/libc/sys/configure.in 2010-02-24 20:59:55.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libc/sys/configure.in 2011-07-29 14:24:57.000000000 +0100
+ ;;
+ sh) subdirs="$subdirs sh"
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/configure.in newlib-1.20.0-psp/newlib/libc/sys/configure.in
+--- newlib-1.20.0/newlib/libc/sys/configure.in 2010-02-24 20:59:55.000000000 +0000
++++ newlib-1.20.0-psp/newlib/libc/sys/configure.in 2012-02-25 14:10:35.000000000 +0000
@@ -34,6 +34,7 @@
mmixware) AC_CONFIG_SUBDIRS(mmixware) ;;
netware) AC_CONFIG_SUBDIRS(netware) ;;
@@ -629,9 +238,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/configure.in newlib-1.19.0-psp/newlib/
rtems) AC_CONFIG_SUBDIRS(rtems) ;;
sh) AC_CONFIG_SUBDIRS(sh) ;;
sparc64) AC_CONFIG_SUBDIRS(sparc64) ;;
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.am newlib-1.19.0-psp/newlib/libc/sys/psp/Makefile.am
---- newlib-1.19.0/newlib/libc/sys/psp/Makefile.am 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/Makefile.am 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/Makefile.am newlib-1.20.0-psp/newlib/libc/sys/psp/Makefile.am
+--- newlib-1.20.0/newlib/libc/sys/psp/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/Makefile.am 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,71 @@
+## Process this file with automake to generate Makefile.in
+
@@ -643,11 +252,11 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.am newlib-1.19.0-psp/newl
+
+noinst_LIBRARIES = lib.a
+
-+LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o \
-+ _gettimeofday.o _kill.o _lseek.o _open.o _read.o \
-+ _sbrk.o _wait.o _write.o clock.o isatty.o time.o \
-+ _link.o _unlink.o sleep.o opendir.o readdir.o \
-+ closedir.o getcwd.o chdir.o mkdir.o rmdir.o \
++LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o \
++ _gettimeofday.o _kill.o _lseek.o _open.o _read.o \
++ _sbrk.o _wait.o _write.o clock.o isatty.o _isatty.o \
++ time.o_link.o _unlink.o sleep.o opendir.o readdir.o \
++ closedir.o getcwd.o chdir.o mkdir.o rmdir.o \
+ realpath.o _stat.o truncate.o access.o tzset.o \
+ __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
+
@@ -704,15 +313,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.am newlib-1.19.0-psp/newl
+
+ACLOCAL_AMFLAGS = -I ../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newlib/libc/sys/psp/Makefile.in
---- newlib-1.19.0/newlib/libc/sys/psp/Makefile.in 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/Makefile.in 2011-07-29 14:24:57.000000000 +0100
-@@ -0,0 +1,464 @@
-+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/Makefile.in newlib-1.20.0-psp/newlib/libc/sys/psp/Makefile.in
+--- newlib-1.20.0/newlib/libc/sys/psp/Makefile.in 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/Makefile.in 2012-02-25 14:10:35.000000000 +0000
+@@ -0,0 +1,468 @@
++# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-+# 2003, 2004, 2005 Free Software Foundation, Inc.
++# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
++# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
@@ -724,15 +334,12 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+
+@SET_MAKE@
+
-+srcdir = @srcdir@
-+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
-+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-+top_builddir = .
++pkglibdir = $(libdir)/@PACKAGE@
++pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
@@ -746,53 +353,36 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
-+DIST_COMMON = $(srcdir)/../../../../config.guess \
-+ $(srcdir)/../../../../config.sub README $(srcdir)/Makefile.in \
-+ $(srcdir)/Makefile.am $(top_srcdir)/configure \
-+ $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
+subdir = .
++DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
++ $(top_srcdir)/configure $(am__configure_deps) \
++ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
-+ configure.lineno configure.status.lineno
++ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
++CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
-+am__DEPENDENCIES_1 = _close.o _exit.o _fork.o _fstat.o _getpid.o \
-+ _gettimeofday.o _kill.o _lseek.o _open.o _read.o _sbrk.o \
-+ _wait.o _write.o clock.o isatty.o time.o _link.o _unlink.o \
-+ sleep.o opendir.o readdir.o closedir.o getcwd.o chdir.o \
-+ mkdir.o rmdir.o realpath.o _stat.o truncate.o access.o tzset.o \
-+ __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
-+am__DEPENDENCIES_2 = socket.o accept.o bind.o connect.o getsockopt.o \
-+ listen.o recv.o recvfrom.o send.o sendto.o setsockopt.o \
-+ shutdown.o getsockname.o getpeername.o inet_ntoa.o
-+am__DEPENDENCIES_3 = vxprintf.o _xprintf.o __sout.o vsnprintf.o \
-+ snprintf.o vsprintf.o sprintf.o __mout.o mprintf.o vmprintf.o \
-+ asprintf.o vasprintf.o __fout.o fprintf.o vfprintf.o printf.o \
-+ vprintf.o _sprintf_r.o
-+am__DEPENDENCIES_4 = h_errno.o gethostbyaddr.o gethostbyname.o
-+am__DEPENDENCIES_5 = fdman.o
-+am__DEPENDENCIES_6 = select.o
-+am__DEPENDENCIES_7 = interrupt.o
-+lib_a_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
-+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \
-+ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) \
-+ $(am__DEPENDENCIES_7)
++lib_a_DEPENDENCIES = $(LIBCGLUE_MULT_OBJS) $(SOCKET_MULT_OBJS) \
++ $(XPRINTF_MULT_OBJS) $(NETDB_MULT_OBJS) $(FDMAN_OBJS) \
++ $(SELECT_OBJS) $(INTERRUPT_OBJS)
+am_lib_a_OBJECTS = libcglue.$(OBJEXT) socket.$(OBJEXT) \
+ pspcwd.$(OBJEXT) xprintf.$(OBJEXT) netdb.$(OBJEXT) \
+ pipe.$(OBJEXT) fdman.$(OBJEXT) select.$(OBJEXT) \
+ syscalls.$(OBJEXT) interrupt.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
-+DEFAULT_INCLUDES = -I. -I$(srcdir)
++DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
-+CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
++CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
@@ -801,8 +391,6 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
-+AMDEP_FALSE = @AMDEP_FALSE@
-+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
@@ -820,16 +408,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
-+ELIX_LEVEL_0_FALSE = @ELIX_LEVEL_0_FALSE@
-+ELIX_LEVEL_0_TRUE = @ELIX_LEVEL_0_TRUE@
-+ELIX_LEVEL_1_FALSE = @ELIX_LEVEL_1_FALSE@
-+ELIX_LEVEL_1_TRUE = @ELIX_LEVEL_1_TRUE@
-+ELIX_LEVEL_2_FALSE = @ELIX_LEVEL_2_FALSE@
-+ELIX_LEVEL_2_TRUE = @ELIX_LEVEL_2_TRUE@
-+ELIX_LEVEL_3_FALSE = @ELIX_LEVEL_3_FALSE@
-+ELIX_LEVEL_3_TRUE = @ELIX_LEVEL_3_TRUE@
-+ELIX_LEVEL_4_FALSE = @ELIX_LEVEL_4_FALSE@
-+ELIX_LEVEL_4_TRUE = @ELIX_LEVEL_4_TRUE@
++INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -839,18 +418,17 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
-+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
-+MAY_SUPPLY_SYSCALLS_FALSE = @MAY_SUPPLY_SYSCALLS_FALSE@
-+MAY_SUPPLY_SYSCALLS_TRUE = @MAY_SUPPLY_SYSCALLS_TRUE@
++MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
++NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
@@ -858,12 +436,12 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
-+USE_LIBTOOL_FALSE = @USE_LIBTOOL_FALSE@
-+USE_LIBTOOL_TRUE = @USE_LIBTOOL_TRUE@
+VERSION = @VERSION@
++abs_builddir = @abs_builddir@
++abs_srcdir = @abs_srcdir@
++abs_top_builddir = @abs_top_builddir@
++abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
-+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
@@ -875,6 +453,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
++builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
@@ -907,18 +486,22 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
++srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
++top_build_prefix = @top_build_prefix@
++top_builddir = @top_builddir@
++top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CCASFLAGS = $(INCLUDES) $(CFLAGS)
+noinst_LIBRARIES = lib.a
-+LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o \
-+ _gettimeofday.o _kill.o _lseek.o _open.o _read.o \
-+ _sbrk.o _wait.o _write.o clock.o isatty.o time.o \
-+ _link.o _unlink.o sleep.o opendir.o readdir.o \
-+ closedir.o getcwd.o chdir.o mkdir.o rmdir.o \
++LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o \
++ _gettimeofday.o _kill.o _lseek.o _open.o _read.o \
++ _sbrk.o _wait.o _write.o clock.o isatty.o _isatty.o \
++ time.o_link.o _unlink.o sleep.o opendir.o readdir.o \
++ closedir.o getcwd.o chdir.o mkdir.o rmdir.o \
+ realpath.o _stat.o truncate.o access.o tzset.o \
+ __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
+
@@ -953,15 +536,15 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
-+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
-+ cd $(srcdir) && $(AUTOMAKE) --cygnus \
++ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
++ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
-+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
-+ cd $(top_srcdir) && \
-+ $(AUTOMAKE) --cygnus Makefile
++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
++ $(am__cd) $(top_srcdir) && \
++ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
@@ -977,9 +560,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-+ cd $(srcdir) && $(AUTOCONF)
++ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
++ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
++$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -995,62 +579,65 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+ -rm -f *.tab.c
+
+.S.o:
-+ $(CCASCOMPILE) -c $<
++ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
-+ $(CCASCOMPILE) -c `$(CYGPATH_W) '$<'`
++ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
-+ $(AWK) ' { files[$$0] = 1; } \
-+ END { for (i in files) print i; }'`; \
++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
-+ tags=; \
++ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
-+ $(AWK) ' { files[$$0] = 1; } \
-+ END { for (i in files) print i; }'`; \
-+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++ END { if (nonempty) { for (i in files) print i; }; }'`; \
++ shift; \
++ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
-+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-+ $$tags $$unique; \
++ if test $$# -gt 0; then \
++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++ "$$@" $$unique; \
++ else \
++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++ $$unique; \
++ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
-+ tags=; \
-+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
-+ $(AWK) ' { files[$$0] = 1; } \
-+ END { for (i in files) print i; }'`; \
-+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
++ END { if (nonempty) { for (i in files) print i; }; }'`; \
++ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-+ $$tags $$unique
++ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
-+ && cd $(top_srcdir) \
-+ && gtags -i $(GTAGS_ARGS) $$here
++ && $(am__cd) $(top_srcdir) \
++ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -1078,6 +665,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
++ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
@@ -1098,18 +686,38 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+
+html: html-am
+
++html-am:
++
+info: info-am
+
+info-am:
+
+install-data-am:
+
++install-dvi: install-dvi-am
++
++install-dvi-am:
++
+install-exec-am:
+
++install-html: install-html-am
++
++install-html-am:
++
+install-info: install-info-am
+
++install-info-am:
++
+install-man:
+
++install-pdf: install-pdf-am
++
++install-pdf-am:
++
++install-ps: install-ps-am
++
++install-ps-am:
++
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
@@ -1132,16 +740,20 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+
+uninstall-am:
+
++.MAKE: install-am install-strip
++
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
-+ install-data-am install-exec install-exec-am install-info \
-+ install-info-am install-man install-strip installcheck \
++ install-data-am install-dvi install-dvi-am install-exec \
++ install-exec-am install-html install-html-am install-info \
++ install-info-am install-man install-pdf install-pdf-am \
++ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-+ uninstall-am uninstall-info-am
++ uninstall-am
+
+
+all: crt0.o
@@ -1169,37 +781,37 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/Makefile.in newlib-1.19.0-psp/newl
+
+$(INTERRUPT_OBJS): interrupt.S
+ $(COMPILE) -DF_$* $< -c -o $@
++
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/README newlib-1.19.0-psp/newlib/libc/sys/psp/README
---- newlib-1.19.0/newlib/libc/sys/psp/README 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/README 2011-07-29 14:24:57.000000000 +0100
-@@ -0,0 +1,16 @@
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/README newlib-1.20.0-psp/newlib/libc/sys/psp/README
+--- newlib-1.20.0/newlib/libc/sys/psp/README 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/README 2012-02-25 14:10:35.000000000 +0000
+@@ -0,0 +1,15 @@
+Newlib for PSP
+--
+
+This sys/psp directory depends on PSPSDK headers. It expects them to live in
+${prefix}/psp/sdk/include (see newlib/configure.host).
+
-+I used automake 1.4-p6 to generate aclocal.m4 and Makefile.in:
++I used the autotools to generate aclocal.m4, Makefile.in and configure using:
+
+ aclocal -I ../../..
+ automake --cygnus
-+
-+Autoconf refused to work for me, so I copied configure from sys/sh and modified
-+$ac_unique_file to point libcglue.c.
++ autoconf
+
+--
-+Marcus R. Brown
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newlib/libc/sys/psp/aclocal.m4
---- newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/aclocal.m4 2011-07-29 14:24:57.000000000 +0100
-@@ -0,0 +1,880 @@
-+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
++Originally by Marcus R. Brown
++Updated by artart78
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.20.0-psp/newlib/libc/sys/psp/aclocal.m4
+--- newlib-1.20.0/newlib/libc/sys/psp/aclocal.m4 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/aclocal.m4 2012-02-25 14:10:35.000000000 +0000
+@@ -0,0 +1,992 @@
++# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-+# 2005 Free Software Foundation, Inc.
++# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
@@ -1209,7 +821,15 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
-+# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
++m4_ifndef([AC_AUTOCONF_VERSION],
++ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
++m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
++[m4_warning([this file was generated for autoconf 2.68.
++You have another version of autoconf. It may work, but is not guaranteed to.
++If you have problems, you may need to regenerate the build system entirely.
++To do so, use the procedure documented by the package, typically `autoreconf'.])])
++
++# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
@@ -1219,14 +839,31 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
-+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
++# (This private macro should not be called outside this file.)
++AC_DEFUN([AM_AUTOMAKE_VERSION],
++[am__api_version='1.11'
++dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
++dnl require some minimum version. Point them to the right macro.
++m4_if([$1], [1.11.1], [],
++ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
++])
++
++# _AM_AUTOCONF_VERSION(VERSION)
++# -----------------------------
++# aclocal traces this macro to find the Autoconf version.
++# This is a private macro too. Using m4_define simplifies
++# the logic in aclocal, which can simply ignore this definition.
++m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
-+# Call AM_AUTOMAKE_VERSION so it can be traced.
-+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
++# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
++# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-+ [AM_AUTOMAKE_VERSION([1.9.6])])
++[AM_AUTOMAKE_VERSION([1.11.1])dnl
++m4_ifndef([AC_AUTOCONF_VERSION],
++ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
++_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
@@ -1283,14 +920,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
-+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 7
++# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
@@ -1299,8 +936,11 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-+AC_SUBST([$1_TRUE])
-+AC_SUBST([$1_FALSE])
++AC_SUBST([$1_TRUE])dnl
++AC_SUBST([$1_FALSE])dnl
++_AM_SUBST_NOTMAKE([$1_TRUE])dnl
++_AM_SUBST_NOTMAKE([$1_FALSE])dnl
++m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
@@ -1314,15 +954,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
-+
-+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 8
++# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
@@ -1350,6 +989,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
++ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
@@ -1378,6 +1018,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
++ am__universal=false
++ m4_case([$1], [CC],
++ [case " $depcc " in #(
++ *\ -arch\ *\ -arch\ *) am__universal=true ;;
++ esac],
++ [CXX],
++ [case " $depcc " in #(
++ *\ -arch\ *\ -arch\ *) am__universal=true ;;
++ esac])
++
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
@@ -1395,7 +1045,17 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
++ # We check with `-c' and `-o' for the sake of the "dashmstdout"
++ # mode. It turns out that the SunPro C++ compiler does not properly
++ # handle `-M -o', and we need to detect this. Also, some Intel
++ # versions had trouble with output in subdirs
++ am__obj=sub/conftest.${OBJEXT-o}
++ am__minus_obj="-o $am__obj"
+ case $depmode in
++ gcc)
++ # This depmode causes a compiler race in universal mode.
++ test "$am__universal" = false || continue
++ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
@@ -1405,18 +1065,23 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+ break
+ fi
+ ;;
++ msvisualcpp | msvcmsys)
++ # This compiler won't grok `-c -o', but also, the minuso test has
++ # not run yet. These depmodes are late enough in the game, and
++ # so weak that their functioning should not be impacted.
++ am__obj=conftest.${OBJEXT-o}
++ am__minus_obj=
++ ;;
+ none) break ;;
+ esac
-+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
-+ # mode. It turns out that the SunPro C++ compiler does not properly
-+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
-+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
++ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
++ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
++ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
++ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
@@ -1467,61 +1132,74 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-+AC_SUBST([AMDEPBACKSLASH])
++AC_SUBST([AMDEPBACKSLASH])dnl
++_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
-+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+#serial 3
++#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-+[for mf in $CONFIG_FILES; do
-+ # Strip MF so we end up with the name of the file.
-+ mf=`echo "$mf" | sed -e 's/:.*$//'`
-+ # Check whether this is an Automake generated Makefile or not.
-+ # We used to match only the files named `Makefile.in', but
-+ # some people rename them; so instead we look at the file content.
-+ # Grep'ing the first line is not enough: some people post-process
-+ # each Makefile.in and add a new line on top of each file to say so.
-+ # So let's grep whole file.
-+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-+ dirpart=`AS_DIRNAME("$mf")`
-+ else
-+ continue
-+ fi
-+ # Extract the definition of DEPDIR, am__include, and am__quote
-+ # from the Makefile without running `make'.
-+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-+ test -z "$DEPDIR" && continue
-+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
-+ test -z "am__include" && continue
-+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-+ # When using ansi2knr, U may be empty or an underscore; expand it
-+ U=`sed -n 's/^U = //p' < "$mf"`
-+ # Find all dependency output files, they are included files with
-+ # $(DEPDIR) in their names. We invoke sed twice because it is the
-+ # simplest approach to changing $(DEPDIR) to its actual value in the
-+ # expansion.
-+ for file in `sed -n "
-+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-+ # Make sure the directory exists.
-+ test -f "$dirpart/$file" && continue
-+ fdir=`AS_DIRNAME(["$file"])`
-+ AS_MKDIR_P([$dirpart/$fdir])
-+ # echo "creating $dirpart/$file"
-+ echo '# dummy' > "$dirpart/$file"
++[{
++ # Autoconf 2.62 quotes --file arguments for eval, but not when files
++ # are listed without --file. Let's play safe and only enable the eval
++ # if we detect the quoting.
++ case $CONFIG_FILES in
++ *\'*) eval set x "$CONFIG_FILES" ;;
++ *) set x $CONFIG_FILES ;;
++ esac
++ shift
++ for mf
++ do
++ # Strip MF so we end up with the name of the file.
++ mf=`echo "$mf" | sed -e 's/:.*$//'`
++ # Check whether this is an Automake generated Makefile or not.
++ # We used to match only the files named `Makefile.in', but
++ # some people rename them; so instead we look at the file content.
++ # Grep'ing the first line is not enough: some people post-process
++ # each Makefile.in and add a new line on top of each file to say so.
++ # Grep'ing the whole file is not good either: AIX grep has a line
++ # limit of 2048, but all sed's we know have understand at least 4000.
++ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
++ dirpart=`AS_DIRNAME("$mf")`
++ else
++ continue
++ fi
++ # Extract the definition of DEPDIR, am__include, and am__quote
++ # from the Makefile without running `make'.
++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
++ test -z "$DEPDIR" && continue
++ am__include=`sed -n 's/^am__include = //p' < "$mf"`
++ test -z "am__include" && continue
++ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
++ # When using ansi2knr, U may be empty or an underscore; expand it
++ U=`sed -n 's/^U = //p' < "$mf"`
++ # Find all dependency output files, they are included files with
++ # $(DEPDIR) in their names. We invoke sed twice because it is the
++ # simplest approach to changing $(DEPDIR) to its actual value in the
++ # expansion.
++ for file in `sed -n "
++ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
++ # Make sure the directory exists.
++ test -f "$dirpart/$file" && continue
++ fdir=`AS_DIRNAME(["$file"])`
++ AS_MKDIR_P([$dirpart/$fdir])
++ # echo "creating $dirpart/$file"
++ echo '# dummy' > "$dirpart/$file"
++ done
+ done
-+done
++}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
@@ -1540,14 +1218,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+
+# Do all the work for Automake. -*- Autoconf -*-
+
-+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-+# Free Software Foundation, Inc.
++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
++# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 12
++# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
@@ -1564,16 +1242,20 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
-+[AC_PREREQ([2.58])dnl
++[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
-+# test to see if srcdir already configured
-+if test "`cd $srcdir && pwd`" != "`pwd`" &&
-+ test -f $srcdir/config.status; then
-+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++ # is not polluted with repeated "-I."
++ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
++ # test to see if srcdir already configured
++ if test -f $srcdir/config.status; then
++ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
++ fi
+fi
+
+# test whether we have cygpath
@@ -1593,6 +1275,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
++dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
++m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
++ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
@@ -1608,8 +1293,8 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
-+AM_PROG_INSTALL_SH
-+AM_PROG_INSTALL_STRIP
++AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
++AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
@@ -1617,20 +1302,37 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-+ [_AM_PROG_TAR([v7])])])
++ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
++ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
-+ [_AM_DEPENDENCIES(CC)],
-+ [define([AC_PROG_CC],
-+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
++ [_AM_DEPENDENCIES(CC)],
++ [define([AC_PROG_CC],
++ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
-+ [_AM_DEPENDENCIES(CXX)],
-+ [define([AC_PROG_CXX],
-+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
++ [_AM_DEPENDENCIES(CXX)],
++ [define([AC_PROG_CXX],
++ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
++AC_PROVIDE_IFELSE([AC_PROG_OBJC],
++ [_AM_DEPENDENCIES(OBJC)],
++ [define([AC_PROG_OBJC],
++ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
++_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
++dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
++dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
++dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
++AC_CONFIG_COMMANDS_PRE(dnl
++[m4_provide_if([_AM_COMPILER_EXEEXT],
++ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
++dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
++dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
++dnl mangled by Autoconf and run in a shell conditional statement.
++m4_define([_AC_COMPILER_EXEEXT],
++m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
++
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
@@ -1641,18 +1343,19 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
++_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
-+ $1 | $1:* )
++ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
-+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
++echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
-+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
@@ -1663,7 +1366,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-+install_sh=${install_sh-"$am_aux_dir/install-sh"}
++if test x"${install_sh}" != xset; then
++ case $am_aux_dir in
++ *\ * | *\ *)
++ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
++ *)
++ install_sh="\${SHELL} $am_aux_dir/install-sh"
++ esac
++fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
@@ -1690,27 +1400,38 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
-+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 4
++# serial 5
+
++# AM_MAINTAINER_MODE([DEFAULT-MODE])
++# ----------------------------------
++# Control maintainer-specific portions of Makefiles.
++# Default is to disable them, unless `enable' is passed literally.
++# For symmetry, `disable' may be passed as well. Anyway, the user
++# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
-+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
-+ dnl maintainer-mode is disabled by default
-+ AC_ARG_ENABLE(maintainer-mode,
-+[ --enable-maintainer-mode enable make rules and dependencies not useful
++[m4_case(m4_default([$1], [disable]),
++ [enable], [m4_define([am_maintainer_other], [disable])],
++ [disable], [m4_define([am_maintainer_other], [enable])],
++ [m4_define([am_maintainer_other], [enable])
++ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
++AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
++ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
++ AC_ARG_ENABLE([maintainer-mode],
++[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
-+ USE_MAINTAINER_MODE=$enableval,
-+ USE_MAINTAINER_MODE=no)
++ [USE_MAINTAINER_MODE=$enableval],
++ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
-+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
++ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
-+ AC_SUBST(MAINT)dnl
++ AC_SUBST([MAINT])dnl
+]
+)
+
@@ -1718,13 +1439,13 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
-+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 3
++# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
@@ -1733,7 +1454,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
-+ @echo done
++ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
@@ -1743,24 +1464,24 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
-+# We grep out `Entering directory' and `Leaving directory'
-+# messages which can occur if `w' ends up in MAKEFLAGS.
-+# In particular we don't look at `^make:' because GNU make might
-+# be invoked under some other name (usually "gmake"), in which
-+# case it prints its new name instead of `make'.
-+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-+ am__include=include
-+ am__quote=
-+ _am_result=GNU
-+fi
++# Ignore all kinds of additional output from `make'.
++case `$am_make -s -f confmf 2> /dev/null` in #(
++*the\ am__doit\ target*)
++ am__include=include
++ am__quote=
++ _am_result=GNU
++ ;;
++esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
-+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-+ am__include=.include
-+ am__quote="\""
-+ _am_result=BSD
-+ fi
++ case `$am_make -s -f confmf 2> /dev/null` in #(
++ *the\ am__doit\ target*)
++ am__include=.include
++ am__quote="\""
++ _am_result=BSD
++ ;;
++ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
@@ -1770,14 +1491,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
-+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
++# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 4
++# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
@@ -1793,7 +1514,15 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
++AC_REQUIRE_AUX_FILE([missing])dnl
++if test x"${MISSING+set}" != xset; then
++ case $am_aux_dir in
++ *\ * | *\ *)
++ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
++ *)
++ MISSING="\${SHELL} $am_aux_dir/missing" ;;
++ esac
++fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
@@ -1803,7 +1532,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+fi
+])
+
-+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
@@ -1811,70 +1540,33 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+
+# AM_PROG_MKDIR_P
+# ---------------
-+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-+#
-+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-+# created by `make install' are always world readable, even if the
-+# installer happens to have an overly restrictive umask (e.g. 077).
-+# This was a mistake. There are at least two reasons why we must not
-+# use `-m 0755':
-+# - it causes special bits like SGID to be ignored,
-+# - it may be too restrictive (some setups expect 775 directories).
-+#
-+# Do not use -m 0755 and let people choose whatever they expect by
-+# setting umask.
-+#
-+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-+# Some implementations (such as Solaris 8's) are not thread-safe: if a
-+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-+# concurrently, both version can detect that a/ is missing, but only
-+# one can create it and the other will error out. Consequently we
-+# restrict ourselves to GNU make (using the --version option ensures
-+# this.)
++# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
-+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-+ # We used to keeping the `.' as first argument, in order to
-+ # allow $(mkdir_p) to be used without argument. As in
-+ # $(mkdir_p) $(somedir)
-+ # where $(somedir) is conditionally defined. However this is wrong
-+ # for two reasons:
-+ # 1. if the package is installed by a user who cannot write `.'
-+ # make install will fail,
-+ # 2. the above comment should most certainly read
-+ # $(mkdir_p) $(DESTDIR)$(somedir)
-+ # so it does not work when $(somedir) is undefined and
-+ # $(DESTDIR) is not.
-+ # To support the latter case, we have to write
-+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-+ # so the `.' trick is pointless.
-+ mkdir_p='mkdir -p --'
-+else
-+ # On NextStep and OpenStep, the `mkdir' command does not
-+ # recognize any option. It will interpret all options as
-+ # directories to create, and then abort because `.' already
-+ # exists.
-+ for d in ./-p ./--version;
-+ do
-+ test -d $d && rmdir $d
-+ done
-+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-+ if test -f "$ac_aux_dir/mkinstalldirs"; then
-+ mkdir_p='$(mkinstalldirs)'
-+ else
-+ mkdir_p='$(install_sh) -d'
-+ fi
-+fi
-+AC_SUBST([mkdir_p])])
++[AC_PREREQ([2.60])dnl
++AC_REQUIRE([AC_PROG_MKDIR_P])dnl
++dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
++dnl while keeping a definition of mkdir_p for backward compatibility.
++dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
++dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
++dnl Makefile.ins that do not define MKDIR_P, so we do our own
++dnl adjustment using top_builddir (which is defined more often than
++dnl MKDIR_P).
++AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
++case $mkdir_p in
++ [[\\/$]]* | ?:[[\\/]]*) ;;
++ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
++])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
-+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
++# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 3
++# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
@@ -1891,7 +1583,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
-+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
++[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
@@ -1901,14 +1593,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
-+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
++# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
-+# serial 4
++# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
@@ -1917,16 +1609,29 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+# Just in case
+sleep 1
+echo timestamp > conftest.file
++# Reject unsafe characters in $srcdir or the absolute working directory
++# name. Accept space and tab only in the latter.
++am_lf='
++'
++case `pwd` in
++ *[[\\\"\#\$\&\'\`$am_lf]]*)
++ AC_MSG_ERROR([unsafe absolute working directory name]);;
++esac
++case $srcdir in
++ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
++ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
++esac
++
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
-+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
++ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
-+ set X `ls -t $srcdir/configure conftest.file`
++ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -1976,9 +1681,28 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
-+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
++# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 2
++
++# _AM_SUBST_NOTMAKE(VARIABLE)
++# ---------------------------
++# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
++# This macro is traced by Automake.
++AC_DEFUN([_AM_SUBST_NOTMAKE])
++
++# AM_SUBST_NOTMAKE(VARIABLE)
++# ---------------------------
++# Public sister of _AM_SUBST_NOTMAKE.
++AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
++
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
@@ -2076,9 +1800,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/aclocal.m4 newlib-1.19.0-psp/newli
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/arpa/inet.h newlib-1.19.0-psp/newlib/libc/sys/psp/arpa/inet.h
---- newlib-1.19.0/newlib/libc/sys/psp/arpa/inet.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/arpa/inet.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/arpa/inet.h newlib-1.20.0-psp/newlib/libc/sys/psp/arpa/inet.h
+--- newlib-1.20.0/newlib/libc/sys/psp/arpa/inet.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/arpa/inet.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,26 @@
+/* arpa/inet.h - Functions for converting IP addresses between strings and numbers */
+
@@ -2106,93 +1830,434 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/arpa/inet.h newlib-1.19.0-psp/newl
+}
+#endif
+#endif /* _ARPA_INET_H_ */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/confdefs.h newlib-1.19.0-psp/newlib/libc/sys/psp/confdefs.h
---- newlib-1.19.0/newlib/libc/sys/psp/confdefs.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/confdefs.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/confdefs.h newlib-1.20.0-psp/newlib/libc/sys/psp/confdefs.h
+--- newlib-1.20.0/newlib/libc/sys/psp/confdefs.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/confdefs.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1 @@
+
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib/libc/sys/psp/configure
---- newlib-1.19.0/newlib/libc/sys/psp/configure 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/configure 2011-07-29 14:24:57.000000000 +0100
-@@ -0,0 +1,4085 @@
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/configure newlib-1.20.0-psp/newlib/libc/sys/psp/configure
+--- newlib-1.20.0/newlib/libc/sys/psp/configure 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/configure 2012-02-25 14:10:35.000000000 +0000
+@@ -0,0 +1,4745 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
-+# Generated by GNU Autoconf 2.59 for newlib 1.15.0.
++# Generated by GNU Autoconf 2.68 for newlib 1.20.0.
++#
++#
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
++# Foundation, Inc.
++#
+#
-+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
-+## --------------------- ##
-+## M4sh Initialization. ##
-+## --------------------- ##
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
+
-+# Be Bourne compatible
-+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
-+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
-+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-+ set -o posix
-+fi
-+DUALCASE=1; export DUALCASE # for MKS sh
-+
-+# Support unset when possible.
-+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-+ as_unset=unset
++ setopt NO_GLOB_SUBST
+else
-+ as_unset=false
++ case `(set -o) 2>/dev/null` in #(
++ *posix*) :
++ set -o posix ;; #(
++ *) :
++ ;;
++esac
+fi
+
+
-+# Work around bugs in pre-3.0 UWIN ksh.
-+$as_unset ENV MAIL MAILPATH
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++ as_echo='print -r --'
++ as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++ as_echo='printf %s\n'
++ as_echo_n='printf %s'
++else
++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++ as_echo_n='/usr/ucb/echo -n'
++ else
++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++ as_echo_n_body='eval
++ arg=$1;
++ case $arg in #(
++ *"$as_nl"*)
++ expr "X$arg" : "X\\(.*\\)$as_nl";
++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++ esac;
++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++ '
++ export as_echo_n_body
++ as_echo_n='sh -c $as_echo_n_body as_echo'
++ fi
++ export as_echo_body
++ as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ PATH_SEPARATOR=:
++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++ PATH_SEPARATOR=';'
++ }
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++as_myself=
++case $0 in #((
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++ done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ exit 1
++fi
++
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there. '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
++done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ eval $as_var=C; export $as_var
-+ else
-+ $as_unset $as_var
-+ fi
-+done
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
+
-+# Required to use basename.
-+if expr a : '\(a\)' >/dev/null 2>&1; then
++# CDPATH.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++if test "x$CONFIG_SHELL" = x; then
++ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
++ emulate sh
++ NULLCMD=:
++ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '\${1+\"\$@\"}'='\"\$@\"'
++ setopt NO_GLOB_SUBST
++else
++ case \`(set -o) 2>/dev/null\` in #(
++ *posix*) :
++ set -o posix ;; #(
++ *) :
++ ;;
++esac
++fi
++"
++ as_required="as_fn_return () { (exit \$1); }
++as_fn_success () { as_fn_return 0; }
++as_fn_failure () { as_fn_return 1; }
++as_fn_ret_success () { return 0; }
++as_fn_ret_failure () { return 1; }
++
++exitcode=0
++as_fn_success || { exitcode=1; echo as_fn_success failed.; }
++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
++
++else
++ exitcode=1; echo positional parameters were not saved.
++fi
++test x\$exitcode = x0 || exit 1"
++ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
++ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
++ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
++ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
++ if (eval "$as_required") 2>/dev/null; then :
++ as_have_required=yes
++else
++ as_have_required=no
++fi
++ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
++
++else
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++as_found=false
++for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ as_found=:
++ case $as_dir in #(
++ /*)
++ for as_base in sh bash ksh sh5; do
++ # Try only shells that exist, to save several forks.
++ as_shell=$as_dir/$as_base
++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
++ CONFIG_SHELL=$as_shell as_have_required=yes
++ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
++ break 2
++fi
++fi
++ done;;
++ esac
++ as_found=false
++done
++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
++ CONFIG_SHELL=$SHELL as_have_required=yes
++fi; }
++IFS=$as_save_IFS
++
++
++ if test "x$CONFIG_SHELL" != x; then :
++ # We cannot yet assume a decent shell, so we have to provide a
++ # neutralization value for shells without unset; and this also
++ # works around shells that cannot unset nonexistent variables.
++ # Preserve -v and -x to the replacement shell.
++ BASH_ENV=/dev/null
++ ENV=/dev/null
++ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++ export CONFIG_SHELL
++ case $- in # ((((
++ *v*x* | *x*v* ) as_opts=-vx ;;
++ *v* ) as_opts=-v ;;
++ *x* ) as_opts=-x ;;
++ * ) as_opts= ;;
++ esac
++ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
++fi
++
++ if test x$as_have_required = xno; then :
++ $as_echo "$0: This script requires a shell more modern than all"
++ $as_echo "$0: the shells that I found on your system."
++ if test x${ZSH_VERSION+set} = xset ; then
++ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
++ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
++ else
++ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
++$0: including any error possibly output before this
++$0: message. Then install a modern shell, or manually run
++$0: the script under such a shell if you do have one."
++ fi
++ exit 1
++fi
++fi
++fi
++SHELL=${CONFIG_SHELL-/bin/sh}
++export SHELL
++# Unset more variables known to interfere with behavior of common tools.
++CLICOLOR_FORCE= GREP_OPTIONS=
++unset CLICOLOR_FORCE GREP_OPTIONS
++
++## --------------------- ##
++## M4sh Shell Functions. ##
++## --------------------- ##
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++ { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++ return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++ set +e
++ as_fn_set_status $1
++ exit $1
++} # as_fn_exit
++
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
++
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || eval $as_mkdir_p || {
++ as_dirs=
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
++ done
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
++
++
++} # as_fn_mkdir_p
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++ eval 'as_fn_append ()
++ {
++ eval $1+=\$2
++ }'
++else
++ as_fn_append ()
++ {
++ eval $1=\$$1\$2
++ }
++fi # as_fn_append
++
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++ eval 'as_fn_arith ()
++ {
++ as_val=$(( $* ))
++ }'
++else
++ as_fn_arith ()
++ {
++ as_val=`expr "$@" || test $? -eq 1`
++ }
++fi # as_fn_arith
++
++
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with STATUS, using 1 if that was 0.
++as_fn_error ()
++{
++ as_status=$1; test $as_status -eq 0 && as_status=1
++ if test "$4"; then
++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
++ fi
++ $as_echo "$as_me: error: $2" >&2
++ as_fn_exit $as_status
++} # as_fn_error
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
-+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
+
-+# Name of the executable.
-+as_me=`$as_basename "$0" ||
++as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
-+ X"$0" : 'X\(/\)$' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X/"$0" |
-+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-+ /^X\/\(\/\/\)$/{ s//\1/; q; }
-+ /^X\/\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+
-+
-+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -2200,146 +2265,107 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
-+# The user is always right.
-+if test "${PATH_SEPARATOR+set}" != set; then
-+ echo "#! /bin/sh" >conf$$.sh
-+ echo "exit 0" >>conf$$.sh
-+ chmod +x conf$$.sh
-+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-+ PATH_SEPARATOR=';'
-+ else
-+ PATH_SEPARATOR=:
-+ fi
-+ rm -f conf$$.sh
-+fi
+
-+
-+ as_lineno_1=$LINENO
-+ as_lineno_2=$LINENO
-+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-+ test "x$as_lineno_1" != "x$as_lineno_2" &&
-+ test "x$as_lineno_3" = "x$as_lineno_2" || {
-+ # Find who we are. Look in the path if we contain no path at all
-+ # relative or not.
-+ case $0 in
-+ *[\\/]* ) as_myself=$0 ;;
-+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-+done
-+
-+ ;;
-+ esac
-+ # We did not find ourselves, most probably we were run as `sh COMMAND'
-+ # in which case we are not to be found in the path.
-+ if test "x$as_myself" = x; then
-+ as_myself=$0
-+ fi
-+ if test ! -f "$as_myself"; then
-+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-+ { (exit 1); exit 1; }; }
-+ fi
-+ case $CONFIG_SHELL in
-+ '')
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for as_base in sh bash ksh sh5; do
-+ case $as_dir in
-+ /*)
-+ if ("$as_dir/$as_base" -c '
-+ as_lineno_1=$LINENO
-+ as_lineno_2=$LINENO
-+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-+ test "x$as_lineno_1" != "x$as_lineno_2" &&
-+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
-+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-+ CONFIG_SHELL=$as_dir/$as_base
-+ export CONFIG_SHELL
-+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-+ fi;;
-+ esac
-+ done
-+done
-+;;
-+ esac
-+
-+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-+ # uniformly replaced by the line number. The first 'sed' inserts a
-+ # line-number line before each line; the second 'sed' does the real
-+ # work. The second script uses 'N' to pair each line-number line
-+ # with the numbered line, and appends trailing '-' during
-+ # substitution so that $LINENO is not a special case at line end.
-+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
-+ sed '=' <$as_myself |
++ as_lineno_1=$LINENO as_lineno_1a=$LINENO
++ as_lineno_2=$LINENO as_lineno_2a=$LINENO
++ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
++ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
++ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
+ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
+ N
-+ s,$,-,
-+ : loop
-+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
-+ s,-$,,
-+ s,^['$as_cr_digits']*\n,,
++ s/-\n.*//
+ ' >$as_me.lineno &&
-+ chmod +x $as_me.lineno ||
-+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-+ { (exit 1); exit 1; }; }
++ chmod +x "$as_me.lineno" ||
++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
-+ # original and so on. Autoconf is especially sensible to this).
-+ . ./$as_me.lineno
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
-+
-+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-+ *c*,-n*) ECHO_N= ECHO_C='
-+' ECHO_T=' ' ;;
-+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in #(((((
++-n*)
++ case `echo 'xy\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ xy) ECHO_C='\c';;
++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
++ ECHO_T=' ';;
++ esac;;
++*)
++ ECHO_N='-n';;
+esac
+
-+if expr a : '\(a\)' >/dev/null 2>&1; then
-+ as_expr=expr
-+else
-+ as_expr=false
-+fi
-+
+rm -f conf$$ conf$$.exe conf$$.file
-+echo >conf$$.file
-+if ln -s conf$$.file conf$$ 2>/dev/null; then
-+ # We could just check for DJGPP; but this test a) works b) is more generic
-+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-+ if test -f conf$$.exe; then
-+ # Don't use ln at all; we don't have any links
-+ as_ln_s='cp -p'
-+ else
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir 2>/dev/null
++fi
++if (echo >conf$$.file) 2>/dev/null; then
++ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++ as_ln_s='cp -p'
++ elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++ else
++ as_ln_s='cp -p'
+ fi
-+elif ln conf$$.file conf$$ 2>/dev/null; then
-+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
-+rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
-+ as_mkdir_p=:
++ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
-+as_executable_p="test -f"
++if test -x / >/dev/null 2>&1; then
++ as_test_x='test -x'
++else
++ if ls -dL / >/dev/null 2>&1; then
++ as_ls_L_option=L
++ else
++ as_ls_L_option=
++ fi
++ as_test_x='
++ eval sh -c '\''
++ if test -d "$1"; then
++ test -d "$1/.";
++ else
++ case $1 in #(
++ -*)set "./$1";;
++ esac;
++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
++ ???[sx]*):;;*)false;;esac;fi
++ '\'' sh
++ '
++fi
++as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -2348,53 +2374,176 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
-+# IFS
-+# We need space, tab and new line, in precisely that order.
-+as_nl='
-+'
-+IFS=" $as_nl"
-+
-+# CDPATH.
-+$as_unset CDPATH
-+
++test -n "$DJDIR" || exec 7<&0 &1
+
+# Name of the host.
-+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
-+exec 6>&1
-+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
++ac_clean_files=
+ac_config_libobj_dir=.
++LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
-+SHELL=${CONFIG_SHELL-/bin/sh}
-+
-+# Maximum number of lines to put in a shell here document.
-+# This variable seems obsolete. It should probably be removed, and
-+# only ac_max_sed_lines should be used.
-+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
-+PACKAGE_VERSION='1.15.0'
-+PACKAGE_STRING='newlib 1.15.0'
++PACKAGE_VERSION='1.20.0'
++PACKAGE_STRING='newlib 1.20.0'
+PACKAGE_BUGREPORT=''
++PACKAGE_URL=''
+
+ac_unique_file="libcglue.c"
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAY_SUPPLY_SYSCALLS_TRUE MAY_SUPPLY_SYSCALLS_FALSE newlib_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB READELF ac_ct_READELF MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CCAS CCASFLAGS NEWLIB_CFLAGS LDFLAGS ELIX_LEVEL_0_TRUE ELIX_LEVEL_0_FALSE ELIX_LEVEL_1_TRUE ELIX_LEVEL_1_FALSE ELIX_LEVEL_2_TRUE ELIX_LEVEL_2_FALSE ELIX_LEVEL_3_TRUE ELIX_LEVEL_3_FALSE ELIX_LEVEL_4_TRUE ELIX_LEVEL_4_FALSE USE_LIBTOOL_TRUE USE_LIBTOOL_FALSE OBJEXT oext aext lpfx libm_machine_dir machine_dir sys_dir LIBOBJS LTLIBOBJS'
++ac_subst_vars='LTLIBOBJS
++LIBOBJS
++sys_dir
++machine_dir
++libm_machine_dir
++lpfx
++aext
++oext
++OBJEXT
++USE_LIBTOOL_FALSE
++USE_LIBTOOL_TRUE
++ELIX_LEVEL_4_FALSE
++ELIX_LEVEL_4_TRUE
++ELIX_LEVEL_3_FALSE
++ELIX_LEVEL_3_TRUE
++ELIX_LEVEL_2_FALSE
++ELIX_LEVEL_2_TRUE
++ELIX_LEVEL_1_FALSE
++ELIX_LEVEL_1_TRUE
++ELIX_LEVEL_0_FALSE
++ELIX_LEVEL_0_TRUE
++LDFLAGS
++NO_INCLUDE_LIST
++NEWLIB_CFLAGS
++CCASFLAGS
++CCAS
++MAINT
++MAINTAINER_MODE_FALSE
++MAINTAINER_MODE_TRUE
++READELF
++RANLIB
++AR
++AS
++am__fastdepCC_FALSE
++am__fastdepCC_TRUE
++CCDEPMODE
++AMDEPBACKSLASH
++AMDEP_FALSE
++AMDEP_TRUE
++am__quote
++am__include
++DEPDIR
++CC
++am__untar
++am__tar
++AMTAR
++am__leading_dot
++SET_MAKE
++AWK
++mkdir_p
++MKDIR_P
++INSTALL_STRIP_PROGRAM
++STRIP
++install_sh
++MAKEINFO
++AUTOHEADER
++AUTOMAKE
++AUTOCONF
++ACLOCAL
++VERSION
++PACKAGE
++CYGPATH_W
++am__isrc
++INSTALL_DATA
++INSTALL_SCRIPT
++INSTALL_PROGRAM
++host_os
++host_vendor
++host_cpu
++host
++build_os
++build_vendor
++build_cpu
++build
++newlib_basedir
++MAY_SUPPLY_SYSCALLS_FALSE
++MAY_SUPPLY_SYSCALLS_TRUE
++target_alias
++host_alias
++build_alias
++LIBS
++ECHO_T
++ECHO_N
++ECHO_C
++DEFS
++mandir
++localedir
++libdir
++psdir
++pdfdir
++dvidir
++htmldir
++infodir
++docdir
++oldincludedir
++includedir
++localstatedir
++sharedstatedir
++sysconfdir
++datadir
++datarootdir
++libexecdir
++sbindir
++bindir
++program_transform_name
++prefix
++exec_prefix
++PACKAGE_URL
++PACKAGE_BUGREPORT
++PACKAGE_STRING
++PACKAGE_VERSION
++PACKAGE_TARNAME
++PACKAGE_NAME
++PATH_SEPARATOR
++SHELL'
+ac_subst_files=''
++ac_user_opts='
++enable_option_checking
++enable_multilib
++enable_target_optspace
++enable_malloc_debugging
++enable_newlib_multithread
++enable_newlib_iconv
++enable_newlib_elix_level
++enable_newlib_io_float
++enable_newlib_supplied_syscalls
++enable_dependency_tracking
++enable_maintainer_mode
++'
++ ac_precious_vars='build_alias
++host_alias
++target_alias
++CCAS
++CCASFLAGS'
++
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
++ac_unrecognized_opts=
++ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
@@ -2417,34 +2566,49 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
++# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
-+datadir='${prefix}/share'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
-+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
-+infodir='${prefix}/info'
-+mandir='${prefix}/man'
++docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
++infodir='${datarootdir}/info'
++htmldir='${docdir}'
++dvidir='${docdir}'
++pdfdir='${docdir}'
++psdir='${docdir}'
++libdir='${exec_prefix}/lib'
++localedir='${datarootdir}/locale'
++mandir='${datarootdir}/man'
+
+ac_prev=
++ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
-+ eval "$ac_prev=\$ac_option"
++ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
-+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
++ case $ac_option in
++ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++ *=) ac_optarg= ;;
++ *) ac_optarg=yes ;;
++ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
-+ case $ac_option in
++ case $ac_dashdash$ac_option in
++ --)
++ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
@@ -2466,33 +2630,59 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
-+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
++ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
-+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-+ | --da=*)
++ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++ | --dataroo | --dataro | --datar)
++ ac_prev=datarootdir ;;
++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++ datarootdir=$ac_optarg ;;
++
+ -disable-* | --disable-*)
-+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
++ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
-+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-+ { (exit 1); exit 1; }; }
-+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-+ eval "enable_$ac_feature=no" ;;
++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++ as_fn_error $? "invalid feature name: $ac_useropt"
++ ac_useropt_orig=$ac_useropt
++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++ case $ac_user_opts in
++ *"
++"enable_$ac_useropt"
++"*) ;;
++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
++ ac_unrecognized_sep=', ';;
++ esac
++ eval enable_$ac_useropt=no ;;
++
++ -docdir | --docdir | --docdi | --doc | --do)
++ ac_prev=docdir ;;
++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
++ docdir=$ac_optarg ;;
++
++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
++ ac_prev=dvidir ;;
++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
++ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
-+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
++ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
-+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-+ { (exit 1); exit 1; }; }
-+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-+ case $ac_option in
-+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-+ *) ac_optarg=yes ;;
++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++ as_fn_error $? "invalid feature name: $ac_useropt"
++ ac_useropt_orig=$ac_useropt
++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++ case $ac_user_opts in
++ *"
++"enable_$ac_useropt"
++"*) ;;
++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
++ ac_unrecognized_sep=', ';;
+ esac
-+ eval "enable_$ac_feature='$ac_optarg'" ;;
++ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -2519,6 +2709,12 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
++ ac_prev=htmldir ;;
++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
++ | --ht=*)
++ htmldir=$ac_optarg ;;
++
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
@@ -2543,13 +2739,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
++ -localedir | --localedir | --localedi | --localed | --locale)
++ ac_prev=localedir ;;
++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
++ localedir=$ac_optarg ;;
++
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
-+ | --localstate | --localstat | --localsta | --localst \
-+ | --locals | --local | --loca | --loc | --lo)
++ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -2614,6 +2813,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
++ ac_prev=pdfdir ;;
++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
++ pdfdir=$ac_optarg ;;
++
++ -psdir | --psdir | --psdi | --psd | --ps)
++ ac_prev=psdir ;;
++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
++ psdir=$ac_optarg ;;
++
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
@@ -2664,26 +2873,36 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
-+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
++ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
-+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-+ { echo "$as_me: error: invalid package name: $ac_package" >&2
-+ { (exit 1); exit 1; }; }
-+ ac_package=`echo $ac_package| sed 's/-/_/g'`
-+ case $ac_option in
-+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-+ *) ac_optarg=yes ;;
++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++ as_fn_error $? "invalid package name: $ac_useropt"
++ ac_useropt_orig=$ac_useropt
++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++ case $ac_user_opts in
++ *"
++"with_$ac_useropt"
++"*) ;;
++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
++ ac_unrecognized_sep=', ';;
+ esac
-+ eval "with_$ac_package='$ac_optarg'" ;;
++ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
-+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
++ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
-+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-+ { echo "$as_me: error: invalid package name: $ac_package" >&2
-+ { (exit 1); exit 1; }; }
-+ ac_package=`echo $ac_package | sed 's/-/_/g'`
-+ eval "with_$ac_package=no" ;;
++ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
++ as_fn_error $? "invalid package name: $ac_useropt"
++ ac_useropt_orig=$ac_useropt
++ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
++ case $ac_user_opts in
++ *"
++"with_$ac_useropt"
++"*) ;;
++ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
++ ac_unrecognized_sep=', ';;
++ esac
++ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
@@ -2703,27 +2922,26 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
-+ -*) { echo "$as_me: error: unrecognized option: $ac_option
-+Try \`$0 --help' for more information." >&2
-+ { (exit 1); exit 1; }; }
++ -*) as_fn_error $? "unrecognized option: \`$ac_option'
++Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
-+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-+ { (exit 1); exit 1; }; }
-+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-+ eval "$ac_envvar='$ac_optarg'"
++ case $ac_envvar in #(
++ '' | [0-9]* | *[!_$as_cr_alnum]* )
++ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
++ esac
++ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
-+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
++ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
++ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
++ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
@@ -2731,31 +2949,36 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-+ { echo "$as_me: error: missing argument to $ac_option" >&2
-+ { (exit 1); exit 1; }; }
++ as_fn_error $? "missing argument to $ac_option"
+fi
+
-+# Be sure to have absolute paths.
-+for ac_var in exec_prefix prefix
-+do
-+ eval ac_val=$`echo $ac_var`
-+ case $ac_val in
-+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-+ { (exit 1); exit 1; }; };;
++if test -n "$ac_unrecognized_opts"; then
++ case $enable_option_checking in
++ no) ;;
++ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
++ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
-+done
++fi
+
-+# Be sure to have absolute paths.
-+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-+ localstatedir libdir includedir oldincludedir infodir mandir
++# Check all directory arguments for consistency.
++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++ datadir sysconfdir sharedstatedir localstatedir includedir \
++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
++ libdir localedir mandir
+do
-+ eval ac_val=$`echo $ac_var`
++ eval ac_val=\$$ac_var
++ # Remove trailing slashes.
+ case $ac_val in
-+ [\\/$]* | ?:[\\/]* ) ;;
-+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-+ { (exit 1); exit 1; }; };;
++ */ )
++ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
++ eval $ac_var=\$ac_val;;
+ esac
++ # Be sure to have absolute directory names.
++ case $ac_val in
++ [\\/$]* | ?:[\\/]* ) continue;;
++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
++ esac
++ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
@@ -2769,8 +2992,8 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
-+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-+ If a cross compiler is detected then cross compile mode will be used." >&2
++ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
++ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
@@ -2782,62 +3005,72 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+test "$silent" = yes && exec 6>/dev/null
+
+
++ac_pwd=`pwd` && test -n "$ac_pwd" &&
++ac_ls_di=`ls -di .` &&
++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
++ as_fn_error $? "working directory cannot be determined"
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++ as_fn_error $? "pwd does not report name of working directory"
++
++
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
-+ # Try the directory containing this script, then its parent.
-+ ac_confdir=`(dirname "$0") 2>/dev/null ||
-+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-+ X"$0" : 'X\(//\)[^/]' \| \
-+ X"$0" : 'X\(//\)$' \| \
-+ X"$0" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$0" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
++ # Try the directory containing this script, then the parent directory.
++ ac_confdir=`$as_dirname -- "$as_myself" ||
++$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_myself" : 'X\(//\)[^/]' \| \
++ X"$as_myself" : 'X\(//\)$' \| \
++ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_myself" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+ srcdir=$ac_confdir
-+ if test ! -r $srcdir/$ac_unique_file; then
++ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
-+if test ! -r $srcdir/$ac_unique_file; then
-+ if test "$ac_srcdir_defaulted" = yes; then
-+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-+ { (exit 1); exit 1; }; }
-+ else
-+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-+ { (exit 1); exit 1; }; }
-+ fi
++if test ! -r "$srcdir/$ac_unique_file"; then
++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
-+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-+ { (exit 1); exit 1; }; }
-+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-+ac_env_build_alias_set=${build_alias+set}
-+ac_env_build_alias_value=$build_alias
-+ac_cv_env_build_alias_set=${build_alias+set}
-+ac_cv_env_build_alias_value=$build_alias
-+ac_env_host_alias_set=${host_alias+set}
-+ac_env_host_alias_value=$host_alias
-+ac_cv_env_host_alias_set=${host_alias+set}
-+ac_cv_env_host_alias_value=$host_alias
-+ac_env_target_alias_set=${target_alias+set}
-+ac_env_target_alias_value=$target_alias
-+ac_cv_env_target_alias_set=${target_alias+set}
-+ac_cv_env_target_alias_value=$target_alias
-+ac_env_CCAS_set=${CCAS+set}
-+ac_env_CCAS_value=$CCAS
-+ac_cv_env_CCAS_set=${CCAS+set}
-+ac_cv_env_CCAS_value=$CCAS
-+ac_env_CCASFLAGS_set=${CCASFLAGS+set}
-+ac_env_CCASFLAGS_value=$CCASFLAGS
-+ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set}
-+ac_cv_env_CCASFLAGS_value=$CCASFLAGS
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
++ pwd)`
++# When building in place, set srcdir=.
++if test "$ac_abs_confdir" = "$ac_pwd"; then
++ srcdir=.
++fi
++# Remove unnecessary trailing slashes from srcdir.
++# Double slashes in file names in object file debugging info
++# mess up M-x gdb in Emacs.
++case $srcdir in
++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
++esac
++for ac_var in $ac_precious_vars; do
++ eval ac_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_env_${ac_var}_value=\$${ac_var}
++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_cv_env_${ac_var}_value=\$${ac_var}
++done
+
+#
+# Report the --help message.
@@ -2846,7 +3079,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
-+\`configure' configures newlib 1.15.0 to adapt to many kinds of systems.
++\`configure' configures newlib 1.20.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
@@ -2860,20 +3093,17 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
-+ -q, --quiet, --silent do not print \`checking...' messages
++ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
-+_ACEOF
-+
-+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
-+ [$ac_default_prefix]
++ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-+ [PREFIX]
++ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -2883,18 +3113,25 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+For better control, use the options below.
+
+Fine tuning of the installation directories:
-+ --bindir=DIR user executables [EPREFIX/bin]
-+ --sbindir=DIR system admin executables [EPREFIX/sbin]
-+ --libexecdir=DIR program executables [EPREFIX/libexec]
-+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
-+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-+ --libdir=DIR object code libraries [EPREFIX/lib]
-+ --includedir=DIR C header files [PREFIX/include]
-+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
-+ --infodir=DIR info documentation [PREFIX/info]
-+ --mandir=DIR man documentation [PREFIX/man]
++ --bindir=DIR user executables [EPREFIX/bin]
++ --sbindir=DIR system admin executables [EPREFIX/sbin]
++ --libexecdir=DIR program executables [EPREFIX/libexec]
++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
++ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --libdir=DIR object code libraries [EPREFIX/lib]
++ --includedir=DIR C header files [PREFIX/include]
++ --oldincludedir=DIR C header files for non-gcc [/usr/include]
++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
++ --infodir=DIR info documentation [DATAROOTDIR/info]
++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
++ --mandir=DIR man documentation [DATAROOTDIR/man]
++ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
++ --htmldir=DIR html documentation [DOCDIR]
++ --dvidir=DIR dvi documentation [DOCDIR]
++ --pdfdir=DIR pdf documentation [DOCDIR]
++ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
@@ -2912,11 +3149,12 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
-+ short | recursive ) echo "Configuration of newlib 1.15.0:";;
++ short | recursive ) echo "Configuration of newlib 1.20.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
++ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
@@ -2939,121 +3177,131 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
++Report bugs to the package provider.
+_ACEOF
++ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
-+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-+ test -d $ac_dir || continue
++ test -d "$ac_dir" ||
++ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
++ continue
+ ac_builddir=.
+
-+if test "$ac_dir" != .; then
-+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-+ # A "../" for each directory in $ac_dir_suffix.
-+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-+else
-+ ac_dir_suffix= ac_top_builddir=
-+fi
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
-+ .) # No --srcdir option. We are building in place.
++ .) # We are building in place.
+ ac_srcdir=.
-+ if test -z "$ac_top_builddir"; then
-+ ac_top_srcdir=.
-+ else
-+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-+ fi ;;
-+ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
-+ ac_top_srcdir=$srcdir ;;
-+ *) # Relative path.
-+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
-+# Do not use `cd foo && pwd` to compute absolute paths, because
-+# the directories may not exist.
-+case `pwd` in
-+.) ac_abs_builddir="$ac_dir";;
-+*)
-+ case "$ac_dir" in
-+ .) ac_abs_builddir=`pwd`;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_builddir=${ac_top_builddir}.;;
-+*)
-+ case ${ac_top_builddir}. in
-+ .) ac_abs_top_builddir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_srcdir=$ac_srcdir;;
-+*)
-+ case $ac_srcdir in
-+ .) ac_abs_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_srcdir=$ac_top_srcdir;;
-+*)
-+ case $ac_top_srcdir in
-+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-+ esac;;
-+esac
-+
-+ cd $ac_dir
-+ # Check for guested configure; otherwise get Cygnus style configure.
-+ if test -f $ac_srcdir/configure.gnu; then
-+ echo
-+ $SHELL $ac_srcdir/configure.gnu --help=recursive
-+ elif test -f $ac_srcdir/configure; then
-+ echo
-+ $SHELL $ac_srcdir/configure --help=recursive
-+ elif test -f $ac_srcdir/configure.ac ||
-+ test -f $ac_srcdir/configure.in; then
-+ echo
-+ $ac_configure --help
++ cd "$ac_dir" || { ac_status=$?; continue; }
++ # Check for guested configure.
++ if test -f "$ac_srcdir/configure.gnu"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
++ elif test -f "$ac_srcdir/configure"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
-+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-+ fi
-+ cd $ac_popdir
++ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
++ fi || ac_status=$?
++ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
-+test -n "$ac_init_help" && exit 0
++test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
-+newlib configure 1.15.0
-+generated by GNU Autoconf 2.59
++newlib configure 1.20.0
++generated by GNU Autoconf 2.68
+
-+Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
-+ exit 0
++ exit
+fi
-+exec 5>config.log
-+cat >&5 <<_ACEOF
++
++## ------------------------ ##
++## Autoconf initialization. ##
++## ------------------------ ##
++
++# ac_fn_c_try_compile LINENO
++# --------------------------
++# Try to compile conftest.$ac_ext, and return whether this succeeded.
++ac_fn_c_try_compile ()
++{
++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++ rm -f conftest.$ac_objext
++ if { { ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
++$as_echo "$ac_try_echo"; } >&5
++ (eval "$ac_compile") 2>conftest.err
++ ac_status=$?
++ if test -s conftest.err; then
++ grep -v '^ *+' conftest.err >conftest.er1
++ cat conftest.er1 >&5
++ mv -f conftest.er1 conftest.err
++ fi
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then :
++ ac_retval=0
++else
++ $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_retval=1
++fi
++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
++ as_fn_set_status $ac_retval
++
++} # ac_fn_c_try_compile
++cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
-+It was created by newlib $as_me 1.15.0, which was
-+generated by GNU Autoconf 2.59. Invocation command line was
++It was created by newlib $as_me 1.20.0, which was
++generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
++exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
@@ -3072,7 +3320,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -3084,8 +3332,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ echo "PATH: $as_dir"
-+done
++ $as_echo "PATH: $as_dir"
++ done
++IFS=$as_save_IFS
+
+} >&5
+
@@ -3107,7 +3356,6 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
-+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
@@ -3118,13 +3366,13 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
-+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *\'*)
++ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
-+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
++ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
-+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
++ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
@@ -3140,104 +3388,115 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
-+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-+ # Get rid of the leading space.
-+ ac_sep=" "
++ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
-+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
++{ ac_configure_args0=; unset ac_configure_args0;}
++{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
-+# WARNING: Be sure not to use single quotes in there, as some shells,
-+# such as our DU 5.0 friend, will then `close' the trap.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
-+ cat <<\_ASBOX
-+## ---------------- ##
++ $as_echo "## ---------------- ##
+## Cache variables. ##
-+## ---------------- ##
-+_ASBOX
++## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
-+{
++(
++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++ *) { eval $ac_var=; unset $ac_var;} ;;
++ esac ;;
++ esac
++ done
+ (set) 2>&1 |
-+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-+ *ac_space=\ *)
++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
+ sed -n \
-+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-+ ;;
++ "s/'\''/'\''\\\\'\'''\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++ ;; #(
+ *)
-+ sed -n \
-+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
-+ esac;
-+}
++ esac |
++ sort
++)
+ echo
+
-+ cat <<\_ASBOX
-+## ----------------- ##
++ $as_echo "## ----------------- ##
+## Output variables. ##
-+## ----------------- ##
-+_ASBOX
++## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
-+ eval ac_val=$`echo $ac_var`
-+ echo "$ac_var='"'"'$ac_val'"'"'"
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
-+ cat <<\_ASBOX
-+## ------------- ##
-+## Output files. ##
-+## ------------- ##
-+_ASBOX
++ $as_echo "## ------------------- ##
++## File substitutions. ##
++## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
-+ eval ac_val=$`echo $ac_var`
-+ echo "$ac_var='"'"'$ac_val'"'"'"
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
-+ cat <<\_ASBOX
-+## ----------- ##
++ $as_echo "## ----------- ##
+## confdefs.h. ##
-+## ----------- ##
-+_ASBOX
++## ----------- ##"
+ echo
-+ sed "/^$/d" confdefs.h | sort
++ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
-+ echo "$as_me: caught signal $ac_signal"
-+ echo "$as_me: exit $exit_status"
++ $as_echo "$as_me: caught signal $ac_signal"
++ $as_echo "$as_me: exit $exit_status"
+ } >&5
-+ rm -f core *.core &&
-+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
++ rm -f core *.core core.conftest.* &&
++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
-+ ' 0
++' 0
+for ac_signal in 1 2 13 15; do
-+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
++ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
-+rm -rf conftest* confdefs.h
-+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-+echo >confdefs.h
++rm -f -r conftest* confdefs.h
++
++$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
@@ -3245,112 +3504,137 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
-+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
-+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
-+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
-+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
++cat >>confdefs.h <<_ACEOF
++#define PACKAGE_URL "$PACKAGE_URL"
++_ACEOF
++
+
+# Let the site file select an alternate cache file if it wants to.
-+# Prefer explicitly selected file to automatically selected ones.
-+if test -z "$CONFIG_SITE"; then
-+ if test "x$prefix" != xNONE; then
-+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-+ else
-+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-+ fi
++# Prefer an explicitly selected file to automatically selected ones.
++ac_site_file1=NONE
++ac_site_file2=NONE
++if test -n "$CONFIG_SITE"; then
++ # We do not want a PATH search for config.site.
++ case $CONFIG_SITE in #((
++ -*) ac_site_file1=./$CONFIG_SITE;;
++ */*) ac_site_file1=$CONFIG_SITE;;
++ *) ac_site_file1=./$CONFIG_SITE;;
++ esac
++elif test "x$prefix" != xNONE; then
++ ac_site_file1=$prefix/share/config.site
++ ac_site_file2=$prefix/etc/config.site
++else
++ ac_site_file1=$ac_default_prefix/share/config.site
++ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
-+for ac_site_file in $CONFIG_SITE; do
-+ if test -r "$ac_site_file"; then
-+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-+echo "$as_me: loading site script $ac_site_file" >&6;}
++for ac_site_file in "$ac_site_file1" "$ac_site_file2"
++do
++ test "x$ac_site_file" = xNONE && continue
++ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
++$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
-+ . "$ac_site_file"
++ . "$ac_site_file" \
++ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "failed to load site script $ac_site_file
++See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
-+ # Some versions of bash will fail to source /dev/null (special
-+ # files actually), so we avoid doing that.
-+ if test -f "$cache_file"; then
-+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-+echo "$as_me: loading cache $cache_file" >&6;}
++ # Some versions of bash will fail to source /dev/null (special files
++ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
++ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
++$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
-+ [\\/]* | ?:[\\/]* ) . $cache_file;;
-+ *) . ./$cache_file;;
++ [\\/]* | ?:[\\/]* ) . "$cache_file";;
++ *) . "./$cache_file";;
+ esac
+ fi
+else
-+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-+echo "$as_me: creating cache $cache_file" >&6;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
++$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
-+for ac_var in `(set) 2>&1 |
-+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
++for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
-+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-+ eval ac_new_val="\$ac_env_${ac_var}_value"
++ eval ac_old_val=\$ac_cv_env_${ac_var}_value
++ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
-+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
++$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
-+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
++$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
-+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-+echo "$as_me: former value: $ac_old_val" >&2;}
-+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-+echo "$as_me: current value: $ac_new_val" >&2;}
-+ ac_cache_corrupted=:
++ # differences in whitespace do not lead to failure.
++ ac_old_val_w=`echo x $ac_old_val`
++ ac_new_val_w=`echo x $ac_new_val`
++ if test "$ac_old_val_w" != "$ac_new_val_w"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
++$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
++ ac_cache_corrupted=:
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
++$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
++ eval $ac_var=\$ac_old_val
++ fi
++ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
++$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
++$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
-+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
-+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
++ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
-+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-+ { (exit 1); exit 1; }; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
++$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
++ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
++## -------------------- ##
++## Main body of script. ##
++## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
@@ -3361,91 +3645,110 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+
+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
+ac_aux_dir=
-+for ac_dir in ../../../.. $srcdir/../../../..; do
-+ if test -f $ac_dir/install-sh; then
++for ac_dir in ../../../.. "$srcdir"/../../../..; do
++ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
-+ elif test -f $ac_dir/install.sh; then
++ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
-+ elif test -f $ac_dir/shtool; then
++ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
-+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../.. $srcdir/../../../.." >&5
-+echo "$as_me: error: cannot find install-sh or install.sh in ../../../.. $srcdir/../../../.." >&2;}
-+ { (exit 1); exit 1; }; }
++ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
-+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
++
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
++
+
+
+
+# Make sure we can run config.sub.
-+$ac_config_sub sun4 >/dev/null 2>&1 ||
-+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-+ { (exit 1); exit 1; }; }
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
-+echo "$as_me:$LINENO: checking build system type" >&5
-+echo $ECHO_N "checking build system type... $ECHO_C" >&6
-+if test "${ac_cv_build+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
++$as_echo_n "checking build system type... " >&6; }
++if ${ac_cv_build+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
-+ ac_cv_build_alias=$build_alias
-+test -z "$ac_cv_build_alias" &&
-+ ac_cv_build_alias=`$ac_config_guess`
-+test -z "$ac_cv_build_alias" &&
-+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-+ { (exit 1); exit 1; }; }
-+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
-+ { (exit 1); exit 1; }; }
++ ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
++ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
-+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-+echo "${ECHO_T}$ac_cv_build" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
++$as_echo "$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
++esac
+build=$ac_cv_build
-+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
-+am__api_version="1.9"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
++$as_echo_n "checking host system type... " >&6; }
++if ${ac_cv_host+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test "x$host_alias" = x; then
++ ac_cv_host=$ac_cv_build
++else
++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
++$as_echo "$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
++esac
++host=$ac_cv_host
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
++
++
++am__api_version='1.11'
++
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
@@ -3459,22 +3762,23 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
-+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
++# Reject install programs that cannot install multiple files.
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
++$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
-+if test "${ac_cv_path_install+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++if ${ac_cv_path_install+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ # Account for people who put trailing slashes in PATH elements.
-+case $as_dir/ in
-+ ./ | .// | /cC/* | \
++ # Account for people who put trailing slashes in PATH elements.
++case $as_dir/ in #((
++ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
++ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -3482,7 +3786,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
@@ -3492,30 +3796,43 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
-+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-+ break 3
++ rm -rf conftest.one conftest.two conftest.dir
++ echo one > conftest.one
++ echo two > conftest.two
++ mkdir conftest.dir
++ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
++ test -s conftest.one && test -s conftest.two &&
++ test -s conftest.dir/conftest.one &&
++ test -s conftest.dir/conftest.two
++ then
++ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
++ break 3
++ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
-+done
+
++ done
++IFS=$as_save_IFS
++
++rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
-+ # As a last resort, use the slow shell script. We don't cache a
-+ # path for INSTALL within a source directory, because that will
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
-+ # removed, or if the path is relative.
++ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
-+echo "$as_me:$LINENO: result: $INSTALL" >&5
-+echo "${ECHO_T}$INSTALL" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
++$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
@@ -3525,21 +3842,34 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
-+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
++$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
++# Reject unsafe characters in $srcdir or the absolute working directory
++# name. Accept space and tab only in the latter.
++am_lf='
++'
++case `pwd` in
++ *[\\\"\#\$\&\'\`$am_lf]*)
++ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
++esac
++case $srcdir in
++ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
++ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
++esac
++
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
-+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
++ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
-+ set X `ls -t $srcdir/configure conftest.file`
++ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
@@ -3549,11 +3879,8 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
-+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
-+alias in your environment" >&5
-+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
-+alias in your environment" >&2;}
-+ { (exit 1); exit 1; }; }
++ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
++alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
@@ -3562,81 +3889,206 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ # Ok.
+ :
+else
-+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
-+Check your system clock" >&5
-+echo "$as_me: error: newly created file is older than distributed files!
-+Check your system clock" >&2;}
-+ { (exit 1); exit 1; }; }
++ as_fn_error $? "newly created file is older than distributed files!
++Check your system clock" "$LINENO" 5
+fi
-+echo "$as_me:$LINENO: result: yes" >&5
-+echo "${ECHO_T}yes" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
-+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
++ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
-+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-+# Double any \ or $. echo might interpret backslashes.
++ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
++# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
-+cat <<\_ACEOF >conftest.sed
-+s/[\\$]/&&/g;s/;s,x,x,$//
-+_ACEOF
-+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-+rm conftest.sed
++ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
++program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
-+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
++if test x"${MISSING+set}" != xset; then
++ case $am_aux_dir in
++ *\ * | *\ *)
++ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
++ *)
++ MISSING="\${SHELL} $am_aux_dir/missing" ;;
++ esac
++fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
-+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
++$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
-+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-+ # We used to keeping the `.' as first argument, in order to
-+ # allow $(mkdir_p) to be used without argument. As in
-+ # $(mkdir_p) $(somedir)
-+ # where $(somedir) is conditionally defined. However this is wrong
-+ # for two reasons:
-+ # 1. if the package is installed by a user who cannot write `.'
-+ # make install will fail,
-+ # 2. the above comment should most certainly read
-+ # $(mkdir_p) $(DESTDIR)$(somedir)
-+ # so it does not work when $(somedir) is undefined and
-+ # $(DESTDIR) is not.
-+ # To support the latter case, we have to write
-+ # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-+ # so the `.' trick is pointless.
-+ mkdir_p='mkdir -p --'
++if test x"${install_sh}" != xset; then
++ case $am_aux_dir in
++ *\ * | *\ *)
++ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
++ *)
++ install_sh="\${SHELL} $am_aux_dir/install-sh"
++ esac
++fi
++
++# Installed binaries are usually stripped using `strip' when the user
++# run `make install-strip'. However `strip' might not be the right
++# tool to use in cross-compilation environments, therefore Automake
++# will honor the `STRIP' environment variable to overrule this program.
++if test "$cross_compiling" != no; then
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
++set dummy ${ac_tool_prefix}strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_STRIP+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
-+ # On NextStep and OpenStep, the `mkdir' command does not
-+ # recognize any option. It will interpret all options as
-+ # directories to create, and then abort because `.' already
-+ # exists.
-+ for d in ./-p ./--version;
-+ do
-+ test -d $d && rmdir $d
++ if test -n "$STRIP"; then
++ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
+ done
-+ # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-+ if test -f "$ac_aux_dir/mkinstalldirs"; then
-+ mkdir_p='$(mkinstalldirs)'
++IFS=$as_save_IFS
++
++fi
++fi
++STRIP=$ac_cv_prog_STRIP
++if test -n "$STRIP"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
++$as_echo "$STRIP" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_STRIP"; then
++ ac_ct_STRIP=$STRIP
++ # Extract the first word of "strip", so it can be a program name with args.
++set dummy strip; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$ac_ct_STRIP"; then
++ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_STRIP="strip"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
++if test -n "$ac_ct_STRIP"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
++$as_echo "$ac_ct_STRIP" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ if test "x$ac_ct_STRIP" = x; then
++ STRIP=":"
+ else
-+ mkdir_p='$(install_sh) -d'
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ STRIP=$ac_ct_STRIP
++ fi
++else
++ STRIP="$ac_cv_prog_STRIP"
++fi
++
++fi
++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
++$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
++if test -z "$MKDIR_P"; then
++ if ${ac_cv_path_mkdir+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in mkdir gmkdir; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
++ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
++ 'mkdir (GNU coreutils) '* | \
++ 'mkdir (coreutils) '* | \
++ 'mkdir (fileutils) '4.1*)
++ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
++ break 3;;
++ esac
++ done
++ done
++ done
++IFS=$as_save_IFS
++
++fi
++
++ test -d ./--version && rmdir ./--version
++ if test "${ac_cv_path_mkdir+set}" = set; then
++ MKDIR_P="$ac_cv_path_mkdir -p"
++ else
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for MKDIR_P within a source directory, because that will
++ # break other packages using the cache if that directory is
++ # removed, or if the value is a relative name.
++ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
++$as_echo "$MKDIR_P" >&6; }
++
++mkdir_p="$MKDIR_P"
++case $mkdir_p in
++ [\\/$]* | ?:[\\/]*) ;;
++ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
++esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_AWK+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_AWK+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -3646,55 +4098,59 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
-+ echo "$as_me:$LINENO: result: $AWK" >&5
-+echo "${ECHO_T}$AWK" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
++$as_echo "$AWK" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
++
+ test -n "$AWK" && break
+done
+
-+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
++set x ${MAKE-make}
++ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
+all:
-+ @echo 'ac_maketemp="$(MAKE)"'
++ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
-+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-+if test -n "$ac_maketemp"; then
-+ eval ac_cv_prog_make_${ac_make}_set=yes
-+else
-+ eval ac_cv_prog_make_${ac_make}_set=no
-+fi
++# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++ *@@@%%%=?*=@@@%%%*)
++ eval ac_cv_prog_make_${ac_make}_set=yes;;
++ *)
++ eval ac_cv_prog_make_${ac_make}_set=no;;
++esac
+rm -f conftest.make
+fi
-+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-+ echo "$as_me:$LINENO: result: yes" >&5
-+echo "${ECHO_T}yes" >&6
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
+ SET_MAKE=
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
@@ -3709,60 +4165,58 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+DEPDIR="${am__leading_dot}deps"
+
-+ ac_config_commands="$ac_config_commands depfiles"
++ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
-+ @echo done
++ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
-+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
++$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
-+# We grep out `Entering directory' and `Leaving directory'
-+# messages which can occur if `w' ends up in MAKEFLAGS.
-+# In particular we don't look at `^make:' because GNU make might
-+# be invoked under some other name (usually "gmake"), in which
-+# case it prints its new name instead of `make'.
-+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-+ am__include=include
-+ am__quote=
-+ _am_result=GNU
-+fi
++# Ignore all kinds of additional output from `make'.
++case `$am_make -s -f confmf 2> /dev/null` in #(
++*the\ am__doit\ target*)
++ am__include=include
++ am__quote=
++ _am_result=GNU
++ ;;
++esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
-+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-+ am__include=.include
-+ am__quote="\""
-+ _am_result=BSD
-+ fi
++ case `$am_make -s -f confmf 2> /dev/null` in #(
++ *the\ am__doit\ target*)
++ am__include=.include
++ am__quote="\""
++ _am_result=BSD
++ ;;
++ esac
+fi
+
+
-+echo "$as_me:$LINENO: result: $_am_result" >&5
-+echo "${ECHO_T}$_am_result" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
++$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
-+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
-+if test "${enable_dependency_tracking+set}" = set; then
-+ enableval="$enable_dependency_tracking"
++# Check whether --enable-dependency-tracking was given.
++if test "${enable_dependency_tracking+set}" = set; then :
++ enableval=$enable_dependency_tracking;
++fi
+
-+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
-+
-+
-+if test "x$enable_dependency_tracking" != xno; then
++ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
@@ -3772,119 +4226,100 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+
+
-+
-+# Check whether --enable-multilib or --disable-multilib was given.
-+if test "${enable_multilib+set}" = set; then
-+ enableval="$enable_multilib"
-+ case "${enableval}" in
++# Check whether --enable-multilib was given.
++if test "${enable_multilib+set}" = set; then :
++ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for multilib option" >&5
-+echo "$as_me: error: bad value ${enableval} for multilib option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
-+fi;
-+# Check whether --enable-target-optspace or --disable-target-optspace was given.
-+if test "${enable_target_optspace+set}" = set; then
-+ enableval="$enable_target_optspace"
-+ case "${enableval}" in
++fi
++
++# Check whether --enable-target-optspace was given.
++if test "${enable_target_optspace+set}" = set; then :
++ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for target-optspace option" >&5
-+echo "$as_me: error: bad value ${enableval} for target-optspace option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
-+fi;
-+# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-+if test "${enable_malloc_debugging+set}" = set; then
-+ enableval="$enable_malloc_debugging"
-+ case "${enableval}" in
++fi
++
++# Check whether --enable-malloc-debugging was given.
++if test "${enable_malloc_debugging+set}" = set; then :
++ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for malloc-debugging option" >&5
-+echo "$as_me: error: bad value ${enableval} for malloc-debugging option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
-+fi;
-+# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-+if test "${enable_newlib_multithread+set}" = set; then
-+ enableval="$enable_newlib_multithread"
-+ case "${enableval}" in
++fi
++
++# Check whether --enable-newlib-multithread was given.
++if test "${enable_newlib_multithread+set}" = set; then :
++ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-multithread option" >&5
-+echo "$as_me: error: bad value ${enableval} for newlib-multithread option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
-+fi;
-+# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-+if test "${enable_newlib_iconv+set}" = set; then
-+ enableval="$enable_newlib_iconv"
-+ if test "${newlib_iconv+set}" != set; then
++fi
++
++# Check whether --enable-newlib-iconv was given.
++if test "${enable_newlib_iconv+set}" = set; then :
++ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-iconv option" >&5
-+echo "$as_me: error: bad value ${enableval} for newlib-iconv option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
-+fi;
-+# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-+if test "${enable_newlib_elix_level+set}" = set; then
-+ enableval="$enable_newlib_elix_level"
-+ case "${enableval}" in
++fi
++
++# Check whether --enable-newlib-elix-level was given.
++if test "${enable_newlib_elix_level+set}" = set; then :
++ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-elix-level option" >&5
-+echo "$as_me: error: bad value ${enableval} for newlib-elix-level option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
-+fi;
-+# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-+if test "${enable_newlib_io_float+set}" = set; then
-+ enableval="$enable_newlib_io_float"
-+ case "${enableval}" in
++fi
++
++# Check whether --enable-newlib-io-float was given.
++if test "${enable_newlib_io_float+set}" = set; then :
++ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-io-float option" >&5
-+echo "$as_me: error: bad value ${enableval} for newlib-io-float option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
-+fi;
-+# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-+if test "${enable_newlib_supplied_syscalls+set}" = set; then
-+ enableval="$enable_newlib_supplied_syscalls"
-+ case "${enableval}" in
++fi
++
++# Check whether --enable-newlib-supplied-syscalls was given.
++if test "${enable_newlib_supplied_syscalls+set}" = set; then :
++ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
-+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-supplied-syscalls option" >&5
-+echo "$as_me: error: bad value ${enableval} for newlib-supplied-syscalls option" >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
-+fi;
++fi
+
-+
-+if test x${newlib_may_supply_syscalls} = xyes; then
++ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
@@ -3907,35 +4342,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+fi
+
+
-+echo "$as_me:$LINENO: checking host system type" >&5
-+echo $ECHO_N "checking host system type... $ECHO_C" >&6
-+if test "${ac_cv_host+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ ac_cv_host_alias=$host_alias
-+test -z "$ac_cv_host_alias" &&
-+ ac_cv_host_alias=$ac_cv_build_alias
-+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-+ { (exit 1); exit 1; }; }
-+
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-+echo "${ECHO_T}$ac_cv_host" >&6
-+host=$ac_cv_host
-+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
-+
-+# test to see if srcdir already configured
-+if test "`cd $srcdir && pwd`" != "`pwd`" &&
-+ test -f $srcdir/config.status; then
-+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
-+ { (exit 1); exit 1; }; }
++if test "`cd $srcdir && pwd`" != "`pwd`"; then
++ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
++ # is not polluted with repeated "-I."
++ am__isrc=' -I$(srcdir)'
++ # test to see if srcdir already configured
++ if test -f $srcdir/config.status; then
++ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
++ fi
+fi
+
+# test whether we have cygpath
@@ -3950,7 +4366,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+# Define the identity of the package.
+ PACKAGE='newlib'
-+ VERSION='1.15.0'
++ VERSION='1.20.0'
+
+
+# Some tools Automake needs.
@@ -3969,96 +4385,6 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
-+install_sh=${install_sh-"$am_aux_dir/install-sh"}
-+
-+# Installed binaries are usually stripped using `strip' when the user
-+# run `make install-strip'. However `strip' might not be the right
-+# tool to use in cross-compilation environments, therefore Automake
-+# will honor the `STRIP' environment variable to overrule this program.
-+if test "$cross_compiling" != no; then
-+ if test -n "$ac_tool_prefix"; then
-+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-+set dummy ${ac_tool_prefix}strip; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_STRIP+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test -n "$STRIP"; then
-+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+fi
-+fi
-+STRIP=$ac_cv_prog_STRIP
-+if test -n "$STRIP"; then
-+ echo "$as_me:$LINENO: result: $STRIP" >&5
-+echo "${ECHO_T}$STRIP" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+fi
-+if test -z "$ac_cv_prog_STRIP"; then
-+ ac_ct_STRIP=$STRIP
-+ # Extract the first word of "strip", so it can be a program name with args.
-+set dummy strip; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test -n "$ac_ct_STRIP"; then
-+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+ ac_cv_prog_ac_ct_STRIP="strip"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+ break 2
-+ fi
-+done
-+done
-+
-+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-+fi
-+fi
-+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-+if test -n "$ac_ct_STRIP"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-+echo "${ECHO_T}$ac_ct_STRIP" >&6
-+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+ STRIP=$ac_ct_STRIP
-+else
-+ STRIP="$ac_cv_prog_STRIP"
-+fi
-+
-+fi
-+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
@@ -4086,10 +4412,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_CC+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CC+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -4099,33 +4425,35 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
-+ echo "$as_me:$LINENO: result: $CC" >&5
-+echo "${ECHO_T}$CC" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
+
++
+depcc="$CC" am_compiler_list=
+
-+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
-+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
++$as_echo_n "checking dependency style of $depcc... " >&6; }
++if ${am_cv_CC_dependencies_compiler_type+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
@@ -4150,6 +4478,11 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
++ am__universal=false
++ case " $depcc " in #(
++ *\ -arch\ *\ -arch\ *) am__universal=true ;;
++ esac
++
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
@@ -4167,7 +4500,17 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
++ # We check with `-c' and `-o' for the sake of the "dashmstdout"
++ # mode. It turns out that the SunPro C++ compiler does not properly
++ # handle `-M -o', and we need to detect this. Also, some Intel
++ # versions had trouble with output in subdirs
++ am__obj=sub/conftest.${OBJEXT-o}
++ am__minus_obj="-o $am__obj"
+ case $depmode in
++ gcc)
++ # This depmode causes a compiler race in universal mode.
++ test "$am__universal" = false || continue
++ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
@@ -4177,18 +4520,23 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ break
+ fi
+ ;;
++ msvisualcpp | msvcmsys)
++ # This compiler won't grok `-c -o', but also, the minuso test has
++ # not run yet. These depmodes are late enough in the game, and
++ # so weak that their functioning should not be impacted.
++ am__obj=conftest.${OBJEXT-o}
++ am__minus_obj=
++ ;;
+ none) break ;;
+ esac
-+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
-+ # mode. It turns out that the SunPro C++ compiler does not properly
-+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
-+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
++ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
++ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
++ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
++ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
@@ -4212,13 +4560,11 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+fi
+
+fi
-+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
++$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
-+
-+
-+if
++ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
@@ -4232,10 +4578,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_CC+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_CC+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -4246,18 +4592,19 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
@@ -4275,22 +4622,21 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
-+ echo "$as_me:$LINENO: result: $CC" >&5
-+echo "${ECHO_T}$CC" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
++$as_echo "$CC" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
-+ test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
-+ { (exit 1); exit 1; }; }
++
++ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
-+echo "$as_me:$LINENO: checking whether we are using GNU C" >&5
-+echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6
-+if test "${ac_cv_c_compiler_gnu+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
++$as_echo_n "checking whether we are using GNU C... " >&6; }
++if ${ac_cv_c_compiler_gnu+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <&5
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
-+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
++$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
-+ CFLAGS=
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
-+CFLAGS="-g"
-+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-+if test "${ac_cv_prog_cc_g+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
++$as_echo_n "checking whether $CC accepts -g... " >&6; }
++if ${ac_cv_prog_cc_g+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
-+ cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
++ ac_save_c_werror_flag=$ac_c_werror_flag
++ ac_c_werror_flag=yes
++ ac_cv_prog_cc_g=no
++ CFLAGS="-g"
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
@@ -4339,39 +4683,49 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ return 0;
+}
+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-+ (eval $ac_compile) 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } &&
-+ { ac_try='test -z "$ac_c_werror_flag"
-+ || test ! -s conftest.err'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; } &&
-+ { ac_try='test -s conftest.$ac_objext'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }; then
++if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
++ CFLAGS=""
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
+
-+ac_cv_prog_cc_g=no
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++else
++ ac_c_werror_flag=$ac_save_c_werror_flag
++ CFLAGS="-g"
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ ac_cv_prog_cc_g=yes
+fi
-+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
-+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
++$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
@@ -4403,10 +4757,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_AS+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_AS+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
@@ -4416,35 +4770,37 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
-+ echo "$as_me:$LINENO: result: $AS" >&5
-+echo "${ECHO_T}$AS" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
++$as_echo "$AS" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
++
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_AS+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
@@ -4454,27 +4810,38 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-+echo "${ECHO_T}$ac_ct_AS" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
++$as_echo "$ac_ct_AS" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
-+ AS=$ac_ct_AS
++ if test "x$ac_ct_AS" = x; then
++ AS=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ AS=$ac_ct_AS
++ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
@@ -4482,10 +4849,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_AR+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_AR+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -4495,35 +4862,37 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
-+ echo "$as_me:$LINENO: result: $AR" >&5
-+echo "${ECHO_T}$AR" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
++
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_AR+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
@@ -4533,27 +4902,38 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-+echo "${ECHO_T}$ac_ct_AR" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
-+ AR=$ac_ct_AR
++ if test "x$ac_ct_AR" = x; then
++ AR=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ AR=$ac_ct_AR
++ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
@@ -4561,10 +4941,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_RANLIB+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_RANLIB+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -4574,35 +4954,37 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
-+ echo "$as_me:$LINENO: result: $RANLIB" >&5
-+echo "${ECHO_T}$RANLIB" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
++$as_echo "$RANLIB" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
++
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -4612,28 +4994,38 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
-+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-+echo "${ECHO_T}$ac_ct_RANLIB" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
++$as_echo "$ac_ct_RANLIB" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
-+ RANLIB=$ac_ct_RANLIB
++ if test "x$ac_ct_RANLIB" = x; then
++ RANLIB=":"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ RANLIB=$ac_ct_RANLIB
++ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
@@ -4641,10 +5033,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_READELF+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_READELF+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
@@ -4654,35 +5046,37 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
-+ echo "$as_me:$LINENO: result: $READELF" >&5
-+echo "${ECHO_T}$READELF" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
++$as_echo "$READELF" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
++
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_READELF+:} false; then :
++ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
@@ -4692,130 +5086,61 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
-+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
-+done
++ done
++IFS=$as_save_IFS
+
-+ test -z "$ac_cv_prog_ac_ct_READELF" && ac_cv_prog_ac_ct_READELF=":"
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
-+ echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
-+echo "${ECHO_T}$ac_ct_READELF" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
++$as_echo "$ac_ct_READELF" >&6; }
+else
-+ echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
+fi
+
-+ READELF=$ac_ct_READELF
++ if test "x$ac_ct_READELF" = x; then
++ READELF=":"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ READELF=$ac_ct_READELF
++ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
-+# Find a good install program. We prefer a C program (faster),
-+# so one script is as good as another. But avoid the broken or
-+# incompatible versions:
-+# SysV /etc/install, /usr/sbin/install
-+# SunOS /usr/etc/install
-+# IRIX /sbin/install
-+# AIX /bin/install
-+# AmigaOS /C/install, which installs bootblocks on floppy discs
-+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-+# OS/2's system install, which has a completely different semantic
-+# ./install, which can be erroneously created by make from ./install.sh.
-+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-+if test -z "$INSTALL"; then
-+if test "${ac_cv_path_install+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ # Account for people who put trailing slashes in PATH elements.
-+case $as_dir/ in
-+ ./ | .// | /cC/* | \
-+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
-+ /usr/ucb/* ) ;;
-+ *)
-+ # OSF1 and SCO ODT 3.0 have their own names for install.
-+ # Don't use installbsd from OSF since it installs stuff as root
-+ # by default.
-+ for ac_prog in ginstall scoinst install; do
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-+ if test $ac_prog = install &&
-+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-+ # AIX install. It has an incompatible calling convention.
-+ :
-+ elif test $ac_prog = install &&
-+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-+ # program-specific install script used by HP pwplus--don't use.
-+ :
-+ else
-+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-+ break 3
-+ fi
-+ fi
-+ done
-+ done
-+ ;;
-+esac
-+done
-+
-+
-+fi
-+ if test "${ac_cv_path_install+set}" = set; then
-+ INSTALL=$ac_cv_path_install
-+ else
-+ # As a last resort, use the slow shell script. We don't cache a
-+ # path for INSTALL within a source directory, because that will
-+ # break other packages using the cache if that directory is
-+ # removed, or if the path is relative.
-+ INSTALL=$ac_install_sh
-+ fi
-+fi
-+echo "$as_me:$LINENO: result: $INSTALL" >&5
-+echo "${ECHO_T}$INSTALL" >&6
-+
-+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-+# It thinks the first close brace ends the variable substitution.
-+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-+
-+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-+
-+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
-+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
-+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-+if test "${enable_maintainer_mode+set}" = set; then
-+ enableval="$enable_maintainer_mode"
-+ USE_MAINTAINER_MODE=$enableval
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
++$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
++ # Check whether --enable-maintainer-mode was given.
++if test "${enable_maintainer_mode+set}" = set; then :
++ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
-+fi;
-+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
++fi
+
-+
-+if test $USE_MAINTAINER_MODE = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
++$as_echo "$USE_MAINTAINER_MODE" >&6; }
++ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
@@ -4853,12 +5178,13 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
++NO_INCLUDE_LIST=${noinclude}
++
++
+LDFLAGS=${ldflags}
+
+
-+
-+
-+if test x${newlib_elix_level} = x0; then
++ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
@@ -4866,9 +5192,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ ELIX_LEVEL_0_FALSE=
+fi
+
-+
-+
-+if test x${newlib_elix_level} = x1; then
++ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
@@ -4876,9 +5200,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ ELIX_LEVEL_1_FALSE=
+fi
+
-+
-+
-+if test x${newlib_elix_level} = x2; then
++ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
@@ -4886,9 +5208,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ ELIX_LEVEL_2_FALSE=
+fi
+
-+
-+
-+if test x${newlib_elix_level} = x3; then
++ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
@@ -4896,9 +5216,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ ELIX_LEVEL_3_FALSE=
+fi
+
-+
-+
-+if test x${newlib_elix_level} = x4; then
++ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
@@ -4907,9 +5225,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+fi
+
+
-+
-+
-+if test x${use_libtool} = xyes; then
++ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
@@ -4932,7 +5248,7 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+
+
-+ ac_config_files="$ac_config_files Makefile"
++ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
@@ -4952,39 +5268,70 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
-+# So, don't put newlines in cache variables' values.
++# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
-+{
++(
++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
++ *) { eval $ac_var=; unset $ac_var;} ;;
++ esac ;;
++ esac
++ done
++
+ (set) 2>&1 |
-+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
-+ *ac_space=\ *)
-+ # `set' does not quote correctly, so add quotes (double-quote
-+ # substitution turns \\\\ into \\, and sed turns \\ into \).
++ case $as_nl`(ac_space=' '; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
++ # `set' does not quote correctly, so add quotes: double-quote
++ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-+ ;;
++ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
-+ sed -n \
-+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
-+ esac;
-+} |
++ esac |
++ sort
++) |
+ sed '
++ /^ac_cv_env_/b end
+ t clear
-+ : clear
++ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
-+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-+ : end' >>confcache
-+if diff $cache_file confcache >/dev/null 2>&1; then :; else
-+ if test -w $cache_file; then
-+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-+ cat confcache >$cache_file
++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++ :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++ if test -w "$cache_file"; then
++ if test "x$cache_file" != "x/dev/null"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
++$as_echo "$as_me: updating cache $cache_file" >&6;}
++ if test ! -f "$cache_file" || test -h "$cache_file"; then
++ cat confcache >"$cache_file"
++ else
++ case $cache_file in #(
++ */* | ?:*)
++ mv -f confcache "$cache_file"$$ &&
++ mv -f "$cache_file"$$ "$cache_file" ;; #(
++ *)
++ mv -f confcache "$cache_file" ;;
++ esac
++ fi
++ fi
+ else
-+ echo "not updating unwritable cache $cache_file"
++ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
++$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
@@ -4993,63 +5340,55 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
-+# VPATH may cause trouble with some makes, so we remove $(srcdir),
-+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-+# trailing colons and then remove the whole line if VPATH becomes empty
-+# (actually we leave an empty line to preserve line numbers).
-+if test "x$srcdir" = x.; then
-+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
-+s/:*\$(srcdir):*/:/;
-+s/:*\${srcdir}:*/:/;
-+s/:*@srcdir@:*/:/;
-+s/^\([^=]*=[ ]*\):*/\1/;
-+s/:*$//;
-+s/^[^=]*=[ ]*$//;
-+}'
-+fi
-+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
-+# take arguments), then we branch to the quote section. Otherwise,
++# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
-+cat >confdef2opt.sed <<\_ACEOF
++ac_script='
++:mline
++/\\$/{
++ N
++ s,\\\n,,
++ b mline
++}
+t clear
-+: clear
-+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
++:clear
++s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
-+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
++s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
-+d
-+: quote
-+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-+s,\[,\\&,g
-+s,\],\\&,g
-+s,\$,$$,g
-+p
-+_ACEOF
-+# We use echo to avoid assuming a particular line-breaking character.
-+# The extra dot is to prevent the shell from consuming trailing
-+# line-breaks from the sub-command output. A line-break within
-+# single-quotes doesn't work because, if this script is created in a
-+# platform that uses two characters for line-breaks (e.g., DOS), tr
-+# would break.
-+ac_LF_and_DOT=`echo; echo .`
-+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-+rm -f confdef2opt.sed
++b any
++:quote
++s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
++s/\[/\\&/g
++s/\]/\\&/g
++s/\$/$$/g
++H
++:any
++${
++ g
++ s/^\n//
++ s/\n/ /g
++ p
++}
++'
++DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
++U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
-+ ac_i=`echo "$ac_i" |
-+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-+ # 2. Add them.
-+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
++ # will be set to the directory where LIBOBJS objects are built.
++ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
@@ -5057,82 +5396,55 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"AMDEP\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_0\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"ELIX_LEVEL_0\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_1\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"ELIX_LEVEL_1\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_2\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"ELIX_LEVEL_2\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_3\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"ELIX_LEVEL_3\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"ELIX_LEVEL_4\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"ELIX_LEVEL_4\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"USE_LIBTOOL\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"USE_LIBTOOL\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
++ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
-+: ${CONFIG_STATUS=./config.status}
++if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
++ as_fn_error $? "conditional \"AMDEP\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
++ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
++ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
++ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
++ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
++ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
++ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
++ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
++ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++
++: "${CONFIG_STATUS=./config.status}"
++ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-+echo "$as_me: creating $CONFIG_STATUS" >&6;}
-+cat >$CONFIG_STATUS <<_ACEOF
++{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
++$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
++as_write_fail=0
++cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
@@ -5142,81 +5454,253 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
++
+SHELL=\${CONFIG_SHELL-$SHELL}
-+_ACEOF
++export SHELL
++_ASEOF
++cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
++## -------------------- ##
++## M4sh Initialization. ##
++## -------------------- ##
+
-+cat >>$CONFIG_STATUS <<\_ACEOF
-+## --------------------- ##
-+## M4sh Initialization. ##
-+## --------------------- ##
-+
-+# Be Bourne compatible
-+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
-+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
-+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-+ set -o posix
-+fi
-+DUALCASE=1; export DUALCASE # for MKS sh
-+
-+# Support unset when possible.
-+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-+ as_unset=unset
++ setopt NO_GLOB_SUBST
+else
-+ as_unset=false
++ case `(set -o) 2>/dev/null` in #(
++ *posix*) :
++ set -o posix ;; #(
++ *) :
++ ;;
++esac
+fi
+
+
-+# Work around bugs in pre-3.0 UWIN ksh.
-+$as_unset ENV MAIL MAILPATH
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++# Prefer a ksh shell builtin over an external printf program on Solaris,
++# but without wasting forks for bash or zsh.
++if test -z "$BASH_VERSION$ZSH_VERSION" \
++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
++ as_echo='print -r --'
++ as_echo_n='print -rn --'
++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++ as_echo='printf %s\n'
++ as_echo_n='printf %s'
++else
++ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++ as_echo_n='/usr/ucb/echo -n'
++ else
++ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++ as_echo_n_body='eval
++ arg=$1;
++ case $arg in #(
++ *"$as_nl"*)
++ expr "X$arg" : "X\\(.*\\)$as_nl";
++ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++ esac;
++ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++ '
++ export as_echo_n_body
++ as_echo_n='sh -c $as_echo_n_body as_echo'
++ fi
++ export as_echo_body
++ as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ PATH_SEPARATOR=:
++ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++ PATH_SEPARATOR=';'
++ }
++fi
++
++
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++as_myself=
++case $0 in #((
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++ done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ exit 1
++fi
++
++# Unset variables that we do not need and which cause bugs (e.g. in
++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
++# suppresses any "Segmentation fault" message there. '((' could
++# trigger a bug in pdksh 5.2.14.
++for as_var in BASH_ENV ENV MAIL MAILPATH
++do eval test x\${$as_var+set} = xset \
++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
++done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
-+for as_var in \
-+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-+ LC_TELEPHONE LC_TIME
-+do
-+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-+ eval $as_var=C; export $as_var
-+ else
-+ $as_unset $as_var
-+ fi
-+done
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
+
-+# Required to use basename.
-+if expr a : '\(a\)' >/dev/null 2>&1; then
++# CDPATH.
++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
++
++
++# as_fn_error STATUS ERROR [LINENO LOG_FD]
++# ----------------------------------------
++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
++# script with STATUS, using 1 if that was 0.
++as_fn_error ()
++{
++ as_status=$1; test $as_status -eq 0 && as_status=1
++ if test "$4"; then
++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
++ fi
++ $as_echo "$as_me: error: $2" >&2
++ as_fn_exit $as_status
++} # as_fn_error
++
++
++# as_fn_set_status STATUS
++# -----------------------
++# Set $? to STATUS, without forking.
++as_fn_set_status ()
++{
++ return $1
++} # as_fn_set_status
++
++# as_fn_exit STATUS
++# -----------------
++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
++as_fn_exit ()
++{
++ set +e
++ as_fn_set_status $1
++ exit $1
++} # as_fn_exit
++
++# as_fn_unset VAR
++# ---------------
++# Portably unset VAR.
++as_fn_unset ()
++{
++ { eval $1=; unset $1;}
++}
++as_unset=as_fn_unset
++# as_fn_append VAR VALUE
++# ----------------------
++# Append the text in VALUE to the end of the definition contained in VAR. Take
++# advantage of any shell optimizations that allow amortized linear growth over
++# repeated appends, instead of the typical quadratic growth present in naive
++# implementations.
++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
++ eval 'as_fn_append ()
++ {
++ eval $1+=\$2
++ }'
++else
++ as_fn_append ()
++ {
++ eval $1=\$$1\$2
++ }
++fi # as_fn_append
++
++# as_fn_arith ARG...
++# ------------------
++# Perform arithmetic evaluation on the ARGs, and store the result in the
++# global $as_val. Take advantage of shells that can avoid forks. The arguments
++# must be portable across $(()) and expr.
++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
++ eval 'as_fn_arith ()
++ {
++ as_val=$(( $* ))
++ }'
++else
++ as_fn_arith ()
++ {
++ as_val=`expr "$@" || test $? -eq 1`
++ }
++fi # as_fn_arith
++
++
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
-+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
+
-+# Name of the executable.
-+as_me=`$as_basename "$0" ||
++as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
-+ X"$0" : 'X\(/\)$' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X/"$0" |
-+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-+ /^X\/\(\/\/\)$/{ s//\1/; q; }
-+ /^X\/\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X/"$0" |
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+
-+
-+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -5224,148 +5708,123 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
-+# The user is always right.
-+if test "${PATH_SEPARATOR+set}" != set; then
-+ echo "#! /bin/sh" >conf$$.sh
-+ echo "exit 0" >>conf$$.sh
-+ chmod +x conf$$.sh
-+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-+ PATH_SEPARATOR=';'
-+ else
-+ PATH_SEPARATOR=:
-+ fi
-+ rm -f conf$$.sh
-+fi
-+
-+
-+ as_lineno_1=$LINENO
-+ as_lineno_2=$LINENO
-+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-+ test "x$as_lineno_1" != "x$as_lineno_2" &&
-+ test "x$as_lineno_3" = "x$as_lineno_2" || {
-+ # Find who we are. Look in the path if we contain no path at all
-+ # relative or not.
-+ case $0 in
-+ *[\\/]* ) as_myself=$0 ;;
-+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-+done
-+
-+ ;;
-+ esac
-+ # We did not find ourselves, most probably we were run as `sh COMMAND'
-+ # in which case we are not to be found in the path.
-+ if test "x$as_myself" = x; then
-+ as_myself=$0
-+ fi
-+ if test ! -f "$as_myself"; then
-+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-+ { (exit 1); exit 1; }; }
-+ fi
-+ case $CONFIG_SHELL in
-+ '')
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for as_base in sh bash ksh sh5; do
-+ case $as_dir in
-+ /*)
-+ if ("$as_dir/$as_base" -c '
-+ as_lineno_1=$LINENO
-+ as_lineno_2=$LINENO
-+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-+ test "x$as_lineno_1" != "x$as_lineno_2" &&
-+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
-+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-+ CONFIG_SHELL=$as_dir/$as_base
-+ export CONFIG_SHELL
-+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-+ fi;;
-+ esac
-+ done
-+done
-+;;
-+ esac
-+
-+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-+ # uniformly replaced by the line number. The first 'sed' inserts a
-+ # line-number line before each line; the second 'sed' does the real
-+ # work. The second script uses 'N' to pair each line-number line
-+ # with the numbered line, and appends trailing '-' during
-+ # substitution so that $LINENO is not a special case at line end.
-+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
-+ sed '=' <$as_myself |
-+ sed '
-+ N
-+ s,$,-,
-+ : loop
-+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-+ t loop
-+ s,-$,,
-+ s,^['$as_cr_digits']*\n,,
-+ ' >$as_me.lineno &&
-+ chmod +x $as_me.lineno ||
-+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
-+ { (exit 1); exit 1; }; }
-+
-+ # Don't try to exec as it changes $[0], causing all sort of problems
-+ # (the dirname of $[0] is not the place where we might find the
-+ # original and so on. Autoconf is especially sensible to this).
-+ . ./$as_me.lineno
-+ # Exit status is that of the last command.
-+ exit
-+}
-+
-+
-+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-+ *c*,-n*) ECHO_N= ECHO_C='
-+' ECHO_T=' ' ;;
-+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in #(((((
++-n*)
++ case `echo 'xy\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ xy) ECHO_C='\c';;
++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
++ ECHO_T=' ';;
++ esac;;
++*)
++ ECHO_N='-n';;
+esac
+
-+if expr a : '\(a\)' >/dev/null 2>&1; then
-+ as_expr=expr
-+else
-+ as_expr=false
-+fi
-+
+rm -f conf$$ conf$$.exe conf$$.file
-+echo >conf$$.file
-+if ln -s conf$$.file conf$$ 2>/dev/null; then
-+ # We could just check for DJGPP; but this test a) works b) is more generic
-+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-+ if test -f conf$$.exe; then
-+ # Don't use ln at all; we don't have any links
-+ as_ln_s='cp -p'
-+ else
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir 2>/dev/null
++fi
++if (echo >conf$$.file) 2>/dev/null; then
++ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
++ as_ln_s='cp -p'
++ elif ln conf$$.file conf$$ 2>/dev/null; then
++ as_ln_s=ln
++ else
++ as_ln_s='cp -p'
+ fi
-+elif ln conf$$.file conf$$ 2>/dev/null; then
-+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
-+rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
+
++
++# as_fn_mkdir_p
++# -------------
++# Create "$as_dir" as a directory, including parents if necessary.
++as_fn_mkdir_p ()
++{
++
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || eval $as_mkdir_p || {
++ as_dirs=
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
++ X"$as_dir" : 'X\(//\)[^/]' \| \
++ X"$as_dir" : 'X\(//\)$' \| \
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$as_dir" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
++ done
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
++
++
++} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
-+ as_mkdir_p=:
++ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
-+as_executable_p="test -f"
++if test -x / >/dev/null 2>&1; then
++ as_test_x='test -x'
++else
++ if ls -dL / >/dev/null 2>&1; then
++ as_ls_L_option=L
++ else
++ as_ls_L_option=
++ fi
++ as_test_x='
++ eval sh -c '\''
++ if test -d "$1"; then
++ test -d "$1/.";
++ else
++ case $1 in #(
++ -*)set "./$1";;
++ esac;
++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
++ ???[sx]*):;;*)false;;esac;fi
++ '\'' sh
++ '
++fi
++as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -5374,31 +5833,20 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
-+# IFS
-+# We need space, tab and new line, in precisely that order.
-+as_nl='
-+'
-+IFS=" $as_nl"
-+
-+# CDPATH.
-+$as_unset CDPATH
-+
+exec 6>&1
++## ----------------------------------- ##
++## Main body of $CONFIG_STATUS script. ##
++## ----------------------------------- ##
++_ASEOF
++test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
-+# Open the log real soon, to keep \$[0] and so on meaningful, and to
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
-+# values after options handling. Logging --version etc. is OK.
-+exec 5>>config.log
-+{
-+ echo
-+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-+## Running $as_me. ##
-+_ASBOX
-+} >&5
-+cat >&5 <<_CSEOF
-+
-+This file was extended by newlib $as_me 1.15.0, which was
-+generated by GNU Autoconf 2.59. Invocation command line was
++# values after options handling.
++ac_log="
++This file was extended by newlib $as_me 1.20.0, which was
++generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5406,43 +5854,41 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
-+_CSEOF
-+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-+echo >&5
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
+_ACEOF
+
++case $ac_config_files in *"
++"*) set x $ac_config_files; shift; ac_config_files=$*;;
++esac
++
++
++
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
-+if test -n "$ac_config_files"; then
-+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-+fi
++config_files="$ac_config_files"
++config_commands="$ac_config_commands"
+
-+if test -n "$ac_config_headers"; then
-+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-+fi
-+
-+if test -n "$ac_config_links"; then
-+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-+fi
-+
-+if test -n "$ac_config_commands"; then
-+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-+fi
-+
-+cat >>$CONFIG_STATUS <<\_ACEOF
++_ACEOF
+
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
-+\`$as_me' instantiates files from templates according to the
-+current configuration.
++\`$as_me' instantiates files and other configuration actions
++from templates according to the current configuration. Unless the files
++and actions are specified as TAGs, all are instantiated by default.
+
-+Usage: $0 [OPTIONS] [FILE]...
++Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
-+ -V, --version print version number, then exit
-+ -q, --quiet do not print progress messages
++ -V, --version print version number and configuration settings, then exit
++ --config print configuration, then exit
++ -q, --quiet, --silent
++ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
-+ --file=FILE[:TEMPLATE]
-+ instantiate the configuration file FILE
++ --file=FILE[:TEMPLATE]
++ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
@@ -5450,84 +5896,81 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+Configuration commands:
+$config_commands
+
-+Report bugs to ."
++Report bugs to the package provider."
++
+_ACEOF
-+
-+cat >>$CONFIG_STATUS <<_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
-+newlib config.status 1.15.0
-+configured by $0, generated by GNU Autoconf 2.59,
-+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
++newlib config.status 1.20.0
++configured by $0, generated by GNU Autoconf 2.68,
++ with options \\"\$ac_cs_config\\"
+
-+Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
-+srcdir=$srcdir
-+INSTALL="$INSTALL"
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++INSTALL='$INSTALL'
++MKDIR_P='$MKDIR_P'
++AWK='$AWK'
++test -n "\$AWK" || AWK=awk
+_ACEOF
+
-+cat >>$CONFIG_STATUS <<\_ACEOF
-+# If no file are specified by the user, then we need to provide default
-+# value. By we need to know if files were specified by the user.
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
-+ --*=*)
-+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
-+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
++ --*=?*)
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
-+ -*)
++ --*=)
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=
++ ac_shift=:
++ ;;
++ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
-+ *) # This is not an option, so the user has probably given explicit
-+ # arguments.
-+ ac_option=$1
-+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
-+_ACEOF
-+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
-+ --version | --vers* | -V )
-+ echo "$ac_cs_version"; exit 0 ;;
-+ --he | --h)
-+ # Conflict between --help and --header
-+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
-+Try \`$0 --help' for more information." >&5
-+echo "$as_me: error: ambiguous option: $1
-+Try \`$0 --help' for more information." >&2;}
-+ { (exit 1); exit 1; }; };;
-+ --help | --hel | -h )
-+ echo "$ac_cs_usage"; exit 0 ;;
-+ --debug | --d* | -d )
++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++ $as_echo "$ac_cs_version"; exit ;;
++ --config | --confi | --conf | --con | --co | --c )
++ $as_echo "$ac_cs_config"; exit ;;
++ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
-+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-+ ac_need_defaults=false;;
-+ --header | --heade | --head | --hea )
-+ $ac_shift
-+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
++ case $ac_optarg in
++ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
++ '') as_fn_error $? "missing file argument" ;;
++ esac
++ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
++ --he | --h | --help | --hel | -h )
++ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
-+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-+Try \`$0 --help' for more information." >&5
-+echo "$as_me: error: unrecognized option: $1
-+Try \`$0 --help' for more information." >&2;}
-+ { (exit 1); exit 1; }; } ;;
++ -*) as_fn_error $? "unrecognized option: \`$1'
++Try \`$0 --help' for more information." ;;
+
-+ *) ac_config_targets="$ac_config_targets $1" ;;
++ *) as_fn_append ac_config_targets " $1"
++ ac_need_defaults=false ;;
+
+ esac
+ shift
@@ -5541,38 +5984,50 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+fi
+
+_ACEOF
-+cat >>$CONFIG_STATUS <<_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
-+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++ shift
++ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
++ CONFIG_SHELL='$SHELL'
++ export CONFIG_SHELL
++ exec "\$@"
+fi
+
+_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++ $as_echo "$ac_log"
++} >&5
+
-+cat >>$CONFIG_STATUS <<_ACEOF
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
-+# INIT-COMMANDS section.
++# INIT-COMMANDS
+#
-+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
-+
-+cat >>$CONFIG_STATUS <<\_ACEOF
++# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
-+ case "$ac_config_target" in
-+ # Handling of arguments.
-+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-+ { (exit 1); exit 1; }; };;
++ case $ac_config_target in
++ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++
++ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
++
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
@@ -5583,601 +6038,526 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
-+# simply because there is no reason to put it here, and in addition,
++# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
-+# Create a temporary directory, and hook for its removal unless debugging.
++# Hook for its removal unless debugging.
++# Note that there is a small window in which the directory will not be cleaned:
++# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
-+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-+ trap '{ (exit 1); exit 1; }' 1 2 13 15
++ tmp= ac_tmp=
++ trap 'exit_status=$?
++ : "${ac_tmp:=$tmp}"
++ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
++' 0
++ trap 'as_fn_exit 1' 1 2 13 15
+}
-+
+# Create a (secure) tmp directory for tmp files.
+
+{
-+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
-+ test -n "$tmp" && test -d "$tmp"
++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
++ test -d "$tmp"
+} ||
+{
-+ tmp=./confstat$$-$RANDOM
-+ (umask 077 && mkdir $tmp)
-+} ||
++ tmp=./conf$$-$RANDOM
++ (umask 077 && mkdir "$tmp")
++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
++ac_tmp=$tmp
++
++# Set up the scripts for CONFIG_FILES section.
++# No need to generate them if there are no CONFIG_FILES.
++# This happens for instance with `./config.status config.h'.
++if test -n "$CONFIG_FILES"; then
++
++
++ac_cr=`echo X | tr X '\015'`
++# On cygwin, bash can eat \r inside `` if the user requested igncr.
++# But we know of no other shell where ac_cr would be empty at this
++# point, so we can use a bashism as a fallback.
++if test "x$ac_cr" = x; then
++ eval ac_cr=\$\'\\r\'
++fi
++ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
++if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
++ ac_cs_awk_cr='\\r'
++else
++ ac_cs_awk_cr=$ac_cr
++fi
++
++echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
++_ACEOF
++
++
+{
-+ echo "$me: cannot create a temporary directory in ." >&2
-+ { (exit 1); exit 1; }
++ echo "cat >conf$$subs.awk <<_ACEOF" &&
++ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
++ echo "_ACEOF"
++} >conf$$subs.sh ||
++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ . ./conf$$subs.sh ||
++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++
++ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
++ if test $ac_delim_n = $ac_delim_num; then
++ break
++ elif $ac_last_try; then
++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++rm -f conf$$subs.sh
++
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
++_ACEOF
++sed -n '
++h
++s/^/S["/; s/!.*/"]=/
++p
++g
++s/^[^!]*!//
++:repl
++t repl
++s/'"$ac_delim"'$//
++t delim
++:nl
++h
++s/\(.\{148\}\)..*/\1/
++t more1
++s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
++p
++n
++b repl
++:more1
++s/["\\]/\\&/g; s/^/"/; s/$/"\\/
++p
++g
++s/.\{148\}//
++t nl
++:delim
++h
++s/\(.\{148\}\)..*/\1/
++t more2
++s/["\\]/\\&/g; s/^/"/; s/$/"/
++p
++b
++:more2
++s/["\\]/\\&/g; s/^/"/; s/$/"\\/
++p
++g
++s/.\{148\}//
++t delim
++' >$CONFIG_STATUS || ac_write_fail=1
++rm -f conf$$subs.awk
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++_ACAWK
++cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
++ for (key in S) S_is_set[key] = 1
++ FS = ""
++
++}
++{
++ line = $ 0
++ nfields = split(line, field, "@")
++ substed = 0
++ len = length(field[1])
++ for (i = 2; i < nfields; i++) {
++ key = field[i]
++ keylen = length(key)
++ if (S_is_set[key]) {
++ value = S[key]
++ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
++ len += length(value) + length(field[++i])
++ substed = 1
++ } else
++ len += 1 + keylen
++ }
++
++ print line
+}
+
++_ACAWK
++_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
++ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
++else
++ cat
++fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
++ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
-+cat >>$CONFIG_STATUS <<_ACEOF
++# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
++if test "x$srcdir" = x.; then
++ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
++h
++s///
++s/^/:/
++s/[ ]*$/:/
++s/:\$(srcdir):/:/g
++s/:\${srcdir}:/:/g
++s/:@srcdir@:/:/g
++s/^:*//
++s/:*$//
++x
++s/\(=[ ]*\).*/\1/
++G
++s/\n//
++s/^[^=]*=[ ]*$//
++}'
++fi
+
-+#
-+# CONFIG_FILES section.
-+#
-+
-+# No need to generate the scripts if there are no CONFIG_FILES.
-+# This happens for instance when ./config.status config.h
-+if test -n "\$CONFIG_FILES"; then
-+ # Protect against being on the right side of a sed subst in config.status.
-+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-+s,@SHELL@,$SHELL,;t t
-+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-+s,@exec_prefix@,$exec_prefix,;t t
-+s,@prefix@,$prefix,;t t
-+s,@program_transform_name@,$program_transform_name,;t t
-+s,@bindir@,$bindir,;t t
-+s,@sbindir@,$sbindir,;t t
-+s,@libexecdir@,$libexecdir,;t t
-+s,@datadir@,$datadir,;t t
-+s,@sysconfdir@,$sysconfdir,;t t
-+s,@sharedstatedir@,$sharedstatedir,;t t
-+s,@localstatedir@,$localstatedir,;t t
-+s,@libdir@,$libdir,;t t
-+s,@includedir@,$includedir,;t t
-+s,@oldincludedir@,$oldincludedir,;t t
-+s,@infodir@,$infodir,;t t
-+s,@mandir@,$mandir,;t t
-+s,@build_alias@,$build_alias,;t t
-+s,@host_alias@,$host_alias,;t t
-+s,@target_alias@,$target_alias,;t t
-+s,@DEFS@,$DEFS,;t t
-+s,@ECHO_C@,$ECHO_C,;t t
-+s,@ECHO_N@,$ECHO_N,;t t
-+s,@ECHO_T@,$ECHO_T,;t t
-+s,@LIBS@,$LIBS,;t t
-+s,@MAY_SUPPLY_SYSCALLS_TRUE@,$MAY_SUPPLY_SYSCALLS_TRUE,;t t
-+s,@MAY_SUPPLY_SYSCALLS_FALSE@,$MAY_SUPPLY_SYSCALLS_FALSE,;t t
-+s,@newlib_basedir@,$newlib_basedir,;t t
-+s,@build@,$build,;t t
-+s,@build_cpu@,$build_cpu,;t t
-+s,@build_vendor@,$build_vendor,;t t
-+s,@build_os@,$build_os,;t t
-+s,@host@,$host,;t t
-+s,@host_cpu@,$host_cpu,;t t
-+s,@host_vendor@,$host_vendor,;t t
-+s,@host_os@,$host_os,;t t
-+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-+s,@CYGPATH_W@,$CYGPATH_W,;t t
-+s,@PACKAGE@,$PACKAGE,;t t
-+s,@VERSION@,$VERSION,;t t
-+s,@ACLOCAL@,$ACLOCAL,;t t
-+s,@AUTOCONF@,$AUTOCONF,;t t
-+s,@AUTOMAKE@,$AUTOMAKE,;t t
-+s,@AUTOHEADER@,$AUTOHEADER,;t t
-+s,@MAKEINFO@,$MAKEINFO,;t t
-+s,@install_sh@,$install_sh,;t t
-+s,@STRIP@,$STRIP,;t t
-+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-+s,@mkdir_p@,$mkdir_p,;t t
-+s,@AWK@,$AWK,;t t
-+s,@SET_MAKE@,$SET_MAKE,;t t
-+s,@am__leading_dot@,$am__leading_dot,;t t
-+s,@AMTAR@,$AMTAR,;t t
-+s,@am__tar@,$am__tar,;t t
-+s,@am__untar@,$am__untar,;t t
-+s,@CC@,$CC,;t t
-+s,@DEPDIR@,$DEPDIR,;t t
-+s,@am__include@,$am__include,;t t
-+s,@am__quote@,$am__quote,;t t
-+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-+s,@CCDEPMODE@,$CCDEPMODE,;t t
-+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-+s,@AS@,$AS,;t t
-+s,@ac_ct_AS@,$ac_ct_AS,;t t
-+s,@AR@,$AR,;t t
-+s,@ac_ct_AR@,$ac_ct_AR,;t t
-+s,@RANLIB@,$RANLIB,;t t
-+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-+s,@READELF@,$READELF,;t t
-+s,@ac_ct_READELF@,$ac_ct_READELF,;t t
-+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
-+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
-+s,@MAINT@,$MAINT,;t t
-+s,@CCAS@,$CCAS,;t t
-+s,@CCASFLAGS@,$CCASFLAGS,;t t
-+s,@NEWLIB_CFLAGS@,$NEWLIB_CFLAGS,;t t
-+s,@LDFLAGS@,$LDFLAGS,;t t
-+s,@ELIX_LEVEL_0_TRUE@,$ELIX_LEVEL_0_TRUE,;t t
-+s,@ELIX_LEVEL_0_FALSE@,$ELIX_LEVEL_0_FALSE,;t t
-+s,@ELIX_LEVEL_1_TRUE@,$ELIX_LEVEL_1_TRUE,;t t
-+s,@ELIX_LEVEL_1_FALSE@,$ELIX_LEVEL_1_FALSE,;t t
-+s,@ELIX_LEVEL_2_TRUE@,$ELIX_LEVEL_2_TRUE,;t t
-+s,@ELIX_LEVEL_2_FALSE@,$ELIX_LEVEL_2_FALSE,;t t
-+s,@ELIX_LEVEL_3_TRUE@,$ELIX_LEVEL_3_TRUE,;t t
-+s,@ELIX_LEVEL_3_FALSE@,$ELIX_LEVEL_3_FALSE,;t t
-+s,@ELIX_LEVEL_4_TRUE@,$ELIX_LEVEL_4_TRUE,;t t
-+s,@ELIX_LEVEL_4_FALSE@,$ELIX_LEVEL_4_FALSE,;t t
-+s,@USE_LIBTOOL_TRUE@,$USE_LIBTOOL_TRUE,;t t
-+s,@USE_LIBTOOL_FALSE@,$USE_LIBTOOL_FALSE,;t t
-+s,@OBJEXT@,$OBJEXT,;t t
-+s,@oext@,$oext,;t t
-+s,@aext@,$aext,;t t
-+s,@lpfx@,$lpfx,;t t
-+s,@libm_machine_dir@,$libm_machine_dir,;t t
-+s,@machine_dir@,$machine_dir,;t t
-+s,@sys_dir@,$sys_dir,;t t
-+s,@LIBOBJS@,$LIBOBJS,;t t
-+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-+CEOF
-+
-+_ACEOF
-+
-+ cat >>$CONFIG_STATUS <<\_ACEOF
-+ # Split the substitutions into bite-sized pieces for seds with
-+ # small command number limits, like on Digital OSF/1 and HP-UX.
-+ ac_max_sed_lines=48
-+ ac_sed_frag=1 # Number of current file.
-+ ac_beg=1 # First line for current file.
-+ ac_end=$ac_max_sed_lines # Line after last line for current file.
-+ ac_more_lines=:
-+ ac_sed_cmds=
-+ while $ac_more_lines; do
-+ if test $ac_beg -gt 1; then
-+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-+ else
-+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-+ fi
-+ if test ! -s $tmp/subs.frag; then
-+ ac_more_lines=false
-+ else
-+ # The purpose of the label and of the branching condition is to
-+ # speed up the sed processing (if there are no `@' at all, there
-+ # is no need to browse any of the substitutions).
-+ # These are the two extra sed commands mentioned above.
-+ (echo ':t
-+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-+ if test -z "$ac_sed_cmds"; then
-+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-+ else
-+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-+ fi
-+ ac_sed_frag=`expr $ac_sed_frag + 1`
-+ ac_beg=$ac_end
-+ ac_end=`expr $ac_end + $ac_max_sed_lines`
-+ fi
-+ done
-+ if test -z "$ac_sed_cmds"; then
-+ ac_sed_cmds=cat
-+ fi
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
-+_ACEOF
-+cat >>$CONFIG_STATUS <<\_ACEOF
-+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-+ case $ac_file in
-+ - | *:- | *:-:* ) # input from stdin
-+ cat >$tmp/stdin
-+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-+ * ) ac_file_in=$ac_file.in ;;
++
++eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
++shift
++for ac_tag
++do
++ case $ac_tag in
++ :[FHLC]) ac_mode=$ac_tag; continue;;
++ esac
++ case $ac_mode$ac_tag in
++ :[FHL]*:*);;
++ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
++ :[FH]-) ac_tag=-:-;;
++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
++ esac
++ ac_save_IFS=$IFS
++ IFS=:
++ set x $ac_tag
++ IFS=$ac_save_IFS
++ shift
++ ac_file=$1
++ shift
++
++ case $ac_mode in
++ :L) ac_source=$1;;
++ :[FH])
++ ac_file_inputs=
++ for ac_f
++ do
++ case $ac_f in
++ -) ac_f="$ac_tmp/stdin";;
++ *) # Look for the file first in the build tree, then in the source tree
++ # (if the path is not absolute). The absolute path cannot be DOS-style,
++ # because $ac_f cannot contain `:'.
++ test -f "$ac_f" ||
++ case $ac_f in
++ [\\/$]*) false;;
++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
++ esac ||
++ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
++ esac
++ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
++ as_fn_append ac_file_inputs " '$ac_f'"
++ done
++
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ configure_input='Generated from '`
++ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
++ `' by configure.'
++ if test x"$ac_file" != x-; then
++ configure_input="$ac_file. $configure_input"
++ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
++$as_echo "$as_me: creating $ac_file" >&6;}
++ fi
++ # Neutralize special characters interpreted by sed in replacement strings.
++ case $configure_input in #(
++ *\&* | *\|* | *\\* )
++ ac_sed_conf_input=`$as_echo "$configure_input" |
++ sed 's/[\\\\&|]/\\\\&/g'`;; #(
++ *) ac_sed_conf_input=$configure_input;;
++ esac
++
++ case $ac_tag in
++ *:-:* | *:-) cat >"$ac_tmp/stdin" \
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
++ esac
++ ;;
+ esac
+
-+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
-+ X"$ac_file" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$ac_file" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
-+ { if $as_mkdir_p; then
-+ mkdir -p "$ac_dir"
-+ else
-+ as_dir="$ac_dir"
-+ as_dirs=
-+ while test ! -d "$as_dir"; do
-+ as_dirs="$as_dir $as_dirs"
-+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
-+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-+ X"$as_dir" : 'X\(//\)[^/]' \| \
-+ X"$as_dir" : 'X\(//\)$' \| \
-+ X"$as_dir" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$as_dir" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
-+ done
-+ test ! -n "$as_dirs" || mkdir $as_dirs
-+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-+ { (exit 1); exit 1; }; }; }
-+
++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$ac_file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
-+if test "$ac_dir" != .; then
-+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-+ # A "../" for each directory in $ac_dir_suffix.
-+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-+else
-+ ac_dir_suffix= ac_top_builddir=
-+fi
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
++ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
-+ .) # No --srcdir option. We are building in place.
++ .) # We are building in place.
+ ac_srcdir=.
-+ if test -z "$ac_top_builddir"; then
-+ ac_top_srcdir=.
-+ else
-+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-+ fi ;;
-+ [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
-+ ac_top_srcdir=$srcdir ;;
-+ *) # Relative path.
-+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
-+# Do not use `cd foo && pwd` to compute absolute paths, because
-+# the directories may not exist.
-+case `pwd` in
-+.) ac_abs_builddir="$ac_dir";;
-+*)
-+ case "$ac_dir" in
-+ .) ac_abs_builddir=`pwd`;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_builddir=${ac_top_builddir}.;;
-+*)
-+ case ${ac_top_builddir}. in
-+ .) ac_abs_top_builddir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_srcdir=$ac_srcdir;;
-+*)
-+ case $ac_srcdir in
-+ .) ac_abs_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_srcdir=$ac_top_srcdir;;
-+*)
-+ case $ac_top_srcdir in
-+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-+ esac;;
-+esac
+
++ case $ac_mode in
++ :F)
++ #
++ # CONFIG_FILE
++ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
++ esac
++ ac_MKDIR_P=$MKDIR_P
++ case $MKDIR_P in
++ [\\/$]* | ?:[\\/]* ) ;;
++ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
-+
-+ if test x"$ac_file" != x-; then
-+ { echo "$as_me:$LINENO: creating $ac_file" >&5
-+echo "$as_me: creating $ac_file" >&6;}
-+ rm -f "$ac_file"
-+ fi
-+ # Let's still pretend it is `configure' which instantiates (i.e., don't
-+ # use $as_me), people would be surprised to read:
-+ # /* config.h. Generated by config.status. */
-+ if test x"$ac_file" = x-; then
-+ configure_input=
-+ else
-+ configure_input="$ac_file. "
-+ fi
-+ configure_input=$configure_input"Generated from `echo $ac_file_in |
-+ sed 's,.*/,,'` by configure."
-+
-+ # First look for the input files in the build tree, otherwise in the
-+ # src tree.
-+ ac_file_inputs=`IFS=:
-+ for f in $ac_file_in; do
-+ case $f in
-+ -) echo $tmp/stdin ;;
-+ [\\/$]*)
-+ # Absolute (can't be DOS-style, as IFS=:)
-+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-+echo "$as_me: error: cannot find input file: $f" >&2;}
-+ { (exit 1); exit 1; }; }
-+ echo "$f";;
-+ *) # Relative
-+ if test -f "$f"; then
-+ # Build tree
-+ echo "$f"
-+ elif test -f "$srcdir/$f"; then
-+ # Source tree
-+ echo "$srcdir/$f"
-+ else
-+ # /dev/null tree
-+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-+echo "$as_me: error: cannot find input file: $f" >&2;}
-+ { (exit 1); exit 1; }; }
-+ fi;;
-+ esac
-+ done` || { (exit 1); exit 1; }
+_ACEOF
-+cat >>$CONFIG_STATUS <<_ACEOF
-+ sed "$ac_vpsub
++
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
++# If the template does not know about datarootdir, expand it.
++# FIXME: This hack should be removed a few years after 2.60.
++ac_datarootdir_hack=; ac_datarootdir_seen=
++ac_sed_dataroot='
++/datarootdir/ {
++ p
++ q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p'
++case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ ac_datarootdir_hack='
++ s&@datadir@&$datadir&g
++ s&@docdir@&$docdir&g
++ s&@infodir@&$infodir&g
++ s&@localedir@&$localedir&g
++ s&@mandir@&$mandir&g
++ s&\\\${datarootdir}&$datarootdir&g' ;;
++esac
++_ACEOF
++
++# Neutralize VPATH when `$srcdir' = `.'.
++# Shell code in configure.ac might set extrasub.
++# FIXME: do we really want to maintain this feature?
++cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
++ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
-+cat >>$CONFIG_STATUS <<\_ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-+s,@configure_input@,$configure_input,;t t
-+s,@srcdir@,$ac_srcdir,;t t
-+s,@abs_srcdir@,$ac_abs_srcdir,;t t
-+s,@top_srcdir@,$ac_top_srcdir,;t t
-+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-+s,@builddir@,$ac_builddir,;t t
-+s,@abs_builddir@,$ac_abs_builddir,;t t
-+s,@top_builddir@,$ac_top_builddir,;t t
-+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-+s,@INSTALL@,$ac_INSTALL,;t t
-+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-+ rm -f $tmp/stdin
-+ if test x"$ac_file" != x-; then
-+ mv $tmp/out $ac_file
-+ else
-+ cat $tmp/out
-+ rm -f $tmp/out
-+ fi
++s|@configure_input@|$ac_sed_conf_input|;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@top_build_prefix@&$ac_top_build_prefix&;t t
++s&@srcdir@&$ac_srcdir&;t t
++s&@abs_srcdir@&$ac_abs_srcdir&;t t
++s&@top_srcdir@&$ac_top_srcdir&;t t
++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
++s&@builddir@&$ac_builddir&;t t
++s&@abs_builddir@&$ac_abs_builddir&;t t
++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
++s&@INSTALL@&$ac_INSTALL&;t t
++s&@MKDIR_P@&$ac_MKDIR_P&;t t
++$ac_datarootdir_hack
++"
++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
++ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
-+done
-+_ACEOF
-+cat >>$CONFIG_STATUS <<\_ACEOF
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
++ "$ac_tmp/out"`; test -z "$ac_out"; } &&
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined" >&5
++$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined" >&2;}
+
-+#
-+# CONFIG_COMMANDS section.
-+#
-+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-+ X"$ac_dest" : 'X\(//\)[^/]' \| \
-+ X"$ac_dest" : 'X\(//\)$' \| \
-+ X"$ac_dest" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$ac_dest" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
-+ { if $as_mkdir_p; then
-+ mkdir -p "$ac_dir"
-+ else
-+ as_dir="$ac_dir"
-+ as_dirs=
-+ while test ! -d "$as_dir"; do
-+ as_dirs="$as_dir $as_dirs"
-+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
-+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-+ X"$as_dir" : 'X\(//\)[^/]' \| \
-+ X"$as_dir" : 'X\(//\)$' \| \
-+ X"$as_dir" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$as_dir" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
-+ done
-+ test ! -n "$as_dirs" || mkdir $as_dirs
-+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-+ { (exit 1); exit 1; }; }; }
-+
-+ ac_builddir=.
-+
-+if test "$ac_dir" != .; then
-+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-+ # A "../" for each directory in $ac_dir_suffix.
-+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-+else
-+ ac_dir_suffix= ac_top_builddir=
-+fi
-+
-+case $srcdir in
-+ .) # No --srcdir option. We are building in place.
-+ ac_srcdir=.
-+ if test -z "$ac_top_builddir"; then
-+ ac_top_srcdir=.
-+ else
-+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-+ fi ;;
-+ [\\/]* | ?:[\\/]* ) # Absolute path.
-+ ac_srcdir=$srcdir$ac_dir_suffix;
-+ ac_top_srcdir=$srcdir ;;
-+ *) # Relative path.
-+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
-+esac
-+
-+# Do not use `cd foo && pwd` to compute absolute paths, because
-+# the directories may not exist.
-+case `pwd` in
-+.) ac_abs_builddir="$ac_dir";;
-+*)
-+ case "$ac_dir" in
-+ .) ac_abs_builddir=`pwd`;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_builddir=${ac_top_builddir}.;;
-+*)
-+ case ${ac_top_builddir}. in
-+ .) ac_abs_top_builddir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_srcdir=$ac_srcdir;;
-+*)
-+ case $ac_srcdir in
-+ .) ac_abs_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-+ esac;;
-+esac
-+case $ac_abs_builddir in
-+.) ac_abs_top_srcdir=$ac_top_srcdir;;
-+*)
-+ case $ac_top_srcdir in
-+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
-+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-+ esac;;
-+esac
++ rm -f "$ac_tmp/stdin"
++ case $ac_file in
++ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
++ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
++ esac \
++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
++ ;;
+
+
-+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-+echo "$as_me: executing $ac_dest commands" >&6;}
-+ case $ac_dest in
-+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-+ # Strip MF so we end up with the name of the file.
-+ mf=`echo "$mf" | sed -e 's/:.*$//'`
-+ # Check whether this is an Automake generated Makefile or not.
-+ # We used to match only the files named `Makefile.in', but
-+ # some people rename them; so instead we look at the file content.
-+ # Grep'ing the first line is not enough: some people post-process
-+ # each Makefile.in and add a new line on top of each file to say so.
-+ # So let's grep whole file.
-+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-+ dirpart=`(dirname "$mf") 2>/dev/null ||
++ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
++$as_echo "$as_me: executing $ac_file commands" >&6;}
++ ;;
++ esac
++
++
++ case $ac_file$ac_mode in
++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
++ # Autoconf 2.62 quotes --file arguments for eval, but not when files
++ # are listed without --file. Let's play safe and only enable the eval
++ # if we detect the quoting.
++ case $CONFIG_FILES in
++ *\'*) eval set x "$CONFIG_FILES" ;;
++ *) set x $CONFIG_FILES ;;
++ esac
++ shift
++ for mf
++ do
++ # Strip MF so we end up with the name of the file.
++ mf=`echo "$mf" | sed -e 's/:.*$//'`
++ # Check whether this is an Automake generated Makefile or not.
++ # We used to match only the files named `Makefile.in', but
++ # some people rename them; so instead we look at the file content.
++ # Grep'ing the first line is not enough: some people post-process
++ # each Makefile.in and add a new line on top of each file to say so.
++ # Grep'ing the whole file is not good either: AIX grep has a line
++ # limit of 2048, but all sed's we know have understand at least 4000.
++ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
++ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
-+ X"$mf" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$mf" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
-+ else
-+ continue
-+ fi
-+ # Extract the definition of DEPDIR, am__include, and am__quote
-+ # from the Makefile without running `make'.
-+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-+ test -z "$DEPDIR" && continue
-+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
-+ test -z "am__include" && continue
-+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-+ # When using ansi2knr, U may be empty or an underscore; expand it
-+ U=`sed -n 's/^U = //p' < "$mf"`
-+ # Find all dependency output files, they are included files with
-+ # $(DEPDIR) in their names. We invoke sed twice because it is the
-+ # simplest approach to changing $(DEPDIR) to its actual value in the
-+ # expansion.
-+ for file in `sed -n "
-+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-+ # Make sure the directory exists.
-+ test -f "$dirpart/$file" && continue
-+ fdir=`(dirname "$file") 2>/dev/null ||
++ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$mf" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ else
++ continue
++ fi
++ # Extract the definition of DEPDIR, am__include, and am__quote
++ # from the Makefile without running `make'.
++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
++ test -z "$DEPDIR" && continue
++ am__include=`sed -n 's/^am__include = //p' < "$mf"`
++ test -z "am__include" && continue
++ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
++ # When using ansi2knr, U may be empty or an underscore; expand it
++ U=`sed -n 's/^U = //p' < "$mf"`
++ # Find all dependency output files, they are included files with
++ # $(DEPDIR) in their names. We invoke sed twice because it is the
++ # simplest approach to changing $(DEPDIR) to its actual value in the
++ # expansion.
++ for file in `sed -n "
++ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
++ # Make sure the directory exists.
++ test -f "$dirpart/$file" && continue
++ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
-+ X"$file" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$file" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
-+ { if $as_mkdir_p; then
-+ mkdir -p $dirpart/$fdir
-+ else
-+ as_dir=$dirpart/$fdir
-+ as_dirs=
-+ while test ! -d "$as_dir"; do
-+ as_dirs="$as_dir $as_dirs"
-+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
-+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-+ X"$as_dir" : 'X\(//\)[^/]' \| \
-+ X"$as_dir" : 'X\(//\)$' \| \
-+ X"$as_dir" : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X"$as_dir" |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`
++ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
++$as_echo X"$file" |
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ as_dir=$dirpart/$fdir; as_fn_mkdir_p
++ # echo "creating $dirpart/$file"
++ echo '# dummy' > "$dirpart/$file"
+ done
-+ test ! -n "$as_dirs" || mkdir $as_dirs
-+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
-+ { (exit 1); exit 1; }; }; }
-+
-+ # echo "creating $dirpart/$file"
-+ echo '# dummy' > "$dirpart/$file"
+ done
-+done
++}
+ ;;
++
+ esac
-+done
-+_ACEOF
++done # for ac_tag
+
-+cat >>$CONFIG_STATUS <<\_ACEOF
+
-+{ (exit 0); exit 0; }
++as_fn_exit 0
+_ACEOF
-+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
++test $ac_write_fail = 0 ||
++ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
++
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
@@ -6197,12 +6577,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure newlib-1.19.0-psp/newlib
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
-+ $ac_cs_success || { (exit 1); exit 1; }
++ $ac_cs_success || as_fn_exit 1
++fi
++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure.in newlib-1.19.0-psp/newlib/libc/sys/psp/configure.in
---- newlib-1.19.0/newlib/libc/sys/psp/configure.in 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/configure.in 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/configure.in newlib-1.20.0-psp/newlib/libc/sys/psp/configure.in
+--- newlib-1.20.0/newlib/libc/sys/psp/configure.in 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/configure.in 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/sys/sun4 configure.in file.
+dnl Process this file with autoconf to produce a configure script.
@@ -6218,16 +6602,16 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/configure.in newlib-1.19.0-psp/new
+
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/crt0.c newlib-1.19.0-psp/newlib/libc/sys/psp/crt0.c
---- newlib-1.19.0/newlib/libc/sys/psp/crt0.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/crt0.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/crt0.c newlib-1.20.0-psp/newlib/libc/sys/psp/crt0.c
+--- newlib-1.20.0/newlib/libc/sys/psp/crt0.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/crt0.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,3 @@
+/* The real crt0.c lives in PSPSDK. */
+
+void _start() { }
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/fdman.c newlib-1.19.0-psp/newlib/libc/sys/psp/fdman.c
---- newlib-1.19.0/newlib/libc/sys/psp/fdman.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/fdman.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/fdman.c newlib-1.20.0-psp/newlib/libc/sys/psp/fdman.c
+--- newlib-1.20.0/newlib/libc/sys/psp/fdman.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/fdman.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,115 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -6344,9 +6728,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/fdman.c newlib-1.19.0-psp/newlib/l
+ }
+ __psp_descriptormap[fd] = NULL;
+}
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/fdman.h newlib-1.19.0-psp/newlib/libc/sys/psp/fdman.h
---- newlib-1.19.0/newlib/libc/sys/psp/fdman.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/fdman.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/fdman.h newlib-1.20.0-psp/newlib/libc/sys/psp/fdman.h
+--- newlib-1.20.0/newlib/libc/sys/psp/fdman.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/fdman.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,44 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -6392,9 +6776,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/fdman.h newlib-1.19.0-psp/newlib/l
+ void __psp_fdman_release_descriptor(int fd);
+
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/include/netdb.h newlib-1.19.0-psp/newlib/libc/sys/psp/include/netdb.h
---- newlib-1.19.0/newlib/libc/sys/psp/include/netdb.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/include/netdb.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/include/netdb.h newlib-1.20.0-psp/newlib/libc/sys/psp/include/netdb.h
+--- newlib-1.20.0/newlib/libc/sys/psp/include/netdb.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/include/netdb.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,36 @@
+/* Simple gethostbyname and gethostbyaddr replacements, note not thread safe */
+#ifndef __NETDB_H__
@@ -6432,9 +6816,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/include/netdb.h newlib-1.19.0-psp/
+#endif
+
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/interrupt.S newlib-1.19.0-psp/newlib/libc/sys/psp/interrupt.S
---- newlib-1.19.0/newlib/libc/sys/psp/interrupt.S 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/interrupt.S 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/interrupt.S newlib-1.20.0-psp/newlib/libc/sys/psp/interrupt.S
+--- newlib-1.20.0/newlib/libc/sys/psp/interrupt.S 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/interrupt.S 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,66 @@
+
+ .set noreorder
@@ -6502,10 +6886,10 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/interrupt.S newlib-1.19.0-psp/newl
+ nop
+
+ .end pspEnableInterrupts
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/libcglue.c newlib-1.19.0-psp/newlib/libc/sys/psp/libcglue.c
---- newlib-1.19.0/newlib/libc/sys/psp/libcglue.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/libcglue.c 2011-07-29 14:24:57.000000000 +0100
-@@ -0,0 +1,972 @@
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/libcglue.c newlib-1.20.0-psp/newlib/libc/sys/psp/libcglue.c
+--- newlib-1.20.0/newlib/libc/sys/psp/libcglue.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/libcglue.c 2012-02-25 14:10:35.000000000 +0000
+@@ -0,0 +1,969 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
+ * -----------------------------------------------------------------------
@@ -7145,15 +7529,12 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/libcglue.c newlib-1.19.0-psp/newli
+ return 0;
+ }
+}
++#endif
+
-+int _isatty_r (struct _reent *ptr, int fd)
++#ifdef F__isatty
++int _isatty(int fd)
+{
-+ int ret;
-+
-+ errno = 0;
-+ if ((ret = isatty (fd)) == -1 && errno != 0)
-+ ptr->_errno = errno;
-+ return ret;
++ return isatty(fd);
+}
+#endif
+
@@ -7478,9 +7859,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/libcglue.c newlib-1.19.0-psp/newli
+}
+#endif
+
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/netdb.c newlib-1.19.0-psp/newlib/libc/sys/psp/netdb.c
---- newlib-1.19.0/newlib/libc/sys/psp/netdb.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/netdb.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/netdb.c newlib-1.20.0-psp/newlib/libc/sys/psp/netdb.c
+--- newlib-1.20.0/newlib/libc/sys/psp/netdb.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/netdb.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,103 @@
+/* Simple gethostbyname and gethostbyaddr replacements using the resolver lib */
+#include
@@ -7585,9 +7966,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/netdb.c newlib-1.19.0-psp/newlib/l
+}
+
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/netinet/in.h newlib-1.19.0-psp/newlib/libc/sys/psp/netinet/in.h
---- newlib-1.19.0/newlib/libc/sys/psp/netinet/in.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/netinet/in.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/netinet/in.h newlib-1.20.0-psp/newlib/libc/sys/psp/netinet/in.h
+--- newlib-1.20.0/newlib/libc/sys/psp/netinet/in.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/netinet/in.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,271 @@
+/* $NetBSD: in.h,v 1.71 2005/08/05 09:21:25 elad Exp $ */
+
@@ -7860,9 +8241,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/netinet/in.h newlib-1.19.0-psp/new
+#endif
+
+#endif /* !_NETINET_IN_H_ */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/netinet/tcp.h newlib-1.19.0-psp/newlib/libc/sys/psp/netinet/tcp.h
---- newlib-1.19.0/newlib/libc/sys/psp/netinet/tcp.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/netinet/tcp.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/netinet/tcp.h newlib-1.20.0-psp/newlib/libc/sys/psp/netinet/tcp.h
+--- newlib-1.20.0/newlib/libc/sys/psp/netinet/tcp.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/netinet/tcp.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,12 @@
+#ifndef __NETINET_TCP_H__
+#define __NETINET_TCP_H__
@@ -7876,9 +8257,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/netinet/tcp.h newlib-1.19.0-psp/ne
+#define TCP_MAXSEG 0x02 /* set maximum segment size */
+
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/pipe.c newlib-1.19.0-psp/newlib/libc/sys/psp/pipe.c
---- newlib-1.19.0/newlib/libc/sys/psp/pipe.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/pipe.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/pipe.c newlib-1.20.0-psp/newlib/libc/sys/psp/pipe.c
+--- newlib-1.20.0/newlib/libc/sys/psp/pipe.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/pipe.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,305 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -8185,9 +8566,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/pipe.c newlib-1.19.0-psp/newlib/li
+ return __psp_set_errno(ret);
+ }
+}
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/pspcwd.c newlib-1.19.0-psp/newlib/libc/sys/psp/pspcwd.c
---- newlib-1.19.0/newlib/libc/sys/psp/pspcwd.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/pspcwd.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/pspcwd.c newlib-1.20.0-psp/newlib/libc/sys/psp/pspcwd.c
+--- newlib-1.20.0/newlib/libc/sys/psp/pspcwd.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/pspcwd.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,166 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -8355,9 +8736,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/pspcwd.c newlib-1.19.0-psp/newlib/
+ return __psp_path_normalize(out + dr, len - dr);
+}
+
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/select.c newlib-1.19.0-psp/newlib/libc/sys/psp/select.c
---- newlib-1.19.0/newlib/libc/sys/psp/select.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/select.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/select.c newlib-1.20.0-psp/newlib/libc/sys/psp/select.c
+--- newlib-1.20.0/newlib/libc/sys/psp/select.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/select.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,199 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -8558,9 +8939,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/select.c newlib-1.19.0-psp/newlib/
+ return count;
+}
+
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/socket.c newlib-1.19.0-psp/newlib/libc/sys/psp/socket.c
---- newlib-1.19.0/newlib/libc/sys/psp/socket.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/socket.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/socket.c newlib-1.20.0-psp/newlib/libc/sys/psp/socket.c
+--- newlib-1.20.0/newlib/libc/sys/psp/socket.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/socket.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,390 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -8952,9 +9333,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/socket.c newlib-1.19.0-psp/newlib/
+ return ip_addr;
+}
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/dirent.h newlib-1.19.0-psp/newlib/libc/sys/psp/sys/dirent.h
---- newlib-1.19.0/newlib/libc/sys/psp/sys/dirent.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/sys/dirent.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/sys/dirent.h newlib-1.20.0-psp/newlib/libc/sys/psp/sys/dirent.h
+--- newlib-1.20.0/newlib/libc/sys/psp/sys/dirent.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/sys/dirent.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,39 @@
+#ifndef _SYS_DIRENT_H
+#define _SYS_DIRENT_H
@@ -8995,9 +9376,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/dirent.h newlib-1.19.0-psp/new
+#endif
+
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/errno.h newlib-1.19.0-psp/newlib/libc/sys/psp/sys/errno.h
---- newlib-1.19.0/newlib/libc/sys/psp/sys/errno.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/sys/errno.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/sys/errno.h newlib-1.20.0-psp/newlib/libc/sys/psp/sys/errno.h
+--- newlib-1.20.0/newlib/libc/sys/psp/sys/errno.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/sys/errno.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,158 @@
+/* errno.h for PSP, based on newlib/libc/include/sys/errno.h. */
+
@@ -9157,9 +9538,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/errno.h newlib-1.19.0-psp/newl
+}
+#endif
+#endif /* _SYS_ERRNO_H */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/fd_set.h newlib-1.19.0-psp/newlib/libc/sys/psp/sys/fd_set.h
---- newlib-1.19.0/newlib/libc/sys/psp/sys/fd_set.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/sys/fd_set.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/sys/fd_set.h newlib-1.20.0-psp/newlib/libc/sys/psp/sys/fd_set.h
+--- newlib-1.20.0/newlib/libc/sys/psp/sys/fd_set.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/sys/fd_set.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,69 @@
+/* $NetBSD: fd_set.h,v 1.1 2005/05/22 12:44:24 kleink Exp $ */
+
@@ -9230,14 +9611,14 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/fd_set.h newlib-1.19.0-psp/new
+#define FD_ZERO(p) (void)__builtin_memset((p), 0, sizeof(*(p)))
+
+#endif /* _SYS_FD_SET_H_ */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/ioctl.h newlib-1.19.0-psp/newlib/libc/sys/psp/sys/ioctl.h
---- newlib-1.19.0/newlib/libc/sys/psp/sys/ioctl.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/sys/ioctl.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/sys/ioctl.h newlib-1.20.0-psp/newlib/libc/sys/psp/sys/ioctl.h
+--- newlib-1.20.0/newlib/libc/sys/psp/sys/ioctl.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/sys/ioctl.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1 @@
+/* Empty file, here for compatibility */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/select.h newlib-1.19.0-psp/newlib/libc/sys/psp/sys/select.h
---- newlib-1.19.0/newlib/libc/sys/psp/sys/select.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/sys/select.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/sys/select.h newlib-1.20.0-psp/newlib/libc/sys/psp/sys/select.h
+--- newlib-1.20.0/newlib/libc/sys/psp/sys/select.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/sys/select.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,54 @@
+/* $NetBSD: select.h,v 1.24 2005/05/22 12:44:24 kleink Exp $ */
+
@@ -9293,9 +9674,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/select.h newlib-1.19.0-psp/new
+#endif
+
+#endif /* !_SYS_SELECT_H_ */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/socket.h newlib-1.19.0-psp/newlib/libc/sys/psp/sys/socket.h
---- newlib-1.19.0/newlib/libc/sys/psp/sys/socket.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/sys/socket.h 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/sys/socket.h newlib-1.20.0-psp/newlib/libc/sys/psp/sys/socket.h
+--- newlib-1.20.0/newlib/libc/sys/psp/sys/socket.h 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/sys/socket.h 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,294 @@
+/* $NetBSD: socket.h,v 1.77 2005/11/29 03:12:16 christos Exp $ */
+
@@ -9591,9 +9972,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/sys/socket.h newlib-1.19.0-psp/new
+#endif
+
+#endif /* !_SYS_SOCKET_H_ */
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/syscalls.c newlib-1.19.0-psp/newlib/libc/sys/psp/syscalls.c
---- newlib-1.19.0/newlib/libc/sys/psp/syscalls.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/syscalls.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/syscalls.c newlib-1.20.0-psp/newlib/libc/sys/psp/syscalls.c
+--- newlib-1.20.0/newlib/libc/sys/psp/syscalls.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/syscalls.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,19 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -9614,9 +9995,9 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/syscalls.c newlib-1.19.0-psp/newli
+{
+ return __psp_set_errno(sceKernelLibcTime(t));
+}
-diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/xprintf.c newlib-1.19.0-psp/newlib/libc/sys/psp/xprintf.c
---- newlib-1.19.0/newlib/libc/sys/psp/xprintf.c 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.19.0-psp/newlib/libc/sys/psp/xprintf.c 2011-07-29 14:24:57.000000000 +0100
+diff -Nbaur newlib-1.20.0/newlib/libc/sys/psp/xprintf.c newlib-1.20.0-psp/newlib/libc/sys/psp/xprintf.c
+--- newlib-1.20.0/newlib/libc/sys/psp/xprintf.c 1970-01-01 01:00:00.000000000 +0100
++++ newlib-1.20.0-psp/newlib/libc/sys/psp/xprintf.c 2012-02-25 14:10:35.000000000 +0000
@@ -0,0 +1,984 @@
+/*
+ * PSP Software Development Kit - http://www.pspdev.org
@@ -10602,76 +10983,3 @@ diff -Nbaur newlib-1.19.0/newlib/libc/sys/psp/xprintf.c newlib-1.19.0-psp/newlib
+ return ret;
+}
+#endif
-diff -Nbaur newlib-1.19.0/newlib/libm/common/sf_isinff.c newlib-1.19.0-psp/newlib/libm/common/sf_isinff.c
---- newlib-1.19.0/newlib/libm/common/sf_isinff.c 2006-02-27 23:51:28.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libm/common/sf_isinff.c 2011-07-29 14:24:57.000000000 +0100
-@@ -9,10 +9,32 @@
- _DEFUN (__isinff, (x),
- float x)
- {
-+#ifdef __psp__
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $8, %1\n" // t0 = f
-+ "sll $9, $8, 1\n" // t1 = t0<<1
-+ "sra %0, $8, 30\n" // v = t0>>30
-+ "srl $9, $9, 24\n" // t1 = t1>>24
-+ "sll $8, $8, 9\n" // t0 = t0<<9
-+ "ori %0, %0, 0x0001\n" // v = v | 0x00000001 = (f>=0) ? +1 : -1
-+ "sltiu $9, $9, 0x00FF\n" // t1 = (t1<0xFF)
-+ "movn %0, $0, $8\n" // v = (t0!=0) ? 0 : v if (frac!=0) is not Infinity
-+ "movn %0, $0, $9\n" // v = (t1!=0) ? 0 : v if (exp!=0xFF) is not Infinity
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(x)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+#else
- __int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- return FLT_UWORD_IS_INFINITE(ix);
-+#endif
- }
-
- #ifdef _DOUBLE_IS_32BITS
-diff -Nbaur newlib-1.19.0/newlib/libm/common/sf_isnanf.c newlib-1.19.0-psp/newlib/libm/common/sf_isnanf.c
---- newlib-1.19.0/newlib/libm/common/sf_isnanf.c 2006-02-27 23:51:28.000000000 +0000
-+++ newlib-1.19.0-psp/newlib/libm/common/sf_isnanf.c 2011-07-29 14:24:57.000000000 +0100
-@@ -19,10 +19,33 @@
- _DEFUN (__isnanf, (x),
- float x)
- {
-+#ifdef __psp__
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui %0, 0x807F\n" //
-+ "mfc1 $8, %1\n" // t0 = f
-+ "ori %0, %0, 0xFFFF\n" // v = 0x807FFFFF
-+ "sll $9, $8, 1\n" // t1 = t0<<1
-+ "and %0, %0, $8\n" // v = v & t0
-+ "srl $9, $9, 24\n" // t1 = t1>>24
-+ "sll $8, $8, 9\n" // t0 = t0<<9
-+ "sltiu $9, $9, 0x00FF\n" // t1 = (t1<0xFF)
-+ "movz %0, $0, $8\n" // v = (t0==0) ? 0 : v if (frac==0) is not NaN
-+ "movn %0, $0, $9\n" // v = (t1!=0) ? 0 : v if (exp!=0xFF) is not NAN
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(x)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+#else
- __int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- return FLT_UWORD_IS_NAN(ix);
-+#endif
- }
-
- #ifdef _DOUBLE_IS_32BITS
diff --git a/dkpsp/patches/pspsdk.patch b/dkpsp/patches/pspsdk.patch
deleted file mode 100644
index 94e1a72..0000000
--- a/dkpsp/patches/pspsdk.patch
+++ /dev/null
@@ -1,2391 +0,0 @@
-diff -Nbaur pspsdk/src/atrac3/pspatrac3.h pspsdk.new/src/atrac3/pspatrac3.h
---- pspsdk/src/atrac3/pspatrac3.h 2011-07-29 15:56:36.000000000 +0100
-+++ pspsdk.new/src/atrac3/pspatrac3.h 2011-07-29 14:56:08.000000000 +0100
-@@ -18,6 +18,57 @@
- extern "C" {
- #endif
-
-+/* Error code definition */
-+#define PSP_ATRAC_SUCCESS SCE_OK
-+
-+#define PSP_ATRAC_ERROR_PARAM_FAIL (0x80630001)
-+#define PSP_ATRAC_ERROR_API_FAIL (0x80630002)
-+#define PSP_ATRAC_ERROR_NO_ATRACID (0x80630003)
-+#define PSP_ATRAC_ERROR_BAD_CODECTYPE (0x80630004)
-+#define PSP_ATRAC_ERROR_BAD_ATRACID (0x80630005)
-+#define PSP_ATRAC_ERROR_UNKNOWN_FORMAT (0x80630006)
-+#define PSP_ATRAC_ERROR_UNMATCH_FORMAT (0x80630007)
-+#define PSP_ATRAC_ERROR_BAD_DATA (0x80630008)
-+#define PSP_ATRAC_ERROR_ALLDATA_IS_ONMEMORY (0x80630009)
-+#define PSP_ATRAC_ERROR_UNSET_DATA (0x80630010)
-+
-+#define PSP_ATRAC_ERROR_READSIZE_IS_TOO_SMALL (0x80630011)
-+#define PSP_ATRAC_ERROR_NEED_SECOND_BUFFER (0x80630012)
-+#define PSP_ATRAC_ERROR_READSIZE_OVER_BUFFER (0x80630013)
-+#define PSP_ATRAC_ERROR_NOT_4BYTE_ALIGNMENT (0x80630014)
-+#define PSP_ATRAC_ERROR_BAD_SAMPLE (0x80630015)
-+#define PSP_ATRAC_ERROR_WRITEBYTE_FIRST_BUFFER (0x80630016)
-+#define PSP_ATRAC_ERROR_WRITEBYTE_SECOND_BUFFER (0x80630017)
-+#define PSP_ATRAC_ERROR_ADD_DATA_IS_TOO_BIG (0x80630018)
-+
-+#define PSP_ATRAC_ERROR_UNSET_PARAM (0x80630021)
-+#define PSP_ATRAC_ERROR_NONEED_SECOND_BUFFER (0x80630022)
-+#define PSP_ATRAC_ERROR_NODATA_IN_BUFFER (0x80630023)
-+#define PSP_ATRAC_ERROR_ALLDATA_WAS_DECODED (0x80630024)
-+
-+/* Audio Codec ID */
-+#define PSP_ATRAC_AT3PLUS (0x00001000)
-+#define PSP_ATRAC_AT3 (0x00001001)
-+
-+/* Remain Frame typical Status */
-+#define PSP_ATRAC_ALLDATA_IS_ON_MEMORY (-1)
-+#define PSP_ATRAC_NONLOOP_STREAM_DATA_IS_ON_MEMORY (-2)
-+#define PSP_ATRAC_LOOP_STREAM_DATA_IS_ON_MEMORY (-3)
-+
-+typedef struct {
-+ u8 *pucWritePositionFirstBuf;
-+ u32 uiWritableByteFirstBuf;
-+ u32 uiMinWriteByteFirstBuf;
-+ u32 uiReadPositionFirstBuf;
-+
-+ u8 *pucWritePositionSecondBuf;
-+ u32 uiWritableByteSecondBuf;
-+ u32 uiMinWriteByteSecondBuf;
-+ u32 uiReadPositionSecondBuf;
-+} PspBufferInfo;
-+
-+int sceAtracGetAtracID(uint uiCodecType);
-+
- /**
- * Creates a new Atrac ID from the specified data
- *
-@@ -132,6 +183,30 @@
- */
- int sceAtracGetMaxSample(int atracID, int *outMax);
-
-+int sceAtracGetBufferInfoForReseting(int atracID, u32 uiSample, PspBufferInfo *pBufferInfo);
-+
-+int sceAtracGetChannel(int atracID, u32 *puiChannel);
-+
-+int sceAtracGetInternalErrorInfo(int atracID, int *piResult);
-+
-+int sceAtracGetLoopStatus(int atracID, int *piLoopNum, u32 *puiLoopStatus);
-+
-+int sceAtracGetNextDecodePosition(int atracID, u32 *puiSamplePosition);
-+
-+int sceAtracGetSecondBufferInfo(int atracID, u32 *puiPosition, u32 *puiDataByte);
-+
-+int sceAtracGetSoundSample(int atracID, int *piEndSample, int *piLoopStartSample, int *piLoopEndSample);
-+
-+int sceAtracResetPlayPosition(int atracID, u32 uiSample, u32 uiWriteByteFirstBuf, u32 uiWriteByteSecondBuf);
-+
-+int sceAtracSetData(int atracID, u8 *pucBufferAddr, u32 uiBufferByte);
-+
-+int sceAtracSetHalfwayBuffer(int atracID, u8 *pucBufferAddr, u32 uiReadByte, u32 uiBufferByte);
-+
-+int sceAtracSetHalfwayBufferAndGetID(u8 *pucBufferAddr, u32 uiReadByte, u32 uiBufferByte);
-+
-+int sceAtracSetSecondBuffer(int atracID, u8 *pucSecondBufferAddr, u32 uiSecondBufferByte);
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Nbaur pspsdk/src/base/build.mak pspsdk.new/src/base/build.mak
---- pspsdk/src/base/build.mak 2011-07-29 15:56:34.000000000 +0100
-+++ pspsdk.new/src/base/build.mak 2011-07-29 14:58:45.000000000 +0100
-@@ -45,6 +45,11 @@
- CFLAGS += -D_PSP_FW_VERSION=$(PSP_FW_VERSION)
- CXXFLAGS += -D_PSP_FW_VERSION=$(PSP_FW_VERSION)
-
-+# Objective-C selection. All Objective C code must be linked against libobjc.a
-+ifeq ($(USE_OBJC),1)
-+LIBS := $(LIBS) -lobjc
-+endif
-+
- ifeq ($(BUILD_PRX),1)
- LDFLAGS := $(addprefix -L,$(LIBDIR)) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
- EXTRA_CLEAN += $(TARGET).elf
-@@ -198,6 +203,12 @@
- %.c: %.exp
- psp-build-exports -b $< > $@
-
-+%.o: %.m
-+ $(CC) $(CFLAGS) -c -o $@ $<
-+
-+%.o: %.mm
-+ $(CXX) $(CXXFLAGS) -c -o $@ $<
-+
- clean:
- -rm -f $(FINAL_TARGET) $(EXTRA_CLEAN) $(OBJS) $(PSP_EBOOT_SFO) $(PSP_EBOOT) $(EXTRA_TARGETS)
-
-diff -Nbaur pspsdk/src/base/build_prx.mak pspsdk.new/src/base/build_prx.mak
---- pspsdk/src/base/build_prx.mak 2011-07-29 15:56:34.000000000 +0100
-+++ pspsdk.new/src/base/build_prx.mak 2011-07-29 14:59:19.000000000 +0100
-@@ -37,6 +37,11 @@
-
- CFLAGS += -D_PSP_FW_VERSION=$(PSP_FW_VERSION)
-
-+# Objective-C selection. All Objective C code must be linked against libobjc.a
-+ifeq ($(USE_OBJC),1)
-+LIBS := $(LIBS) -lobjc
-+endif
-+
- # Library selection. By default we link with Newlib's libc. Allow the
- # user to link with PSPSDK's libc if USE_PSPSDK_LIBC is set to 1.
-
-@@ -80,6 +85,12 @@
- %.c: %.exp
- psp-build-exports -b $< > $@
-
-+%.o: %.m
-+ $(CC) $(CFLAGS) -c -o $@ $<
-+
-+%.o: %.mm
-+ $(CXX) $(CXXFLAGS) -c -o $@ $<
-+
- clean: $(EXTRA_CLEAN)
- -rm -f $(FINAL_TARGET) $(TARGET).elf $(OBJS)
-
-diff -Nbaur pspsdk/src/display/pspdisplay.h pspsdk.new/src/display/pspdisplay.h
---- pspsdk/src/display/pspdisplay.h 2011-07-29 15:56:33.000000000 +0100
-+++ pspsdk.new/src/display/pspdisplay.h 2011-07-29 14:56:08.000000000 +0100
-@@ -122,6 +122,31 @@
- */
- int sceDisplayWaitVblankCB(void);
-
-+/**
-+ * Get accumlated HSYNC count
-+ */
-+int sceDisplayGetAccumulatedHcount(void);
-+
-+/**
-+ * Get current HSYNC count
-+ */
-+int sceDisplayGetCurrentHcount(void);
-+
-+/**
-+ * Get number of frames per second
-+ */
-+float sceDisplayGetFramePerSec(void);
-+
-+/**
-+ * Get whether or not frame buffer is being displayed
-+ */
-+int sceDisplayIsForeground(void);
-+
-+/**
-+ * Test whether VBLANK is active
-+ */
-+int sceDisplayIsVblank(void);
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Nbaur pspsdk/src/fpu/Makefile.am pspsdk.new/src/fpu/Makefile.am
---- pspsdk/src/fpu/Makefile.am 2011-07-29 15:56:23.000000000 +0100
-+++ pspsdk.new/src/fpu/Makefile.am 2011-07-29 14:56:08.000000000 +0100
-@@ -14,5 +14,5 @@
- libpspfpuinclude_HEADERS = pspfpu.h
-
- lib_LIBRARIES = libpspfpu.a
--libpspfpu_a_SOURCES = pspfpu.c
-+libpspfpu_a_SOURCES = pspfpu.c double.S
- libpspfpu_a_LIBADD =
-diff -Nbaur pspsdk/src/fpu/double.S pspsdk.new/src/fpu/double.S
---- pspsdk/src/fpu/double.S 1970-01-01 01:00:00.000000000 +0100
-+++ pspsdk.new/src/fpu/double.S 2011-07-29 14:56:08.000000000 +0100
-@@ -0,0 +1,196 @@
-+#define zero $0 /* wired zero */
-+#define at $1 /* assembler temp */
-+#define v0 $2 /* return value */
-+#define v1 $3
-+#define a0 $4 /* argument registers */
-+#define a1 $5
-+#define a2 $6
-+#define a3 $7
-+#define t0 $8 /* caller saved */
-+#define t1 $9
-+#define t2 $10
-+#define t3 $11
-+#define t4 $12
-+#define t5 $13
-+#define t6 $14
-+#define t7 $15
-+#define s0 $16 /* callee saved */
-+#define s1 $17
-+#define s2 $18
-+#define s3 $19
-+#define s4 $20
-+#define s5 $21
-+#define s6 $22
-+#define s7 $23
-+#define t8 $24 /* code generator */
-+#define t9 $25
-+#define k0 $26 /* kernel temporary */
-+#define k1 $27
-+#define gp $28 /* global pointer */
-+#define sp $29 /* stack pointer */
-+#define fp $30 /* frame pointer */
-+#define ra $31 /* return address */
-+
-+#define fv0 $f0
-+#define fv1 $f1
-+#define ft0 $f2
-+#define ft1 $f3
-+#define ft2 $f4
-+#define ft3 $f5
-+#define ft4 $f6
-+#define ft5 $f7
-+#define ft6 $f8
-+#define ft7 $f9
-+#define ft8 $f10
-+#define ft9 $f11
-+#define fa0 $f12
-+#define fa1 $f13
-+#define fa2 $f14
-+#define fa3 $f15
-+#define fa4 $f16
-+#define fa5 $f17
-+#define fa6 $f18
-+#define fa7 $f19
-+#define fs0 $f20
-+#define fs1 $f21
-+#define fs2 $f22
-+#define fs3 $f23
-+#define fs4 $f24
-+#define fs5 $f25
-+#define fs6 $f26
-+#define fs7 $f27
-+#define fs8 $f28
-+#define fs9 $f29
-+#define fs10 $f30
-+#define fs11 $f31
-+
-+.set noreorder
-+.set noat
-+
-+.text
-+.align 4
-+
-+.global pspFpuFloatToDouble
-+.global pspFpuDoubleToFloat
-+
-+/**
-+ * convert float to double
-+ * double pspFpuFloatToDouble(float a);
-+ *
-+ * input: fa0
-+ * output: v0,v1
-+ * clobber: t0,t1
-+ */
-+.ent pspFpuFloatToDouble
-+pspFpuFloatToDouble:
-+ mfc1 t0, fa0 /* t0 = fa0 */
-+ ext t1, t0, 23, 8 /* t1 = (t0 >> 23) & 0xFF */
-+ beq t1, zero, ftod_denormal /* if (t1==0) goto ftod_denormal */
-+ addiu v0, t1, (-0x7F+0x3FF) /* v0 = t1 - 0x7F + 0x3FF */
-+ xori t1, t1, 0xFF /* t1 = t1 ^ 0xFF */
-+ li v1, 0x7FF /* v1 = 0x7FF */
-+ movz v0, v1, t1 /* v0 = (t1==0) ? v1 : v0 */
-+ ext v1, t0, 3, 20 /* v1 = (t0 >> 3 ) & 0x00FFFFF */
-+ ins v1, v0, 20, 11 /* v1 = (v1 & 0x800FFFFF) | ((v0<<20) & 0x7FF00000) */
-+ sll v0, t0, 29 /* v0 = (t0 << 29) */
-+ srl t0, t0, 31 /* t0 = (t0 >> 31) & 1 */
-+ jr ra /* return */
-+ ins v1, t0, 31, 1 /* v1 = (v1 & 0x7FFFFFFF) | ((t0<<31) & 0x80000000) */
-+
-+ftod_denormal:
-+ sll v0, t0, 9 /* v0 = t0 << 9 */
-+ beql v0, zero, ftod_zero /* if (v0==0) goto ftod_zero */
-+ move v1, zero /* v1 = 0 */
-+ li v1, 0x380 /* v1 = 0x380 */
-+ clz t1, v0 /* t1 = clz(v0) */
-+ subu v0, v1, t1 /* v0 = v1 - v0 = 0x380 - clz(t1) */
-+ sllv t1, t0, t1 /* t1 = t0 << t1 */
-+ ext v1, t1, 2, 20 /* v1 = (t1 >> 2 ) & 0x00FFFFF */
-+ ins v1, v0, 20, 11 /* v1 = (v1 & 0x800FFFFF) | ((v0<<20) & 0x7FF00000) */
-+ sll v0, t1, 30 /* v0 = (t1 << 30) */
-+ftod_zero:
-+ srl t0, t0, 31 /* t0 = (t0 >> 31) & 1 */
-+ jr ra /* return */
-+ ins v1, t0, 31, 1 /* v1 = (v1 & 0x7FFFFFFF) | ((t0<<31) & 0x80000000) */
-+.end pspFpuFloatToDouble
-+
-+/**
-+ * convert double to float
-+ * float pspFpuDoubleToFloat(double a);
-+ * input: a0,a1
-+ * output: fv0
-+ * clobber: t0,t1,t2,v0
-+ */
-+.ent pspFpuDoubleToFloat
-+pspFpuDoubleToFloat:
-+ ext t0, a1, 20, 11 /* t0 = (a1>>20) & 0x000007FF */
-+ beq t0, zero, dtof_zero /* if (t0==0) goto dtof_zero */
-+ xori t1, t0, 0x7FF /* t1 = t0 ^ 0x7FF */
-+ beq t1, zero, dtof_naninf /* if (t1==0) goto dtof_naninf */
-+ addiu t1, t0, (+0x7F-0x3FF) /* t1 = t0 + 0x7F - 0x3FF */
-+ blez t1, dtof_denormal /* if (t1<=0) goto dtof_denormal */
-+ addiu t2, t1, -0xFE /* t2 = t1 - 0xFE */
-+ bgtz t2, dtof_inf /* if (t2 > 0) goto dtof_inf */
-+ move v0, zero /* v0 = 0 */
-+
-+ srl v0, a0, 29 /* v0 = (a0>>29) & 0x00000007 */
-+ ins v0, a1, 3, 20 /* v0 = (v0 & 0xFF800007) | ((a1 & 0FFFFF)<<3) */
-+ beq t2, zero, dtof_inf_normal /* if (t2==0) goto dtof_inf_normal */
-+dtof_normal:
-+ srl t2, a1, 31 /* t2 = (a1>>31) & 1 */
-+ ins v0, t2, 31, 1 /* v0 = (v0 & 0x7FFFFFFF) | (t2 << 31) */
-+ ins v0, t1, 23, 8 /* v0 = (v0 & 0x8007FFFF) | (t1 << 23) */
-+ jr ra /* return */
-+ mtc1 v0, fv0 /* fv0 = v0 */
-+dtof_denormal:
-+ sll t0, a1, 12 /* t0 = a1 << 12 */
-+ srl v0, t0, 10 /* v0 = t0 >> 10 */
-+ srl t0, a0, 30 /* t0 = t0 >> 30 */
-+ or v0, v0, t0 /* v0 = v0 | t0 */
-+ li t0, 0x00400000 /* t0 = 0x00400000 */
-+ or v0, v0, t0 /* v0 = v0 | t0 */
-+ subu t0, zero, t1 /* t0 = zero - t1 */
-+ sltiu t1, t0, 22 /* t1 = (t0 < 22) */
-+ beq t1, zero, dtof_min /* if (t1==0) goto dtof_min */
-+ srlv v0, v0, t0 /* v0 = v0 >> t0 */
-+ srl t2, a1, 31 /* t2 = (a1>>31) & 1 */
-+ ins v0, t2, 31, 1 /* v0 = (v0 & 0x7FFFFFFF) | (t2 << 31) */
-+ jr ra /* return */
-+ mtc1 v0, fv0 /* fv0 = v0 */
-+dtof_zero:
-+ sll t0, a1, 12 /* t0 = a1 << 12 */
-+ or t0, t0, a0 /* t0 = t0 | a0 */
-+dtof_min:
-+ li v0, 0x00000001 /* v0 = 0x00000001 */
-+ movz v0, zero, t0 /* v0 = (t0==0) ? zero : v0 */
-+ srl t0, a1, 31 /* t0 = (a1 >> 31) & 1 */
-+ ins v0, t0, 31, 1 /* v0 = (v0 & 0x7FFFFFFF) | ((t0<<31) & 0x80000000) */
-+ jr ra /* return */
-+ mtc1 v0, fv0 /* fv0 = v0 */
-+dtof_inf_normal:
-+ nor t0, zero, a1 /* t0 = ~a1 */
-+ sll t0, t0, 12 /* t0 = t0 << 12 */
-+ bne t0, zero, dtof_normal /* if (t0!=0) goto dtof_normal */
-+ srl t0, a0, 28 /* t0 = a0 >> 28 */
-+ sltiu t0, t0, 0xF /* t0 = (t0 < 0xF) */
-+ bne t0, zero, dtof_normal /* if (t0!=0) goto dtof_normal */
-+ nop /* waste delay slot */
-+ j dtof_inf /* goto dtof_inf */
-+ move v0, zero /* v0 = 0 */
-+dtof_naninf:
-+ sll t0, a1, 12 /* t0 = a1 << 12 */
-+ or t1, t0, a0 /* t1 = t0 | a0 */
-+ srl v0, t0, 9 /* v0 = t0 >> 9 */
-+ srl t0, a0, 29 /* t0 = t0 >> 29 */
-+ or v0, v0, t0 /* v0 = v0 | t0 */
-+ sltiu t0, v0, 1 /* t0 = (v0 < 1) */
-+ or v0, v0, t0 /* v0 = v0 | t0 */
-+ movz v0, zero, t1 /* v0 = (t1==0) ? zero : v0 */
-+dtof_inf:
-+ li t0, 0x7F800000 /* t0 = 0x7F800000 */
-+ or v0, v0, t0 /* v0 = v0 | t0 */
-+ srl t0, a1, 31 /* t0 = (a1 >> 31) & 1 */
-+ ins v0, t0, 31, 1 /* v0 = (v0 & 0x7FFFFFFF) | ((t0<<31) & 0x80000000) */
-+ jr ra /* return */
-+ mtc1 v0, fv0 /* fv0 = v0 */
-+.end pspFpuDoubleToFloat
-diff -Nbaur pspsdk/src/fpu/pspfpu.c pspsdk.new/src/fpu/pspfpu.c
---- pspsdk/src/fpu/pspfpu.c 2011-07-29 15:56:23.000000000 +0100
-+++ pspsdk.new/src/fpu/pspfpu.c 2011-07-29 15:49:37.000000000 +0100
-@@ -5,13 +5,42 @@
- *
- * pspfpu.h - PSP FPU library
- *
-+ * Copyright (c) 2009 JetCube
- * Copyright (c) 2006 TyRaNiD (James F.)
- *
-- * $Id: pspfpu.c 1781 2006-02-04 12:53:40Z tyranid $
- */
- #include "pspfpu.h"
-
--uint32_t pspfpu_get_fcr31(void)
-+#define PSP_MATH_PI 3.14159265358979323846
-+#define PSP_MATH_TWOPI (PSP_MATH_PI * 2.0)
-+#define PSP_MATH_SQRT2 1.41421356237309504880
-+#define PSP_MATH_LN2 0.69314718055994530942
-+#define PSP_MATH_LOG2E 1.4426950408889634074
-+#define COS_SIN_DIV 0.208
-+
-+static const float logPoly[] = {
-+ 4194305.0 / (1024.0 * 1024.0 * 2.0), /* arround 2.0 */
-+ 5590817.0 / (1024.0 * 1024.0 * 8.0), /* arround 2.0/3.0 */
-+ 13890687.0 / (1024.0 * 1024.0 * 32.0), /* arround 2.0/5.0 */
-+};
-+
-+static const float triPoly[] = {
-+ (float)(2.0*PSP_MATH_PI),
-+ (float)(1.0),
-+ (float)(-0xAAAA98/(1024.0*1024*64)),
-+ (float)( 0x88801C/(1024.0*1024*1024)),
-+ (float)(-0xCB9F27/(1024.0*1024*1024*64)),
-+
-+ (float)(-0xFFFFF9/(1024.0*1024*32)),
-+ (float)( 0xAAA6FB/(1024.0*1024*256)),
-+ (float)(-0xB3D431/(1024.0*1024*1024*8)),
-+
-+ (float)(-0xAAAAAA/(1024.0*1024*32)),
-+ (float)( 0xCCCCCD/(1024.0*1024*64)),
-+ (float)(-0x8F5C29/(1024.0*1024*64)),
-+};
-+
-+uint32_t pspFpuGetFCR31(void)
- {
- uint32_t ret;
-
-@@ -23,7 +52,7 @@
- return ret;
- }
-
--void pspfpu_set_fcr31(uint32_t var)
-+void pspFpuSetFCR31(uint32_t var)
- {
- asm (
- "ctc1 %0, $31\n"
-@@ -32,120 +61,883 @@
- );
- }
-
--void pspfpu_set_roundmode(enum FpuRoundMode mode)
-+void pspFpuSetRoundmode(enum PspFpuRoundMode mode)
- {
- uint32_t fcr;
-
-- fcr = pspfpu_get_fcr31();
-- fcr &= ~FPU_RM_MASK;
-- fcr |= (mode & FPU_RM_MASK);
-- pspfpu_set_fcr31(fcr);
-+ fcr = pspFpuGetFCR31();
-+ fcr &= ~PSP_FPU_RM_MASK;
-+ fcr |= (mode & PSP_FPU_RM_MASK);
-+ pspFpuSetFCR31(fcr);
- }
-
--enum FpuRoundMode pspfpu_get_roundmode(void)
-+enum PspFpuRoundMode pspFpuGetRoundmode(void)
- {
-- return pspfpu_get_fcr31() & FPU_RM_MASK;
-+ return pspFpuGetFCR31() & PSP_FPU_RM_MASK;
- }
-
--uint32_t pspfpu_get_flags(void)
-+uint32_t pspFpuGetFlags(void)
- {
- uint32_t fcr;
-
-- fcr = pspfpu_get_fcr31();
-+ fcr = pspFpuGetFCR31();
-
-- return (fcr & FPU_FLAGS_MASK) >> FPU_FLAGS_POS;
-+ return (fcr & PSP_FPU_FLAGS_MASK) >> PSP_FPU_FLAGS_POS;
- }
-
--void pspfpu_clear_flags(uint32_t clear)
-+void pspFpuClearFlags(uint32_t clear)
- {
- uint32_t fcr;
-
- clear &= 0x1F;
-- fcr = pspfpu_get_fcr31();
-- fcr &= ~(clear << FPU_FLAGS_POS);
-- pspfpu_set_fcr31(fcr);
-+ fcr = pspFpuGetFCR31();
-+ fcr &= ~(clear << PSP_FPU_FLAGS_POS);
-+ pspFpuSetFCR31(fcr);
- }
-
--uint32_t pspfpu_get_enable(void)
-+uint32_t pspFpuGetEnable(void)
- {
- uint32_t fcr;
-
-- fcr = pspfpu_get_fcr31();
-+ fcr = pspFpuGetFCR31();
-
-- return (fcr & FPU_ENABLE_MASK) >> FPU_ENABLE_POS;
-+ return (fcr & PSP_FPU_ENABLE_MASK) >> PSP_FPU_ENABLE_POS;
- }
-
--void pspfpu_set_enable(uint32_t enable)
-+void pspFpuSetEnable(uint32_t enable)
- {
- uint32_t fcr;
-
- enable &= 0x1F;
-- fcr = pspfpu_get_fcr31() & ~FPU_ENABLE_MASK;
-- fcr |= enable << FPU_ENABLE_POS;
-- pspfpu_set_fcr31(fcr);
-+ fcr = pspFpuGetFCR31() & ~PSP_FPU_ENABLE_MASK;
-+ fcr |= enable << PSP_FPU_ENABLE_POS;
-+ pspFpuSetFCR31(fcr);
- }
-
--uint32_t pspfpu_get_cause(void)
-+uint32_t pspFpuGetCause(void)
- {
- uint32_t fcr;
-
-- fcr = pspfpu_get_fcr31();
-+ fcr = pspFpuGetFCR31();
-
-- return (fcr & FPU_CAUSE_MASK) >> FPU_CAUSE_POS;
-+ return (fcr & PSP_FPU_CAUSE_MASK) >> PSP_FPU_CAUSE_POS;
- }
-
--void pspfpu_clear_cause(uint32_t clear)
-+void pspFpuClearCause(uint32_t clear)
- {
- uint32_t fcr;
-
- clear &= 0x3F;
-- fcr = pspfpu_get_fcr31();
-- fcr &= ~(clear << FPU_CAUSE_POS);
-- pspfpu_set_fcr31(fcr);
-+ fcr = pspFpuGetFCR31();
-+ fcr &= ~(clear << PSP_FPU_CAUSE_POS);
-+ pspFpuSetFCR31(fcr);
- }
-
--uint32_t pspfpu_get_fs(void)
-+uint32_t pspFpuGetFS(void)
- {
- uint32_t fcr;
-
-- fcr = pspfpu_get_fcr31();
-+ fcr = pspFpuGetFCR31();
-
-- return (fcr & FPU_FS_MASK) >> FPU_FS_POS;
-+ return (fcr & PSP_FPU_FS_MASK) >> PSP_FPU_FS_POS;
- }
-
--void pspfpu_set_fs(uint32_t fs)
-+void pspFpuSetFS(uint32_t fs)
- {
- uint32_t fcr;
-
-- fcr = pspfpu_get_fcr31();
-- fcr &= ~FPU_FS_MASK;
-+ fcr = pspFpuGetFCR31();
-+ fcr &= ~PSP_FPU_FS_MASK;
-
-- fcr |= ((fs & 1) << FPU_FS_POS);
-+ fcr |= ((fs & 1) << PSP_FPU_FS_POS);
-
-- pspfpu_set_fcr31(fcr);
-+ pspFpuSetFCR31(fcr);
- }
-
--uint32_t pspfpu_get_condbits(void)
-+uint32_t pspFpuGetCondbits(void)
- {
- uint32_t fcr;
- uint32_t cond;
-
-- fcr = pspfpu_get_fcr31();
-- cond = (fcr & FPU_CC0_MASK) >> FPU_CC0_POS;
-- cond |= (fcr & FPU_CC17_MASK) >> (FPU_CC17_POS-1);
-+ fcr = pspFpuGetFCR31();
-+ cond = (fcr & PSP_FPU_CC0_MASK) >> PSP_FPU_CC0_POS;
-+ cond |= (fcr & PSP_FPU_CC17_MASK) >> (PSP_FPU_CC17_POS-1);
-
- return cond;
- }
-
--void pspfpu_clear_condbits(uint32_t clear)
-+void pspFpuClearCondbits(uint32_t clear)
- {
- uint32_t fcr;
-
- clear &= 0xFF;
-
-- fcr = pspfpu_get_fcr31();
-- fcr &= ~((clear & 1) << FPU_CC0_POS);
-- fcr &= ~((clear & 0xFE) << (FPU_CC17_POS-1));
-+ fcr = pspFpuGetFCR31();
-+ fcr &= ~((clear & 1) << PSP_FPU_CC0_POS);
-+ fcr &= ~((clear & 0xFE) << (PSP_FPU_CC17_POS-1));
-+
-+ pspFpuSetFCR31(fcr);
-+}
-+
-+float pspFpuAbs(float fs)
-+{
-+ register float fd;
-+ asm (
-+ "abs.s %0, %1\n"
-+ : "=f"(fd)
-+ : "f"(fs)
-+ );
-+ return (fd);
-+}
-+
-+int pspFpuCeil(float fs)
-+{
-+ return (__builtin_allegrex_ceil_w_s(fs));
-+}
-+
-+int pspFpuFloor(float fs)
-+{
-+ return (__builtin_allegrex_floor_w_s(fs));
-+}
-+
-+float pspFpuMax(float fs1, float fs2)
-+{
-+ register float fd;
-+ fd = (fs1 > fs2) ? fs1 : fs2;
-+ return (fd);
-+}
-+
-+float pspFpuMin(float fs1, float fs2)
-+{
-+ register float fd;
-+ fd = (fs1 < fs2) ? fs1 : fs2;
-+ return (fd);
-+}
-+
-+float pspFpuNeg(float fs)
-+{
-+ register float fd;
-+ asm (
-+ "neg.s %0, %1\n"
-+ : "=f"(fd)
-+ : "f"(fs)
-+ );
-+ return (fd);
-+}
-+
-+int pspFpuRound(float fs)
-+{
-+ return (__builtin_allegrex_round_w_s(fs));
-+}
-+
-+float pspFpuRsqrt(float fs)
-+{
-+ return (1.0f / __builtin_allegrex_sqrt_s(fs));
-+}
-+
-+float pspFpuSqrt(float fs)
-+{
-+ return (__builtin_allegrex_sqrt_s(fs));
-+}
-+
-+int pspFpuTrunc(float fs)
-+{
-+ return (__builtin_allegrex_trunc_w_s(fs));
-+}
-+
-+float pspFpuFmod(float fs, float fd)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "div.s %0, %1, %2\n" // v = fs / fd
-+ "trunc.w.s %0, %0\n" // v = trunc(v)
-+ "cvt.s.w %0, %0\n" // v = (float)v = (float)trunc(v)
-+ "mul.s %0, %0, %2\n" // v = v * fd
-+ "sub.s %0, %1, %0\n" // v = fs - v*fd = fs - trunc(fs / fd)*fd
-+ ".set pop\n"
-+ : "=&f"(v)
-+ : "f"(fs), "f"(fd)
-+ );
-+ return (v);
-+}
-+
-+float pspFpuFrac(float fs)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "trunc.w.s %0, %1\n" // v = trunc(fs)
-+ "cvt.s.w %0, %0\n" // v = (float)v = (float)trunc(fs)
-+ "sub.s %0, %1, %0\n" // v = fs - v
-+ ".set pop\n"
-+ : "=&f"(v)
-+ : "f"(fs)
-+ );
-+ return (v);
-+}
-+
-+float pspFpuReinterpretFloat(uint32_t ui)
-+{
-+ float v;
-+ asm (
-+ "mtc1 %1, %0\n"
-+ : "=f"(v)
-+ : "r"(ui)
-+ );
-+ return (v);
-+}
-+
-+uint32_t pspFpuReinterpretUint(float fs)
-+{
-+ unsigned int v;
-+ asm (
-+ "mfc1 %0, %1\n"
-+ : "=r"(v)
-+ : "f"(fs)
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsEqual(float fs1, float fs2)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "c.eq.s %2, %1\n" // compare fs1 to fs2
-+ "move %0, $0\n" // v = 0
-+ "bc1tl 0f\n" // if (fs1==fs2) goto 0f
-+ "addiu %0, $0, 1\n" // if (fs1==fs2) v = 1
-+ "0:\n"
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(fs1), "f"(fs2)
-+ );
-+ return (v);
-+}
-+
-+float pspFpuSignFloat(float fs)
-+{
-+ float fv;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $8, %1\n" // t0 = fs
-+ "lui $10, 0x3F80\n" // t2 = 0x3F800000(1.0f)
-+ "srl $9, $8, 23\n" // t1 = t0>>23
-+ "srl $8, $8, 31\n" // t0 = t0>>31
-+ "andi $9, $9, 0x00FF\n" // t1 = t1 & 0x00FF
-+ "sll $8, $8, 31\n" // t0 = t0<<31 = (fs>=0) ? 0 : 0x80000000
-+ "movz $10, $0, $9\n" // t2 = (t1==0) ? 0 : t2
-+ "or $10, $10, $8\n" // t2 = t2 | t0
-+ "mtc1 $10, %0\n" // fv = t2
-+ ".set pop\n"
-+ : "=f"(fv)
-+ : "f"(fs)
-+ : "$8", "$9", "$10"
-+ );
-+ return (fv);
-+}
-+
-+int pspFpuSignInt(float fs)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 %0, %1\n" // v = fs
-+ "lui $8, 0x7F80\n" // t0 = 0x7F800000(binary representaion 1.0 * 2^(255-127))
-+ "and $8, $8, %0\n" // t0 = at & v
-+ "sra %0, %0, 30\n" // v = fs>>30 = (fs>=0) ? 0or1 : -1or-2
-+ "or %0, %0, 1\n" // v = v | 1 = (fs>=0) ? 1 : -1
-+ "movz %0, $0, $8\n" // v = (t0==0) ? 0 : v
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(fs)
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuPositiveZero(void)
-+{
-+ float v;
-+ asm (
-+ "mtc1 $0, %0\n" // v = 0.0f
-+ : "=f"(v)
-+ );
-+ return (v);
-+}
-+
-+float pspFpuNegativeZero(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0x8000\n" // t0 = 0x80000000
-+ "mtc1 $8, %0\n" // v = -0.0f
-+ ".set pop\n"
-+ : "=f"(v)
-+ :
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsZero(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $8, %1\n" // t0 = f
-+ "sra %0, $8, 30\n" // v = t0>>30
-+ "sll $8, $8, 1\n" // t0 = t0<<1
-+ "ori %0, %0, 0x0001\n" // v = v | 1 = (f>=0) ? +1 : -1
-+ "movn %0, $0, $8\n" // v = (t0!=0) ? 0 : v
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsPositiveZero(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 %0, %1\n" // v = f
-+ "sltiu %0, %0, 1\n" // v = (v < 1)
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsNegativeZero(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 %0, %1\n" // v = f
-+ "lui $8, 0x8000\n" // t0 = 0x80000000
-+ "xor %0, %0, $8\n" // v = v ^ t0
-+ "sltiu %0, %0, 1\n" // v = (v < 1)
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsDenormal(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $8, %1\n" // t0 = f
-+ "lui $9, 0x7F80\n" // t1 = 0x7F800000
-+ "or %0, $8, $9\n" // v = t0 | t1 = t0 | 0x7F800000
-+ "and $9, $8, $9\n" // t1 = t0 & t1 = t0 & 0x7F800000
-+ "sra %0, %0, 30\n" // v = v>>30 = (t0>=0) ? +1 : -1
-+ "sll $8, $8, 9\n" // t0 = t0<<9
-+ "movn %0, $0, $9\n" // v = (t1!=0) ? 0 : v if (exp!=0) is not denormal number
-+ "movz %0, $0, $8\n" // v = (t0==0) ? 0 : v if (frac==0) is not decnormal number
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsZeroOrDenormal(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $8, %1\n" // t0 = f
-+ "lui $9, 0x7F80\n" // t1 = 0x7F800000
-+ "or %0, $8, $9\n" // v = t0 | t1 = t0 | 0x7F800000
-+ "and $9, $8, $9\n" // t1 = t0 & t1 = t0 & 0x7F800000
-+ "sra %0, %0, 30\n" // v = v>>30 = (t0>=0) ? +1 : -1
-+ "movn %0, $0, $9\n" // v = (t1!=0) ? 0 : v if (exp!=0) is not denormal number
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuPositiveInf(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0x7F80\n" // t0 = 0x7F800000
-+ "mtc1 $8, %0\n" // v = t0 = +Infinity
-+ ".set pop\n"
-+ : "=f"(v)
-+ :
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuNegativeInf(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0xFF80\n" // t0 = 0xFF800000
-+ "mtc1 $8, %0\n" // v = t0 = -Infinity
-+ ".set pop\n"
-+ : "=f"(v)
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsInf(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $8, %1\n" // t0 = f
-+ "sll $9, $8, 1\n" // t1 = t0<<1
-+ "sra %0, $8, 30\n" // v = t0>>30
-+ "srl $9, $9, 24\n" // t1 = t1>>24
-+ "sll $8, $8, 9\n" // t0 = t0<<9
-+ "ori %0, %0, 0x0001\n" // v = v | 0x00000001 = (f>=0) ? +1 : -1
-+ "sltiu $9, $9, 0x00FF\n" // t1 = (t1<0xFF)
-+ "movn %0, $0, $8\n" // v = (t0!=0) ? 0 : v if (frac!=0) is not Infinity
-+ "movn %0, $0, $9\n" // v = (t1!=0) ? 0 : v if (exp!=0xFF) is not Infinity
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuPositiveNaN(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0x7F80\n"
-+ "ori $8, $8, 0x0001\n" // t0 = 0x7F800001
-+ "mtc1 $8, %0\n" // v = t0 = +SNaN(0x000001)
-+ ".set pop\n"
-+ : "=f"(v)
-+ :
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuNegativeNaN(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0xFF80\n"
-+ "ori $8, $8, 0x0001\n" // t0 = 0xFF800001
-+ "mtc1 $8, %0\n" // v = t0 = -SNaN(0x000001)
-+ ".set pop\n"
-+ : "=f"(v)
-+ :
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuPositiveQNaN(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0x7FC0\n" // t0 = 0x7FC00000
-+ "mtc1 $8, %0\n" // v = t0 = +QNaN
-+ ".set pop\n"
-+ : "=f"(v)
-+ :
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuNegativeQNaN(void)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui $8, 0xFFC0\n" // t0 = 0xFFC00000
-+ "mtc1 $8, %0\n" // v = t0 = -QNaN
-+ ".set pop\n"
-+ : "=f"(v)
-+ :
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuPositiveSNaN(unsigned int uiSignal)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "addiu $9, $0, 1\n" // t1 = 0x00000001
-+ "ext $8, %1, 0, 22\n" // t0 = uiSignal & 0x003FFFFF
-+ "movn $9, $8, $8\n" // t1 = (t0!=0) ? t0 : t1
-+ "lui $8, 0x7F80\n" // t0 = 0x7F800000
-+ "or $9, $9, $8\n" // t1 = t1 | t0
-+ "mtc1 $9, %0\n" // v = t1
-+ ".set pop\n"
-+ : "=f"(v)
-+ : "r"(uiSignal)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuNegativeSNaN(unsigned int uiSignal)
-+{
-+ float v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "addiu $9, $0, 1\n" // t1 = 0x00000001
-+ "ext $8, %1, 0, 22\n" // t0 = uiSignal & 0x003FFFFF
-+ "movn $9, $8, $8\n" // t1 = (t0!=0) ? t0 : t1
-+ "lui $8, 0xFF80\n" // t0 = 0xFF800000
-+ "or $9, $9, $8\n" // t1 = t1 | t0
-+ "mtc1 $9, %0\n" // v = t1
-+ ".set pop\n"
-+ : "=f"(v)
-+ : "r"(uiSignal)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsNaN(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "lui %0, 0x807F\n" //
-+ "mfc1 $8, %1\n" // t0 = f
-+ "ori %0, %0, 0xFFFF\n" // v = 0x807FFFFF
-+ "sll $9, $8, 1\n" // t1 = t0<<1
-+ "and %0, %0, $8\n" // v = v & t0
-+ "srl $9, $9, 24\n" // t1 = t1>>24
-+ "sll $8, $8, 9\n" // t0 = t0<<9
-+ "sltiu $9, $9, 0x00FF\n" // t1 = (t1<0xFF)
-+ "movz %0, $0, $8\n" // v = (t0==0) ? 0 : v if (frac==0) is not NaN
-+ "movn %0, $0, $9\n" // v = (t1!=0) ? 0 : v if (exp!=0xFF) is not NAN
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8", "$9"
-+ );
-+ return (v);
-+}
-+
-+int pspFpuIsInfOrNaN(float f)
-+{
-+ int v;
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 %0, %1\n" // v = f
-+ "sll $8, %0, 1\n" // t0 = v<<1
-+ "sra %0, %0, 30\n" // v = v>>30
-+ "srl $8, $8, 24\n" // t0 = t0>>24
-+ "ori %0, %0, 0x0001\n" // v = v | 0x00000001 = (f>=0) ? +1 : -1
-+ "sltiu $8, $8, 0x00FF\n" // t0 = (t0<0xFF)
-+ "movn %0, $0, $8\n" // v = (t0!=0) ? 0 : v if (exp!=0xFF) is neither NAN nor Infinity
-+ ".set pop\n"
-+ : "=r"(v)
-+ : "f"(f)
-+ : "$8"
-+ );
-+ return (v);
-+}
-+
-+float pspFpuNormalizePhase(float fs)
-+{
-+ const float f2pi = PSP_MATH_TWOPI;
-+ float fd;
-+
-+ asm (
-+ ".set push\n"
-+ ".set noreorder\n"
-+ "mfc1 $9, %1\n" // t1 = f0
-+ "div.s $f0, $f0, %2\n" // f0 = f0 / f2pi = fs / 2PI
-+ "round.w.s $f0, $f0\n" // f0 = (int)(f0+0.5)
-+ "cvt.s.w $f0, $f0\n" // f0 = float(f0)
-+ "mul.s $f0, $f0, %2\n" // f0 = f0 * f2pi = fd * 2PI
-+ "sub.s %0, %1, $f0\n" // fd = fs - f0 = fs - (fd * 2PI)
-+ ".set pop\n"
-+ : "=f"(fd)
-+ : "f"(fs), "f"(f2pi)
-+ : "$f0", "$8", "$9"
-+ );
-+ return (fd);
-+}
-+
-+float pspFpuLog(float x)
-+{
-+ union {
-+ float f;
-+ int i;
-+ } fi;
-+ int a, b, exponent;
-+ float y, z;
-+ fi.f = x;
-+ if (fi.i <= 0) {
-+ if ((fi.i & 0x7fffffff) == 0) {
-+ fi.i = 0xff800000; /* -INF */
-+ return fi.f;
-+ }
-+ fi.i = 0xff80ffff; /* Quiet NaN */
-+ return fi.f;
-+ }
-+
-+ b = (fi.i & 0x007fffff);
-+ a = b - (1<<23);
-+ exponent = fi.i;
-+ if (b <= 0x3504F3) {
-+ a = b;
-+ b = b - (1 << 23);
-+ exponent -= (1<<23);
-+ }
-+ b = b - (1 << 23) + (1<<25);
-+
-+ x = (float)(a) / (float)(b);
-+ z = (((exponent>>23)-126) * 0xB17218) * (float)(1.0/(1<<24));
-+ y = x * x;
-+ return z + x * (((logPoly[2] * y + logPoly[1]) * y) + logPoly[0]);
-+}
-+
-+float pspFpuExp(float x)
-+{
-+ /*
-+ * exp(x)=e^x=e^(y * log2)=2^Y
-+ * =2^z * 2^y
-+ * =2^z * (2^(y/2))^2
-+ * =2^z * (e^(f/2))^2
-+ * =2^z * (e^(f/4))^4
-+ * where y=x/log 2
-+ * z=nearest(y) , -0.5 <= f=y-z < 0.5
-+ */
-+ union {
-+ float f;
-+ int i;
-+ } fi;
-+ float z, f;
-+
-+ fi.f = x;
-+ fi.i &= 0x7fffffff;
-+ if (fi.i >= 0x42b00f34) {/* arround 88.03 */
-+ /* overflow */
-+ if (x != x) {
-+ return x; /* NaN */
-+ }
-+ if (fi.i < 0) {
-+ return 0.0; /* underflow */
-+ }
-+ fi.i = 0x7f800000;
-+ return fi.f; /* +INF */
-+ }
-+
-+ f = fi.f * (float)PSP_MATH_LOG2E;
-+
-+ z = __builtin_allegrex_round_w_s(f);
-+ f = f-z;
-+ fi.i = z;
-+ if (x < 0)
-+ fi.i = -fi.i;
-+ fi.i = (fi.i+127) << 23;
-+
-+ /* use Pade aprox. */
-+ f = (6.0f + (float)(4.0*PSP_MATH_LN2 * 0.25)*f
-+ + (float)(0.9996*PSP_MATH_LN2*0.25*PSP_MATH_LN2*0.25)*f*f)
-+ / (6.0f - (float)(2.0*PSP_MATH_LN2 * 0.25)*f);
-+ f *= f;
-+ fi.f *= f*f;
-+ return fi.f;
-+}
-+
-+static float _pspFpuSinMain(float x)
-+{
-+ float y = x*x;
-+ return x * (((triPoly[4] * y
-+ + triPoly[3]) * y
-+ + triPoly[2]) * y
-+ + triPoly[1]);
-+}
-+
-+static float _pspFpuCosMain(float x)
-+{
-+ float y = x*x;
-+ return ((triPoly[7] * y
-+ + triPoly[6]) * y
-+ + triPoly[5]) * y
-+ + triPoly[1];
-+}
-+
-+static float _pspFpuAtanMain(float x)
-+{
-+ float y = x*x;
-+ return x * (((triPoly[10] * y
-+ + triPoly[9]) * y
-+ + triPoly[8]) * y
-+ + triPoly[1]);
-+}
-+
-+
-+float pspFpuSin(float x)
-+{
-+ float pi2;
-+ int sign = 1;
-+
-+ /* NaN */
-+ if (x != x) {
-+ return x;
-+ }
-+
-+ pi2 = triPoly[0];
-+ if (x < 0.0f) {
-+ sign = -1;
-+ x = -x;
-+ }
-
-- pspfpu_set_fcr31(fcr);
-+ if (x > pi2) {
-+ float y = x / pi2;
-+ x -= (float)((int)y) * pi2;
-+ }
-+
-+ pi2 *= 0.5f;
-+ if (x > pi2) {
-+ x -= pi2;
-+ sign = -sign;
-+ }
-+
-+ if (x > pi2*0.5f) {
-+ x = pi2 - x;
-+ }
-+ if (x > (float)(PSP_MATH_PI * (0.5 - COS_SIN_DIV))) {
-+ return _pspFpuCosMain(pi2*0.5f - x) * sign;
-+ }
-+
-+ return _pspFpuSinMain(x) * sign;
-+}
-+
-+
-+float pspFpuCos(float x)
-+{
-+ float pi2;
-+ int sign = 1;
-+
-+ /* NaN */
-+ if (x != x) {
-+ return x;
-+ }
-+
-+ pi2 = triPoly[0];
-+ if (x < 0.0f) {
-+ x = -x;
-+ }
-+
-+ if (x > pi2) {
-+ float y = x / pi2;
-+ x -= (float)((int)y) * pi2;
-+ }
-+
-+ pi2 *= 0.5f; // pi2 = PI
-+ if (x > pi2) {
-+ x -= pi2;
-+ sign = -1;
-+ }
-+
-+ if (x > pi2*0.5f) {
-+ sign = -sign;
-+ x = pi2 - x;
-+ }
-+ if (x > (float) (PSP_MATH_PI * COS_SIN_DIV)) {
-+ return _pspFpuSinMain(pi2*0.5f - x) * sign;
-+ }
-+
-+ return _pspFpuCosMain(x) * sign;
-+}
-+
-+static float _atanf(float x)
-+{
-+ if (x < 0.19890f) {
-+ return _pspFpuAtanMain(x);
-+ }
-+ if (x < 0.668106f) {
-+ return (float)(PSP_MATH_PI / 8)
-+ + _pspFpuAtanMain((x - (float)(PSP_MATH_SQRT2 - 1)) / (1.0f + ((float)(PSP_MATH_SQRT2 - 1)*x)));
-+ }
-+ return ((float)PSP_MATH_PI / 4) + _pspFpuAtanMain((x - 1.0f) / (x + 1.0f));
-+}
-+
-+
-+float pspFpuAtan(float x)
-+{
-+ int sign = 1;
-+
-+ /* NaN */
-+ if (x != x) {
-+ return x;
-+ }
-+
-+ if (x < 0.0f) {
-+ x = -x;
-+ sign = -1;
-+ }
-+ if (x >= 1.0f) {
-+ /*J atan(x) = pi/2 - atan(1/x) */
-+ x = 1.0f / x;
-+ x = ((float)(PSP_MATH_PI / 2)) - _atanf(x);
-+ } else {
-+ x = _atanf(x);
-+ }
-+ return x * (float)sign;
-+}
-+
-+float pspFpuAsin(float x)
-+{
-+ x = x*x;
-+ return pspFpuAtan(__builtin_allegrex_sqrt_s(x/(1.0f-x)));
-+}
-+
-+float pspFpuAcos(float x)
-+{
-+ x = x*x;
-+ return pspFpuAtan(__builtin_allegrex_sqrt_s((1.0f-x)/x));
- }
-diff -Nbaur pspsdk/src/fpu/pspfpu.h pspsdk.new/src/fpu/pspfpu.h
---- pspsdk/src/fpu/pspfpu.h 2011-07-29 15:56:23.000000000 +0100
-+++ pspsdk.new/src/fpu/pspfpu.h 2011-07-29 14:56:08.000000000 +0100
-@@ -5,6 +5,7 @@
- *
- * pspfpu.h - Prototypes for the FPU library
- *
-+ * Copyright (c) 2009 JetCube
- * Copyright (c) 2006 TyRaNiD (James F.)
- *
- * $Id: pspfpu.h 1782 2006-02-04 12:57:05Z tyranid $
-@@ -23,131 +24,131 @@
- #endif
-
- /** Enumeration for FPU rounding modes */
--enum FpuRoundMode
-+enum PspFpuRoundMode
- {
- /** Round to nearest representable value */
-- FPU_RN = 0,
-+ PSP_FPU_RN = 0,
- /** Round towards zero */
-- FPU_RZ = 1,
-+ PSP_FPU_RZ = 1,
- /** Round towards plus infinity */
-- FPU_RP = 2,
-+ PSP_FPU_RP = 2,
- /** Round towards minus infinity */
-- FPU_RM = 3,
-+ PSP_FPU_RM = 3,
- };
-
- /** Mask value for rounding mode */
--#define FPU_RM_MASK 0x03
-+#define PSP_FPU_RM_MASK 0x03
-
- /** Enumeration for FPU exceptions */
--enum FpuExceptions
-+enum PspFpuExceptions
- {
- /** Inexact operation exception */
-- FPU_EXCEPTION_INEXACT = 0x01,
-+ PSP_FPU_EXCEPTION_INEXACT = 0x01,
- /** Underflow exception */
-- FPU_EXCEPTION_UNDERFLOW = 0x02,
-+ PSP_FPU_EXCEPTION_UNDERFLOW = 0x02,
- /** Overflow exception */
-- FPU_EXCEPTION_OVERFLOW = 0x04,
-+ PSP_FPU_EXCEPTION_OVERFLOW = 0x04,
- /** Division by zero exception */
-- FPU_EXCEPTION_DIVBYZERO = 0x08,
-+ PSP_FPU_EXCEPTION_DIVBYZERO = 0x08,
- /** Invalid operation exception */
-- FPU_EXCEPTION_INVALIDOP = 0x10,
-+ PSP_FPU_EXCEPTION_INVALIDOP = 0x10,
- /** Unimplemented operation exception (only supported in the cause bits) */
-- FPU_EXCEPTION_UNIMPOP = 0x20,
-+ PSP_FPU_EXCEPTION_UNIMPOP = 0x20,
- /** All exceptions */
-- FPU_EXCEPTION_ALL = 0x3F
-+ PSP_FPU_EXCEPTION_ALL = 0x3F
- };
-
- /** Bit position of the flag bits */
--#define FPU_FLAGS_POS 2
-+#define PSP_FPU_FLAGS_POS 2
- /** Bit position of the enable bits */
--#define FPU_ENABLE_POS 7
-+#define PSP_FPU_ENABLE_POS 7
- /** Bit position of the cause bits */
--#define FPU_CAUSE_POS 12
-+#define PSP_FPU_CAUSE_POS 12
- /** Bit position of the cc0 bit */
--#define FPU_CC0_POS 23
-+#define PSP_FPU_CC0_POS 23
- /** Bit position of the fs bit */
--#define FPU_FS_POS 24
-+#define PSP_FPU_FS_POS 24
- /** Bit position of the cc1->7 bits */
--#define FPU_CC17_POS 25
-+#define PSP_FPU_CC17_POS 25
-
--#define FPU_FLAGS_MASK (0x1F << FPU_FLAGS_POS)
--#define FPU_ENABLE_MASK (0x1F << FPU_ENABLE_POS)
--#define FPU_CAUSE_MASK (0x3F << FPU_CAUSE_POS)
--#define FPU_CC0_MASK (1 << FPU_CC0_POS)
--#define FPU_FS_MASK (1 << FPU_FS_POS)
--#define FPU_CC17_MASK (0x7F << FPU_CC17_POS)
-+#define PSP_FPU_FLAGS_MASK (0x1F << PSP_FPU_FLAGS_POS)
-+#define PSP_FPU_ENABLE_MASK (0x1F << PSP_FPU_ENABLE_POS)
-+#define PSP_FPU_CAUSE_MASK (0x3F << PSP_FPU_CAUSE_POS)
-+#define PSP_FPU_CC0_MASK (1 << PSP_FPU_CC0_POS)
-+#define PSP_FPU_FS_MASK (1 << PSP_FPU_FS_POS)
-+#define PSP_FPU_CC17_MASK (0x7F << PSP_FPU_CC17_POS)
-
- /**
- * Get the current value of the control/status register
- *
- * @return The value of the control/status register
- */
--uint32_t pspfpu_get_fcr31(void);
-+uint32_t pspFpuGetFCR31(void);
-
- /**
- * Set the current value of the control/status register
- *
- * @param var - The value to set.
- */
--void pspfpu_set_fcr31(uint32_t var);
-+void pspFpuSetFCR31(uint32_t var);
-
- /**
- * Set the current round mode
- *
-- * @param mode - The rounding mode to set, one of ::FpuRoundMode
-+ * @param mode - The rounding mode to set, one of ::PspFpuRoundMode
- */
--void pspfpu_set_roundmode(enum FpuRoundMode mode);
-+void pspFpuSetRoundmode(enum PspFpuRoundMode mode);
-
- /**
- * Get the current round mode
- *
-- * @return The round mode, one of ::FpuRoundMode
-+ * @return The round mode, one of ::PspFpuRoundMode
- */
--enum FpuRoundMode pspfpu_get_roundmode(void);
-+enum PspFpuRoundMode pspFpuGetRoundmode(void);
-
- /**
- * Get the exception flags (set when an exception occurs but
- * the actual exception bit is not enabled)
- *
-- * @return Bitmask of the flags, zero or more of ::FpuExceptions
-+ * @return Bitmask of the flags, zero or more of ::PspFpuExceptions
- */
--uint32_t pspfpu_get_flags(void);
-+uint32_t pspFpuGetFlags(void);
-
- /**
- * Clear the flags bits
- *
-- * @param clear - Bitmask of the bits to clear, one or more of ::FpuExceptions
-+ * @param clear - Bitmask of the bits to clear, one or more of ::PspFpuExceptions
- */
--void pspfpu_clear_flags(uint32_t clear);
-+void pspFpuClearFlags(uint32_t clear);
-
- /**
- * Get the exception enable flags
- *
-- * @return Bitmask of the flags, zero or more of ::FpuExceptions
-+ * @return Bitmask of the flags, zero or more of ::PspFpuExceptions
- */
--uint32_t pspfpu_get_enable(void);
-+uint32_t pspFpuGetEnable(void);
-
- /**
- * Set the enable flags bits
- *
-- * @param enable - Bitmask of exceptions to enable, zero or more of ::FpuExceptions
-+ * @param enable - Bitmask of exceptions to enable, zero or more of ::PspFpuExceptions
- */
--void pspfpu_set_enable(uint32_t enable);
-+void pspFpuSetEnable(uint32_t enable);
-
- /**
- * Get the cause bits (only useful if you installed your own exception handler)
- *
-- * @return Bitmask of flags, zero or more of ::FpuExceptions
-+ * @return Bitmask of flags, zero or more of ::PspFpuExceptions
- */
--uint32_t pspfpu_get_cause(void);
-+uint32_t pspFpuGetCause(void);
-
- /**
- * Clear the cause bits
- *
-- * @param clear - Bitmask of the bits to clear, one or more of ::FpuExceptions
-+ * @param clear - Bitmask of the bits to clear, one or more of ::PspFpuExceptions
- *
- */
--void pspfpu_clear_cause(uint32_t clear);
-+void pspFpuClearCause(uint32_t clear);
-
- /**
- * Get the current value of the FS bit (if FS is 0 then an exception occurs with
-@@ -155,28 +156,253 @@
- *
- * @return The current state of the FS bit (0 or 1)
- */
--uint32_t pspfpu_get_fs(void);
-+uint32_t pspFpuGetFS(void);
-
- /**
- * Set the FS bit
- *
- * @param fs - 0 or 1 to unset or set fs
- */
--void pspfpu_set_fs(uint32_t fs);
-+void pspFpuSetFS(uint32_t fs);
-
- /**
- * Get the condition flags (8 bits)
- *
- * @return The current condition flags
- */
--uint32_t pspfpu_get_condbits(void);
-+uint32_t pspFpuGetCondbits(void);
-
- /**
- * Clear the condition bits
- *
- * @param clear - Bitmask of the bits to clear
- */
--void pspfpu_clear_condbits(uint32_t clear);
-+void pspFpuClearCondbits(uint32_t clear);
-+
-+/**
-+ * returns absolute value
-+ */
-+float pspFpuAbs(float f);
-+
-+/**
-+ * Round up
-+ */
-+int pspFpuCeil(float f);
-+
-+/**
-+ * Truncate
-+ */
-+int pspFpuFloor(float f);
-+
-+/**
-+ * select maximum value
-+ */
-+float pspFpuMax(float f1, float f2);
-+
-+/**
-+ * select minimum value
-+ */
-+float pspFpuMin(float f1, float f2);
-+
-+/**
-+ * Sign reversal
-+ */
-+float pspFpuNeg(float f);
-+
-+/**
-+ * Round to nearest
-+ */
-+int pspFpuRound(float f);
-+
-+/*
-+ * Reciprocal of square root
-+ */
-+float pspFpuRsqrt(float f);
-+
-+/**
-+ * Square root
-+ */
-+float pspFpuSqrt(float f);
-+
-+/**
-+ * Round towards zero
-+ */
-+int pspFpuTrunc(float f);
-+
-+/**
-+ *
-+ */
-+float pspFpuFmod(float fs, float fd);
-+
-+/**
-+ *
-+ */
-+float pspFpuFrac(float f);
-+
-+/**
-+ *
-+ */
-+float pspFpuReinterpretFloat(uint32_t ui);
-+
-+/**
-+ *
-+ */
-+uint32_t pspFpuReinterpretUint(float f);
-+
-+/**
-+ *
-+ */
-+int pspFpuIsEqual(float f1, float f2);
-+
-+/**
-+ *
-+ */
-+float pspFpuSignFloat(float f);
-+
-+/**
-+ *
-+ */
-+int pspFpuSignInt(float f);
-+
-+/**
-+ * Positive zero
-+ */
-+float pspFpuPositiveZero(void);
-+
-+/**
-+ * Negative zero
-+ */
-+float pspFpuNegativeZero(void);
-+
-+/**
-+ * Test for zero value
-+ */
-+int pspFpuIsZero(float f);
-+
-+/**
-+ * Test for positive zero
-+ */
-+int pspFpuIsPositiveZero(float f);
-+
-+/**
-+ * Test for negative zero
-+ */
-+int pspFpuIsNegativeZero(float f);
-+
-+/**
-+ * Test for denormalized number
-+ */
-+int pspFpuIsDenormal(float f);
-+
-+/**
-+ * Test for zero or denormalized number
-+ */
-+int pspFpuIsZeroOrDenormal(float f);
-+
-+/**
-+ * Positive infinity
-+ */
-+float pspFpuPositiveInf(void);
-+
-+/**
-+ * Negative infinity
-+ */
-+float pspFpuNegativeInf(void);
-+
-+/**
-+ * Test for infinity
-+ */
-+int pspFpuIsInf(float f);
-+
-+/**
-+ * NaN (positive SNaN)
-+ */
-+float pspFpuPositiveNaN(void);
-+
-+/**
-+ * NaN (negative SNaN)
-+ */
-+float pspFpuNegativeNaN(void);
-+
-+/**
-+ * Quiet NaN (positive QNaN)
-+ */
-+float pspFpuPositiveQNaN(void);
-+
-+/**
-+ * Quiet NaN (positive QNaN)
-+ */
-+float pspFpuNegativeQNaN(void);
-+
-+/**
-+ * Signaling NaN (positive SNaN)
-+ */
-+float pspFpuPositiveSNaN(unsigned int uiSignal);
-+
-+/**
-+ * Signaling NaN (negative SNaN)
-+ */
-+float pspFpuNegativeSNaN(unsigned int uiSignal);
-+
-+/**
-+ * Test for NaN
-+ */
-+int pspFpuIsNaN(float f);
-+
-+/**
-+ * Test for infinity or NaN
-+ */
-+int pspFpuIsInfOrNaN(float f);
-+
-+/**
-+ *
-+ */
-+float pspFpuNormalizePhase(float f);
-+
-+/**
-+ * Sine
-+ */
-+float pspFpuSin(float x);
-+
-+/**
-+ * Cosine
-+ */
-+float pspFpuCos(float x);
-+
-+/**
-+ * Arc tangent
-+ */
-+float pspFpuAtan(float x);
-+
-+/**
-+ * Natural Logarithm
-+ */
-+float pspFpuLog(float x);
-+
-+/**
-+ * Exponential
-+ */
-+float pspFpuExp(float x);
-+
-+/**
-+ * ArcSin
-+ */
-+float pspFpuAsin(float x);
-+
-+/**
-+ * ArcCos
-+ */
-+float pspFpuAcos(float x);
-+
-+/**
-+ * convert float to double
-+ */
-+double pspFpuFloatToDouble(float a);
-+
-+/**
-+ * convert double to float
-+ */
-+float pspFpuDoubleToFloat(double a);
-
- #ifdef __cplusplus
- }
-diff -Nbaur pspsdk/src/ge/pspge.h pspsdk.new/src/ge/pspge.h
---- pspsdk/src/ge/pspge.h 2011-07-29 15:56:26.000000000 +0100
-+++ pspsdk.new/src/ge/pspge.h 2011-07-29 14:56:08.000000000 +0100
-@@ -46,6 +46,13 @@
- } PspGeListArgs;
-
- /**
-+ * Drawing queue interruption parameter
-+ */
-+typedef struct PspGeBreakParam {
-+ unsigned int buf[4];
-+} PspGeBreakParam;
-+
-+/**
- * Get the size of VRAM.
- *
- * @return The size of VRAM (in bytes).
-@@ -206,6 +213,22 @@
- */
- int sceGeUnsetCallback(int cbid);
-
-+/**
-+ * Interrupt drawing queue
-+ */
-+int sceGeBreak(int mode, PspGeBreakParam *pParam);
-+
-+/**
-+ * Restart drawing queue
-+ */
-+int sceGeContinue(void);
-+
-+/**
-+ * Set Graphics Engine eDRAM address translation mode
-+ */
-+int sceGeEdramSetAddrTranslation(int width);
-+
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Nbaur pspsdk/src/kernel/Makefile.am pspsdk.new/src/kernel/Makefile.am
---- pspsdk/src/kernel/Makefile.am 2011-07-29 15:56:22.000000000 +0100
-+++ pspsdk.new/src/kernel/Makefile.am 2011-07-29 14:56:08.000000000 +0100
-@@ -34,7 +34,7 @@
-
- LOADEXEC_OBJS = LoadExecForKernel_0000.o LoadExecForKernel_0001.o LoadExecForKernel_0002.o LoadExecForKernel_0003.o LoadExecForKernel_0004.o LoadExecForKernel_0005.o LoadExecForKernel_0006.o LoadExecForKernel_0007.o LoadExecForKernel_0008.o LoadExecForKernel_0009.o LoadExecForKernel_0010.o LoadExecForKernel_0011.o LoadExecForKernel_0012.o LoadExecForKernel_0013.o LoadExecForKernel_0014.o LoadExecForKernel_0015.o LoadExecForKernel_0016.o LoadExecForKernel_0017.o LoadExecForKernel_0018.o LoadExecForKernel_0019.o LoadExecForKernel_0020.o LoadExecForKernel_0021.o LoadExecForKernel_0022.o LoadExecForKernel_0023.o LoadExecForKernel_0024.o LoadExecForKernel_0025.o LoadExecForKernel_0026.o
-
--SYSMEM_OBJS = SysMemForKernel_0000.o SysMemForKernel_0001.o SysMemForKernel_0002.o SysMemForKernel_0003.o SysMemForKernel_0004.o SysMemForKernel_0005.o SysMemForKernel_0006.o SysMemForKernel_0007.o SysMemForKernel_0008.o SysMemForKernel_0009.o SysMemForKernel_0010.o SysMemForKernel_0011.o SysMemForKernel_0012.o SysMemForKernel_0013.o SysMemForKernel_0014.o SysMemForKernel_0015.o SysMemForKernel_0016.o SysMemForKernel_0017.o SysMemForKernel_0018.o SysMemForKernel_0019.o SysMemForKernel_0020.o SysMemForKernel_0021.o SysMemForKernel_0022.o SysMemForKernel_0023.o SysMemForKernel_0024.o SysMemForKernel_0025.o SysMemForKernel_0026.o SysMemForKernel_0027.o SysMemForKernel_0028.o SysMemForKernel_0029.o SysMemForKernel_0030.o SysMemForKernel_0031.o SysMemForKernel_0032.o SysMemForKernel_0033.o SysMemForKernel_0034.o SysMemForKernel_0035.o SysMemForKernel_0036.o SysMemForKernel_0037.o SysMemForKernel_0038.o SysMemForKernel_0039.o SysMemForKernel_0040.o SysMemForKernel_0041.o SysMemForKernel_0042.o SysMemForKernel_0043.o SysMemForKernel_0044.o SysMemForKernel_0045.o SysMemForKernel_0046.o SysMemForKernel_0047.o SysMemForKernel_0048.o SysMemForKernel_0049.o SysMemForKernel_0050.o SysMemForKernel_0051.o SysMemForKernel_0052.o SysMemForKernel_0053.o SysMemForKernel_0054.o SysMemForKernel_0055.o SysMemForKernel_0056.o SysMemForKernel_0057.o SysMemForKernel_0058.o SysMemForKernel_0059.o SysMemForKernel_0060.o SysMemForKernel_0061.o SysMemForKernel_0062.o SysMemForKernel_0063.o SysMemForKernel_0064.o SysMemForKernel_0065.o SysMemForKernel_0066.o SysMemForKernel_0067.o SysMemForKernel_0068.o
-+SYSMEM_OBJS = SysMemForKernel_0000.o SysMemForKernel_0001.o SysMemForKernel_0002.o SysMemForKernel_0003.o SysMemForKernel_0004.o SysMemForKernel_0005.o SysMemForKernel_0006.o SysMemForKernel_0007.o SysMemForKernel_0008.o SysMemForKernel_0009.o SysMemForKernel_0010.o SysMemForKernel_0011.o SysMemForKernel_0012.o SysMemForKernel_0013.o SysMemForKernel_0014.o SysMemForKernel_0015.o SysMemForKernel_0016.o SysMemForKernel_0017.o SysMemForKernel_0018.o SysMemForKernel_0019.o SysMemForKernel_0020.o SysMemForKernel_0021.o SysMemForKernel_0022.o SysMemForKernel_0023.o SysMemForKernel_0024.o SysMemForKernel_0025.o SysMemForKernel_0026.o SysMemForKernel_0027.o SysMemForKernel_0028.o SysMemForKernel_0029.o SysMemForKernel_0030.o SysMemForKernel_0031.o SysMemForKernel_0032.o SysMemForKernel_0033.o SysMemForKernel_0034.o SysMemForKernel_0035.o SysMemForKernel_0036.o SysMemForKernel_0037.o SysMemForKernel_0038.o SysMemForKernel_0039.o SysMemForKernel_0040.o SysMemForKernel_0041.o SysMemForKernel_0042.o SysMemForKernel_0043.o SysMemForKernel_0044.o SysMemForKernel_0045.o SysMemForKernel_0046.o SysMemForKernel_0047.o SysMemForKernel_0048.o SysMemForKernel_0049.o SysMemForKernel_0050.o SysMemForKernel_0051.o SysMemForKernel_0052.o SysMemForKernel_0053.o SysMemForKernel_0054.o SysMemForKernel_0055.o SysMemForKernel_0056.o SysMemForKernel_0057.o SysMemForKernel_0058.o SysMemForKernel_0059.o SysMemForKernel_0060.o SysMemForKernel_0061.o SysMemForKernel_0062.o SysMemForKernel_0063.o SysMemForKernel_0064.o SysMemForKernel_0065.o SysMemForKernel_0066.o SysMemForKernel_0067.o SysMemForKernel_0068.o SysMemForKernel_0069.o SysMemForKernel_0070.o
-
- MODULE_OBJS = ModuleMgrForKernel_0000.o ModuleMgrForKernel_0001.o ModuleMgrForKernel_0002.o ModuleMgrForKernel_0003.o ModuleMgrForKernel_0004.o ModuleMgrForKernel_0005.o ModuleMgrForKernel_0006.o ModuleMgrForKernel_0007.o ModuleMgrForKernel_0008.o ModuleMgrForKernel_0009.o ModuleMgrForKernel_0010.o ModuleMgrForKernel_0011.o ModuleMgrForKernel_0012.o ModuleMgrForKernel_0013.o ModuleMgrForKernel_0014.o ModuleMgrForKernel_0015.o ModuleMgrForKernel_0016.o ModuleMgrForKernel_0017.o ModuleMgrForKernel_0018.o ModuleMgrForKernel_0019.o ModuleMgrForKernel_0020.o ModuleMgrForKernel_0021.o ModuleMgrForKernel_0022.o
-
-diff -Nbaur pspsdk/src/kernel/SysMemForKernel.S pspsdk.new/src/kernel/SysMemForKernel.S
---- pspsdk/src/kernel/SysMemForKernel.S 2011-07-29 15:56:22.000000000 +0100
-+++ pspsdk.new/src/kernel/SysMemForKernel.S 2011-07-29 14:56:08.000000000 +0100
-@@ -211,3 +211,9 @@
- #ifdef F_SysMemForKernel_0068
- IMPORT_FUNC "SysMemForKernel",0x6373995D,sceKernelGetModel
- #endif
-+#ifdef F_SysMemForKernel_0069
-+ IMPORT_FUNC "SysMemForKernel",0x7591C7DB,sceKernelSetCompiledSdkVersion
-+#endif
-+#ifdef F_SysMemForKernel_0070
-+ IMPORT_FUNC "SysMemForKernel",0xFC114573,sceKernelGetCompiledSdkVersion
-+#endif
-diff -Nbaur pspsdk/src/kernel/psploadcore.h pspsdk.new/src/kernel/psploadcore.h
---- pspsdk/src/kernel/psploadcore.h 2011-07-29 15:56:22.000000000 +0100
-+++ pspsdk.new/src/kernel/psploadcore.h 2011-07-29 14:56:08.000000000 +0100
-@@ -52,7 +52,7 @@
- unsigned int nsegment;
- unsigned int segmentaddr[4];
- unsigned int segmentsize[4];
--} SceModule;
-+} __attribute__((packed)) SceModule;
-
- /** Defines a library and its exported functions and variables. Use the len
- member to determine the real size of the table (size = len * 4). */
-diff -Nbaur pspsdk/src/kernel/pspsysmem_kernel.h pspsdk.new/src/kernel/pspsysmem_kernel.h
---- pspsdk/src/kernel/pspsysmem_kernel.h 2011-07-29 15:56:22.000000000 +0100
-+++ pspsdk.new/src/kernel/pspsysmem_kernel.h 2011-07-29 14:56:08.000000000 +0100
-@@ -201,6 +201,21 @@
- */
- int sceKernelGetModel(void);
-
-+/**
-+ * Set the version of the SDK with which the caller was compiled.
-+ * Version numbers are as for sceKernelDevkitVersion().
-+ *
-+ * @return 0 on success, < 0 on error.
-+ */
-+int sceKernelSetCompiledSdkVersion(int version);
-+
-+/**
-+ * Get the SDK version set with sceKernelSetCompiledSdkVersion().
-+ *
-+ * @return Version number, or 0 if unset.
-+ */
-+int sceKernelGetCompiledSdkVersion(void);
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Nbaur pspsdk/src/libc/stdio.h pspsdk.new/src/libc/stdio.h
---- pspsdk/src/libc/stdio.h 2011-07-29 15:56:25.000000000 +0100
-+++ pspsdk.new/src/libc/stdio.h 2011-07-29 14:56:08.000000000 +0100
-@@ -18,6 +18,10 @@
-
- #include
- #include
-+#include
-+#define STDIN_FILENO 0
-+#define STDOUT_FILENO 1
-+#define STDERR_FILENO 2
-
- #ifdef __cplusplus
- extern "C" {
-diff -Nbaur pspsdk/src/libc/terminate.c pspsdk.new/src/libc/terminate.c
---- pspsdk/src/libc/terminate.c 2011-07-29 15:56:25.000000000 +0100
-+++ pspsdk.new/src/libc/terminate.c 2011-07-29 14:56:08.000000000 +0100
-@@ -20,8 +20,6 @@
- __attribute__((weak))
- void abort()
- {
-- printf("Program aborted.\n");
--
- while (1)
- _exit(1);
- }
-diff -Nbaur pspsdk/src/net/psphttp.h pspsdk.new/src/net/psphttp.h
---- pspsdk/src/net/psphttp.h 2011-07-29 15:56:25.000000000 +0100
-+++ pspsdk.new/src/net/psphttp.h 2011-07-29 14:56:08.000000000 +0100
-@@ -19,12 +19,53 @@
-
- typedef enum
- {
-+ PSP_HTTP_VERSION_1_0,
-+ PSP_HTTP_VERSION_1_1
-+} PspHttpHttpVersion;
-+
-+typedef enum
-+{
- PSP_HTTP_METHOD_GET,
- PSP_HTTP_METHOD_POST,
- PSP_HTTP_METHOD_HEAD
-
- } PspHttpMethod;
-
-+typedef enum
-+{
-+ PSP_HTTP_AUTH_BASIC,
-+ PSP_HTTP_AUTH_DIGEST
-+} PspHttpAuthType;
-+
-+
-+typedef enum
-+{
-+ PSP_HTTP_PROXY_AUTO,
-+ PSP_HTTP_PROXY_MANUAL
-+} PspHttpProxyMode;
-+
-+typedef enum
-+{
-+ PSP_HTTP_HEADER_OVERWRITE,
-+ PSP_HTTP_HEADER_ADD
-+} PspHttpAddHeaderMode;
-+
-+/* Memory function types */
-+typedef void *(*PspHttpMallocFunction)(SceSize size);
-+typedef void *(*PspHttpReallocFunction)(void *p, SceSize size);
-+typedef void (*PspHttpFreeFunction)(void *p);
-+
-+typedef int (*PspHttpPasswordCB)(
-+ int request,
-+ PspHttpAuthType auth_type,
-+ const unsigned char *realm,
-+ unsigned char *username,
-+ unsigned char *password,
-+ SceBool need_entity,
-+ unsigned char **entity_body,
-+ SceSize *entity_size,
-+ SceBool *save);
-+
- /**
- * Init the http library.
- *
-@@ -319,6 +360,32 @@
- */
- int sceHttpsLoadDefaultCert(int unknown1, int unknown2);
-
-+int sceHttpDisableAuth(int id);
-+
-+int sceHttpDisableCache(int id);
-+
-+int sceHttpEnableAuth(int id);
-+
-+int sceHttpEnableCache(int id);
-+
-+int sceHttpEndCache(void);
-+
-+int sceHttpGetAllHeader(int request, unsigned char **header, unsigned int *header_size);
-+
-+int sceHttpGetNetworkErrno(int request, int *err_num);
-+
-+int sceHttpGetProxy(int id, int *activate_flag, int *mode, unsigned char *proxy_host, SceSize len, unsigned short *proxy_port);
-+
-+int sceHttpInitCache(SceSize max_size);
-+
-+int sceHttpSetAuthInfoCB(int id, PspHttpPasswordCB cbfunc);
-+
-+int sceHttpSetProxy(int id, int activate_flag, int mode, const unsigned char *new_proxy_host, unsigned short new_proxy_port);
-+
-+int sceHttpSetResHeaderMaxSize(int id, unsigned int header_size);
-+
-+int sceHttpSetMallocFunction(PspHttpMallocFunction malloc_func, PspHttpFreeFunction free_func, PspHttpReallocFunction realloc_func);
-+
- #if defined(__cplusplus)
- };
- #endif
-diff -Nbaur pspsdk/src/rtc/psprtc.h pspsdk.new/src/rtc/psprtc.h
---- pspsdk/src/rtc/psprtc.h 2011-07-29 15:56:23.000000000 +0100
-+++ pspsdk.new/src/rtc/psprtc.h 2011-07-29 14:56:08.000000000 +0100
-@@ -249,14 +249,31 @@
- int sceRtcGetWin32FileTime(pspTime* date, u64* win32Time);
-
- int sceRtcParseDateTime(u64 *destTick, const char *dateString);
--/*
--sceRtcFormatRFC2822
--sceRtcFormatRFC2822LocalTime
--sceRtcFormatRFC3339
--sceRtcFormatRFC3339LocalTime
-
--sceRtcParseRFC3339
--*/
-+/**
-+ * Format Tick-representation UTC time in RFC2822 format
-+ */
-+int sceRtcFormatRFC2822(char *pszDateTime, const u64 *pUtc, int iTimeZoneMinutes);
-+
-+/**
-+ * Format Tick-representation UTC time in RFC2822 format
-+ */
-+int sceRtcFormatRFC2822LocalTime(char *pszDateTime, const u64 *pUtc);
-+
-+/**
-+ * Format Tick-representation UTC time in RFC3339(ISO8601) format
-+ */
-+int sceRtcFormatRFC3339(char *pszDateTime, const u64 *pUtc, int iTimeZoneMinutes);
-+
-+/**
-+ * Format Tick-representation UTC time in RFC3339(ISO8601) format
-+ */
-+int sceRtcFormatRFC3339LocalTime(char *pszDateTime, const u64 *pUtc);
-+
-+/**
-+ * Parse time information represented in RFC3339 format
-+ */
-+int sceRtcParseRFC3339(u64 *pUtc, const char *pszDateTime);
-
- #ifdef __cplusplus
- }
-diff -Nbaur pspsdk/src/samples/Makefile.am pspsdk.new/src/samples/Makefile.am
---- pspsdk/src/samples/Makefile.am 2011-07-29 15:56:33.000000000 +0100
-+++ pspsdk.new/src/samples/Makefile.am 2011-07-29 14:57:09.000000000 +0100
-@@ -81,7 +81,9 @@
- utility/systemparam \
- utility/osk \
- me/basic \
-- wlan
-+ wlan \
-+ obj-c \
-+ exceptions
-
- all:
-
-diff -Nbaur pspsdk/src/samples/Makefile.am.rej pspsdk.new/src/samples/Makefile.am.rej
---- pspsdk/src/samples/Makefile.am.rej 1970-01-01 01:00:00.000000000 +0100
-+++ pspsdk.new/src/samples/Makefile.am.rej 2011-07-29 14:56:08.000000000 +0100
-@@ -0,0 +1,20 @@
-+***************
-+*** 81,87 ****
-+ utility/systemparam \
-+ utility/osk \
-+ me/basic \
-+- wlan
-+
-+ all:
-+
-+--- 81,90 ----
-+ utility/systemparam \
-+ utility/osk \
-+ me/basic \
-++ wlan \
-++ obj-c \
-++ exceptions \
-++ d
-+
-+ all:
-+
-diff -Nbaur pspsdk/src/samples/exceptions/Makefile.sample pspsdk.new/src/samples/exceptions/Makefile.sample
---- pspsdk/src/samples/exceptions/Makefile.sample 1970-01-01 01:00:00.000000000 +0100
-+++ pspsdk.new/src/samples/exceptions/Makefile.sample 2011-07-29 14:56:08.000000000 +0100
-@@ -0,0 +1,18 @@
-+TARGET = CppException
-+OBJS = main.o
-+LIBS = -lstdc++
-+
-+INCDIR =
-+CFLAGS = -G0 -Wall -O2
-+CXXFLAGS = $(CFLAGS) -fno-rtti -fexceptions
-+ASFLAGS = $(CFLAGS)
-+
-+LIBDIR =
-+LDFLAGS =
-+
-+EXTRA_TARGETS = EBOOT.PBP
-+PSP_EBOOT_TITLE = C++ Exception Sample
-+
-+PSPSDK=$(shell psp-config --pspsdk-path)
-+include $(PSPSDK)/lib/build.mak
-+
-diff -Nbaur pspsdk/src/samples/exceptions/main.cpp pspsdk.new/src/samples/exceptions/main.cpp
---- pspsdk/src/samples/exceptions/main.cpp 1970-01-01 01:00:00.000000000 +0100
-+++ pspsdk.new/src/samples/exceptions/main.cpp 2011-07-29 14:56:08.000000000 +0100
-@@ -0,0 +1,51 @@
-+#include
-+#include
-+#include
-+
-+/* Define printf, just to make typing easier */
-+#define printf pspDebugScreenPrintf
-+
-+/* Define the module info section */
-+PSP_MODULE_INFO("cppException", 0, 1, 1);
-+
-+/* Define the main thread's attribute value (optional) */
-+PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
-+
-+#include
-+using namespace std;
-+
-+class myexception: public exception
-+{
-+ virtual const char* what() const throw()
-+ {
-+ return "My exception happened";
-+ }
-+} myex;
-+
-+int main (void)
-+{
-+ pspDebugScreenInit();
-+ SceCtrlData pad;
-+
-+ try
-+ {
-+ throw myex;
-+ }
-+ catch (exception& e)
-+ {
-+ printf("%s\n", e.what());
-+ }
-+
-+ printf("\nPress X to quit.\n");
-+
-+ for (;;)
-+ {
-+ sceCtrlReadBufferPositive(&pad, 1);
-+ if (pad.Buttons & PSP_CTRL_CROSS)
-+ break;
-+ }
-+ sceKernelExitGame();
-+
-+ return 0;
-+}
-+
-diff -Nbaur pspsdk/src/samples/obj-c/Makefile.sample pspsdk.new/src/samples/obj-c/Makefile.sample
---- pspsdk/src/samples/obj-c/Makefile.sample 1970-01-01 01:00:00.000000000 +0100
-+++ pspsdk.new/src/samples/obj-c/Makefile.sample 2011-07-29 14:56:08.000000000 +0100
-@@ -0,0 +1,19 @@
-+TARGET = ObjC
-+OBJS = main.o
-+
-+USE_OBJC=1
-+
-+INCDIR =
-+CFLAGS = -G0 -Wall -O2
-+CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
-+ASFLAGS = $(CFLAGS)
-+
-+LIBDIR =
-+LDFLAGS =
-+
-+EXTRA_TARGETS = EBOOT.PBP
-+PSP_EBOOT_TITLE = ObjC Sample
-+
-+PSPSDK=$(shell psp-config --pspsdk-path)
-+include $(PSPSDK)/lib/build.mak
-+
-diff -Nbaur pspsdk/src/samples/obj-c/main.m pspsdk.new/src/samples/obj-c/main.m
---- pspsdk/src/samples/obj-c/main.m 1970-01-01 01:00:00.000000000 +0100
-+++ pspsdk.new/src/samples/obj-c/main.m 2011-07-29 14:56:08.000000000 +0100
-@@ -0,0 +1,62 @@
-+#include
-+
-+@interface Greeter:Object
-+{
-+ /* This is left empty on purpose:
-+ ** Normally instance variables would be declared here,
-+ ** but these are not used in our example.
-+ */
-+}
-+
-+- (void)greet;
-+
-+@end
-+
-+
-+#include
-+#include
-+#include
-+
-+/* Define printf, just to make typing easier */
-+#define printf pspDebugScreenPrintf
-+
-+@implementation Greeter
-+
-+- (void)greet
-+{
-+ printf("Hello, World from Obj-C!\n");
-+}
-+
-+@end
-+
-+/* Define the module info section */
-+PSP_MODULE_INFO("template", 0, 1, 1);
-+
-+/* Define the main thread's attribute value (optional) */
-+PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
-+
-+int main(void)
-+{
-+ /* Non Objective-C code to allow the app to end */
-+ pspDebugScreenInit();
-+ SceCtrlData pad;
-+
-+ /* Objective-C code */
-+ id myGreeter;
-+ myGreeter=[Greeter new];
-+
-+ [myGreeter greet];
-+ [myGreeter free];
-+
-+ printf("\nPress X to quit.\n");
-+ for (;;)
-+ {
-+ sceCtrlReadBufferPositive(&pad, 1);
-+ if (pad.Buttons & PSP_CTRL_CROSS)
-+ break;
-+ }
-+ sceKernelExitGame();
-+
-+ return 0;
-+}
-+
-diff -Nbaur pspsdk/src/user/Makefile.am pspsdk.new/src/user/Makefile.am
---- pspsdk/src/user/Makefile.am 2011-07-29 15:56:36.000000000 +0100
-+++ pspsdk.new/src/user/Makefile.am 2011-07-29 14:56:08.000000000 +0100
-@@ -20,11 +20,11 @@
-
- SUSPEND_OBJS = sceSuspendForUser_0000.o sceSuspendForUser_0001.o sceSuspendForUser_0002.o sceSuspendForUser_0003.o sceSuspendForUser_0004.o sceSuspendForUser_005.o sceSuspendForUser_0006.o
-
--SYSMEM_OBJS = SysMemUserForUser_0000.o SysMemUserForUser_0001.o SysMemUserForUser_0002.o SysMemUserForUser_0003.o SysMemUserForUser_0004.o SysMemUserForUser_0005.o SysMemUserForUser_0006.o SysMemUserForUser_0007.o
-+SYSMEM_OBJS = SysMemUserForUser_0000.o SysMemUserForUser_0001.o SysMemUserForUser_0002.o SysMemUserForUser_0003.o SysMemUserForUser_0004.o SysMemUserForUser_0005.o SysMemUserForUser_0006.o SysMemUserForUser_0007.o SysMemUserForUser_0008.o SysMemUserForUser_0009.o
-
- THREADMAN_OBJS = ThreadManForUser_0000.o ThreadManForUser_0001.o ThreadManForUser_0002.o ThreadManForUser_0003.o ThreadManForUser_0004.o ThreadManForUser_0005.o ThreadManForUser_0006.o ThreadManForUser_0007.o ThreadManForUser_0008.o ThreadManForUser_0009.o ThreadManForUser_0010.o ThreadManForUser_0011.o ThreadManForUser_0012.o ThreadManForUser_0013.o ThreadManForUser_0014.o ThreadManForUser_0015.o ThreadManForUser_0016.o ThreadManForUser_0017.o ThreadManForUser_0018.o ThreadManForUser_0019.o ThreadManForUser_0020.o ThreadManForUser_0021.o ThreadManForUser_0022.o ThreadManForUser_0023.o ThreadManForUser_0024.o ThreadManForUser_0025.o ThreadManForUser_0026.o ThreadManForUser_0027.o ThreadManForUser_0028.o ThreadManForUser_0029.o ThreadManForUser_0030.o ThreadManForUser_0031.o ThreadManForUser_0032.o ThreadManForUser_0033.o ThreadManForUser_0034.o ThreadManForUser_0035.o ThreadManForUser_0036.o ThreadManForUser_0037.o ThreadManForUser_0038.o ThreadManForUser_0039.o ThreadManForUser_0040.o ThreadManForUser_0041.o ThreadManForUser_0042.o ThreadManForUser_0043.o ThreadManForUser_0044.o ThreadManForUser_0045.o ThreadManForUser_0046.o ThreadManForUser_0047.o ThreadManForUser_0048.o ThreadManForUser_0049.o ThreadManForUser_0050.o ThreadManForUser_0051.o ThreadManForUser_0052.o ThreadManForUser_0053.o ThreadManForUser_0054.o ThreadManForUser_0055.o ThreadManForUser_0056.o ThreadManForUser_0057.o ThreadManForUser_0058.o ThreadManForUser_0059.o ThreadManForUser_0060.o ThreadManForUser_0061.o ThreadManForUser_0062.o ThreadManForUser_0063.o ThreadManForUser_0064.o ThreadManForUser_0065.o ThreadManForUser_0066.o ThreadManForUser_0067.o ThreadManForUser_0068.o ThreadManForUser_0069.o ThreadManForUser_0070.o ThreadManForUser_0071.o ThreadManForUser_0072.o ThreadManForUser_0073.o ThreadManForUser_0074.o ThreadManForUser_0075.o ThreadManForUser_0076.o ThreadManForUser_0077.o ThreadManForUser_0078.o ThreadManForUser_0079.o ThreadManForUser_0080.o ThreadManForUser_0081.o ThreadManForUser_0082.o ThreadManForUser_0083.o ThreadManForUser_0084.o ThreadManForUser_0085.o ThreadManForUser_0086.o ThreadManForUser_0087.o ThreadManForUser_0088.o ThreadManForUser_0089.o ThreadManForUser_0090.o ThreadManForUser_0091.o ThreadManForUser_0092.o ThreadManForUser_0093.o ThreadManForUser_0094.o ThreadManForUser_0095.o ThreadManForUser_0096.o ThreadManForUser_0097.o ThreadManForUser_0098.o ThreadManForUser_0099.o ThreadManForUser_0100.o ThreadManForUser_0101.o ThreadManForUser_0102.o ThreadManForUser_0103.o ThreadManForUser_0104.o ThreadManForUser_0105.o ThreadManForUser_0106.o ThreadManForUser_0107.o ThreadManForUser_0108.o ThreadManForUser_0109.o ThreadManForUser_0110.o ThreadManForUser_0111.o ThreadManForUser_0112.o ThreadManForUser_0113.o ThreadManForUser_0114.o ThreadManForUser_0115.o ThreadManForUser_0116.o ThreadManForUser_0117.o ThreadManForUser_0118.o ThreadManForUser_0119.o ThreadManForUser_0120.o ThreadManForUser_0121.o ThreadManForUser_0122.o ThreadManForUser_0123.o ThreadManForUser_0124.o ThreadManForUser_0125.o ThreadManForUser_0126.o
-
--UTILS_OBJS = UtilsForUser_0000.o UtilsForUser_0001.o UtilsForUser_0002.o UtilsForUser_0003.o UtilsForUser_0004.o UtilsForUser_0005.o UtilsForUser_0006.o UtilsForUser_0007.o UtilsForUser_0008.o UtilsForUser_0009.o UtilsForUser_0010.o UtilsForUser_0011.o UtilsForUser_0012.o UtilsForUser_0013.o UtilsForUser_0014.o UtilsForUser_0015.o UtilsForUser_0016.o UtilsForUser_0017.o UtilsForUser_0018.o UtilsForUser_0019.o UtilsForUser_0020.o UtilsForUser_0021.o UtilsForUser_0022.o UtilsForUser_0023.o UtilsForUser_0024.o
-+UTILS_OBJS = UtilsForUser_0000.o UtilsForUser_0001.o UtilsForUser_0002.o UtilsForUser_0003.o UtilsForUser_0004.o UtilsForUser_0005.o UtilsForUser_0006.o UtilsForUser_0007.o UtilsForUser_0008.o UtilsForUser_0009.o UtilsForUser_0010.o UtilsForUser_0011.o UtilsForUser_0012.o UtilsForUser_0013.o UtilsForUser_0014.o UtilsForUser_0015.o UtilsForUser_0016.o UtilsForUser_0017.o UtilsForUser_0018.o UtilsForUser_0019.o UtilsForUser_0020.o UtilsForUser_0021.o UtilsForUser_0022.o UtilsForUser_0023.o UtilsForUser_0024.o UtilsForUser_0025.o UtilsForUser_0026.o
-
- INTERRUPT_OBJS = InterruptManager_0000.o InterruptManager_0001.o InterruptManager_0002.o InterruptManager_0003.o InterruptManager_0004.o InterruptManager_0005.o InterruptManager_0006.o InterruptManager_0007.o InterruptManager_0008.o InterruptManager_0009.o
-
-diff -Nbaur pspsdk/src/user/SysMemUserForUser.S pspsdk.new/src/user/SysMemUserForUser.S
---- pspsdk/src/user/SysMemUserForUser.S 2011-07-29 15:56:36.000000000 +0100
-+++ pspsdk.new/src/user/SysMemUserForUser.S 2011-07-29 14:56:08.000000000 +0100
-@@ -26,3 +26,9 @@
- #ifdef F_SysMemUserForUser_0007
- IMPORT_FUNC "SysMemUserForUser",0x13A5ABEF,sceKernelPrintf
- #endif
-+#ifdef F_SysMemUserForUser_0008
-+ IMPORT_FUNC "SysMemUserForUser",0x7591C7DB,sceKernelSetCompiledSdkVersion
-+#endif
-+#ifdef F_SysMemUserForUser_0009
-+ IMPORT_FUNC "SysMemUserForUser",0xFC114573,sceKernelGetCompiledSdkVersion
-+#endif
-diff -Nbaur pspsdk/src/user/UtilsForUser.S pspsdk.new/src/user/UtilsForUser.S
---- pspsdk/src/user/UtilsForUser.S 2011-07-29 15:56:36.000000000 +0100
-+++ pspsdk.new/src/user/UtilsForUser.S 2011-07-29 14:56:08.000000000 +0100
-@@ -77,3 +77,9 @@
- #ifdef F_UtilsForUser_0024
- IMPORT_FUNC "UtilsForUser",0xFB05FAD0,sceKernelIcacheReadTag
- #endif
-+#ifdef F_UtilsForUser_0025
-+ IMPORT_FUNC "UtilsForUser",0x920F104A,sceKernelIcacheInvalidateAll
-+#endif
-+#ifdef F_UtilsForUser_0026
-+ IMPORT_FUNC "UtilsForUser",0xC2DF770E,sceKernelIcacheInvalidateRange
-+#endif
-diff -Nbaur pspsdk/src/user/pspsysmem.h pspsdk.new/src/user/pspsysmem.h
---- pspsdk/src/user/pspsysmem.h 2011-07-29 15:56:36.000000000 +0100
-+++ pspsdk.new/src/user/pspsysmem.h 2011-07-29 14:56:08.000000000 +0100
-@@ -115,6 +115,21 @@
-
- #endif
-
-+/**
-+ * Set the version of the SDK with which the caller was compiled.
-+ * Version numbers are as for sceKernelDevkitVersion().
-+ *
-+ * @return 0 on success, < 0 on error.
-+ */
-+int sceKernelSetCompiledSdkVersion(int version);
-+
-+/**
-+ * Get the SDK version set with sceKernelSetCompiledSdkVersion().
-+ *
-+ * @return Version number, or 0 if unset.
-+ */
-+int sceKernelGetCompiledSdkVersion(void);
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Nbaur pspsdk/src/user/psputils.h pspsdk.new/src/user/psputils.h
---- pspsdk/src/user/psputils.h 2011-07-29 15:56:36.000000000 +0100
-+++ pspsdk.new/src/user/psputils.h 2011-07-29 14:56:08.000000000 +0100
-@@ -58,12 +58,12 @@
- void sceKernelDcacheWritebackInvalidateAll(void);
-
- /**
-- * Write back a range of addresses from data cache to memory
-+ * Write back a range of addresses from the data cache to memory
- */
- void sceKernelDcacheWritebackRange(const void *p, unsigned int size);
-
- /**
-- * Write back and invalidate a range of addresses in data cache
-+ * Write back and invalidate a range of addresses in the data cache
- */
- void sceKernelDcacheWritebackInvalidateRange(const void *p, unsigned int size);
-
-@@ -72,6 +72,16 @@
- */
- void sceKernelDcacheInvalidateRange(const void *p, unsigned int size);
-
-+/**
-+ * Invalidate the instruction cache
-+ */
-+void sceKernelIcacheInvalidateAll(void);
-+
-+/**
-+ * Invalidate a range of addresses in the instruction cache
-+ */
-+void sceKernelIcacheInvalidateRange(const void *p, unsigned int size);
-+
- /** Structure for holding a mersenne twister context */
- typedef struct _SceKernelUtilsMt19937Context {
- unsigned int count;
diff --git a/dkpsp/scripts/build-gcc.sh b/dkpsp/scripts/build-gcc.sh
index ee8f667..c302d29 100644
--- a/dkpsp/scripts/build-gcc.sh
+++ b/dkpsp/scripts/build-gcc.sh
@@ -26,6 +26,7 @@ then
CFLAGS=$cflags LDFLAGS=$ldflags ../../$BINUTILS_SRCDIR/configure \
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
--disable-threads --with-gcc --with-gnu-as --with-gnu-ld --with-stabs \
+ --disable-dependency-tracking --disable-werror \
|| { echo "Error configuring binutils"; exit 1; }
touch configured-binutils
fi
@@ -63,7 +64,8 @@ then
--target=$target \
--with-newlib \
--prefix=$prefix \
- --with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPSP release 15" \
+ --disable-dependency-tracking \
+ --with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPSP release 16" \
|| { echo "Error configuring gcc"; exit 1; }
touch configured-gcc
fi
@@ -84,22 +86,7 @@ fi
unset CFLAGS
cd $BUILDSCRIPTDIR
-if [ ! -f checkout-psp-sdk ]
-then
- svn checkout http://psp.jim.sh/svn/psp/trunk/pspsdk || { echo "ERROR GETTING PSPSDK"; exit 1; }
- touch checkout-psp-sdk
-fi
-
-cd pspsdk
-if [ ! -f patch-psp-sdk ]
-then
- if [ -f $patchdir/pspsdk.patch ]
- then
- patch -p1 -i $patchdir/pspsdk.patch || { echo "ERROR PATCHING PSPSDK"; exit 1; }
- fi
- touch patch-psp-sdk
-fi
-
+cd $PSPSDK_SRCDIR
if [ ! -f bootstrap-sdk ]
then
./bootstrap || { echo "ERROR RUNNING PSPSDK BOOTSTRAP"; exit 1; }
@@ -131,6 +118,7 @@ then
$BUILDSCRIPTDIR/$NEWLIB_SRCDIR/configure \
--target=$target \
--prefix=$prefix \
+ --disable-dependency-tracking \
|| { echo "Error configuring newlib"; exit 1; }
touch configured-newlib
fi
@@ -174,7 +162,7 @@ cd $BUILDSCRIPTDIR
# build and install the psp sdk
#---------------------------------------------------------------------------------
echo "building pspsdk ..."
-cd pspsdk
+cd $PSPSDK_SRCDIR
if [ ! -f built-sdk ]
then
@@ -202,6 +190,7 @@ if [ ! -f configured-gdb ]
then
CFLAGS=$cflags LDFLAGS=$ldflags ../../$GDB_SRCDIR/configure \
--disable-nls --prefix=$prefix --target=$target --disable-werror \
+ --disable-dependency-tracking \
|| { echo "Error configuring gdb"; exit 1; }
touch configured-gdb
fi