summaryrefslogtreecommitdiff
path: root/misc/buildroot
diff options
context:
space:
mode:
Diffstat (limited to 'misc/buildroot')
-rw-r--r--misc/buildroot/.defconfig64
-rw-r--r--misc/buildroot/Config.in362
-rw-r--r--misc/buildroot/Makefile223
-rw-r--r--misc/buildroot/configs/arm-defconfig130
-rw-r--r--misc/buildroot/configs/m68k-defconfig111
-rw-r--r--misc/buildroot/package/Makefile.in112
-rw-r--r--misc/buildroot/package/config/Kconfig-language.txt282
-rw-r--r--misc/buildroot/package/config/Makefile134
-rw-r--r--misc/buildroot/package/config/conf.c583
-rw-r--r--misc/buildroot/package/config/confdata.c397
-rw-r--r--misc/buildroot/package/config/expr.c1099
-rw-r--r--misc/buildroot/package/config/expr.h195
-rw-r--r--misc/buildroot/package/config/lex.zconf.c_shipped3688
-rw-r--r--misc/buildroot/package/config/lkc.h123
-rw-r--r--misc/buildroot/package/config/lkc_proto.h40
-rw-r--r--misc/buildroot/package/config/lxdialog/BIG.FAT.WARNING4
-rw-r--r--misc/buildroot/package/config/lxdialog/checklist.c372
-rw-r--r--misc/buildroot/package/config/lxdialog/colors.h161
-rw-r--r--misc/buildroot/package/config/lxdialog/dialog.h199
-rw-r--r--misc/buildroot/package/config/lxdialog/inputbox.c240
-rw-r--r--misc/buildroot/package/config/lxdialog/menubox.c438
-rw-r--r--misc/buildroot/package/config/lxdialog/msgbox.c85
-rw-r--r--misc/buildroot/package/config/lxdialog/textbox.c556
-rw-r--r--misc/buildroot/package/config/lxdialog/util.c375
-rw-r--r--misc/buildroot/package/config/lxdialog/yesno.c118
-rw-r--r--misc/buildroot/package/config/mconf.c973
-rw-r--r--misc/buildroot/package/config/menu.c390
-rw-r--r--misc/buildroot/package/config/symbol.c809
-rw-r--r--misc/buildroot/package/config/util.c108
-rw-r--r--misc/buildroot/package/config/zconf.l366
-rw-r--r--misc/buildroot/package/config/zconf.tab.c_shipped2130
-rw-r--r--misc/buildroot/package/config/zconf.tab.h_shipped125
-rw-r--r--misc/buildroot/package/config/zconf.y690
-rw-r--r--misc/buildroot/package/gnuconfig/ChangeLog1813
-rw-r--r--misc/buildroot/package/gnuconfig/Makefile15
-rw-r--r--misc/buildroot/package/gnuconfig/README.buildroot16
-rwxr-xr-xmisc/buildroot/package/gnuconfig/config.guess1517
-rwxr-xr-xmisc/buildroot/package/gnuconfig/config.sub1627
-rw-r--r--misc/buildroot/package/gnuconfig/gnuconfig.mk3
-rw-r--r--misc/buildroot/package/gnuconfig/patches/config.sub.ps2.patch50
-rw-r--r--misc/buildroot/package/gnuconfig/patches/config.sub.sh.patch39
-rw-r--r--misc/buildroot/package/gnuconfig/testsuite/config-guess.data23
-rw-r--r--misc/buildroot/package/gnuconfig/testsuite/config-guess.sh47
-rw-r--r--misc/buildroot/package/gnuconfig/testsuite/config-sub.data92
-rw-r--r--misc/buildroot/package/gnuconfig/testsuite/config-sub.sh35
-rwxr-xr-xmisc/buildroot/package/gnuconfig/testsuite/uname.in9
-rwxr-xr-xmisc/buildroot/package/gnuconfig/uname9
-rw-r--r--misc/buildroot/toolchain/Config.in44
-rw-r--r--misc/buildroot/toolchain/Makefile.in21
-rw-r--r--misc/buildroot/toolchain/binutils/2.14.90.0.8/001-debian.patch142
-rw-r--r--misc/buildroot/toolchain/binutils/2.14.90.0.8/210-cflags.patch32
-rw-r--r--misc/buildroot/toolchain/binutils/2.14.90.0.8/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch63
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/210-cflags.patch32
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-001_ld_makefile_patch.patch52
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-120_mips_xgot_multigot_workaround.patch39
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.15.94.0.2.2/sh-flags-off-by-one.patch21
-rw-r--r--misc/buildroot/toolchain/binutils/2.15/210-cflags.patch32
-rw-r--r--misc/buildroot/toolchain/binutils/2.15/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.15/600-arm-textrel.patch63
-rw-r--r--misc/buildroot/toolchain/binutils/2.15/700-nios2-2.15.patch38356
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.1/300-001_ld_makefile_patch.patch52
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.1/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.1/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.1/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.1/sh-flags-off-by-one.patch21
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.90.0.3/300-001_ld_makefile_patch.patch52
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.90.0.3/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.90.0.3/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.90.0.3/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.90.0.3/sh-flags-off-by-one.patch21
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.5/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.5/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.5/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.5/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.6/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.6/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.6/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.6/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.7/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.7/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.7/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.16.91.0.7/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.10/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.2/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.2/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.2/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.2/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.2/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.3/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.3/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.3/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.3/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.4/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.4/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.4/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.4/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.5/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.5/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.5/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.5/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.6/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.6/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.6/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.6/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.7/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.7/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.7/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.8/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.8/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.8/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.9/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.9/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17.50.0.9/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17/110-arm-eabi-conf.patch24
-rw-r--r--misc/buildroot/toolchain/binutils/2.17/300-001_ld_makefile_patch.patch50
-rw-r--r--misc/buildroot/toolchain/binutils/2.17/300-006_better_file_error.patch43
-rw-r--r--misc/buildroot/toolchain/binutils/2.17/300-012_check_ldrunpath_length.patch47
-rw-r--r--misc/buildroot/toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--misc/buildroot/toolchain/binutils/Config.in110
-rw-r--r--misc/buildroot/toolchain/binutils/binutils.mk175
-rw-r--r--misc/buildroot/toolchain/dependencies/dependencies.mk25
-rwxr-xr-xmisc/buildroot/toolchain/dependencies/dependencies.sh267
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/120-softfloat.patch14
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/500-loop.patch10
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/820-no-mips-empic-relocs.patch59
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/999-cvs-updates.patch4522
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/specs-arm-soft-float124
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/specs-mips-soft-float145
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/specs-mipsel-soft-float145
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.5/specs-powerpc-soft-float352
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.6/120-softfloat.patch14
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.6/500-loop.patch10
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.6/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.6/810-mips-xgot.patch6
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.6/820-no-mips-empic-relocs.patch59
-rw-r--r--misc/buildroot/toolchain/gcc/3.3.6/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/300-libstdc++-pic.patch47
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/300-pr15526.patch53
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/300-pr17541.patch234
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/300-pr17976.patch106
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/400-mips-pr17565.patch102
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/401-ppc-eabi-typo.patch20
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/402-mips-pr17770.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/600-gcc34-arm-ldm-peephole.patch79
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/601-gcc34-arm-ldm.patch119
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/700-pr15068-fix.patch44
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/900-nios2.patch10211
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.2/arm-softfloat.patch.conditional270
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/300-libstdc++-pic.patch47
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/600-gcc34-arm-ldm-peephole.patch79
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/601-gcc34-arm-ldm.patch119
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/700-pr15068-fix.patch44
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/900-nios2.patch10211
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.3/arm-softfloat.patch.conditional270
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/300-libstdc++-pic.patch47
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/600-gcc34-arm-ldm-peephole.patch65
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm-peephole2.patch42
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm.patch119
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/700-pr15068-fix.patch44
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/71_all_sh-pr16665-fix.patch43
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/72_all_sh-no-reorder-blocks.patch13
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/73_all_sh-pr20617.patch28
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/900-nios2.patch10211
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.4/arm-softfloat.patch.conditional270
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/300-libstdc++-pic.patch47
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch65
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch42
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm.patch119
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/700-pr15068-fix.patch44
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/71_all_sh-pr16665-fix.patch43
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/72_all_sh-no-reorder-blocks.patch13
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/73_all_sh-pr20617.patch28
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/900-nios2.patch10211
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.5/arm-softfloat.patch.conditional270
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/300-libstdc++-pic.patch47
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/600-gcc34-arm-ldm-peephole.patch65
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm-peephole2.patch42
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm.patch119
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/700-pr15068-fix.patch44
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/71_all_sh-pr16665-fix.patch43
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/72_all_sh-no-reorder-blocks.patch13
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/73_all_sh-pr20617.patch28
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/800-arm-bigendian.patch68
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/810-mips-xgot.patch6
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/900-nios2.patch10211
-rw-r--r--misc/buildroot/toolchain/gcc/3.4.6/arm-softfloat.patch.conditional270
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/300-libstdc++-pic.patch45
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.0/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/300-libstdc++-pic.patch45
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.1/830-gcc-bug-num-22167.patch16
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.2/300-libstdc++-pic.patch45
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.2/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.2/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.2/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.2/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.2/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/300-libstdc++-pic.patch45
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.3/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/300-libstdc++-pic.patch45
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/305-libmudflap-susv3-legacy.patch49
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/402-libbackend_dep_gcov-iov.h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/602-sdk-libstdc++-includes.patch22
-rw-r--r--misc/buildroot/toolchain/gcc/4.0.4/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/110-arm-eabi.patch27
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/300-libstdc++-pic.patch46
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/740-sh-pr24836.patch25
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.0/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/110-arm-eabi.patch27
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/300-libstdc++-pic.patch50
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/740-sh-pr24836.patch25
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.1/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/110-arm-eabi.patch27
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/300-libstdc++-pic.patch50
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/402-libbackend_dep_gcov-iov.h.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/740-sh-pr24836.patch25
-rw-r--r--misc/buildroot/toolchain/gcc/4.1.2/800-arm-bigendian.patch127
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/300-libstdc++-pic.patch50
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/301-missing-execinfo_h.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/302-c99-snprintf.patch11
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/303-c99-complex-ugly-hack.patch12
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/304-index_macro.patch24
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/305-libmudflap-susv3-legacy.patch49
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/306-libstdc++-namespace.patch36
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/402-libbackend_dep_gcov-iov.h.patch13
-rw-r--r--misc/buildroot/toolchain/gcc/4.2/800-arm-bigendian.patch67
-rw-r--r--misc/buildroot/toolchain/gcc/Config.in153
-rw-r--r--misc/buildroot/toolchain/gcc/Config.in.214
-rw-r--r--misc/buildroot/toolchain/gcc/Makefile.in66
-rw-r--r--misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk435
-rw-r--r--misc/buildroot/toolchain/gcc/i386-gcc-soft-float.patch61
-rw-r--r--misc/buildroot/toolchain/gdb/6.2.1/400-mips-coredump.patch-2.4.23-2928
-rw-r--r--misc/buildroot/toolchain/gdb/6.2.1/500-thread-timeout.patch34
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/400-mips-coredump.patch-2.4.23-2928
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/500-thread-timeout.patch34
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/600-debian_10.selected-frame.patch552
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/620-debian_static-thread-db.patch156
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/630-debian_24.tracepoint-segv.patch15
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/640-debian_dwarf2-frame-signal-unwinder.patch120
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/650-debian_vsyscall-gdb-support.patch245
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/660-debian_dwarf-cfa-restore.patch23
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/680-debian_sim-destdir.patch53
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/690-debian_member-field-symtab.patch35
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/700-debian_cp-pass-by-reference.patch464
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/710-debian_thread-db-multiple-libraries.patch593
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/720-debian_static-threads-test.patch36
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/730-debian_gdb-fix-tracefork-check.patch225
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/740-debian_make-cv-type-crash.patch132
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/750-debian_sparc-singlestep.patch37
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/760-debian_vsyscall-bfd-close-result.patch20
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/770-debian_vfork-done-spelling.patch31
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/780-debian_gdbserver-rdynamic.patch675
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/790-debian_dwarf2-cfi-warning.patch39
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/800-debian_linux-use-underscore-exit.patch22
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/810-debian_bfd-no-kylix-crash.patch47
-rw-r--r--misc/buildroot/toolchain/gdb/6.3/820-debian_disable-linux-fork-messages.patch46
-rw-r--r--misc/buildroot/toolchain/gdb/6.4/400-mips-coredump.patch-2.4.23-2928
-rw-r--r--misc/buildroot/toolchain/gdb/6.4/500-thread-timeout.patch34
-rw-r--r--misc/buildroot/toolchain/gdb/6.4/600-fix-compile-flag-mismatch.patch87
-rw-r--r--misc/buildroot/toolchain/gdb/6.5/400-mips-coredump.patch-2.4.23-2928
-rw-r--r--misc/buildroot/toolchain/gdb/6.5/500-thread-timeout.patch34
-rw-r--r--misc/buildroot/toolchain/gdb/6.5/600-fix-compile-flag-mismatch.patch69
-rw-r--r--misc/buildroot/toolchain/gdb/Config.in53
-rw-r--r--misc/buildroot/toolchain/gdb/Config.in.255
-rw-r--r--misc/buildroot/toolchain/gdb/gdb.mk226
-rw-r--r--misc/buildroot/toolchain/gdb/snapshot/400-mips-coredump.patch-2.4.23-2930
-rw-r--r--misc/buildroot/toolchain/gdb/snapshot/400-mips-nptl-support.patch143
-rw-r--r--misc/buildroot/toolchain/gdb/snapshot/500-thread-timeout.patch34
-rw-r--r--misc/buildroot/toolchain/gdb/snapshot/680-debian_sim-destdir.patch14
-rw-r--r--misc/buildroot/toolchain/gdb/snapshot/690-debian_member-field-symtab.patch20
-rwxr-xr-xmisc/buildroot/toolchain/patch-kernel.sh54
-rw-r--r--misc/buildroot/toolchain/sstrip/Config.in11
-rw-r--r--misc/buildroot/toolchain/sstrip/sstrip.c468
-rw-r--r--misc/buildroot/toolchain/sstrip/sstrip.mk69
326 files changed, 131786 insertions, 0 deletions
diff --git a/misc/buildroot/.defconfig b/misc/buildroot/.defconfig
new file mode 100644
index 000000000..12bce6183
--- /dev/null
+++ b/misc/buildroot/.defconfig
@@ -0,0 +1,64 @@
+#
+# Automatically generated make config: don't edit
+#
+BR2_HAVE_DOT_CONFIG=y
+# BR2_arm is not set
+# BR2_armeb is not set
+# BR2_cris is not set
+BR2_i386=y
+# BR2_m68k is not set
+# BR2_mips is not set
+# BR2_mipsel is not set
+# BR2_powerpc is not set
+# BR2_sh is not set
+# BR2_sparc is not set
+BR2_ARCH="i386"
+BR2_WGET="wget --passive-ftp"
+
+#
+# Toolchain Options
+#
+BR2_KERNEL_HEADERS_2_6_19_2=y
+BR2_DEFAULT_KERNEL_HEADERS="2.6.19.2"
+# BR2_UCLIBC_VERSION_SNAPSHOT is not set
+BR2_UCLIBC_VERSION_0_9_28_1=y
+# BR2_ENABLE_LOCALE is not set
+# BR2_BINUTILS_VERSION_2_14_90_0_8 is not set
+# BR2_BINUTILS_VERSION_2_15 is not set
+# BR2_BINUTILS_VERSION_2_15_94_0_2_2 is not set
+# BR2_BINUTILS_VERSION_2_16_1 is not set
+# BR2_BINUTILS_VERSION_2_16_90_0_3 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_5 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_6 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_7 is not set
+BR2_BINUTILS_VERSION_2_17=y
+# BR2_BINUTILS_VERSION_2_17_50_0_2 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_3 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_4 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_5 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_6 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_7 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_8 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_9 is not set
+# BR2_BINUTILS_VERSION is not set
+# BR2_GCC_VERSION_3_3_5 is not set
+# BR2_GCC_VERSION_3_3_6 is not set
+# BR2_GCC_VERSION_3_4_2 is not set
+# BR2_GCC_VERSION_3_4_3 is not set
+# BR2_GCC_VERSION_3_4_4 is not set
+# BR2_GCC_VERSION_3_4_5 is not set
+# BR2_GCC_VERSION_3_4_6 is not set
+# BR2_GCC_VERSION_4_0_0 is not set
+# BR2_GCC_VERSION_4_0_1 is not set
+# BR2_GCC_VERSION_4_0_2 is not set
+# BR2_GCC_VERSION_4_0_3 is not set
+# BR2_GCC_VERSION_4_1_0 is not set
+BR2_GCC_VERSION_4_1_1=y
+BR2_GCC_USE_SJLJ_EXCEPTIONS="--enable-sjlj-exceptions"
+BR2_EXTRA_GCC_CONFIG_OPTIONS=""
+# BR2_INSTALL_LIBSTDCPP is not set
+# BR2_PACKAGE_GDB is not set
+# BR2_PACKAGE_GDB_SERVER is not set
+# BR2_ENABLE_MULTILIB is not set
+BR2_LARGEFILE=y
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
diff --git a/misc/buildroot/Config.in b/misc/buildroot/Config.in
new file mode 100644
index 000000000..d50020085
--- /dev/null
+++ b/misc/buildroot/Config.in
@@ -0,0 +1,362 @@
+#
+
+mainmenu "Buildroot2 Configuration"
+
+config BR2_HAVE_DOT_CONFIG
+ bool
+ default y
+
+choice
+ prompt "Target Architecture"
+ default BR2_i386
+ help
+ Select the target architecture family to build for.
+
+config BR2_alpha
+ bool "alpha"
+config BR2_arm
+ bool "arm"
+config BR2_armeb
+ bool "armeb"
+config BR2_avr32
+ bool "avr32"
+config BR2_cris
+ bool "cris"
+config BR2_i386
+ bool "i386"
+config BR2_m68k
+ bool "m68k"
+config BR2_mips
+ bool "mips"
+config BR2_mipsel
+ bool "mipsel"
+config BR2_nios2
+ bool "nios2"
+config BR2_powerpc
+ bool "powerpc"
+config BR2_sh
+ bool "superh"
+config BR2_sh64
+ bool "superh64"
+config BR2_sparc
+ bool "sparc"
+config BR2_x86_64
+ bool "x86_64"
+endchoice
+
+#
+# Keep the variants separate, there's no need to clutter everything else.
+# sh is fairly "special" in this regard, as virtually everyone else has
+# things kept down to a _sensible_ number of target variants. No such
+# luck for sh..
+#
+choice
+ prompt "Target Architecture Variant"
+ depends BR2_arm || BR2_armeb
+ default BR2_generic_arm
+ help
+ Specific CPU variant to use
+
+config BR2_generic_arm
+ bool "generic_arm"
+config BR2_arm610
+ bool "arm610"
+config BR2_arm710
+ bool "arm710"
+config BR2_arm720t
+ bool "arm720t"
+config BR2_arm920t
+ bool "arm920t"
+config BR2_arm922t
+ bool "arm922t"
+config BR2_arm926t
+ bool "arm926t"
+config BR2_arm1136jf_s
+ bool "arm1136jf_s"
+config BR2_sa110
+ bool "sa110"
+config BR2_sa1100
+ bool "sa1100"
+config BR2_xscale
+ bool "xscale"
+config BR2_iwmmxt
+ bool "iwmmxt"
+endchoice
+
+config BR2_ARM_TYPE
+ string
+ default ARM610 if BR2_arm610
+ default ARM710 if BR2_arm710
+ default ARM720T if BR2_arm720t
+ default ARM920T if BR2_arm920t
+ default ARM922T if BR2_arm922t
+ default ARM926T if BR2_arm926t
+ default ARM1136JF_S if BR2_arm1136jf_s
+ default ARM_SA110 if BR2_sa110
+ default ARM_SA1100 if BR2_sa1100
+ default ARM_XSCALE if BR2_xscale
+ default ARM_IWMMXT if BR2_iwmmxt
+ default GENERIC_ARM if BR2_generic_arm
+
+choice
+ prompt "Target ABI"
+ depends BR2_arm || BR2_armeb
+ default BR2_ARM_OABI
+ help
+ Application Binary Interface to use
+
+config BR2_ARM_OABI
+ bool "OABI"
+config BR2_ARM_EABI
+ bool "EABI"
+endchoice
+
+choice
+ prompt "Target Architecture Variant"
+ depends BR2_avr32
+config BR2_ap7000
+ bool "AP7000"
+config BR2_ap7010
+ bool "AP7010"
+config BR2_ap7020
+ bool "AP7020"
+endchoice
+
+
+choice
+ prompt "Target Architecture Variant"
+ depends BR2_sh
+ default BR2_sh4
+ help
+ Specific CPU variant to use
+
+config BR2_sh2a_nofpueb
+ bool "sh2a_nofpueb"
+config BR2_sh2eb
+ bool "sh2eb"
+config BR2_sh3
+ bool "sh3"
+config BR2_sh3eb
+ bool "sh3eb"
+config BR2_sh4
+ bool "sh4"
+config BR2_sh4eb
+ bool "sh4eb"
+endchoice
+
+#
+# gcc builds libstdc++ differently depending on the
+# host tuplet given to it, so let people choose
+#
+choice
+ prompt "Target Architecture Variant"
+ depends BR2_i386
+ default BR2_x86_i686
+ help
+ Specific CPU variant to use
+
+config BR2_x86_i386
+ bool "i386"
+config BR2_x86_i486
+ bool "i486"
+config BR2_x86_i586
+ bool "i586"
+config BR2_x86_i686
+ bool "i686"
+endchoice
+
+config BR2_ARCH
+ string
+ default "alpha" if BR2_alpha
+ default "arm" if BR2_arm
+ default "armeb" if BR2_armeb
+ default "avr32" if BR2_avr32
+ default "cris" if BR2_cris
+ default "i386" if BR2_x86_i386
+ default "i486" if BR2_x86_i486
+ default "i586" if BR2_x86_i586
+ default "i686" if BR2_x86_i686
+ default "m68k" if BR2_m68k
+ default "mips" if BR2_mips
+ default "mipsel" if BR2_mipsel
+ default "nios2" if BR2_nios2
+ default "powerpc" if BR2_powerpc
+ default "sh2a_nofpueb" if BR2_sh2a_nofpueb
+ default "sh2eb" if BR2_sh2eb
+ default "sh3" if BR2_sh3
+ default "sh3eb" if BR2_sh3eb
+ default "sh4" if BR2_sh4
+ default "sh4eb" if BR2_sh4eb
+ default "sh64" if BR2_sh64
+ default "sparc" if BR2_sparc
+ default "x86_64" if BR2_x86_64
+
+config BR2_ENDIAN
+ string
+ default "LITTLE" if BR2_arm || BR2_cris || BR2_i386 || BR2_mipsel || \
+ BR2_sh3 || BR2_sh4 || BR2_x86_64 || BR2_nios2 || \
+ BR2_sh64
+ default "BIG" if BR2_alpha || BR2_armeb || BR2_avr32 || BR2_m68k || BR2_mips || \
+ BR2_powerpc || BR2_sh2a_nofpueb || BR2_sh2eb || \
+ BR2_sh3eb || BR2_sh4eb || BR2_sparc
+
+menu "Build options"
+
+config BR2_WGET
+ string "Wget command"
+ default "wget --passive-ftp -nd"
+
+config BR2_SVN
+ string "Subversion (svn) checkout command"
+ default "svn co"
+
+config BR2_ZCAT
+ string "zcat command"
+ default "zcat"
+ help
+ Command to be used to extract a gzip'ed file to stdout.
+ zcat is identical to gunzip -c except that the former may
+ not be available on your system.
+ Default is "zcat"
+ Other possible values include "gunzip -c" or "gzip -d -c".
+
+config BR2_BZCAT
+ string "bzcat command"
+ default "bzcat"
+ help
+ Command to be used to extract a bzip2'ed file to stdout.
+ bzcat is identical to bunzip2 -c except that the former may
+ not be available on your system.
+ Default is "bzcat"
+ Other possible values include "bunzip2 -c" or "bzip2 -d -c".
+
+config BR2_TAR_OPTIONS
+ string "Tar options"
+ default ""
+ help
+ Options to pass to tar when extracting the sources.
+ E.g. " -v --exclude='*.svn*'" to exclude all .svn internal files
+ and to be verbose.
+
+config BR2_DL_DIR
+ string "Download dir"
+ default "$(BASE_DIR)/dl"
+ help
+ Directory to store all the source files that we need to fetch.
+
+config BR2_SOURCEFORGE_MIRROR
+ string "Sourceforge mirror site"
+ default "easynews"
+ help
+ Sourceforge has a system of mirror sites. Some sites may be closer
+ to your location, and sometimes mirror sites go down and are no longer
+ available. This option allows you to select your preferred Sourceforge
+ mirror site.
+
+ The list of mirrors is available here:
+ http://prdownloads.sourceforge.net/index-sf.html?download
+
+config BR2_ATMEL_MIRROR
+ depends BR2_avr32 || BR2_arm
+ string "Atmel AVR32/AT91 download site"
+ default "ftp://at91dist:distrib@81.80.104.162/AT91_Third_Party_Design_Flow/Linux_Host/"
+ help
+ Unofficial site for AVR32/AT91 Buildroot patches, or your local mirror.
+ Atmel does not currently support buildroot, but this site makes
+ available neccessary patches and prepatched packages useful
+ to extend a buildroot for AVR32 or AT91 ARM based boards.
+ Issues with contents of this server needs to be highlighted
+ on the buildroot mailing list and
+ should not be addressed directly to Atmel
+ Atmel provides support for their AVR32 chips on
+ http://avr32linux.org/ or http://www.avrfreaks.net/
+ Atmel provides support for AT91 chips on www.at91.com.
+ Commercial AT91 Linux support is through www.timesys.com
+ Community AT91 Linux support is through http://maxim.org.za/AT91_26.html
+
+config BR2_AT91_PATCH_MIRROR
+ depends BR2_arm
+ string "Atmel AT91 Linux Patch download site"
+ default "http://maxim.org.za/AT91RM9200/2.6/"
+ help
+ Patches for the AT91 generated by the Linux community
+ usually ends up here, courtesy of Andrew Victor
+
+config BR2_STAGING_DIR
+ string "Toolchain and header file location?"
+ default "$(BUILD_DIR)/staging_dir"
+ help
+ This is the location where the toolchain will be installed. The
+ toolchain will not work if it is moved from this location.
+ Therefore, if you wish to package up a uClibc toolchain, it is
+ important that is is set to the final location where the toolchain
+ will be used.
+
+ Most people will leave this set to the default value of
+ "$(BUILD_DIR)/staging_dir".
+
+config BR2_NUTTX_DIR
+ string "Path to the NuttX root directory"
+ default "$(TOPDIR)/nuttx"
+ help
+ This is the location where the NuttX source tree is located.
+
+config BR2_TOPDIR_PREFIX
+ string "Custom build dir prefix"
+ default ""
+ help
+ Add a custom string to the beginning of the build directories.
+
+ build_ARCH -> [PREFIX]_build_ARCH
+ toolchain_build_ARCH -> [PREFIX]_toolchain_build_ARCH
+
+config BR2_TOPDIR_SUFFIX
+ string "Custom build dir suffix"
+ default ""
+ help
+ Add a custom string to the end of the build directories.
+
+ build_ARCH -> build_ARCH_[SUFFIX]
+ toolchain_build_ARCH -> toolchain_build_ARCH_[SUFFIX]
+
+config BR2_GNU_BUILD_SUFFIX
+ string "GNU build hostname suffix"
+ default "pc-elf"
+ help
+ The string used to pass to configure scripts via the
+ --build= option. Just specify the suffix here, the leading
+ arch will be filled in automatically.
+
+config BR2_GNU_TARGET_SUFFIX
+ string "GNU target suffix"
+ default "elf"
+ help
+ The string used to pass to configure scripts via the
+ --target= option. Just specify the suffix here, the leading
+ arch will be filled in automatically.
+
+ Most users will want to stick with the default setting, though
+ other users (most notably ARM EABI) like to add on to this in
+ order to stay in line with gcc conventions.
+
+config BR2_PREFER_IMA
+ bool "prefer IMA compiles"
+ default n
+ help
+ Where possible, compile package with Inter Module Analysis.
+ This potentially uses alot of system resources on your compile
+ host with the benefit of creating smaller binaries for the target.
+
+ If unsure, say No.
+
+ WARNING: This is highly experimental at the moment.
+
+config BR2_DEPRECATED
+ bool "Show packages that are deprecated or obsolete"
+ default n
+ help
+ This option hides outdated/obsolete versions of packages.
+
+endmenu
+
+source "toolchain/Config.in"
diff --git a/misc/buildroot/Makefile b/misc/buildroot/Makefile
new file mode 100644
index 000000000..23709a165
--- /dev/null
+++ b/misc/buildroot/Makefile
@@ -0,0 +1,223 @@
+# Makefile for buildroot2
+#
+# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
+#
+# 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+#--------------------------------------------------------------
+# Just run 'make menuconfig', configure stuff, then run 'make'.
+# You shouldn't need to mess with anything beyond this point...
+#--------------------------------------------------------------
+TOPDIR=./
+CONFIG_CONFIG_IN = Config.in
+CONFIG_DEFCONFIG = .defconfig
+CONFIG = package/config
+
+noconfig_targets := menuconfig config oldconfig randconfig \
+ defconfig allyesconfig allnoconfig release tags \
+
+# $(shell find . -name *_defconfig |sed 's/.*\///')
+
+# Pull in the user's configuration file
+ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
+-include $(TOPDIR).config
+endif
+
+ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
+
+# cc-option
+# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
+# sets -march=winchip-c6 if supported else falls back to -march=i586
+# without checking the latter.
+cc-option = $(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+
+#############################################################
+#
+# The list of stuff to build for the target toolchain
+# along with the packages to build for the target.
+#
+##############################################################
+TARGETS:=uclibc-configured binutils gcc uclibc-target-utils
+include toolchain/Makefile.in
+include package/Makefile.in
+
+#############################################################
+#
+# You should probably leave this stuff alone unless you know
+# what you are doing.
+#
+#############################################################
+
+
+
+all: world
+
+# In this section, we need .config
+include .config.cmd
+include package/gnuconfig/gnuconfig.mk
+include toolchain/*/*.mk
+
+TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
+TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
+TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
+
+world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) nuttx_setup $(NUTTX_HDRS) $(TARGETS)
+dirs: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(NUTTX_DIR)
+
+.PHONY: all world dirs clean dirclean distclean source $(TARGETS) \
+ $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
+ $(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)
+
+#############################################################
+#
+# staging and target directories do NOT list these as
+# dependencies anywhere else
+#
+#############################################################
+$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR):
+ @mkdir -p $@
+
+$(STAGING_DIR):
+ @mkdir -p $(STAGING_DIR)/lib
+ @mkdir -p $(STAGING_DIR)/include
+ @mkdir -p $(STAGING_DIR)/usr
+ @mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
+ @ln -snf ../lib $(STAGING_DIR)/usr/lib
+ @ln -snf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+
+$(TARGET_DIR):
+ mkdir -p $(TARGET_DIR)
+ if [ -d "$(TARGET_SKELETON)" ] ; then \
+ cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \
+ fi;
+ touch $(STAGING_DIR)/.fakeroot.00000
+ -find $(TARGET_DIR) -type d -name CVS | xargs rm -rf
+ -find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
+
+$(NUTTX_DIR):
+ @if [ ! -d $(NUTTX_DIR) ]; then \
+ echo "NuttX directory $(NUTTX_DIR) does not exist" ; \
+ exit 1 ; \
+ fi
+ @if [ ! -e $(NUTTX_DIR)/.config ]; then \
+ echo "NuttX directory $(NUTTX_DIR) has not been configured" ; \
+ exit 1 ; \
+ fi
+
+$(NUTTX_DIR)/include/arch: $(NUTTX_DIR)
+ $(MAKE) -C $(NUTTX_DIR) include/arch
+
+$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include : $(STAGING_DIR) $(NUTTX_DIR)/include/arch
+ @mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include || \
+ { echo "Failed to create $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include" ; exit 1 ; }
+ @cp -a $(NUTTX_DIR)/include/* $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/. || \
+ { echo "Failed to copy Nuttx header files" ; exit 1 ; }
+
+nuttx_setup: $(TOOL_BUILD_DIR)/nuttx_dev/usr/include
+
+source: $(TARGETS_SOURCE)
+
+#############################################################
+#
+# Cleanup and misc junk
+#
+#############################################################
+clean: $(TARGETS_CLEAN)
+ rm -rf $(STAGING_DIR) $(TARGET_DIR)
+
+dirclean: $(TARGETS_DIRCLEAN)
+ rm -rf $(STAGING_DIR) $(TARGET_DIR)
+
+distclean:
+ifeq ($(DL_DIR),$(BASE_DIR)/dl)
+ rm -rf $(DL_DIR)
+endif
+ rm -rf $(BUILD_DIR)
+ $(MAKE) -C $(CONFIG) clean
+
+sourceball:
+ rm -rf $(BUILD_DIR)
+ set -e; \
+ cd ..; \
+ rm -f buildroot.tar.bz2; \
+ tar -cvf buildroot.tar buildroot; \
+ bzip2 -9 buildroot.tar; \
+
+
+else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
+
+all: menuconfig
+
+# configuration
+# ---------------------------------------------------------------------------
+
+$(CONFIG)/conf:
+ $(MAKE) -C $(CONFIG) conf
+ -@if [ ! -f .config ] ; then \
+ cp $(CONFIG_DEFCONFIG) .config; \
+ fi
+$(CONFIG)/mconf:
+ $(MAKE) -C $(CONFIG) ncurses conf mconf
+ -@if [ ! -f .config ] ; then \
+ cp $(CONFIG_DEFCONFIG) .config; \
+ fi
+
+menuconfig: $(CONFIG)/mconf
+ @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
+
+config: $(CONFIG)/conf
+ @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
+
+oldconfig: $(CONFIG)/conf
+ @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
+
+randconfig: $(CONFIG)/conf
+ @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
+
+allyesconfig: $(CONFIG)/conf
+ #@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
+ #sed -i -e "s/^CONFIG_DEBUG.*/# CONFIG_DEBUG is not set/" .config
+ @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
+
+allnoconfig: $(CONFIG)/conf
+ @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
+
+defconfig: $(CONFIG)/conf
+ @$(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
+
+%_defconfig: $(CONFIG)/conf
+ cp $(shell find . -name $@) .config
+ @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
+
+#############################################################
+#
+# Cleanup and misc junk
+#
+#############################################################
+clean:
+ rm -f .config .config.old .config.cmd .tmpconfig.h
+ - $(MAKE) -C $(CONFIG) clean
+
+distclean: clean
+ rm -rf sources/*
+
+endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
+
+.PHONY: dummy subdirs release distclean clean config oldconfig \
+ menuconfig tags check test depend defconfig
+
+
diff --git a/misc/buildroot/configs/arm-defconfig b/misc/buildroot/configs/arm-defconfig
new file mode 100644
index 000000000..2cab27fca
--- /dev/null
+++ b/misc/buildroot/configs/arm-defconfig
@@ -0,0 +1,130 @@
+#
+# Automatically generated make config: don't edit
+#
+BR2_HAVE_DOT_CONFIG=y
+# BR2_alpha is not set
+BR2_arm=y
+# BR2_armeb is not set
+# BR2_avr32 is not set
+# BR2_cris is not set
+# BR2_i386 is not set
+# BR2_m68k is not set
+# BR2_mips is not set
+# BR2_mipsel is not set
+# BR2_nios2 is not set
+# BR2_powerpc is not set
+# BR2_sh is not set
+# BR2_sh64 is not set
+# BR2_sparc is not set
+# BR2_x86_64 is not set
+BR2_generic_arm=y
+# BR2_arm610 is not set
+# BR2_arm710 is not set
+# BR2_arm720t is not set
+# BR2_arm920t is not set
+# BR2_arm922t is not set
+# BR2_arm926t is not set
+# BR2_arm1136jf_s is not set
+# BR2_sa110 is not set
+# BR2_sa1100 is not set
+# BR2_xscale is not set
+# BR2_iwmmxt is not set
+BR2_ARM_TYPE="GENERIC_ARM"
+BR2_ARM_OABI=y
+# BR2_ARM_EABI is not set
+BR2_ARCH="arm"
+BR2_ENDIAN="LITTLE"
+
+#
+# Build options
+#
+BR2_WGET="wget --passive-ftp"
+BR2_SVN="svn co"
+BR2_ZCAT="zcat"
+BR2_BZCAT="bzcat"
+BR2_TAR_OPTIONS=""
+BR2_DL_DIR="$(BASE_DIR)/../archives"
+BR2_SOURCEFORGE_MIRROR="easynews"
+BR2_ATMEL_MIRROR="ftp://at91dist:distrib@81.80.104.162/AT91_Third_Party_Design_Flow/Linux_Host/"
+BR2_AT91_PATCH_MIRROR="http://maxim.org.za/AT91RM9200/2.6/"
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+BR2_NUTTX_DIR="$(TOPDIR)/../nuttx"
+BR2_TOPDIR_PREFIX=""
+BR2_TOPDIR_SUFFIX=""
+BR2_GNU_BUILD_SUFFIX="arm-elf"
+BR2_GNU_TARGET_SUFFIX="elf"
+# BR2_PREFER_IMA is not set
+# BR2_DEPRECATED is not set
+
+#
+# Toolchain Options
+#
+
+#
+# Binutils Options
+#
+# BR2_BINUTILS_VERSION_2_14_90_0_8 is not set
+# BR2_BINUTILS_VERSION_2_15 is not set
+# BR2_BINUTILS_VERSION_2_15_94_0_2_2 is not set
+# BR2_BINUTILS_VERSION_2_16_1 is not set
+# BR2_BINUTILS_VERSION_2_16_90_0_3 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_5 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_6 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_7 is not set
+BR2_BINUTILS_VERSION_2_17=y
+# BR2_BINUTILS_VERSION_2_17_50_0_2 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_3 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_4 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_5 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_6 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_7 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_8 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_9 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_10 is not set
+BR2_BINUTILS_VERSION="2.17"
+BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
+
+#
+# Gcc Options
+#
+# BR2_GCC_VERSION_3_3_5 is not set
+# BR2_GCC_VERSION_3_3_6 is not set
+# BR2_GCC_VERSION_3_4_2 is not set
+# BR2_GCC_VERSION_3_4_3 is not set
+# BR2_GCC_VERSION_3_4_4 is not set
+# BR2_GCC_VERSION_3_4_5 is not set
+BR2_GCC_VERSION_3_4_6=y
+# BR2_GCC_VERSION_4_0_0 is not set
+# BR2_GCC_VERSION_4_0_1 is not set
+# BR2_GCC_VERSION_4_0_2 is not set
+# BR2_GCC_VERSION_4_0_3 is not set
+# BR2_GCC_VERSION_4_0_4 is not set
+# BR2_GCC_VERSION_4_1_0 is not set
+# BR2_GCC_VERSION_4_1_1 is not set
+# BR2_GCC_VERSION_4_1_2 is not set
+# BR2_GCC_VERSION_4_2 is not set
+# BR2_GCC_IS_SNAP is not set
+BR2_GCC_VERSION="3.4.6"
+# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
+BR2_EXTRA_GCC_CONFIG_OPTIONS=""
+BR2_INSTALL_LIBSTDCPP=y
+BR2_INSTALL_LIBGCJ=y
+# BR2_INSTALL_OBJC is not set
+# BR2_INSTALL_FORTRAN is not set
+
+#
+# Gdb Options
+#
+# BR2_PACKAGE_GDB is not set
+# BR2_PACKAGE_GDB_SERVER is not set
+# BR2_PACKAGE_GDB_HOST is not set
+
+#
+# Common Toolchain Options
+#
+# BR2_PACKAGE_SSTRIP_TARGET is not set
+# BR2_PACKAGE_SSTRIP_HOST is not set
+# BR2_ENABLE_MULTILIB is not set
+BR2_LARGEFILE=y
+BR2_SOFT_FLOAT=y
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
diff --git a/misc/buildroot/configs/m68k-defconfig b/misc/buildroot/configs/m68k-defconfig
new file mode 100644
index 000000000..cbe3c11cd
--- /dev/null
+++ b/misc/buildroot/configs/m68k-defconfig
@@ -0,0 +1,111 @@
+#
+# Automatically generated make config: don't edit
+#
+BR2_HAVE_DOT_CONFIG=y
+# BR2_alpha is not set
+# BR2_arm is not set
+# BR2_armeb is not set
+# BR2_avr32 is not set
+# BR2_cris is not set
+# BR2_i386 is not set
+BR2_m68k=y
+# BR2_mips is not set
+# BR2_mipsel is not set
+# BR2_nios2 is not set
+# BR2_powerpc is not set
+# BR2_sh is not set
+# BR2_sh64 is not set
+# BR2_sparc is not set
+# BR2_x86_64 is not set
+BR2_ARCH="m68k"
+BR2_ENDIAN="BIG"
+
+#
+# Build options
+#
+BR2_WGET="wget --passive-ftp"
+BR2_SVN="svn co"
+BR2_ZCAT="zcat"
+BR2_BZCAT="bzcat"
+BR2_TAR_OPTIONS=""
+BR2_DL_DIR="$(BASE_DIR)/../archives"
+BR2_SOURCEFORGE_MIRROR="easynews"
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+BR2_NUTTX_DIR="$(TOPDIR)/../nuttx"
+BR2_TOPDIR_PREFIX=""
+BR2_TOPDIR_SUFFIX=""
+BR2_GNU_BUILD_SUFFIX="m68k-elf"
+BR2_GNU_TARGET_SUFFIX="elf"
+# BR2_PREFER_IMA is not set
+# BR2_DEPRECATED is not set
+
+#
+# Toolchain Options
+#
+
+#
+# Binutils Options
+#
+# BR2_BINUTILS_VERSION_2_14_90_0_8 is not set
+# BR2_BINUTILS_VERSION_2_15 is not set
+# BR2_BINUTILS_VERSION_2_15_94_0_2_2 is not set
+# BR2_BINUTILS_VERSION_2_16_1 is not set
+# BR2_BINUTILS_VERSION_2_16_90_0_3 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_5 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_6 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_7 is not set
+BR2_BINUTILS_VERSION_2_17=y
+# BR2_BINUTILS_VERSION_2_17_50_0_2 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_3 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_4 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_5 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_6 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_7 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_8 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_9 is not set
+# BR2_BINUTILS_VERSION_2_17_50_0_10 is not set
+BR2_BINUTILS_VERSION="2.17"
+BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
+
+#
+# Gcc Options
+#
+# BR2_GCC_VERSION_3_3_5 is not set
+# BR2_GCC_VERSION_3_3_6 is not set
+# BR2_GCC_VERSION_3_4_2 is not set
+# BR2_GCC_VERSION_3_4_3 is not set
+# BR2_GCC_VERSION_3_4_4 is not set
+# BR2_GCC_VERSION_3_4_5 is not set
+BR2_GCC_VERSION_3_4_6=y
+# BR2_GCC_VERSION_4_0_0 is not set
+# BR2_GCC_VERSION_4_0_1 is not set
+# BR2_GCC_VERSION_4_0_2 is not set
+# BR2_GCC_VERSION_4_0_3 is not set
+# BR2_GCC_VERSION_4_0_4 is not set
+# BR2_GCC_VERSION_4_1_0 is not set
+# BR2_GCC_VERSION_4_1_1 is not set
+# BR2_GCC_VERSION_4_1_2 is not set
+# BR2_GCC_VERSION_4_2 is not set
+# BR2_GCC_IS_SNAP is not set
+BR2_GCC_VERSION="3.4.6"
+# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
+BR2_EXTRA_GCC_CONFIG_OPTIONS=""
+# BR2_INSTALL_LIBSTDCPP is not set
+# BR2_INSTALL_OBJC is not set
+# BR2_INSTALL_FORTRAN is not set
+
+#
+# Gdb Options
+#
+# BR2_PACKAGE_GDB is not set
+# BR2_PACKAGE_GDB_SERVER is not set
+# BR2_PACKAGE_GDB_HOST is not set
+
+#
+# Common Toolchain Options
+#
+# BR2_PACKAGE_SSTRIP_TARGET is not set
+# BR2_PACKAGE_SSTRIP_HOST is not set
+# BR2_ENABLE_MULTILIB is not set
+BR2_LARGEFILE=y
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
diff --git a/misc/buildroot/package/Makefile.in b/misc/buildroot/package/Makefile.in
new file mode 100644
index 000000000..1338356d4
--- /dev/null
+++ b/misc/buildroot/package/Makefile.in
@@ -0,0 +1,112 @@
+ifndef MAKE
+MAKE=make
+endif
+MAKE1:=$(MAKE) MAKE="$(firstword $(MAKE)) -j1"
+
+# Strip off the annoying quoting
+ARCH:=$(strip $(subst ",, $(BR2_ARCH)))
+#"))
+WGET:=$(strip $(subst ",, $(BR2_WGET)))
+#"))
+SVN:=$(strip $(subst ",, $(BR2_SVN)))
+#"))
+ZCAT:=$(strip $(subst ",, $(BR2_ZCAT)))
+#"))
+BZCAT:=$(strip $(subst ",, $(BR2_BZCAT)))
+#"))
+TAR_OPTIONS=$(subst ",, $(BR2_TAR_OPTIONS)) -xf
+#")
+
+
+TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
+HOSTCC:=gcc
+HOSTCXX:=g++
+
+BASE_DIR:=${shell pwd}
+
+TOPDIR_PREFIX:=$(strip $(subst ",, $(BR2_TOPDIR_PREFIX)))_
+#"))
+TOPDIR_SUFFIX:=_$(strip $(subst ",, $(BR2_TOPDIR_SUFFIX)))
+#"))
+ifeq ($(TOPDIR_PREFIX),_)
+TOPDIR_PREFIX:=
+endif
+ifeq ($(TOPDIR_SUFFIX),_)
+TOPDIR_SUFFIX:=
+endif
+
+DL_DIR=$(strip $(subst ",, $(BR2_DL_DIR)))
+#"))
+ifeq ($(DL_DIR),)
+DL_DIR:=$(BASE_DIR)/dl
+endif
+#PATCH_DIR=$(BASE_DIR)/sources/patches
+BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
+TARGET_DIR:=$(BUILD_DIR)/root
+
+GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
+#"))
+
+STAGING_DIR:=$(strip $(subst ",, $(BR2_STAGING_DIR)))
+NUTTX_DIR:=$(strip $(subst ",, $(BR2_NUTTX_DIR)))
+#"))
+TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
+
+# Quotes are needed for spaces et al in path components.
+TARGET_PATH="$(STAGING_DIR)/bin:$(TOOL_BUILD_DIR)/bin:$(PATH)"
+REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)
+GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-elf
+KERNEL_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)-
+TARGET_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)$(GNU_TARGET_SUFFIX)-
+TARGET_CC=$(TARGET_CROSS)gcc
+TARGET_CXX=$(TARGET_CROSS)g++
+TARGET_RANLIB=$(TARGET_CROSS)ranlib
+STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
+INSTALL=/usr/bin/install
+
+
+HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
+ -e 's/sparc.*/sparc/' \
+ -e 's/arm.*/arm/g' \
+ -e 's/m68k.*/m68k/' \
+ -e 's/ppc/powerpc/g' \
+ -e 's/v850.*/v850/g' \
+ -e 's/sh[234]/sh/' \
+ -e 's/mips-.*/mips/' \
+ -e 's/mipsel-.*/mipsel/' \
+ -e 's/cris.*/cris/' \
+ -e 's/i[3-9]86/i386/' \
+ )
+GNU_HOST_NAME:=$(HOST_ARCH)-$(subst ",,$(BR2_GNU_BUILD_SUFFIX))
+#")
+TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
+ AR=$(TARGET_CROSS)ar \
+ AS=$(TARGET_CROSS)as \
+ LD=$(TARGET_CROSS)ld \
+ NM=$(TARGET_CROSS)nm \
+ CC=$(TARGET_CROSS)gcc \
+ GCC=$(TARGET_CROSS)gcc \
+ CXX=$(TARGET_CROSS)g++ \
+ CPP=$(TARGET_CROSS)cpp \
+ RANLIB=$(TARGET_CROSS)ranlib \
+ STRIP=$(TARGET_CROSS)strip \
+ OBJCOPY=$(TARGET_CROSS)objcopy \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ PKG_CONFIG_SYSROOT=$(STAGING_DIR) \
+ PKG_CONFIG=$(STAGING_DIR)/usr/bin/pkg-config
+
+
+ifeq ($(BR2_ENABLE_LOCALE),y)
+DISABLE_NLS:=
+else
+DISABLE_NLS:=--disable-nls
+endif
+
+ifneq ($(BR2_LARGEFILE),y)
+DISABLE_LARGEFILE= --disable-largefile
+endif
+
+ifeq ($(BR2_INSTALL_LIBSTDCPP),)
+TARGET_CONFIGURE_OPTS+=CXX=""
+endif
+
diff --git a/misc/buildroot/package/config/Kconfig-language.txt b/misc/buildroot/package/config/Kconfig-language.txt
new file mode 100644
index 000000000..d78969e32
--- /dev/null
+++ b/misc/buildroot/package/config/Kconfig-language.txt
@@ -0,0 +1,282 @@
+Introduction
+------------
+
+The configuration database is collection of configuration options
+organized in a tree structure:
+
+ +- Code maturity level options
+ | +- Prompt for development and/or incomplete code/drivers
+ +- General setup
+ | +- Networking support
+ | +- System V IPC
+ | +- BSD Process Accounting
+ | +- Sysctl support
+ +- Loadable module support
+ | +- Enable loadable module support
+ | +- Set version information on all module symbols
+ | +- Kernel module loader
+ +- ...
+
+Every entry has its own dependencies. These dependencies are used
+to determine the visibility of an entry. Any child entry is only
+visible if its parent entry is also visible.
+
+Menu entries
+------------
+
+Most entries define a config option, all other entries help to organize
+them. A single configuration option is defined like this:
+
+config MODVERSIONS
+ bool "Set version information on all module symbols"
+ depends MODULES
+ help
+ Usually, modules have to be recompiled whenever you switch to a new
+ kernel. ...
+
+Every line starts with a key word and can be followed by multiple
+arguments. "config" starts a new config entry. The following lines
+define attributes for this config option. Attributes can be the type of
+the config option, input prompt, dependencies, help text and default
+values. A config option can be defined multiple times with the same
+name, but every definition can have only a single input prompt and the
+type must not conflict.
+
+Menu attributes
+---------------
+
+A menu entry can have a number of attributes. Not all of them are
+applicable everywhere (see syntax).
+
+- type definition: "bool"/"tristate"/"string"/"hex"/"integer"
+ Every config option must have a type. There are only two basic types:
+ tristate and string, the other types are based on these two. The type
+ definition optionally accepts an input prompt, so these two examples
+ are equivalent:
+
+ bool "Networking support"
+ and
+ bool
+ prompt "Networking support"
+
+- input prompt: "prompt" <prompt> ["if" <expr>]
+ Every menu entry can have at most one prompt, which is used to display
+ to the user. Optionally dependencies only for this prompt can be added
+ with "if".
+
+- default value: "default" <expr> ["if" <expr>]
+ A config option can have any number of default values. If multiple
+ default values are visible, only the first defined one is active.
+ Default values are not limited to the menu entry, where they are
+ defined, this means the default can be defined somewhere else or be
+ overridden by an earlier definition.
+ The default value is only assigned to the config symbol if no other
+ value was set by the user (via the input prompt above). If an input
+ prompt is visible the default value is presented to the user and can
+ be overridden by him.
+ Optionally dependencies only for this default value can be added with
+ "if".
+
+- dependencies: "depends on"/"requires" <expr>
+ This defines a dependency for this menu entry. If multiple
+ dependencies are defined they are connected with '&&'. Dependencies
+ are applied to all other options within this menu entry (which also
+ accept an "if" expression), so these two examples are equivalent:
+
+ bool "foo" if BAR
+ default y if BAR
+ and
+ depends on BAR
+ bool "foo"
+ default y
+
+- reverse dependencies: "select" <symbol> ["if" <expr>]
+ While normal dependencies reduce the upper limit of a symbol (see
+ below), reverse dependencies can be used to force a lower limit of
+ another symbol. The value of the current menu symbol is used as the
+ minimal value <symbol> can be set to. If <symbol> is selected multiple
+ times, the limit is set to the largest selection.
+ Reverse dependencies can only be used with boolean or tristate
+ symbols.
+
+- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
+ This allows to limit the range of possible input values for integer
+ and hex symbols. The user can only input a value which is larger than
+ or equal to the first symbol and smaller than or equal to the second
+ symbol.
+
+- help text: "help" or "---help---"
+ This defines a help text. The end of the help text is determined by
+ the indentation level, this means it ends at the first line which has
+ a smaller indentation than the first line of the help text.
+ "---help---" and "help" do not differ in behaviour, "---help---" is
+ used to help visually separate configuration logic from help within
+ the file as an aid to developers.
+
+
+Menu dependencies
+-----------------
+
+Dependencies define the visibility of a menu entry and can also reduce
+the input range of tristate symbols. The tristate logic used in the
+expressions uses one more state than normal boolean logic to express the
+module state. Dependency expressions have the following syntax:
+
+<expr> ::= <symbol> (1)
+ <symbol> '=' <symbol> (2)
+ <symbol> '!=' <symbol> (3)
+ '(' <expr> ')' (4)
+ '!' <expr> (5)
+ <expr> '&&' <expr> (6)
+ <expr> '||' <expr> (7)
+
+Expressions are listed in decreasing order of precedence.
+
+(1) Convert the symbol into an expression. Boolean and tristate symbols
+ are simply converted into the respective expression values. All
+ other symbol types result in 'n'.
+(2) If the values of both symbols are equal, it returns 'y',
+ otherwise 'n'.
+(3) If the values of both symbols are equal, it returns 'n',
+ otherwise 'y'.
+(4) Returns the value of the expression. Used to override precedence.
+(5) Returns the result of (2-/expr/).
+(6) Returns the result of min(/expr/, /expr/).
+(7) Returns the result of max(/expr/, /expr/).
+
+An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2
+respectively for calculations). A menu entry becomes visible when it's
+expression evaluates to 'm' or 'y'.
+
+There are two types of symbols: constant and nonconstant symbols.
+Nonconstant symbols are the most common ones and are defined with the
+'config' statement. Nonconstant symbols consist entirely of alphanumeric
+characters or underscores.
+Constant symbols are only part of expressions. Constant symbols are
+always surrounded by single or double quotes. Within the quote any
+other character is allowed and the quotes can be escaped using '\'.
+
+Menu structure
+--------------
+
+The position of a menu entry in the tree is determined in two ways. First
+it can be specified explicitly:
+
+menu "Network device support"
+ depends NET
+
+config NETDEVICES
+ ...
+
+endmenu
+
+All entries within the "menu" ... "endmenu" block become a submenu of
+"Network device support". All subentries inherit the dependencies from
+the menu entry, e.g. this means the dependency "NET" is added to the
+dependency list of the config option NETDEVICES.
+
+The other way to generate the menu structure is done by analyzing the
+dependencies. If a menu entry somehow depends on the previous entry, it
+can be made a submenu of it. First, the previous (parent) symbol must
+be part of the dependency list and then one of these two conditions
+must be true:
+- the child entry must become invisible, if the parent is set to 'n'
+- the child entry must only be visible, if the parent is visible
+
+config MODULES
+ bool "Enable loadable module support"
+
+config MODVERSIONS
+ bool "Set version information on all module symbols"
+ depends MODULES
+
+comment "module support disabled"
+ depends !MODULES
+
+MODVERSIONS directly depends on MODULES, this means it's only visible if
+MODULES is different from 'n'. The comment on the other hand is always
+visible when MODULES is visible (the (empty) dependency of MODULES is
+also part of the comment dependencies).
+
+
+Kconfig syntax
+--------------
+
+The configuration file describes a series of menu entries, where every
+line starts with a keyword (except help texts). The following keywords
+end a menu entry:
+- config
+- menuconfig
+- choice/endchoice
+- comment
+- menu/endmenu
+- if/endif
+- source
+The first five also start the definition of a menu entry.
+
+config:
+
+ "config" <symbol>
+ <config options>
+
+This defines a config symbol <symbol> and accepts any of above
+attributes as options.
+
+menuconfig:
+ "menuconfig" <symbol>
+ <config options>
+
+This is similiar to the simple config entry above, but it also gives a
+hint to front ends, that all suboptions should be displayed as a
+separate list of options.
+
+choices:
+
+ "choice"
+ <choice options>
+ <choice block>
+ "endchoice"
+
+This defines a choice group and accepts any of above attributes as
+options. A choice can only be of type bool or tristate, while a boolean
+choice only allows a single config entry to be selected, a tristate
+choice also allows any number of config entries to be set to 'm'. This
+can be used if multiple drivers for a single hardware exists and only a
+single driver can be compiled/loaded into the kernel, but all drivers
+can be compiled as modules.
+A choice accepts another option "optional", which allows to set the
+choice to 'n' and no entry needs to be selected.
+
+comment:
+
+ "comment" <prompt>
+ <comment options>
+
+This defines a comment which is displayed to the user during the
+configuration process and is also echoed to the output files. The only
+possible options are dependencies.
+
+menu:
+
+ "menu" <prompt>
+ <menu options>
+ <menu block>
+ "endmenu"
+
+This defines a menu block, see "Menu structure" above for more
+information. The only possible options are dependencies.
+
+if:
+
+ "if" <expr>
+ <if block>
+ "endif"
+
+This defines an if block. The dependency expression <expr> is appended
+to all enclosed menu entries.
+
+source:
+
+ "source" <prompt>
+
+This reads the specified configuration file. This file is always parsed.
diff --git a/misc/buildroot/package/config/Makefile b/misc/buildroot/package/config/Makefile
new file mode 100644
index 000000000..430138f77
--- /dev/null
+++ b/misc/buildroot/package/config/Makefile
@@ -0,0 +1,134 @@
+# Makefile for buildroot2
+#
+# Copyright (C) 2002-2005 Erik Andersen <andersen@codepoet.org>
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU Library General Public License as published by the Free
+# Software Foundation; either version 2 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 Library General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Select the compiler needed to build binaries for your development system
+HOSTCC = gcc
+HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
+LC_ALL:= C
+
+all: ncurses conf mconf
+
+ifeq ($(shell uname),SunOS)
+LIBS = -lcurses
+else
+LIBS = -lncurses
+endif
+ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
+ HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
+else
+ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
+ HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
+else
+ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h))
+ HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses.h>"
+else
+ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h))
+ HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
+else
+ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
+ HOSTNCURSES += -DCURSES_LOC="<ncurses.h>"
+else
+ HOSTNCURSES += -DCURSES_LOC="<curses.h>"
+endif
+endif
+endif
+endif
+endif
+
+CONF_SRC = conf.c
+MCONF_SRC = mconf.c
+LXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \
+ lxdialog/yesno.c lxdialog/inputbox.c lxdialog/util.c \
+ lxdialog/msgbox.c
+SHARED_SRC = zconf.tab.c
+SHARED_DEPS := lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h
+CONF_OBJS = $(patsubst %.c,%.o, $(CONF_SRC))
+MCONF_OBJS = $(patsubst %.c,%.o, $(MCONF_SRC) $(LXD_SRC))
+SHARED_OBJS = $(patsubst %.c,%.o, $(SHARED_SRC))
+
+conf: $(CONF_OBJS) $(SHARED_OBJS)
+ $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
+
+mconf: $(MCONF_OBJS) $(SHARED_OBJS)
+ $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
+
+$(CONF_OBJS): %.o : %.c $(SHARED_DEPS)
+ $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
+
+$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS)
+ $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
+
+lkc_defs.h: lkc_proto.h
+ @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
+
+###
+# The following requires flex/bison
+# By default we use the _shipped versions, uncomment the
+# following line if you are modifying the flex/bison src.
+#LKC_GENPARSER := 1
+
+ifdef LKC_GENPARSER
+
+%.tab.c %.tab.h: %.y
+ bison -t -d -v -b $* -p $(notdir $*) $<
+
+lex.%.c: %.l
+ flex -P$(notdir $*) -o$@ $<
+else
+
+lex.zconf.o: lex.zconf.c $(SHARED_DEPS)
+ $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
+
+lex.zconf.c: lex.zconf.c_shipped
+ cp lex.zconf.c_shipped lex.zconf.c
+
+zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS)
+ $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
+
+zconf.tab.c: zconf.tab.c_shipped
+ cp zconf.tab.c_shipped zconf.tab.c
+
+zconf.tab.h: zconf.tab.h_shipped
+ cp zconf.tab.h_shipped zconf.tab.h
+endif
+
+.PHONY: ncurses
+
+ncurses:
+ @echo "main() {}" > lxtemp.c
+ @if $(HOSTCC) lxtemp.c $(LIBS) ; then \
+ $(RM) lxtemp.c a.out; \
+ else \
+ $(RM) lxtemp.c; \
+ /bin/echo -e "\007" ;\
+ echo ">> Unable to find the Ncurses libraries." ;\
+ echo ">>" ;\
+ echo ">> You must have Ncurses installed in order" ;\
+ echo ">> to use 'make menuconfig'" ;\
+ echo ">>" ;\
+ echo ">> Maybe you want to try 'make config', which" ;\
+ echo ">> doesn't depend on the Ncurses libraries." ;\
+ echo ;\
+ exit 1 ;\
+ fi
+
+clean:
+ $(RM) *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \
+ conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h
+
diff --git a/misc/buildroot/package/config/conf.c b/misc/buildroot/package/config/conf.c
new file mode 100644
index 000000000..8ca430b0b
--- /dev/null
+++ b/misc/buildroot/package/config/conf.c
@@ -0,0 +1,583 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/stat.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+static void conf(struct menu *menu);
+static void check_conf(struct menu *menu);
+
+enum {
+ ask_all,
+ ask_new,
+ ask_silent,
+ set_default,
+ set_yes,
+ set_mod,
+ set_no,
+ set_random
+} input_mode = ask_all;
+char *defconfig_file;
+
+static int indent = 1;
+static int valid_stdin = 1;
+static int conf_cnt;
+static signed char line[128];
+static struct menu *rootEntry;
+
+static char nohelp_text[] = "Sorry, no help available for this option yet.\n";
+
+static void strip(signed char *str)
+{
+ signed char *p = str;
+ int l;
+
+ while ((isspace(*p)))
+ p++;
+ l = strlen(p);
+ if (p != str)
+ memmove(str, p, l + 1);
+ if (!l)
+ return;
+ p = str + l - 1;
+ while ((isspace(*p)))
+ *p-- = 0;
+}
+
+static void check_stdin(void)
+{
+ if (!valid_stdin && input_mode == ask_silent) {
+ printf("aborted!\n\n");
+ printf("Console input/output is redirected. ");
+ printf("Run 'make oldconfig' to update configuration.\n\n");
+ exit(1);
+ }
+}
+
+static void conf_askvalue(struct symbol *sym, const char *def)
+{
+ enum symbol_type type = sym_get_type(sym);
+ tristate val;
+
+ if (!sym_has_value(sym))
+ printf("(NEW) ");
+
+ line[0] = '\n';
+ line[1] = 0;
+
+ if (!sym_is_changable(sym)) {
+ printf("%s\n", def);
+ line[0] = '\n';
+ line[1] = 0;
+ return;
+ }
+
+ switch (input_mode) {
+ case ask_new:
+ case ask_silent:
+ if (sym_has_value(sym)) {
+ printf("%s\n", def);
+ return;
+ }
+ check_stdin();
+ case ask_all:
+ fflush(stdout);
+ fgets(line, 128, stdin);
+ return;
+ case set_default:
+ printf("%s\n", def);
+ return;
+ default:
+ break;
+ }
+
+ switch (type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ printf("%s\n", def);
+ return;
+ default:
+ ;
+ }
+ switch (input_mode) {
+ case set_yes:
+ if (sym_tristate_within_range(sym, yes)) {
+ line[0] = 'y';
+ line[1] = '\n';
+ line[2] = 0;
+ break;
+ }
+ case set_mod:
+ if (type == S_TRISTATE) {
+ if (sym_tristate_within_range(sym, mod)) {
+ line[0] = 'm';
+ line[1] = '\n';
+ line[2] = 0;
+ break;
+ }
+ } else {
+ if (sym_tristate_within_range(sym, yes)) {
+ line[0] = 'y';
+ line[1] = '\n';
+ line[2] = 0;
+ break;
+ }
+ }
+ case set_no:
+ if (sym_tristate_within_range(sym, no)) {
+ line[0] = 'n';
+ line[1] = '\n';
+ line[2] = 0;
+ break;
+ }
+ case set_random:
+ do {
+ val = (tristate)(random() % 3);
+ } while (!sym_tristate_within_range(sym, val));
+ switch (val) {
+ case no: line[0] = 'n'; break;
+ case mod: line[0] = 'm'; break;
+ case yes: line[0] = 'y'; break;
+ }
+ line[1] = '\n';
+ line[2] = 0;
+ break;
+ default:
+ break;
+ }
+ printf("%s", line);
+}
+
+int conf_string(struct menu *menu)
+{
+ struct symbol *sym = menu->sym;
+ const char *def, *help;
+
+ while (1) {
+ printf("%*s%s ", indent - 1, "", menu->prompt->text);
+ printf("(%s) ", sym->name);
+ def = sym_get_string_value(sym);
+ if (sym_get_string_value(sym))
+ printf("[%s] ", def);
+ conf_askvalue(sym, def);
+ switch (line[0]) {
+ case '\n':
+ break;
+ case '?':
+ /* print help */
+ if (line[1] == '\n') {
+ help = nohelp_text;
+ if (menu->sym->help)
+ help = menu->sym->help;
+ printf("\n%s\n", menu->sym->help);
+ def = NULL;
+ break;
+ }
+ default:
+ line[strlen(line)-1] = 0;
+ def = line;
+ }
+ if (def && sym_set_string_value(sym, def))
+ return 0;
+ }
+}
+
+static int conf_sym(struct menu *menu)
+{
+ struct symbol *sym = menu->sym;
+ int type;
+ tristate oldval, newval;
+ const char *help;
+
+ while (1) {
+ printf("%*s%s ", indent - 1, "", menu->prompt->text);
+ if (sym->name)
+ printf("(%s) ", sym->name);
+ type = sym_get_type(sym);
+ putchar('[');
+ oldval = sym_get_tristate_value(sym);
+ switch (oldval) {
+ case no:
+ putchar('N');
+ break;
+ case mod:
+ putchar('M');
+ break;
+ case yes:
+ putchar('Y');
+ break;
+ }
+ if (oldval != no && sym_tristate_within_range(sym, no))
+ printf("/n");
+ if (oldval != mod && sym_tristate_within_range(sym, mod))
+ printf("/m");
+ if (oldval != yes && sym_tristate_within_range(sym, yes))
+ printf("/y");
+ if (sym->help)
+ printf("/?");
+ printf("] ");
+ conf_askvalue(sym, sym_get_string_value(sym));
+ strip(line);
+
+ switch (line[0]) {
+ case 'n':
+ case 'N':
+ newval = no;
+ if (!line[1] || !strcmp(&line[1], "o"))
+ break;
+ continue;
+ case 'm':
+ case 'M':
+ newval = mod;
+ if (!line[1])
+ break;
+ continue;
+ case 'y':
+ case 'Y':
+ newval = yes;
+ if (!line[1] || !strcmp(&line[1], "es"))
+ break;
+ continue;
+ case 0:
+ newval = oldval;
+ break;
+ case '?':
+ goto help;
+ default:
+ continue;
+ }
+ if (sym_set_tristate_value(sym, newval))
+ return 0;
+help:
+ help = nohelp_text;
+ if (sym->help)
+ help = sym->help;
+ printf("\n%s\n", help);
+ }
+}
+
+static int conf_choice(struct menu *menu)
+{
+ struct symbol *sym, *def_sym;
+ struct menu *child;
+ int type;
+ bool is_new;
+
+ sym = menu->sym;
+ type = sym_get_type(sym);
+ is_new = !sym_has_value(sym);
+ if (sym_is_changable(sym)) {
+ conf_sym(menu);
+ sym_calc_value(sym);
+ switch (sym_get_tristate_value(sym)) {
+ case no:
+ return 1;
+ case mod:
+ return 0;
+ case yes:
+ break;
+ }
+ } else {
+ switch (sym_get_tristate_value(sym)) {
+ case no:
+ return 1;
+ case mod:
+ printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
+ return 0;
+ case yes:
+ break;
+ }
+ }
+
+ while (1) {
+ int cnt, def;
+
+ printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
+ def_sym = sym_get_choice_value(sym);
+ cnt = def = 0;
+ line[0] = '0';
+ line[1] = 0;
+ for (child = menu->list; child; child = child->next) {
+ if (!menu_is_visible(child))
+ continue;
+ if (!child->sym) {
+ printf("%*c %s\n", indent, '*', menu_get_prompt(child));
+ continue;
+ }
+ cnt++;
+ if (child->sym == def_sym) {
+ def = cnt;
+ printf("%*c", indent, '>');
+ } else
+ printf("%*c", indent, ' ');
+ printf(" %d. %s", cnt, menu_get_prompt(child));
+ if (child->sym->name)
+ printf(" (%s)", child->sym->name);
+ if (!sym_has_value(child->sym))
+ printf(" (NEW)");
+ printf("\n");
+ }
+ printf("%*schoice", indent - 1, "");
+ if (cnt == 1) {
+ printf("[1]: 1\n");
+ goto conf_childs;
+ }
+ printf("[1-%d", cnt);
+ if (sym->help)
+ printf("?");
+ printf("]: ");
+ switch (input_mode) {
+ case ask_new:
+ case ask_silent:
+ if (!is_new) {
+ cnt = def;
+ printf("%d\n", cnt);
+ break;
+ }
+ check_stdin();
+ case ask_all:
+ fflush(stdout);
+ fgets(line, 128, stdin);
+ strip(line);
+ if (line[0] == '?') {
+ printf("\n%s\n", menu->sym->help ?
+ menu->sym->help : nohelp_text);
+ continue;
+ }
+ if (!line[0])
+ cnt = def;
+ else if (isdigit(line[0]))
+ cnt = atoi(line);
+ else
+ continue;
+ break;
+ case set_random:
+ def = (random() % cnt) + 1;
+ case set_default:
+ case set_yes:
+ case set_mod:
+ case set_no:
+ cnt = def;
+ printf("%d\n", cnt);
+ break;
+ }
+
+ conf_childs:
+ for (child = menu->list; child; child = child->next) {
+ if (!child->sym || !menu_is_visible(child))
+ continue;
+ if (!--cnt)
+ break;
+ }
+ if (!child)
+ continue;
+ if (line[strlen(line) - 1] == '?') {
+ printf("\n%s\n", child->sym->help ?
+ child->sym->help : nohelp_text);
+ continue;
+ }
+ sym_set_choice_value(sym, child->sym);
+ if (child->list) {
+ indent += 2;
+ conf(child->list);
+ indent -= 2;
+ }
+ return 1;
+ }
+}
+
+static void conf(struct menu *menu)
+{
+ struct symbol *sym;
+ struct property *prop;
+ struct menu *child;
+
+ if (!menu_is_visible(menu))
+ return;
+
+ sym = menu->sym;
+ prop = menu->prompt;
+ if (prop) {
+ const char *prompt;
+
+ switch (prop->type) {
+ case P_MENU:
+ if (input_mode == ask_silent && rootEntry != menu) {
+ check_conf(menu);
+ return;
+ }
+ case P_COMMENT:
+ prompt = menu_get_prompt(menu);
+ if (prompt)
+ printf("%*c\n%*c %s\n%*c\n",
+ indent, '*',
+ indent, '*', prompt,
+ indent, '*');
+ default:
+ ;
+ }
+ }
+
+ if (!sym)
+ goto conf_childs;
+
+ if (sym_is_choice(sym)) {
+ conf_choice(menu);
+ if (sym->curr.tri != mod)
+ return;
+ goto conf_childs;
+ }
+
+ switch (sym->type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ conf_string(menu);
+ break;
+ default:
+ conf_sym(menu);
+ break;
+ }
+
+conf_childs:
+ if (sym)
+ indent += 2;
+ for (child = menu->list; child; child = child->next)
+ conf(child);
+ if (sym)
+ indent -= 2;
+}
+
+static void check_conf(struct menu *menu)
+{
+ struct symbol *sym;
+ struct menu *child;
+
+ if (!menu_is_visible(menu))
+ return;
+
+ sym = menu->sym;
+ if (sym) {
+ if (sym_is_changable(sym) && !sym_has_value(sym)) {
+ if (!conf_cnt++)
+ printf("*\n* Restart config...\n*\n");
+ rootEntry = menu_get_parent_menu(menu);
+ conf(rootEntry);
+ }
+ if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
+ return;
+ }
+
+ for (child = menu->list; child; child = child->next)
+ check_conf(child);
+}
+
+int main(int ac, char **av)
+{
+ int i = 1;
+ const char *name;
+ struct stat tmpstat;
+
+ if (ac > i && av[i][0] == '-') {
+ switch (av[i++][1]) {
+ case 'o':
+ input_mode = ask_new;
+ break;
+ case 's':
+ input_mode = ask_silent;
+ valid_stdin = isatty(0) && isatty(1) && isatty(2);
+ break;
+ case 'd':
+ input_mode = set_default;
+ break;
+ case 'D':
+ input_mode = set_default;
+ defconfig_file = av[i++];
+ if (!defconfig_file) {
+ printf("%s: No default config file specified\n",
+ av[0]);
+ exit(1);
+ }
+ break;
+ case 'n':
+ input_mode = set_no;
+ break;
+ case 'm':
+ input_mode = set_mod;
+ break;
+ case 'y':
+ input_mode = set_yes;
+ break;
+ case 'r':
+ input_mode = set_random;
+ srandom(time(NULL));
+ break;
+ case 'h':
+ case '?':
+ printf("%s [-o|-s] config\n", av[0]);
+ exit(0);
+ }
+ }
+ name = av[i];
+ if (!name) {
+ printf("%s: configuration file missing\n", av[0]);
+ }
+ conf_parse(name);
+ //zconfdump(stdout);
+ switch (input_mode) {
+ case set_default:
+ if (!defconfig_file)
+ defconfig_file = conf_get_default_confname();
+ if (conf_read(defconfig_file)) {
+ printf("***\n"
+ "*** Can't find default configuration \"%s\"!\n"
+ "***\n", defconfig_file);
+ exit(1);
+ }
+ break;
+ case ask_silent:
+ if (stat(".config", &tmpstat)) {
+ printf("***\n"
+ "*** You have not yet configured Buildroot!\n"
+ "***\n"
+ "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
+ "*** \"make menuconfig\" or \"make config\").\n"
+ "***\n");
+ exit(1);
+ }
+ case ask_all:
+ case ask_new:
+ conf_read(NULL);
+ break;
+ default:
+ break;
+ }
+
+ if (input_mode != ask_silent) {
+ rootEntry = &rootmenu;
+ conf(&rootmenu);
+ if (input_mode == ask_all) {
+ input_mode = ask_silent;
+ valid_stdin = 1;
+ }
+ }
+ do {
+ conf_cnt = 0;
+ check_conf(&rootmenu);
+ } while (conf_cnt);
+ if (conf_write(NULL)) {
+ fprintf(stderr, "\n*** Error during writing of the Buildroot configuration.\n\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/misc/buildroot/package/config/confdata.c b/misc/buildroot/package/config/confdata.c
new file mode 100644
index 000000000..144b15c04
--- /dev/null
+++ b/misc/buildroot/package/config/confdata.c
@@ -0,0 +1,397 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <sys/stat.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+const char conf_def_filename[] = ".config";
+
+const char conf_defname[] = ".defconfig";
+
+const char *conf_confnames[] = {
+ ".config",
+ conf_defname,
+ NULL,
+};
+
+static char *conf_expand_value(const signed char *in)
+{
+ struct symbol *sym;
+ const signed char *src;
+ static char res_value[SYMBOL_MAXLENGTH];
+ char *dst, name[SYMBOL_MAXLENGTH];
+
+ res_value[0] = 0;
+ dst = name;
+ while ((src = strchr(in, '$'))) {
+ strncat(res_value, in, src - in);
+ src++;
+ dst = name;
+ while (isalnum(*src) || *src == '_')
+ *dst++ = *src++;
+ *dst = 0;
+ sym = sym_lookup(name, 0);
+ sym_calc_value(sym);
+ strcat(res_value, sym_get_string_value(sym));
+ in = src;
+ }
+ strcat(res_value, in);
+
+ return res_value;
+}
+
+char *conf_get_default_confname(void)
+{
+ struct stat buf;
+ static char fullname[PATH_MAX+1];
+ char *env, *name;
+
+ name = conf_expand_value(conf_defname);
+ env = getenv(SRCTREE);
+ if (env) {
+ sprintf(fullname, "%s/%s", env, name);
+ if (!stat(fullname, &buf))
+ return fullname;
+ }
+ return name;
+}
+
+int conf_read(const char *name)
+{
+ FILE *in = NULL;
+ char line[1024];
+ char *p, *p2;
+ int lineno = 0;
+ struct symbol *sym;
+ struct property *prop;
+ struct expr *e;
+ int i;
+
+ if (name) {
+ in = zconf_fopen(name);
+ } else {
+ const char **names = conf_confnames;
+ while ((name = *names++)) {
+ name = conf_expand_value(name);
+ in = zconf_fopen(name);
+ if (in) {
+ printf("#\n"
+ "# using defaults found in %s\n"
+ "#\n", name);
+ break;
+ }
+ }
+ }
+
+ if (!in)
+ return 1;
+
+ for_all_symbols(i, sym) {
+ sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED;
+ sym->flags &= ~SYMBOL_VALID;
+ switch (sym->type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ if (sym->user.val)
+ free(sym->user.val);
+ default:
+ sym->user.val = NULL;
+ sym->user.tri = no;
+ }
+ }
+
+ while (fgets(line, sizeof(line), in)) {
+ lineno++;
+ sym = NULL;
+ switch (line[0]) {
+ case '#':
+ if (line[1]!=' ')
+ continue;
+ p = strchr(line + 2, ' ');
+ if (!p)
+ continue;
+ *p++ = 0;
+ if (strncmp(p, "is not set", 10))
+ continue;
+ sym = sym_find(line + 2);
+ if (!sym) {
+ fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 2);
+ break;
+ }
+ switch (sym->type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ sym->user.tri = no;
+ sym->flags &= ~SYMBOL_NEW;
+ break;
+ default:
+ ;
+ }
+ break;
+
+ case 'A' ... 'Z':
+ p = strchr(line, '=');
+ if (!p)
+ continue;
+ *p++ = 0;
+ p2 = strchr(p, '\n');
+ if (p2)
+ *p2 = 0;
+ sym = sym_find(line);
+ if (!sym) {
+ fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line);
+ break;
+ }
+ switch (sym->type) {
+ case S_TRISTATE:
+ if (p[0] == 'm') {
+ sym->user.tri = mod;
+ sym->flags &= ~SYMBOL_NEW;
+ break;
+ }
+ case S_BOOLEAN:
+ if (p[0] == 'y') {
+ sym->user.tri = yes;
+ sym->flags &= ~SYMBOL_NEW;
+ break;
+ }
+ if (p[0] == 'n') {
+ sym->user.tri = no;
+ sym->flags &= ~SYMBOL_NEW;
+ break;
+ }
+ break;
+ case S_STRING:
+ if (*p++ != '"')
+ break;
+ for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
+ if (*p2 == '"') {
+ *p2 = 0;
+ break;
+ }
+ memmove(p2, p2 + 1, strlen(p2));
+ }
+ if (!p2) {
+ fprintf(stderr, "%s:%d: invalid string found\n", name, lineno);
+ exit(1);
+ }
+ case S_INT:
+ case S_HEX:
+ if (sym_string_valid(sym, p)) {
+ sym->user.val = strdup(p);
+ sym->flags &= ~SYMBOL_NEW;
+ } else {
+ fprintf(stderr, "%s:%d: symbol value '%s' invalid for %s\n", name, lineno, p, sym->name);
+ exit(1);
+ }
+ break;
+ default:
+ ;
+ }
+ break;
+ case '\n':
+ break;
+ default:
+ continue;
+ }
+ if (sym && sym_is_choice_value(sym)) {
+ struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
+ switch (sym->user.tri) {
+ case no:
+ break;
+ case mod:
+ if (cs->user.tri == yes)
+ /* warn? */;
+ break;
+ case yes:
+ if (cs->user.tri != no)
+ /* warn? */;
+ cs->user.val = sym;
+ break;
+ }
+ cs->user.tri = E_OR(cs->user.tri, sym->user.tri);
+ cs->flags &= ~SYMBOL_NEW;
+ }
+ }
+ fclose(in);
+
+ if (modules_sym)
+ sym_calc_value(modules_sym);
+ for_all_symbols(i, sym) {
+ sym_calc_value(sym);
+ if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
+ if (sym->visible == no)
+ sym->flags |= SYMBOL_NEW;
+ switch (sym->type) {
+ case S_STRING:
+ case S_INT:
+ case S_HEX:
+ if (!sym_string_within_range(sym, sym->user.val))
+ sym->flags |= SYMBOL_NEW;
+ default:
+ break;
+ }
+ }
+ if (!sym_is_choice(sym))
+ continue;
+ prop = sym_get_choice_prop(sym);
+ for (e = prop->expr; e; e = e->left.expr)
+ if (e->right.sym->visible != no)
+ sym->flags |= e->right.sym->flags & SYMBOL_NEW;
+ }
+
+ sym_change_count = 1;
+
+ return 0;
+}
+
+int conf_write(const char *name)
+{
+ FILE *out;
+ struct symbol *sym;
+ struct menu *menu;
+ const char *basename;
+ char dirname[128], tmpname[128], newname[128];
+ int type, l;
+ const char *str;
+
+ dirname[0] = 0;
+ if (name && name[0]) {
+ struct stat st;
+ char *slash;
+
+ if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
+ strcpy(dirname, name);
+ strcat(dirname, "/");
+ basename = conf_def_filename;
+ } else if ((slash = strrchr(name, '/'))) {
+ int size = slash - name + 1;
+ memcpy(dirname, name, size);
+ dirname[size] = 0;
+ if (slash[1])
+ basename = slash + 1;
+ else
+ basename = conf_def_filename;
+ } else
+ basename = name;
+ } else
+ basename = conf_def_filename;
+
+ sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid());
+ out = fopen(newname, "w");
+ if (!out)
+ return 1;
+ fprintf(out, "#\n"
+ "# Automatically generated make config: don't edit\n"
+ "#\n");
+
+ if (!sym_change_count)
+ sym_clear_all_valid();
+
+ menu = rootmenu.list;
+ while (menu) {
+ sym = menu->sym;
+ if (!sym) {
+ if (!menu_is_visible(menu))
+ goto next;
+ str = menu_get_prompt(menu);
+ fprintf(out, "\n"
+ "#\n"
+ "# %s\n"
+ "#\n", str);
+ } else if (!(sym->flags & SYMBOL_CHOICE)) {
+ sym_calc_value(sym);
+ if (!(sym->flags & SYMBOL_WRITE))
+ goto next;
+ sym->flags &= ~SYMBOL_WRITE;
+ type = sym->type;
+ if (type == S_TRISTATE) {
+ sym_calc_value(modules_sym);
+ if (modules_sym->curr.tri == no)
+ type = S_BOOLEAN;
+ }
+ switch (type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ switch (sym_get_tristate_value(sym)) {
+ case no:
+ fprintf(out, "# %s is not set\n", sym->name);
+ break;
+ case mod:
+ fprintf(out, "%s=m\n", sym->name);
+ break;
+ case yes:
+ fprintf(out, "%s=y\n", sym->name);
+ break;
+ }
+ break;
+ case S_STRING:
+ // fix me
+ str = sym_get_string_value(sym);
+ fprintf(out, "%s=\"", sym->name);
+ do {
+ l = strcspn(str, "\"\\");
+ if (l) {
+ fwrite(str, l, 1, out);
+ }
+ str += l;
+ while (*str == '\\' || *str == '"') {
+ fprintf(out, "\\%c", *str);
+ str++;
+ }
+ } while (*str);
+ fputs("\"\n", out);
+ break;
+ case S_HEX:
+ str = sym_get_string_value(sym);
+ if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
+ fprintf(out, "%s=%s\n", sym->name, str);
+ break;
+ }
+ case S_INT:
+ str = sym_get_string_value(sym);
+ fprintf(out, "%s=%s\n", sym->name, str);
+ break;
+ }
+ }
+
+ next:
+ if (menu->list) {
+ menu = menu->list;
+ continue;
+ }
+ if (menu->next)
+ menu = menu->next;
+ else while ((menu = menu->parent)) {
+ if (menu->next) {
+ menu = menu->next;
+ break;
+ }
+ }
+ }
+ fclose(out);
+ file_write_dep(NULL);
+ if (!name || basename != conf_def_filename) {
+ if (!name)
+ name = conf_def_filename;
+ sprintf(tmpname, "%s.old", name);
+ rename(name, tmpname);
+ }
+ sprintf(tmpname, "%s%s", dirname, basename);
+ if (rename(newname, tmpname))
+ return 1;
+
+ sym_change_count = 0;
+
+ return 0;
+}
diff --git a/misc/buildroot/package/config/expr.c b/misc/buildroot/package/config/expr.c
new file mode 100644
index 000000000..30e4f9d69
--- /dev/null
+++ b/misc/buildroot/package/config/expr.c
@@ -0,0 +1,1099 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+#define DEBUG_EXPR 0
+
+struct expr *expr_alloc_symbol(struct symbol *sym)
+{
+ struct expr *e = malloc(sizeof(*e));
+ memset(e, 0, sizeof(*e));
+ e->type = E_SYMBOL;
+ e->left.sym = sym;
+ return e;
+}
+
+struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
+{
+ struct expr *e = malloc(sizeof(*e));
+ memset(e, 0, sizeof(*e));
+ e->type = type;
+ e->left.expr = ce;
+ return e;
+}
+
+struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
+{
+ struct expr *e = malloc(sizeof(*e));
+ memset(e, 0, sizeof(*e));
+ e->type = type;
+ e->left.expr = e1;
+ e->right.expr = e2;
+ return e;
+}
+
+struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
+{
+ struct expr *e = malloc(sizeof(*e));
+ memset(e, 0, sizeof(*e));
+ e->type = type;
+ e->left.sym = s1;
+ e->right.sym = s2;
+ return e;
+}
+
+struct expr *expr_alloc_and(struct expr *e1, struct expr *e2)
+{
+ if (!e1)
+ return e2;
+ return e2 ? expr_alloc_two(E_AND, e1, e2) : e1;
+}
+
+struct expr *expr_alloc_or(struct expr *e1, struct expr *e2)
+{
+ if (!e1)
+ return e2;
+ return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
+}
+
+struct expr *expr_copy(struct expr *org)
+{
+ struct expr *e;
+
+ if (!org)
+ return NULL;
+
+ e = malloc(sizeof(*org));
+ memcpy(e, org, sizeof(*org));
+ switch (org->type) {
+ case E_SYMBOL:
+ e->left = org->left;
+ break;
+ case E_NOT:
+ e->left.expr = expr_copy(org->left.expr);
+ break;
+ case E_EQUAL:
+ case E_UNEQUAL:
+ e->left.sym = org->left.sym;
+ e->right.sym = org->right.sym;
+ break;
+ case E_AND:
+ case E_OR:
+ case E_CHOICE:
+ e->left.expr = expr_copy(org->left.expr);
+ e->right.expr = expr_copy(org->right.expr);
+ break;
+ default:
+ printf("can't copy type %d\n", e->type);
+ free(e);
+ e = NULL;
+ break;
+ }
+
+ return e;
+}
+
+void expr_free(struct expr *e)
+{
+ if (!e)
+ return;
+
+ switch (e->type) {
+ case E_SYMBOL:
+ break;
+ case E_NOT:
+ expr_free(e->left.expr);
+ return;
+ case E_EQUAL:
+ case E_UNEQUAL:
+ break;
+ case E_OR:
+ case E_AND:
+ expr_free(e->left.expr);
+ expr_free(e->right.expr);
+ break;
+ default:
+ printf("how to free type %d?\n", e->type);
+ break;
+ }
+ free(e);
+}
+
+static int trans_count;
+
+#define e1 (*ep1)
+#define e2 (*ep2)
+
+static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2)
+{
+ if (e1->type == type) {
+ __expr_eliminate_eq(type, &e1->left.expr, &e2);
+ __expr_eliminate_eq(type, &e1->right.expr, &e2);
+ return;
+ }
+ if (e2->type == type) {
+ __expr_eliminate_eq(type, &e1, &e2->left.expr);
+ __expr_eliminate_eq(type, &e1, &e2->right.expr);
+ return;
+ }
+ if (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
+ e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO)))
+ return;
+ if (!expr_eq(e1, e2))
+ return;
+ trans_count++;
+ expr_free(e1); expr_free(e2);
+ switch (type) {
+ case E_OR:
+ e1 = expr_alloc_symbol(&symbol_no);
+ e2 = expr_alloc_symbol(&symbol_no);
+ break;
+ case E_AND:
+ e1 = expr_alloc_symbol(&symbol_yes);
+ e2 = expr_alloc_symbol(&symbol_yes);
+ break;
+ default:
+ ;
+ }
+}
+
+void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
+{
+ if (!e1 || !e2)
+ return;
+ switch (e1->type) {
+ case E_OR:
+ case E_AND:
+ __expr_eliminate_eq(e1->type, ep1, ep2);
+ default:
+ ;
+ }
+ if (e1->type != e2->type) switch (e2->type) {
+ case E_OR:
+ case E_AND:
+ __expr_eliminate_eq(e2->type, ep1, ep2);
+ default:
+ ;
+ }
+ e1 = expr_eliminate_yn(e1);
+ e2 = expr_eliminate_yn(e2);
+}
+
+#undef e1
+#undef e2
+
+int expr_eq(struct expr *e1, struct expr *e2)
+{
+ int res, old_count;
+
+ if (e1->type != e2->type)
+ return 0;
+ switch (e1->type) {
+ case E_EQUAL:
+ case E_UNEQUAL:
+ return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym;
+ case E_SYMBOL:
+ return e1->left.sym == e2->left.sym;
+ case E_NOT:
+ return expr_eq(e1->left.expr, e2->left.expr);
+ case E_AND:
+ case E_OR:
+ e1 = expr_copy(e1);
+ e2 = expr_copy(e2);
+ old_count = trans_count;
+ expr_eliminate_eq(&e1, &e2);
+ res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
+ e1->left.sym == e2->left.sym);
+ expr_free(e1);
+ expr_free(e2);
+ trans_count = old_count;
+ return res;
+ case E_CHOICE:
+ case E_RANGE:
+ case E_NONE:
+ /* panic */;
+ }
+
+ if (DEBUG_EXPR) {
+ expr_fprint(e1, stdout);
+ printf(" = ");
+ expr_fprint(e2, stdout);
+ printf(" ?\n");
+ }
+
+ return 0;
+}
+
+struct expr *expr_eliminate_yn(struct expr *e)
+{
+ struct expr *tmp;
+
+ if (e) switch (e->type) {
+ case E_AND:
+ e->left.expr = expr_eliminate_yn(e->left.expr);
+ e->right.expr = expr_eliminate_yn(e->right.expr);
+ if (e->left.expr->type == E_SYMBOL) {
+ if (e->left.expr->left.sym == &symbol_no) {
+ expr_free(e->left.expr);
+ expr_free(e->right.expr);
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_no;
+ e->right.expr = NULL;
+ return e;
+ } else if (e->left.expr->left.sym == &symbol_yes) {
+ free(e->left.expr);
+ tmp = e->right.expr;
+ *e = *(e->right.expr);
+ free(tmp);
+ return e;
+ }
+ }
+ if (e->right.expr->type == E_SYMBOL) {
+ if (e->right.expr->left.sym == &symbol_no) {
+ expr_free(e->left.expr);
+ expr_free(e->right.expr);
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_no;
+ e->right.expr = NULL;
+ return e;
+ } else if (e->right.expr->left.sym == &symbol_yes) {
+ free(e->right.expr);
+ tmp = e->left.expr;
+ *e = *(e->left.expr);
+ free(tmp);
+ return e;
+ }
+ }
+ break;
+ case E_OR:
+ e->left.expr = expr_eliminate_yn(e->left.expr);
+ e->right.expr = expr_eliminate_yn(e->right.expr);
+ if (e->left.expr->type == E_SYMBOL) {
+ if (e->left.expr->left.sym == &symbol_no) {
+ free(e->left.expr);
+ tmp = e->right.expr;
+ *e = *(e->right.expr);
+ free(tmp);
+ return e;
+ } else if (e->left.expr->left.sym == &symbol_yes) {
+ expr_free(e->left.expr);
+ expr_free(e->right.expr);
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_yes;
+ e->right.expr = NULL;
+ return e;
+ }
+ }
+ if (e->right.expr->type == E_SYMBOL) {
+ if (e->right.expr->left.sym == &symbol_no) {
+ free(e->right.expr);
+ tmp = e->left.expr;
+ *e = *(e->left.expr);
+ free(tmp);
+ return e;
+ } else if (e->right.expr->left.sym == &symbol_yes) {
+ expr_free(e->left.expr);
+ expr_free(e->right.expr);
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_yes;
+ e->right.expr = NULL;
+ return e;
+ }
+ }
+ break;
+ default:
+ ;
+ }
+ return e;
+}
+
+/*
+ * bool FOO!=n => FOO
+ */
+struct expr *expr_trans_bool(struct expr *e)
+{
+ if (!e)
+ return NULL;
+ switch (e->type) {
+ case E_AND:
+ case E_OR:
+ case E_NOT:
+ e->left.expr = expr_trans_bool(e->left.expr);
+ e->right.expr = expr_trans_bool(e->right.expr);
+ break;
+ case E_UNEQUAL:
+ // FOO!=n -> FOO
+ if (e->left.sym->type == S_TRISTATE) {
+ if (e->right.sym == &symbol_no) {
+ e->type = E_SYMBOL;
+ e->right.sym = NULL;
+ }
+ }
+ break;
+ default:
+ ;
+ }
+ return e;
+}
+
+/*
+ * e1 || e2 -> ?
+ */
+struct expr *expr_join_or(struct expr *e1, struct expr *e2)
+{
+ struct expr *tmp;
+ struct symbol *sym1, *sym2;
+
+ if (expr_eq(e1, e2))
+ return expr_copy(e1);
+ if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
+ return NULL;
+ if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
+ return NULL;
+ if (e1->type == E_NOT) {
+ tmp = e1->left.expr;
+ if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
+ return NULL;
+ sym1 = tmp->left.sym;
+ } else
+ sym1 = e1->left.sym;
+ if (e2->type == E_NOT) {
+ if (e2->left.expr->type != E_SYMBOL)
+ return NULL;
+ sym2 = e2->left.expr->left.sym;
+ } else
+ sym2 = e2->left.sym;
+ if (sym1 != sym2)
+ return NULL;
+ if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
+ return NULL;
+ if (sym1->type == S_TRISTATE) {
+ if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
+ ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
+ (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) {
+ // (a='y') || (a='m') -> (a!='n')
+ return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no);
+ }
+ if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
+ ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
+ (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) {
+ // (a='y') || (a='n') -> (a!='m')
+ return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod);
+ }
+ if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
+ ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
+ (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) {
+ // (a='m') || (a='n') -> (a!='y')
+ return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
+ }
+ }
+ if (sym1->type == S_BOOLEAN && sym1 == sym2) {
+ if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
+ (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
+ return expr_alloc_symbol(&symbol_yes);
+ }
+
+ if (DEBUG_EXPR) {
+ printf("optimize (");
+ expr_fprint(e1, stdout);
+ printf(") || (");
+ expr_fprint(e2, stdout);
+ printf(")?\n");
+ }
+ return NULL;
+}
+
+struct expr *expr_join_and(struct expr *e1, struct expr *e2)
+{
+ struct expr *tmp;
+ struct symbol *sym1, *sym2;
+
+ if (expr_eq(e1, e2))
+ return expr_copy(e1);
+ if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
+ return NULL;
+ if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
+ return NULL;
+ if (e1->type == E_NOT) {
+ tmp = e1->left.expr;
+ if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
+ return NULL;
+ sym1 = tmp->left.sym;
+ } else
+ sym1 = e1->left.sym;
+ if (e2->type == E_NOT) {
+ if (e2->left.expr->type != E_SYMBOL)
+ return NULL;
+ sym2 = e2->left.expr->left.sym;
+ } else
+ sym2 = e2->left.sym;
+ if (sym1 != sym2)
+ return NULL;
+ if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
+ return NULL;
+
+ if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
+ (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes))
+ // (a) && (a='y') -> (a='y')
+ return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
+
+ if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) ||
+ (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no))
+ // (a) && (a!='n') -> (a)
+ return expr_alloc_symbol(sym1);
+
+ if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) ||
+ (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod))
+ // (a) && (a!='m') -> (a='y')
+ return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
+
+ if (sym1->type == S_TRISTATE) {
+ if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
+ // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
+ sym2 = e1->right.sym;
+ if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
+ return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
+ : expr_alloc_symbol(&symbol_no);
+ }
+ if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
+ // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
+ sym2 = e2->right.sym;
+ if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
+ return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
+ : expr_alloc_symbol(&symbol_no);
+ }
+ if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
+ ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
+ (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes)))
+ // (a!='y') && (a!='n') -> (a='m')
+ return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod);
+
+ if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
+ ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
+ (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes)))
+ // (a!='y') && (a!='m') -> (a='n')
+ return expr_alloc_comp(E_EQUAL, sym1, &symbol_no);
+
+ if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
+ ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
+ (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod)))
+ // (a!='m') && (a!='n') -> (a='m')
+ return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
+
+ if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) ||
+ (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) ||
+ (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) ||
+ (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes))
+ return NULL;
+ }
+
+ if (DEBUG_EXPR) {
+ printf("optimize (");
+ expr_fprint(e1, stdout);
+ printf(") && (");
+ expr_fprint(e2, stdout);
+ printf(")?\n");
+ }
+ return NULL;
+}
+
+static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2)
+{
+#define e1 (*ep1)
+#define e2 (*ep2)
+ struct expr *tmp;
+
+ if (e1->type == type) {
+ expr_eliminate_dups1(type, &e1->left.expr, &e2);
+ expr_eliminate_dups1(type, &e1->right.expr, &e2);
+ return;
+ }
+ if (e2->type == type) {
+ expr_eliminate_dups1(type, &e1, &e2->left.expr);
+ expr_eliminate_dups1(type, &e1, &e2->right.expr);
+ return;
+ }
+ if (e1 == e2)
+ return;
+
+ switch (e1->type) {
+ case E_OR: case E_AND:
+ expr_eliminate_dups1(e1->type, &e1, &e1);
+ default:
+ ;
+ }
+
+ switch (type) {
+ case E_OR:
+ tmp = expr_join_or(e1, e2);
+ if (tmp) {
+ expr_free(e1); expr_free(e2);
+ e1 = expr_alloc_symbol(&symbol_no);
+ e2 = tmp;
+ trans_count++;
+ }
+ break;
+ case E_AND:
+ tmp = expr_join_and(e1, e2);
+ if (tmp) {
+ expr_free(e1); expr_free(e2);
+ e1 = expr_alloc_symbol(&symbol_yes);
+ e2 = tmp;
+ trans_count++;
+ }
+ break;
+ default:
+ ;
+ }
+#undef e1
+#undef e2
+}
+
+static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2)
+{
+#define e1 (*ep1)
+#define e2 (*ep2)
+ struct expr *tmp, *tmp1, *tmp2;
+
+ if (e1->type == type) {
+ expr_eliminate_dups2(type, &e1->left.expr, &e2);
+ expr_eliminate_dups2(type, &e1->right.expr, &e2);
+ return;
+ }
+ if (e2->type == type) {
+ expr_eliminate_dups2(type, &e1, &e2->left.expr);
+ expr_eliminate_dups2(type, &e1, &e2->right.expr);
+ }
+ if (e1 == e2)
+ return;
+
+ switch (e1->type) {
+ case E_OR:
+ expr_eliminate_dups2(e1->type, &e1, &e1);
+ // (FOO || BAR) && (!FOO && !BAR) -> n
+ tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
+ tmp2 = expr_copy(e2);
+ tmp = expr_extract_eq_and(&tmp1, &tmp2);
+ if (expr_is_yes(tmp1)) {
+ expr_free(e1);
+ e1 = expr_alloc_symbol(&symbol_no);
+ trans_count++;
+ }
+ expr_free(tmp2);
+ expr_free(tmp1);
+ expr_free(tmp);
+ break;
+ case E_AND:
+ expr_eliminate_dups2(e1->type, &e1, &e1);
+ // (FOO && BAR) || (!FOO || !BAR) -> y
+ tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
+ tmp2 = expr_copy(e2);
+ tmp = expr_extract_eq_or(&tmp1, &tmp2);
+ if (expr_is_no(tmp1)) {
+ expr_free(e1);
+ e1 = expr_alloc_symbol(&symbol_yes);
+ trans_count++;
+ }
+ expr_free(tmp2);
+ expr_free(tmp1);
+ expr_free(tmp);
+ break;
+ default:
+ ;
+ }
+#undef e1
+#undef e2
+}
+
+struct expr *expr_eliminate_dups(struct expr *e)
+{
+ int oldcount;
+ if (!e)
+ return e;
+
+ oldcount = trans_count;
+ while (1) {
+ trans_count = 0;
+ switch (e->type) {
+ case E_OR: case E_AND:
+ expr_eliminate_dups1(e->type, &e, &e);
+ expr_eliminate_dups2(e->type, &e, &e);
+ default:
+ ;
+ }
+ if (!trans_count)
+ break;
+ e = expr_eliminate_yn(e);
+ }
+ trans_count = oldcount;
+ return e;
+}
+
+struct expr *expr_transform(struct expr *e)
+{
+ struct expr *tmp;
+
+ if (!e)
+ return NULL;
+ switch (e->type) {
+ case E_EQUAL:
+ case E_UNEQUAL:
+ case E_SYMBOL:
+ case E_CHOICE:
+ break;
+ default:
+ e->left.expr = expr_transform(e->left.expr);
+ e->right.expr = expr_transform(e->right.expr);
+ }
+
+ switch (e->type) {
+ case E_EQUAL:
+ if (e->left.sym->type != S_BOOLEAN)
+ break;
+ if (e->right.sym == &symbol_no) {
+ e->type = E_NOT;
+ e->left.expr = expr_alloc_symbol(e->left.sym);
+ e->right.sym = NULL;
+ break;
+ }
+ if (e->right.sym == &symbol_mod) {
+ printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name);
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_no;
+ e->right.sym = NULL;
+ break;
+ }
+ if (e->right.sym == &symbol_yes) {
+ e->type = E_SYMBOL;
+ e->right.sym = NULL;
+ break;
+ }
+ break;
+ case E_UNEQUAL:
+ if (e->left.sym->type != S_BOOLEAN)
+ break;
+ if (e->right.sym == &symbol_no) {
+ e->type = E_SYMBOL;
+ e->right.sym = NULL;
+ break;
+ }
+ if (e->right.sym == &symbol_mod) {
+ printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name);
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_yes;
+ e->right.sym = NULL;
+ break;
+ }
+ if (e->right.sym == &symbol_yes) {
+ e->type = E_NOT;
+ e->left.expr = expr_alloc_symbol(e->left.sym);
+ e->right.sym = NULL;
+ break;
+ }
+ break;
+ case E_NOT:
+ switch (e->left.expr->type) {
+ case E_NOT:
+ // !!a -> a
+ tmp = e->left.expr->left.expr;
+ free(e->left.expr);
+ free(e);
+ e = tmp;
+ e = expr_transform(e);
+ break;
+ case E_EQUAL:
+ case E_UNEQUAL:
+ // !a='x' -> a!='x'
+ tmp = e->left.expr;
+ free(e);
+ e = tmp;
+ e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL;
+ break;
+ case E_OR:
+ // !(a || b) -> !a && !b
+ tmp = e->left.expr;
+ e->type = E_AND;
+ e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
+ tmp->type = E_NOT;
+ tmp->right.expr = NULL;
+ e = expr_transform(e);
+ break;
+ case E_AND:
+ // !(a && b) -> !a || !b
+ tmp = e->left.expr;
+ e->type = E_OR;
+ e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
+ tmp->type = E_NOT;
+ tmp->right.expr = NULL;
+ e = expr_transform(e);
+ break;
+ case E_SYMBOL:
+ if (e->left.expr->left.sym == &symbol_yes) {
+ // !'y' -> 'n'
+ tmp = e->left.expr;
+ free(e);
+ e = tmp;
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_no;
+ break;
+ }
+ if (e->left.expr->left.sym == &symbol_mod) {
+ // !'m' -> 'm'
+ tmp = e->left.expr;
+ free(e);
+ e = tmp;
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_mod;
+ break;
+ }
+ if (e->left.expr->left.sym == &symbol_no) {
+ // !'n' -> 'y'
+ tmp = e->left.expr;
+ free(e);
+ e = tmp;
+ e->type = E_SYMBOL;
+ e->left.sym = &symbol_yes;
+ break;
+ }
+ break;
+ default:
+ ;
+ }
+ break;
+ default:
+ ;
+ }
+ return e;
+}
+
+int expr_contains_symbol(struct expr *dep, struct symbol *sym)
+{
+ if (!dep)
+ return 0;
+
+ switch (dep->type) {
+ case E_AND:
+ case E_OR:
+ return expr_contains_symbol(dep->left.expr, sym) ||
+ expr_contains_symbol(dep->right.expr, sym);
+ case E_SYMBOL:
+ return dep->left.sym == sym;
+ case E_EQUAL:
+ case E_UNEQUAL:
+ return dep->left.sym == sym ||
+ dep->right.sym == sym;
+ case E_NOT:
+ return expr_contains_symbol(dep->left.expr, sym);
+ default:
+ ;
+ }
+ return 0;
+}
+
+bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
+{
+ if (!dep)
+ return false;
+
+ switch (dep->type) {
+ case E_AND:
+ return expr_depends_symbol(dep->left.expr, sym) ||
+ expr_depends_symbol(dep->right.expr, sym);
+ case E_SYMBOL:
+ return dep->left.sym == sym;
+ case E_EQUAL:
+ if (dep->left.sym == sym) {
+ if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod)
+ return true;
+ }
+ break;
+ case E_UNEQUAL:
+ if (dep->left.sym == sym) {
+ if (dep->right.sym == &symbol_no)
+ return true;
+ }
+ break;
+ default:
+ ;
+ }
+ return false;
+}
+
+struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
+{
+ struct expr *tmp = NULL;
+ expr_extract_eq(E_AND, &tmp, ep1, ep2);
+ if (tmp) {
+ *ep1 = expr_eliminate_yn(*ep1);
+ *ep2 = expr_eliminate_yn(*ep2);
+ }
+ return tmp;
+}
+
+struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
+{
+ struct expr *tmp = NULL;
+ expr_extract_eq(E_OR, &tmp, ep1, ep2);
+ if (tmp) {
+ *ep1 = expr_eliminate_yn(*ep1);
+ *ep2 = expr_eliminate_yn(*ep2);
+ }
+ return tmp;
+}
+
+void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
+{
+#define e1 (*ep1)
+#define e2 (*ep2)
+ if (e1->type == type) {
+ expr_extract_eq(type, ep, &e1->left.expr, &e2);
+ expr_extract_eq(type, ep, &e1->right.expr, &e2);
+ return;
+ }
+ if (e2->type == type) {
+ expr_extract_eq(type, ep, ep1, &e2->left.expr);
+ expr_extract_eq(type, ep, ep1, &e2->right.expr);
+ return;
+ }
+ if (expr_eq(e1, e2)) {
+ *ep = *ep ? expr_alloc_two(type, *ep, e1) : e1;
+ expr_free(e2);
+ if (type == E_AND) {
+ e1 = expr_alloc_symbol(&symbol_yes);
+ e2 = expr_alloc_symbol(&symbol_yes);
+ } else if (type == E_OR) {
+ e1 = expr_alloc_symbol(&symbol_no);
+ e2 = expr_alloc_symbol(&symbol_no);
+ }
+ }
+#undef e1
+#undef e2
+}
+
+struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym)
+{
+ struct expr *e1, *e2;
+
+ if (!e) {
+ e = expr_alloc_symbol(sym);
+ if (type == E_UNEQUAL)
+ e = expr_alloc_one(E_NOT, e);
+ return e;
+ }
+ switch (e->type) {
+ case E_AND:
+ e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
+ e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
+ if (sym == &symbol_yes)
+ e = expr_alloc_two(E_AND, e1, e2);
+ if (sym == &symbol_no)
+ e = expr_alloc_two(E_OR, e1, e2);
+ if (type == E_UNEQUAL)
+ e = expr_alloc_one(E_NOT, e);
+ return e;
+ case E_OR:
+ e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
+ e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
+ if (sym == &symbol_yes)
+ e = expr_alloc_two(E_OR, e1, e2);
+ if (sym == &symbol_no)
+ e = expr_alloc_two(E_AND, e1, e2);
+ if (type == E_UNEQUAL)
+ e = expr_alloc_one(E_NOT, e);
+ return e;
+ case E_NOT:
+ return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym);
+ case E_UNEQUAL:
+ case E_EQUAL:
+ if (type == E_EQUAL) {
+ if (sym == &symbol_yes)
+ return expr_copy(e);
+ if (sym == &symbol_mod)
+ return expr_alloc_symbol(&symbol_no);
+ if (sym == &symbol_no)
+ return expr_alloc_one(E_NOT, expr_copy(e));
+ } else {
+ if (sym == &symbol_yes)
+ return expr_alloc_one(E_NOT, expr_copy(e));
+ if (sym == &symbol_mod)
+ return expr_alloc_symbol(&symbol_yes);
+ if (sym == &symbol_no)
+ return expr_copy(e);
+ }
+ break;
+ case E_SYMBOL:
+ return expr_alloc_comp(type, e->left.sym, sym);
+ case E_CHOICE:
+ case E_RANGE:
+ case E_NONE:
+ /* panic */;
+ }
+ return NULL;
+}
+
+tristate expr_calc_value(struct expr *e)
+{
+ tristate val1, val2;
+ const char *str1, *str2;
+
+ if (!e)
+ return yes;
+
+ switch (e->type) {
+ case E_SYMBOL:
+ sym_calc_value(e->left.sym);
+ return e->left.sym->curr.tri;
+ case E_AND:
+ val1 = expr_calc_value(e->left.expr);
+ val2 = expr_calc_value(e->right.expr);
+ return E_AND(val1, val2);
+ case E_OR:
+ val1 = expr_calc_value(e->left.expr);
+ val2 = expr_calc_value(e->right.expr);
+ return E_OR(val1, val2);
+ case E_NOT:
+ val1 = expr_calc_value(e->left.expr);
+ return E_NOT(val1);
+ case E_EQUAL:
+ sym_calc_value(e->left.sym);
+ sym_calc_value(e->right.sym);
+ str1 = sym_get_string_value(e->left.sym);
+ str2 = sym_get_string_value(e->right.sym);
+ return !strcmp(str1, str2) ? yes : no;
+ case E_UNEQUAL:
+ sym_calc_value(e->left.sym);
+ sym_calc_value(e->right.sym);
+ str1 = sym_get_string_value(e->left.sym);
+ str2 = sym_get_string_value(e->right.sym);
+ return !strcmp(str1, str2) ? no : yes;
+ default:
+ printf("expr_calc_value: %d?\n", e->type);
+ return no;
+ }
+}
+
+int expr_compare_type(enum expr_type t1, enum expr_type t2)
+{
+#if 0
+ return 1;
+#else
+ if (t1 == t2)
+ return 0;
+ switch (t1) {
+ case E_EQUAL:
+ case E_UNEQUAL:
+ if (t2 == E_NOT)
+ return 1;
+ case E_NOT:
+ if (t2 == E_AND)
+ return 1;
+ case E_AND:
+ if (t2 == E_OR)
+ return 1;
+ case E_OR:
+ if (t2 == E_CHOICE)
+ return 1;
+ case E_CHOICE:
+ if (t2 == 0)
+ return 1;
+ default:
+ return -1;
+ }
+ printf("[%dgt%d?]", t1, t2);
+ return 0;
+#endif
+}
+
+void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)
+{
+ if (!e) {
+ fn(data, "y");
+ return;
+ }
+
+ if (expr_compare_type(prevtoken, e->type) > 0)
+ fn(data, "(");
+ switch (e->type) {
+ case E_SYMBOL:
+ if (e->left.sym->name)
+ fn(data, e->left.sym->name);
+ else
+ fn(data, "<choice>");
+ break;
+ case E_NOT:
+ fn(data, "!");
+ expr_print(e->left.expr, fn, data, E_NOT);
+ break;
+ case E_EQUAL:
+ fn(data, e->left.sym->name);
+ fn(data, "=");
+ fn(data, e->right.sym->name);
+ break;
+ case E_UNEQUAL:
+ fn(data, e->left.sym->name);
+ fn(data, "!=");
+ fn(data, e->right.sym->name);
+ break;
+ case E_OR:
+ expr_print(e->left.expr, fn, data, E_OR);
+ fn(data, " || ");
+ expr_print(e->right.expr, fn, data, E_OR);
+ break;
+ case E_AND:
+ expr_print(e->left.expr, fn, data, E_AND);
+ fn(data, " && ");
+ expr_print(e->right.expr, fn, data, E_AND);
+ break;
+ case E_CHOICE:
+ fn(data, e->right.sym->name);
+ if (e->left.expr) {
+ fn(data, " ^ ");
+ expr_print(e->left.expr, fn, data, E_CHOICE);
+ }
+ break;
+ case E_RANGE:
+ fn(data, "[");
+ fn(data, e->left.sym->name);
+ fn(data, " ");
+ fn(data, e->right.sym->name);
+ fn(data, "]");
+ break;
+ default:
+ {
+ char buf[32];
+ sprintf(buf, "<unknown type %d>", e->type);
+ fn(data, buf);
+ break;
+ }
+ }
+ if (expr_compare_type(prevtoken, e->type) > 0)
+ fn(data, ")");
+}
+
+static void expr_print_file_helper(void *data, const char *str)
+{
+ fwrite(str, strlen(str), 1, data);
+}
+
+void expr_fprint(struct expr *e, FILE *out)
+{
+ expr_print(e, expr_print_file_helper, out, E_NONE);
+}
+
+static void expr_print_gstr_helper(void *data, const char *str)
+{
+ str_append((struct gstr*)data, str);
+}
+
+void expr_gstr_print(struct expr *e, struct gstr *gs)
+{
+ expr_print(e, expr_print_gstr_helper, gs, E_NONE);
+}
diff --git a/misc/buildroot/package/config/expr.h b/misc/buildroot/package/config/expr.h
new file mode 100644
index 000000000..7d39ff43e
--- /dev/null
+++ b/misc/buildroot/package/config/expr.h
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#ifndef EXPR_H
+#define EXPR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#ifndef __cplusplus
+#include <stdbool.h>
+#endif
+
+struct file {
+ struct file *next;
+ struct file *parent;
+ char *name;
+ int lineno;
+ int flags;
+};
+
+#define FILE_BUSY 0x0001
+#define FILE_SCANNED 0x0002
+#define FILE_PRINTED 0x0004
+
+typedef enum tristate {
+ no, mod, yes
+} tristate;
+
+enum expr_type {
+ E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_CHOICE, E_SYMBOL, E_RANGE
+};
+
+union expr_data {
+ struct expr *expr;
+ struct symbol *sym;
+};
+
+struct expr {
+ enum expr_type type;
+ union expr_data left, right;
+};
+
+#define E_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2))
+#define E_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2))
+#define E_NOT(dep) (2-(dep))
+
+struct expr_value {
+ struct expr *expr;
+ tristate tri;
+};
+
+struct symbol_value {
+ void *val;
+ tristate tri;
+};
+
+enum symbol_type {
+ S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
+};
+
+struct symbol {
+ struct symbol *next;
+ char *name;
+ char *help;
+ enum symbol_type type;
+ struct symbol_value curr, user;
+ tristate visible;
+ int flags;
+ struct property *prop;
+ struct expr *dep, *dep2;
+ struct expr_value rev_dep;
+};
+
+#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
+
+#define SYMBOL_YES 0x0001
+#define SYMBOL_MOD 0x0002
+#define SYMBOL_NO 0x0004
+#define SYMBOL_CONST 0x0007
+#define SYMBOL_CHECK 0x0008
+#define SYMBOL_CHOICE 0x0010
+#define SYMBOL_CHOICEVAL 0x0020
+#define SYMBOL_PRINTED 0x0040
+#define SYMBOL_VALID 0x0080
+#define SYMBOL_OPTIONAL 0x0100
+#define SYMBOL_WRITE 0x0200
+#define SYMBOL_CHANGED 0x0400
+#define SYMBOL_NEW 0x0800
+#define SYMBOL_AUTO 0x1000
+#define SYMBOL_CHECKED 0x2000
+#define SYMBOL_CHECK_DONE 0x4000
+#define SYMBOL_WARNED 0x8000
+
+#define SYMBOL_MAXLENGTH 256
+#define SYMBOL_HASHSIZE 257
+#define SYMBOL_HASHMASK 0xff
+
+enum prop_type {
+ P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_RANGE
+};
+
+struct property {
+ struct property *next;
+ struct symbol *sym;
+ enum prop_type type;
+ const char *text;
+ struct expr_value visible;
+ struct expr *expr;
+ struct menu *menu;
+ struct file *file;
+ int lineno;
+};
+
+#define for_all_properties(sym, st, tok) \
+ for (st = sym->prop; st; st = st->next) \
+ if (st->type == (tok))
+#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT)
+#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE)
+#define for_all_prompts(sym, st) \
+ for (st = sym->prop; st; st = st->next) \
+ if (st->text)
+
+struct menu {
+ struct menu *next;
+ struct menu *parent;
+ struct menu *list;
+ struct symbol *sym;
+ struct property *prompt;
+ struct expr *dep;
+ unsigned int flags;
+ //char *help;
+ struct file *file;
+ int lineno;
+ void *data;
+};
+
+#define MENU_CHANGED 0x0001
+#define MENU_ROOT 0x0002
+
+#ifndef SWIG
+
+extern struct file *file_list;
+extern struct file *current_file;
+struct file *lookup_file(const char *name);
+
+extern struct symbol symbol_yes, symbol_no, symbol_mod;
+extern struct symbol *modules_sym;
+extern int cdebug;
+struct expr *expr_alloc_symbol(struct symbol *sym);
+struct expr *expr_alloc_one(enum expr_type type, struct expr *ce);
+struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2);
+struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
+struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
+struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
+struct expr *expr_copy(struct expr *org);
+void expr_free(struct expr *e);
+int expr_eq(struct expr *e1, struct expr *e2);
+void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
+tristate expr_calc_value(struct expr *e);
+struct expr *expr_eliminate_yn(struct expr *e);
+struct expr *expr_trans_bool(struct expr *e);
+struct expr *expr_eliminate_dups(struct expr *e);
+struct expr *expr_transform(struct expr *e);
+int expr_contains_symbol(struct expr *dep, struct symbol *sym);
+bool expr_depends_symbol(struct expr *dep, struct symbol *sym);
+struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
+struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
+void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
+struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
+
+void expr_fprint(struct expr *e, FILE *out);
+struct gstr; /* forward */
+void expr_gstr_print(struct expr *e, struct gstr *gs);
+
+static inline int expr_is_yes(struct expr *e)
+{
+ return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes);
+}
+
+static inline int expr_is_no(struct expr *e)
+{
+ return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EXPR_H */
diff --git a/misc/buildroot/package/config/lex.zconf.c_shipped b/misc/buildroot/package/config/lex.zconf.c_shipped
new file mode 100644
index 000000000..22dda11f7
--- /dev/null
+++ b/misc/buildroot/package/config/lex.zconf.c_shipped
@@ -0,0 +1,3688 @@
+
+#line 3 "lex.zconf.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 31
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE zconfrestart(zconfin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+extern int zconfleng;
+
+extern FILE *zconfin, *zconfout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up zconftext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef unsigned int yy_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via zconfrestart()), so that the user can continue scanning by
+ * just pointing zconfin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* yy_hold_char holds the character lost when zconftext is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int zconfleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow zconfwrap()'s to do buffer switches
+ * instead of setting up a fresh zconfin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void zconfrestart (FILE *input_file );
+void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size );
+void zconf_delete_buffer (YY_BUFFER_STATE b );
+void zconf_flush_buffer (YY_BUFFER_STATE b );
+void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer );
+void zconfpop_buffer_state (void );
+
+static void zconfensure_buffer_stack (void );
+static void zconf_load_buffer_state (void );
+static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
+
+#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
+
+void *zconfalloc (yy_size_t );
+void *zconfrealloc (void *,yy_size_t );
+void zconffree (void * );
+
+#define yy_new_buffer zconf_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ zconfensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ zconfensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* Begin user sect3 */
+
+#define zconfwrap(n) 1
+#define YY_SKIP_YYWRAP
+
+typedef unsigned char YY_CHAR;
+
+FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int zconflineno;
+
+int zconflineno = 1;
+
+extern char *zconftext;
+#define yytext_ptr zconftext
+static yyconst flex_int16_t yy_nxt[][38] =
+ {
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
+ },
+
+ {
+ 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12
+ },
+
+ {
+ 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12
+ },
+
+ {
+ 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 18, 16, 16, 18, 18, 19, 20,
+ 21, 22, 18, 18, 23, 24, 18, 25, 18, 26,
+ 27, 18, 28, 29, 30, 18, 18, 16
+ },
+
+ {
+ 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 18, 16, 16, 18, 18, 19, 20,
+ 21, 22, 18, 18, 23, 24, 18, 25, 18, 26,
+ 27, 18, 28, 29, 30, 18, 18, 16
+
+ },
+
+ {
+ 11, 31, 32, 33, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31
+ },
+
+ {
+ 11, 31, 32, 33, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31
+ },
+
+ {
+ 11, 34, 34, 35, 34, 36, 34, 34, 36, 34,
+ 34, 34, 34, 34, 34, 37, 34, 34, 34, 34,
+
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34
+ },
+
+ {
+ 11, 34, 34, 35, 34, 36, 34, 34, 36, 34,
+ 34, 34, 34, 34, 34, 37, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34
+ },
+
+ {
+ 11, 38, 38, 39, 40, 41, 42, 43, 41, 44,
+ 45, 46, 47, 47, 48, 49, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 50, 47, 47, 47, 51,
+ 47, 47, 47, 47, 47, 47, 47, 52
+
+ },
+
+ {
+ 11, 38, 38, 39, 40, 41, 42, 43, 41, 44,
+ 45, 46, 47, 47, 48, 49, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 50, 47, 47, 47, 51,
+ 47, 47, 47, 47, 47, 47, 47, 52
+ },
+
+ {
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11
+ },
+
+ {
+ 11, -12, -12, -12, -12, -12, -12, -12, -12, -12,
+ -12, -12, -12, -12, -12, -12, -12, -12, -12, -12,
+
+ -12, -12, -12, -12, -12, -12, -12, -12, -12, -12,
+ -12, -12, -12, -12, -12, -12, -12, -12
+ },
+
+ {
+ 11, -13, 53, 54, -13, -13, 55, -13, -13, -13,
+ -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
+ -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
+ -13, -13, -13, -13, -13, -13, -13, -13
+ },
+
+ {
+ 11, -14, -14, -14, -14, -14, -14, -14, -14, -14,
+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
+ -14, -14, -14, -14, -14, -14, -14, -14
+
+ },
+
+ {
+ 11, 56, 56, 57, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56
+ },
+
+ {
+ 11, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16
+ },
+
+ {
+ 11, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17
+ },
+
+ {
+ 11, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, 58, -18, -18, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -18
+ },
+
+ {
+ 11, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, 58, -19, -19, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 59,
+ 58, 58, 58, 58, 58, 58, 58, -19
+
+ },
+
+ {
+ 11, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, 58, -20, -20, 58, 58, 58, 58,
+ 58, 58, 58, 58, 60, 58, 58, 58, 58, 61,
+ 58, 58, 58, 58, 58, 58, 58, -20
+ },
+
+ {
+ 11, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, 58, -21, -21, 58, 58, 58, 58,
+ 58, 62, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -21
+ },
+
+ {
+ 11, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, 58, -22, -22, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 63, 58,
+ 58, 58, 58, 58, 58, 58, 58, -22
+ },
+
+ {
+ 11, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, 58, -23, -23, 58, 58, 58, 58,
+ 58, 64, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -23
+ },
+
+ {
+ 11, -24, -24, -24, -24, -24, -24, -24, -24, -24,
+ -24, -24, -24, 58, -24, -24, 58, 58, 58, 58,
+ 58, 58, 65, 58, 58, 58, 58, 58, 66, 58,
+ 58, 58, 58, 58, 58, 58, 58, -24
+
+ },
+
+ {
+ 11, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, 58, -25, -25, 58, 67, 58, 58,
+ 58, 68, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -25
+ },
+
+ {
+ 11, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, 58, -26, -26, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 69, 58, 58, 58, 58, 58, 58, -26
+ },
+
+ {
+ 11, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, 58, -27, -27, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 70, 58, 58, 58, 58, -27
+ },
+
+ {
+ 11, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, 58, -28, -28, 58, 71, 58, 58,
+ 58, 72, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -28
+ },
+
+ {
+ 11, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, 58, -29, -29, 58, 58, 58, 58,
+ 58, 73, 58, 58, 58, 58, 58, 58, 58, 74,
+ 58, 58, 58, 58, 75, 58, 58, -29
+
+ },
+
+ {
+ 11, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, 58, -30, -30, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 76, 58, 58, 58, 58, -30
+ },
+
+ {
+ 11, 77, 77, -31, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77
+ },
+
+ {
+ 11, -32, 78, 79, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32
+ },
+
+ {
+ 11, 80, -33, -33, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80
+ },
+
+ {
+ 11, 81, 81, 82, 81, -34, 81, 81, -34, 81,
+ 81, 81, 81, 81, 81, -34, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81
+
+ },
+
+ {
+ 11, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35
+ },
+
+ {
+ 11, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36
+ },
+
+ {
+ 11, 83, 83, 84, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83
+ },
+
+ {
+ 11, -38, -38, -38, -38, -38, -38, -38, -38, -38,
+ -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
+ -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
+ -38, -38, -38, -38, -38, -38, -38, -38
+ },
+
+ {
+ 11, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39
+
+ },
+
+ {
+ 11, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, 85, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40
+ },
+
+ {
+ 11, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41
+ },
+
+ {
+ 11, 86, 86, -42, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86
+ },
+
+ {
+ 11, -43, -43, -43, -43, -43, -43, 87, -43, -43,
+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
+ -43, -43, -43, -43, -43, -43, -43, -43
+ },
+
+ {
+ 11, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44
+
+ },
+
+ {
+ 11, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45
+ },
+
+ {
+ 11, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, 88, 89, 89, -46, -46, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -46
+ },
+
+ {
+ 11, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, 89, 89, 89, -47, -47, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -47
+ },
+
+ {
+ 11, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48
+ },
+
+ {
+ 11, -49, -49, 90, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49
+
+ },
+
+ {
+ 11, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, 89, 89, 89, -50, -50, 89, 89, 89, 89,
+ 89, 89, 91, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -50
+ },
+
+ {
+ 11, -51, -51, -51, -51, -51, -51, -51, -51, -51,
+ -51, 89, 89, 89, -51, -51, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 92, 89,
+ 89, 89, 89, 89, 89, 89, 89, -51
+ },
+
+ {
+ 11, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, 93
+ },
+
+ {
+ 11, -53, 53, 54, -53, -53, 55, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53
+ },
+
+ {
+ 11, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
+ -54, -54, -54, -54, -54, -54, -54, -54
+
+ },
+
+ {
+ 11, 56, 56, 57, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56
+ },
+
+ {
+ 11, 56, 56, 57, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56
+ },
+
+ {
+ 11, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+
+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
+ -57, -57, -57, -57, -57, -57, -57, -57
+ },
+
+ {
+ 11, -58, -58, -58, -58, -58, -58, -58, -58, -58,
+ -58, -58, -58, 58, -58, -58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -58
+ },
+
+ {
+ 11, -59, -59, -59, -59, -59, -59, -59, -59, -59,
+ -59, -59, -59, 58, -59, -59, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 94,
+ 58, 58, 58, 58, 58, 58, 58, -59
+
+ },
+
+ {
+ 11, -60, -60, -60, -60, -60, -60, -60, -60, -60,
+ -60, -60, -60, 58, -60, -60, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 95,
+ 58, 58, 58, 58, 58, 58, 58, -60
+ },
+
+ {
+ 11, -61, -61, -61, -61, -61, -61, -61, -61, -61,
+ -61, -61, -61, 58, -61, -61, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 96, 97, 58,
+ 58, 58, 58, 58, 58, 58, 58, -61
+ },
+
+ {
+ 11, -62, -62, -62, -62, -62, -62, -62, -62, -62,
+ -62, -62, -62, 58, -62, -62, 58, 58, 58, 58,
+
+ 58, 58, 98, 58, 58, 58, 58, 58, 58, 58,
+ 99, 58, 58, 58, 58, 58, 58, -62
+ },
+
+ {
+ 11, -63, -63, -63, -63, -63, -63, -63, -63, -63,
+ -63, -63, -63, 58, -63, -63, 58, 100, 58, 58,
+ 101, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -63
+ },
+
+ {
+ 11, -64, -64, -64, -64, -64, -64, -64, -64, -64,
+ -64, -64, -64, 58, -64, -64, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 102, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 103, -64
+
+ },
+
+ {
+ 11, -65, -65, -65, -65, -65, -65, -65, -65, -65,
+ -65, -65, -65, 58, -65, -65, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -65
+ },
+
+ {
+ 11, -66, -66, -66, -66, -66, -66, -66, -66, -66,
+ -66, -66, -66, 58, -66, -66, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 104, 58, 58, -66
+ },
+
+ {
+ 11, -67, -67, -67, -67, -67, -67, -67, -67, -67,
+ -67, -67, -67, 58, -67, -67, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 105, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -67
+ },
+
+ {
+ 11, -68, -68, -68, -68, -68, -68, -68, -68, -68,
+ -68, -68, -68, 58, -68, -68, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 106, 58,
+ 58, 58, 58, 58, 58, 58, 58, -68
+ },
+
+ {
+ 11, -69, -69, -69, -69, -69, -69, -69, -69, -69,
+ -69, -69, -69, 58, -69, -69, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 107, 58, 58, -69
+
+ },
+
+ {
+ 11, -70, -70, -70, -70, -70, -70, -70, -70, -70,
+ -70, -70, -70, 58, -70, -70, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 108,
+ 58, 58, 58, 58, 58, 58, 58, -70
+ },
+
+ {
+ 11, -71, -71, -71, -71, -71, -71, -71, -71, -71,
+ -71, -71, -71, 58, -71, -71, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 109, 58,
+ 58, 58, 58, 58, 58, 58, 58, -71
+ },
+
+ {
+ 11, -72, -72, -72, -72, -72, -72, -72, -72, -72,
+ -72, -72, -72, 58, -72, -72, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 110, 58, 58, 58, 58, 58, -72
+ },
+
+ {
+ 11, -73, -73, -73, -73, -73, -73, -73, -73, -73,
+ -73, -73, -73, 58, -73, -73, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 111, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -73
+ },
+
+ {
+ 11, -74, -74, -74, -74, -74, -74, -74, -74, -74,
+ -74, -74, -74, 58, -74, -74, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 112, 58, -74
+
+ },
+
+ {
+ 11, -75, -75, -75, -75, -75, -75, -75, -75, -75,
+ -75, -75, -75, 58, -75, -75, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 113, 58, 58, 58, 58, -75
+ },
+
+ {
+ 11, -76, -76, -76, -76, -76, -76, -76, -76, -76,
+ -76, -76, -76, 58, -76, -76, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 114, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -76
+ },
+
+ {
+ 11, 77, 77, -77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77
+ },
+
+ {
+ 11, -78, 78, 79, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78, -78, -78,
+ -78, -78, -78, -78, -78, -78, -78, -78
+ },
+
+ {
+ 11, 80, -79, -79, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80
+
+ },
+
+ {
+ 11, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
+ -80, -80, -80, -80, -80, -80, -80, -80
+ },
+
+ {
+ 11, 81, 81, 82, 81, -81, 81, 81, -81, 81,
+ 81, 81, 81, 81, 81, -81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 81, 81, 81, 81, 81, 81, 81
+ },
+
+ {
+ 11, -82, -82, -82, -82, -82, -82, -82, -82, -82,
+ -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
+
+ -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
+ -82, -82, -82, -82, -82, -82, -82, -82
+ },
+
+ {
+ 11, -83, -83, 84, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83,
+ -83, -83, -83, -83, -83, -83, -83, -83
+ },
+
+ {
+ 11, -84, -84, -84, -84, -84, -84, -84, -84, -84,
+ -84, -84, -84, -84, -84, -84, -84, -84, -84, -84,
+ -84, -84, -84, -84, -84, -84, -84, -84, -84, -84,
+ -84, -84, -84, -84, -84, -84, -84, -84
+
+ },
+
+ {
+ 11, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, -85, -85, -85,
+ -85, -85, -85, -85, -85, -85, -85, -85
+ },
+
+ {
+ 11, 86, 86, -86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 86, 86, 86, 86, 86, 86, 86
+ },
+
+ {
+ 11, -87, -87, -87, -87, -87, -87, -87, -87, -87,
+ -87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
+
+ -87, -87, -87, -87, -87, -87, -87, -87, -87, -87,
+ -87, -87, -87, -87, -87, -87, -87, -87
+ },
+
+ {
+ 11, -88, -88, -88, -88, -88, -88, -88, -88, -88,
+ -88, 115, 89, 89, -88, -88, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -88
+ },
+
+ {
+ 11, -89, -89, -89, -89, -89, -89, -89, -89, -89,
+ -89, 89, 89, 89, -89, -89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -89
+
+ },
+
+ {
+ 11, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
+ -90, -90, -90, -90, -90, -90, -90, -90
+ },
+
+ {
+ 11, -91, -91, -91, -91, -91, -91, -91, -91, -91,
+ -91, 89, 89, 89, -91, -91, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -91
+ },
+
+ {
+ 11, -92, -92, -92, -92, -92, -92, -92, -92, -92,
+ -92, 89, 89, 89, -92, -92, 89, 89, 89, 89,
+
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -92
+ },
+
+ {
+ 11, -93, -93, -93, -93, -93, -93, -93, -93, -93,
+ -93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
+ -93, -93, -93, -93, -93, -93, -93, -93, -93, -93,
+ -93, -93, -93, -93, -93, -93, -93, -93
+ },
+
+ {
+ 11, -94, -94, -94, -94, -94, -94, -94, -94, -94,
+ -94, -94, -94, 58, -94, -94, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 116, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -94
+
+ },
+
+ {
+ 11, -95, -95, -95, -95, -95, -95, -95, -95, -95,
+ -95, -95, -95, 58, -95, -95, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 117, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -95
+ },
+
+ {
+ 11, -96, -96, -96, -96, -96, -96, -96, -96, -96,
+ -96, -96, -96, 58, -96, -96, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 118, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -96
+ },
+
+ {
+ 11, -97, -97, -97, -97, -97, -97, -97, -97, -97,
+ -97, -97, -97, 58, -97, -97, 58, 58, 58, 58,
+
+ 58, 58, 119, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -97
+ },
+
+ {
+ 11, -98, -98, -98, -98, -98, -98, -98, -98, -98,
+ -98, -98, -98, 58, -98, -98, 120, 121, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -98
+ },
+
+ {
+ 11, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, 58, -99, -99, 58, 58, 58, 58,
+ 58, 122, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -99
+
+ },
+
+ {
+ 11, -100, -100, -100, -100, -100, -100, -100, -100, -100,
+ -100, -100, -100, 58, -100, -100, 58, 58, 123, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -100
+ },
+
+ {
+ 11, -101, -101, -101, -101, -101, -101, -101, -101, -101,
+ -101, -101, -101, 58, -101, -101, 58, 58, 58, 124,
+ 58, 58, 58, 58, 58, 125, 58, 126, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -101
+ },
+
+ {
+ 11, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, 58, -102, -102, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 127, 58, 58, 58, 58, 58, 58, -102
+ },
+
+ {
+ 11, -103, -103, -103, -103, -103, -103, -103, -103, -103,
+ -103, -103, -103, 58, -103, -103, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -103
+ },
+
+ {
+ 11, -104, -104, -104, -104, -104, -104, -104, -104, -104,
+ -104, -104, -104, 58, -104, -104, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -104
+
+ },
+
+ {
+ 11, -105, -105, -105, -105, -105, -105, -105, -105, -105,
+ -105, -105, -105, 58, -105, -105, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 128, 58,
+ 58, 58, 58, 58, 58, 58, 58, -105
+ },
+
+ {
+ 11, -106, -106, -106, -106, -106, -106, -106, -106, -106,
+ -106, -106, -106, 58, -106, -106, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 129, 58, -106
+ },
+
+ {
+ 11, -107, -107, -107, -107, -107, -107, -107, -107, -107,
+ -107, -107, -107, 58, -107, -107, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 130, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -107
+ },
+
+ {
+ 11, -108, -108, -108, -108, -108, -108, -108, -108, -108,
+ -108, -108, -108, 58, -108, -108, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 131, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -108
+ },
+
+ {
+ 11, -109, -109, -109, -109, -109, -109, -109, -109, -109,
+ -109, -109, -109, 58, -109, -109, 58, 58, 58, 58,
+ 58, 58, 58, 132, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -109
+
+ },
+
+ {
+ 11, -110, -110, -110, -110, -110, -110, -110, -110, -110,
+ -110, -110, -110, 58, -110, -110, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 133, 58, -110
+ },
+
+ {
+ 11, -111, -111, -111, -111, -111, -111, -111, -111, -111,
+ -111, -111, -111, 58, -111, -111, 58, 58, 58, 58,
+ 58, 134, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -111
+ },
+
+ {
+ 11, -112, -112, -112, -112, -112, -112, -112, -112, -112,
+ -112, -112, -112, 58, -112, -112, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 135, 58, 58, 58, 58, -112
+ },
+
+ {
+ 11, -113, -113, -113, -113, -113, -113, -113, -113, -113,
+ -113, -113, -113, 58, -113, -113, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 136, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -113
+ },
+
+ {
+ 11, -114, -114, -114, -114, -114, -114, -114, -114, -114,
+ -114, -114, -114, 58, -114, -114, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 137, 58, 58, 58, -114
+
+ },
+
+ {
+ 11, -115, -115, -115, -115, -115, -115, -115, -115, -115,
+ -115, 89, 89, 89, -115, -115, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 89, -115
+ },
+
+ {
+ 11, -116, -116, -116, -116, -116, -116, -116, -116, -116,
+ -116, -116, -116, 58, -116, -116, 58, 58, 58, 58,
+ 58, 138, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -116
+ },
+
+ {
+ 11, -117, -117, -117, -117, -117, -117, -117, -117, -117,
+ -117, -117, -117, 58, -117, -117, 58, 58, 58, 139,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -117
+ },
+
+ {
+ 11, -118, -118, -118, -118, -118, -118, -118, -118, -118,
+ -118, -118, -118, 58, -118, -118, 58, 58, 58, 58,
+ 58, 140, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -118
+ },
+
+ {
+ 11, -119, -119, -119, -119, -119, -119, -119, -119, -119,
+ -119, -119, -119, 58, -119, -119, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 141, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -119
+
+ },
+
+ {
+ 11, -120, -120, -120, -120, -120, -120, -120, -120, -120,
+ -120, -120, -120, 58, -120, -120, 58, 58, 142, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 143, 58, 58, -120
+ },
+
+ {
+ 11, -121, -121, -121, -121, -121, -121, -121, -121, -121,
+ -121, -121, -121, 58, -121, -121, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 144, 58, -121
+ },
+
+ {
+ 11, -122, -122, -122, -122, -122, -122, -122, -122, -122,
+ -122, -122, -122, 58, -122, -122, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 145, 58,
+ 58, 58, 58, 58, 58, 58, 58, -122
+ },
+
+ {
+ 11, -123, -123, -123, -123, -123, -123, -123, -123, -123,
+ -123, -123, -123, 58, -123, -123, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 146, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -123
+ },
+
+ {
+ 11, -124, -124, -124, -124, -124, -124, -124, -124, -124,
+ -124, -124, -124, 58, -124, -124, 58, 58, 58, 58,
+ 58, 58, 58, 58, 147, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -124
+
+ },
+
+ {
+ 11, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+ -125, -125, -125, 58, -125, -125, 58, 58, 58, 58,
+ 58, 58, 148, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -125
+ },
+
+ {
+ 11, -126, -126, -126, -126, -126, -126, -126, -126, -126,
+ -126, -126, -126, 58, -126, -126, 58, 58, 58, 58,
+ 58, 149, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -126
+ },
+
+ {
+ 11, -127, -127, -127, -127, -127, -127, -127, -127, -127,
+ -127, -127, -127, 58, -127, -127, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -127
+ },
+
+ {
+ 11, -128, -128, -128, -128, -128, -128, -128, -128, -128,
+ -128, -128, -128, 58, -128, -128, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 150, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -128
+ },
+
+ {
+ 11, -129, -129, -129, -129, -129, -129, -129, -129, -129,
+ -129, -129, -129, 58, -129, -129, 58, 58, 58, 151,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -129
+
+ },
+
+ {
+ 11, -130, -130, -130, -130, -130, -130, -130, -130, -130,
+ -130, -130, -130, 58, -130, -130, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 152,
+ 58, 58, 58, 58, 58, 58, 58, -130
+ },
+
+ {
+ 11, -131, -131, -131, -131, -131, -131, -131, -131, -131,
+ -131, -131, -131, 58, -131, -131, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 153, 58, 58, 58, 58, 58, 58, -131
+ },
+
+ {
+ 11, -132, -132, -132, -132, -132, -132, -132, -132, -132,
+ -132, -132, -132, 58, -132, -132, 58, 58, 58, 58,
+
+ 58, 154, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -132
+ },
+
+ {
+ 11, -133, -133, -133, -133, -133, -133, -133, -133, -133,
+ -133, -133, -133, 58, -133, -133, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 155, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -133
+ },
+
+ {
+ 11, -134, -134, -134, -134, -134, -134, -134, -134, -134,
+ -134, -134, -134, 58, -134, -134, 58, 58, 58, 156,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -134
+
+ },
+
+ {
+ 11, -135, -135, -135, -135, -135, -135, -135, -135, -135,
+ -135, -135, -135, 58, -135, -135, 58, 58, 58, 157,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -135
+ },
+
+ {
+ 11, -136, -136, -136, -136, -136, -136, -136, -136, -136,
+ -136, -136, -136, 58, -136, -136, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 158, 58,
+ 58, 58, 58, 58, 58, 58, 58, -136
+ },
+
+ {
+ 11, -137, -137, -137, -137, -137, -137, -137, -137, -137,
+ -137, -137, -137, 58, -137, -137, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 159, 58, 58, -137
+ },
+
+ {
+ 11, -138, -138, -138, -138, -138, -138, -138, -138, -138,
+ -138, -138, -138, 58, -138, -138, 58, 160, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -138
+ },
+
+ {
+ 11, -139, -139, -139, -139, -139, -139, -139, -139, -139,
+ -139, -139, -139, 58, -139, -139, 58, 58, 58, 58,
+ 58, 161, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -139
+
+ },
+
+ {
+ 11, -140, -140, -140, -140, -140, -140, -140, -140, -140,
+ -140, -140, -140, 58, -140, -140, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 162, 58,
+ 58, 58, 58, 58, 58, 58, 58, -140
+ },
+
+ {
+ 11, -141, -141, -141, -141, -141, -141, -141, -141, -141,
+ -141, -141, -141, 58, -141, -141, 58, 58, 58, 58,
+ 58, 58, 58, 163, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -141
+ },
+
+ {
+ 11, -142, -142, -142, -142, -142, -142, -142, -142, -142,
+ -142, -142, -142, 58, -142, -142, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 164,
+ 58, 58, 58, 58, 58, 58, 58, -142
+ },
+
+ {
+ 11, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, 58, -143, -143, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 165, 58, 58, 58, 58, -143
+ },
+
+ {
+ 11, -144, -144, -144, -144, -144, -144, -144, -144, -144,
+ -144, -144, -144, 58, -144, -144, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 166, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -144
+
+ },
+
+ {
+ 11, -145, -145, -145, -145, -145, -145, -145, -145, -145,
+ -145, -145, -145, 58, -145, -145, 58, 58, 58, 58,
+ 167, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -145
+ },
+
+ {
+ 11, -146, -146, -146, -146, -146, -146, -146, -146, -146,
+ -146, -146, -146, 58, -146, -146, 58, 58, 58, 58,
+ 58, 168, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -146
+ },
+
+ {
+ 11, -147, -147, -147, -147, -147, -147, -147, -147, -147,
+ -147, -147, -147, 58, -147, -147, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 169,
+ 58, 58, 58, 58, 58, 58, 58, -147
+ },
+
+ {
+ 11, -148, -148, -148, -148, -148, -148, -148, -148, -148,
+ -148, -148, -148, 58, -148, -148, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -148
+ },
+
+ {
+ 11, -149, -149, -149, -149, -149, -149, -149, -149, -149,
+ -149, -149, -149, 58, -149, -149, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 170, 58,
+ 58, 58, 58, 58, 58, 58, 58, -149
+
+ },
+
+ {
+ 11, -150, -150, -150, -150, -150, -150, -150, -150, -150,
+ -150, -150, -150, 58, -150, -150, 58, 58, 58, 58,
+ 58, 171, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -150
+ },
+
+ {
+ 11, -151, -151, -151, -151, -151, -151, -151, -151, -151,
+ -151, -151, -151, 58, -151, -151, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 172,
+ 58, 58, 58, 58, 58, 58, 58, -151
+ },
+
+ {
+ 11, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+ -152, -152, -152, 58, -152, -152, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 173, 58,
+ 58, 58, 58, 58, 58, 58, 58, -152
+ },
+
+ {
+ 11, -153, -153, -153, -153, -153, -153, -153, -153, -153,
+ -153, -153, -153, 58, -153, -153, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 174, 58, 58, -153
+ },
+
+ {
+ 11, -154, -154, -154, -154, -154, -154, -154, -154, -154,
+ -154, -154, -154, 58, -154, -154, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -154
+
+ },
+
+ {
+ 11, -155, -155, -155, -155, -155, -155, -155, -155, -155,
+ -155, -155, -155, 58, -155, -155, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 175, 58, 58, 58, 58, -155
+ },
+
+ {
+ 11, -156, -156, -156, -156, -156, -156, -156, -156, -156,
+ -156, -156, -156, 58, -156, -156, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 176, 58, 58, -156
+ },
+
+ {
+ 11, -157, -157, -157, -157, -157, -157, -157, -157, -157,
+ -157, -157, -157, 58, -157, -157, 58, 58, 58, 58,
+
+ 58, 177, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -157
+ },
+
+ {
+ 11, -158, -158, -158, -158, -158, -158, -158, -158, -158,
+ -158, -158, -158, 58, -158, -158, 58, 58, 58, 58,
+ 58, 58, 58, 178, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -158
+ },
+
+ {
+ 11, -159, -159, -159, -159, -159, -159, -159, -159, -159,
+ -159, -159, -159, 58, -159, -159, 58, 179, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -159
+
+ },
+
+ {
+ 11, -160, -160, -160, -160, -160, -160, -160, -160, -160,
+ -160, -160, -160, 58, -160, -160, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 180, 58,
+ 58, 58, 58, 58, 58, 58, 58, -160
+ },
+
+ {
+ 11, -161, -161, -161, -161, -161, -161, -161, -161, -161,
+ -161, -161, -161, 58, -161, -161, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -161
+ },
+
+ {
+ 11, -162, -162, -162, -162, -162, -162, -162, -162, -162,
+ -162, -162, -162, 58, -162, -162, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 181, 58, 58, -162
+ },
+
+ {
+ 11, -163, -163, -163, -163, -163, -163, -163, -163, -163,
+ -163, -163, -163, 58, -163, -163, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -163
+ },
+
+ {
+ 11, -164, -164, -164, -164, -164, -164, -164, -164, -164,
+ -164, -164, -164, 58, -164, -164, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 182,
+ 58, 58, 58, 58, 58, 58, 58, -164
+
+ },
+
+ {
+ 11, -165, -165, -165, -165, -165, -165, -165, -165, -165,
+ -165, -165, -165, 58, -165, -165, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 183, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -165
+ },
+
+ {
+ 11, -166, -166, -166, -166, -166, -166, -166, -166, -166,
+ -166, -166, -166, 58, -166, -166, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 184, 58, 58, -166
+ },
+
+ {
+ 11, -167, -167, -167, -167, -167, -167, -167, -167, -167,
+ -167, -167, -167, 58, -167, -167, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 185, 58, 58, 58, -167
+ },
+
+ {
+ 11, -168, -168, -168, -168, -168, -168, -168, -168, -168,
+ -168, -168, -168, 58, -168, -168, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -168
+ },
+
+ {
+ 11, -169, -169, -169, -169, -169, -169, -169, -169, -169,
+ -169, -169, -169, 58, -169, -169, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 186, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -169
+
+ },
+
+ {
+ 11, -170, -170, -170, -170, -170, -170, -170, -170, -170,
+ -170, -170, -170, 58, -170, -170, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 187, 58, -170
+ },
+
+ {
+ 11, -171, -171, -171, -171, -171, -171, -171, -171, -171,
+ -171, -171, -171, 58, -171, -171, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 188, 58,
+ 58, 58, 58, 58, 58, 58, 58, -171
+ },
+
+ {
+ 11, -172, -172, -172, -172, -172, -172, -172, -172, -172,
+ -172, -172, -172, 58, -172, -172, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 189, 58,
+ 58, 58, 58, 58, 58, 58, 58, -172
+ },
+
+ {
+ 11, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+ -173, -173, -173, 58, -173, -173, 58, 190, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -173
+ },
+
+ {
+ 11, -174, -174, -174, -174, -174, -174, -174, -174, -174,
+ -174, -174, -174, 58, -174, -174, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -174
+
+ },
+
+ {
+ 11, -175, -175, -175, -175, -175, -175, -175, -175, -175,
+ -175, -175, -175, 58, -175, -175, 58, 58, 58, 58,
+ 58, 191, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -175
+ },
+
+ {
+ 11, -176, -176, -176, -176, -176, -176, -176, -176, -176,
+ -176, -176, -176, 58, -176, -176, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -176
+ },
+
+ {
+ 11, -177, -177, -177, -177, -177, -177, -177, -177, -177,
+ -177, -177, -177, 58, -177, -177, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -177
+ },
+
+ {
+ 11, -178, -178, -178, -178, -178, -178, -178, -178, -178,
+ -178, -178, -178, 58, -178, -178, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -178
+ },
+
+ {
+ 11, -179, -179, -179, -179, -179, -179, -179, -179, -179,
+ -179, -179, -179, 58, -179, -179, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 192, 58, 58, -179
+
+ },
+
+ {
+ 11, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, 58, -180, -180, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -180
+ },
+
+ {
+ 11, -181, -181, -181, -181, -181, -181, -181, -181, -181,
+ -181, -181, -181, 58, -181, -181, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -181
+ },
+
+ {
+ 11, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, 58, -182, -182, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 193, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -182
+ },
+
+ {
+ 11, -183, -183, -183, -183, -183, -183, -183, -183, -183,
+ -183, -183, -183, 58, -183, -183, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 194, 58, 58, 58, -183
+ },
+
+ {
+ 11, -184, -184, -184, -184, -184, -184, -184, -184, -184,
+ -184, -184, -184, 58, -184, -184, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -184
+
+ },
+
+ {
+ 11, -185, -185, -185, -185, -185, -185, -185, -185, -185,
+ -185, -185, -185, 58, -185, -185, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -185
+ },
+
+ {
+ 11, -186, -186, -186, -186, -186, -186, -186, -186, -186,
+ -186, -186, -186, 58, -186, -186, 58, 58, 58, 195,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -186
+ },
+
+ {
+ 11, -187, -187, -187, -187, -187, -187, -187, -187, -187,
+ -187, -187, -187, 58, -187, -187, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -187
+ },
+
+ {
+ 11, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, 58, -188, -188, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 196, 58, -188
+ },
+
+ {
+ 11, -189, -189, -189, -189, -189, -189, -189, -189, -189,
+ -189, -189, -189, 58, -189, -189, 58, 58, 58, 58,
+ 58, 58, 197, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -189
+
+ },
+
+ {
+ 11, -190, -190, -190, -190, -190, -190, -190, -190, -190,
+ -190, -190, -190, 58, -190, -190, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 198, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -190
+ },
+
+ {
+ 11, -191, -191, -191, -191, -191, -191, -191, -191, -191,
+ -191, -191, -191, 58, -191, -191, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 199, 58, 58, 58, -191
+ },
+
+ {
+ 11, -192, -192, -192, -192, -192, -192, -192, -192, -192,
+ -192, -192, -192, 58, -192, -192, 58, 58, 58, 58,
+
+ 58, 200, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -192
+ },
+
+ {
+ 11, -193, -193, -193, -193, -193, -193, -193, -193, -193,
+ -193, -193, -193, 58, -193, -193, 58, 58, 58, 58,
+ 58, 201, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -193
+ },
+
+ {
+ 11, -194, -194, -194, -194, -194, -194, -194, -194, -194,
+ -194, -194, -194, 58, -194, -194, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 202, 58, 58, -194
+
+ },
+
+ {
+ 11, -195, -195, -195, -195, -195, -195, -195, -195, -195,
+ -195, -195, -195, 58, -195, -195, 58, 58, 58, 58,
+ 58, 203, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -195
+ },
+
+ {
+ 11, -196, -196, -196, -196, -196, -196, -196, -196, -196,
+ -196, -196, -196, 58, -196, -196, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -196
+ },
+
+ {
+ 11, -197, -197, -197, -197, -197, -197, -197, -197, -197,
+ -197, -197, -197, 58, -197, -197, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 204, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -197
+ },
+
+ {
+ 11, -198, -198, -198, -198, -198, -198, -198, -198, -198,
+ -198, -198, -198, 58, -198, -198, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -198
+ },
+
+ {
+ 11, -199, -199, -199, -199, -199, -199, -199, -199, -199,
+ -199, -199, -199, 58, -199, -199, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -199
+
+ },
+
+ {
+ 11, -200, -200, -200, -200, -200, -200, -200, -200, -200,
+ -200, -200, -200, 58, -200, -200, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -200
+ },
+
+ {
+ 11, -201, -201, -201, -201, -201, -201, -201, -201, -201,
+ -201, -201, -201, 58, -201, -201, 58, 205, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -201
+ },
+
+ {
+ 11, -202, -202, -202, -202, -202, -202, -202, -202, -202,
+ -202, -202, -202, 58, -202, -202, 58, 206, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -202
+ },
+
+ {
+ 11, -203, -203, -203, -203, -203, -203, -203, -203, -203,
+ -203, -203, -203, 58, -203, -203, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -203
+ },
+
+ {
+ 11, -204, -204, -204, -204, -204, -204, -204, -204, -204,
+ -204, -204, -204, 58, -204, -204, 58, 58, 58, 58,
+ 58, 58, 58, 207, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -204
+
+ },
+
+ {
+ 11, -205, -205, -205, -205, -205, -205, -205, -205, -205,
+ -205, -205, -205, 58, -205, -205, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 208, 58,
+ 58, 58, 58, 58, 58, 58, 58, -205
+ },
+
+ {
+ 11, -206, -206, -206, -206, -206, -206, -206, -206, -206,
+ -206, -206, -206, 58, -206, -206, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 209, 58, 58, -206
+ },
+
+ {
+ 11, -207, -207, -207, -207, -207, -207, -207, -207, -207,
+ -207, -207, -207, 58, -207, -207, 58, 58, 58, 58,
+
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -207
+ },
+
+ {
+ 11, -208, -208, -208, -208, -208, -208, -208, -208, -208,
+ -208, -208, -208, 58, -208, -208, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -208
+ },
+
+ {
+ 11, -209, -209, -209, -209, -209, -209, -209, -209, -209,
+ -209, -209, -209, 58, -209, -209, 58, 58, 58, 58,
+ 58, 210, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -209
+
+ },
+
+ {
+ 11, -210, -210, -210, -210, -210, -210, -210, -210, -210,
+ -210, -210, -210, 58, -210, -210, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, -210
+ },
+
+ } ;
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[] );
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up zconftext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+ zconfleng = (size_t) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+ (yy_c_buf_p) = yy_cp;
+
+#define YY_NUM_RULES 64
+#define YY_END_OF_BUFFER 65
+/* This struct is not used in this scanner,
+ but its presence is necessary. */
+struct yy_trans_info
+ {
+ flex_int32_t yy_verify;
+ flex_int32_t yy_nxt;
+ };
+static yyconst flex_int16_t yy_accept[211] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 65, 5, 4, 3, 2, 36, 37, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 63, 60, 62, 55, 59, 58, 57, 53, 48, 42,
+ 47, 51, 53, 40, 41, 50, 50, 43, 53, 50,
+ 50, 53, 4, 3, 2, 2, 1, 35, 35, 35,
+ 35, 35, 35, 35, 16, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 63, 60, 62, 61,
+ 55, 54, 57, 56, 44, 51, 38, 50, 50, 52,
+ 45, 46, 39, 35, 35, 35, 35, 35, 35, 35,
+
+ 35, 35, 30, 29, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 49, 25, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 15, 35, 7, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 17, 35, 35,
+ 35, 35, 35, 34, 35, 35, 35, 35, 35, 35,
+ 10, 35, 13, 35, 35, 35, 35, 33, 35, 35,
+ 35, 35, 35, 22, 35, 32, 9, 31, 35, 26,
+ 12, 35, 35, 21, 18, 35, 8, 35, 35, 35,
+ 35, 35, 27, 35, 35, 6, 35, 20, 19, 23,
+
+ 35, 35, 11, 35, 35, 35, 14, 28, 35, 24
+ } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
+ 10, 1, 1, 1, 11, 12, 12, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
+ 14, 1, 1, 1, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 1, 15, 1, 1, 16, 1, 17, 18, 19, 20,
+
+ 21, 22, 23, 24, 25, 13, 13, 26, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 13, 13, 36,
+ 13, 13, 1, 37, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1
+ } ;
+
+extern int zconf_flex_debug;
+int zconf_flex_debug = 0;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *zconftext;
+
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+#define START_STRSIZE 16
+
+char *text;
+static char *text_ptr;
+static int text_size, text_asize;
+
+struct buffer {
+ struct buffer *parent;
+ YY_BUFFER_STATE state;
+};
+
+struct buffer *current_buf;
+
+static int last_ts, first_ts;
+
+static void zconf_endhelp(void);
+static struct buffer *zconf_endfile(void);
+
+void new_string(void)
+{
+ text = malloc(START_STRSIZE);
+ text_asize = START_STRSIZE;
+ text_ptr = text;
+ text_size = 0;
+ *text_ptr = 0;
+}
+
+void append_string(const char *str, int size)
+{
+ int new_size = text_size + size + 1;
+ if (new_size > text_asize) {
+ text = realloc(text, new_size);
+ text_asize = new_size;
+ text_ptr = text + text_size;
+ }
+ memcpy(text_ptr, str, size);
+ text_ptr += size;
+ text_size += size;
+ *text_ptr = 0;
+}
+
+void alloc_string(const char *str, int size)
+{
+ text = malloc(size + 1);
+ memcpy(text, str, size);
+ text[size] = 0;
+}
+
+#define INITIAL 0
+#define COMMAND 1
+#define HELP 2
+#define STRING 3
+#define PARAM 4
+
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+#include <unistd.h>
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int zconfwrap (void );
+#else
+extern int zconfwrap (void );
+#endif
+#endif
+
+ static void yyunput (int c,char *buf_ptr );
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( zconftext, zconfleng, 1, zconfout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ errno=0; \
+ while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(zconfin); \
+ }\
+\
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* end tables serialization structures and prototypes */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+
+extern int zconflex (void);
+
+#define YY_DECL int zconflex (void)
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after zconftext and zconfleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+ int str = 0;
+ int ts, i;
+
+ if ( (yy_init) )
+ {
+ (yy_init) = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! zconfin )
+ zconfin = stdin;
+
+ if ( ! zconfout )
+ zconfout = stdout;
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ zconfensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ zconf_create_buffer(zconfin,YY_BUF_SIZE );
+ }
+
+ zconf_load_buffer_state( );
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = (yy_c_buf_p);
+
+ /* Support of zconftext. */
+ *yy_cp = (yy_hold_char);
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = (yy_start);
+yy_match:
+ while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 )
+ ++yy_cp;
+
+ yy_current_state = -yy_current_state;
+
+yy_find_action:
+ yy_act = yy_accept[yy_current_state];
+
+ YY_DO_BEFORE_ACTION;
+
+do_action: /* This label is used only to access EOF actions. */
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+case 1:
+/* rule 1 can match eol */
+YY_RULE_SETUP
+current_file->lineno++;
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+
+ YY_BREAK
+case 3:
+/* rule 3 can match eol */
+YY_RULE_SETUP
+current_file->lineno++; return T_EOL;
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+{
+ BEGIN(COMMAND);
+}
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+{
+ unput(zconftext[0]);
+ BEGIN(COMMAND);
+}
+ YY_BREAK
+
+case 6:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_MAINMENU;
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_MENU;
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_ENDMENU;
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_SOURCE;
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_CHOICE;
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_ENDCHOICE;
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_COMMENT;
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_CONFIG;
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_MENUCONFIG;
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_HELP;
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_IF;
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_ENDIF;
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_DEPENDS;
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_REQUIRES;
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_OPTIONAL;
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_DEFAULT;
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_PROMPT;
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_TRISTATE;
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_DEF_TRISTATE;
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_BOOLEAN;
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_BOOLEAN;
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_DEF_BOOLEAN;
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_DEF_BOOLEAN;
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_INT;
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_HEX;
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_STRING;
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_SELECT;
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_SELECT;
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+BEGIN(PARAM); return T_RANGE;
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+{
+ alloc_string(zconftext, zconfleng);
+ zconflval.string = text;
+ return T_WORD;
+ }
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+
+ YY_BREAK
+case 37:
+/* rule 37 can match eol */
+YY_RULE_SETUP
+current_file->lineno++; BEGIN(INITIAL);
+ YY_BREAK
+
+case 38:
+YY_RULE_SETUP
+return T_AND;
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+return T_OR;
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+return T_OPEN_PAREN;
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+return T_CLOSE_PAREN;
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+return T_NOT;
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+return T_EQUAL;
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+return T_UNEQUAL;
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+return T_IF;
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+return T_ON;
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+{
+ str = zconftext[0];
+ new_string();
+ BEGIN(STRING);
+ }
+ YY_BREAK
+case 48:
+/* rule 48 can match eol */
+YY_RULE_SETUP
+BEGIN(INITIAL); current_file->lineno++; return T_EOL;
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+/* ignore */
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+{
+ alloc_string(zconftext, zconfleng);
+ zconflval.string = text;
+ return T_WORD;
+ }
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+/* comment */
+ YY_BREAK
+case 52:
+/* rule 52 can match eol */
+YY_RULE_SETUP
+current_file->lineno++;
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+
+ YY_BREAK
+case YY_STATE_EOF(PARAM):
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+
+case 54:
+/* rule 54 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up zconftext again */
+YY_RULE_SETUP
+{
+ append_string(zconftext, zconfleng);
+ zconflval.string = text;
+ return T_WORD_QUOTE;
+ }
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+{
+ append_string(zconftext, zconfleng);
+ }
+ YY_BREAK
+case 56:
+/* rule 56 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up zconftext again */
+YY_RULE_SETUP
+{
+ append_string(zconftext + 1, zconfleng - 1);
+ zconflval.string = text;
+ return T_WORD_QUOTE;
+ }
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+{
+ append_string(zconftext + 1, zconfleng - 1);
+ }
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+{
+ if (str == zconftext[0]) {
+ BEGIN(PARAM);
+ zconflval.string = text;
+ return T_WORD_QUOTE;
+ } else
+ append_string(zconftext, 1);
+ }
+ YY_BREAK
+case 59:
+/* rule 59 can match eol */
+YY_RULE_SETUP
+{
+ printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
+ current_file->lineno++;
+ BEGIN(INITIAL);
+ return T_EOL;
+ }
+ YY_BREAK
+case YY_STATE_EOF(STRING):
+{
+ BEGIN(INITIAL);
+ }
+ YY_BREAK
+
+case 60:
+YY_RULE_SETUP
+{
+ ts = 0;
+ for (i = 0; i < zconfleng; i++) {
+ if (zconftext[i] == '\t')
+ ts = (ts & ~7) + 8;
+ else
+ ts++;
+ }
+ last_ts = ts;
+ if (first_ts) {
+ if (ts < first_ts) {
+ zconf_endhelp();
+ return T_HELPTEXT;
+ }
+ ts -= first_ts;
+ while (ts > 8) {
+ append_string(" ", 8);
+ ts -= 8;
+ }
+ append_string(" ", ts);
+ }
+ }
+ YY_BREAK
+case 61:
+/* rule 61 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up zconftext again */
+YY_RULE_SETUP
+{
+ current_file->lineno++;
+ zconf_endhelp();
+ return T_HELPTEXT;
+ }
+ YY_BREAK
+case 62:
+/* rule 62 can match eol */
+YY_RULE_SETUP
+{
+ current_file->lineno++;
+ append_string("\n", 1);
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+{
+ append_string(zconftext, zconfleng);
+ if (!first_ts)
+ first_ts = last_ts;
+ }
+ YY_BREAK
+case YY_STATE_EOF(HELP):
+{
+ zconf_endhelp();
+ return T_HELPTEXT;
+ }
+ YY_BREAK
+
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(COMMAND):
+{
+ if (current_buf) {
+ zconf_endfile();
+ return T_EOF;
+ }
+ fclose(zconfin);
+ yyterminate();
+}
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+YY_FATAL_ERROR( "flex scanner jammed" );
+ YY_BREAK
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed zconfin at a new source and called
+ * zconflex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = (yy_c_buf_p);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( zconfwrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * zconftext, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+} /* end of zconflex */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+static int yy_get_next_buffer (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ size_t num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ zconfrestart(zconfin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+ static yy_state_type yy_get_previous_state (void)
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+ yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
+ }
+
+ return yy_current_state;
+}
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
+ register int yy_is_jam;
+
+ yy_current_state = yy_nxt[yy_current_state][1];
+ yy_is_jam = (yy_current_state <= 0);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ yy_cp = (yy_c_buf_p);
+
+ /* undo effects of setting up zconftext */
+ *yy_cp = (yy_hold_char);
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = (yy_n_chars) + 2;
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ register char *source =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+ (yytext_ptr) = yy_bp;
+ (yy_hold_char) = *yy_cp;
+ (yy_c_buf_p) = yy_cp;
+}
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ zconfrestart(zconfin );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( zconfwrap( ) )
+ return EOF;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve zconftext */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+ return c;
+}
+#endif /* ifndef YY_NO_INPUT */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void zconfrestart (FILE * input_file )
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ zconfensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ zconf_create_buffer(zconfin,YY_BUF_SIZE );
+ }
+
+ zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
+ zconf_load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+ void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * zconfpop_buffer_state();
+ * zconfpush_buffer_state(new_buffer);
+ */
+ zconfensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ zconf_load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (zconfwrap()) processing, but the only time this flag
+ * is looked at is after zconfwrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+static void zconf_load_buffer_state (void)
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ zconf_init_buffer(b,file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with zconf_create_buffer()
+ *
+ */
+ void zconf_delete_buffer (YY_BUFFER_STATE b )
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ zconffree((void *) b->yy_ch_buf );
+
+ zconffree((void *) b );
+}
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a zconfrestart() or at EOF.
+ */
+ static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file )
+
+{
+ int oerrno = errno;
+
+ zconf_flush_buffer(b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then zconf_init_buffer was _probably_
+ * called from zconfrestart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+ b->yy_is_interactive = 0;
+
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+ void zconf_flush_buffer (YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ zconf_load_buffer_state( );
+}
+
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
+{
+ if (new_buffer == NULL)
+ return;
+
+ zconfensure_buffer_stack();
+
+ /* This block is copied from zconf_switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from zconf_switch_to_buffer. */
+ zconf_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+void zconfpop_buffer_state (void)
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ zconf_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ zconf_load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+static void zconfensure_buffer_stack (void)
+{
+ int num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ zconf_switch_to_buffer(b );
+
+ return b;
+}
+
+/** Setup the input buffer state to scan a string. The next call to zconflex() will
+ * scan from a @e copy of @a str.
+ * @param str a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * zconf_scan_bytes() instead.
+ */
+YY_BUFFER_STATE zconf_scan_string (yyconst char * str )
+{
+
+ return zconf_scan_bytes(str,strlen(str) );
+}
+
+/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE zconf_scan_bytes (yyconst char * bytes, int len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) zconfalloc(n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = zconf_scan_buffer(buf,n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up zconftext. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ zconftext[zconfleng] = (yy_hold_char); \
+ (yy_c_buf_p) = zconftext + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ zconfleng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/** Get the current line number.
+ *
+ */
+int zconfget_lineno (void)
+{
+
+ return zconflineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *zconfget_in (void)
+{
+ return zconfin;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *zconfget_out (void)
+{
+ return zconfout;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int zconfget_leng (void)
+{
+ return zconfleng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *zconfget_text (void)
+{
+ return zconftext;
+}
+
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void zconfset_lineno (int line_number )
+{
+
+ zconflineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see zconf_switch_to_buffer
+ */
+void zconfset_in (FILE * in_str )
+{
+ zconfin = in_str ;
+}
+
+void zconfset_out (FILE * out_str )
+{
+ zconfout = out_str ;
+}
+
+int zconfget_debug (void)
+{
+ return zconf_flex_debug;
+}
+
+void zconfset_debug (int bdebug )
+{
+ zconf_flex_debug = bdebug ;
+}
+
+/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
+int zconflex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ zconf_delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ zconfpop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ zconffree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ return 0;
+}
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *zconfalloc (yy_size_t size )
+{
+ return (void *) malloc( size );
+}
+
+void *zconfrealloc (void * ptr, yy_size_t size )
+{
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+}
+
+void zconffree (void * ptr )
+{
+ free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */
+}
+
+#define YYTABLES_NAME "yytables"
+
+#undef YY_NEW_FILE
+#undef YY_FLUSH_BUFFER
+#undef yy_set_bol
+#undef yy_new_buffer
+#undef yy_set_interactive
+#undef yytext_ptr
+#undef YY_DO_BEFORE_ACTION
+
+#ifdef YY_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
+#endif
+
+void zconf_starthelp(void)
+{
+ new_string();
+ last_ts = first_ts = 0;
+ BEGIN(HELP);
+}
+
+static void zconf_endhelp(void)
+{
+ zconflval.string = text;
+ BEGIN(INITIAL);
+}
+
+/*
+ * Try to open specified file with following names:
+ * ./name
+ * $(srctree)/name
+ * The latter is used when srctree is separate from objtree
+ * when compiling the kernel.
+ * Return NULL if file is not found.
+ */
+FILE *zconf_fopen(const char *name)
+{
+ char *env, fullname[PATH_MAX+1];
+ FILE *f;
+
+ f = fopen(name, "r");
+ if (!f && name[0] != '/') {
+ env = getenv(SRCTREE);
+ if (env) {
+ sprintf(fullname, "%s/%s", env, name);
+ f = fopen(fullname, "r");
+ }
+ }
+ return f;
+}
+
+void zconf_initscan(const char *name)
+{
+ zconfin = zconf_fopen(name);
+ if (!zconfin) {
+ printf("can't find file %s\n", name);
+ exit(1);
+ }
+
+ current_buf = malloc(sizeof(*current_buf));
+ memset(current_buf, 0, sizeof(*current_buf));
+
+ current_file = file_lookup(name);
+ current_file->lineno = 1;
+ current_file->flags = FILE_BUSY;
+}
+
+void zconf_nextfile(const char *name)
+{
+ struct file *file = file_lookup(name);
+ struct buffer *buf = malloc(sizeof(*buf));
+ memset(buf, 0, sizeof(*buf));
+
+ current_buf->state = YY_CURRENT_BUFFER;
+ zconfin = zconf_fopen(name);
+ if (!zconfin) {
+ printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
+ exit(1);
+ }
+ zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
+ buf->parent = current_buf;
+ current_buf = buf;
+
+ if (file->flags & FILE_BUSY) {
+ printf("recursive scan (%s)?\n", name);
+ exit(1);
+ }
+ if (file->flags & FILE_SCANNED) {
+ printf("file %s already scanned?\n", name);
+ exit(1);
+ }
+ file->flags |= FILE_BUSY;
+ file->lineno = 1;
+ file->parent = current_file;
+ current_file = file;
+}
+
+static struct buffer *zconf_endfile(void)
+{
+ struct buffer *parent;
+
+ current_file->flags |= FILE_SCANNED;
+ current_file->flags &= ~FILE_BUSY;
+ current_file = current_file->parent;
+
+ parent = current_buf->parent;
+ if (parent) {
+ fclose(zconfin);
+ zconf_delete_buffer(YY_CURRENT_BUFFER);
+ zconf_switch_to_buffer(parent->state);
+ }
+ free(current_buf);
+ current_buf = parent;
+
+ return parent;
+}
+
+int zconf_lineno(void)
+{
+ if (current_buf)
+ return current_file->lineno - 1;
+ else
+ return 0;
+}
+
+char *zconf_curname(void)
+{
+ if (current_buf)
+ return current_file->name;
+ else
+ return "<none>";
+}
+
diff --git a/misc/buildroot/package/config/lkc.h b/misc/buildroot/package/config/lkc.h
new file mode 100644
index 000000000..b8a67fc9d
--- /dev/null
+++ b/misc/buildroot/package/config/lkc.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#ifndef LKC_H
+#define LKC_H
+
+#include "expr.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef LKC_DIRECT_LINK
+#define P(name,type,arg) extern type name arg
+#else
+#include "lkc_defs.h"
+#define P(name,type,arg) extern type (*name ## _p) arg
+#endif
+#include "lkc_proto.h"
+#undef P
+
+#define SRCTREE "srctree"
+
+int zconfparse(void);
+void zconfdump(FILE *out);
+
+extern int zconfdebug;
+void zconf_starthelp(void);
+FILE *zconf_fopen(const char *name);
+void zconf_initscan(const char *name);
+void zconf_nextfile(const char *name);
+int zconf_lineno(void);
+char *zconf_curname(void);
+
+/* confdata.c */
+extern const char conf_def_filename[];
+extern char conf_filename[];
+
+char *conf_get_default_confname(void);
+
+/* kconfig_load.c */
+void kconfig_load(void);
+
+/* menu.c */
+void menu_init(void);
+void menu_add_menu(void);
+void menu_end_menu(void);
+void menu_add_entry(struct symbol *sym);
+void menu_end_entry(void);
+void menu_add_dep(struct expr *dep);
+struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
+void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
+void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
+void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
+void menu_finalize(struct menu *parent);
+void menu_set_type(int type);
+
+/* util.c */
+struct file *file_lookup(const char *name);
+int file_write_dep(const char *name);
+
+struct gstr {
+ size_t len;
+ char *s;
+};
+struct gstr str_new(void);
+struct gstr str_assign(const char *s);
+void str_free(struct gstr *gs);
+void str_append(struct gstr *gs, const char *s);
+void str_printf(struct gstr *gs, const char *fmt, ...);
+const char *str_get(struct gstr *gs);
+
+/* symbol.c */
+void sym_init(void);
+void sym_clear_all_valid(void);
+void sym_set_changed(struct symbol *sym);
+struct symbol *sym_check_deps(struct symbol *sym);
+struct property *prop_alloc(enum prop_type type, struct symbol *sym);
+struct symbol *prop_get_symbol(struct property *prop);
+
+static inline tristate sym_get_tristate_value(struct symbol *sym)
+{
+ return sym->curr.tri;
+}
+
+
+static inline struct symbol *sym_get_choice_value(struct symbol *sym)
+{
+ return (struct symbol *)sym->curr.val;
+}
+
+static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
+{
+ return sym_set_tristate_value(chval, yes);
+}
+
+static inline bool sym_is_choice(struct symbol *sym)
+{
+ return sym->flags & SYMBOL_CHOICE ? true : false;
+}
+
+static inline bool sym_is_choice_value(struct symbol *sym)
+{
+ return sym->flags & SYMBOL_CHOICEVAL ? true : false;
+}
+
+static inline bool sym_is_optional(struct symbol *sym)
+{
+ return sym->flags & SYMBOL_OPTIONAL ? true : false;
+}
+
+static inline bool sym_has_value(struct symbol *sym)
+{
+ return sym->flags & SYMBOL_NEW ? false : true;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LKC_H */
diff --git a/misc/buildroot/package/config/lkc_proto.h b/misc/buildroot/package/config/lkc_proto.h
new file mode 100644
index 000000000..6dc6d0c48
--- /dev/null
+++ b/misc/buildroot/package/config/lkc_proto.h
@@ -0,0 +1,40 @@
+
+/* confdata.c */
+P(conf_parse,void,(const char *name));
+P(conf_read,int,(const char *name));
+P(conf_write,int,(const char *name));
+
+/* menu.c */
+P(rootmenu,struct menu,);
+
+P(menu_is_visible,bool,(struct menu *menu));
+P(menu_get_prompt,const char *,(struct menu *menu));
+P(menu_get_root_menu,struct menu *,(struct menu *menu));
+P(menu_get_parent_menu,struct menu *,(struct menu *menu));
+
+/* symbol.c */
+P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
+P(sym_change_count,int,);
+
+P(sym_lookup,struct symbol *,(const char *name, int isconst));
+P(sym_find,struct symbol *,(const char *name));
+P(sym_re_search,struct symbol **,(const char *pattern));
+P(sym_type_name,const char *,(enum symbol_type type));
+P(sym_calc_value,void,(struct symbol *sym));
+P(sym_get_type,enum symbol_type,(struct symbol *sym));
+P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri));
+P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri));
+P(sym_toggle_tristate_value,tristate,(struct symbol *sym));
+P(sym_string_valid,bool,(struct symbol *sym, const char *newval));
+P(sym_string_within_range,bool,(struct symbol *sym, const char *str));
+P(sym_set_string_value,bool,(struct symbol *sym, const char *newval));
+P(sym_is_changable,bool,(struct symbol *sym));
+P(sym_get_choice_prop,struct property *,(struct symbol *sym));
+P(sym_get_default_prop,struct property *,(struct symbol *sym));
+P(sym_get_string_value,const char *,(struct symbol *sym));
+
+P(prop_get_type_name,const char *,(enum prop_type type));
+
+/* expr.c */
+P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2));
+P(expr_print,void,(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken));
diff --git a/misc/buildroot/package/config/lxdialog/BIG.FAT.WARNING b/misc/buildroot/package/config/lxdialog/BIG.FAT.WARNING
new file mode 100644
index 000000000..a8999d82b
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/BIG.FAT.WARNING
@@ -0,0 +1,4 @@
+This is NOT the official version of dialog. This version has been
+significantly modified from the original. It is for use by the Linux
+kernel configuration script. Please do not bother Savio Lam with
+questions about this program.
diff --git a/misc/buildroot/package/config/lxdialog/checklist.c b/misc/buildroot/package/config/lxdialog/checklist.c
new file mode 100644
index 000000000..71de4a191
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/checklist.c
@@ -0,0 +1,372 @@
+/*
+ * checklist.c -- implements the checklist box
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension
+ * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "dialog.h"
+
+static int list_width, check_x, item_x, checkflag;
+
+/*
+ * Print list item
+ */
+static void
+print_item (WINDOW * win, const char *item, int status,
+ int choice, int selected)
+{
+ int i;
+
+ /* Clear 'residue' of last item */
+ wattrset (win, menubox_attr);
+ wmove (win, choice, 0);
+ for (i = 0; i < list_width; i++)
+ waddch (win, ' ');
+
+ wmove (win, choice, check_x);
+ wattrset (win, selected ? check_selected_attr : check_attr);
+ if (checkflag == FLAG_CHECK)
+ wprintw (win, "[%c]", status ? 'X' : ' ');
+ else
+ wprintw (win, "(%c)", status ? 'X' : ' ');
+
+ wattrset (win, selected ? tag_selected_attr : tag_attr);
+ mvwaddch(win, choice, item_x, item[0]);
+ wattrset (win, selected ? item_selected_attr : item_attr);
+ waddstr (win, (char *)item+1);
+ if (selected) {
+ wmove (win, choice, check_x+1);
+ wrefresh (win);
+ }
+}
+
+/*
+ * Print the scroll indicators.
+ */
+static void
+print_arrows (WINDOW * win, int choice, int item_no, int scroll,
+ int y, int x, int height)
+{
+ wmove(win, y, x);
+
+ if (scroll > 0) {
+ wattrset (win, uarrow_attr);
+ waddch (win, ACS_UARROW);
+ waddstr (win, "(-)");
+ }
+ else {
+ wattrset (win, menubox_attr);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ }
+
+ y = y + height + 1;
+ wmove(win, y, x);
+
+ if ((height < item_no) && (scroll + choice < item_no - 1)) {
+ wattrset (win, darrow_attr);
+ waddch (win, ACS_DARROW);
+ waddstr (win, "(+)");
+ }
+ else {
+ wattrset (win, menubox_border_attr);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ }
+}
+
+/*
+ * Display the termination buttons
+ */
+static void
+print_buttons( WINDOW *dialog, int height, int width, int selected)
+{
+ int x = width / 2 - 11;
+ int y = height - 2;
+
+ print_button (dialog, "Select", y, x, selected == 0);
+ print_button (dialog, " Help ", y, x + 14, selected == 1);
+
+ wmove(dialog, y, x+1 + 14*selected);
+ wrefresh (dialog);
+}
+
+/*
+ * Display a dialog box with a list of options that can be turned on or off
+ * The `flag' parameter is used to select between radiolist and checklist.
+ */
+int
+dialog_checklist (const char *title, const char *prompt, int height, int width,
+ int list_height, int item_no, struct dialog_list_item ** items,
+ int flag)
+
+{
+ int i, x, y, box_x, box_y;
+ int key = 0, button = 0, choice = 0, scroll = 0, max_choice, *status;
+ WINDOW *dialog, *list;
+
+ checkflag = flag;
+
+ /* Allocate space for storing item on/off status */
+ if ((status = malloc (sizeof (int) * item_no)) == NULL) {
+ endwin ();
+ fprintf (stderr,
+ "\nCan't allocate memory in dialog_checklist().\n");
+ exit (-1);
+ }
+
+ /* Initializes status */
+ for (i = 0; i < item_no; i++) {
+ status[i] = (items[i]->selected == 1); /* ON */
+ if ((!choice && status[i]) || items[i]->selected == 2) /* SELECTED */
+ choice = i + 1;
+ }
+ if (choice)
+ choice--;
+
+ max_choice = MIN (list_height, item_no);
+
+ /* center dialog box on screen */
+ x = (COLS - width) / 2;
+ y = (LINES - height) / 2;
+
+ draw_shadow (stdscr, y, x, height, width);
+
+ dialog = newwin (height, width, y, x);
+ keypad (dialog, TRUE);
+
+ draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+ wattrset (dialog, border_attr);
+ mvwaddch (dialog, height-3, 0, ACS_LTEE);
+ for (i = 0; i < width - 2; i++)
+ waddch (dialog, ACS_HLINE);
+ wattrset (dialog, dialog_attr);
+ waddch (dialog, ACS_RTEE);
+
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
+ if (title != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
+ waddstr (dialog, (char *)title);
+ waddch (dialog, ' ');
+ }
+
+ wattrset (dialog, dialog_attr);
+ print_autowrap (dialog, prompt, width - 2, 1, 3);
+
+ list_width = width - 6;
+ box_y = height - list_height - 5;
+ box_x = (width - list_width) / 2 - 1;
+
+ /* create new window for the list */
+ list = subwin (dialog, list_height, list_width, y+box_y+1, x+box_x+1);
+
+ keypad (list, TRUE);
+
+ /* draw a box around the list items */
+ draw_box (dialog, box_y, box_x, list_height + 2, list_width + 2,
+ menubox_border_attr, menubox_attr);
+
+ /* Find length of longest item in order to center checklist */
+ check_x = 0;
+ for (i = 0; i < item_no; i++)
+ check_x = MAX (check_x, + strlen (items[i]->name) + 4);
+
+ check_x = (list_width - check_x) / 2;
+ item_x = check_x + 4;
+
+ if (choice >= list_height) {
+ scroll = choice - list_height + 1;
+ choice -= scroll;
+ }
+
+ /* Print the list */
+ for (i = 0; i < max_choice; i++) {
+ print_item (list, items[scroll + i]->name,
+ status[i+scroll], i, i == choice);
+ }
+
+ print_arrows(dialog, choice, item_no, scroll,
+ box_y, box_x + check_x + 5, list_height);
+
+ print_buttons(dialog, height, width, 0);
+
+ wnoutrefresh (list);
+ wnoutrefresh (dialog);
+ doupdate ();
+
+ while (key != ESC) {
+ key = wgetch (dialog);
+
+ for (i = 0; i < max_choice; i++)
+ if (toupper(key) == toupper(items[scroll + i]->name[0]))
+ break;
+
+
+ if ( i < max_choice || key == KEY_UP || key == KEY_DOWN ||
+ key == '+' || key == '-' ) {
+ if (key == KEY_UP || key == '-') {
+ if (!choice) {
+ if (!scroll)
+ continue;
+ /* Scroll list down */
+ if (list_height > 1) {
+ /* De-highlight current first item */
+ print_item (list, items[scroll]->name,
+ status[scroll], 0, FALSE);
+ scrollok (list, TRUE);
+ wscrl (list, -1);
+ scrollok (list, FALSE);
+ }
+ scroll--;
+ print_item (list, items[scroll]->name,
+ status[scroll], 0, TRUE);
+ wnoutrefresh (list);
+
+ print_arrows(dialog, choice, item_no, scroll,
+ box_y, box_x + check_x + 5, list_height);
+
+ wrefresh (dialog);
+
+ continue; /* wait for another key press */
+ } else
+ i = choice - 1;
+ } else if (key == KEY_DOWN || key == '+') {
+ if (choice == max_choice - 1) {
+ if (scroll + choice >= item_no - 1)
+ continue;
+ /* Scroll list up */
+ if (list_height > 1) {
+ /* De-highlight current last item before scrolling up */
+ print_item (list, items[scroll + max_choice - 1]->name,
+ status[scroll + max_choice - 1],
+ max_choice - 1, FALSE);
+ scrollok (list, TRUE);
+ scroll (list);
+ scrollok (list, FALSE);
+ }
+ scroll++;
+ print_item (list, items[scroll + max_choice - 1]->name,
+ status[scroll + max_choice - 1],
+ max_choice - 1, TRUE);
+ wnoutrefresh (list);
+
+ print_arrows(dialog, choice, item_no, scroll,
+ box_y, box_x + check_x + 5, list_height);
+
+ wrefresh (dialog);
+
+ continue; /* wait for another key press */
+ } else
+ i = choice + 1;
+ }
+ if (i != choice) {
+ /* De-highlight current item */
+ print_item (list, items[scroll + choice]->name,
+ status[scroll + choice], choice, FALSE);
+ /* Highlight new item */
+ choice = i;
+ print_item (list, items[scroll + choice]->name,
+ status[scroll + choice], choice, TRUE);
+ wnoutrefresh (list);
+ wrefresh (dialog);
+ }
+ continue; /* wait for another key press */
+ }
+ switch (key) {
+ case 'H':
+ case 'h':
+ case '?':
+ for (i = 0; i < item_no; i++)
+ items[i]->selected = 0;
+ items[scroll + choice]->selected = 1;
+ delwin (dialog);
+ free (status);
+ return 1;
+ case TAB:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ button = ((key == KEY_LEFT ? --button : ++button) < 0)
+ ? 1 : (button > 1 ? 0 : button);
+
+ print_buttons(dialog, height, width, button);
+ wrefresh (dialog);
+ break;
+ case 'S':
+ case 's':
+ case ' ':
+ case '\n':
+ if (!button) {
+ if (flag == FLAG_CHECK) {
+ status[scroll + choice] = !status[scroll + choice];
+ wmove (list, choice, check_x);
+ wattrset (list, check_selected_attr);
+ wprintw (list, "[%c]", status[scroll + choice] ? 'X' : ' ');
+ } else {
+ if (!status[scroll + choice]) {
+ for (i = 0; i < item_no; i++)
+ status[i] = 0;
+ status[scroll + choice] = 1;
+ for (i = 0; i < max_choice; i++)
+ print_item (list, items[scroll + i]->name,
+ status[scroll + i], i, i == choice);
+ }
+ }
+ wnoutrefresh (list);
+ wrefresh (dialog);
+
+ for (i = 0; i < item_no; i++) {
+ items[i]->selected = status[i];
+ }
+ } else {
+ for (i = 0; i < item_no; i++)
+ items[i]->selected = 0;
+ items[scroll + choice]->selected = 1;
+ }
+ delwin (dialog);
+ free (status);
+ return button;
+ case 'X':
+ case 'x':
+ key = ESC;
+ case ESC:
+ break;
+ }
+
+ /* Now, update everything... */
+ doupdate ();
+ }
+
+
+ delwin (dialog);
+ free (status);
+ return -1; /* ESC pressed */
+}
diff --git a/misc/buildroot/package/config/lxdialog/colors.h b/misc/buildroot/package/config/lxdialog/colors.h
new file mode 100644
index 000000000..d34dd37c6
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/colors.h
@@ -0,0 +1,161 @@
+/*
+ * colors.h -- color attribute definitions
+ *
+ * AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+/*
+ * Default color definitions
+ *
+ * *_FG = foreground
+ * *_BG = background
+ * *_HL = highlight?
+ */
+#define SCREEN_FG COLOR_CYAN
+#define SCREEN_BG COLOR_BLUE
+#define SCREEN_HL TRUE
+
+#define SHADOW_FG COLOR_BLACK
+#define SHADOW_BG COLOR_BLACK
+#define SHADOW_HL TRUE
+
+#define DIALOG_FG COLOR_BLACK
+#define DIALOG_BG COLOR_WHITE
+#define DIALOG_HL FALSE
+
+#define TITLE_FG COLOR_YELLOW
+#define TITLE_BG COLOR_WHITE
+#define TITLE_HL TRUE
+
+#define BORDER_FG COLOR_WHITE
+#define BORDER_BG COLOR_WHITE
+#define BORDER_HL TRUE
+
+#define BUTTON_ACTIVE_FG COLOR_WHITE
+#define BUTTON_ACTIVE_BG COLOR_BLUE
+#define BUTTON_ACTIVE_HL TRUE
+
+#define BUTTON_INACTIVE_FG COLOR_BLACK
+#define BUTTON_INACTIVE_BG COLOR_WHITE
+#define BUTTON_INACTIVE_HL FALSE
+
+#define BUTTON_KEY_ACTIVE_FG COLOR_WHITE
+#define BUTTON_KEY_ACTIVE_BG COLOR_BLUE
+#define BUTTON_KEY_ACTIVE_HL TRUE
+
+#define BUTTON_KEY_INACTIVE_FG COLOR_RED
+#define BUTTON_KEY_INACTIVE_BG COLOR_WHITE
+#define BUTTON_KEY_INACTIVE_HL FALSE
+
+#define BUTTON_LABEL_ACTIVE_FG COLOR_YELLOW
+#define BUTTON_LABEL_ACTIVE_BG COLOR_BLUE
+#define BUTTON_LABEL_ACTIVE_HL TRUE
+
+#define BUTTON_LABEL_INACTIVE_FG COLOR_BLACK
+#define BUTTON_LABEL_INACTIVE_BG COLOR_WHITE
+#define BUTTON_LABEL_INACTIVE_HL TRUE
+
+#define INPUTBOX_FG COLOR_BLACK
+#define INPUTBOX_BG COLOR_WHITE
+#define INPUTBOX_HL FALSE
+
+#define INPUTBOX_BORDER_FG COLOR_BLACK
+#define INPUTBOX_BORDER_BG COLOR_WHITE
+#define INPUTBOX_BORDER_HL FALSE
+
+#define SEARCHBOX_FG COLOR_BLACK
+#define SEARCHBOX_BG COLOR_WHITE
+#define SEARCHBOX_HL FALSE
+
+#define SEARCHBOX_TITLE_FG COLOR_YELLOW
+#define SEARCHBOX_TITLE_BG COLOR_WHITE
+#define SEARCHBOX_TITLE_HL TRUE
+
+#define SEARCHBOX_BORDER_FG COLOR_WHITE
+#define SEARCHBOX_BORDER_BG COLOR_WHITE
+#define SEARCHBOX_BORDER_HL TRUE
+
+#define POSITION_INDICATOR_FG COLOR_YELLOW
+#define POSITION_INDICATOR_BG COLOR_WHITE
+#define POSITION_INDICATOR_HL TRUE
+
+#define MENUBOX_FG COLOR_BLACK
+#define MENUBOX_BG COLOR_WHITE
+#define MENUBOX_HL FALSE
+
+#define MENUBOX_BORDER_FG COLOR_WHITE
+#define MENUBOX_BORDER_BG COLOR_WHITE
+#define MENUBOX_BORDER_HL TRUE
+
+#define ITEM_FG COLOR_BLACK
+#define ITEM_BG COLOR_WHITE
+#define ITEM_HL FALSE
+
+#define ITEM_SELECTED_FG COLOR_WHITE
+#define ITEM_SELECTED_BG COLOR_BLUE
+#define ITEM_SELECTED_HL TRUE
+
+#define TAG_FG COLOR_YELLOW
+#define TAG_BG COLOR_WHITE
+#define TAG_HL TRUE
+
+#define TAG_SELECTED_FG COLOR_YELLOW
+#define TAG_SELECTED_BG COLOR_BLUE
+#define TAG_SELECTED_HL TRUE
+
+#define TAG_KEY_FG COLOR_YELLOW
+#define TAG_KEY_BG COLOR_WHITE
+#define TAG_KEY_HL TRUE
+
+#define TAG_KEY_SELECTED_FG COLOR_YELLOW
+#define TAG_KEY_SELECTED_BG COLOR_BLUE
+#define TAG_KEY_SELECTED_HL TRUE
+
+#define CHECK_FG COLOR_BLACK
+#define CHECK_BG COLOR_WHITE
+#define CHECK_HL FALSE
+
+#define CHECK_SELECTED_FG COLOR_WHITE
+#define CHECK_SELECTED_BG COLOR_BLUE
+#define CHECK_SELECTED_HL TRUE
+
+#define UARROW_FG COLOR_GREEN
+#define UARROW_BG COLOR_WHITE
+#define UARROW_HL TRUE
+
+#define DARROW_FG COLOR_GREEN
+#define DARROW_BG COLOR_WHITE
+#define DARROW_HL TRUE
+
+/* End of default color definitions */
+
+#define C_ATTR(x,y) ((x ? A_BOLD : 0) | COLOR_PAIR((y)))
+#define COLOR_NAME_LEN 10
+#define COLOR_COUNT 8
+
+/*
+ * Global variables
+ */
+
+typedef struct {
+ char name[COLOR_NAME_LEN];
+ int value;
+} color_names_st;
+
+extern color_names_st color_names[];
+extern int color_table[][3];
diff --git a/misc/buildroot/package/config/lxdialog/dialog.h b/misc/buildroot/package/config/lxdialog/dialog.h
new file mode 100644
index 000000000..7bab3ad0e
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/dialog.h
@@ -0,0 +1,199 @@
+
+/*
+ * dialog.h -- common declarations for all dialog modules
+ *
+ * AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef CURSES_LOC
+#ifdef __sun__
+#define CURS_MACROS
+#endif
+#include CURSES_LOC
+
+/*
+ * Colors in ncurses 1.9.9e do not work properly since foreground and
+ * background colors are OR'd rather than separately masked. This version
+ * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
+ * with standard curses. The simplest fix (to make this work with standard
+ * curses) uses the wbkgdset() function, not used in the original hack.
+ * Turn it off if we're building with 1.9.9e, since it just confuses things.
+ */
+#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
+#define OLD_NCURSES 1
+#undef wbkgdset
+#define wbkgdset(w,p) /*nothing*/
+#else
+#define OLD_NCURSES 0
+#endif
+
+#define TR(params) _tracef params
+
+#define ESC 27
+#define TAB 9
+#define MAX_LEN 2048
+#define BUF_SIZE (10*1024)
+#define MIN(x,y) (x < y ? x : y)
+#define MAX(x,y) (x > y ? x : y)
+
+
+#ifndef ACS_ULCORNER
+#define ACS_ULCORNER '+'
+#endif
+#ifndef ACS_LLCORNER
+#define ACS_LLCORNER '+'
+#endif
+#ifndef ACS_URCORNER
+#define ACS_URCORNER '+'
+#endif
+#ifndef ACS_LRCORNER
+#define ACS_LRCORNER '+'
+#endif
+#ifndef ACS_HLINE
+#define ACS_HLINE '-'
+#endif
+#ifndef ACS_VLINE
+#define ACS_VLINE '|'
+#endif
+#ifndef ACS_LTEE
+#define ACS_LTEE '+'
+#endif
+#ifndef ACS_RTEE
+#define ACS_RTEE '+'
+#endif
+#ifndef ACS_UARROW
+#define ACS_UARROW '^'
+#endif
+#ifndef ACS_DARROW
+#define ACS_DARROW 'v'
+#endif
+
+/*
+ * Attribute names
+ */
+#define screen_attr attributes[0]
+#define shadow_attr attributes[1]
+#define dialog_attr attributes[2]
+#define title_attr attributes[3]
+#define border_attr attributes[4]
+#define button_active_attr attributes[5]
+#define button_inactive_attr attributes[6]
+#define button_key_active_attr attributes[7]
+#define button_key_inactive_attr attributes[8]
+#define button_label_active_attr attributes[9]
+#define button_label_inactive_attr attributes[10]
+#define inputbox_attr attributes[11]
+#define inputbox_border_attr attributes[12]
+#define searchbox_attr attributes[13]
+#define searchbox_title_attr attributes[14]
+#define searchbox_border_attr attributes[15]
+#define position_indicator_attr attributes[16]
+#define menubox_attr attributes[17]
+#define menubox_border_attr attributes[18]
+#define item_attr attributes[19]
+#define item_selected_attr attributes[20]
+#define tag_attr attributes[21]
+#define tag_selected_attr attributes[22]
+#define tag_key_attr attributes[23]
+#define tag_key_selected_attr attributes[24]
+#define check_attr attributes[25]
+#define check_selected_attr attributes[26]
+#define uarrow_attr attributes[27]
+#define darrow_attr attributes[28]
+
+/* number of attributes */
+#define ATTRIBUTE_COUNT 29
+
+/*
+ * Global variables
+ */
+extern bool use_colors;
+
+extern chtype attributes[];
+#endif
+
+extern const char *backtitle;
+
+struct dialog_list_item {
+ char *name;
+ int namelen;
+ char *tag;
+ int selected; /* Set to 1 by dialog_*() function. */
+};
+
+/*
+ * Function prototypes
+ */
+
+void init_dialog (void);
+void end_dialog (void);
+void dialog_clear (void);
+#ifdef CURSES_LOC
+void attr_clear (WINDOW * win, int height, int width, chtype attr);
+void color_setup (void);
+void print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x);
+void print_button (WINDOW * win, const char *label, int y, int x, int selected);
+void draw_box (WINDOW * win, int y, int x, int height, int width, chtype box,
+ chtype border);
+void draw_shadow (WINDOW * win, int y, int x, int height, int width);
+#endif
+
+int first_alpha (const char *string, const char *exempt);
+int dialog_yesno (const char *title, const char *prompt, int height, int width);
+int dialog_msgbox (const char *title, const char *prompt, int height,
+ int width, int pause);
+int dialog_textbox (const char *title, const char *file, int height, int width);
+int dialog_menu (const char *title, const char *prompt, int height, int width,
+ int menu_height, const char *choice, int item_no,
+ struct dialog_list_item ** items);
+int dialog_checklist (const char *title, const char *prompt, int height,
+ int width, int list_height, int item_no,
+ struct dialog_list_item ** items, int flag);
+extern unsigned char dialog_input_result[];
+int dialog_inputbox (const char *title, const char *prompt, int height,
+ int width, const char *init);
+
+struct dialog_list_item *first_sel_item(int item_no,
+ struct dialog_list_item ** items);
+
+/*
+ * This is the base for fictitious keys, which activate
+ * the buttons.
+ *
+ * Mouse-generated keys are the following:
+ * -- the first 32 are used as numbers, in addition to '0'-'9'
+ * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o')
+ * -- uppercase chars are used to invoke the button (M_EVENT + 'O')
+ */
+#ifdef CURSES_LOC
+#define M_EVENT (KEY_MAX+1)
+#endif
+
+
+/*
+ * The `flag' parameter in checklist is used to select between
+ * radiolist and checklist
+ */
+#define FLAG_CHECK 1
+#define FLAG_RADIO 0
diff --git a/misc/buildroot/package/config/lxdialog/inputbox.c b/misc/buildroot/package/config/lxdialog/inputbox.c
new file mode 100644
index 000000000..fa7bebc69
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/inputbox.c
@@ -0,0 +1,240 @@
+/*
+ * inputbox.c -- implements the input box
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "dialog.h"
+
+unsigned char dialog_input_result[MAX_LEN + 1];
+
+/*
+ * Print the termination buttons
+ */
+static void
+print_buttons(WINDOW *dialog, int height, int width, int selected)
+{
+ int x = width / 2 - 11;
+ int y = height - 2;
+
+ print_button (dialog, " Ok ", y, x, selected==0);
+ print_button (dialog, " Help ", y, x + 14, selected==1);
+
+ wmove(dialog, y, x+1+14*selected);
+ wrefresh(dialog);
+}
+
+/*
+ * Display a dialog box for inputing a string
+ */
+int
+dialog_inputbox (const char *title, const char *prompt, int height, int width,
+ const char *init)
+{
+ int i, x, y, box_y, box_x, box_width;
+ int input_x = 0, scroll = 0, key = 0, button = -1;
+ unsigned char *instr = dialog_input_result;
+ WINDOW *dialog;
+
+ /* center dialog box on screen */
+ x = (COLS - width) / 2;
+ y = (LINES - height) / 2;
+
+
+ draw_shadow (stdscr, y, x, height, width);
+
+ dialog = newwin (height, width, y, x);
+ keypad (dialog, TRUE);
+
+ draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+ wattrset (dialog, border_attr);
+ mvwaddch (dialog, height-3, 0, ACS_LTEE);
+ for (i = 0; i < width - 2; i++)
+ waddch (dialog, ACS_HLINE);
+ wattrset (dialog, dialog_attr);
+ waddch (dialog, ACS_RTEE);
+
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
+ if (title != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
+ waddstr (dialog, (char *)title);
+ waddch (dialog, ' ');
+ }
+
+ wattrset (dialog, dialog_attr);
+ print_autowrap (dialog, prompt, width - 2, 1, 3);
+
+ /* Draw the input field box */
+ box_width = width - 6;
+ getyx (dialog, y, x);
+ box_y = y + 2;
+ box_x = (width - box_width) / 2;
+ draw_box (dialog, y + 1, box_x - 1, 3, box_width + 2,
+ border_attr, dialog_attr);
+
+ print_buttons(dialog, height, width, 0);
+
+ /* Set up the initial value */
+ wmove (dialog, box_y, box_x);
+ wattrset (dialog, inputbox_attr);
+
+ if (!init)
+ instr[0] = '\0';
+ else
+ strcpy (instr, init);
+
+ input_x = strlen (instr);
+
+ if (input_x >= box_width) {
+ scroll = input_x - box_width + 1;
+ input_x = box_width - 1;
+ for (i = 0; i < box_width - 1; i++)
+ waddch (dialog, instr[scroll + i]);
+ } else
+ waddstr (dialog, instr);
+
+ wmove (dialog, box_y, box_x + input_x);
+
+ wrefresh (dialog);
+
+ while (key != ESC) {
+ key = wgetch (dialog);
+
+ if (button == -1) { /* Input box selected */
+ switch (key) {
+ case TAB:
+ case KEY_UP:
+ case KEY_DOWN:
+ break;
+ case KEY_LEFT:
+ continue;
+ case KEY_RIGHT:
+ continue;
+ case KEY_BACKSPACE:
+ case 127:
+ if (input_x || scroll) {
+ wattrset (dialog, inputbox_attr);
+ if (!input_x) {
+ scroll = scroll < box_width - 1 ?
+ 0 : scroll - (box_width - 1);
+ wmove (dialog, box_y, box_x);
+ for (i = 0; i < box_width; i++)
+ waddch (dialog, instr[scroll + input_x + i] ?
+ instr[scroll + input_x + i] : ' ');
+ input_x = strlen (instr) - scroll;
+ } else
+ input_x--;
+ instr[scroll + input_x] = '\0';
+ mvwaddch (dialog, box_y, input_x + box_x, ' ');
+ wmove (dialog, box_y, input_x + box_x);
+ wrefresh (dialog);
+ }
+ continue;
+ default:
+ if (key < 0x100 && isprint (key)) {
+ if (scroll + input_x < MAX_LEN) {
+ wattrset (dialog, inputbox_attr);
+ instr[scroll + input_x] = key;
+ instr[scroll + input_x + 1] = '\0';
+ if (input_x == box_width - 1) {
+ scroll++;
+ wmove (dialog, box_y, box_x);
+ for (i = 0; i < box_width - 1; i++)
+ waddch (dialog, instr[scroll + i]);
+ } else {
+ wmove (dialog, box_y, input_x++ + box_x);
+ waddch (dialog, key);
+ }
+ wrefresh (dialog);
+ } else
+ flash (); /* Alarm user about overflow */
+ continue;
+ }
+ }
+ }
+ switch (key) {
+ case 'O':
+ case 'o':
+ delwin (dialog);
+ return 0;
+ case 'H':
+ case 'h':
+ delwin (dialog);
+ return 1;
+ case KEY_UP:
+ case KEY_LEFT:
+ switch (button) {
+ case -1:
+ button = 1; /* Indicates "Cancel" button is selected */
+ print_buttons(dialog, height, width, 1);
+ break;
+ case 0:
+ button = -1; /* Indicates input box is selected */
+ print_buttons(dialog, height, width, 0);
+ wmove (dialog, box_y, box_x + input_x);
+ wrefresh (dialog);
+ break;
+ case 1:
+ button = 0; /* Indicates "OK" button is selected */
+ print_buttons(dialog, height, width, 0);
+ break;
+ }
+ break;
+ case TAB:
+ case KEY_DOWN:
+ case KEY_RIGHT:
+ switch (button) {
+ case -1:
+ button = 0; /* Indicates "OK" button is selected */
+ print_buttons(dialog, height, width, 0);
+ break;
+ case 0:
+ button = 1; /* Indicates "Cancel" button is selected */
+ print_buttons(dialog, height, width, 1);
+ break;
+ case 1:
+ button = -1; /* Indicates input box is selected */
+ print_buttons(dialog, height, width, 0);
+ wmove (dialog, box_y, box_x + input_x);
+ wrefresh (dialog);
+ break;
+ }
+ break;
+ case ' ':
+ case '\n':
+ delwin (dialog);
+ return (button == -1 ? 0 : button);
+ case 'X':
+ case 'x':
+ key = ESC;
+ case ESC:
+ break;
+ }
+ }
+
+ delwin (dialog);
+ return -1; /* ESC pressed */
+}
diff --git a/misc/buildroot/package/config/lxdialog/menubox.c b/misc/buildroot/package/config/lxdialog/menubox.c
new file mode 100644
index 000000000..873dc587b
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/menubox.c
@@ -0,0 +1,438 @@
+/*
+ * menubox.c -- implements the menu box
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Changes by Clifford Wolf (god@clifford.at)
+ *
+ * [ 1998-06-13 ]
+ *
+ * *) A bugfix for the Page-Down problem
+ *
+ * *) Formerly when I used Page Down and Page Up, the cursor would be set
+ * to the first position in the menu box. Now lxdialog is a bit
+ * smarter and works more like other menu systems (just have a look at
+ * it).
+ *
+ * *) Formerly if I selected something my scrolling would be broken because
+ * lxdialog is re-invoked by the Menuconfig shell script, can't
+ * remember the last scrolling position, and just sets it so that the
+ * cursor is at the bottom of the box. Now it writes the temporary file
+ * lxdialog.scrltmp which contains this information. The file is
+ * deleted by lxdialog if the user leaves a submenu or enters a new
+ * one, but it would be nice if Menuconfig could make another "rm -f"
+ * just to be sure. Just try it out - you will recognise a difference!
+ *
+ * [ 1998-06-14 ]
+ *
+ * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files
+ * and menus change their size on the fly.
+ *
+ * *) If for some reason the last scrolling position is not saved by
+ * lxdialog, it sets the scrolling so that the selected item is in the
+ * middle of the menu box, not at the bottom.
+ *
+ * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net)
+ * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus.
+ * This fixes a bug in Menuconfig where using ' ' to descend into menus
+ * would leave mis-synchronized lxdialog.scrltmp files lying around,
+ * fscanf would read in 'scroll', and eventually that value would get used.
+ */
+
+#include "dialog.h"
+
+static int menu_width, item_x;
+
+/*
+ * Print menu item
+ */
+static void
+print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey)
+{
+ int j;
+ char menu_item[menu_width+1];
+
+ strncpy(menu_item, item, menu_width);
+ menu_item[menu_width] = 0;
+ j = first_alpha(menu_item, "YyNnMmHh");
+
+ /* Clear 'residue' of last item */
+ wattrset (win, menubox_attr);
+ wmove (win, choice, 0);
+#if OLD_NCURSES
+ {
+ int i;
+ for (i = 0; i < menu_width; i++)
+ waddch (win, ' ');
+ }
+#else
+ wclrtoeol(win);
+#endif
+ wattrset (win, selected ? item_selected_attr : item_attr);
+ mvwaddstr (win, choice, item_x, menu_item);
+ if (hotkey) {
+ wattrset (win, selected ? tag_key_selected_attr : tag_key_attr);
+ mvwaddch(win, choice, item_x+j, menu_item[j]);
+ }
+ if (selected) {
+ wmove (win, choice, item_x+1);
+ wrefresh (win);
+ }
+}
+
+/*
+ * Print the scroll indicators.
+ */
+static void
+print_arrows (WINDOW * win, int item_no, int scroll,
+ int y, int x, int height)
+{
+ int cur_y, cur_x;
+
+ getyx(win, cur_y, cur_x);
+
+ wmove(win, y, x);
+
+ if (scroll > 0) {
+ wattrset (win, uarrow_attr);
+ waddch (win, ACS_UARROW);
+ waddstr (win, "(-)");
+ }
+ else {
+ wattrset (win, menubox_attr);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ }
+
+ y = y + height + 1;
+ wmove(win, y, x);
+
+ if ((height < item_no) && (scroll + height < item_no)) {
+ wattrset (win, darrow_attr);
+ waddch (win, ACS_DARROW);
+ waddstr (win, "(+)");
+ }
+ else {
+ wattrset (win, menubox_border_attr);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ waddch (win, ACS_HLINE);
+ }
+
+ wmove(win, cur_y, cur_x);
+}
+
+/*
+ * Display the termination buttons.
+ */
+static void
+print_buttons (WINDOW *win, int height, int width, int selected)
+{
+ int x = width / 2 - 16;
+ int y = height - 2;
+
+ print_button (win, "Select", y, x, selected == 0);
+ print_button (win, " Exit ", y, x + 12, selected == 1);
+ print_button (win, " Help ", y, x + 24, selected == 2);
+
+ wmove(win, y, x+1+12*selected);
+ wrefresh (win);
+}
+
+/*
+ * Display a menu for choosing among a number of options
+ */
+int
+dialog_menu (const char *title, const char *prompt, int height, int width,
+ int menu_height, const char *current, int item_no,
+ struct dialog_list_item ** items)
+{
+ int i, j, x, y, box_x, box_y;
+ int key = 0, button = 0, scroll = 0, choice = 0, first_item = 0, max_choice;
+ WINDOW *dialog, *menu;
+ FILE *f;
+
+ max_choice = MIN (menu_height, item_no);
+
+ /* center dialog box on screen */
+ x = (COLS - width) / 2;
+ y = (LINES - height) / 2;
+
+ draw_shadow (stdscr, y, x, height, width);
+
+ dialog = newwin (height, width, y, x);
+ keypad (dialog, TRUE);
+
+ draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+ wattrset (dialog, border_attr);
+ mvwaddch (dialog, height - 3, 0, ACS_LTEE);
+ for (i = 0; i < width - 2; i++)
+ waddch (dialog, ACS_HLINE);
+ wattrset (dialog, dialog_attr);
+ wbkgdset (dialog, dialog_attr & A_COLOR);
+ waddch (dialog, ACS_RTEE);
+
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
+ if (title != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
+ waddstr (dialog, (char *)title);
+ waddch (dialog, ' ');
+ }
+
+ wattrset (dialog, dialog_attr);
+ print_autowrap (dialog, prompt, width - 2, 1, 3);
+
+ menu_width = width - 6;
+ box_y = height - menu_height - 5;
+ box_x = (width - menu_width) / 2 - 1;
+
+ /* create new window for the menu */
+ menu = subwin (dialog, menu_height, menu_width,
+ y + box_y + 1, x + box_x + 1);
+ keypad (menu, TRUE);
+
+ /* draw a box around the menu items */
+ draw_box (dialog, box_y, box_x, menu_height + 2, menu_width + 2,
+ menubox_border_attr, menubox_attr);
+
+ /*
+ * Find length of longest item in order to center menu.
+ * Set 'choice' to default item.
+ */
+ item_x = 0;
+ for (i = 0; i < item_no; i++) {
+ item_x = MAX (item_x, MIN(menu_width, strlen (items[i]->name) + 2));
+ if (strcmp(current, items[i]->tag) == 0) choice = i;
+ }
+
+ item_x = (menu_width - item_x) / 2;
+
+ /* get the scroll info from the temp file */
+ if ( (f=fopen("lxdialog.scrltmp","r")) != NULL ) {
+ if ( (fscanf(f,"%d\n",&scroll) == 1) && (scroll <= choice) &&
+ (scroll+max_choice > choice) && (scroll >= 0) &&
+ (scroll+max_choice <= item_no) ) {
+ first_item = scroll;
+ choice = choice - scroll;
+ fclose(f);
+ } else {
+ scroll=0;
+ remove("lxdialog.scrltmp");
+ fclose(f);
+ f=NULL;
+ }
+ }
+ if ( (choice >= max_choice) || (f==NULL && choice >= max_choice/2) ) {
+ if (choice >= item_no-max_choice/2)
+ scroll = first_item = item_no-max_choice;
+ else
+ scroll = first_item = choice - max_choice/2;
+ choice = choice - scroll;
+ }
+
+ /* Print the menu */
+ for (i=0; i < max_choice; i++) {
+ print_item (menu, items[first_item + i]->name, i, i == choice,
+ (items[first_item + i]->tag[0] != ':'));
+ }
+
+ wnoutrefresh (menu);
+
+ print_arrows(dialog, item_no, scroll,
+ box_y, box_x+item_x+1, menu_height);
+
+ print_buttons (dialog, height, width, 0);
+ wmove (menu, choice, item_x+1);
+ wrefresh (menu);
+
+ while (key != ESC) {
+ key = wgetch(menu);
+
+ if (key < 256 && isalpha(key)) key = tolower(key);
+
+ if (strchr("ynmh", key))
+ i = max_choice;
+ else {
+ for (i = choice+1; i < max_choice; i++) {
+ j = first_alpha(items[scroll + i]->name, "YyNnMmHh");
+ if (key == tolower(items[scroll + i]->name[j]))
+ break;
+ }
+ if (i == max_choice)
+ for (i = 0; i < max_choice; i++) {
+ j = first_alpha(items[scroll + i]->name, "YyNnMmHh");
+ if (key == tolower(items[scroll + i]->name[j]))
+ break;
+ }
+ }
+
+ if (i < max_choice ||
+ key == KEY_UP || key == KEY_DOWN ||
+ key == '-' || key == '+' ||
+ key == KEY_PPAGE || key == KEY_NPAGE) {
+
+ print_item (menu, items[scroll + choice]->name, choice, FALSE,
+ (items[scroll + choice]->tag[0] != ':'));
+
+ if (key == KEY_UP || key == '-') {
+ if (choice < 2 && scroll) {
+ /* Scroll menu down */
+ scrollok (menu, TRUE);
+ wscrl (menu, -1);
+ scrollok (menu, FALSE);
+
+ scroll--;
+
+ print_item (menu, items[scroll]->name, 0, FALSE,
+ (items[scroll]->tag[0] != ':'));
+ } else
+ choice = MAX(choice - 1, 0);
+
+ } else if (key == KEY_DOWN || key == '+') {
+
+ print_item (menu, items[scroll + choice]->name, choice, FALSE,
+ (items[scroll + choice]->tag[0] != ':'));
+
+ if ((choice > max_choice-3) &&
+ (scroll + max_choice < item_no)
+ ) {
+ /* Scroll menu up */
+ scrollok (menu, TRUE);
+ scroll (menu);
+ scrollok (menu, FALSE);
+
+ scroll++;
+
+ print_item (menu, items[scroll + max_choice - 1]->name,
+ max_choice-1, FALSE,
+ (items[scroll + max_choice - 1]->tag[0] != ':'));
+ } else
+ choice = MIN(choice+1, max_choice-1);
+
+ } else if (key == KEY_PPAGE) {
+ scrollok (menu, TRUE);
+ for (i=0; (i < max_choice); i++) {
+ if (scroll > 0) {
+ wscrl (menu, -1);
+ scroll--;
+ print_item (menu, items[scroll]->name, 0, FALSE,
+ (items[scroll]->tag[0] != ':'));
+ } else {
+ if (choice > 0)
+ choice--;
+ }
+ }
+ scrollok (menu, FALSE);
+
+ } else if (key == KEY_NPAGE) {
+ for (i=0; (i < max_choice); i++) {
+ if (scroll+max_choice < item_no) {
+ scrollok (menu, TRUE);
+ scroll(menu);
+ scrollok (menu, FALSE);
+ scroll++;
+ print_item (menu, items[scroll + max_choice - 1]->name,
+ max_choice-1, FALSE,
+ (items[scroll + max_choice - 1]->tag[0] != ':'));
+ } else {
+ if (choice+1 < max_choice)
+ choice++;
+ }
+ }
+
+ } else
+ choice = i;
+
+ print_item (menu, items[scroll + choice]->name, choice, TRUE,
+ (items[scroll + choice]->tag[0] != ':'));
+
+ print_arrows(dialog, item_no, scroll,
+ box_y, box_x+item_x+1, menu_height);
+
+ wnoutrefresh (dialog);
+ wrefresh (menu);
+
+ continue; /* wait for another key press */
+ }
+
+ switch (key) {
+ case KEY_LEFT:
+ case TAB:
+ case KEY_RIGHT:
+ button = ((key == KEY_LEFT ? --button : ++button) < 0)
+ ? 2 : (button > 2 ? 0 : button);
+
+ print_buttons(dialog, height, width, button);
+ wrefresh (menu);
+ break;
+ case ' ':
+ case 's':
+ case 'y':
+ case 'n':
+ case 'm':
+ case '/':
+ /* save scroll info */
+ if ( (f=fopen("lxdialog.scrltmp","w")) != NULL ) {
+ fprintf(f,"%d\n",scroll);
+ fclose(f);
+ }
+ delwin (dialog);
+ items[scroll + choice]->selected = 1;
+ switch (key) {
+ case 's': return 3;
+ case 'y': return 3;
+ case 'n': return 4;
+ case 'm': return 5;
+ case ' ': return 6;
+ case '/': return 7;
+ }
+ return 0;
+ case 'h':
+ case '?':
+ button = 2;
+ case '\n':
+ delwin (dialog);
+ items[scroll + choice]->selected = 1;
+
+ remove("lxdialog.scrltmp");
+ return button;
+ case 'e':
+ case 'x':
+ key = ESC;
+ case ESC:
+ break;
+ }
+ }
+
+ delwin (dialog);
+ remove("lxdialog.scrltmp");
+ return -1; /* ESC pressed */
+}
diff --git a/misc/buildroot/package/config/lxdialog/msgbox.c b/misc/buildroot/package/config/lxdialog/msgbox.c
new file mode 100644
index 000000000..93692e1fb
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/msgbox.c
@@ -0,0 +1,85 @@
+/*
+ * msgbox.c -- implements the message box and info box
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "dialog.h"
+
+/*
+ * Display a message box. Program will pause and display an "OK" button
+ * if the parameter 'pause' is non-zero.
+ */
+int
+dialog_msgbox (const char *title, const char *prompt, int height, int width,
+ int pause)
+{
+ int i, x, y, key = 0;
+ WINDOW *dialog;
+
+ /* center dialog box on screen */
+ x = (COLS - width) / 2;
+ y = (LINES - height) / 2;
+
+ draw_shadow (stdscr, y, x, height, width);
+
+ dialog = newwin (height, width, y, x);
+ keypad (dialog, TRUE);
+
+ draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
+ if (title != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
+ waddstr (dialog, (char *)title);
+ waddch (dialog, ' ');
+ }
+ wattrset (dialog, dialog_attr);
+ print_autowrap (dialog, prompt, width - 2, 1, 2);
+
+ if (pause) {
+ wattrset (dialog, border_attr);
+ mvwaddch (dialog, height - 3, 0, ACS_LTEE);
+ for (i = 0; i < width - 2; i++)
+ waddch (dialog, ACS_HLINE);
+ wattrset (dialog, dialog_attr);
+ waddch (dialog, ACS_RTEE);
+
+ print_button (dialog, " Ok ",
+ height - 2, width / 2 - 4, TRUE);
+
+ wrefresh (dialog);
+ while (key != ESC && key != '\n' && key != ' ' &&
+ key != 'O' && key != 'o' && key != 'X' && key != 'x')
+ key = wgetch (dialog);
+ } else {
+ key = '\n';
+ wrefresh (dialog);
+ }
+
+ delwin (dialog);
+ return key == ESC ? -1 : 0;
+}
diff --git a/misc/buildroot/package/config/lxdialog/textbox.c b/misc/buildroot/package/config/lxdialog/textbox.c
new file mode 100644
index 000000000..a5a460b5c
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/textbox.c
@@ -0,0 +1,556 @@
+/*
+ * textbox.c -- implements the text box
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "dialog.h"
+
+static void back_lines (int n);
+static void print_page (WINDOW * win, int height, int width);
+static void print_line (WINDOW * win, int row, int width);
+static char *get_line (void);
+static void print_position (WINDOW * win, int height, int width);
+
+static int hscroll, fd, file_size, bytes_read;
+static int begin_reached = 1, end_reached, page_length;
+static char *buf, *page;
+
+/*
+ * Display text from a file in a dialog box.
+ */
+int
+dialog_textbox (const char *title, const char *file, int height, int width)
+{
+ int i, x, y, cur_x, cur_y, fpos, key = 0;
+ int passed_end;
+ char search_term[MAX_LEN + 1];
+ WINDOW *dialog, *text;
+
+ search_term[0] = '\0'; /* no search term entered yet */
+
+ /* Open input file for reading */
+ if ((fd = open (file, O_RDONLY)) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nCan't open input file in dialog_textbox().\n");
+ exit (-1);
+ }
+ /* Get file size. Actually, 'file_size' is the real file size - 1,
+ since it's only the last byte offset from the beginning */
+ if ((file_size = lseek (fd, 0, SEEK_END)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError getting file size in dialog_textbox().\n");
+ exit (-1);
+ }
+ /* Restore file pointer to beginning of file after getting file size */
+ if (lseek (fd, 0, SEEK_SET) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer in dialog_textbox().\n");
+ exit (-1);
+ }
+ /* Allocate space for read buffer */
+ if ((buf = malloc (BUF_SIZE + 1)) == NULL) {
+ endwin ();
+ fprintf (stderr, "\nCan't allocate memory in dialog_textbox().\n");
+ exit (-1);
+ }
+ if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError reading file in dialog_textbox().\n");
+ exit (-1);
+ }
+ buf[bytes_read] = '\0'; /* mark end of valid data */
+ page = buf; /* page is pointer to start of page to be displayed */
+
+ /* center dialog box on screen */
+ x = (COLS - width) / 2;
+ y = (LINES - height) / 2;
+
+
+ draw_shadow (stdscr, y, x, height, width);
+
+ dialog = newwin (height, width, y, x);
+ keypad (dialog, TRUE);
+
+ /* Create window for text region, used for scrolling text */
+ text = subwin (dialog, height - 4, width - 2, y + 1, x + 1);
+ wattrset (text, dialog_attr);
+ wbkgdset (text, dialog_attr & A_COLOR);
+
+ keypad (text, TRUE);
+
+ /* register the new window, along with its borders */
+ draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+
+ wattrset (dialog, border_attr);
+ mvwaddch (dialog, height-3, 0, ACS_LTEE);
+ for (i = 0; i < width - 2; i++)
+ waddch (dialog, ACS_HLINE);
+ wattrset (dialog, dialog_attr);
+ wbkgdset (dialog, dialog_attr & A_COLOR);
+ waddch (dialog, ACS_RTEE);
+
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
+ if (title != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
+ waddstr (dialog, (char *)title);
+ waddch (dialog, ' ');
+ }
+ print_button (dialog, " Exit ", height - 2, width / 2 - 4, TRUE);
+ wnoutrefresh (dialog);
+ getyx (dialog, cur_y, cur_x); /* Save cursor position */
+
+ /* Print first page of text */
+ attr_clear (text, height - 4, width - 2, dialog_attr);
+ print_page (text, height - 4, width - 2);
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x); /* Restore cursor position */
+ wrefresh (dialog);
+
+ while ((key != ESC) && (key != '\n')) {
+ key = wgetch (dialog);
+ switch (key) {
+ case 'E': /* Exit */
+ case 'e':
+ case 'X':
+ case 'x':
+ delwin (dialog);
+ free (buf);
+ close (fd);
+ return 0;
+ case 'g': /* First page */
+ case KEY_HOME:
+ if (!begin_reached) {
+ begin_reached = 1;
+ /* First page not in buffer? */
+ if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nError moving file pointer in dialog_textbox().\n");
+ exit (-1);
+ }
+ if (fpos > bytes_read) { /* Yes, we have to read it in */
+ if (lseek (fd, 0, SEEK_SET) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer in "
+ "dialog_textbox().\n");
+ exit (-1);
+ }
+ if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nError reading file in dialog_textbox().\n");
+ exit (-1);
+ }
+ buf[bytes_read] = '\0';
+ }
+ page = buf;
+ print_page (text, height - 4, width - 2);
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x); /* Restore cursor position */
+ wrefresh (dialog);
+ }
+ break;
+ case 'G': /* Last page */
+ case KEY_END:
+
+ end_reached = 1;
+ /* Last page not in buffer? */
+ if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nError moving file pointer in dialog_textbox().\n");
+ exit (-1);
+ }
+ if (fpos < file_size) { /* Yes, we have to read it in */
+ if (lseek (fd, -BUF_SIZE, SEEK_END) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nError moving file pointer in dialog_textbox().\n");
+ exit (-1);
+ }
+ if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nError reading file in dialog_textbox().\n");
+ exit (-1);
+ }
+ buf[bytes_read] = '\0';
+ }
+ page = buf + bytes_read;
+ back_lines (height - 4);
+ print_page (text, height - 4, width - 2);
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x); /* Restore cursor position */
+ wrefresh (dialog);
+ break;
+ case 'K': /* Previous line */
+ case 'k':
+ case KEY_UP:
+ if (!begin_reached) {
+ back_lines (page_length + 1);
+
+ /* We don't call print_page() here but use scrolling to ensure
+ faster screen update. However, 'end_reached' and
+ 'page_length' should still be updated, and 'page' should
+ point to start of next page. This is done by calling
+ get_line() in the following 'for' loop. */
+ scrollok (text, TRUE);
+ wscrl (text, -1); /* Scroll text region down one line */
+ scrollok (text, FALSE);
+ page_length = 0;
+ passed_end = 0;
+ for (i = 0; i < height - 4; i++) {
+ if (!i) {
+ /* print first line of page */
+ print_line (text, 0, width - 2);
+ wnoutrefresh (text);
+ } else
+ /* Called to update 'end_reached' and 'page' */
+ get_line ();
+ if (!passed_end)
+ page_length++;
+ if (end_reached && !passed_end)
+ passed_end = 1;
+ }
+
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x); /* Restore cursor position */
+ wrefresh (dialog);
+ }
+ break;
+ case 'B': /* Previous page */
+ case 'b':
+ case KEY_PPAGE:
+ if (begin_reached)
+ break;
+ back_lines (page_length + height - 4);
+ print_page (text, height - 4, width - 2);
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x);
+ wrefresh (dialog);
+ break;
+ case 'J': /* Next line */
+ case 'j':
+ case KEY_DOWN:
+ if (!end_reached) {
+ begin_reached = 0;
+ scrollok (text, TRUE);
+ scroll (text); /* Scroll text region up one line */
+ scrollok (text, FALSE);
+ print_line (text, height - 5, width - 2);
+ wnoutrefresh (text);
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x); /* Restore cursor position */
+ wrefresh (dialog);
+ }
+ break;
+ case KEY_NPAGE: /* Next page */
+ case ' ':
+ if (end_reached)
+ break;
+
+ begin_reached = 0;
+ print_page (text, height - 4, width - 2);
+ print_position (dialog, height, width);
+ wmove (dialog, cur_y, cur_x);
+ wrefresh (dialog);
+ break;
+ case '0': /* Beginning of line */
+ case 'H': /* Scroll left */
+ case 'h':
+ case KEY_LEFT:
+ if (hscroll <= 0)
+ break;
+
+ if (key == '0')
+ hscroll = 0;
+ else
+ hscroll--;
+ /* Reprint current page to scroll horizontally */
+ back_lines (page_length);
+ print_page (text, height - 4, width - 2);
+ wmove (dialog, cur_y, cur_x);
+ wrefresh (dialog);
+ break;
+ case 'L': /* Scroll right */
+ case 'l':
+ case KEY_RIGHT:
+ if (hscroll >= MAX_LEN)
+ break;
+ hscroll++;
+ /* Reprint current page to scroll horizontally */
+ back_lines (page_length);
+ print_page (text, height - 4, width - 2);
+ wmove (dialog, cur_y, cur_x);
+ wrefresh (dialog);
+ break;
+ case ESC:
+ break;
+ }
+ }
+
+ delwin (dialog);
+ free (buf);
+ close (fd);
+ return 1; /* ESC pressed */
+}
+
+/*
+ * Go back 'n' lines in text file. Called by dialog_textbox().
+ * 'page' will be updated to point to the desired line in 'buf'.
+ */
+static void
+back_lines (int n)
+{
+ int i, fpos;
+
+ begin_reached = 0;
+ /* We have to distinguish between end_reached and !end_reached
+ since at end of file, the line is not ended by a '\n'.
+ The code inside 'if' basically does a '--page' to move one
+ character backward so as to skip '\n' of the previous line */
+ if (!end_reached) {
+ /* Either beginning of buffer or beginning of file reached? */
+ if (page == buf) {
+ if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer in "
+ "back_lines().\n");
+ exit (-1);
+ }
+ if (fpos > bytes_read) { /* Not beginning of file yet */
+ /* We've reached beginning of buffer, but not beginning of
+ file yet, so read previous part of file into buffer.
+ Note that we only move backward for BUF_SIZE/2 bytes,
+ but not BUF_SIZE bytes to avoid re-reading again in
+ print_page() later */
+ /* Really possible to move backward BUF_SIZE/2 bytes? */
+ if (fpos < BUF_SIZE / 2 + bytes_read) {
+ /* No, move less then */
+ if (lseek (fd, 0, SEEK_SET) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer in "
+ "back_lines().\n");
+ exit (-1);
+ }
+ page = buf + fpos - bytes_read;
+ } else { /* Move backward BUF_SIZE/2 bytes */
+ if (lseek (fd, -(BUF_SIZE / 2 + bytes_read), SEEK_CUR)
+ == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer "
+ "in back_lines().\n");
+ exit (-1);
+ }
+ page = buf + BUF_SIZE / 2;
+ }
+ if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError reading file in back_lines().\n");
+ exit (-1);
+ }
+ buf[bytes_read] = '\0';
+ } else { /* Beginning of file reached */
+ begin_reached = 1;
+ return;
+ }
+ }
+ if (*(--page) != '\n') { /* '--page' here */
+ /* Something's wrong... */
+ endwin ();
+ fprintf (stderr, "\nInternal error in back_lines().\n");
+ exit (-1);
+ }
+ }
+ /* Go back 'n' lines */
+ for (i = 0; i < n; i++)
+ do {
+ if (page == buf) {
+ if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) {
+ endwin ();
+ fprintf (stderr,
+ "\nError moving file pointer in back_lines().\n");
+ exit (-1);
+ }
+ if (fpos > bytes_read) {
+ /* Really possible to move backward BUF_SIZE/2 bytes? */
+ if (fpos < BUF_SIZE / 2 + bytes_read) {
+ /* No, move less then */
+ if (lseek (fd, 0, SEEK_SET) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer "
+ "in back_lines().\n");
+ exit (-1);
+ }
+ page = buf + fpos - bytes_read;
+ } else { /* Move backward BUF_SIZE/2 bytes */
+ if (lseek (fd, -(BUF_SIZE / 2 + bytes_read),
+ SEEK_CUR) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer"
+ " in back_lines().\n");
+ exit (-1);
+ }
+ page = buf + BUF_SIZE / 2;
+ }
+ if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError reading file in "
+ "back_lines().\n");
+ exit (-1);
+ }
+ buf[bytes_read] = '\0';
+ } else { /* Beginning of file reached */
+ begin_reached = 1;
+ return;
+ }
+ }
+ } while (*(--page) != '\n');
+ page++;
+}
+
+/*
+ * Print a new page of text. Called by dialog_textbox().
+ */
+static void
+print_page (WINDOW * win, int height, int width)
+{
+ int i, passed_end = 0;
+
+ page_length = 0;
+ for (i = 0; i < height; i++) {
+ print_line (win, i, width);
+ if (!passed_end)
+ page_length++;
+ if (end_reached && !passed_end)
+ passed_end = 1;
+ }
+ wnoutrefresh (win);
+}
+
+/*
+ * Print a new line of text. Called by dialog_textbox() and print_page().
+ */
+static void
+print_line (WINDOW * win, int row, int width)
+{
+ int y, x;
+ char *line;
+
+ line = get_line ();
+ line += MIN (strlen (line), hscroll); /* Scroll horizontally */
+ wmove (win, row, 0); /* move cursor to correct line */
+ waddch (win, ' ');
+ waddnstr (win, line, MIN (strlen (line), width - 2));
+
+ getyx (win, y, x);
+ /* Clear 'residue' of previous line */
+#if OLD_NCURSES
+ {
+ int i;
+ for (i = 0; i < width - x; i++)
+ waddch (win, ' ');
+ }
+#else
+ wclrtoeol(win);
+#endif
+}
+
+/*
+ * Return current line of text. Called by dialog_textbox() and print_line().
+ * 'page' should point to start of current line before calling, and will be
+ * updated to point to start of next line.
+ */
+static char *
+get_line (void)
+{
+ int i = 0, fpos;
+ static char line[MAX_LEN + 1];
+
+ end_reached = 0;
+ while (*page != '\n') {
+ if (*page == '\0') {
+ /* Either end of file or end of buffer reached */
+ if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer in "
+ "get_line().\n");
+ exit (-1);
+ }
+ if (fpos < file_size) { /* Not end of file yet */
+ /* We've reached end of buffer, but not end of file yet,
+ so read next part of file into buffer */
+ if ((bytes_read = read (fd, buf, BUF_SIZE)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError reading file in get_line().\n");
+ exit (-1);
+ }
+ buf[bytes_read] = '\0';
+ page = buf;
+ } else {
+ if (!end_reached)
+ end_reached = 1;
+ break;
+ }
+ } else if (i < MAX_LEN)
+ line[i++] = *(page++);
+ else {
+ /* Truncate lines longer than MAX_LEN characters */
+ if (i == MAX_LEN)
+ line[i++] = '\0';
+ page++;
+ }
+ }
+ if (i <= MAX_LEN)
+ line[i] = '\0';
+ if (!end_reached)
+ page++; /* move pass '\n' */
+
+ return line;
+}
+
+/*
+ * Print current position
+ */
+static void
+print_position (WINDOW * win, int height, int width)
+{
+ int fpos, percent;
+
+ if ((fpos = lseek (fd, 0, SEEK_CUR)) == -1) {
+ endwin ();
+ fprintf (stderr, "\nError moving file pointer in print_position().\n");
+ exit (-1);
+ }
+ wattrset (win, position_indicator_attr);
+ wbkgdset (win, position_indicator_attr & A_COLOR);
+ percent = !file_size ?
+ 100 : ((fpos - bytes_read + page - buf) * 100) / file_size;
+ wmove (win, height - 3, width - 9);
+ wprintw (win, "(%3d%%)", percent);
+}
diff --git a/misc/buildroot/package/config/lxdialog/util.c b/misc/buildroot/package/config/lxdialog/util.c
new file mode 100644
index 000000000..6f83951b9
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/util.c
@@ -0,0 +1,375 @@
+/*
+ * util.c
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "dialog.h"
+
+
+/* use colors by default? */
+bool use_colors = 1;
+
+const char *backtitle = NULL;
+
+const char *dialog_result;
+
+/*
+ * Attribute values, default is for mono display
+ */
+chtype attributes[] =
+{
+ A_NORMAL, /* screen_attr */
+ A_NORMAL, /* shadow_attr */
+ A_NORMAL, /* dialog_attr */
+ A_BOLD, /* title_attr */
+ A_NORMAL, /* border_attr */
+ A_REVERSE, /* button_active_attr */
+ A_DIM, /* button_inactive_attr */
+ A_REVERSE, /* button_key_active_attr */
+ A_BOLD, /* button_key_inactive_attr */
+ A_REVERSE, /* button_label_active_attr */
+ A_NORMAL, /* button_label_inactive_attr */
+ A_NORMAL, /* inputbox_attr */
+ A_NORMAL, /* inputbox_border_attr */
+ A_NORMAL, /* searchbox_attr */
+ A_BOLD, /* searchbox_title_attr */
+ A_NORMAL, /* searchbox_border_attr */
+ A_BOLD, /* position_indicator_attr */
+ A_NORMAL, /* menubox_attr */
+ A_NORMAL, /* menubox_border_attr */
+ A_NORMAL, /* item_attr */
+ A_REVERSE, /* item_selected_attr */
+ A_BOLD, /* tag_attr */
+ A_REVERSE, /* tag_selected_attr */
+ A_BOLD, /* tag_key_attr */
+ A_REVERSE, /* tag_key_selected_attr */
+ A_BOLD, /* check_attr */
+ A_REVERSE, /* check_selected_attr */
+ A_BOLD, /* uarrow_attr */
+ A_BOLD /* darrow_attr */
+};
+
+
+#include "colors.h"
+
+/*
+ * Table of color values
+ */
+int color_table[][3] =
+{
+ {SCREEN_FG, SCREEN_BG, SCREEN_HL},
+ {SHADOW_FG, SHADOW_BG, SHADOW_HL},
+ {DIALOG_FG, DIALOG_BG, DIALOG_HL},
+ {TITLE_FG, TITLE_BG, TITLE_HL},
+ {BORDER_FG, BORDER_BG, BORDER_HL},
+ {BUTTON_ACTIVE_FG, BUTTON_ACTIVE_BG, BUTTON_ACTIVE_HL},
+ {BUTTON_INACTIVE_FG, BUTTON_INACTIVE_BG, BUTTON_INACTIVE_HL},
+ {BUTTON_KEY_ACTIVE_FG, BUTTON_KEY_ACTIVE_BG, BUTTON_KEY_ACTIVE_HL},
+ {BUTTON_KEY_INACTIVE_FG, BUTTON_KEY_INACTIVE_BG, BUTTON_KEY_INACTIVE_HL},
+ {BUTTON_LABEL_ACTIVE_FG, BUTTON_LABEL_ACTIVE_BG, BUTTON_LABEL_ACTIVE_HL},
+ {BUTTON_LABEL_INACTIVE_FG, BUTTON_LABEL_INACTIVE_BG,
+ BUTTON_LABEL_INACTIVE_HL},
+ {INPUTBOX_FG, INPUTBOX_BG, INPUTBOX_HL},
+ {INPUTBOX_BORDER_FG, INPUTBOX_BORDER_BG, INPUTBOX_BORDER_HL},
+ {SEARCHBOX_FG, SEARCHBOX_BG, SEARCHBOX_HL},
+ {SEARCHBOX_TITLE_FG, SEARCHBOX_TITLE_BG, SEARCHBOX_TITLE_HL},
+ {SEARCHBOX_BORDER_FG, SEARCHBOX_BORDER_BG, SEARCHBOX_BORDER_HL},
+ {POSITION_INDICATOR_FG, POSITION_INDICATOR_BG, POSITION_INDICATOR_HL},
+ {MENUBOX_FG, MENUBOX_BG, MENUBOX_HL},
+ {MENUBOX_BORDER_FG, MENUBOX_BORDER_BG, MENUBOX_BORDER_HL},
+ {ITEM_FG, ITEM_BG, ITEM_HL},
+ {ITEM_SELECTED_FG, ITEM_SELECTED_BG, ITEM_SELECTED_HL},
+ {TAG_FG, TAG_BG, TAG_HL},
+ {TAG_SELECTED_FG, TAG_SELECTED_BG, TAG_SELECTED_HL},
+ {TAG_KEY_FG, TAG_KEY_BG, TAG_KEY_HL},
+ {TAG_KEY_SELECTED_FG, TAG_KEY_SELECTED_BG, TAG_KEY_SELECTED_HL},
+ {CHECK_FG, CHECK_BG, CHECK_HL},
+ {CHECK_SELECTED_FG, CHECK_SELECTED_BG, CHECK_SELECTED_HL},
+ {UARROW_FG, UARROW_BG, UARROW_HL},
+ {DARROW_FG, DARROW_BG, DARROW_HL},
+}; /* color_table */
+
+/*
+ * Set window to attribute 'attr'
+ */
+void
+attr_clear (WINDOW * win, int height, int width, chtype attr)
+{
+ int i, j;
+
+ wattrset (win, attr);
+ for (i = 0; i < height; i++) {
+ wmove (win, i, 0);
+ for (j = 0; j < width; j++)
+ waddch (win, ' ');
+ }
+ touchwin (win);
+}
+
+void dialog_clear (void)
+{
+ attr_clear (stdscr, LINES, COLS, screen_attr);
+ /* Display background title if it exists ... - SLH */
+ if (backtitle != NULL) {
+ int i;
+
+ wattrset (stdscr, screen_attr);
+ mvwaddstr (stdscr, 0, 1, (char *)backtitle);
+ wmove (stdscr, 1, 1);
+ for (i = 1; i < COLS - 1; i++)
+ waddch (stdscr, ACS_HLINE);
+ }
+ wnoutrefresh (stdscr);
+}
+
+/*
+ * Do some initialization for dialog
+ */
+void
+init_dialog (void)
+{
+ initscr (); /* Init curses */
+ keypad (stdscr, TRUE);
+ cbreak ();
+ noecho ();
+
+
+ if (use_colors) /* Set up colors */
+ color_setup ();
+
+
+ dialog_clear ();
+}
+
+/*
+ * Setup for color display
+ */
+void
+color_setup (void)
+{
+ int i;
+
+ if (has_colors ()) { /* Terminal supports color? */
+ start_color ();
+
+ /* Initialize color pairs */
+ for (i = 0; i < ATTRIBUTE_COUNT; i++)
+ init_pair (i + 1, color_table[i][0], color_table[i][1]);
+
+ /* Setup color attributes */
+ for (i = 0; i < ATTRIBUTE_COUNT; i++)
+ attributes[i] = C_ATTR (color_table[i][2], i + 1);
+ }
+}
+
+/*
+ * End using dialog functions.
+ */
+void
+end_dialog (void)
+{
+ endwin ();
+}
+
+
+/*
+ * Print a string of text in a window, automatically wrap around to the
+ * next line if the string is too long to fit on one line. Newline
+ * characters '\n' are replaced by spaces. We start on a new line
+ * if there is no room for at least 4 nonblanks following a double-space.
+ */
+void
+print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x)
+{
+ int newl, cur_x, cur_y;
+ int i, prompt_len, room, wlen;
+ char tempstr[MAX_LEN + 1], *word, *sp, *sp2;
+
+ strcpy (tempstr, prompt);
+
+ prompt_len = strlen(tempstr);
+
+ /*
+ * Remove newlines
+ */
+ for(i=0; i<prompt_len; i++) {
+ if(tempstr[i] == '\n') tempstr[i] = ' ';
+ }
+
+ if (prompt_len <= width - x * 2) { /* If prompt is short */
+ wmove (win, y, (width - prompt_len) / 2);
+ waddstr (win, tempstr);
+ } else {
+ cur_x = x;
+ cur_y = y;
+ newl = 1;
+ word = tempstr;
+ while (word && *word) {
+ sp = index(word, ' ');
+ if (sp)
+ *sp++ = 0;
+
+ /* Wrap to next line if either the word does not fit,
+ or it is the first word of a new sentence, and it is
+ short, and the next word does not fit. */
+ room = width - cur_x;
+ wlen = strlen(word);
+ if (wlen > room ||
+ (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room
+ && (!(sp2 = index(sp, ' ')) || wlen+1+(sp2-sp) > room))) {
+ cur_y++;
+ cur_x = x;
+ }
+ wmove (win, cur_y, cur_x);
+ waddstr (win, word);
+ getyx (win, cur_y, cur_x);
+ cur_x++;
+ if (sp && *sp == ' ') {
+ cur_x++; /* double space */
+ while (*++sp == ' ');
+ newl = 1;
+ } else
+ newl = 0;
+ word = sp;
+ }
+ }
+}
+
+/*
+ * Print a button
+ */
+void
+print_button (WINDOW * win, const char *label, int y, int x, int selected)
+{
+ int i, temp;
+
+ wmove (win, y, x);
+ wattrset (win, selected ? button_active_attr : button_inactive_attr);
+ waddstr (win, "<");
+ temp = strspn (label, " ");
+ label += temp;
+ wattrset (win, selected ? button_label_active_attr
+ : button_label_inactive_attr);
+ for (i = 0; i < temp; i++)
+ waddch (win, ' ');
+ wattrset (win, selected ? button_key_active_attr
+ : button_key_inactive_attr);
+ waddch (win, label[0]);
+ wattrset (win, selected ? button_label_active_attr
+ : button_label_inactive_attr);
+ waddstr (win, (char *)label + 1);
+ wattrset (win, selected ? button_active_attr : button_inactive_attr);
+ waddstr (win, ">");
+ wmove (win, y, x + temp + 1);
+}
+
+/*
+ * Draw a rectangular box with line drawing characters
+ */
+void
+draw_box (WINDOW * win, int y, int x, int height, int width,
+ chtype box, chtype border)
+{
+ int i, j;
+
+ wattrset (win, 0);
+ for (i = 0; i < height; i++) {
+ wmove (win, y + i, x);
+ for (j = 0; j < width; j++)
+ if (!i && !j)
+ waddch (win, border | ACS_ULCORNER);
+ else if (i == height - 1 && !j)
+ waddch (win, border | ACS_LLCORNER);
+ else if (!i && j == width - 1)
+ waddch (win, box | ACS_URCORNER);
+ else if (i == height - 1 && j == width - 1)
+ waddch (win, box | ACS_LRCORNER);
+ else if (!i)
+ waddch (win, border | ACS_HLINE);
+ else if (i == height - 1)
+ waddch (win, box | ACS_HLINE);
+ else if (!j)
+ waddch (win, border | ACS_VLINE);
+ else if (j == width - 1)
+ waddch (win, box | ACS_VLINE);
+ else
+ waddch (win, box | ' ');
+ }
+}
+
+/*
+ * Draw shadows along the right and bottom edge to give a more 3D look
+ * to the boxes
+ */
+void
+draw_shadow (WINDOW * win, int y, int x, int height, int width)
+{
+ int i;
+
+ if (has_colors ()) { /* Whether terminal supports color? */
+ wattrset (win, shadow_attr);
+ wmove (win, y + height, x + 2);
+ for (i = 0; i < width; i++)
+ waddch (win, winch (win) & A_CHARTEXT);
+ for (i = y + 1; i < y + height + 1; i++) {
+ wmove (win, i, x + width);
+ waddch (win, winch (win) & A_CHARTEXT);
+ waddch (win, winch (win) & A_CHARTEXT);
+ }
+ wnoutrefresh (win);
+ }
+}
+
+/*
+ * Return the position of the first alphabetic character in a string.
+ */
+int
+first_alpha(const char *string, const char *exempt)
+{
+ int i, in_paren=0, c;
+
+ for (i = 0; i < strlen(string); i++) {
+ c = tolower(string[i]);
+
+ if (strchr("<[(", c)) ++in_paren;
+ if (strchr(">])", c) && in_paren > 0) --in_paren;
+
+ if ((! in_paren) && isalpha(c) &&
+ strchr(exempt, c) == 0)
+ return i;
+ }
+
+ return 0;
+}
+
+/*
+ * Get the first selected item in the dialog_list_item list.
+ */
+struct dialog_list_item *
+first_sel_item(int item_no, struct dialog_list_item ** items)
+{
+ int i;
+
+ for (i = 0; i < item_no; i++) {
+ if (items[i]->selected)
+ return items[i];
+ }
+
+ return NULL;
+}
diff --git a/misc/buildroot/package/config/lxdialog/yesno.c b/misc/buildroot/package/config/lxdialog/yesno.c
new file mode 100644
index 000000000..11fcc25f5
--- /dev/null
+++ b/misc/buildroot/package/config/lxdialog/yesno.c
@@ -0,0 +1,118 @@
+/*
+ * yesno.c -- implements the yes/no box
+ *
+ * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
+ * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
+ *
+ * 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 2
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "dialog.h"
+
+/*
+ * Display termination buttons
+ */
+static void
+print_buttons(WINDOW *dialog, int height, int width, int selected)
+{
+ int x = width / 2 - 10;
+ int y = height - 2;
+
+ print_button (dialog, " Yes ", y, x, selected == 0);
+ print_button (dialog, " No ", y, x + 13, selected == 1);
+
+ wmove(dialog, y, x+1 + 13*selected );
+ wrefresh (dialog);
+}
+
+/*
+ * Display a dialog box with two buttons - Yes and No
+ */
+int
+dialog_yesno (const char *title, const char *prompt, int height, int width)
+{
+ int i, x, y, key = 0, button = 0;
+ WINDOW *dialog;
+
+ /* center dialog box on screen */
+ x = (COLS - width) / 2;
+ y = (LINES - height) / 2;
+
+ draw_shadow (stdscr, y, x, height, width);
+
+ dialog = newwin (height, width, y, x);
+ keypad (dialog, TRUE);
+
+ draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
+ wattrset (dialog, border_attr);
+ mvwaddch (dialog, height-3, 0, ACS_LTEE);
+ for (i = 0; i < width - 2; i++)
+ waddch (dialog, ACS_HLINE);
+ wattrset (dialog, dialog_attr);
+ waddch (dialog, ACS_RTEE);
+
+ if (title != NULL && strlen(title) >= width-2 ) {
+ /* truncate long title -- mec */
+ char * title2 = malloc(width-2+1);
+ memcpy( title2, title, width-2 );
+ title2[width-2] = '\0';
+ title = title2;
+ }
+
+ if (title != NULL) {
+ wattrset (dialog, title_attr);
+ mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
+ waddstr (dialog, (char *)title);
+ waddch (dialog, ' ');
+ }
+
+ wattrset (dialog, dialog_attr);
+ print_autowrap (dialog, prompt, width - 2, 1, 3);
+
+ print_buttons(dialog, height, width, 0);
+
+ while (key != ESC) {
+ key = wgetch (dialog);
+ switch (key) {
+ case 'Y':
+ case 'y':
+ delwin (dialog);
+ return 0;
+ case 'N':
+ case 'n':
+ delwin (dialog);
+ return 1;
+
+ case TAB:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ button = ((key == KEY_LEFT ? --button : ++button) < 0)
+ ? 1 : (button > 1 ? 0 : button);
+
+ print_buttons(dialog, height, width, button);
+ wrefresh (dialog);
+ break;
+ case ' ':
+ case '\n':
+ delwin (dialog);
+ return button;
+ case ESC:
+ break;
+ }
+ }
+
+ delwin (dialog);
+ return -1; /* ESC pressed */
+}
diff --git a/misc/buildroot/package/config/mconf.c b/misc/buildroot/package/config/mconf.c
new file mode 100644
index 000000000..3f645d44a
--- /dev/null
+++ b/misc/buildroot/package/config/mconf.c
@@ -0,0 +1,973 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ *
+ * Introduced single menu mode (show all sub-menus in one large tree).
+ * 2002-11-06 Petr Baudis <pasky@ucw.cz>
+ *
+ * Directly use liblxdialog library routines.
+ * 2002-11-14 Petr Baudis <pasky@ucw.cz>
+ */
+
+#include <sys/ioctl.h>
+#include <sys/wait.h>
+#include <sys/termios.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include "lxdialog/dialog.h"
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+static char menu_backtitle[128];
+static const char mconf_readme[] =
+"Overview\n"
+"--------\n"
+"Some features may be built directly into Buildroot. Some features\n"
+"may be completely removed altogether. There are also certain\n"
+"parameters which are not really features, but must be\n"
+"entered in as decimal or hexadecimal numbers or possibly text.\n"
+"\n"
+"Menu items beginning with [*] or [ ] represent features\n"
+"configured to be built in or removed respectively.\n"
+"\n"
+"To change any of these features, highlight it with the cursor\n"
+"keys and press <Y> to build it in or <N> to removed it.\n"
+"You may also press the <Space Bar> to cycle\n"
+"through the available options (ie. Y->N->Y).\n"
+"\n"
+"Some additional keyboard hints:\n"
+"\n"
+"Menus\n"
+"----------\n"
+"o Use the Up/Down arrow keys (cursor keys) to highlight the item\n"
+" you wish to change or submenu wish to select and press <Enter>.\n"
+" Submenus are designated by \"--->\".\n"
+"\n"
+" Shortcut: Press the option's highlighted letter (hotkey).\n"
+" Pressing a hotkey more than once will sequence\n"
+" through all visible items which use that hotkey.\n"
+"\n"
+" You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n"
+" unseen options into view.\n"
+"\n"
+"o To exit a menu use the cursor keys to highlight the <Exit> button\n"
+" and press <ENTER>.\n"
+"\n"
+" Shortcut: Press <ESC><ESC> or <E> or <X> if there is no hotkey\n"
+" using those letters. You may press a single <ESC>, but\n"
+" there is a delayed response which you may find annoying.\n"
+"\n"
+" Also, the <TAB> and cursor keys will cycle between <Select>,\n"
+" <Exit> and <Help>\n"
+"\n"
+"o To get help with an item, use the cursor keys to highlight <Help>\n"
+" and Press <ENTER>.\n"
+"\n"
+" Shortcut: Press <H> or <?>.\n"
+"\n"
+"\n"
+"Radiolists (Choice lists)\n"
+"-----------\n"
+"o Use the cursor keys to select the option you wish to set and press\n"
+" <S> or the <SPACE BAR>.\n"
+"\n"
+" Shortcut: Press the first letter of the option you wish to set then\n"
+" press <S> or <SPACE BAR>.\n"
+"\n"
+"o To see available help for the item, use the cursor keys to highlight\n"
+" <Help> and Press <ENTER>.\n"
+"\n"
+" Shortcut: Press <H> or <?>.\n"
+"\n"
+" Also, the <TAB> and cursor keys will cycle between <Select> and\n"
+" <Help>\n"
+"\n"
+"\n"
+"Data Entry\n"
+"-----------\n"
+"o Enter the requested information and press <ENTER>\n"
+" If you are entering hexadecimal values, it is not necessary to\n"
+" add the '0x' prefix to the entry.\n"
+"\n"
+"o For help, use the <TAB> or cursor keys to highlight the help option\n"
+" and press <ENTER>. You can try <TAB><H> as well.\n"
+"\n"
+"\n"
+"Text Box (Help Window)\n"
+"--------\n"
+"o Use the cursor keys to scroll up/down/left/right. The VI editor\n"
+" keys h,j,k,l function here as do <SPACE BAR> and <B> for those\n"
+" who are familiar with less and lynx.\n"
+"\n"
+"o Press <E>, <X>, <Enter> or <Esc><Esc> to exit.\n"
+"\n"
+"\n"
+"Alternate Configuration Files\n"
+"-----------------------------\n"
+"Menuconfig supports the use of alternate configuration files for\n"
+"those who, for various reasons, find it necessary to switch\n"
+"between different configurations.\n"
+"\n"
+"At the end of the main menu you will find two options. One is\n"
+"for saving the current configuration to a file of your choosing.\n"
+"The other option is for loading a previously saved alternate\n"
+"configuration.\n"
+"\n"
+"Even if you don't use alternate configuration files, but you\n"
+"find during a Menuconfig session that you have completely messed\n"
+"up your settings, you may use the \"Load Alternate...\" option to\n"
+"restore your previously saved settings from \".config\" without\n"
+"restarting Menuconfig.\n"
+"\n"
+"Other information\n"
+"-----------------\n"
+"If you use Menuconfig in an XTERM window make sure you have your\n"
+"$TERM variable set to point to a xterm definition which supports color.\n"
+"Otherwise, Menuconfig will look rather bad. Menuconfig will not\n"
+"display correctly in a RXVT window because rxvt displays only one\n"
+"intensity of color, bright.\n"
+"\n"
+"Menuconfig will display larger menus on screens or xterms which are\n"
+"set to display more than the standard 25 row by 80 column geometry.\n"
+"In order for this to work, the \"stty size\" command must be able to\n"
+"display the screen's current row and column geometry. I STRONGLY\n"
+"RECOMMEND that you make sure you do NOT have the shell variables\n"
+"LINES and COLUMNS exported into your environment. Some distributions\n"
+"export those variables via /etc/profile. Some ncurses programs can\n"
+"become confused when those variables (LINES & COLUMNS) don't reflect\n"
+"the true screen size.\n"
+"\n"
+"Optional personality available\n"
+"------------------------------\n"
+"If you prefer to have all of the options listed in a single\n"
+"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
+"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
+"\n"
+"make MENUCONFIG_MODE=single_menu menuconfig\n"
+"\n"
+"<Enter> will then unroll the appropriate category, or enfold it if it\n"
+"is already unrolled.\n"
+"\n"
+"Note that this mode can eventually be a little more CPU expensive\n"
+"(especially with a larger number of unrolled categories) than the\n"
+"default mode.\n",
+menu_instructions[] =
+ "Arrow keys navigate the menu. "
+ "<Enter> selects submenus --->. "
+ "Highlighted letters are hotkeys. "
+ "Pressing <Y> selectes a feature, while <N> will exclude a feature. "
+ "Press <Esc><Esc> to exit, <?> for Help, </> for Search. "
+ "Legend: [*] feature is selected [ ] feature is excluded",
+radiolist_instructions[] =
+ "Use the arrow keys to navigate this window or "
+ "press the hotkey of the item you wish to select "
+ "followed by the <SPACE BAR>. "
+ "Press <?> for additional information about this option.",
+inputbox_instructions_int[] =
+ "Please enter a decimal value. "
+ "Fractions will not be accepted. "
+ "Use the <TAB> key to move from the input field to the buttons below it.",
+inputbox_instructions_hex[] =
+ "Please enter a hexadecimal value. "
+ "Use the <TAB> key to move from the input field to the buttons below it.",
+inputbox_instructions_string[] =
+ "Please enter a string value. "
+ "Use the <TAB> key to move from the input field to the buttons below it.",
+setmod_text[] =
+ "This feature depends on another which has been configured as a module.\n"
+ "As a result, this feature will be built as a module.",
+nohelp_text[] =
+ "There is no help available for this option.\n",
+load_config_text[] =
+ "Enter the name of the configuration file you wish to load. "
+ "Accept the name shown to restore the configuration you "
+ "last retrieved. Leave blank to abort.",
+load_config_help[] =
+ "\n"
+ "For various reasons, one may wish to keep several different Buildroot\n"
+ "configurations available on a single machine.\n"
+ "\n"
+ "If you have saved a previous configuration in a file other than the\n"
+ "Buildroot's default, entering the name of the file here will allow you\n"
+ "to modify that configuration.\n"
+ "\n"
+ "If you are uncertain, then you have probably never used alternate\n"
+ "configuration files. You should therefor leave this blank to abort.\n",
+save_config_text[] =
+ "Enter a filename to which this configuration should be saved "
+ "as an alternate. Leave blank to abort.",
+save_config_help[] =
+ "\n"
+ "For various reasons, one may wish to keep different Buildroot\n"
+ "configurations available on a single machine.\n"
+ "\n"
+ "Entering a file name here will allow you to later retrieve, modify\n"
+ "and use the current configuration as an alternate to whatever\n"
+ "configuration options you have selected at that time.\n"
+ "\n"
+ "If you are uncertain what all this means then you should probably\n"
+ "leave this blank.\n",
+search_help[] =
+ "\n"
+ "Search for CONFIG_ symbols and display their relations.\n"
+ "Example: search for \"^FOO\"\n"
+ "Result:\n"
+ "-----------------------------------------------------------------\n"
+ "Symbol: FOO [=m]\n"
+ "Prompt: Foo bus is used to drive the bar HW\n"
+ "Defined at drivers/pci/Kconfig:47\n"
+ "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
+ "Location:\n"
+ " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n"
+ " -> PCI support (PCI [=y])\n"
+ " -> PCI access mode (<choice> [=y])\n"
+ "Selects: LIBCRC32\n"
+ "Selected by: BAR\n"
+ "-----------------------------------------------------------------\n"
+ "o The line 'Prompt:' shows the text used in the menu structure for\n"
+ " this CONFIG_ symbol\n"
+ "o The 'Defined at' line tell at what file / line number the symbol\n"
+ " is defined\n"
+ "o The 'Depends on:' line tell what symbols needs to be defined for\n"
+ " this symbol to be visible in the menu (selectable)\n"
+ "o The 'Location:' lines tell where in the menu structure this symbol\n"
+ " is located\n"
+ " A location followed by a [=y] indicate that this is a selectable\n"
+ " menu item - and current value is displayed inside brackets.\n"
+ "o The 'Selects:' line tell what symbol will be automatically\n"
+ " selected if this symbol is selected (y or m)\n"
+ "o The 'Selected by' line tell what symbol has selected this symbol\n"
+ "\n"
+ "Only relevant lines are shown.\n"
+ "\n\n"
+ "Search examples:\n"
+ "Examples: USB => find all CONFIG_ symbols containing USB\n"
+ " ^USB => find all CONFIG_ symbols starting with USB\n"
+ " USB$ => find all CONFIG_ symbols ending with USB\n"
+ "\n";
+
+static char filename[PATH_MAX+1] = ".config";
+static int indent;
+static struct termios ios_org;
+static int rows = 0, cols = 0;
+static struct menu *current_menu;
+static int child_count;
+static int single_menu_mode;
+
+static struct dialog_list_item *items[16384]; /* FIXME: This ought to be dynamic. */
+static int item_no;
+
+static void conf(struct menu *menu);
+static void conf_choice(struct menu *menu);
+static void conf_string(struct menu *menu);
+static void conf_load(void);
+static void conf_save(void);
+static void show_textbox(const char *title, const char *text, int r, int c);
+static void show_helptext(const char *title, const char *text);
+static void show_help(struct menu *menu);
+static void show_file(const char *filename, const char *title, int r, int c);
+
+static void init_wsize(void)
+{
+ struct winsize ws;
+ char *env;
+
+ if (!ioctl(STDIN_FILENO, TIOCGWINSZ, &ws)) {
+ rows = ws.ws_row;
+ cols = ws.ws_col;
+ }
+
+ if (!rows) {
+ env = getenv("LINES");
+ if (env)
+ rows = atoi(env);
+ if (!rows)
+ rows = 24;
+ }
+ if (!cols) {
+ env = getenv("COLUMNS");
+ if (env)
+ cols = atoi(env);
+ if (!cols)
+ cols = 80;
+ }
+
+ if (rows < 19 || cols < 80) {
+ fprintf(stderr, "Your display is too small to run Menuconfig!\n");
+ fprintf(stderr, "It must be at least 19 lines by 80 columns.\n");
+ exit(1);
+ }
+
+ rows -= 4;
+ cols -= 5;
+}
+
+static void cinit(void)
+{
+ item_no = 0;
+}
+
+static void cmake(void)
+{
+ items[item_no] = malloc(sizeof(struct dialog_list_item));
+ memset(items[item_no], 0, sizeof(struct dialog_list_item));
+ items[item_no]->tag = malloc(32); items[item_no]->tag[0] = 0;
+ items[item_no]->name = malloc(512); items[item_no]->name[0] = 0;
+ items[item_no]->namelen = 0;
+ item_no++;
+}
+
+static int cprint_name(const char *fmt, ...)
+{
+ va_list ap;
+ int res;
+
+ if (!item_no)
+ cmake();
+ va_start(ap, fmt);
+ res = vsnprintf(items[item_no - 1]->name + items[item_no - 1]->namelen,
+ 512 - items[item_no - 1]->namelen, fmt, ap);
+ if (res > 0)
+ items[item_no - 1]->namelen += res;
+ va_end(ap);
+
+ return res;
+}
+
+static int cprint_tag(const char *fmt, ...)
+{
+ va_list ap;
+ int res;
+
+ if (!item_no)
+ cmake();
+ va_start(ap, fmt);
+ res = vsnprintf(items[item_no - 1]->tag, 32, fmt, ap);
+ va_end(ap);
+
+ return res;
+}
+
+static void cdone(void)
+{
+ int i;
+
+ for (i = 0; i < item_no; i++) {
+ free(items[i]->tag);
+ free(items[i]->name);
+ free(items[i]);
+ }
+
+ item_no = 0;
+}
+
+static void get_prompt_str(struct gstr *r, struct property *prop)
+{
+ int i, j;
+ struct menu *submenu[8], *menu;
+
+ str_printf(r, "Prompt: %s\n", prop->text);
+ str_printf(r, " Defined at %s:%d\n", prop->menu->file->name,
+ prop->menu->lineno);
+ if (!expr_is_yes(prop->visible.expr)) {
+ str_append(r, " Depends on: ");
+ expr_gstr_print(prop->visible.expr, r);
+ str_append(r, "\n");
+ }
+ menu = prop->menu->parent;
+ for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
+ submenu[i++] = menu;
+ if (i > 0) {
+ str_printf(r, " Location:\n");
+ for (j = 4; --i >= 0; j += 2) {
+ menu = submenu[i];
+ str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu));
+ if (menu->sym) {
+ str_printf(r, " (%s [=%s])", menu->sym->name ?
+ menu->sym->name : "<choice>",
+ sym_get_string_value(menu->sym));
+ }
+ str_append(r, "\n");
+ }
+ }
+}
+
+static void get_symbol_str(struct gstr *r, struct symbol *sym)
+{
+ bool hit;
+ struct property *prop;
+
+ str_printf(r, "Symbol: %s [=%s]\n", sym->name,
+ sym_get_string_value(sym));
+ for_all_prompts(sym, prop)
+ get_prompt_str(r, prop);
+ hit = false;
+ for_all_properties(sym, prop, P_SELECT) {
+ if (!hit) {
+ str_append(r, " Selects: ");
+ hit = true;
+ } else
+ str_printf(r, " && ");
+ expr_gstr_print(prop->expr, r);
+ }
+ if (hit)
+ str_append(r, "\n");
+ if (sym->rev_dep.expr) {
+ str_append(r, " Selected by: ");
+ expr_gstr_print(sym->rev_dep.expr, r);
+ str_append(r, "\n");
+ }
+ str_append(r, "\n\n");
+}
+
+static struct gstr get_relations_str(struct symbol **sym_arr)
+{
+ struct symbol *sym;
+ struct gstr res = str_new();
+ int i;
+
+ for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
+ get_symbol_str(&res, sym);
+ if (!i)
+ str_append(&res, "No matches found.\n");
+ return res;
+}
+
+static void search_conf(void)
+{
+ struct symbol **sym_arr;
+ struct gstr res;
+
+again:
+ switch (dialog_inputbox("Search Configuration Parameter",
+ "Enter Keyword", 10, 75,
+ NULL)) {
+ case 0:
+ break;
+ case 1:
+ show_helptext("Search Configuration", search_help);
+ goto again;
+ default:
+ return;
+ }
+
+ sym_arr = sym_re_search(dialog_input_result);
+ res = get_relations_str(sym_arr);
+ free(sym_arr);
+ show_textbox("Search Results", str_get(&res), 0, 0);
+ str_free(&res);
+}
+
+static void build_conf(struct menu *menu)
+{
+ struct symbol *sym;
+ struct property *prop;
+ struct menu *child;
+ int type, tmp, doint = 2;
+ tristate val;
+ char ch;
+
+ if (!menu_is_visible(menu))
+ return;
+
+ sym = menu->sym;
+ prop = menu->prompt;
+ if (!sym) {
+ if (prop && menu != current_menu) {
+ const char *prompt = menu_get_prompt(menu);
+ switch (prop->type) {
+ case P_MENU:
+ child_count++;
+ cmake();
+ cprint_tag("m%p", menu);
+
+ if (single_menu_mode) {
+ cprint_name("%s%*c%s",
+ menu->data ? "-->" : "++>",
+ indent + 1, ' ', prompt);
+ } else {
+ cprint_name(" %*c%s --->", indent + 1, ' ', prompt);
+ }
+
+ if (single_menu_mode && menu->data)
+ goto conf_childs;
+ return;
+ default:
+ if (prompt) {
+ child_count++;
+ cmake();
+ cprint_tag(":%p", menu);
+ cprint_name("---%*c%s", indent + 1, ' ', prompt);
+ }
+ }
+ } else
+ doint = 0;
+ goto conf_childs;
+ }
+
+ cmake();
+ type = sym_get_type(sym);
+ if (sym_is_choice(sym)) {
+ struct symbol *def_sym = sym_get_choice_value(sym);
+ struct menu *def_menu = NULL;
+
+ child_count++;
+ for (child = menu->list; child; child = child->next) {
+ if (menu_is_visible(child) && child->sym == def_sym)
+ def_menu = child;
+ }
+
+ val = sym_get_tristate_value(sym);
+ if (sym_is_changable(sym)) {
+ cprint_tag("t%p", menu);
+ switch (type) {
+ case S_BOOLEAN:
+ cprint_name("[%c]", val == no ? ' ' : '*');
+ break;
+ case S_TRISTATE:
+ switch (val) {
+ case yes: ch = '*'; break;
+ case mod: ch = 'M'; break;
+ default: ch = ' '; break;
+ }
+ cprint_name("<%c>", ch);
+ break;
+ }
+ } else {
+ cprint_tag("%c%p", def_menu ? 't' : ':', menu);
+ cprint_name(" ");
+ }
+
+ cprint_name("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+ if (val == yes) {
+ if (def_menu) {
+ cprint_name(" (%s)", menu_get_prompt(def_menu));
+ cprint_name(" --->");
+ if (def_menu->list) {
+ indent += 2;
+ build_conf(def_menu);
+ indent -= 2;
+ }
+ }
+ return;
+ }
+ } else {
+ if (menu == current_menu) {
+ cprint_tag(":%p", menu);
+ cprint_name("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
+ goto conf_childs;
+ }
+ child_count++;
+ val = sym_get_tristate_value(sym);
+ if (sym_is_choice_value(sym) && val == yes) {
+ cprint_tag(":%p", menu);
+ cprint_name(" ");
+ } else {
+ switch (type) {
+ case S_BOOLEAN:
+ cprint_tag("t%p", menu);
+ if (sym_is_changable(sym))
+ cprint_name("[%c]", val == no ? ' ' : '*');
+ else
+ cprint_name("---");
+ break;
+ case S_TRISTATE:
+ cprint_tag("t%p", menu);
+ switch (val) {
+ case yes: ch = '*'; break;
+ case mod: ch = 'M'; break;
+ default: ch = ' '; break;
+ }
+ if (sym_is_changable(sym))
+ cprint_name("<%c>", ch);
+ else
+ cprint_name("---");
+ break;
+ default:
+ cprint_tag("s%p", menu);
+ tmp = cprint_name("(%s)", sym_get_string_value(sym));
+ tmp = indent - tmp + 4;
+ if (tmp < 0)
+ tmp = 0;
+ cprint_name("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
+ (sym_has_value(sym) || !sym_is_changable(sym)) ?
+ "" : " (NEW)");
+ goto conf_childs;
+ }
+ }
+ cprint_name("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
+ (sym_has_value(sym) || !sym_is_changable(sym)) ?
+ "" : " (NEW)");
+ if (menu->prompt->type == P_MENU) {
+ cprint_name(" --->");
+ return;
+ }
+ }
+
+conf_childs:
+ indent += doint;
+ for (child = menu->list; child; child = child->next)
+ build_conf(child);
+ indent -= doint;
+}
+
+static void conf(struct menu *menu)
+{
+ struct dialog_list_item *active_item = NULL;
+ struct menu *submenu;
+ const char *prompt = menu_get_prompt(menu);
+ struct symbol *sym;
+ char active_entry[40];
+ int stat, type;
+
+ unlink("lxdialog.scrltmp");
+ active_entry[0] = 0;
+ while (1) {
+ indent = 0;
+ child_count = 0;
+ current_menu = menu;
+ cdone(); cinit();
+ build_conf(menu);
+ if (!child_count)
+ break;
+ if (menu == &rootmenu) {
+ cmake(); cprint_tag(":"); cprint_name("--- ");
+ cmake(); cprint_tag("L"); cprint_name("Load an Alternate Configuration File");
+ cmake(); cprint_tag("S"); cprint_name("Save Configuration to an Alternate File");
+ }
+ dialog_clear();
+ stat = dialog_menu(prompt ? prompt : "Main Menu",
+ menu_instructions, rows, cols, rows - 10,
+ active_entry, item_no, items);
+ if (stat < 0)
+ return;
+
+ if (stat == 1 || stat == 255)
+ break;
+
+ active_item = first_sel_item(item_no, items);
+ if (!active_item)
+ continue;
+ active_item->selected = 0;
+ strncpy(active_entry, active_item->tag, sizeof(active_entry));
+ active_entry[sizeof(active_entry)-1] = 0;
+ type = active_entry[0];
+ if (!type)
+ continue;
+
+ sym = NULL;
+ submenu = NULL;
+ if (sscanf(active_entry + 1, "%p", &submenu) == 1)
+ sym = submenu->sym;
+
+ switch (stat) {
+ case 0:
+ switch (type) {
+ case 'm':
+ if (single_menu_mode)
+ submenu->data = (void *) (long) !submenu->data;
+ else
+ conf(submenu);
+ break;
+ case 't':
+ if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
+ conf_choice(submenu);
+ else if (submenu->prompt->type == P_MENU)
+ conf(submenu);
+ break;
+ case 's':
+ conf_string(submenu);
+ break;
+ case 'L':
+ conf_load();
+ break;
+ case 'S':
+ conf_save();
+ break;
+ }
+ break;
+ case 2:
+ if (sym)
+ show_help(submenu);
+ else
+ show_helptext("README", mconf_readme);
+ break;
+ case 3:
+ if (type == 't') {
+ if (sym_set_tristate_value(sym, yes))
+ break;
+ if (sym_set_tristate_value(sym, mod))
+ show_textbox(NULL, setmod_text, 6, 74);
+ }
+ break;
+ case 4:
+ if (type == 't')
+ sym_set_tristate_value(sym, no);
+ break;
+ case 5:
+ if (type == 't')
+ sym_set_tristate_value(sym, mod);
+ break;
+ case 6:
+ if (type == 't')
+ sym_toggle_tristate_value(sym);
+ else if (type == 'm')
+ conf(submenu);
+ break;
+ case 7:
+ search_conf();
+ break;
+ }
+ }
+}
+
+static void show_textbox(const char *title, const char *text, int r, int c)
+{
+ int fd;
+
+ fd = creat(".help.tmp", 0777);
+ write(fd, text, strlen(text));
+ close(fd);
+ show_file(".help.tmp", title, r, c);
+ unlink(".help.tmp");
+}
+
+static void show_helptext(const char *title, const char *text)
+{
+ show_textbox(title, text, 0, 0);
+}
+
+static void show_help(struct menu *menu)
+{
+ struct gstr help = str_new();
+ struct symbol *sym = menu->sym;
+
+ if (sym->help)
+ {
+ if (sym->name) {
+ str_printf(&help, "%s:\n\n", sym->name);
+ str_append(&help, sym->help);
+ str_append(&help, "\n");
+ }
+ } else {
+ str_append(&help, nohelp_text);
+ }
+ get_symbol_str(&help, sym);
+ show_helptext(menu_get_prompt(menu), str_get(&help));
+ str_free(&help);
+}
+
+static void show_file(const char *filename, const char *title, int r, int c)
+{
+ while (dialog_textbox(title, filename, r ? r : rows, c ? c : cols) < 0)
+ ;
+}
+
+static void conf_choice(struct menu *menu)
+{
+ const char *prompt = menu_get_prompt(menu);
+ struct menu *child;
+ struct symbol *active;
+
+ active = sym_get_choice_value(menu->sym);
+ while (1) {
+ current_menu = menu;
+ cdone(); cinit();
+ for (child = menu->list; child; child = child->next) {
+ if (!menu_is_visible(child))
+ continue;
+ cmake();
+ cprint_tag("%p", child);
+ cprint_name("%s", menu_get_prompt(child));
+ if (child->sym == sym_get_choice_value(menu->sym))
+ items[item_no - 1]->selected = 1; /* ON */
+ else if (child->sym == active)
+ items[item_no - 1]->selected = 2; /* SELECTED */
+ else
+ items[item_no - 1]->selected = 0; /* OFF */
+ }
+
+ switch (dialog_checklist(prompt ? prompt : "Main Menu",
+ radiolist_instructions, 15, 70, 6,
+ item_no, items, FLAG_RADIO)) {
+ case 0:
+ if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) != 1)
+ break;
+ sym_set_tristate_value(child->sym, yes);
+ return;
+ case 1:
+ if (sscanf(first_sel_item(item_no, items)->tag, "%p", &child) == 1) {
+ show_help(child);
+ active = child->sym;
+ } else
+ show_help(menu);
+ break;
+ case 255:
+ return;
+ }
+ }
+}
+
+static void conf_string(struct menu *menu)
+{
+ const char *prompt = menu_get_prompt(menu);
+
+ while (1) {
+ char *heading;
+
+ switch (sym_get_type(menu->sym)) {
+ case S_INT:
+ heading = (char *) inputbox_instructions_int;
+ break;
+ case S_HEX:
+ heading = (char *) inputbox_instructions_hex;
+ break;
+ case S_STRING:
+ heading = (char *) inputbox_instructions_string;
+ break;
+ default:
+ heading = "Internal mconf error!";
+ /* panic? */;
+ }
+
+ switch (dialog_inputbox(prompt ? prompt : "Main Menu",
+ heading, 10, 75,
+ sym_get_string_value(menu->sym))) {
+ case 0:
+ if (sym_set_string_value(menu->sym, dialog_input_result))
+ return;
+ show_textbox(NULL, "You have made an invalid entry.", 5, 43);
+ break;
+ case 1:
+ show_help(menu);
+ break;
+ case 255:
+ return;
+ }
+ }
+}
+
+static void conf_load(void)
+{
+ while (1) {
+ switch (dialog_inputbox(NULL, load_config_text, 11, 55,
+ filename)) {
+ case 0:
+ if (!dialog_input_result[0])
+ return;
+ if (!conf_read(dialog_input_result))
+ return;
+ show_textbox(NULL, "File does not exist!", 5, 38);
+ break;
+ case 1:
+ show_helptext("Load Alternate Configuration", load_config_help);
+ break;
+ case 255:
+ return;
+ }
+ }
+}
+
+static void conf_save(void)
+{
+ while (1) {
+ switch (dialog_inputbox(NULL, save_config_text, 11, 55,
+ filename)) {
+ case 0:
+ if (!dialog_input_result[0])
+ return;
+ if (!conf_write(dialog_input_result))
+ return;
+ show_textbox(NULL, "Can't create file! Probably a nonexistent directory.", 5, 60);
+ break;
+ case 1:
+ show_helptext("Save Alternate Configuration", save_config_help);
+ break;
+ case 255:
+ return;
+ }
+ }
+}
+
+static void conf_cleanup(void)
+{
+ tcsetattr(1, TCSAFLUSH, &ios_org);
+ unlink(".help.tmp");
+}
+
+static void winch_handler(int sig)
+{
+ struct winsize ws;
+
+ if (ioctl(1, TIOCGWINSZ, &ws) == -1) {
+ rows = 24;
+ cols = 80;
+ } else {
+ rows = ws.ws_row;
+ cols = ws.ws_col;
+ }
+
+ if (rows < 19 || cols < 80) {
+ end_dialog();
+ fprintf(stderr, "Your display is too small to run Menuconfig!\n");
+ fprintf(stderr, "It must be at least 19 lines by 80 columns.\n");
+ exit(1);
+ }
+
+ rows -= 4;
+ cols -= 5;
+
+}
+
+int main(int ac, char **av)
+{
+ char *mode;
+ int stat;
+
+ conf_parse(av[1]);
+ conf_read(NULL);
+
+ snprintf(menu_backtitle, 128, "Buildroot Configuration");
+
+ mode = getenv("MENUCONFIG_MODE");
+ if (mode) {
+ if (!strcasecmp(mode, "single_menu"))
+ single_menu_mode = 1;
+ }
+
+ tcgetattr(1, &ios_org);
+ atexit(conf_cleanup);
+ init_wsize();
+ init_dialog();
+ signal(SIGWINCH, winch_handler);
+ conf(&rootmenu);
+ end_dialog();
+
+ /* Restart dialog to act more like when lxdialog was still separate */
+ init_dialog();
+ do {
+ stat = dialog_yesno(NULL,
+ "Do you wish to save your new Buildroot configuration?", 5, 60);
+ } while (stat < 0);
+ end_dialog();
+
+ if (stat == 0) {
+ conf_write(NULL);
+ printf("\n\n"
+ "*** End of Buildroot configuration.\n"
+ "*** Check the top-level Makefile for additional configuration options.\n\n");
+ } else
+ printf("\n\nYour Buildroot configuration changes were NOT saved.\n\n");
+
+ return 0;
+}
diff --git a/misc/buildroot/package/config/menu.c b/misc/buildroot/package/config/menu.c
new file mode 100644
index 000000000..0c13156f3
--- /dev/null
+++ b/misc/buildroot/package/config/menu.c
@@ -0,0 +1,390 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+struct menu rootmenu;
+static struct menu **last_entry_ptr;
+
+struct file *file_list;
+struct file *current_file;
+
+static void menu_warn(struct menu *menu, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
+
+static void prop_warn(struct property *prop, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
+
+void menu_init(void)
+{
+ current_entry = current_menu = &rootmenu;
+ last_entry_ptr = &rootmenu.list;
+}
+
+void menu_add_entry(struct symbol *sym)
+{
+ struct menu *menu;
+
+ menu = malloc(sizeof(*menu));
+ memset(menu, 0, sizeof(*menu));
+ menu->sym = sym;
+ menu->parent = current_menu;
+ menu->file = current_file;
+ menu->lineno = zconf_lineno();
+
+ *last_entry_ptr = menu;
+ last_entry_ptr = &menu->next;
+ current_entry = menu;
+}
+
+void menu_end_entry(void)
+{
+}
+
+void menu_add_menu(void)
+{
+ current_menu = current_entry;
+ last_entry_ptr = &current_entry->list;
+}
+
+void menu_end_menu(void)
+{
+ last_entry_ptr = &current_menu->next;
+ current_menu = current_menu->parent;
+}
+
+struct expr *menu_check_dep(struct expr *e)
+{
+ if (!e)
+ return e;
+
+ switch (e->type) {
+ case E_NOT:
+ e->left.expr = menu_check_dep(e->left.expr);
+ break;
+ case E_OR:
+ case E_AND:
+ e->left.expr = menu_check_dep(e->left.expr);
+ e->right.expr = menu_check_dep(e->right.expr);
+ break;
+ case E_SYMBOL:
+ /* change 'm' into 'm' && MODULES */
+ if (e->left.sym == &symbol_mod)
+ return expr_alloc_and(e, expr_alloc_symbol(modules_sym));
+ break;
+ default:
+ break;
+ }
+ return e;
+}
+
+void menu_add_dep(struct expr *dep)
+{
+ current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep));
+}
+
+void menu_set_type(int type)
+{
+ struct symbol *sym = current_entry->sym;
+
+ if (sym->type == type)
+ return;
+ if (sym->type == S_UNKNOWN) {
+ sym->type = type;
+ return;
+ }
+ menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'\n",
+ sym->name ? sym->name : "<choice>",
+ sym_type_name(sym->type), sym_type_name(type));
+}
+
+struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep)
+{
+ struct property *prop = prop_alloc(type, current_entry->sym);
+
+ prop->menu = current_entry;
+ prop->text = prompt;
+ prop->expr = expr;
+ prop->visible.expr = menu_check_dep(dep);
+
+ if (prompt) {
+ if (current_entry->prompt)
+ menu_warn(current_entry, "prompt redefined\n");
+ current_entry->prompt = prop;
+ }
+
+ return prop;
+}
+
+void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep)
+{
+ menu_add_prop(type, prompt, NULL, dep);
+}
+
+void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
+{
+ menu_add_prop(type, NULL, expr, dep);
+}
+
+void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep)
+{
+ menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep);
+}
+
+void sym_check_prop(struct symbol *sym)
+{
+ struct property *prop;
+ struct symbol *sym2;
+ for (prop = sym->prop; prop; prop = prop->next) {
+ switch (prop->type) {
+ case P_DEFAULT:
+ if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) &&
+ prop->expr->type != E_SYMBOL)
+ prop_warn(prop,
+ "default for config symbol '%'"
+ " must be a single symbol", sym->name);
+ break;
+ case P_SELECT:
+ sym2 = prop_get_symbol(prop);
+ if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE)
+ prop_warn(prop,
+ "config symbol '%s' uses select, but is "
+ "not boolean or tristate", sym->name);
+ else if (sym2->type == S_UNKNOWN)
+ prop_warn(prop,
+ "'select' used by config symbol '%s' "
+ "refer to undefined symbol '%s'",
+ sym->name, sym2->name);
+ else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE)
+ prop_warn(prop,
+ "'%s' has wrong type. 'select' only "
+ "accept arguments of boolean and "
+ "tristate type", sym2->name);
+ break;
+ case P_RANGE:
+ if (sym->type != S_INT && sym->type != S_HEX)
+ prop_warn(prop, "range is only allowed "
+ "for int or hex symbols");
+ if (!sym_string_valid(sym, prop->expr->left.sym->name) ||
+ !sym_string_valid(sym, prop->expr->right.sym->name))
+ prop_warn(prop, "range is invalid");
+ break;
+ default:
+ ;
+ }
+ }
+}
+
+void menu_finalize(struct menu *parent)
+{
+ struct menu *menu, *last_menu;
+ struct symbol *sym;
+ struct property *prop;
+ struct expr *parentdep, *basedep, *dep, *dep2, **ep;
+
+ sym = parent->sym;
+ if (parent->list) {
+ if (sym && sym_is_choice(sym)) {
+ /* find the first choice value and find out choice type */
+ for (menu = parent->list; menu; menu = menu->next) {
+ if (menu->sym) {
+ current_entry = parent;
+ menu_set_type(menu->sym->type);
+ current_entry = menu;
+ menu_set_type(sym->type);
+ break;
+ }
+ }
+ parentdep = expr_alloc_symbol(sym);
+ } else if (parent->prompt)
+ parentdep = parent->prompt->visible.expr;
+ else
+ parentdep = parent->dep;
+
+ for (menu = parent->list; menu; menu = menu->next) {
+ basedep = expr_transform(menu->dep);
+ basedep = expr_alloc_and(expr_copy(parentdep), basedep);
+ basedep = expr_eliminate_dups(basedep);
+ menu->dep = basedep;
+ if (menu->sym)
+ prop = menu->sym->prop;
+ else
+ prop = menu->prompt;
+ for (; prop; prop = prop->next) {
+ if (prop->menu != menu)
+ continue;
+ dep = expr_transform(prop->visible.expr);
+ dep = expr_alloc_and(expr_copy(basedep), dep);
+ dep = expr_eliminate_dups(dep);
+ if (menu->sym && menu->sym->type != S_TRISTATE)
+ dep = expr_trans_bool(dep);
+ prop->visible.expr = dep;
+ if (prop->type == P_SELECT) {
+ struct symbol *es = prop_get_symbol(prop);
+ es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr,
+ expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep)));
+ }
+ }
+ }
+ for (menu = parent->list; menu; menu = menu->next)
+ menu_finalize(menu);
+ } else if (sym) {
+ basedep = parent->prompt ? parent->prompt->visible.expr : NULL;
+ basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no);
+ basedep = expr_eliminate_dups(expr_transform(basedep));
+ last_menu = NULL;
+ for (menu = parent->next; menu; menu = menu->next) {
+ dep = menu->prompt ? menu->prompt->visible.expr : menu->dep;
+ if (!expr_contains_symbol(dep, sym))
+ break;
+ if (expr_depends_symbol(dep, sym))
+ goto next;
+ dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no);
+ dep = expr_eliminate_dups(expr_transform(dep));
+ dep2 = expr_copy(basedep);
+ expr_eliminate_eq(&dep, &dep2);
+ expr_free(dep);
+ if (!expr_is_yes(dep2)) {
+ expr_free(dep2);
+ break;
+ }
+ expr_free(dep2);
+ next:
+ menu_finalize(menu);
+ menu->parent = parent;
+ last_menu = menu;
+ }
+ if (last_menu) {
+ parent->list = parent->next;
+ parent->next = last_menu->next;
+ last_menu->next = NULL;
+ }
+ }
+ for (menu = parent->list; menu; menu = menu->next) {
+ if (sym && sym_is_choice(sym) && menu->sym) {
+ menu->sym->flags |= SYMBOL_CHOICEVAL;
+ if (!menu->prompt)
+ menu_warn(menu, "choice value must have a prompt");
+ for (prop = menu->sym->prop; prop; prop = prop->next) {
+ if (prop->type == P_PROMPT && prop->menu != menu) {
+ prop_warn(prop, "choice values "
+ "currently only support a "
+ "single prompt");
+ }
+ if (prop->type == P_DEFAULT)
+ prop_warn(prop, "defaults for choice "
+ "values not supported");
+ }
+ current_entry = menu;
+ menu_set_type(sym->type);
+ menu_add_symbol(P_CHOICE, sym, NULL);
+ prop = sym_get_choice_prop(sym);
+ for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr)
+ ;
+ *ep = expr_alloc_one(E_CHOICE, NULL);
+ (*ep)->right.sym = menu->sym;
+ }
+ if (menu->list && (!menu->prompt || !menu->prompt->text)) {
+ for (last_menu = menu->list; ; last_menu = last_menu->next) {
+ last_menu->parent = parent;
+ if (!last_menu->next)
+ break;
+ }
+ last_menu->next = menu->next;
+ menu->next = menu->list;
+ menu->list = NULL;
+ }
+ }
+
+ if (sym && !(sym->flags & SYMBOL_WARNED)) {
+ if (sym->type == S_UNKNOWN)
+ menu_warn(parent, "config symbol defined "
+ "without type\n");
+
+ if (sym_is_choice(sym) && !parent->prompt)
+ menu_warn(parent, "choice must have a prompt\n");
+
+ /* Check properties connected to this symbol */
+ sym_check_prop(sym);
+ sym->flags |= SYMBOL_WARNED;
+ }
+
+ if (sym && !sym_is_optional(sym) && parent->prompt) {
+ sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr,
+ expr_alloc_and(parent->prompt->visible.expr,
+ expr_alloc_symbol(&symbol_mod)));
+ }
+}
+
+bool menu_is_visible(struct menu *menu)
+{
+ struct menu *child;
+ struct symbol *sym;
+ tristate visible;
+
+ if (!menu->prompt)
+ return false;
+ sym = menu->sym;
+ if (sym) {
+ sym_calc_value(sym);
+ visible = menu->prompt->visible.tri;
+ } else
+ visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr);
+
+ if (visible != no)
+ return true;
+ if (!sym || sym_get_tristate_value(menu->sym) == no)
+ return false;
+
+ for (child = menu->list; child; child = child->next)
+ if (menu_is_visible(child))
+ return true;
+ return false;
+}
+
+const char *menu_get_prompt(struct menu *menu)
+{
+ if (menu->prompt)
+ return menu->prompt->text;
+ else if (menu->sym)
+ return menu->sym->name;
+ return NULL;
+}
+
+struct menu *menu_get_root_menu(struct menu *menu)
+{
+ return &rootmenu;
+}
+
+struct menu *menu_get_parent_menu(struct menu *menu)
+{
+ enum prop_type type;
+
+ for (; menu != &rootmenu; menu = menu->parent) {
+ type = menu->prompt ? menu->prompt->type : 0;
+ if (type == P_MENU)
+ break;
+ }
+ return menu;
+}
+
diff --git a/misc/buildroot/package/config/symbol.c b/misc/buildroot/package/config/symbol.c
new file mode 100644
index 000000000..ea629728a
--- /dev/null
+++ b/misc/buildroot/package/config/symbol.c
@@ -0,0 +1,809 @@
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <regex.h>
+#include <sys/utsname.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+struct symbol symbol_yes = {
+ .name = "y",
+ .curr = { "y", yes },
+ .flags = SYMBOL_YES|SYMBOL_VALID,
+}, symbol_mod = {
+ .name = "m",
+ .curr = { "m", mod },
+ .flags = SYMBOL_MOD|SYMBOL_VALID,
+}, symbol_no = {
+ .name = "n",
+ .curr = { "n", no },
+ .flags = SYMBOL_NO|SYMBOL_VALID,
+}, symbol_empty = {
+ .name = "",
+ .curr = { "", no },
+ .flags = SYMBOL_VALID,
+};
+
+int sym_change_count;
+struct symbol *modules_sym;
+tristate modules_val;
+
+void sym_add_default(struct symbol *sym, const char *def)
+{
+ struct property *prop = prop_alloc(P_DEFAULT, sym);
+
+ prop->expr = expr_alloc_symbol(sym_lookup(def, 1));
+}
+
+void sym_init(void)
+{
+ struct symbol *sym;
+ char *p;
+ static bool inited = false;
+
+ if (inited)
+ return;
+ inited = true;
+
+ sym = sym_lookup("VERSION", 0);
+ sym->type = S_STRING;
+ sym->flags |= SYMBOL_AUTO;
+ p = getenv("VERSION");
+ if (p)
+ sym_add_default(sym, p);
+
+ sym = sym_lookup("TARGET_ARCH", 0);
+ sym->type = S_STRING;
+ sym->flags |= SYMBOL_AUTO;
+ p = getenv("TARGET_ARCH");
+ if (p)
+ sym_add_default(sym, p);
+
+}
+
+enum symbol_type sym_get_type(struct symbol *sym)
+{
+ enum symbol_type type = sym->type;
+
+ if (type == S_TRISTATE) {
+ if (sym_is_choice_value(sym) && sym->visible == yes)
+ type = S_BOOLEAN;
+ else if (modules_val == no)
+ type = S_BOOLEAN;
+ }
+ return type;
+}
+
+const char *sym_type_name(enum symbol_type type)
+{
+ switch (type) {
+ case S_BOOLEAN:
+ return "boolean";
+ case S_TRISTATE:
+ return "tristate";
+ case S_INT:
+ return "integer";
+ case S_HEX:
+ return "hex";
+ case S_STRING:
+ return "string";
+ case S_UNKNOWN:
+ return "unknown";
+ case S_OTHER:
+ break;
+ }
+ return "???";
+}
+
+struct property *sym_get_choice_prop(struct symbol *sym)
+{
+ struct property *prop;
+
+ for_all_choices(sym, prop)
+ return prop;
+ return NULL;
+}
+
+struct property *sym_get_default_prop(struct symbol *sym)
+{
+ struct property *prop;
+
+ for_all_defaults(sym, prop) {
+ prop->visible.tri = expr_calc_value(prop->visible.expr);
+ if (prop->visible.tri != no)
+ return prop;
+ }
+ return NULL;
+}
+
+struct property *sym_get_range_prop(struct symbol *sym)
+{
+ struct property *prop;
+
+ for_all_properties(sym, prop, P_RANGE) {
+ prop->visible.tri = expr_calc_value(prop->visible.expr);
+ if (prop->visible.tri != no)
+ return prop;
+ }
+ return NULL;
+}
+
+static void sym_calc_visibility(struct symbol *sym)
+{
+ struct property *prop;
+ tristate tri;
+
+ /* any prompt visible? */
+ tri = no;
+ for_all_prompts(sym, prop) {
+ prop->visible.tri = expr_calc_value(prop->visible.expr);
+ tri = E_OR(tri, prop->visible.tri);
+ }
+ if (tri == mod && (sym->type != S_TRISTATE || modules_val == no))
+ tri = yes;
+ if (sym->visible != tri) {
+ sym->visible = tri;
+ sym_set_changed(sym);
+ }
+ if (sym_is_choice_value(sym))
+ return;
+ tri = no;
+ if (sym->rev_dep.expr)
+ tri = expr_calc_value(sym->rev_dep.expr);
+ if (tri == mod && sym_get_type(sym) == S_BOOLEAN)
+ tri = yes;
+ if (sym->rev_dep.tri != tri) {
+ sym->rev_dep.tri = tri;
+ sym_set_changed(sym);
+ }
+}
+
+static struct symbol *sym_calc_choice(struct symbol *sym)
+{
+ struct symbol *def_sym;
+ struct property *prop;
+ struct expr *e;
+
+ /* is the user choice visible? */
+ def_sym = sym->user.val;
+ if (def_sym) {
+ sym_calc_visibility(def_sym);
+ if (def_sym->visible != no)
+ return def_sym;
+ }
+
+ /* any of the defaults visible? */
+ for_all_defaults(sym, prop) {
+ prop->visible.tri = expr_calc_value(prop->visible.expr);
+ if (prop->visible.tri == no)
+ continue;
+ def_sym = prop_get_symbol(prop);
+ sym_calc_visibility(def_sym);
+ if (def_sym->visible != no)
+ return def_sym;
+ }
+
+ /* just get the first visible value */
+ prop = sym_get_choice_prop(sym);
+ for (e = prop->expr; e; e = e->left.expr) {
+ def_sym = e->right.sym;
+ sym_calc_visibility(def_sym);
+ if (def_sym->visible != no)
+ return def_sym;
+ }
+
+ /* no choice? reset tristate value */
+ sym->curr.tri = no;
+ return NULL;
+}
+
+void sym_calc_value(struct symbol *sym)
+{
+ struct symbol_value newval, oldval;
+ struct property *prop;
+ struct expr *e;
+
+ if (!sym)
+ return;
+
+ if (sym->flags & SYMBOL_VALID)
+ return;
+ sym->flags |= SYMBOL_VALID;
+
+ oldval = sym->curr;
+
+ switch (sym->type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ newval = symbol_empty.curr;
+ break;
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ newval = symbol_no.curr;
+ break;
+ default:
+ sym->curr.val = sym->name;
+ sym->curr.tri = no;
+ return;
+ }
+ if (!sym_is_choice_value(sym))
+ sym->flags &= ~SYMBOL_WRITE;
+
+ sym_calc_visibility(sym);
+
+ /* set default if recursively called */
+ sym->curr = newval;
+
+ switch (sym_get_type(sym)) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ if (sym_is_choice_value(sym) && sym->visible == yes) {
+ prop = sym_get_choice_prop(sym);
+ newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
+ } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
+ sym->flags |= SYMBOL_WRITE;
+ if (sym_has_value(sym))
+ newval.tri = sym->user.tri;
+ else if (!sym_is_choice(sym)) {
+ prop = sym_get_default_prop(sym);
+ if (prop)
+ newval.tri = expr_calc_value(prop->expr);
+ }
+ newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri);
+ } else if (!sym_is_choice(sym)) {
+ prop = sym_get_default_prop(sym);
+ if (prop) {
+ sym->flags |= SYMBOL_WRITE;
+ newval.tri = expr_calc_value(prop->expr);
+ }
+ }
+ if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
+ newval.tri = yes;
+ break;
+ case S_STRING:
+ case S_HEX:
+ case S_INT:
+ if (sym->visible != no) {
+ sym->flags |= SYMBOL_WRITE;
+ if (sym_has_value(sym)) {
+ newval.val = sym->user.val;
+ break;
+ }
+ }
+ prop = sym_get_default_prop(sym);
+ if (prop) {
+ struct symbol *ds = prop_get_symbol(prop);
+ if (ds) {
+ sym->flags |= SYMBOL_WRITE;
+ sym_calc_value(ds);
+ newval.val = ds->curr.val;
+ }
+ }
+ break;
+ default:
+ ;
+ }
+
+ sym->curr = newval;
+ if (sym_is_choice(sym) && newval.tri == yes)
+ sym->curr.val = sym_calc_choice(sym);
+
+ if (memcmp(&oldval, &sym->curr, sizeof(oldval)))
+ sym_set_changed(sym);
+ if (modules_sym == sym)
+ modules_val = modules_sym->curr.tri;
+
+ if (sym_is_choice(sym)) {
+ int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
+ prop = sym_get_choice_prop(sym);
+ for (e = prop->expr; e; e = e->left.expr) {
+ e->right.sym->flags |= flags;
+ if (flags & SYMBOL_CHANGED)
+ sym_set_changed(e->right.sym);
+ }
+ }
+}
+
+void sym_clear_all_valid(void)
+{
+ struct symbol *sym;
+ int i;
+
+ for_all_symbols(i, sym)
+ sym->flags &= ~SYMBOL_VALID;
+ sym_change_count++;
+ if (modules_sym)
+ sym_calc_value(modules_sym);
+}
+
+void sym_set_changed(struct symbol *sym)
+{
+ struct property *prop;
+
+ sym->flags |= SYMBOL_CHANGED;
+ for (prop = sym->prop; prop; prop = prop->next) {
+ if (prop->menu)
+ prop->menu->flags |= MENU_CHANGED;
+ }
+}
+
+void sym_set_all_changed(void)
+{
+ struct symbol *sym;
+ int i;
+
+ for_all_symbols(i, sym)
+ sym_set_changed(sym);
+}
+
+bool sym_tristate_within_range(struct symbol *sym, tristate val)
+{
+ int type = sym_get_type(sym);
+
+ if (sym->visible == no)
+ return false;
+
+ if (type != S_BOOLEAN && type != S_TRISTATE)
+ return false;
+
+ if (type == S_BOOLEAN && val == mod)
+ return false;
+ if (sym->visible <= sym->rev_dep.tri)
+ return false;
+ if (sym_is_choice_value(sym) && sym->visible == yes)
+ return val == yes;
+ return val >= sym->rev_dep.tri && val <= sym->visible;
+}
+
+bool sym_set_tristate_value(struct symbol *sym, tristate val)
+{
+ tristate oldval = sym_get_tristate_value(sym);
+
+ if (oldval != val && !sym_tristate_within_range(sym, val))
+ return false;
+
+ if (sym->flags & SYMBOL_NEW) {
+ sym->flags &= ~SYMBOL_NEW;
+ sym_set_changed(sym);
+ }
+ if (sym_is_choice_value(sym) && val == yes) {
+ struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
+
+ cs->user.val = sym;
+ cs->flags &= ~SYMBOL_NEW;
+ }
+
+ sym->user.tri = val;
+ if (oldval != val) {
+ sym_clear_all_valid();
+ if (sym == modules_sym)
+ sym_set_all_changed();
+ }
+
+ return true;
+}
+
+tristate sym_toggle_tristate_value(struct symbol *sym)
+{
+ tristate oldval, newval;
+
+ oldval = newval = sym_get_tristate_value(sym);
+ do {
+ switch (newval) {
+ case no:
+ newval = mod;
+ break;
+ case mod:
+ newval = yes;
+ break;
+ case yes:
+ newval = no;
+ break;
+ }
+ if (sym_set_tristate_value(sym, newval))
+ break;
+ } while (oldval != newval);
+ return newval;
+}
+
+bool sym_string_valid(struct symbol *sym, const char *str)
+{
+ signed char ch;
+
+ switch (sym->type) {
+ case S_STRING:
+ return true;
+ case S_INT:
+ ch = *str++;
+ if (ch == '-')
+ ch = *str++;
+ if (!isdigit(ch))
+ return false;
+ if (ch == '0' && *str != 0)
+ return false;
+ while ((ch = *str++)) {
+ if (!isdigit(ch))
+ return false;
+ }
+ return true;
+ case S_HEX:
+ if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))
+ str += 2;
+ ch = *str++;
+ do {
+ if (!isxdigit(ch))
+ return false;
+ } while ((ch = *str++));
+ return true;
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ switch (str[0]) {
+ case 'y': case 'Y':
+ case 'm': case 'M':
+ case 'n': case 'N':
+ return true;
+ }
+ return false;
+ default:
+ return false;
+ }
+}
+
+bool sym_string_within_range(struct symbol *sym, const char *str)
+{
+ struct property *prop;
+ int val;
+
+ switch (sym->type) {
+ case S_STRING:
+ return sym_string_valid(sym, str);
+ case S_INT:
+ if (!sym_string_valid(sym, str))
+ return false;
+ prop = sym_get_range_prop(sym);
+ if (!prop)
+ return true;
+ val = strtol(str, NULL, 10);
+ return val >= strtol(prop->expr->left.sym->name, NULL, 10) &&
+ val <= strtol(prop->expr->right.sym->name, NULL, 10);
+ case S_HEX:
+ if (!sym_string_valid(sym, str))
+ return false;
+ prop = sym_get_range_prop(sym);
+ if (!prop)
+ return true;
+ val = strtol(str, NULL, 16);
+ return val >= strtol(prop->expr->left.sym->name, NULL, 16) &&
+ val <= strtol(prop->expr->right.sym->name, NULL, 16);
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ switch (str[0]) {
+ case 'y': case 'Y':
+ return sym_tristate_within_range(sym, yes);
+ case 'm': case 'M':
+ return sym_tristate_within_range(sym, mod);
+ case 'n': case 'N':
+ return sym_tristate_within_range(sym, no);
+ }
+ return false;
+ default:
+ return false;
+ }
+}
+
+bool sym_set_string_value(struct symbol *sym, const char *newval)
+{
+ const char *oldval;
+ char *val;
+ int size;
+
+ switch (sym->type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ switch (newval[0]) {
+ case 'y': case 'Y':
+ return sym_set_tristate_value(sym, yes);
+ case 'm': case 'M':
+ return sym_set_tristate_value(sym, mod);
+ case 'n': case 'N':
+ return sym_set_tristate_value(sym, no);
+ }
+ return false;
+ default:
+ ;
+ }
+
+ if (!sym_string_within_range(sym, newval))
+ return false;
+
+ if (sym->flags & SYMBOL_NEW) {
+ sym->flags &= ~SYMBOL_NEW;
+ sym_set_changed(sym);
+ }
+
+ oldval = sym->user.val;
+ size = strlen(newval) + 1;
+ if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
+ size += 2;
+ sym->user.val = val = malloc(size);
+ *val++ = '0';
+ *val++ = 'x';
+ } else if (!oldval || strcmp(oldval, newval))
+ sym->user.val = val = malloc(size);
+ else
+ return true;
+
+ strcpy(val, newval);
+ free((void *)oldval);
+ sym_clear_all_valid();
+
+ return true;
+}
+
+const char *sym_get_string_value(struct symbol *sym)
+{
+ tristate val;
+
+ switch (sym->type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ val = sym_get_tristate_value(sym);
+ switch (val) {
+ case no:
+ return "n";
+ case mod:
+ return "m";
+ case yes:
+ return "y";
+ }
+ break;
+ default:
+ ;
+ }
+ return (const char *)sym->curr.val;
+}
+
+bool sym_is_changable(struct symbol *sym)
+{
+ return sym->visible > sym->rev_dep.tri;
+}
+
+struct symbol *sym_lookup(const char *name, int isconst)
+{
+ struct symbol *symbol;
+ const char *ptr;
+ char *new_name;
+ int hash = 0;
+
+ if (name) {
+ if (name[0] && !name[1]) {
+ switch (name[0]) {
+ case 'y': return &symbol_yes;
+ case 'm': return &symbol_mod;
+ case 'n': return &symbol_no;
+ }
+ }
+ for (ptr = name; *ptr; ptr++)
+ hash += *ptr;
+ hash &= 0xff;
+
+ for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
+ if (!strcmp(symbol->name, name)) {
+ if ((isconst && symbol->flags & SYMBOL_CONST) ||
+ (!isconst && !(symbol->flags & SYMBOL_CONST)))
+ return symbol;
+ }
+ }
+ new_name = strdup(name);
+ } else {
+ new_name = NULL;
+ hash = 256;
+ }
+
+ symbol = malloc(sizeof(*symbol));
+ memset(symbol, 0, sizeof(*symbol));
+ symbol->name = new_name;
+ symbol->type = S_UNKNOWN;
+ symbol->flags = SYMBOL_NEW;
+ if (isconst)
+ symbol->flags |= SYMBOL_CONST;
+
+ symbol->next = symbol_hash[hash];
+ symbol_hash[hash] = symbol;
+
+ return symbol;
+}
+
+struct symbol *sym_find(const char *name)
+{
+ struct symbol *symbol = NULL;
+ const char *ptr;
+ int hash = 0;
+
+ if (!name)
+ return NULL;
+
+ if (name[0] && !name[1]) {
+ switch (name[0]) {
+ case 'y': return &symbol_yes;
+ case 'm': return &symbol_mod;
+ case 'n': return &symbol_no;
+ }
+ }
+ for (ptr = name; *ptr; ptr++)
+ hash += *ptr;
+ hash &= 0xff;
+
+ for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
+ if (!strcmp(symbol->name, name) &&
+ !(symbol->flags & SYMBOL_CONST))
+ break;
+ }
+
+ return symbol;
+}
+
+struct symbol **sym_re_search(const char *pattern)
+{
+ struct symbol *sym, **sym_arr = NULL;
+ int i, cnt, size;
+ regex_t re;
+
+ cnt = size = 0;
+ /* Skip if empty */
+ if (strlen(pattern) == 0)
+ return NULL;
+ if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB|REG_ICASE))
+ return NULL;
+
+ for_all_symbols(i, sym) {
+ if (sym->flags & SYMBOL_CONST || !sym->name)
+ continue;
+ if (regexec(&re, sym->name, 0, NULL, 0))
+ continue;
+ if (cnt + 1 >= size) {
+ void *tmp = sym_arr;
+ size += 16;
+ sym_arr = realloc(sym_arr, size * sizeof(struct symbol *));
+ if (!sym_arr) {
+ free(tmp);
+ return NULL;
+ }
+ }
+ sym_arr[cnt++] = sym;
+ }
+ if (sym_arr)
+ sym_arr[cnt] = NULL;
+ regfree(&re);
+
+ return sym_arr;
+}
+
+
+struct symbol *sym_check_deps(struct symbol *sym);
+
+static struct symbol *sym_check_expr_deps(struct expr *e)
+{
+ struct symbol *sym;
+
+ if (!e)
+ return NULL;
+ switch (e->type) {
+ case E_OR:
+ case E_AND:
+ sym = sym_check_expr_deps(e->left.expr);
+ if (sym)
+ return sym;
+ return sym_check_expr_deps(e->right.expr);
+ case E_NOT:
+ return sym_check_expr_deps(e->left.expr);
+ case E_EQUAL:
+ case E_UNEQUAL:
+ sym = sym_check_deps(e->left.sym);
+ if (sym)
+ return sym;
+ return sym_check_deps(e->right.sym);
+ case E_SYMBOL:
+ return sym_check_deps(e->left.sym);
+ default:
+ break;
+ }
+ printf("Oops! How to check %d?\n", e->type);
+ return NULL;
+}
+
+struct symbol *sym_check_deps(struct symbol *sym)
+{
+ struct symbol *sym2;
+ struct property *prop;
+
+ if (sym->flags & SYMBOL_CHECK_DONE)
+ return NULL;
+ if (sym->flags & SYMBOL_CHECK) {
+ printf("Warning! Found recursive dependency: %s", sym->name);
+ return sym;
+ }
+
+ sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED);
+ sym2 = sym_check_expr_deps(sym->rev_dep.expr);
+ if (sym2)
+ goto out;
+
+ for (prop = sym->prop; prop; prop = prop->next) {
+ if (prop->type == P_CHOICE || prop->type == P_SELECT)
+ continue;
+ sym2 = sym_check_expr_deps(prop->visible.expr);
+ if (sym2)
+ goto out;
+ if (prop->type != P_DEFAULT || sym_is_choice(sym))
+ continue;
+ sym2 = sym_check_expr_deps(prop->expr);
+ if (sym2)
+ goto out;
+ }
+out:
+ if (sym2)
+ printf(" %s", sym->name);
+ sym->flags &= ~SYMBOL_CHECK;
+ return sym2;
+}
+
+struct property *prop_alloc(enum prop_type type, struct symbol *sym)
+{
+ struct property *prop;
+ struct property **propp;
+
+ prop = malloc(sizeof(*prop));
+ memset(prop, 0, sizeof(*prop));
+ prop->type = type;
+ prop->sym = sym;
+ prop->file = current_file;
+ prop->lineno = zconf_lineno();
+
+ /* append property to the prop list of symbol */
+ if (sym) {
+ for (propp = &sym->prop; *propp; propp = &(*propp)->next)
+ ;
+ *propp = prop;
+ }
+
+ return prop;
+}
+
+struct symbol *prop_get_symbol(struct property *prop)
+{
+ if (prop->expr && (prop->expr->type == E_SYMBOL ||
+ prop->expr->type == E_CHOICE))
+ return prop->expr->left.sym;
+ return NULL;
+}
+
+const char *prop_get_type_name(enum prop_type type)
+{
+ switch (type) {
+ case P_PROMPT:
+ return "prompt";
+ case P_COMMENT:
+ return "comment";
+ case P_MENU:
+ return "menu";
+ case P_DEFAULT:
+ return "default";
+ case P_CHOICE:
+ return "choice";
+ case P_SELECT:
+ return "select";
+ case P_RANGE:
+ return "range";
+ case P_UNKNOWN:
+ break;
+ }
+ return "unknown";
+}
diff --git a/misc/buildroot/package/config/util.c b/misc/buildroot/package/config/util.c
new file mode 100644
index 000000000..8f65ccac5
--- /dev/null
+++ b/misc/buildroot/package/config/util.c
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2002-2005 Roman Zippel <zippel@linux-m68k.org>
+ * Copyright (C) 2002-2005 Sam Ravnborg <sam@ravnborg.org>
+ *
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <string.h>
+#include "lkc.h"
+
+/* file already present in list? If not add it */
+struct file *file_lookup(const char *name)
+{
+ struct file *file;
+
+ for (file = file_list; file; file = file->next) {
+ if (!strcmp(name, file->name))
+ return file;
+ }
+
+ file = malloc(sizeof(*file));
+ memset(file, 0, sizeof(*file));
+ file->name = strdup(name);
+ file->next = file_list;
+ file_list = file;
+ return file;
+}
+
+/* write a dependency file as used by kbuild to track dependencies */
+int file_write_dep(const char *name)
+{
+ struct file *file;
+ FILE *out;
+
+ if (!name)
+ name = ".config.cmd";
+ out = fopen(".config.tmp", "w");
+ if (!out)
+ return 1;
+ fprintf(out, "deps_config := \\\n");
+ for (file = file_list; file; file = file->next) {
+ if (file->next)
+ fprintf(out, "\t%s \\\n", file->name);
+ else
+ fprintf(out, "\t%s\n", file->name);
+ }
+ fprintf(out, "\n.config include/config.h: $(deps_config)\n\n$(deps_config):\n");
+ fclose(out);
+ rename(".config.tmp", name);
+ return 0;
+}
+
+/* Allocate initial growable sting */
+struct gstr str_new(void)
+{
+ struct gstr gs;
+ gs.s = malloc(sizeof(char) * 64);
+ gs.len = 16;
+ strcpy(gs.s, "\0");
+ return gs;
+}
+
+/* Allocate and assign growable string */
+struct gstr str_assign(const char *s)
+{
+ struct gstr gs;
+ gs.s = strdup(s);
+ gs.len = strlen(s) + 1;
+ return gs;
+}
+
+/* Free storage for growable string */
+void str_free(struct gstr *gs)
+{
+ if (gs->s)
+ free(gs->s);
+ gs->s = NULL;
+ gs->len = 0;
+}
+
+/* Append to growable string */
+void str_append(struct gstr *gs, const char *s)
+{
+ size_t l = strlen(gs->s) + strlen(s) + 1;
+ if (l > gs->len) {
+ gs->s = realloc(gs->s, l);
+ gs->len = l;
+ }
+ strcat(gs->s, s);
+}
+
+/* Append printf formatted string to growable string */
+void str_printf(struct gstr *gs, const char *fmt, ...)
+{
+ va_list ap;
+ char s[10000]; /* big enough... */
+ va_start(ap, fmt);
+ vsnprintf(s, sizeof(s), fmt, ap);
+ str_append(gs, s);
+ va_end(ap);
+}
+
+/* Retreive value of growable string */
+const char *str_get(struct gstr *gs)
+{
+ return gs->s;
+}
+
diff --git a/misc/buildroot/package/config/zconf.l b/misc/buildroot/package/config/zconf.l
new file mode 100644
index 000000000..55517b287
--- /dev/null
+++ b/misc/buildroot/package/config/zconf.l
@@ -0,0 +1,366 @@
+%option backup nostdinit noyywrap never-interactive full ecs
+%option 8bit backup nodefault perf-report perf-report
+%x COMMAND HELP STRING PARAM
+%{
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+#define START_STRSIZE 16
+
+char *text;
+static char *text_ptr;
+static int text_size, text_asize;
+
+struct buffer {
+ struct buffer *parent;
+ YY_BUFFER_STATE state;
+};
+
+struct buffer *current_buf;
+
+static int last_ts, first_ts;
+
+static void zconf_endhelp(void);
+static struct buffer *zconf_endfile(void);
+
+void new_string(void)
+{
+ text = malloc(START_STRSIZE);
+ text_asize = START_STRSIZE;
+ text_ptr = text;
+ text_size = 0;
+ *text_ptr = 0;
+}
+
+void append_string(const char *str, int size)
+{
+ int new_size = text_size + size + 1;
+ if (new_size > text_asize) {
+ text = realloc(text, new_size);
+ text_asize = new_size;
+ text_ptr = text + text_size;
+ }
+ memcpy(text_ptr, str, size);
+ text_ptr += size;
+ text_size += size;
+ *text_ptr = 0;
+}
+
+void alloc_string(const char *str, int size)
+{
+ text = malloc(size + 1);
+ memcpy(text, str, size);
+ text[size] = 0;
+}
+%}
+
+ws [ \n\t]
+n [A-Za-z0-9_]
+
+%%
+ int str = 0;
+ int ts, i;
+
+[ \t]*#.*\n current_file->lineno++;
+[ \t]*#.*
+
+[ \t]*\n current_file->lineno++; return T_EOL;
+
+[ \t]+ {
+ BEGIN(COMMAND);
+}
+
+. {
+ unput(yytext[0]);
+ BEGIN(COMMAND);
+}
+
+
+<COMMAND>{
+ "mainmenu" BEGIN(PARAM); return T_MAINMENU;
+ "menu" BEGIN(PARAM); return T_MENU;
+ "endmenu" BEGIN(PARAM); return T_ENDMENU;
+ "source" BEGIN(PARAM); return T_SOURCE;
+ "choice" BEGIN(PARAM); return T_CHOICE;
+ "endchoice" BEGIN(PARAM); return T_ENDCHOICE;
+ "comment" BEGIN(PARAM); return T_COMMENT;
+ "config" BEGIN(PARAM); return T_CONFIG;
+ "menuconfig" BEGIN(PARAM); return T_MENUCONFIG;
+ "help" BEGIN(PARAM); return T_HELP;
+ "if" BEGIN(PARAM); return T_IF;
+ "endif" BEGIN(PARAM); return T_ENDIF;
+ "depends" BEGIN(PARAM); return T_DEPENDS;
+ "requires" BEGIN(PARAM); return T_REQUIRES;
+ "optional" BEGIN(PARAM); return T_OPTIONAL;
+ "default" BEGIN(PARAM); return T_DEFAULT;
+ "prompt" BEGIN(PARAM); return T_PROMPT;
+ "tristate" BEGIN(PARAM); return T_TRISTATE;
+ "def_tristate" BEGIN(PARAM); return T_DEF_TRISTATE;
+ "bool" BEGIN(PARAM); return T_BOOLEAN;
+ "boolean" BEGIN(PARAM); return T_BOOLEAN;
+ "def_bool" BEGIN(PARAM); return T_DEF_BOOLEAN;
+ "def_boolean" BEGIN(PARAM); return T_DEF_BOOLEAN;
+ "int" BEGIN(PARAM); return T_INT;
+ "hex" BEGIN(PARAM); return T_HEX;
+ "string" BEGIN(PARAM); return T_STRING;
+ "select" BEGIN(PARAM); return T_SELECT;
+ "enable" BEGIN(PARAM); return T_SELECT;
+ "range" BEGIN(PARAM); return T_RANGE;
+ {n}+ {
+ alloc_string(yytext, yyleng);
+ zconflval.string = text;
+ return T_WORD;
+ }
+ .
+ \n current_file->lineno++; BEGIN(INITIAL);
+}
+
+<PARAM>{
+ "&&" return T_AND;
+ "||" return T_OR;
+ "(" return T_OPEN_PAREN;
+ ")" return T_CLOSE_PAREN;
+ "!" return T_NOT;
+ "=" return T_EQUAL;
+ "!=" return T_UNEQUAL;
+ "if" return T_IF;
+ "on" return T_ON;
+ \"|\' {
+ str = yytext[0];
+ new_string();
+ BEGIN(STRING);
+ }
+ \n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
+ --- /* ignore */
+ ({n}|[-/.])+ {
+ alloc_string(yytext, yyleng);
+ zconflval.string = text;
+ return T_WORD;
+ }
+ #.* /* comment */
+ \\\n current_file->lineno++;
+ .
+ <<EOF>> {
+ BEGIN(INITIAL);
+ }
+}
+
+<STRING>{
+ [^'"\\\n]+/\n {
+ append_string(yytext, yyleng);
+ zconflval.string = text;
+ return T_WORD_QUOTE;
+ }
+ [^'"\\\n]+ {
+ append_string(yytext, yyleng);
+ }
+ \\.?/\n {
+ append_string(yytext + 1, yyleng - 1);
+ zconflval.string = text;
+ return T_WORD_QUOTE;
+ }
+ \\.? {
+ append_string(yytext + 1, yyleng - 1);
+ }
+ \'|\" {
+ if (str == yytext[0]) {
+ BEGIN(PARAM);
+ zconflval.string = text;
+ return T_WORD_QUOTE;
+ } else
+ append_string(yytext, 1);
+ }
+ \n {
+ printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
+ current_file->lineno++;
+ BEGIN(INITIAL);
+ return T_EOL;
+ }
+ <<EOF>> {
+ BEGIN(INITIAL);
+ }
+}
+
+<HELP>{
+ [ \t]+ {
+ ts = 0;
+ for (i = 0; i < yyleng; i++) {
+ if (yytext[i] == '\t')
+ ts = (ts & ~7) + 8;
+ else
+ ts++;
+ }
+ last_ts = ts;
+ if (first_ts) {
+ if (ts < first_ts) {
+ zconf_endhelp();
+ return T_HELPTEXT;
+ }
+ ts -= first_ts;
+ while (ts > 8) {
+ append_string(" ", 8);
+ ts -= 8;
+ }
+ append_string(" ", ts);
+ }
+ }
+ [ \t]*\n/[^ \t\n] {
+ current_file->lineno++;
+ zconf_endhelp();
+ return T_HELPTEXT;
+ }
+ [ \t]*\n {
+ current_file->lineno++;
+ append_string("\n", 1);
+ }
+ [^ \t\n].* {
+ append_string(yytext, yyleng);
+ if (!first_ts)
+ first_ts = last_ts;
+ }
+ <<EOF>> {
+ zconf_endhelp();
+ return T_HELPTEXT;
+ }
+}
+
+<<EOF>> {
+ if (current_buf) {
+ zconf_endfile();
+ return T_EOF;
+ }
+ fclose(yyin);
+ yyterminate();
+}
+
+%%
+void zconf_starthelp(void)
+{
+ new_string();
+ last_ts = first_ts = 0;
+ BEGIN(HELP);
+}
+
+static void zconf_endhelp(void)
+{
+ zconflval.string = text;
+ BEGIN(INITIAL);
+}
+
+
+/*
+ * Try to open specified file with following names:
+ * ./name
+ * $(srctree)/name
+ * The latter is used when srctree is separate from objtree
+ * when compiling the kernel.
+ * Return NULL if file is not found.
+ */
+FILE *zconf_fopen(const char *name)
+{
+ char *env, fullname[PATH_MAX+1];
+ FILE *f;
+
+ f = fopen(name, "r");
+ if (!f && name[0] != '/') {
+ env = getenv(SRCTREE);
+ if (env) {
+ sprintf(fullname, "%s/%s", env, name);
+ f = fopen(fullname, "r");
+ }
+ }
+ return f;
+}
+
+void zconf_initscan(const char *name)
+{
+ yyin = zconf_fopen(name);
+ if (!yyin) {
+ printf("can't find file %s\n", name);
+ exit(1);
+ }
+
+ current_buf = malloc(sizeof(*current_buf));
+ memset(current_buf, 0, sizeof(*current_buf));
+
+ current_file = file_lookup(name);
+ current_file->lineno = 1;
+ current_file->flags = FILE_BUSY;
+}
+
+void zconf_nextfile(const char *name)
+{
+ struct file *file = file_lookup(name);
+ struct buffer *buf = malloc(sizeof(*buf));
+ memset(buf, 0, sizeof(*buf));
+
+ current_buf->state = YY_CURRENT_BUFFER;
+ yyin = zconf_fopen(name);
+ if (!yyin) {
+ printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
+ exit(1);
+ }
+ yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
+ buf->parent = current_buf;
+ current_buf = buf;
+
+ if (file->flags & FILE_BUSY) {
+ printf("recursive scan (%s)?\n", name);
+ exit(1);
+ }
+ if (file->flags & FILE_SCANNED) {
+ printf("file %s already scanned?\n", name);
+ exit(1);
+ }
+ file->flags |= FILE_BUSY;
+ file->lineno = 1;
+ file->parent = current_file;
+ current_file = file;
+}
+
+static struct buffer *zconf_endfile(void)
+{
+ struct buffer *parent;
+
+ current_file->flags |= FILE_SCANNED;
+ current_file->flags &= ~FILE_BUSY;
+ current_file = current_file->parent;
+
+ parent = current_buf->parent;
+ if (parent) {
+ fclose(yyin);
+ yy_delete_buffer(YY_CURRENT_BUFFER);
+ yy_switch_to_buffer(parent->state);
+ }
+ free(current_buf);
+ current_buf = parent;
+
+ return parent;
+}
+
+int zconf_lineno(void)
+{
+ if (current_buf)
+ return current_file->lineno - 1;
+ else
+ return 0;
+}
+
+char *zconf_curname(void)
+{
+ if (current_buf)
+ return current_file->name;
+ else
+ return "<none>";
+}
diff --git a/misc/buildroot/package/config/zconf.tab.c_shipped b/misc/buildroot/package/config/zconf.tab.c_shipped
new file mode 100644
index 000000000..ed612a058
--- /dev/null
+++ b/misc/buildroot/package/config/zconf.tab.c_shipped
@@ -0,0 +1,2130 @@
+/* A Bison parser, made by GNU Bison 1.875a. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ 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 2, 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* If NAME_PREFIX is specified substitute the variables and functions
+ names. */
+#define yyparse zconfparse
+#define yylex zconflex
+#define yyerror zconferror
+#define yylval zconflval
+#define yychar zconfchar
+#define yydebug zconfdebug
+#define yynerrs zconfnerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ T_MAINMENU = 258,
+ T_MENU = 259,
+ T_ENDMENU = 260,
+ T_SOURCE = 261,
+ T_CHOICE = 262,
+ T_ENDCHOICE = 263,
+ T_COMMENT = 264,
+ T_CONFIG = 265,
+ T_MENUCONFIG = 266,
+ T_HELP = 267,
+ T_HELPTEXT = 268,
+ T_IF = 269,
+ T_ENDIF = 270,
+ T_DEPENDS = 271,
+ T_REQUIRES = 272,
+ T_OPTIONAL = 273,
+ T_PROMPT = 274,
+ T_DEFAULT = 275,
+ T_TRISTATE = 276,
+ T_DEF_TRISTATE = 277,
+ T_BOOLEAN = 278,
+ T_DEF_BOOLEAN = 279,
+ T_STRING = 280,
+ T_INT = 281,
+ T_HEX = 282,
+ T_WORD = 283,
+ T_WORD_QUOTE = 284,
+ T_UNEQUAL = 285,
+ T_EOF = 286,
+ T_EOL = 287,
+ T_CLOSE_PAREN = 288,
+ T_OPEN_PAREN = 289,
+ T_ON = 290,
+ T_SELECT = 291,
+ T_RANGE = 292,
+ T_OR = 293,
+ T_AND = 294,
+ T_EQUAL = 295,
+ T_NOT = 296
+ };
+#endif
+#define T_MAINMENU 258
+#define T_MENU 259
+#define T_ENDMENU 260
+#define T_SOURCE 261
+#define T_CHOICE 262
+#define T_ENDCHOICE 263
+#define T_COMMENT 264
+#define T_CONFIG 265
+#define T_MENUCONFIG 266
+#define T_HELP 267
+#define T_HELPTEXT 268
+#define T_IF 269
+#define T_ENDIF 270
+#define T_DEPENDS 271
+#define T_REQUIRES 272
+#define T_OPTIONAL 273
+#define T_PROMPT 274
+#define T_DEFAULT 275
+#define T_TRISTATE 276
+#define T_DEF_TRISTATE 277
+#define T_BOOLEAN 278
+#define T_DEF_BOOLEAN 279
+#define T_STRING 280
+#define T_INT 281
+#define T_HEX 282
+#define T_WORD 283
+#define T_WORD_QUOTE 284
+#define T_UNEQUAL 285
+#define T_EOF 286
+#define T_EOL 287
+#define T_CLOSE_PAREN 288
+#define T_OPEN_PAREN 289
+#define T_ON 290
+#define T_SELECT 291
+#define T_RANGE 292
+#define T_OR 293
+#define T_AND 294
+#define T_EQUAL 295
+#define T_NOT 296
+
+
+
+
+/* Copy the first part of user declarations. */
+
+
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
+
+#define PRINTD 0x0001
+#define DEBUG_PARSE 0x0002
+
+int cdebug = PRINTD;
+
+extern int zconflex(void);
+static void zconfprint(const char *err, ...);
+static void zconferror(const char *err);
+static bool zconf_endtoken(int token, int starttoken, int endtoken);
+
+struct symbol *symbol_hash[257];
+
+static struct menu *current_menu, *current_entry;
+
+#define YYERROR_VERBOSE
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+
+typedef union YYSTYPE {
+ int token;
+ char *string;
+ struct symbol *symbol;
+ struct expr *expr;
+ struct menu *menu;
+} YYSTYPE;
+/* Line 191 of yacc.c. */
+
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+
+
+/* Line 214 of yacc.c. */
+
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# else
+# ifndef YYSTACK_USE_ALLOCA
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC malloc
+# define YYSTACK_FREE free
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 2
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 201
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 42
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 41
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 104
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 182
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 296
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short yyprhs[] =
+{
+ 0, 0, 3, 4, 7, 9, 11, 13, 17, 19,
+ 21, 23, 26, 28, 30, 32, 34, 36, 38, 42,
+ 45, 49, 52, 53, 56, 59, 62, 65, 69, 74,
+ 78, 83, 87, 91, 95, 100, 105, 110, 116, 119,
+ 122, 124, 128, 131, 132, 135, 138, 141, 144, 149,
+ 153, 157, 160, 165, 166, 169, 173, 175, 179, 182,
+ 183, 186, 189, 192, 196, 199, 201, 205, 208, 209,
+ 212, 215, 218, 222, 226, 228, 232, 235, 238, 241,
+ 242, 245, 248, 253, 257, 261, 262, 265, 267, 269,
+ 272, 275, 278, 280, 282, 283, 286, 288, 292, 296,
+ 300, 303, 307, 311, 313
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 43, 0, -1, -1, 43, 44, -1, 45, -1, 55,
+ -1, 66, -1, 3, 77, 79, -1, 5, -1, 15,
+ -1, 8, -1, 1, 79, -1, 61, -1, 71, -1,
+ 47, -1, 49, -1, 69, -1, 79, -1, 10, 28,
+ 32, -1, 46, 50, -1, 11, 28, 32, -1, 48,
+ 50, -1, -1, 50, 51, -1, 50, 75, -1, 50,
+ 73, -1, 50, 32, -1, 21, 76, 32, -1, 22,
+ 81, 80, 32, -1, 23, 76, 32, -1, 24, 81,
+ 80, 32, -1, 26, 76, 32, -1, 27, 76, 32,
+ -1, 25, 76, 32, -1, 19, 77, 80, 32, -1,
+ 20, 81, 80, 32, -1, 36, 28, 80, 32, -1,
+ 37, 82, 82, 80, 32, -1, 7, 32, -1, 52,
+ 56, -1, 78, -1, 53, 58, 54, -1, 53, 58,
+ -1, -1, 56, 57, -1, 56, 75, -1, 56, 73,
+ -1, 56, 32, -1, 19, 77, 80, 32, -1, 21,
+ 76, 32, -1, 23, 76, 32, -1, 18, 32, -1,
+ 20, 28, 80, 32, -1, -1, 58, 45, -1, 14,
+ 81, 32, -1, 78, -1, 59, 62, 60, -1, 59,
+ 62, -1, -1, 62, 45, -1, 62, 66, -1, 62,
+ 55, -1, 4, 77, 32, -1, 63, 74, -1, 78,
+ -1, 64, 67, 65, -1, 64, 67, -1, -1, 67,
+ 45, -1, 67, 66, -1, 67, 55, -1, 67, 1,
+ 32, -1, 6, 77, 32, -1, 68, -1, 9, 77,
+ 32, -1, 70, 74, -1, 12, 32, -1, 72, 13,
+ -1, -1, 74, 75, -1, 74, 32, -1, 16, 35,
+ 81, 32, -1, 16, 81, 32, -1, 17, 81, 32,
+ -1, -1, 77, 80, -1, 28, -1, 29, -1, 5,
+ 79, -1, 8, 79, -1, 15, 79, -1, 32, -1,
+ 31, -1, -1, 14, 81, -1, 82, -1, 82, 40,
+ 82, -1, 82, 30, 82, -1, 34, 81, 33, -1,
+ 41, 81, -1, 81, 38, 81, -1, 81, 39, 81,
+ -1, 28, -1, 29, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned short yyrline[] =
+{
+ 0, 94, 94, 95, 98, 99, 100, 101, 102, 103,
+ 104, 105, 109, 110, 111, 112, 113, 114, 120, 128,
+ 134, 142, 152, 154, 155, 156, 157, 160, 166, 173,
+ 179, 186, 192, 198, 204, 210, 216, 222, 230, 239,
+ 245, 254, 255, 261, 263, 264, 265, 266, 269, 275,
+ 281, 287, 293, 299, 301, 306, 315, 324, 325, 331,
+ 333, 334, 335, 340, 347, 353, 362, 363, 369, 371,
+ 372, 373, 374, 377, 383, 390, 397, 404, 410, 417,
+ 418, 419, 422, 427, 432, 440, 442, 447, 448, 451,
+ 452, 453, 457, 457, 459, 460, 463, 464, 465, 466,
+ 467, 468, 469, 472, 473
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
+ "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
+ "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
+ "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE",
+ "T_DEF_TRISTATE", "T_BOOLEAN", "T_DEF_BOOLEAN", "T_STRING", "T_INT",
+ "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL",
+ "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR",
+ "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block",
+ "common_block", "config_entry_start", "config_stmt",
+ "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
+ "config_option", "choice", "choice_entry", "choice_end", "choice_stmt",
+ "choice_option_list", "choice_option", "choice_block", "if", "if_end",
+ "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt",
+ "menu_block", "source", "source_stmt", "comment", "comment_stmt",
+ "help_start", "help", "depends_list", "depends", "prompt_stmt_opt",
+ "prompt", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 42, 43, 43, 44, 44, 44, 44, 44, 44,
+ 44, 44, 45, 45, 45, 45, 45, 45, 46, 47,
+ 48, 49, 50, 50, 50, 50, 50, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 52, 53,
+ 54, 55, 55, 56, 56, 56, 56, 56, 57, 57,
+ 57, 57, 57, 58, 58, 59, 60, 61, 61, 62,
+ 62, 62, 62, 63, 64, 65, 66, 66, 67, 67,
+ 67, 67, 67, 68, 69, 70, 71, 72, 73, 74,
+ 74, 74, 75, 75, 75, 76, 76, 77, 77, 78,
+ 78, 78, 79, 79, 80, 80, 81, 81, 81, 81,
+ 81, 81, 81, 82, 82
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 0, 2, 1, 1, 1, 3, 1, 1,
+ 1, 2, 1, 1, 1, 1, 1, 1, 3, 2,
+ 3, 2, 0, 2, 2, 2, 2, 3, 4, 3,
+ 4, 3, 3, 3, 4, 4, 4, 5, 2, 2,
+ 1, 3, 2, 0, 2, 2, 2, 2, 4, 3,
+ 3, 2, 4, 0, 2, 3, 1, 3, 2, 0,
+ 2, 2, 2, 3, 2, 1, 3, 2, 0, 2,
+ 2, 2, 3, 3, 1, 3, 2, 2, 2, 0,
+ 2, 2, 4, 3, 3, 0, 2, 1, 1, 2,
+ 2, 2, 1, 1, 0, 2, 1, 3, 3, 3,
+ 2, 3, 3, 1, 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 2, 0, 1, 0, 0, 0, 8, 0, 0, 10,
+ 0, 0, 0, 0, 9, 93, 92, 3, 4, 22,
+ 14, 22, 15, 43, 53, 5, 59, 12, 79, 68,
+ 6, 74, 16, 79, 13, 17, 11, 87, 88, 0,
+ 0, 0, 38, 0, 0, 0, 103, 104, 0, 0,
+ 0, 96, 19, 21, 39, 42, 58, 64, 0, 76,
+ 7, 63, 73, 75, 18, 20, 0, 100, 55, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 85, 0,
+ 85, 0, 85, 85, 85, 26, 0, 0, 23, 0,
+ 25, 24, 0, 0, 0, 85, 85, 47, 44, 46,
+ 45, 0, 0, 0, 54, 41, 40, 60, 62, 57,
+ 61, 56, 81, 80, 0, 69, 71, 66, 70, 65,
+ 99, 101, 102, 98, 97, 77, 0, 0, 0, 94,
+ 94, 0, 94, 94, 0, 94, 0, 0, 0, 94,
+ 0, 78, 51, 94, 94, 0, 0, 89, 90, 91,
+ 72, 0, 83, 84, 0, 0, 0, 27, 86, 0,
+ 29, 0, 33, 31, 32, 0, 94, 0, 0, 49,
+ 50, 82, 95, 34, 35, 28, 30, 36, 0, 48,
+ 52, 37
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const short yydefgoto[] =
+{
+ -1, 1, 17, 18, 19, 20, 21, 22, 52, 88,
+ 23, 24, 105, 25, 54, 98, 55, 26, 109, 27,
+ 56, 28, 29, 117, 30, 58, 31, 32, 33, 34,
+ 89, 90, 57, 91, 131, 132, 106, 35, 155, 50,
+ 51
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -99
+static const short yypact[] =
+{
+ -99, 48, -99, 38, 46, 46, -99, 46, -29, -99,
+ 46, -17, -3, -11, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, -99, -99, -99, -99, -99, 38,
+ 12, 15, -99, 18, 51, 62, -99, -99, -11, -11,
+ 4, -24, 138, 138, 160, 121, 110, -4, 81, -4,
+ -99, -99, -99, -99, -99, -99, -19, -99, -99, -11,
+ -11, 70, 70, 73, 32, -11, 46, -11, 46, -11,
+ 46, -11, 46, 46, 46, -99, 36, 70, -99, 95,
+ -99, -99, 96, 46, 106, 46, 46, -99, -99, -99,
+ -99, 38, 38, 38, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, 112, -99, -99, -99, -99, -99,
+ -99, 117, -99, -99, -99, -99, -11, 33, 65, 131,
+ 1, 119, 131, 1, 136, 1, 153, 154, 155, 131,
+ 70, -99, -99, 131, 131, 156, 157, -99, -99, -99,
+ -99, 101, -99, -99, -11, 158, 159, -99, -99, 161,
+ -99, 162, -99, -99, -99, 163, 131, 164, 165, -99,
+ -99, -99, 99, -99, -99, -99, -99, -99, 166, -99,
+ -99, -99
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const short yypgoto[] =
+{
+ -99, -99, -99, 111, -99, -99, -99, -99, 178, -99,
+ -99, -99, -99, 91, -99, -99, -99, -99, -99, -99,
+ -99, -99, -99, -99, 115, -99, -99, -99, -99, -99,
+ -99, 146, 168, 89, 27, 0, 126, -1, -98, -48,
+ -63
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -68
+static const short yytable[] =
+{
+ 66, 67, 36, 42, 39, 40, 71, 41, 123, 124,
+ 43, 44, 74, 75, 120, 154, 72, 46, 47, 69,
+ 70, 121, 122, 48, 140, 45, 127, 128, 112, 130,
+ 49, 133, 156, 135, 158, 159, 68, 161, 60, 69,
+ 70, 165, 69, 70, 61, 167, 168, 62, 2, 3,
+ 63, 4, 5, 6, 7, 8, 9, 10, 11, 12,
+ 46, 47, 13, 14, 139, 152, 48, 126, 178, 15,
+ 16, 69, 70, 49, 37, 38, 129, 166, 151, 15,
+ 16, -67, 114, 64, -67, 5, 101, 7, 8, 102,
+ 10, 11, 12, 143, 65, 13, 103, 153, 46, 47,
+ 147, 148, 149, 69, 70, 125, 172, 134, 141, 136,
+ 137, 138, 15, 16, 5, 101, 7, 8, 102, 10,
+ 11, 12, 145, 146, 13, 103, 101, 7, 142, 102,
+ 10, 11, 12, 171, 144, 13, 103, 69, 70, 69,
+ 70, 15, 16, 100, 150, 154, 113, 108, 113, 116,
+ 73, 157, 15, 16, 74, 75, 70, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 104, 107, 160, 115,
+ 85, 110, 73, 118, 86, 87, 74, 75, 92, 93,
+ 94, 95, 111, 96, 119, 162, 163, 164, 169, 170,
+ 173, 174, 97, 175, 176, 177, 179, 180, 181, 53,
+ 99, 59
+};
+
+static const unsigned char yycheck[] =
+{
+ 48, 49, 3, 32, 4, 5, 30, 7, 71, 72,
+ 10, 28, 16, 17, 33, 14, 40, 28, 29, 38,
+ 39, 69, 70, 34, 87, 28, 74, 75, 32, 77,
+ 41, 79, 130, 81, 132, 133, 32, 135, 39, 38,
+ 39, 139, 38, 39, 32, 143, 144, 32, 0, 1,
+ 32, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 28, 29, 14, 15, 28, 32, 34, 35, 166, 31,
+ 32, 38, 39, 41, 28, 29, 76, 140, 126, 31,
+ 32, 0, 1, 32, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 93, 32, 14, 15, 32, 28, 29,
+ 101, 102, 103, 38, 39, 32, 154, 80, 13, 82,
+ 83, 84, 31, 32, 4, 5, 6, 7, 8, 9,
+ 10, 11, 95, 96, 14, 15, 5, 6, 32, 8,
+ 9, 10, 11, 32, 28, 14, 15, 38, 39, 38,
+ 39, 31, 32, 54, 32, 14, 57, 56, 59, 58,
+ 12, 32, 31, 32, 16, 17, 39, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 55, 56, 32, 58,
+ 32, 56, 12, 58, 36, 37, 16, 17, 18, 19,
+ 20, 21, 56, 23, 58, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 21,
+ 54, 33
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 43, 0, 1, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 14, 15, 31, 32, 44, 45, 46,
+ 47, 48, 49, 52, 53, 55, 59, 61, 63, 64,
+ 66, 68, 69, 70, 71, 79, 79, 28, 29, 77,
+ 77, 77, 32, 77, 28, 28, 28, 29, 34, 41,
+ 81, 82, 50, 50, 56, 58, 62, 74, 67, 74,
+ 79, 32, 32, 32, 32, 32, 81, 81, 32, 38,
+ 39, 30, 40, 12, 16, 17, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 32, 36, 37, 51, 72,
+ 73, 75, 18, 19, 20, 21, 23, 32, 57, 73,
+ 75, 5, 8, 15, 45, 54, 78, 45, 55, 60,
+ 66, 78, 32, 75, 1, 45, 55, 65, 66, 78,
+ 33, 81, 81, 82, 82, 32, 35, 81, 81, 77,
+ 81, 76, 77, 81, 76, 81, 76, 76, 76, 28,
+ 82, 13, 32, 77, 28, 76, 76, 79, 79, 79,
+ 32, 81, 32, 32, 14, 80, 80, 32, 80, 80,
+ 32, 80, 32, 32, 32, 80, 82, 80, 80, 32,
+ 32, 32, 81, 32, 32, 32, 32, 32, 80, 32,
+ 32, 32
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");\
+ YYERROR; \
+ } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+ are run). */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ Current.first_line = Rhs[1].first_line; \
+ Current.first_column = Rhs[1].first_column; \
+ Current.last_line = Rhs[N].last_line; \
+ Current.last_column = Rhs[N].last_column;
+#endif
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YYDSYMPRINT(Args) \
+do { \
+ if (yydebug) \
+ yysymprint Args; \
+} while (0)
+
+# define YYDSYMPRINTF(Title, Token, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Token, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (cinluded). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short *bottom, short *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short *bottom;
+ short *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned int yylineno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ yyrule - 1, yylineno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YYDSYMPRINT(Args)
+# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#if YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ {
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+# ifdef YYPRINT
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ }
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yytype, yyvaluep)
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+ YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 8:
+
+ { zconfprint("unexpected 'endmenu' statement"); ;}
+ break;
+
+ case 9:
+
+ { zconfprint("unexpected 'endif' statement"); ;}
+ break;
+
+ case 10:
+
+ { zconfprint("unexpected 'endchoice' statement"); ;}
+ break;
+
+ case 11:
+
+ { zconfprint("syntax error"); yyerrok; ;}
+ break;
+
+ case 18:
+
+ {
+ struct symbol *sym = sym_lookup(yyvsp[-1].string, 0);
+ sym->flags |= SYMBOL_OPTIONAL;
+ menu_add_entry(sym);
+ printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
+;}
+ break;
+
+ case 19:
+
+ {
+ menu_end_entry();
+ printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 20:
+
+ {
+ struct symbol *sym = sym_lookup(yyvsp[-1].string, 0);
+ sym->flags |= SYMBOL_OPTIONAL;
+ menu_add_entry(sym);
+ printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
+;}
+ break;
+
+ case 21:
+
+ {
+ if (current_entry->prompt)
+ current_entry->prompt->type = P_MENU;
+ else
+ zconfprint("warning: menuconfig statement without prompt");
+ menu_end_entry();
+ printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 27:
+
+ {
+ menu_set_type(S_TRISTATE);
+ printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 28:
+
+ {
+ menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
+ menu_set_type(S_TRISTATE);
+ printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 29:
+
+ {
+ menu_set_type(S_BOOLEAN);
+ printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 30:
+
+ {
+ menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
+ menu_set_type(S_BOOLEAN);
+ printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 31:
+
+ {
+ menu_set_type(S_INT);
+ printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 32:
+
+ {
+ menu_set_type(S_HEX);
+ printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 33:
+
+ {
+ menu_set_type(S_STRING);
+ printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 34:
+
+ {
+ menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 35:
+
+ {
+ menu_add_expr(P_DEFAULT, yyvsp[-2].expr, yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 36:
+
+ {
+ menu_add_symbol(P_SELECT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 37:
+
+ {
+ menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,yyvsp[-3].symbol, yyvsp[-2].symbol), yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 38:
+
+ {
+ struct symbol *sym = sym_lookup(NULL, 0);
+ sym->flags |= SYMBOL_CHOICE;
+ menu_add_entry(sym);
+ menu_add_expr(P_CHOICE, NULL, NULL);
+ printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 39:
+
+ {
+ menu_end_entry();
+ menu_add_menu();
+;}
+ break;
+
+ case 40:
+
+ {
+ if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) {
+ menu_end_menu();
+ printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
+ }
+;}
+ break;
+
+ case 42:
+
+ {
+ printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno);
+ zconfnerrs++;
+;}
+ break;
+
+ case 48:
+
+ {
+ menu_add_prompt(P_PROMPT, yyvsp[-2].string, yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 49:
+
+ {
+ menu_set_type(S_TRISTATE);
+ printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 50:
+
+ {
+ menu_set_type(S_BOOLEAN);
+ printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 51:
+
+ {
+ current_entry->sym->flags |= SYMBOL_OPTIONAL;
+ printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 52:
+
+ {
+ menu_add_symbol(P_DEFAULT, sym_lookup(yyvsp[-2].string, 0), yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 55:
+
+ {
+ printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
+ menu_add_entry(NULL);
+ menu_add_dep(yyvsp[-1].expr);
+ menu_end_entry();
+ menu_add_menu();
+;}
+ break;
+
+ case 56:
+
+ {
+ if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) {
+ menu_end_menu();
+ printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
+ }
+;}
+ break;
+
+ case 58:
+
+ {
+ printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno);
+ zconfnerrs++;
+;}
+ break;
+
+ case 63:
+
+ {
+ menu_add_entry(NULL);
+ menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL);
+ printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 64:
+
+ {
+ menu_end_entry();
+ menu_add_menu();
+;}
+ break;
+
+ case 65:
+
+ {
+ if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) {
+ menu_end_menu();
+ printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
+ }
+;}
+ break;
+
+ case 67:
+
+ {
+ printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno);
+ zconfnerrs++;
+;}
+ break;
+
+ case 72:
+
+ { zconfprint("invalid menu option"); yyerrok; ;}
+ break;
+
+ case 73:
+
+ {
+ yyval.string = yyvsp[-1].string;
+ printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[-1].string);
+;}
+ break;
+
+ case 74:
+
+ {
+ zconf_nextfile(yyvsp[0].string);
+;}
+ break;
+
+ case 75:
+
+ {
+ menu_add_entry(NULL);
+ menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL);
+ printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 76:
+
+ {
+ menu_end_entry();
+;}
+ break;
+
+ case 77:
+
+ {
+ printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
+ zconf_starthelp();
+;}
+ break;
+
+ case 78:
+
+ {
+ current_entry->sym->help = yyvsp[0].string;
+;}
+ break;
+
+ case 82:
+
+ {
+ menu_add_dep(yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 83:
+
+ {
+ menu_add_dep(yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 84:
+
+ {
+ menu_add_dep(yyvsp[-1].expr);
+ printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
+;}
+ break;
+
+ case 86:
+
+ {
+ menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);
+;}
+ break;
+
+ case 89:
+
+ { yyval.token = T_ENDMENU; ;}
+ break;
+
+ case 90:
+
+ { yyval.token = T_ENDCHOICE; ;}
+ break;
+
+ case 91:
+
+ { yyval.token = T_ENDIF; ;}
+ break;
+
+ case 94:
+
+ { yyval.expr = NULL; ;}
+ break;
+
+ case 95:
+
+ { yyval.expr = yyvsp[0].expr; ;}
+ break;
+
+ case 96:
+
+ { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); ;}
+ break;
+
+ case 97:
+
+ { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}
+ break;
+
+ case 98:
+
+ { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); ;}
+ break;
+
+ case 99:
+
+ { yyval.expr = yyvsp[-1].expr; ;}
+ break;
+
+ case 100:
+
+ { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); ;}
+ break;
+
+ case 101:
+
+ { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); ;}
+ break;
+
+ case 102:
+
+ { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); ;}
+ break;
+
+ case 103:
+
+ { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); ;}
+ break;
+
+ case 104:
+
+ { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); ;}
+ break;
+
+
+ }
+
+/* Line 999 of yacc.c. */
+
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ char *yymsg;
+ int yyx, yycount;
+
+ yycount = 0;
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+ yysize += yystrlen ("syntax error, unexpected ") + 1;
+ yysize += yystrlen (yytname[yytype]);
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yycount = 0;
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *));
+ yyx++)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ const char *yyq = ! yycount ? ", expecting " : " or ";
+ yyp = yystpcpy (yyp, yyq);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yycount++;
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ {
+ /* Pop the error token. */
+ YYPOPSTACK;
+ /* Pop the rest of the stack. */
+ while (yyss < yyssp)
+ {
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
+ YYABORT;
+ }
+
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*----------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action. |
+`----------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[yystate], yyvsp);
+ yyvsp--;
+ yystate = *--yyssp;
+
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ YYDPRINTF ((stderr, "Shifting error token, "));
+
+ *++yyvsp = yylval;
+
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+
+
+
+void conf_parse(const char *name)
+{
+ struct symbol *sym;
+ int i;
+
+ zconf_initscan(name);
+
+ sym_init();
+ menu_init();
+ modules_sym = sym_lookup("MODULES", 0);
+ rootmenu.prompt = menu_add_prop(P_MENU, "Buildroot Configuration", NULL, NULL);
+
+ //zconfdebug = 1;
+ zconfparse();
+ if (zconfnerrs)
+ exit(1);
+ menu_finalize(&rootmenu);
+ for_all_symbols(i, sym) {
+ if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym))
+ printf("\n");
+ else
+ sym->flags |= SYMBOL_CHECK_DONE;
+ }
+
+ sym_change_count = 1;
+}
+
+const char *zconf_tokenname(int token)
+{
+ switch (token) {
+ case T_MENU: return "menu";
+ case T_ENDMENU: return "endmenu";
+ case T_CHOICE: return "choice";
+ case T_ENDCHOICE: return "endchoice";
+ case T_IF: return "if";
+ case T_ENDIF: return "endif";
+ }
+ return "<token>";
+}
+
+static bool zconf_endtoken(int token, int starttoken, int endtoken)
+{
+ if (token != endtoken) {
+ zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken));
+ zconfnerrs++;
+ return false;
+ }
+ if (current_menu->file != current_file) {
+ zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken));
+ zconfprint("location of the '%s'", zconf_tokenname(starttoken));
+ zconfnerrs++;
+ return false;
+ }
+ return true;
+}
+
+static void zconfprint(const char *err, ...)
+{
+ va_list ap;
+
+ fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1);
+ va_start(ap, err);
+ vfprintf(stderr, err, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+}
+
+static void zconferror(const char *err)
+{
+ fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
+}
+
+void print_quoted_string(FILE *out, const char *str)
+{
+ const char *p;
+ int len;
+
+ putc('"', out);
+ while ((p = strchr(str, '"'))) {
+ len = p - str;
+ if (len)
+ fprintf(out, "%.*s", len, str);
+ fputs("\\\"", out);
+ str = p + 1;
+ }
+ fputs(str, out);
+ putc('"', out);
+}
+
+void print_symbol(FILE *out, struct menu *menu)
+{
+ struct symbol *sym = menu->sym;
+ struct property *prop;
+
+ if (sym_is_choice(sym))
+ fprintf(out, "choice\n");
+ else
+ fprintf(out, "config %s\n", sym->name);
+ switch (sym->type) {
+ case S_BOOLEAN:
+ fputs(" boolean\n", out);
+ break;
+ case S_TRISTATE:
+ fputs(" tristate\n", out);
+ break;
+ case S_STRING:
+ fputs(" string\n", out);
+ break;
+ case S_INT:
+ fputs(" integer\n", out);
+ break;
+ case S_HEX:
+ fputs(" hex\n", out);
+ break;
+ default:
+ fputs(" ???\n", out);
+ break;
+ }
+ for (prop = sym->prop; prop; prop = prop->next) {
+ if (prop->menu != menu)
+ continue;
+ switch (prop->type) {
+ case P_PROMPT:
+ fputs(" prompt ", out);
+ print_quoted_string(out, prop->text);
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" if ", out);
+ expr_fprint(prop->visible.expr, out);
+ }
+ fputc('\n', out);
+ break;
+ case P_DEFAULT:
+ fputs( " default ", out);
+ expr_fprint(prop->expr, out);
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" if ", out);
+ expr_fprint(prop->visible.expr, out);
+ }
+ fputc('\n', out);
+ break;
+ case P_CHOICE:
+ fputs(" #choice value\n", out);
+ break;
+ default:
+ fprintf(out, " unknown prop %d!\n", prop->type);
+ break;
+ }
+ }
+ if (sym->help) {
+ int len = strlen(sym->help);
+ while (sym->help[--len] == '\n')
+ sym->help[len] = 0;
+ fprintf(out, " help\n%s\n", sym->help);
+ }
+ fputc('\n', out);
+}
+
+void zconfdump(FILE *out)
+{
+ struct property *prop;
+ struct symbol *sym;
+ struct menu *menu;
+
+ menu = rootmenu.list;
+ while (menu) {
+ if ((sym = menu->sym))
+ print_symbol(out, menu);
+ else if ((prop = menu->prompt)) {
+ switch (prop->type) {
+ case P_COMMENT:
+ fputs("\ncomment ", out);
+ print_quoted_string(out, prop->text);
+ fputs("\n", out);
+ break;
+ case P_MENU:
+ fputs("\nmenu ", out);
+ print_quoted_string(out, prop->text);
+ fputs("\n", out);
+ break;
+ default:
+ ;
+ }
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" depends ", out);
+ expr_fprint(prop->visible.expr, out);
+ fputc('\n', out);
+ }
+ fputs("\n", out);
+ }
+
+ if (menu->list)
+ menu = menu->list;
+ else if (menu->next)
+ menu = menu->next;
+ else while ((menu = menu->parent)) {
+ if (menu->prompt && menu->prompt->type == P_MENU)
+ fputs("\nendmenu\n", out);
+ if (menu->next) {
+ menu = menu->next;
+ break;
+ }
+ }
+ }
+}
+
+#include "lex.zconf.c"
+#include "util.c"
+#include "confdata.c"
+#include "expr.c"
+#include "symbol.c"
+#include "menu.c"
+
+
diff --git a/misc/buildroot/package/config/zconf.tab.h_shipped b/misc/buildroot/package/config/zconf.tab.h_shipped
new file mode 100644
index 000000000..3b191ef59
--- /dev/null
+++ b/misc/buildroot/package/config/zconf.tab.h_shipped
@@ -0,0 +1,125 @@
+/* A Bison parser, made from zconf.y, by GNU bison 1.75. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ 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 2, 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+#ifndef BISON_ZCONF_TAB_H
+# define BISON_ZCONF_TAB_H
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ T_MAINMENU = 258,
+ T_MENU = 259,
+ T_ENDMENU = 260,
+ T_SOURCE = 261,
+ T_CHOICE = 262,
+ T_ENDCHOICE = 263,
+ T_COMMENT = 264,
+ T_CONFIG = 265,
+ T_HELP = 266,
+ T_HELPTEXT = 267,
+ T_IF = 268,
+ T_ENDIF = 269,
+ T_DEPENDS = 270,
+ T_REQUIRES = 271,
+ T_OPTIONAL = 272,
+ T_PROMPT = 273,
+ T_DEFAULT = 274,
+ T_TRISTATE = 275,
+ T_BOOLEAN = 276,
+ T_INT = 277,
+ T_HEX = 278,
+ T_WORD = 279,
+ T_STRING = 280,
+ T_UNEQUAL = 281,
+ T_EOF = 282,
+ T_EOL = 283,
+ T_CLOSE_PAREN = 284,
+ T_OPEN_PAREN = 285,
+ T_ON = 286,
+ T_OR = 287,
+ T_AND = 288,
+ T_EQUAL = 289,
+ T_NOT = 290
+ };
+#endif
+#define T_MAINMENU 258
+#define T_MENU 259
+#define T_ENDMENU 260
+#define T_SOURCE 261
+#define T_CHOICE 262
+#define T_ENDCHOICE 263
+#define T_COMMENT 264
+#define T_CONFIG 265
+#define T_HELP 266
+#define T_HELPTEXT 267
+#define T_IF 268
+#define T_ENDIF 269
+#define T_DEPENDS 270
+#define T_REQUIRES 271
+#define T_OPTIONAL 272
+#define T_PROMPT 273
+#define T_DEFAULT 274
+#define T_TRISTATE 275
+#define T_BOOLEAN 276
+#define T_INT 277
+#define T_HEX 278
+#define T_WORD 279
+#define T_STRING 280
+#define T_UNEQUAL 281
+#define T_EOF 282
+#define T_EOL 283
+#define T_CLOSE_PAREN 284
+#define T_OPEN_PAREN 285
+#define T_ON 286
+#define T_OR 287
+#define T_AND 288
+#define T_EQUAL 289
+#define T_NOT 290
+
+
+
+
+#ifndef YYSTYPE
+#line 33 "zconf.y"
+typedef union {
+ int token;
+ char *string;
+ struct symbol *symbol;
+ struct expr *expr;
+ struct menu *menu;
+} yystype;
+/* Line 1281 of /usr/share/bison/yacc.c. */
+#line 118 "zconf.tab.h"
+# define YYSTYPE yystype
+#endif
+
+extern YYSTYPE zconflval;
+
+
+#endif /* not BISON_ZCONF_TAB_H */
+
diff --git a/misc/buildroot/package/config/zconf.y b/misc/buildroot/package/config/zconf.y
new file mode 100644
index 000000000..bc9431831
--- /dev/null
+++ b/misc/buildroot/package/config/zconf.y
@@ -0,0 +1,690 @@
+%{
+/*
+ * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#include <ctype.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
+
+#define PRINTD 0x0001
+#define DEBUG_PARSE 0x0002
+
+int cdebug = PRINTD;
+
+extern int zconflex(void);
+static void zconfprint(const char *err, ...);
+static void zconferror(const char *err);
+static bool zconf_endtoken(int token, int starttoken, int endtoken);
+
+struct symbol *symbol_hash[257];
+
+static struct menu *current_menu, *current_entry;
+
+#define YYERROR_VERBOSE
+%}
+%expect 40
+
+%union
+{
+ int token;
+ char *string;
+ struct symbol *symbol;
+ struct expr *expr;
+ struct menu *menu;
+}
+
+%token T_MAINMENU
+%token T_MENU
+%token T_ENDMENU
+%token T_SOURCE
+%token T_CHOICE
+%token T_ENDCHOICE
+%token T_COMMENT
+%token T_CONFIG
+%token T_MENUCONFIG
+%token T_HELP
+%token <string> T_HELPTEXT
+%token T_IF
+%token T_ENDIF
+%token T_DEPENDS
+%token T_REQUIRES
+%token T_OPTIONAL
+%token T_PROMPT
+%token T_DEFAULT
+%token T_TRISTATE
+%token T_DEF_TRISTATE
+%token T_BOOLEAN
+%token T_DEF_BOOLEAN
+%token T_STRING
+%token T_INT
+%token T_HEX
+%token <string> T_WORD
+%token <string> T_WORD_QUOTE
+%token T_UNEQUAL
+%token T_EOF
+%token T_EOL
+%token T_CLOSE_PAREN
+%token T_OPEN_PAREN
+%token T_ON
+%token T_SELECT
+%token T_RANGE
+
+%left T_OR
+%left T_AND
+%left T_EQUAL T_UNEQUAL
+%nonassoc T_NOT
+
+%type <string> prompt
+%type <string> source
+%type <symbol> symbol
+%type <expr> expr
+%type <expr> if_expr
+%type <token> end
+
+%{
+#define LKC_DIRECT_LINK
+#include "lkc.h"
+%}
+%%
+input: /* empty */
+ | input block
+;
+
+block: common_block
+ | choice_stmt
+ | menu_stmt
+ | T_MAINMENU prompt nl_or_eof
+ | T_ENDMENU { zconfprint("unexpected 'endmenu' statement"); }
+ | T_ENDIF { zconfprint("unexpected 'endif' statement"); }
+ | T_ENDCHOICE { zconfprint("unexpected 'endchoice' statement"); }
+ | error nl_or_eof { zconfprint("syntax error"); yyerrok; }
+;
+
+common_block:
+ if_stmt
+ | comment_stmt
+ | config_stmt
+ | menuconfig_stmt
+ | source_stmt
+ | nl_or_eof
+;
+
+
+/* config/menuconfig entry */
+
+config_entry_start: T_CONFIG T_WORD T_EOL
+{
+ struct symbol *sym = sym_lookup($2, 0);
+ sym->flags |= SYMBOL_OPTIONAL;
+ menu_add_entry(sym);
+ printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2);
+};
+
+config_stmt: config_entry_start config_option_list
+{
+ menu_end_entry();
+ printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
+};
+
+menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL
+{
+ struct symbol *sym = sym_lookup($2, 0);
+ sym->flags |= SYMBOL_OPTIONAL;
+ menu_add_entry(sym);
+ printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2);
+};
+
+menuconfig_stmt: menuconfig_entry_start config_option_list
+{
+ if (current_entry->prompt)
+ current_entry->prompt->type = P_MENU;
+ else
+ zconfprint("warning: menuconfig statement without prompt");
+ menu_end_entry();
+ printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
+};
+
+config_option_list:
+ /* empty */
+ | config_option_list config_option
+ | config_option_list depends
+ | config_option_list help
+ | config_option_list T_EOL
+;
+
+config_option: T_TRISTATE prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_TRISTATE);
+ printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_DEF_TRISTATE expr if_expr T_EOL
+{
+ menu_add_expr(P_DEFAULT, $2, $3);
+ menu_set_type(S_TRISTATE);
+ printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_BOOLEAN prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_BOOLEAN);
+ printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_DEF_BOOLEAN expr if_expr T_EOL
+{
+ menu_add_expr(P_DEFAULT, $2, $3);
+ menu_set_type(S_BOOLEAN);
+ printd(DEBUG_PARSE, "%s:%d:def_boolean\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_INT prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_INT);
+ printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_HEX prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_HEX);
+ printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_STRING prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_STRING);
+ printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_PROMPT prompt if_expr T_EOL
+{
+ menu_add_prompt(P_PROMPT, $2, $3);
+ printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_DEFAULT expr if_expr T_EOL
+{
+ menu_add_expr(P_DEFAULT, $2, $3);
+ printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_SELECT T_WORD if_expr T_EOL
+{
+ menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3);
+ printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno());
+};
+
+config_option: T_RANGE symbol symbol if_expr T_EOL
+{
+ menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4);
+ printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
+};
+
+/* choice entry */
+
+choice: T_CHOICE T_EOL
+{
+ struct symbol *sym = sym_lookup(NULL, 0);
+ sym->flags |= SYMBOL_CHOICE;
+ menu_add_entry(sym);
+ menu_add_expr(P_CHOICE, NULL, NULL);
+ printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno());
+};
+
+choice_entry: choice choice_option_list
+{
+ menu_end_entry();
+ menu_add_menu();
+};
+
+choice_end: end
+{
+ if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) {
+ menu_end_menu();
+ printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno());
+ }
+};
+
+choice_stmt:
+ choice_entry choice_block choice_end
+ | choice_entry choice_block
+{
+ printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno);
+ zconfnerrs++;
+};
+
+choice_option_list:
+ /* empty */
+ | choice_option_list choice_option
+ | choice_option_list depends
+ | choice_option_list help
+ | choice_option_list T_EOL
+;
+
+choice_option: T_PROMPT prompt if_expr T_EOL
+{
+ menu_add_prompt(P_PROMPT, $2, $3);
+ printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
+};
+
+choice_option: T_TRISTATE prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_TRISTATE);
+ printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
+};
+
+choice_option: T_BOOLEAN prompt_stmt_opt T_EOL
+{
+ menu_set_type(S_BOOLEAN);
+ printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
+};
+
+choice_option: T_OPTIONAL T_EOL
+{
+ current_entry->sym->flags |= SYMBOL_OPTIONAL;
+ printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
+};
+
+choice_option: T_DEFAULT T_WORD if_expr T_EOL
+{
+ menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3);
+ printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
+};
+
+choice_block:
+ /* empty */
+ | choice_block common_block
+;
+
+/* if entry */
+
+if: T_IF expr T_EOL
+{
+ printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
+ menu_add_entry(NULL);
+ menu_add_dep($2);
+ menu_end_entry();
+ menu_add_menu();
+};
+
+if_end: end
+{
+ if (zconf_endtoken($1, T_IF, T_ENDIF)) {
+ menu_end_menu();
+ printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno());
+ }
+};
+
+if_stmt:
+ if if_block if_end
+ | if if_block
+{
+ printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno);
+ zconfnerrs++;
+};
+
+if_block:
+ /* empty */
+ | if_block common_block
+ | if_block menu_stmt
+ | if_block choice_stmt
+;
+
+/* menu entry */
+
+menu: T_MENU prompt T_EOL
+{
+ menu_add_entry(NULL);
+ menu_add_prop(P_MENU, $2, NULL, NULL);
+ printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
+};
+
+menu_entry: menu depends_list
+{
+ menu_end_entry();
+ menu_add_menu();
+};
+
+menu_end: end
+{
+ if (zconf_endtoken($1, T_MENU, T_ENDMENU)) {
+ menu_end_menu();
+ printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno());
+ }
+};
+
+menu_stmt:
+ menu_entry menu_block menu_end
+ | menu_entry menu_block
+{
+ printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno);
+ zconfnerrs++;
+};
+
+menu_block:
+ /* empty */
+ | menu_block common_block
+ | menu_block menu_stmt
+ | menu_block choice_stmt
+ | menu_block error T_EOL { zconfprint("invalid menu option"); yyerrok; }
+;
+
+source: T_SOURCE prompt T_EOL
+{
+ $$ = $2;
+ printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2);
+};
+
+source_stmt: source
+{
+ zconf_nextfile($1);
+};
+
+/* comment entry */
+
+comment: T_COMMENT prompt T_EOL
+{
+ menu_add_entry(NULL);
+ menu_add_prop(P_COMMENT, $2, NULL, NULL);
+ printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno());
+};
+
+comment_stmt: comment depends_list
+{
+ menu_end_entry();
+};
+
+/* help option */
+
+help_start: T_HELP T_EOL
+{
+ printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
+ zconf_starthelp();
+};
+
+help: help_start T_HELPTEXT
+{
+ current_entry->sym->help = $2;
+};
+
+/* depends option */
+
+depends_list: /* empty */
+ | depends_list depends
+ | depends_list T_EOL
+;
+
+depends: T_DEPENDS T_ON expr T_EOL
+{
+ menu_add_dep($3);
+ printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
+}
+ | T_DEPENDS expr T_EOL
+{
+ menu_add_dep($2);
+ printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
+}
+ | T_REQUIRES expr T_EOL
+{
+ menu_add_dep($2);
+ printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
+};
+
+/* prompt statement */
+
+prompt_stmt_opt:
+ /* empty */
+ | prompt if_expr
+{
+ menu_add_prop(P_PROMPT, $1, NULL, $2);
+};
+
+prompt: T_WORD
+ | T_WORD_QUOTE
+;
+
+end: T_ENDMENU nl_or_eof { $$ = T_ENDMENU; }
+ | T_ENDCHOICE nl_or_eof { $$ = T_ENDCHOICE; }
+ | T_ENDIF nl_or_eof { $$ = T_ENDIF; }
+;
+
+nl_or_eof:
+ T_EOL | T_EOF;
+
+if_expr: /* empty */ { $$ = NULL; }
+ | T_IF expr { $$ = $2; }
+;
+
+expr: symbol { $$ = expr_alloc_symbol($1); }
+ | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); }
+ | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); }
+ | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; }
+ | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); }
+ | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); }
+ | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); }
+;
+
+symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }
+ | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); }
+;
+
+%%
+
+void conf_parse(const char *name)
+{
+ struct symbol *sym;
+ int i;
+
+ zconf_initscan(name);
+
+ sym_init();
+ menu_init();
+ modules_sym = sym_lookup("MODULES", 0);
+ rootmenu.prompt = menu_add_prop(P_MENU, "Buildroot Configuration", NULL, NULL);
+
+ //zconfdebug = 1;
+ zconfparse();
+ if (zconfnerrs)
+ exit(1);
+ menu_finalize(&rootmenu);
+ for_all_symbols(i, sym) {
+ if (!(sym->flags & SYMBOL_CHECKED) && sym_check_deps(sym))
+ printf("\n");
+ else
+ sym->flags |= SYMBOL_CHECK_DONE;
+ }
+
+ sym_change_count = 1;
+}
+
+const char *zconf_tokenname(int token)
+{
+ switch (token) {
+ case T_MENU: return "menu";
+ case T_ENDMENU: return "endmenu";
+ case T_CHOICE: return "choice";
+ case T_ENDCHOICE: return "endchoice";
+ case T_IF: return "if";
+ case T_ENDIF: return "endif";
+ }
+ return "<token>";
+}
+
+static bool zconf_endtoken(int token, int starttoken, int endtoken)
+{
+ if (token != endtoken) {
+ zconfprint("unexpected '%s' within %s block", zconf_tokenname(token), zconf_tokenname(starttoken));
+ zconfnerrs++;
+ return false;
+ }
+ if (current_menu->file != current_file) {
+ zconfprint("'%s' in different file than '%s'", zconf_tokenname(token), zconf_tokenname(starttoken));
+ zconfprint("location of the '%s'", zconf_tokenname(starttoken));
+ zconfnerrs++;
+ return false;
+ }
+ return true;
+}
+
+static void zconfprint(const char *err, ...)
+{
+ va_list ap;
+
+ fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno() + 1);
+ va_start(ap, err);
+ vfprintf(stderr, err, ap);
+ va_end(ap);
+ fprintf(stderr, "\n");
+}
+
+static void zconferror(const char *err)
+{
+ fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
+}
+
+void print_quoted_string(FILE *out, const char *str)
+{
+ const char *p;
+ int len;
+
+ putc('"', out);
+ while ((p = strchr(str, '"'))) {
+ len = p - str;
+ if (len)
+ fprintf(out, "%.*s", len, str);
+ fputs("\\\"", out);
+ str = p + 1;
+ }
+ fputs(str, out);
+ putc('"', out);
+}
+
+void print_symbol(FILE *out, struct menu *menu)
+{
+ struct symbol *sym = menu->sym;
+ struct property *prop;
+
+ if (sym_is_choice(sym))
+ fprintf(out, "choice\n");
+ else
+ fprintf(out, "config %s\n", sym->name);
+ switch (sym->type) {
+ case S_BOOLEAN:
+ fputs(" boolean\n", out);
+ break;
+ case S_TRISTATE:
+ fputs(" tristate\n", out);
+ break;
+ case S_STRING:
+ fputs(" string\n", out);
+ break;
+ case S_INT:
+ fputs(" integer\n", out);
+ break;
+ case S_HEX:
+ fputs(" hex\n", out);
+ break;
+ default:
+ fputs(" ???\n", out);
+ break;
+ }
+ for (prop = sym->prop; prop; prop = prop->next) {
+ if (prop->menu != menu)
+ continue;
+ switch (prop->type) {
+ case P_PROMPT:
+ fputs(" prompt ", out);
+ print_quoted_string(out, prop->text);
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" if ", out);
+ expr_fprint(prop->visible.expr, out);
+ }
+ fputc('\n', out);
+ break;
+ case P_DEFAULT:
+ fputs( " default ", out);
+ expr_fprint(prop->expr, out);
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" if ", out);
+ expr_fprint(prop->visible.expr, out);
+ }
+ fputc('\n', out);
+ break;
+ case P_CHOICE:
+ fputs(" #choice value\n", out);
+ break;
+ default:
+ fprintf(out, " unknown prop %d!\n", prop->type);
+ break;
+ }
+ }
+ if (sym->help) {
+ int len = strlen(sym->help);
+ while (sym->help[--len] == '\n')
+ sym->help[len] = 0;
+ fprintf(out, " help\n%s\n", sym->help);
+ }
+ fputc('\n', out);
+}
+
+void zconfdump(FILE *out)
+{
+ struct property *prop;
+ struct symbol *sym;
+ struct menu *menu;
+
+ menu = rootmenu.list;
+ while (menu) {
+ if ((sym = menu->sym))
+ print_symbol(out, menu);
+ else if ((prop = menu->prompt)) {
+ switch (prop->type) {
+ case P_COMMENT:
+ fputs("\ncomment ", out);
+ print_quoted_string(out, prop->text);
+ fputs("\n", out);
+ break;
+ case P_MENU:
+ fputs("\nmenu ", out);
+ print_quoted_string(out, prop->text);
+ fputs("\n", out);
+ break;
+ default:
+ ;
+ }
+ if (!expr_is_yes(prop->visible.expr)) {
+ fputs(" depends ", out);
+ expr_fprint(prop->visible.expr, out);
+ fputc('\n', out);
+ }
+ fputs("\n", out);
+ }
+
+ if (menu->list)
+ menu = menu->list;
+ else if (menu->next)
+ menu = menu->next;
+ else while ((menu = menu->parent)) {
+ if (menu->prompt && menu->prompt->type == P_MENU)
+ fputs("\nendmenu\n", out);
+ if (menu->next) {
+ menu = menu->next;
+ break;
+ }
+ }
+ }
+}
+
+#include "lex.zconf.c"
+#include "util.c"
+#include "confdata.c"
+#include "expr.c"
+#include "symbol.c"
+#include "menu.c"
diff --git a/misc/buildroot/package/gnuconfig/ChangeLog b/misc/buildroot/package/gnuconfig/ChangeLog
new file mode 100644
index 000000000..b615b748b
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/ChangeLog
@@ -0,0 +1,1813 @@
+2006-02-27 David S. Miller <davem@sunset.davemloft.net>
+ Ben Elliston <bje@gnu.org>
+
+ * config.sub (sparcv9v, sparc64v): Recognise SUN4V-based SPARCs.
+ * testsuite/config-sub.data: Add test cases.
+
+2006-02-27 Ben Elliston <bje@gnu.org>
+
+ * config.guess, config.sub: Add 2006 to copyright years.
+
+2006-02-23 Ben Elliston <bje@gnu.org>
+
+ * config.guess (EM64T:Interix:*:*): New case.
+ * testsuite/config-guess.data: Add test case.
+
+2006-02-23 Mike Frysinger <vapier@gentoo.org>
+
+ * config.sub (nios, nios2): New.
+ * testsuite/config-sub.data: Add test cases.
+
+2006-02-23 Ben Elliston <bje@gnu.org>
+
+ * config.guess (x86:Interix*:[345]*): Retain full Interix version.
+ * testsuite/config-guess.data: Update Interix test(s).
+
+2006-02-23 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-guess.data: Tweak MSYS_NT-5.1 test.
+
+2006-02-23 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * config.guess (i*86:Linux:*:*): Recognise the Sun Studio compiler
+ by handling #if defined(__sun).
+
+2006-02-23 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Handle i*:MSYS_NT-*:*:* for MSYS/Mingw.
+ * testsuite/config-guess.data: Add test case.
+
+2006-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * config.guess: Don't use semicolons to separate sed commands, as
+ POSIX says it's not portable.
+ Noted by Paul Eggert <eggert@cs.ucla.edu>.
+
+2006-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * config.guess (set_cc_for_build): Do not pass `-q' to mktemp.
+ Reported by Bruce Korb <bkorb@gnu.org>.
+
+2006-01-19 Robert Millan <robertmh@gnu.org>
+
+ * testsuite/config-guess.data: Add test case for GNU/kFreeBSD.
+ * testsuite/config-sub.data: Add test case for amd64-kfreebsd5.4-gnu.
+
+2006-01-02 Ben Elliston <bje@gnu.org>
+
+ * config.guess (*:SolidBSD:*:*): New.
+ * config.sub (-solidbsd*): New.
+ * testsuite/config-guess.data: Add test case.
+ * testsuite/config-sub.data: Ditto.
+
+2005-12-23 Ben Elliston <bje@gnu.org>
+
+ From Takahashi Yoshihiro <nyan@jp.FreeBSD.org>:
+ * config.guess (pc98:FreeBSD:*:*) Add special case.
+ * config.sub (pc98, pc98-*): New.
+ * testsuite/config-guess.data: Add test case.
+ * testsuite/config-sub.data: Ditto.
+
+2005-12-22 Ben Elliston <bje@gnu.org>
+
+ From John Williams <jwilliams@itee.uq.edu.au>:
+ * config.sub (mb, microblaze): New basic_machine.
+ * testsuite/config-sub.data: New tests.
+
+2005-12-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * config.guess (mips:Linux:*:*, mips64:Linux:*:*, i*86:Linux:*:*):
+ Fix quoting of eval command line, allow for preprocessor to insert
+ white space between C tokens.
+ (i*86:Linux:*:*): Handle Portland Group pgcc like Intel icc; it
+ doesn't define __ELF__ either.
+
+2005-12-11 Ben Elliston <bje@gnu.org>
+
+ From Shaun Jackman <sjackman@gmail.com>:
+ * config.sub: Add the KERNEL-OS combination linux-newlib*.
+ * testsuite/config-sub.data: Add a test for i386-linux-newlib.
+
+2005-12-11 Ben Elliston <bje@gnu.org>
+
+ Reported by Leif Ekblad <leif@rdos.net>:
+ * config.guess (i*86:rdos:*:*): New.
+ * config.sub: Handle rdos.
+ * testsuite/config-guess.data: Add test case for RDOS.
+ * testsuite/config-sub.data: Likewise.
+
+2005-12-09 Ben Elliston <bje@gnu.org>
+
+ Reported by Jan-Benedict Glaw <jbglaw@lug-owl.de>:
+ * config.guess (vax:Linux:*:): Detect as vax-dec-linux-gnu.
+ * testsuite/config-guess.data: Add test.
+
+2005-12-09 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config.sub (mt): Rename from ms1.
+ (ms1): Alias it to mt for backward compatibility.
+ * testsuite/config-sub.data: Update testsuite.
+
+2005-11-13 Kean Johnston <jkj@sco.com>
+
+ * config.sub: Allow -sco6 and -sco5v6 to be aliases for SCO
+ OpenServer 6.
+ * testsuite/config-sub.data: New tests.
+
+2005-11-11 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-guess.data: Add test case for Linux PPC64.
+
+2005-11-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (x86:Interix*:[345]*): Handle Interix version 5.
+ * testsuite/config-guess.data: Add test case.
+
+2005-09-19 Gerben Wierda <Gerben.Wierda@rna.nl>
+
+ * config.guess (*:Darwin:*:*): Don't treat *86 specifically.
+
+2005-08-03 Ben Elliston <bje@gnu.org>
+
+ Reported by Kulkin Alexey <kulkin@yandex.ru>:
+ * config.guess (x86_64:CYGWIN*:*:*): New case.
+ * testsuite/config-guess.data: Add test case.
+
+2005-07-14 Robert Millan <robertmh@gnu.org>
+
+ * config.guess (or32:Linux:*:*): Detect.
+ * testsuite/config-guess.data: Add test case.
+
+2005-07-08 Michael Haubenwallner <michael.haubenwallner@salomon.at>
+
+ * config.guess: Let set_cc_for_build evaluate only once to avoid
+ creation of more than one tmpdir without removing the old one.
+
+2005-07-08 Ben Elliston <bje@gnu.org>
+
+ * config.sub: Add support for Haiku.
+ * testsuite/config-sub.data: Add test cases for i386, SPARC and
+ PowerPC Haiku.
+
+2005-07-08 Ben Elliston <bje@gnu.org>
+
+ * Makefile (SHELL): Remove override.
+
+2005-07-04 Ben Elliston <bje@gnu.org>
+ Paul Mundt <lethal@linux-sh.org>
+
+ * config.sub: Handle sh2a/sh4a.
+ * testsuite/config-sub.data: Add test cases.
+
+2005-07-01 Robert Millan <robertmh@gnu.org>
+
+ * config.sub: Deprecate "openrisc" in favour of "or32".
+ Do not default the OS field to "coff".
+ * testsuite/config-sub.data: Add a test case.
+
+2005-06-30 Ben Elliston <bje@gnu.org>
+
+ * config.sub (sh64): Remove duplicate entry.
+ * testsuite/config-sub.data: Add test case for sh64.
+
+2005-06-30 Mike Frysinger <vapier@gentoo.org>
+
+ * config.sub (mips64vr5900, mips64vr5900el): New machines.
+ * testsuite/config-sub.data: Add test cases.
+
+2005-06-30 Brad Smith <brad@comstyle.com>
+
+ * config.guess: Simplify OpenBSD support.
+
+2005-06-02 Aldy Hernandez <aldyh@redhat.com>
+
+ * config.sub (ms1, ms1-*): New.
+ * testsuite/config-sub.data: Add test cases.
+
+2005-06-02 Jim Blandy <jimb@redhat.com>
+
+ * config.sub (m32c, m32c-*): New.
+ * testsuite/config-sub.data: Add test cases.
+
+2005-05-27 Ben Elliston <bje@gnu.org>
+
+ * config.guess (i*:windows32*:*): uname -m includes "-pc", so no
+ need to emit it additionally.
+ * testsuite/config-guess.data: Update test case.
+
+2005-05-15 Ben Elliston <bje@gnu.org>
+
+ Reported by Sam Steingold <sds@gnu.org>:
+ * config.guess (i*:windows32*:*): New.
+ * testsuite/config-guess.data: Add a corresponding test case.
+
+2005-05-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config.guess: Fix remaining problematic uses of "exit 0" (and
+ one problematic use of "&& exit").
+
+2005-05-12 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Update Free Software Foundation address.
+ * config.sub: Likewise.
+
+2005-05-12 Ben Elliston <bje@gnu.org>
+
+ * uname: Similar to the last change, remove all exit commands and
+ let the script exit with the exit code of the last command.
+
+2005-05-12 Paul Eggert <eggert@CS.UCLA.EDU>
+
+ Explanation for this subtle change:
+
+ From: Paul Eggert <eggert@CS.UCLA.EDU>
+ To: config-patches@gnu.org
+ Subject: config.guess, config.sub misdiagnose write errors
+
+ config.guess and config.sub sometimes mishandle write errors to
+ stdout: they either ignore the errors, or output invalid
+ diagnostics when they occur. For a simple (albeit unrealistic)
+ example, on my Solaris 8 (sparc) host, the command "config.guess
+ >&-" exits with status 0; it should exit with status 1, due to the
+ write failure.
+
+ * config.guess: Don't exit with an explicit exit code of 0.
+ * config.sub: Likewise.
+
+2005-05-12 Ben Elliston <bje@gnu.org>
+
+ * config.guess (i*86:skyos:*:*): New.
+ * config.sub (case $os): Handle "-skyos*" as a valid OS.
+ * testsuite/config-guess.data: Add a test case.
+ * testsuite/config-sub.data: Likewise.
+
+2005-05-12 Tim Rice <tim@multitalents.net>
+
+ * config.guess: Add support for SCO OpenServer 6.
+
+2005-05-12 Noah Misch <noah@cs.caltech.edu>
+
+ * config.guess (9000/[34678]??:HP-UX:*:*): Discard stderr of `cc
+ -E -'; HP `cc' emits an error for it but still preprocesses
+ standard input as expected. Add comment.
+
+2005-05-12 Nick Burrett <nick@sqrt.co.uk>
+ Ben Elliston <bje@gnu.org>
+
+ * config.guess (arm:riscos:*:*): New configuration.
+ * testsuite/config-sub.data: New tests.
+ * testsuite/config-guess.data: Likewise.
+
+2005-05-12 Nick Burrett <nick@sqrt.co.uk>
+
+ * config.guess: Add a missing newline to arm-acorn-riscix string.
+
+2005-04-22 Paul Green <Paul.Green@stratus.com>
+ Ben Elliston <bje@gnu.org>
+
+ * config.guess: Add Stratus VOS IA32 systems.
+ * testsuite/config-guess.data: Add a testcase.
+
+2005-04-22 Ben Elliston <bje@gnu.org>
+ Bernd Schmidt <bernds_cb1@t-online.de>
+
+ * config.sub (bfin): New target.
+ * testsuite/config-sub.data: Test bfin-elf.
+
+2005-04-22 Ben Elliston <bje@gnu.org>
+ Dave Miller <davem@davemloft.net>
+
+ * config.sub (sparc64b): Handle.
+ * testsuite/config-sub.data: Test sparc64-linux, sparc64b-linux.
+
+2005-03-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config.guess: Update URL for script location.
+ Problem reported by Bruno Haible.
+
+2005-02-10 Ben Elliston <bje@gnu.org>
+ J Shepherd <jashepherd@usa.net>
+
+ * config.guess (NSE-?:NONSTOP_KERNEL:*:*): New.
+ * testsuite/config-guess.data: Test for nse-tandem-nsk.
+
+2005-02-10 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-guess.data: Add craynv-cray-unicosmp2.5.X case.
+
+2005-02-10 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-sub.sh (run_config_sub): New function. Compute
+ $rc within the function and return it.
+ * testsuite/config-guess.sh (run_config_guess): Likewise.
+
+2005-02-10 Ben Elliston <bje@gnu.org>
+
+ * config.guess (amd64:CYGWIN*:*:*): New.
+ * testsuite/config-sub.data: Add amd64-cygwin, x86_64-cygwin.
+ * testsuite/config-guess.data: Add x86_64-unknown-cygwin test.
+
+2005-02-10 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Update copyright years.
+ * config.sub: Likewise.
+
+2005-01-11 Inderpreet Singh <inderpreetb@noida.hcltech.com>
+ Ben Elliston <bje@gnu.org>
+
+ * config.sub: Handle maxq target.
+ * testsuite/config-sub.data: Add maxq and maxq-elf tests.
+
+2004-11-30 Melissa Mears <asterisk@graces.dricas.com>
+
+ * config.sub: Handle xbox alias.
+ * testsuite/config-sub.data: Add xbox case.
+
+2004-11-17 Ian Lance Taylor <ian@wasabisystems.com>
+ Ben Elliston <bje@gnu.org>
+
+ * config.sub: Recognize xscalee[bl].
+ * testsuite/config-sub.data: Add xscale, xscalee[bl] cases.
+
+2004-11-12 Ben Elliston <bje@gnu.org>
+
+ * config.guess (*:z/VM:*:*): Add new case.
+ * config.sub (os): Add case for -zvmoe.
+ * testsuite/config-guess.data: Add a test case.
+ * testsuite/config-sub.data: Likewise.
+
+2004-11-12 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-guess.sh: Use , and not / as the sed delimiter.
+
+2004-11-12 Andris Pavenis <pavenis@latnet.lv>
+
+ * config.sub (djgpp): Alias to i586-pc-msdosdjgpp.
+ * testsuite/config-sub.data: Add a test case.
+
+2004-10-25 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-guess.sh: Reduce recurring tabs into a single
+ tab, to allow the test data to be better aligned in columns.
+
+2004-10-25 Ben Elliston <bje@gnu.org>
+
+ Reported by Monty Solomon <monty@roscom.com>:
+ * config.guess (*:XENIX:*:SysV): New.
+ * testsuite/config-guess.data: Add a test case.
+
+2004-10-25 Ben Elliston <bje@gnu.org>
+
+ Reported by Martin Hammer <martin.hammer@siemens.com>:
+ * config.guess (DRS?6000:isis:4.2*:7*): New pattern.
+
+2004-09-07 Ben Elliston <bje@gnu.org>
+
+ * config.guess (frv:Linux:*:*): New.
+ * testsuite/config-sub.data: Add cris-linux, frv-linux.
+ * testsuite/config-guess.data: Add frv-linux-unknown-gnu case.
+
+2004-08-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * config.sub: Handle crisv32, alias etraxfs.
+ * config.guess (crisv32:Linux:*:*): Handle.
+ * testsuite/config-sub.data: Add test case.
+ * testsuite/config-guess.data: Likewise.
+
+2004-08-22 Ben Elliston <bje@gnu.org>
+
+ * Makefile (check): Run config-guess.sh tests as well.
+ * testsuite/config-guess.sh: New test.
+ * testsuite/config-guess.data: New file.
+ * testsuite/uname.in: Likewise.
+ * testsuite/config-sub.data (amd64-unknown-freebsd5.2): New case.
+
+2004-08-13 Brad Smith <brad@comstyle.com>
+
+ * config.guess (*:OpenBSD:*:*): Remove defunct MIPS machines.
+ (sgi:OpenBSD:*:*): Emit mips64, not mipseb.
+
+2004-08-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config.guess (*:Darwin:*:*): If uname -p reports "unknown",
+ assume the processor is a powerpc. This is because coreutils
+ uname (at least versions 4.5.7 through 5.2.1) outputs "unknown"
+ in this case, due to a MacOS X bug that causes
+ sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0)
+ to return a negative number.
+ Problem reported by Petter Reinholdtsen in:
+ http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html
+
+2004-07-19 Ben Elliston <bje@gnu.org>
+
+ * config.guess (S7501:*:4.0:3.0): Handle NCR System V UNIX machine.
+
+2004-07-02 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-sub.data: Add i386-elf to i786-elf.
+
+2004-06-30 Ben Elliston <bje@gnu.org>
+
+ * testsuite/config-sub.data: Add more new tests.
+
+2004-06-25 Ben Elliston <bje@gnu.org>
+
+ * Makefile (check): New target.
+ * testsuite/config-sub.sh: New test.
+ * testsuite/config-sub.data: New file.
+
+2004-06-24 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Update copyright years.
+ * config.sub: Likewise.
+
+2004-06-22 Robert Millan <robertmh@gnu.org>
+
+ * config.guess (*:FreeBSD:*:*): Remove check for glibc (unneeded
+ since GNU/kFreeBSD systems match *:GNU/*:*:* instead).
+
+2004-06-22 Stanley F. Quayle <stan@stanq.com>
+
+ * config.guess (*:*VMS:*:*): New entry. Replaces
+ Alpha:OpenVMS:*. Recognize and advertise all VMS flavors as dec
+ manufacturer.
+
+2004-06-22 Ben Elliston <bje@gnu.org>
+
+ * config.guess: Cray fixes from Wendy Palm <wendyp@cray.com>.
+ * config.sub: Likewise.
+
+2004-06-22 Ben Elliston <bje@gnu.org>
+
+ Reported by Hans-Peter Nilsson <hp@bitrange.com>:
+ * config.sub: Correctly handle mmix-knuth and mmix-knuth-mmixware.
+
+2004-06-21 Ben Elliston <bje@gnu.org>
+
+ * Makefile: New file.
+
+2004-06-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (pegasos:OpenBSD:*:*): Remove.
+
+2004-06-11 Ben Elliston <bje@gnu.org>
+
+ From Wouter Verhelst <wouter@grep.be>:
+ * config.guess (M68*:*:R3V[5678]:*): Detect R3V8.
+
+2004-06-11 Ben Elliston <bje@gnu.org>
+
+ * config.guess (luna88k:OpenBSD:*:*): New.
+
+2004-03-12 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * config.guess (m32r*:Linux:*:*): New case.
+ * config.sub: Handle m32rle.
+
+2004-03-12 Ben Elliston <bje@wasabisystems.com>
+
+ From Jens Petersen <petersen@redhat.com>:
+ * config.sub: Handle sparcv8.
+
+2004-03-03 Ben Elliston <bje@wasabisystems.com>
+
+ From Tom Smith <smith@cag.lkg.hp.com>:
+ * config.guess: Version suffixes are equally significant on Tru64
+ V4.* and V5.*, so do not ignore them on V5.*. Handle a version
+ prefix of "P" (patched kernel).
+
+2004-02-23 Tal Agmon <Tal.Agmon@nsc.com>
+
+ * config.sub: Add support for National Semiconductor CRX target.
+
+2004-02-16 Thorsten Glaser <x86@ePost.de>
+
+ * config.guess (*:MirBSD:*:*, macppc:MirBSD:*:*): Handle.
+ * config.sub: Handle -mirbsd*.
+
+2004-02-16 Brad Smith <brad@comstyle.com>
+
+ * config.guess: Recognize OpenBSD on AMD64 and CATS hardware.
+
+2004-02-11 Ben Elliston <bje@wasabisystems.com>
+
+ * config.sub (abacus): Add.
+
+2004-02-11 Galit Heller <Galit.Heller@nsc.com>
+
+ * config.sub: Add support for National Semiconductor CR16C target.
+
+2004-02-02 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess (*:ekkoBSD:*:*): Handle.
+ * config.guess: Handle -ekkobsd*.
+
+2004-01-30 Ben Elliston <bje@wasabisystems.com>
+
+ * NEWS: Remove.
+
+2004-01-24 Ben Elliston <bje@wasabisystems.com>
+
+ From Brett E. Wynkoop <wynkoop@wynn.com>:
+ * config.guess (m68k:machten:*:*): Handle.
+
+2004-01-20 Jeroen Ruigrok van der Werven <asmodai@dragonflybsd.org>
+
+ * config.guess: Fix DragonFly entry to really work.
+
+2004-01-05 Ben Elliston <bje@wasabisystems.com>
+ Joachim Schmitz <schmitz@hp.com>
+
+ * config.guess: Handle NSR-? to accept any CPU type.
+
+2004-01-05 Ben Elliston <bje@wasabisystems.com>
+
+ * config.sub: Handle amd64-*.
+
+2003-11-20 Kristian Van Der Vliet <vanders@liqwyd.com>
+
+ * config.guess (i*86:syllable:*:*): New.
+ * config.sub (-syllable*): Likewise.
+
+2003-11-18 Jeroen Ruigrok van der Werven <asmodai@dragonflybsd.org>
+
+ * config.guess (*:DRAGONFLY:*:*): New.
+ * config.sub (-dragonfly*): Likewise.
+
+2003-11-03 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess: Detect OpenBSD on Pegasos I hardware.
+
+2003-11-03 Jim Tison <jtison@us.ibm.com>
+ Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config.sub (tpf, -tpf*): Recognize.
+
+2003-10-16 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess (5000:UNIX_System_V:4.*:*): Detect the Fujitsu
+ VPP5000. Reported by Naoki Yoshida <naoki@th.nao.ac.jp>.
+
+2003-10-16 Bernardo Innocenti <bernie@develer.com>
+
+ * config.sub (linux-uclibc, uclinux-uclibc): Handle.
+
+2003-10-16 Ben Elliston <bje@wasabisystems.com>
+
+ Reported by Todd Humphrey <thump@isl.net>:
+ * config.guess (*:OS400:*:*): Detect OS/400 on AS/400 machines.
+ * config.sub (os400, -os400*): Recognise.
+
+2003-10-07 Robert Millan <robertmh@gnu.org>
+ Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess (*:GNU/*:*:*): New. Generic check for systems with
+ GNU libc and userland (matches GNU/KFreeBSD and GNU/KNetBSD).
+ (*:GNU/FreeBSD:*:*): Remove, superceeded by GNU/*.
+ * config.sub: Handle -knetbsd*.
+
+2003-10-07 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess (3[345]??:*:4.0:3.0): Expand pattern to match 3526.
+
+2003-10-03 Chris Demetriou <cgd@broadcom.com>
+
+ * config.sub (mipsisa64r2*): Add.
+
+2003-10-03 Ben Elliston <bje@wasabisystems.com>
+ Joachim Schmitz <schmitz@hp.com>
+
+ * config.guess (NSR-*:NONSTOP_KERNEL:*:*): Recognise NSR-Y.
+
+2003-08-18 Andreas Krennmair <krennmair@lizenzfrei.at>
+
+ * config.guess: Add detection for diet libc.
+ * config.sub: Handle linux-dietlibc.
+
+2003-07-29 Ben Elliston <bje@wasabisystems.com>
+
+ * NEWS: New draft file.
+
+2003-07-17 Ben Elliston <bje@wasabisystems.com>
+
+ Reported as missing by Doug Evans:
+ * config.sub: Handle iq2000 and iq2000-*.
+
+2003-07-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * config.sub: Add am33_2.0 machine.
+
+2003-07-04 Ben Elliston <bje@wasabisystems.com>
+
+ * config.sub: Handle -kfreebsd*. From Robert Millan.
+
+2003-07-02 Robert Millan <rmh@debian.org>
+
+ * config.guess (*:GNU/FreeBSD:*:*): Prefix GNU/FreeBSD triplet
+ with a "k" to indicate the system is based on FreeBSD's kernel and
+ not the whole OS.
+
+2003-06-17 Ben Elliston <bje@wasabisystems.com>
+
+ From by Stephen Thomas <stephen.thomas@superh.com>:
+ * config.guess (sh64*:*:*:Linux): New case.
+ * config.sub (sh64): Map to sh64-unknown.
+
+2003-06-17 Ben Elliston <bje@wasabisystems.com>
+
+ Reported by Dennis Grevenstein <dennis@pcde.inka.de>:
+ * config.guess (sei:*:*:seiux): Detect SEIUX running on MIPS-based
+ workstations manufactured by Sumitomo Electric Industries.
+ * config.sub (sei, -sei*): Handle.
+
+2003-06-13 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * config.sub (c4x, tic4x): Re-arrange and fix.
+
+2003-06-12 Bernard Giroud <bernard.giroud@creditlyonnais.ch>
+
+ * config.guess (Alpha*:OpenVMS:*:*): New entry.
+
+2003-06-06 Ben Elliston <bje@wasabisystems.com>
+
+ * config.sub: Recognise pentium3 and pentium4. From Kelley Cook
+ <kcook34@ford.com>.
+
+2003-06-06 Douglas B Rupp <rupp@gnat.com>
+
+ * config.guess: Recognize Interix 4.
+
+2003-06-04 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess (set_cc_for_build): Allow insecure temporary
+ filenames to be generated on systems without mktemp(1) or $RANDOM,
+ but issue a warning to standard error. Suggested by Hans-Peter
+ Nilsson.
+
+2003-05-24 Ben Elliston <bje@wasabisystems.com>
+
+ * config.sub: Handle $os values of -nx6 and -nx7.
+
+2003-05-22 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess: Detect ICL NX version 6 running on ICL/Fujitsu DRS
+ 6000 machines. Reported by <alpha1@alpha1teclabs.com>.
+
+2003-05-19 Hans-Peter Nilsson <hp@axis.com>
+
+ * config.guess (cris:Linux:*:*): New case.
+
+2003-05-09 Ben Elliston <bje@wasabisystems.com>
+
+ * config.guess (SHG2:*:4.0:3.0): Handle NCR System V UNIX machine.
+ Reported by Raj Mannar <rajman@ureach.com>.
+
+2003-05-09 Andreas Jaeger <aj@suse.de>
+
+ * config.sub (maybe_os): Add alias amd64 for x86_64.
+
+2003-05-09 Ben Elliston <bje@wasabisystems.com>
+
+ From Robert Millan <zeratul2@wanadoo.es>
+ * config.guess (*:GNU/FreeBSD:*:*): Handle.
+
+2003-02-22 Ben Elliston <bje@redhat.com>
+
+ Revert the following due to the demise of MicroBSD:
+
+ 2003-01-03 Scott Kamp <dingo@microbsd.net>
+ * config.guess: Detect MicroBSD operating system on i386 CPUs.
+ * config.sub: Handle aliases for such.
+
+2003-02-03 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle -kaos*.
+
+2003-02-03 Charles Lepple <clepple@ghz.cc>
+
+ * config.sub: Handle TI tic55x-* and tic6x-* targets.
+
+2003-01-30 Ben Elliston <bje@redhat.com>
+
+ * config.guess (alpha:OSF1:*:*): Use /usr/sbin/psrinfo -v to
+ detect the Alpha CPU type, not an assembled program requiring
+ $CC_FOR_BUILD.
+
+2003-01-28 Nick Clifton <nickc@redhat.com>
+
+ * config.sub: Add sh2e support.
+
+2003-01-22 Fabio Alemagna <falemagn@aros.org>
+
+ * config.sub: Handle -aros*.
+
+2003-01-10 Stuart Hastings <stuart@apple.com>
+
+ * config.guess: Make i686 the default for Darwin/x86.
+
+2003-01-03 Scott Kamp <dingo@microbsd.net>
+
+ * config.guess: Detect MicroBSD operating system on i386 CPUs.
+ * config.sub: Handle aliases for such.
+
+2003-01-02 Ben Elliston <bje@redhat.com>
+
+ From Wendy Palm <wendyp@cray.com>:
+ * config.guess (CRAY*T3D:*:*:*): Remove.
+ (*:UNICOS/mp:*:*): New system.
+ * config.sub (t3d): Remove.
+ (nv1): Add.
+
+2003-01-02 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Fix mipstx39-* and mipstx39el-* handling (typo).
+
+2003-01-02 Ben Elliston <bje@redhat.com>
+
+ From Dmitry Diky <diwil@mail.ru>:
+ * config.sub (basic_machine): Add msp430 and msp430-*.
+
+2003-01-02 Chris Demetriou <cgd@broadcom.com>
+
+ * config.sub (mipsisa32r2*): Add.
+
+2002-12-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess (set_cc_for_build): Rework to do more secure tmp
+ directory creation. Remove temporary files and tmp directory on
+ exit; remove redundant rm(1) and rmdir(1) commands throughout.
+
+2002-12-17 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * config.guess (hppa*): Remove tmpdir when CC_FOR_BUILD is set.
+
+2002-12-11 Ben Elliston <bje@redhat.com>
+ Dave Anglin <dave.anglin@nrc.ca>
+ Ross Alexander <ross.alexander@uk.neceur.com>
+
+ * config.guess (*:HP-UX:*:*): Detect 64-bit compiler.
+
+2002-11-30 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * config.sub (-nto-qnx*): New $os pattern.
+ (-nto*): Preserve OS version when converting to -nto-qnx*.
+
+2002-11-30 Ben Elliston <bje@redhat.com>
+
+ From Stefan Neis <neis@kobil.de>:
+ * config.guess: Reorder entries so that hosts with a different
+ operating system won't be misdetected as System V simply because
+ their version number happens to be 3.2, 4.* or 5. This is needed
+ for OS/2, at least, which is currently at version 4.52.
+
+2002-11-30 Ben Elliston <bje@redhat.com>
+
+ From Joel Baker <lucifer@lightbearer.com>:
+ * config.guess: Append "-gnu" to triplet on Debian/NetBSD systems.
+ * config.sub: Recognise netbsd*-gnu*.
+
+2002-11-30 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * config.guess (mips64:Linux:*:*): Recognize.
+ (mips:Linux:*:*): Recognize as mips-unknown-linux-gnu instead of
+ mips-pc-linux-gnu.
+
+2002-11-30 Douglas B Rupp <rupp@gnat.com>
+
+ * config.guess: Make default Interix arch "i586".
+
+2002-11-30 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Add "SDS2" to machines that run NCR System V UNIX.
+ Reported by <agustinsanchez@prodigy.net.mx>.
+
+2002-11-13 Ben Elliston <bje@redhat.com>
+
+ * config.sub (windows32): Remove bad idea.
+
+2002-11-13 Werner Lemberg <wl@gnu.org>
+
+ * config.sub: Add -mks*.
+
+2002-11-13 Jeff Conrad <jeff_conrad@msn.com>
+
+ * config.guess: Detect MKS running on Windows {95,98,NT}.
+
+2002-11-13 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect PowerMAX OS on Concurrent Synergy machines.
+ Reported by Sam Williams <sam.williams@hs.utc.com>.
+
+2002-11-08 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect m68k-diab-dnix.
+ * config.sub: Handle -dnix*.
+
+2002-10-21 Paul Eggert <eggert@twinsun.com>
+
+ * config.guess (CC_FOR_BUILD): Put "-o outputfile" before any
+ operands. POSIX 1003.1-2001 says that "c99 file.c -o file" is not
+ supported; you must put all options before all operands, e.g. "c99
+ -o file file.c".
+
+2002-09-05 Svein E. Seldal <Svein.Seldal@solidas.com>
+
+ * config.sub: Add tic4x target.
+
+2002-09-03 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect NSR-D machines for nsr-tandem-nsk.
+ Reported by <Duncan_Stodart@insession.com>.
+
+2002-08-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Concurrent PowerMaxion.
+ Reported by Lloyd Goldston <lloyd.goldston@sed.redstone.army.mil>.
+
+ * config.guess: Detect Convergent 3B1 machines (running AT&T UNIX).
+ Reported by Bruce Lilly <blilly@erols.com>.
+
+2002-08-22 Urs Janßen <urs@akk.org>
+
+ * config.sub: Cosmetic whitespace fixes.
+
+2002-08-20 Phil Edwards <pme@gcc.gnu.org>
+
+ * config.sub: Accept athlon_* patterns as synonyms for i686-pc.
+
+2002-08-20 Ben Elliston <bje@redhat.com>
+
+ From Chris Demetriou <cgd@broadcom.com>:
+ * config.sub (sb1, sb1el): Treat these machines as
+ mipsisa64sb1-unknown and mipsisa64sb1el-unknown, respectively.
+
+2002-08-19 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Super-UX on NEC SX-6.
+ Reported by Joachim Worringen <joachim@ccrl-nece.de>.
+
+2002-08-16 Eric Christopher <echristo@redhat.com>
+
+ * config.sub (mipsisa64sr71k*, mips64vr*): Add.
+
+2002-07-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect alphaev7. Reported by urs@akk.org.
+
+2002-07-03 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Use umask to create temporary directly safely.
+ Using mkdir and chmod introduces a race.
+
+2002-07-03 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect ICL NX version 7 running on ICL/Fujitsu DRS
+ 6000 machines. Reported by Henrik N. Spuur Hansen <hnsh@mera.dk>.
+
+2002-07-03 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Execute $dummy, not ./$dummy, throughout.
+
+ * config.guess (set_cc_for_build): Create a chmod 700 directory in
+ /tmp (or $TMPDIR, if set) to store temporary files generated for
+ use by the C compiler. This should resist the /tmp symbolic link
+ race vulnerability reported by Lawrence Teo.
+
+2002-07-03 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle freebsd*. From Bruno Haible.
+
+2002-07-01 Bruno Haible <bruno@clisp.org>
+
+ * config.guess: For FreeBSD systems using glibc, add suffix "-gnu".
+ * config.sub: Accept freebsd-gnu system name.
+
+2002-06-21 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * config.sub: Add support for sh[12], sh3e, sh[1234]le, sh3ele,
+ shle, sh[1234]le, sh3ele.
+
+2002-06-21 Dave Brolley <brolley@redhat.com>
+
+ * config.sub: Add support for frv.
+
+2002-06-20 Chris Demetriou <cgd@broadcom.com>
+
+ * config.sub: Add Broadcom SiByte SB-1 processor support
+ (mipsisa64sb1, mipsisa64sb1el). Add little-endian variants of
+ mipsisa32 and mipsisa64 (mipsisa32el and mipsisa64el,
+ respectively). Sort MIPS entries and split their lines a bit more
+ logically. Make sure that all of the MIPS entries in the "without
+ company name" target list are echoed in the "with company name"
+ list.
+
+2002-06-19 Denis Chertykov <denisc@overta.ru>
+
+ * (config.sub): Add ip2k support.
+
+2002-06-19 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * config.sub: Accept sh64le and sh64le-*.
+
+2002-05-29 Paul Eggert <eggert@twinsun.com>
+
+ * config.guess: Don't use egrep, as POSIX 1003.1-2001 no longer
+ requires egrep. Use grep instead.
+
+2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
+
+ * config.sub: Add DLX support.
+
+2002-05-22 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.guess: Add case for "armeb" in NetBSD section.
+ * config.sub: Allow "armeb" as a valid CPU type.
+
+2002-05-16 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect PowerMAX OS on Concurrent Night Hawk.
+ * config.sub: Handle -powermax*.
+
+2002-05-02 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Add "4400" to machines that run NCR System V UNIX.
+
+2002-04-25 Mark Mitchell <mark@codesourcery.com>
+
+ * config.sub (*-wrs-windiss): New targets.
+
+2002-03-20 Keith Thompson <kst@sdsc.edu>
+
+ * config.guess (ia64:Linux:*:*): Output "ia64-unknown-linux-gnu".
+
+2002-03-20 Ben Elliston <bje@redhat.com>
+
+ * config.guess (set_cc_for_build): Add c99 to list of candidates.
+
+2002-03-12 J.T. Conklin <jtc@acorntoolworks.com>
+
+ * config.guess: Add OS release to QNX config strings.
+
+2002-03-06 Chris Demetriou <cgd@broadcom.com>
+
+ * config.sub: Add support for mipsisa64.
+
+2002-03-04 Ben Elliston <bje@redhat.com>
+
+ From Kevin Ryde <user42@zip.com.au>:
+ * config.sub (sparclet-*-*): Accept any vendor.
+ (sparc86x): Expand to sparc86x-unknown-none.
+
+2002-03-04 Adrian Bunk <bunk@fs.tum.de>
+
+ * config.guess (*:NetBSD:*:*): Use "sysctl -n hw.machine_arch"
+ instead of "uname -p" to get UNAME_MACHINE_ARCH.
+
+2002-02-22 Ben Elliston <bje@redhat.com>
+ Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config.sub (case $basic_machine): Add mips and clean up other
+ Linux specific cases. Now `config.sub mips` yields mips-unknown-elf.
+
+2002-02-22 Ben Elliston <bje@redhat.com>
+
+ From Kevin Ryde <user42@zip.com.au>:
+ * config.sub (sv1-*, ymp-*, c90-*): Preserve CPU type in output.
+ (t3d-*, t3e-*): Canonicalize to alpha and alphaev5.
+
+2002-02-18 Jim Meyering <meyering@lucent.com>
+
+ * config.guess: Don't use `head -1'; it's no longer portable.
+ Use `sed 1q' instead.
+
+2002-02-15 Ben Elliston <bje@redhat.com>
+
+ * config.sub (rtmk*, rtmk-nova*): Recognise.
+ From Johan Rydberg <jrydberg@rtmk.org>.
+
+2002-02-15 Wendy Palm <wendyp@cray.com>
+
+ * config.guess (CRAY*X-MP:*:*:*, CRAY-2:*:*:*): Remove, as we know
+ they no longer exist in the field.
+ * config.sub (cray2, xmp): Likewise.
+ (cray, ymp, [cj]90-cray): basic_machine is now j90-cray.
+ (sv1-cray, cray-t3e, cray-t3d, cray-t90): New basic machine patterns.
+
+2002-02-15 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Accept m68060.
+
+2002-02-12 Ben Elliston <bje@redhat.com>
+
+ * config.sub (sx?-*, superux*): New basic_machine and os.
+ From Len Makin <Len.Makin@csiro.au>.
+
+2002-02-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Set LC_ALL, not LANG, when running ld --help.
+ From Nicola Pero <nicola@brainstorm.co.uk>.
+
+2002-02-01 Ben Elliston <bje@redhat.com>
+
+ * config.sub (sh64, sh64-*): Add new machine.
+
+2002-01-31 Ivan Guzvinec <ivang@opencores.org>
+
+ * config.sub: Add support for or32.
+
+2002-01-26 Andy Olson <andrew.olson@lmco.com>
+
+ * config.guess (*:QNX:*:*): Report i386-* rather than x86pc-*.
+ Discussed with and approved by <peterv@qnx.com>.
+
+2002-01-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess (i*86:Linux:*:*): Specifically handle the Intel icc
+ compiler, which doesn't define __ELF__. Submitted by Erik Lindahl
+ <lindahl@stanford.edu>.
+
+2002-01-22 Nicola Pero <nicola@brainstorm.co.uk>
+
+ * config.guess (i*86:Linux:*:*): Fixed: export LANG=C before
+ running ld so that linker output can be assumed to be in English,
+ and it works with non-default locales.
+
+2002-01-10 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Update Per Bothner's mail address.
+
+2002-01-02 Douglas B. Rupp <rupp@gnat.com>
+
+ * config.sub (alpha64*): New basic_machine.
+
+2002-01-02 Ben Elliston <bje@redhat.com>
+
+ From Sigbjorn Skjaeret <cisc@c2i.net>.
+ * config.guess: Add detection for MorphOS.
+ * config.sub: Handle morphos*.
+
+2002-01-02 H.J. Lu <hjl@gnu.org>
+
+ * config.guess (mips:Linux:*:*): Undef CPU, mips and mipsel first.
+
+2001-12-13 Douglas B. Rupp <rupp@gnat.com>
+
+ * config.guess: Recognize x86 Interix version 3.
+
+2001-12-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess (i*86:Linux:*:*): Minor simplification: have the
+ preprocessor emit shell assignments and just eval the output.
+
+2001-12-12 H.J. Lu <hjl@gnu.org>
+
+ * config.guess (mips:Linux:*:*): Re-work.
+
+2001-12-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess (i*86:Linux:*:*): Speed up detection of x86 Linux
+ systems by using just the C preprocessor rather than assembling
+ and linking a final executable.
+
+2001-12-12 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.guess: Simplify assignment of machine for NetBSD targets,
+ and make it match the convention that NetBSD uses. List all
+ NetBSD architectures that require "elf" at the end of the OS name.
+
+2001-12-10 Lars Brinkhoff <lars@nocrew.org>
+
+ * config.sub: Recognize a few PDP-10 aliases.
+
+2001-12-03 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise the Nucleus family of operating systems.
+ From <Takahiko_Kawasaki@cii.csk.co.jp>.
+
+2001-12-03 Bob Wilson <bwilson@tensilica.com>
+
+ * config.sub: Add support for Xtensa targets.
+
+2001-11-30 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise NEC v850e. From Miles Bader
+ <miles@lsi.nec.co.jp>.
+
+2001-11-26 Ben Elliston <bje@redhat.com>
+
+ * config.guess (nsr-tandem-nsk): Detect all known NSR processor
+ types. Contributed by Kjetil Barvik <kjetil.barvik@bbs.no>.
+
+2001-11-16 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Accept "-atheos*" as a valid OS.
+ From Taco Witte <T.C.Witte@phys.uu.nl>.
+
+2001-11-08 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle 3487/3488 machines for NCR SysV UNIX.
+ Contributed by Melvin M. Bagaforo <mbagaforo@makro.com.ph>.
+
+2001-11-07 Adrian von Bidder <avbidder@acter.ch>
+
+ * config.sub: Accept "-uclinux*" as a valid OS.
+
+2001-11-07 D.J. Barrow <djbarrow@de.ibm.com>
+
+ * config.sub: Added S/390 31 and 64 bit target.
+
+2001-11-06 John Marshall <jmarshall@acm.org>
+
+ * config.sub: Accept "-palmos*" as a valid OS.
+
+2001-11-07 Geoffrey Keating <geoffk@redhat.com>
+
+ * config.sub: Change 'stormy16' to 'xstormy16' in the two places
+ it appears.
+
+2001-10-05 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Add "SKA40" as a machine type for NCR SysV UNIX.
+ From Rudi Heitbaum <rheitbaum@tattersalls.com.au>.
+
+2001-10-05 Rodney Brown <rbrown64@csc.com.au>
+
+ * config.guess (9000/[34678]??:HP-UX:*:*): Unconditionally try
+ /usr/bin/getconf which is available on HP-UX 10.20. Reindent.
+
+2001-10-04 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle viac3 as an i586-class CPU.
+
+ * config.sub: Handle simso-wrs (Wind River's VxWorks Solaris
+ simulator target). From dpovey@dstc.qut.edu.au.
+
+2001-09-14 H.J. Lu <hjl@gnu.org>
+
+ * config.sub: Support avr-vendor-*.
+
+2001-09-13 Ben Elliston <bje@redhat.com>
+
+ * config.guess (*-*-openbsd): Reorganise and clean up.
+ Contributed by brad@openbsd.org.
+
+2001-09-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess (sparc*-*-netbsd): Properly match 32-bit NetBSD/sparc64
+ as sparc-unknown-netbsd. From Matthew Green <mrg@eterna.com.au>.
+
+2001-09-07 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Add mipseb-* alias (whoops).
+
+2001-09-04 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Add mipseb alias.
+
+2001-09-04 Eric Christopher <echristo@redhat.com>
+ Jason Eckhardt <jle@redhat.com>
+
+ * config.sub: Add support for mipsisa32.
+
+2001-09-04 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Move eval $set_cc_for_build in most cases, to
+ prevent this script fragment from cloberring a previously
+ constructed C program in $dummy.c.
+
+2001-08-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect AtheOS on x86 systems.
+ Based on info provided by Taco Witte <tcwitte@wish.net>.
+
+2001-08-23 Geoffrey Keating <geoffk@redhat.com>
+
+ * config.sub: Add stormy16-elf.
+
+2001-08-21 matthew green <mrg@eterna.com.au>
+
+ * config.guess (sparc*:NetBSD:*): Use $MACHINE_ARCH, not $MACHINE.
+
+2001-08-13 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle complete system name for elxsi.
+ From Zack Weinberg <zackw@panix.com>.
+
+2001-08-09 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Alpha ev68 on OSF/1 and Linux.
+ From Ken Whaley <ken@believe.com>.
+
+2001-08-04 Darrell Hamilton <Darrell_Hamilton@labcorp.com>
+
+ * config.guess: Unisys places the host id in ${UNAME_SYSTEM}
+ which is too unique to flag this system. Detect it with *
+ instead.
+
+2001-08-02 Alan Modra <amodra@bigpond.net.au>
+
+ * config.sub: Sort basic cpu patterns. Combine hppa patterns.
+
+2001-08-01 Alan Modra <amodra@bigpond.net.au>
+
+ * config.sub: Recognise powerpc64, powerpc64le, ppc64 variations.
+
+2001-07-31 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Stratus VOS operating system.
+ * config.sub: Handle aliases for such.
+
+2001-07-30 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect STOP operating system on x86 CPUs.
+ From Hans Edwards <Hans.Edwards@getronicsgov.com>.
+
+2001-07-27 Niibe Yutaka <gniibe@m17n.org>
+
+ * config.sub: Recognize sh3eb and sh4eb (big endian) aliases.
+
+2001-07-19 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Linux on the PPC64 architecture.
+
+2001-07-12 Keith Thompson <kst@sdsc.edu>
+
+ * config.guess: Strip trailing sub-version number from
+ $UNAME_RELEASE on Cray YMP or Cray [A-Z]90 models.
+
+2001-07-09 Mark Klein <mklein@dis.com>
+
+ * config.guess: Update MPE/iX to handle A and N class HPe3000.
+
+2001-07-02 Graham Stott <grahams@redhat.com>
+
+ * config.sub (basic_machine): Fix typo for mips64vr5000el.
+
+2001-06-29 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Remove stale libc1 tests on PowerPC Linux.
+
+2001-06-29 John Wolfe <jlw@sco.com>
+
+ * config.guess: Correct UnixWare 7 and Open UNIX 8.0 change;
+ test for i586 must be a string that ends with "Pentium".
+
+2001-06-28 Ben Elliston <bje@redhat.com>
+
+ * config.guess: On Alpha Linux, use /proc/cpuinfo to determine
+ the CPU model, rather than assembling a small test program.
+
+2001-06-27 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Do not unconditionally run the script fragment
+ to set $CC_FOR_BUILD. Put the script in the shell variable
+ $set_cc_for_build and only evaluate it before $CC_FOR_BUILD is
+ referenced. (Poor man's function inlining!)
+
+ In future, the goal will be to reduce the dependence on a C
+ compiler to detect system types by utilising other means.
+
+2001-06-26 Ben Elliston <bje@redhat.com>
+
+ * config.guess: On MIPS Linux, use /proc/cpuinfo to determine
+ the endian mode of the CPU, rather than compiling and running
+ a small C program.
+
+2001-06-12 John Wolfe <jlw@sco.com>
+
+ * config.guess: Standardize triplet for UnixWare 7 and Open
+ UNIX 8.0, improve processor detection and maintain "sysv5"
+ prefix on third segment.
+
+2001-06-08 Christopher Faylor <cgf@redhat.com>
+
+ * config.sub: Add support for Sun Chorus.
+
+2001-06-05 Tomislav Greguric <greguric@stud.uni-frankfurt.de>
+
+ * config.guess: Add 2001 to copyright notice issued for -v.
+
+2001-06-01 Ben Elliston <bje@redhat.com>
+
+ * config.guess (i*86:Linux:*:*): Examine the list of supported
+ targets, not the list of supported emulations when capturing
+ the output of "ld --help". This causes problems on systems
+ where GNU ld is built with support for all targets. Adjust
+ cases in the switch accordingly.
+
+ * config.guess: Other small Linux cleanups. Remove unnecessary
+ logic for setting $VENDOR, since UNAME_MACHINE will always be
+ i*86 in this case.
+
+2001-05-30 Mo DeJong <mdejong@redhat.com>
+
+ * config.sub: Handle windows32 and runtimes.
+
+2001-05-24 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Remove duplicate z8k entry.
+
+2001-05-11 Yaegashi Takeshi <t@keshi.org>
+
+ * config.sub: Handle sh[34]-* and sh[34]eb-*.
+
+2001-05-09 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle z8k-coff.
+ From Christian Groessler <cpg@aladdin.de>.
+
+2001-04-20 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle sparcv9b.
+ From Dave Miller <davem@redhat.com>.
+
+ * config.guess: Detect PowerMAX OS on PowerPC.
+
+2001-04-20 Tyson Dowd <trd@cs.mu.oz.au>
+ Fergus Henderson <fjh@cs.mu.oz.au>
+
+ * config.guess: Replace i?86 with i*86 to match newer Pentiums.
+ * config.sub: Likewise.
+
+2001-03-30 Peter Buckingham <pbuckingham@lnxw.com>
+
+ * config.guess: Update LynxOS version numbers.
+
+2001-03-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * config.sub: Make sure to match an already-canonicalized
+ machine name (eg. mn10300-unknown-elf).
+
+2001-03-19 Philip Blundell <philb@gnu.org>
+
+ * config.sub: Allow tic80 as machine type. Allow company name for
+ h8500 and pj targets; add `unknown' component when canonicalising
+ h8500-*, pj-* and pjl-*.
+
+2001-03-16 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Linux on SPARC64.
+
+2001-03-14 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect ELF-based m68k Linux systems. Reported by
+ Michael Fedrowitz <michael.fedrowitz@informatik.uni-ulm.de>.
+
+2001-03-09 H.J. Lu <hjl@gnu.org>
+
+ * config.sub: Recognize s390/s390x as valid $basic_machine.
+
+2001-03-05 Pavel Roskin <proski@gnu.org>
+
+ * config.guess: Never use `rm' without `-f' since it may be
+ interactive.
+
+2001-02-24 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Match Linux x86 systems explicitly. Allow unknown
+ architectures to fall through to the default case.
+
+2001-02-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess: More Linux cleanup. Match more in the top-level
+ case statement and less by groking the output of ld.
+
+2001-02-16 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise [cjt]90-*. From Kevin Ryde.
+
+2001-02-13 David Edelsohn <edelsohn@gnu.org>
+
+ * config.guess (ia64:AIX): New case.
+ (*:AIX): Expand AIX V4 case to include V5. Remove unnecessary `H'
+ option from lsattr. Check for string "POWER" with prepended space
+ to distinguish from PowerPC_POWER3. Use ${UNAME_VERSION} instead
+ of assuming "4" to match the expanded case.
+
+2001-02-13 Kevin Ryde <user42@zip.com.au>
+
+ * config.sub: Recognise t90, c90, j90 without -cray. Preserve t90
+ and j90--don't transform to c90.
+
+2001-02-13 Ben Elliston <bje@redhat.com>
+
+ * config.guess: More Linux cleanup.
+
+2001-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config.guess: Add Linux target for S/390x.
+ * config.sub: Likewise.
+
+2001-02-13 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Rework detection of many Linux platforms, where
+ detection is straightforward.
+
+2001-01-31 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle hppa64-linux systems. From Alan Modra
+ <alan@linuxcare.com.au>.
+
+2001-01-29 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config.guess: Specifically identify 4.3BSD and 4.3BSD-Reno in
+ the original VAX UNIX detection logic based on the BSD define in
+ <sys/param.h>.
+
+2001-01-17 Pavel Roskin <proski@gnu.org>
+
+ * config.sub: Removed cases that cannot match. Vendor changed
+ from "unknown" to "pc" for "mingw", "msdos" and "go32".
+
+2001-01-17 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect HI-UX on Hitachi SR8000 machines. It has
+ been difficult to discover what type of CPU is in this machine,
+ so we'll punt on hppa1.1 for now.
+
+2001-01-14 Pavel Roskin <proski@gnu.org>
+
+ * config.guess: Don't use $version in the error message. Use
+ $timestamp instead. Minor changes in the error text.
+
+2001-01-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Delete $dummy.rel after compiling test programs on
+ PDP-10 systems whose compilers produce this output file. From Lars
+ Brinkhoff <lars@nocrew.org>.
+
+ * config.sub: Handle EMX on OS/2. From Pavel Roskin.
+
+2001-01-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect common kernels running on various PDP-10
+ architectures. Contributed by Lars Brinkhoff <lars@nocrew.org>.
+ * config.sub: Handle PDP-10.
+
+2001-01-10 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect LynxOS 3.x on PowerPC architectures.
+
+2001-01-07 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise openrisc-*-*.
+
+2000-12-21 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect HP-UX on IA-64 hosts. From Jonathan
+ Thackray <jon@thackray.org>.
+
+2000-12-20 Pavel Roskin <proski@gnu.org>
+
+ * config.sub: Handle mint with version number as recognized OS.
+ Contributed by Tomas Berndtsson <tomas@nocrew.org>.
+
+2000-12-20 Pavel Roskin <proski@gnu.org>
+
+ * config.guess: Detect Fujitsu f700 machines.
+ * config.sub: Handle f700 and f700-fujitsu.
+
+2000-12-15 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect AIX version 5. Contributed by
+ Dan McNichol <mcnichol@austin.ibm.com>.
+
+ * config.sub: Accept f301 for Fujitsu machines.
+ Reported by Pavel Roskin <proski@gnu.org>.
+
+2000-12-07 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Add more detail to version information.
+ * config.guess: Likewise.
+
+2000-12-06 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Add --version option.
+ * config.guess: Likewise.
+
+2000-12-02 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Only append "elf" to "netbsd" for platforms that
+ have switched to the ELF object file format in recent history.
+ From Matthew Green <mrg@eterna.com.au>.
+
+2000-11-24 Nick Clifton <nickc@redhat.com>
+
+ * config.sub: Add xscale as a recognised CPU name.
+
+2000-11-23 Ben Elliston <bje@redhat.com>
+
+ Patches from Akim Demaille <akim@epita.fr>.
+ * config.sub (version): Rename from this ..
+ (timestamp): .. to this.
+ (usage): Replace --version with --time-stamp. Add additional help
+ and copyleft notice.
+ (time-stamp-start): Replace with "timestamp=".
+ * config.guess (version): Rename from this ..
+ (timestamp): .. to this.
+ (usage): Replace --version with --time-stamp. Add additional help
+ and copyleft notice.
+ (CC_FOR_BUILD): Rework this logic.
+ (time-stamp-start): Replace with "timestamp=".
+
+2000-11-21 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect EMX on OS/2. Reported by Ilya Zakharevich
+ <ilya@math.ohio-state.edu>.
+
+2000-11-16 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Use getconf(1) on HP-UX 11.x systems (when
+ available) to eliminate the need for compiling a small test
+ program. From Neil Schellenberger <nschelle@crosskeys.com>.
+
+2000-11-15 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Expand `power' to `power-ibm-aix' for consistency.
+ From Kevin Ryde.
+
+ * config.guess: Differentiate Cray T3D and T3E. From Kevin Ryde
+ <user42@zip.com.au>.
+
+2000-11-10 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Map pentiumpro and pentiumii aliases onto i686-pc.
+ From Kevin Ryde <user42@zip.com.au>.
+
+ * config.guess: Search for a working C compiler if CC_FOR_BUILD is
+ not specified. From Kevin Ryde.
+
+ * config.guess: Set CPU architecture to "hppa" by default, in case
+ tests fail to produce a result. From Kevin Ryde.
+
+2000-11-08 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect sparc-unknown-linux-gnu. Reported by Peter
+ Storkey <pstorkey@primex.com>.
+
+2000-11-02 Per Lundberg <plundis@chaosdev.org>
+
+ * config.sub: Add support for the *-storm-chaos OS.
+
+2000-10-25 Ed Satterthwaite <ehs@sibyte.com>
+
+ * config.sub: NexGen, not nexen, is the x86 CPU clone
+ manufacturer.
+
+2000-10-23 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect NonStop-UX on Compaq MIPS machines.
+ * config.sub: Handle aliases for mips-compaq-nonstopux.
+ From Tom Bates <tom.bates@compaq.com>.
+
+2000-10-12 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect GNU/Linux on HP PA-RISC systems.
+ From David Huggins-Daines <dhd@linuxcare.com>.
+
+2000-10-09 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Typo fix for sh{3,4} case.
+
+2000-10-08 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle 8-way NCR 4300s -- uname(1) returns 3446A.
+ From Ken Cormack <kcormack@acs.roadway.com>.
+
+2000-10-03 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Do not hold ld's output in a shell variable; feed
+ the output directly into the command pipline to avoid a limitation
+ in variable lengths in ash(1). From Pavel Roskin <proski@gnu.org>.
+
+2000-09-11 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle nsk*.
+
+2000-09-11 Philip Blundell <philb@gnu.org>
+
+ * config.sub: Fix mistake in change of 2000-08-06.
+
+2000-09-05 Andreas Jaeger <aj@suse.de>
+
+ * config.sub (maybe_os): Recognise AMD x86-64 as x86_64.
+ * config.guess: Detect x86_64-unknown-linux-gnu.
+
+2000-09-05 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle Tandem NSR-K machines.
+ Reported by Andres Junge <ajunge@adexus.cl>.
+
+2000-09-05 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+
+ * config.guess: Detect the PW32 POSIX-on-Win32 environment.
+ * config.sub: Handle pw32 aliases.
+
+2000-08-31 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Correctly detect Sony NEWS-OS 6.x.
+ From Kimio Ishii <ishii@sm.sony.co.jp>.
+
+2000-08-06 Philip Blundell <philb@gnu.org>
+
+ * config.sub: Accept `-conix*' as a valid OS. Accept `armv*' as a
+ valid CPU without a company name.
+
+2000-07-31 Mark Kettenis <kettenis@gnu.org>
+
+ * config.guess: Restore detection of libc version for x86
+ Linux/GNU ELF systems, but fall back on tentative name based on ld
+ emulation. Use i?86-pc-linux-gnu as tentative name since that's
+ the canonical name.
+
+2000-07-27 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Use "unknown" for the manufacturer field of Amiga
+ systems, not "cbm". Contributed by Ruediger Kuhlmann
+ <ruediger.kuhlmann@stud.uni-karlsruhe.de>.
+ * config.sub: Likewise.
+
+2000-07-24 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Plan 9.
+
+2000-07-06 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config.sub: Recognise d30v as a valid basic_machine.
+
+2000-06-28 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise Motorola 68HC11/12 targets. From Stephane
+ Carrez <Stephane.Carrez@worldnet.fr>.
+
+2000-06-20 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise tic54x (Texas Instruments TMS320C54x) and
+ c54x (IBM C54XDSP). From Tim Wall <twall@cygnus.com>.
+
+2000-06-13 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Minix on x86 machines.
+ * config.sub: Recognise i286. From <michael@moria.de>.
+
+ * config.sub: Recognise sh3 and sh4 aliases. From Kazumoto Kojima
+ <kkojima@rr.iij4u.or.jp>.
+
+ * config.sub: Per Bothner is not the author.
+
+2000-06-10 Hans-Peter Nilsson <hp@axis.com>
+
+ * config.sub (os): Recognize axis as manufacturer.
+ (basic_machine): Recognize cris and etrax* as cris-axis.
+
+2000-05-31 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Accept athlon as an i686 variant. From Philipp
+ Thomas <pthomas@suse.de>.
+
+2000-05-30 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Re-word some output.
+ * config.sub: Fix a syntax error introduced by yesterday's
+ changes. Correct a spelling mistake. From Steven G. Johnson
+ <stevenj@alum.mit.edu>.
+
+2000-05-02 Akim Demaille <akim@epita.fr>
+
+ * config.guess: Add --help and --version options. Add Emacs hooks.
+ * config.sub: Likewise.
+
+2000-05-27 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle GNU/Linux on Hitachi SuperH. From Niibe
+ Yutaka <gniibe@chroot.org>.
+
+2000-05-19 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise hppa64 as a valid cpu type. From Jeff Law.
+
+2000-05-10 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Recognise bs2000-siemens as a basic_machine type.
+ From Jean-Frederic Clere <jfrederic.clere@fujitsu.siemens.se>.
+
+2000-05-07 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Mac OS X will never return "Mac OS" as a uname
+ value, so remove these cases and punt to the "Darwin" case.
+ From Wilfredo Sanchez <wsanchez@apple.com>.
+
+2000-04-30 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle Fujitsu UXP/DS. From Fu-Chuan Tsai
+ <fchtsai@ms23.hinet.net>.
+
+2000-04-26 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle an ld emulation of elf_i?86. From Bruce
+ Korb <bkorb@sco.com>.
+
+2000-04-22 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Do not differentiate FreeBSD systems that use the
+ ELF object file format. From David O'Brien <obrien@freebsd.org>.
+
+2000-04-22 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Siemens BS2000 machines. From Jean-Frederic
+ Clere <jfrederic.clere@fujitsu.siemens.se>.
+
+2000-04-22 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Fix a syntax error in the DG/UX test.
+
+2000-04-06 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Define _HPUX_SOURCE for the HP-UX test program.
+ From Bruno Haible <haible@ilog.fr>.
+
+2000-04-06 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Apple's Darwin operating system.
+ * config.sub: Handle an appropriate alias. From Assar Westerlund.
+
+2000-03-27 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect Ascend Embedded/OS, which is really BSDI.
+ From Assar Westerlund <assar@sics.se>.
+
+2000-03-20 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Detect the NonStop Kernel on Tandem
+ machines. Suggested by Kelly F. Hickel <kfh@mqsoftware.com>.
+ * config.sub: Handle nsr-tandem and -nsk aliases.
+
+2000-02-29 Peter van der Veen <peterv@qnx.com>
+
+ * config.guess: Add support for QNX Neutrino.
+ * config.sub: Improve support for QNX Neutrino.
+
+2000-02-29 Ossama Othman <ossama@ece.uci.edu>
+
+ * config.sub: Add support for QNX Neutrino.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Support an OS of "wince".
+
+2000-02-15 Andrew Cagney <cagney@cygnus.com>
+
+ * config.guess: Rewrite NetBSD code. Return *-*-netbsdelf* for
+ ELF systems and *-*-netbsd* for all others. Provide a guideline
+ for how to match a NetBSD tuple.
+
+2000-02-15 Richard Henderson <rth@cygnus.com>
+
+ * config.guess (alpha-osf, alpha-linux): Detect ev67.
+ * config.sub: Accept alphaev6[78], alphaev8.
+
+2000-02-15 Philip Blundell <philb@gnu.org>
+
+ * config.guess: Distinguish arm-*-linux-gnuoldld from
+ arm*-linux-gnu.
+
+2000-02-15 Ben Elliston <bje@redhat.com>
+
+ * config.sub: Handle avr. From Denis Chertykov <denisc@overta.ru>.
+
+ * config.guess: Detect GNU/Linux on IBM S/390 machines.
+ * config.sub: Handle s390-*. From Adam J. Thornton
+ <adam@phoenix.princeton.edu>.
+
+ * config.guess: Detect MacOS X on PowerPC and other machines.
+ From Stephen G. Johnson <stephenj@gil-galad.mit.edu>.
+
+2000-02-08 John W. Eaton <jwe@bevo.che.wisc.edu>
+
+ * config.sub: Recognize sv1-cray as a basic_machine type.
+
+2000-02-07 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Replace sub-minor system version number with an
+ `X' on certain Cray platforms. From Keith Thompson <kst@sdsc.edu>.
+
+ * config.sub: Add support for mmix and mmixware. From Hans-Peter
+ Nilsson <hp@bitrange.com>.
+
+2000-02-06 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Include <stdio.h> when compiling test programs
+ with a C++ compiler. Function prototypes are mandatory in C++.
+ From Ossama Othman <othman@cs.wustl.edu>.
+
+ * config.guess: Fix a regression in PowerPC Linux detection.
+ From Franz Sirl.
+
+2000-02-03 Ben Elliston <bje@redhat.com>
+
+ * config.guess: Handle versions of DJGPP's uname(1) command which
+ return the exact machine type and not just `pc'. From Laurynas
+ Biveinis <lauras@softhome.net>.
+
+ * config.guess: Import from autoconf source tree.
+ * config.sub: Likewise.
diff --git a/misc/buildroot/package/gnuconfig/Makefile b/misc/buildroot/package/gnuconfig/Makefile
new file mode 100644
index 000000000..f99ebce83
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/Makefile
@@ -0,0 +1,15 @@
+UPLOAD=ftp://ftp-upload.gnu.org/incoming/ftp/
+
+all:
+ @echo "Type 'make upload' to upload to the GNU FTP server."
+
+upload:
+ gpg --detach-sign config.guess
+ gpg --detach-sign config.sub
+ echo "directory: config" | gpg --clearsign > config.guess.directive.asc
+ cp config.guess.directive.asc config.sub.directive.asc
+ ftp -a -u $(UPLOAD) config.{guess,sub}{,.sig,.directive.asc}
+ rm config.{guess,sub}{.sig,.directive.asc}
+
+check:
+ cd testsuite && (sh config-sub.sh; sh config-guess.sh) && rm uname
diff --git a/misc/buildroot/package/gnuconfig/README.buildroot b/misc/buildroot/package/gnuconfig/README.buildroot
new file mode 100644
index 000000000..521f120b9
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/README.buildroot
@@ -0,0 +1,16 @@
+--- ABOUT ---
+This isnt a real package, it just exists to easily update the
+config.sub / config.guess files in packages to the latest version
+(since many bundled ones don't support the latest possible targets)
+
+--- HOWTO ---
+To use, just add this to your unpack rule in the package.mk:
+$(CONFIG_UPDATE) $(PACKAGE_DIR)/
+
+--- UPDATE ---
+This is a CVS checkout of the config project, so just run `cvs up`
+to get the latest config.sub / config.guess files.
+
+A few local customizations are used to support uClibc so you may
+have to make sure they're still needed. The patches are broken
+out in the patches/ dir to keep things simple.
diff --git a/misc/buildroot/package/gnuconfig/config.guess b/misc/buildroot/package/gnuconfig/config.guess
new file mode 100755
index 000000000..d870848e0
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/config.guess
@@ -0,0 +1,1517 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-02-27'
+
+# This file 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+fi
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS_NT-*:*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[345]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
+ exit ;;
+ esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/misc/buildroot/package/gnuconfig/config.sub b/misc/buildroot/package/gnuconfig/config.sub
new file mode 100755
index 000000000..e66bd561f
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/config.sub
@@ -0,0 +1,1627 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-02-27'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file 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 2 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, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx | dvp \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ m32c-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -irx*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/misc/buildroot/package/gnuconfig/gnuconfig.mk b/misc/buildroot/package/gnuconfig/gnuconfig.mk
new file mode 100644
index 000000000..e6cd2dedb
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/gnuconfig.mk
@@ -0,0 +1,3 @@
+# See README.buildroot
+
+CONFIG_UPDATE = cp -f package/gnuconfig/config.sub package/gnuconfig/config.guess
diff --git a/misc/buildroot/package/gnuconfig/patches/config.sub.ps2.patch b/misc/buildroot/package/gnuconfig/patches/config.sub.ps2.patch
new file mode 100644
index 000000000..619a96e21
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/patches/config.sub.ps2.patch
@@ -0,0 +1,50 @@
+Index: config.sub
+===================================================================
+RCS file: /cvsroot/config/config/config.sub,v
+retrieving revision 1.340
+diff -u -p -r1.340 config.sub
+--- config.sub
++++ config.sub
+@@ -244,7 +244,7 @@ case $basic_machine in
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | bfin \
+ | c4x | clipper \
+- | d10v | d30v | dlx | dsp16xx \
++ | d10v | d30v | dlx | dsp16xx | dvp \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+@@ -693,6 +693,24 @@ case $basic_machine in
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
++ mipsEE* | ee | ps2)
++ basic_machine=mips64r5900el-scei
++ case $os in
++ -linux*)
++ ;;
++ *)
++ os=-elf
++ ;;
++ esac
++ ;;
++ iop)
++ basic_machine=mipsel-scei
++ os=-irx
++ ;;
++ dvp)
++ basic_machine=dvp-scei
++ os=-elf
++ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+@@ -1218,7 +1236,7 @@ case $os in
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku* | -rdos*)
++ | -skyos* | -haiku* | -rdos* | -irx*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
diff --git a/misc/buildroot/package/gnuconfig/patches/config.sub.sh.patch b/misc/buildroot/package/gnuconfig/patches/config.sub.sh.patch
new file mode 100644
index 000000000..edbc41910
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/patches/config.sub.sh.patch
@@ -0,0 +1,39 @@
+gnuconfig seems intent on only supporting superfluous targets that don't
+represent any real hardware (such as sh2a LE). GCC in its infinite wisdom is
+also incapable of supporting tuning for other variants in a sensible fashion.
+
+As such, we still need to be able to support such useful targets as
+sh2a_nofpueb in order to not only get the byte order right, but also to
+support -m2a-nofpu tuning from the kernel (though we tend to do this through
+-Wa,-isa= instead, as the binutils people do a much better job of not screwing
+up their config code every other day. Way to go config.gcc..).
+
+The fact that the sh variant matching is the ugliest out of any of the other
+architectures doesn't seem to deter GCC folk from their well thought out and
+brilliantly managed config target list.
+
+Index: config.sub
+===================================================================
+RCS file: /cvsroot/config/config/config.sub,v
+retrieving revision 1.340
+diff -u -p -r1.340 config.sub
+--- config.sub 26 Feb 2006 23:33:46 -0000 1.340
++++ config.sub 2 Mar 2006 06:22:01 -0000
+@@ -275,7 +275,7 @@ case $basic_machine in
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+@@ -359,7 +359,7 @@ case $basic_machine in
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
diff --git a/misc/buildroot/package/gnuconfig/testsuite/config-guess.data b/misc/buildroot/package/gnuconfig/testsuite/config-guess.data
new file mode 100644
index 000000000..156685d73
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/testsuite/config-guess.data
@@ -0,0 +1,23 @@
+crisv32 2.6.6 Linux ignored crisv32-axis-linux-gnu
+frv 2.4.24 Linux ignored frv-unknown-linux-gnu
+3 2.3.3 XENIX SysV i386-pc-xenix
+2064 ignored z/VM ignored s390-ibm-zvmoe
+amd64 1.5.12(0.116/4/2) CYGWIN_NT-5.2 ignored x86_64-unknown-cygwin
+crayx1 2.5.20 UNICOS/mp ignored craynv-cray-unicosmp2.5.X
+NSE-N 1.0 NONSTOP_KERNEL ignored nse-tandem-nsk1.0
+i386 ignored VOS ignored i386-stratus-vos
+arm ignored RISCOS ignored arm-unknown-riscos
+arm ignored riscos ignored arm-unknown-riscos
+i586 5.0.0 skyos ignored i586-pc-skyos5.0.0
+i786-pc ignored windows32 ignored i786-pc-mingw32
+or32 ignored Linux ignored or32-unknown-linux-gnu
+x86_64 1.5.18(0.132/4/2) CYGWIN_NT-5.2 ignored x86_64-unknown-cygwin
+x86 5.2 Interix ignored i586-pc-interix5.2
+ppc64 2.6.9-22 Linux ignored powerpc64-unknown-linux-gnu
+vax 2.6.15 Linux ignored vax-dec-linux-gnu
+i586 ignored rdos ignored i586-pc-rdos
+pc98 7.0 FreeBSD ignored i386-unknown-freebsd7.0
+i586 1.0 SolidBSD ignored i586-unknown-solidbsd1.0
+i686 5.4-1-686 GNU/kFreeBSD ignored i686-unknown-kfreebsd5.4-gnu
+i686 1.0.10(0.46/3/2) MSYS_NT-5.1 ignored i686-pc-mingw32
+EM64T 5.2 Interix ignored x86_64-unknown-interix5.2
diff --git a/misc/buildroot/package/gnuconfig/testsuite/config-guess.sh b/misc/buildroot/package/gnuconfig/testsuite/config-guess.sh
new file mode 100644
index 000000000..3f5103080
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/testsuite/config-guess.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Copyright 2004, 2005 Free Software Foundation, Inc.
+# Contributed by Ben Elliston <bje@gnu.org>.
+#
+# This test reads 5-tuples from config-guess.data: the components of
+# the simulated uname(1) output and the expected GNU system triplet.
+
+verbose=false
+export PATH=`pwd`:$PATH
+IFS=" " # tab
+
+function run_config_guess ()
+{
+ rc=0
+ while read machine release system version triplet ; do
+ sed \
+ -e "s,@MACHINE@,$machine," \
+ -e "s,@RELEASE@,$release," \
+ -e "s,@SYSTEM@,$system," \
+ -e "s,@VERSION@,$version," < uname.in > uname
+ chmod +x uname
+ output=`sh ../config.guess 2>/dev/null`
+ if test $? != 0 ; then
+ echo "FAIL: unable to guess $machine:$release:$system:$version"
+ rc=1
+ continue
+ fi
+ if test $output != $triplet ; then
+ echo "FAIL: $output (expected $triplet)"
+ rc=1
+ continue
+ fi
+ $verbose && echo "PASS: $triplet"
+ done
+ return $rc
+}
+
+sed 's/ */ /g' < config-guess.data | run_config_guess
+rc=$?
+if test $rc -eq 0 ; then
+ $verbose || echo "PASS: config.guess checks"
+else
+ test $rc -eq 1 && echo "Unexpected failures."
+fi
+
+exit $rc
diff --git a/misc/buildroot/package/gnuconfig/testsuite/config-sub.data b/misc/buildroot/package/gnuconfig/testsuite/config-sub.data
new file mode 100644
index 000000000..9b4cd1933
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/testsuite/config-sub.data
@@ -0,0 +1,92 @@
+arm-coff arm-unknown-coff
+arm-elf arm-unknown-elf
+sun3 m68k-sun-sunos4.1.1
+sun4 sparc-sun-sunos4.1.1
+ibm i370-ibm-aix
+i386-os2 i386-pc-os2
+os400 powerpc-ibm-os400
+mmix mmix-knuth-mmixware
+mmix-elf mmix-knuth-elf
+i386-linux i386-pc-linux-gnu
+i386-netbsd i386-pc-netbsd
+i386-openbsd i386-pc-openbsd
+i386-freebsd i386-pc-freebsd
+pc98-freebsd i386-pc-freebsd
+i386-elf i386-pc-elf
+i486-elf i486-pc-elf
+i586-elf i586-pc-elf
+i686-elf i686-pc-elf
+i786-elf i786-pc-elf
+amd64-unknown-freebsd5.2 x86_64-unknown-freebsd5.2
+cris-linux cris-axis-linux-gnu
+crisv32-linux crisv32-axis-linux-gnu
+frv-linux frv-unknown-linux-gnu
+djgpp i586-pc-msdosdjgpp
+s390-ibm-zvmoe s390-ibm-zvmoe
+xscale xscale-unknown-none
+xscaleeb xscaleeb-unknown-none
+xscaleel xscaleel-unknown-none
+xbox i686-pc-mingw32
+maxq maxq-unknown-none
+maxq-elf maxq-unknown-elf
+amd64-cygwin x86_64-pc-cygwin
+x86_64-cygwin x86_64-pc-cygwin
+sparc64-linux sparc64-unknown-linux-gnu
+sparc64b-linux sparc64b-unknown-linux-gnu
+bfin-elf bfin-unknown-elf
+bfin bfin-unknown-none
+arm-riscos arm-unknown-riscos
+arm-unknown-riscos arm-unknown-riscos
+i586-skyos i586-pc-skyos
+m32c m32c-unknown-none
+m32c-elf m32c-unknown-elf
+ms1 mt-unknown-none
+ms1-elf mt-unknown-elf
+mips64vr5900-elf mips64vr5900-unknown-elf
+mips64vr5900el-elf mips64vr5900el-unknown-elf
+mips64vr5900 mips64vr5900-unknown-elf
+mips64vr5900el mips64vr5900el-unknown-elf
+sh64 sh64-unknown-none
+sh64-elf sh64-unknown-elf
+openrisc-linux or32-unknown-linux-gnu
+or32-linux or32-unknown-linux-gnu
+sh-elf sh-unknown-elf
+sh1-elf sh1-unknown-elf
+sh2-elf sh2-unknown-elf
+sh3-elf sh3-unknown-elf
+sh4-elf sh4-unknown-elf
+sh2a-elf sh2a-unknown-elf
+sh4a-elf sh4a-unknown-elf
+sh2e-elf sh2e-unknown-elf
+sh3e-elf sh3e-unknown-elf
+sh3eb-elf sh3eb-unknown-elf
+sh4eb-elf sh4eb-unknown-elf
+shbe-elf shbe-unknown-elf
+shle-elf shle-unknown-elf
+sh1le-elf sh1le-unknown-elf
+sh2le-elf sh2le-unknown-elf
+sh3le-elf sh3le-unknown-elf
+sh4le-elf sh4le-unknown-elf
+sh3ele-elf sh3ele-unknown-elf
+i386-haiku i386-pc-haiku
+sparc-haiku sparc-unknown-haiku
+powerpc-haiku powerpc-unknown-haiku
+i386-pc-sco6 i386-pc-sco5v6
+i386-pc-sco5v6 i386-pc-sco5v6
+mt mt-unknown-none
+mt-elf mt-unknown-elf
+rdos i386-pc-rdos
+i586-rdos i586-pc-rdos
+i386-linux-newlib i386-pc-linux-newlib
+mb-elf mb-unknown-elf
+microblaze-elf microblaze-unknown-elf
+i386-solidbsd i386-pc-solidbsd
+amd64-kfreebsd5.4-gnu x86_64-pc-kfreebsd5.4-gnu
+nios nios-unknown-none
+nios2 nios2-unknown-none
+nios-elf nios-unknown-elf
+nios2-elf nios2-unknown-elf
+sparcv9v-elf sparcv9v-unknown-elf
+sparc64v-elf sparc64v-unknown-elf
+sparcv9v-solaris2.9 sparcv9v-unknown-solaris2.9
+sparc64v-solaris2.9 sparc64v-unknown-solaris2.9
diff --git a/misc/buildroot/package/gnuconfig/testsuite/config-sub.sh b/misc/buildroot/package/gnuconfig/testsuite/config-sub.sh
new file mode 100644
index 000000000..03b642010
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/testsuite/config-sub.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright 2004, 2005 Free Software Foundation, Inc.
+# Contributed by Ben Elliston <bje@gnu.org>.
+#
+# This test reads pairs from config-sub.data: an alias and its
+# canonical triplet. The config.sub scripts is invoked and the test
+# checks that the alias expands to the expected canonical triplet.
+
+verbose=false
+
+function run_config_sub ()
+{
+ rc=0
+ while read alias canonical ; do
+ output=`sh ../config.sub $alias`
+ if test $output != $canonical ; then
+ echo "FAIL: $alias -> $output, but expected $canonical"
+ rc=1
+ else
+ $verbose && echo "PASS: $alias"
+ fi
+ done < config-sub.data
+ return $rc
+}
+
+run_config_sub
+rc=$?
+if test $rc -eq 0 ; then
+ $verbose || echo "PASS: config.sub checks"
+else
+ test $rc -eq 1 && echo "Unexpected failures."
+fi
+
+exit $rc
diff --git a/misc/buildroot/package/gnuconfig/testsuite/uname.in b/misc/buildroot/package/gnuconfig/testsuite/uname.in
new file mode 100755
index 000000000..d44d15f04
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/testsuite/uname.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+# uname(1) simulator, inspired by Pavel Roskin.
+
+[ $# -ne 1 ] && exec sh $0 -s
+[ $1 = -m ] && echo "@MACHINE@" && exit 0
+[ $1 = -r ] && echo "@RELEASE@" && exit 0
+[ $1 = -s ] && echo "@SYSTEM@" && exit 0
+[ $1 = -v ] && echo "@VERSION@" && exit 0
+[ $1 = -p ] && echo "Pentium III(TM)-ISA/PCI"
diff --git a/misc/buildroot/package/gnuconfig/uname b/misc/buildroot/package/gnuconfig/uname
new file mode 100755
index 000000000..4d2b55d52
--- /dev/null
+++ b/misc/buildroot/package/gnuconfig/uname
@@ -0,0 +1,9 @@
+#!/bin/sh
+# uname(1) simulator, inspired by Pavel Roskin.
+
+[ $# -ne 1 ] && exec sh $0 -s
+[ $1 = -m ] && echo 4400
+[ $1 = -r ] && echo 4.0
+[ $1 = -s ] && echo iainfo2
+[ $1 = -v ] && echo 3.0
+[ $1 = -p ] && echo "Pentium III(TM)-ISA/PCI"
diff --git a/misc/buildroot/toolchain/Config.in b/misc/buildroot/toolchain/Config.in
new file mode 100644
index 000000000..1675c32d4
--- /dev/null
+++ b/misc/buildroot/toolchain/Config.in
@@ -0,0 +1,44 @@
+#
+
+menu "Toolchain Options"
+
+source "toolchain/binutils/Config.in"
+source "toolchain/gcc/Config.in"
+source "toolchain/gdb/Config.in"
+
+comment "Common Toolchain Options"
+
+source "toolchain/sstrip/Config.in"
+
+config BR2_ENABLE_MULTILIB
+ bool "Enable multilib support?"
+ default n
+ help
+ If you want multilib enabled, enable this...
+
+config BR2_LARGEFILE
+ bool "Enable large file (files > 2 GB) support?"
+ depends on !BR2_cris
+ default y
+ help
+ Enable large file (files > 2 GB) support
+
+config BR2_SOFT_FLOAT
+ bool "Use software floating point by default"
+ default n
+ depends on BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_powerpc
+ help
+ If your target CPU does not have a Floating Point Unit (FPU) or a
+ kernel FPU emulator, but you still wish to support floating point
+ functions, then everything will need to be compiled with soft
+ floating point support (-msoft-float).
+
+ Most people will answer N.
+
+config BR2_TARGET_OPTIMIZATION
+ string "Target Optimizations"
+ default "-Os -pipe"
+ help
+ Optimizations to use when building for the target host.
+
+endmenu
diff --git a/misc/buildroot/toolchain/Makefile.in b/misc/buildroot/toolchain/Makefile.in
new file mode 100644
index 000000000..84e2ae42f
--- /dev/null
+++ b/misc/buildroot/toolchain/Makefile.in
@@ -0,0 +1,21 @@
+ifeq ($(BR2_PTHREADS_NONE),y)
+THREADS:=--disable-threads
+else
+THREADS:=--enable-threads
+endif
+
+ifeq ($(BR2_ENABLE_MULTILIB),y)
+MULTILIB:=--enable-multilib
+else
+MULTILIB:=--disable-multilib
+endif
+
+
+# FIXME -- this is temporary
+OPTIMIZE_FOR_CPU=$(ARCH)
+
+# late binding check to see if the target cc supports -fwhole-program
+CFLAGS_WHOLE_PROGRAM = $(call cc-option,-fwhole-program,)
+
+# gcc has a bunch of needed stuff....
+include toolchain/gcc/Makefile.in
diff --git a/misc/buildroot/toolchain/binutils/2.14.90.0.8/001-debian.patch b/misc/buildroot/toolchain/binutils/2.14.90.0.8/001-debian.patch
new file mode 100644
index 000000000..780823542
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.14.90.0.8/001-debian.patch
@@ -0,0 +1,142 @@
+diff -urN binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c binutils-2.14.90.0.8/bfd/elf64-alpha.c
+--- binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c 2004-01-14 15:07:43.000000000 -0600
++++ binutils-2.14.90.0.8/bfd/elf64-alpha.c 2004-02-11 03:42:05.000000000 -0600
+@@ -4144,9 +4144,12 @@
+
+ loc = srel->contents;
+ loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
+- bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
+- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
+- <= srel->_cooked_size);
++ if (loc)
++ {
++ bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
++ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
++ <= srel->_cooked_size);
++ }
+ }
+
+ /* Relocate an Alpha ELF section for a relocatable link.
+diff -urN binutils-2.14.90.0.8-dist/bfd/opncls.c binutils-2.14.90.0.8/bfd/opncls.c
+--- binutils-2.14.90.0.8-dist/bfd/opncls.c 2004-01-14 15:07:43.000000000 -0600
++++ binutils-2.14.90.0.8/bfd/opncls.c 2004-02-11 03:42:01.000000000 -0600
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
+diff -urN binutils-2.14.90.0.8-dist/gprof/gprof.texi binutils-2.14.90.0.8/gprof/gprof.texi
+--- binutils-2.14.90.0.8-dist/gprof/gprof.texi 2004-01-14 15:07:51.000000000 -0600
++++ binutils-2.14.90.0.8/gprof/gprof.texi 2004-02-11 03:42:01.000000000 -0600
+@@ -138,6 +138,10 @@
+ If more than one profile file is specified, the @code{gprof}
+ output shows the sum of the profile information in the given profile files.
+
++If you use gcc 2.95.x or 3.0 to compile your binaries, you may need
++to add the @samp{-fprofile-arcs} to the compile command line in order
++for the call graphs to be properly stored in gmon.out.
++
+ @code{Gprof} calculates the amount of time spent in each routine.
+ Next, these times are propagated along the edges of the call graph.
+ Cycles are discovered, and calls into a cycle are made to share the time
+@@ -182,7 +186,7 @@
+ @c man end
+
+ @c man begin SEEALSO
+-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
++profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
+
+ ``An Execution Profiler for Modular Programs'',
+ by S. Graham, P. Kessler, M. McKusick;
+@@ -268,6 +272,11 @@
+ options. The same option, @samp{-pg}, alters either compilation or linking
+ to do what is necessary for profiling. Here are examples:
+
++If you use gcc 2.95.x or 3.0.x, you may need to add the
++@samp{-fprofile-arcs} option to the compile line along with @samp{-pg}
++in order to allow the call-graphs to be properly included in the gmon.out
++file.
++
+ @example
+ cc -g -c myprog.c utils.c -pg
+ cc -o myprog myprog.o utils.o -pg
+diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.am binutils-2.14.90.0.8/ld/Makefile.am
+--- binutils-2.14.90.0.8-dist/ld/Makefile.am 2004-01-14 15:07:52.000000000 -0600
++++ binutils-2.14.90.0.8/ld/Makefile.am 2004-02-11 03:42:01.000000000 -0600
+@@ -19,7 +19,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.in binutils-2.14.90.0.8/ld/Makefile.in
+--- binutils-2.14.90.0.8-dist/ld/Makefile.in 2004-01-14 15:07:52.000000000 -0600
++++ binutils-2.14.90.0.8/ld/Makefile.in 2004-02-11 03:42:01.000000000 -0600
+@@ -128,7 +128,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -urN binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em binutils-2.14.90.0.8/ld/emultempl/elf32.em
+--- binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em 2004-01-14 15:07:53.000000000 -0600
++++ binutils-2.14.90.0.8/ld/emultempl/elf32.em 2004-02-11 03:42:01.000000000 -0600
+@@ -671,6 +671,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
+ force))
+ break;
+@@ -850,6 +852,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf${ELFSIZE}_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
+diff -urN binutils-2.14.90.0.8-dist/ltmain.sh binutils-2.14.90.0.8/ltmain.sh
+--- binutils-2.14.90.0.8-dist/ltmain.sh 2002-03-22 16:06:16.000000000 -0600
++++ binutils-2.14.90.0.8/ltmain.sh 2004-02-11 03:42:05.000000000 -0600
+@@ -4413,6 +4413,10 @@
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
++ if test -n "$linkname"; then
++ $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)"
++ $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $?
++ fi
+ ;;
+ esac
+ exit 0
+diff -urN binutils-2.14.90.0.8-dist/opcodes/i386-dis.c binutils-2.14.90.0.8/opcodes/i386-dis.c
+--- binutils-2.14.90.0.8-dist/opcodes/i386-dis.c 2004-01-14 15:07:55.000000000 -0600
++++ binutils-2.14.90.0.8/opcodes/i386-dis.c 2004-02-11 03:42:01.000000000 -0600
+@@ -1879,7 +1879,7 @@
+ * The function returns the length of this instruction in bytes.
+ */
+
+-static char intel_syntax;
++static signed char intel_syntax;
+ static char open_char;
+ static char close_char;
+ static char separator_char;
diff --git a/misc/buildroot/toolchain/binutils/2.14.90.0.8/210-cflags.patch b/misc/buildroot/toolchain/binutils/2.14.90.0.8/210-cflags.patch
new file mode 100644
index 000000000..dc67d3c4e
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.14.90.0.8/210-cflags.patch
@@ -0,0 +1,32 @@
+diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
+--- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500
++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600
+@@ -55,10 +55,10 @@
+ MKDOC = chew$(EXEEXT_FOR_BUILD)
+
+ $(MKDOC): chew.o
+- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
+
+ chew.o: chew.c
+- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+
+ protos: libbfd.h libcoff.h bfd.h
+
+diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
+--- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500
++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600
+@@ -469,10 +469,10 @@
+
+
+ $(MKDOC): chew.o
+- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
+
+ chew.o: chew.c
+- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+
+ protos: libbfd.h libcoff.h bfd.h
+
diff --git a/misc/buildroot/toolchain/binutils/2.14.90.0.8/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.14.90.0.8/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..e07a7e8ce
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.14.90.0.8/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1611,7 +1611,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -1976,7 +1976,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch b/misc/buildroot/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch
new file mode 100644
index 000000000..73d5b9df8
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch
@@ -0,0 +1,63 @@
+http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
+--- binutils-2.15.90.0.3-old/bfd/elf32-arm.h 2004-04-12 14:56:33.000000000 -0500
++++ binutils-2.15.90.0.3/bfd/elf32-arm.h 2004-09-03 06:56:40.000000000 -0500
+@@ -87,6 +87,8 @@
+ #endif
+ static bfd_boolean allocate_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *h, PTR inf));
++static bfd_boolean elf32_arm_readonly_dynrelocs
++ PARAMS ((struct elf_link_hash_entry *, PTR));
+ static bfd_boolean create_got_section
+ PARAMS ((bfd * dynobj, struct bfd_link_info * info));
+ static bfd_boolean elf32_arm_create_dynamic_sections
+@@ -3531,6 +3533,37 @@
+ return TRUE;
+ }
+
++/* Find any dynamic relocs that apply to read-only sections. */
++
++static bfd_boolean
++elf32_arm_readonly_dynrelocs (h, inf)
++ struct elf_link_hash_entry *h;
++ PTR inf;
++{
++ struct elf32_arm_link_hash_entry *eh;
++ struct elf32_arm_relocs_copied *p;
++
++ if (h->root.type == bfd_link_hash_warning)
++ h = (struct elf_link_hash_entry *) h->root.u.i.link;
++
++ eh = (struct elf32_arm_link_hash_entry *) h;
++ for (p = eh->relocs_copied; p != NULL; p = p->next)
++ {
++ asection *s = p->section;
++
++ if (s != NULL && (s->flags & SEC_READONLY) != 0)
++ {
++ struct bfd_link_info *info = (struct bfd_link_info *) inf;
++
++ info->flags |= DF_TEXTREL;
++
++ /* Not an error, just cut short the traversal. */
++ return FALSE;
++ }
++ }
++ return TRUE;
++}
++
+ /* Set the sizes of the dynamic sections. */
+
+ static bfd_boolean
+@@ -3740,6 +3773,12 @@
+ return FALSE;
+ }
+
++ /* If any dynamic relocs apply to a read-only section,
++ then we need a DT_TEXTREL entry. */
++ if ((info->flags & DF_TEXTREL) == 0)
++ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
++ (PTR) info);
++
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/210-cflags.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/210-cflags.patch
new file mode 100644
index 000000000..dc67d3c4e
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/210-cflags.patch
@@ -0,0 +1,32 @@
+diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
+--- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500
++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600
+@@ -55,10 +55,10 @@
+ MKDOC = chew$(EXEEXT_FOR_BUILD)
+
+ $(MKDOC): chew.o
+- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
+
+ chew.o: chew.c
+- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+
+ protos: libbfd.h libcoff.h bfd.h
+
+diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
+--- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500
++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600
+@@ -469,10 +469,10 @@
+
+
+ $(MKDOC): chew.o
+- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
+
+ chew.o: chew.c
+- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+
+ protos: libbfd.h libcoff.h bfd.h
+
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..b25d5b7e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-001_ld_makefile_patch.patch
@@ -0,0 +1,52 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100
++++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100
+@@ -19,7 +19,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100
++++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100
+@@ -128,7 +128,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-120_mips_xgot_multigot_workaround.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-120_mips_xgot_multigot_workaround.patch
new file mode 100644
index 000000000..ae2033d06
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/300-120_mips_xgot_multigot_workaround.patch
@@ -0,0 +1,39 @@
+#! /bin/sh -e
+## 120_mips_xgot_multigot_workaround.dpatch
+##
+## DP: Description: Make multigot/xgot handling mutually exclusive.
+## DP: Author: Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+## DP: Upstream status: Not submitted
+## DP: Date: 2004-09-17
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c
+--- /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:41:37.156466673 +0100
++++ binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:42:15.998362861 +0100
+@@ -5883,6 +5883,8 @@
+ s->size += i * MIPS_ELF_GOT_SIZE (output_bfd);
+
+ if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd)
++ && g->global_gotno <= (MIPS_ELF_GOT_MAX_SIZE (output_bfd)
++ / MIPS_ELF_GOT_SIZE (output_bfd))
+ && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno))
+ return FALSE;
+
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..e07a7e8ce
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1611,7 +1611,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -1976,7 +1976,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/sh-flags-off-by-one.patch b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/sh-flags-off-by-one.patch
new file mode 100644
index 000000000..19a2f54ca
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15.94.0.2.2/sh-flags-off-by-one.patch
@@ -0,0 +1,21 @@
+2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
+
+Index: bfd/elf32-sh.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-sh.c,v
+retrieving revision 1.128
+retrieving revision 1.129
+diff -u -p -r1.128 -r1.129
+--- binutils/bfd/elf32-sh.c 25 Aug 2005 02:32:10 -0000 1.128
++++ binutils/bfd/elf32-sh.c 25 Aug 2005 05:10:22 -0000 1.129
+@@ -6655,7 +6655,7 @@ sh_elf_set_mach_from_flags (bfd *abfd)
+ int
+ sh_elf_get_flags_from_mach (unsigned long mach)
+ {
+- int i = ARRAY_SIZE (sh_ef_bfd_table);
++ int i = ARRAY_SIZE (sh_ef_bfd_table) - 1;
+
+ for (; i>0; i--)
+ if (sh_ef_bfd_table[i] == mach)
diff --git a/misc/buildroot/toolchain/binutils/2.15/210-cflags.patch b/misc/buildroot/toolchain/binutils/2.15/210-cflags.patch
new file mode 100644
index 000000000..dc67d3c4e
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15/210-cflags.patch
@@ -0,0 +1,32 @@
+diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
+--- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500
++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600
+@@ -55,10 +55,10 @@
+ MKDOC = chew$(EXEEXT_FOR_BUILD)
+
+ $(MKDOC): chew.o
+- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
+
+ chew.o: chew.c
+- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+
+ protos: libbfd.h libcoff.h bfd.h
+
+diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
+--- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500
++++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600
+@@ -469,10 +469,10 @@
+
+
+ $(MKDOC): chew.o
+- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
++ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
+
+ chew.o: chew.c
+- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
++ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
+
+ protos: libbfd.h libcoff.h bfd.h
+
diff --git a/misc/buildroot/toolchain/binutils/2.15/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.15/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..e07a7e8ce
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1611,7 +1611,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -1976,7 +1976,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.15/600-arm-textrel.patch b/misc/buildroot/toolchain/binutils/2.15/600-arm-textrel.patch
new file mode 100644
index 000000000..73d5b9df8
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15/600-arm-textrel.patch
@@ -0,0 +1,63 @@
+http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
+--- binutils-2.15.90.0.3-old/bfd/elf32-arm.h 2004-04-12 14:56:33.000000000 -0500
++++ binutils-2.15.90.0.3/bfd/elf32-arm.h 2004-09-03 06:56:40.000000000 -0500
+@@ -87,6 +87,8 @@
+ #endif
+ static bfd_boolean allocate_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *h, PTR inf));
++static bfd_boolean elf32_arm_readonly_dynrelocs
++ PARAMS ((struct elf_link_hash_entry *, PTR));
+ static bfd_boolean create_got_section
+ PARAMS ((bfd * dynobj, struct bfd_link_info * info));
+ static bfd_boolean elf32_arm_create_dynamic_sections
+@@ -3531,6 +3533,37 @@
+ return TRUE;
+ }
+
++/* Find any dynamic relocs that apply to read-only sections. */
++
++static bfd_boolean
++elf32_arm_readonly_dynrelocs (h, inf)
++ struct elf_link_hash_entry *h;
++ PTR inf;
++{
++ struct elf32_arm_link_hash_entry *eh;
++ struct elf32_arm_relocs_copied *p;
++
++ if (h->root.type == bfd_link_hash_warning)
++ h = (struct elf_link_hash_entry *) h->root.u.i.link;
++
++ eh = (struct elf32_arm_link_hash_entry *) h;
++ for (p = eh->relocs_copied; p != NULL; p = p->next)
++ {
++ asection *s = p->section;
++
++ if (s != NULL && (s->flags & SEC_READONLY) != 0)
++ {
++ struct bfd_link_info *info = (struct bfd_link_info *) inf;
++
++ info->flags |= DF_TEXTREL;
++
++ /* Not an error, just cut short the traversal. */
++ return FALSE;
++ }
++ }
++ return TRUE;
++}
++
+ /* Set the sizes of the dynamic sections. */
+
+ static bfd_boolean
+@@ -3740,6 +3773,12 @@
+ return FALSE;
+ }
+
++ /* If any dynamic relocs apply to a read-only section,
++ then we need a DT_TEXTREL entry. */
++ if ((info->flags & DF_TEXTREL) == 0)
++ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
++ (PTR) info);
++
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
diff --git a/misc/buildroot/toolchain/binutils/2.15/700-nios2-2.15.patch b/misc/buildroot/toolchain/binutils/2.15/700-nios2-2.15.patch
new file mode 100644
index 000000000..42655f306
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.15/700-nios2-2.15.patch
@@ -0,0 +1,38356 @@
+--- binutils-2.15/bfd/Makefile.am 2004-05-17 21:35:56.000000000 +0200
++++ binutils-2.15-nios2/bfd/Makefile.am 2005-05-17 12:20:13.000000000 +0200
+@@ -82,6 +82,7 @@ ALL_MACHINES = \
+ cpu-mips.lo \
+ cpu-mmix.lo \
+ cpu-msp430.lo \
++ cpu-nios2.lo \
+ cpu-or32.lo \
+ cpu-ns32k.lo \
+ cpu-openrisc.lo \
+@@ -139,6 +140,7 @@ ALL_MACHINES_CFILES = \
+ cpu-msp430.c \
+ cpu-or32.c \
+ cpu-ns32k.c \
++ cpu-nios2.c \
+ cpu-openrisc.c \
+ cpu-pdp11.c \
+ cpu-pj.c \
+@@ -241,6 +243,7 @@ BFD32_BACKENDS = \
+ elfxx-mips.lo \
+ elf32-mips.lo \
+ elf32-msp430.lo \
++ elf32-nios2.lo \
+ elf32-openrisc.lo \
+ elf32-or32.lo \
+ elf32-pj.lo \
+@@ -405,6 +408,7 @@ BFD32_BACKENDS_CFILES = \
+ elfxx-mips.c \
+ elf32-mips.c \
+ elf32-msp430.c \
++ elf32-nios2.c \
+ elf32-openrisc.c \
+ elf32-or32.c \
+ elf32-pj.c \
+@@ -943,6 +947,7 @@ cpu-mcore.lo: cpu-mcore.c $(INCDIR)/file
+ cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
+ cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
+ cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
++cpu-nios2.lo: cpu-nios2.c $(INCDIR)/filenames.h
+ cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
+ cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
+ cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
+@@ -1250,6 +1255,10 @@ elf32-msp430.lo: elf32-msp430.c $(INCDIR
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
++elf32-nios2.lo: elf32-nios2.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
++ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
++ $(INCDIR)/elf/external.h $(INCDIR)/elf/nios2.h \
++ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
+--- binutils-2.15/bfd/Makefile.in 2004-05-17 21:35:56.000000000 +0200
++++ binutils-2.15-nios2/bfd/Makefile.in 2005-05-17 12:20:13.000000000 +0200
+@@ -210,6 +210,7 @@ ALL_MACHINES = \
+ cpu-mips.lo \
+ cpu-mmix.lo \
+ cpu-msp430.lo \
++ cpu-nios2.lo \
+ cpu-or32.lo \
+ cpu-ns32k.lo \
+ cpu-openrisc.lo \
+@@ -267,6 +268,7 @@ ALL_MACHINES_CFILES = \
+ cpu-mmix.c \
+ cpu-msp430.c \
+ cpu-or32.c \
++ cpu-nios2.c \
+ cpu-ns32k.c \
+ cpu-openrisc.c \
+ cpu-pdp11.c \
+@@ -371,6 +373,7 @@ BFD32_BACKENDS = \
+ elfxx-mips.lo \
+ elf32-mips.lo \
+ elf32-msp430.lo \
++ elf32-nios2.lo \
+ elf32-openrisc.lo \
+ elf32-or32.lo \
+ elf32-pj.lo \
+@@ -536,6 +539,7 @@ BFD32_BACKENDS_CFILES = \
+ elfxx-mips.c \
+ elf32-mips.c \
+ elf32-msp430.c \
++ elf32-nios2.c \
+ elf32-openrisc.c \
+ elf32-or32.c \
+ elf32-pj.c \
+@@ -1482,6 +1486,7 @@ cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filena
+ cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h
+ cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h
+ cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
++cpu-nios2.lo: cpu-nios2.c $(INCDIR)/filenames.h
+ cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
+ cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
+ cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
+@@ -1787,6 +1792,10 @@ elf32-msp430.lo: elf32-msp430.c $(INCDIR
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
++elf32-nios2.lo: elf32-nios2.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
++ genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
++ $(INCDIR)/elf/external.h $(INCDIR)/elf/nios2.h \
++ $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
+--- binutils-2.15/bfd/archures.c 2003-12-03 18:38:48.000000000 +0100
++++ binutils-2.15-nios2/bfd/archures.c 2005-05-17 12:20:13.000000000 +0200
+@@ -330,6 +330,8 @@ DESCRIPTION
+ .#define bfd_mach_msp44 44
+ . bfd_arch_xtensa, {* Tensilica's Xtensa cores. *}
+ .#define bfd_mach_xtensa 1
++. bfd_arch_nios2,
++.#define bfd_mach_nios2 1
+ . bfd_arch_last
+ . };
+ */
+@@ -422,6 +424,7 @@ extern const bfd_arch_info_type bfd_w65_
+ extern const bfd_arch_info_type bfd_xstormy16_arch;
+ extern const bfd_arch_info_type bfd_xtensa_arch;
+ extern const bfd_arch_info_type bfd_z8k_arch;
++extern const bfd_arch_info_type bfd_nios2_arch;
+
+ static const bfd_arch_info_type * const bfd_archures_list[] =
+ {
+@@ -460,6 +463,7 @@ static const bfd_arch_info_type * const
+ &bfd_mn10200_arch,
+ &bfd_mn10300_arch,
+ &bfd_msp430_arch,
++ &bfd_nios2_arch,
+ &bfd_ns32k_arch,
+ &bfd_openrisc_arch,
+ &bfd_or32_arch,
+--- binutils-2.15/bfd/bfd-in2.h 2004-05-17 21:35:56.000000000 +0200
++++ binutils-2.15-nios2/bfd/bfd-in2.h 2005-05-17 12:20:13.000000000 +0200
+@@ -830,37 +830,48 @@ extern void bfd_elf64_ia64_after_parse
+ (int);
+
+ /* Extracted from init.c. */
+-void bfd_init (void);
++void
++bfd_init PARAMS ((void));
+
+ /* Extracted from opncls.c. */
+-bfd *bfd_openr (const char *filename, const char *target);
++bfd *
++bfd_openr PARAMS ((const char *filename, const char *target));
+
+-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
++bfd *
++bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
+
+-bfd *bfd_openstreamr (const char *, const char *, void *);
++bfd *
++bfd_openstreamr PARAMS ((const char *, const char *, void *));
+
+-bfd *bfd_openw (const char *filename, const char *target);
++bfd *
++bfd_openw PARAMS ((const char *filename, const char *target));
+
+-bfd_boolean bfd_close (bfd *abfd);
++bfd_boolean
++bfd_close PARAMS ((bfd *abfd));
+
+-bfd_boolean bfd_close_all_done (bfd *);
++bfd_boolean
++bfd_close_all_done PARAMS ((bfd *));
+
+-bfd *bfd_create (const char *filename, bfd *templ);
++bfd *
++bfd_create PARAMS ((const char *filename, bfd *templ));
+
+-bfd_boolean bfd_make_writable (bfd *abfd);
++bfd_boolean
++bfd_make_writable PARAMS ((bfd *abfd));
+
+-bfd_boolean bfd_make_readable (bfd *abfd);
++bfd_boolean
++bfd_make_readable PARAMS ((bfd *abfd));
+
+-unsigned long bfd_calc_gnu_debuglink_crc32
+- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
++unsigned long
++bfd_calc_gnu_debuglink_crc32 PARAMS ((unsigned long crc, const unsigned char *buf, bfd_size_type len));
+
+-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
++char *
++bfd_follow_gnu_debuglink PARAMS ((bfd *abfd, const char *dir));
+
+-struct bfd_section *bfd_create_gnu_debuglink_section
+- (bfd *abfd, const char *filename);
++struct bfd_section *
++bfd_create_gnu_debuglink_section PARAMS ((bfd *abfd, const char *filename));
+
+-bfd_boolean bfd_fill_in_gnu_debuglink_section
+- (bfd *abfd, struct bfd_section *sect, const char *filename);
++bfd_boolean
++bfd_fill_in_gnu_debuglink_section PARAMS ((bfd *abfd, struct bfd_section *sect, const char *filename));
+
+ /* Extracted from libbfd.c. */
+
+@@ -976,9 +987,11 @@ bfd_boolean bfd_fill_in_gnu_debuglink_se
+
+
+ /* Extracted from bfdio.c. */
+-long bfd_get_mtime (bfd *abfd);
++long
++bfd_get_mtime PARAMS ((bfd *abfd));
+
+-long bfd_get_size (bfd *abfd);
++long
++bfd_get_size PARAMS ((bfd *abfd));
+
+ /* Extracted from bfdwin.c. */
+ /* Extracted from section.c. */
+@@ -1421,48 +1434,54 @@ extern const struct bfd_symbol * const b
+ } \
+ while (0)
+
+-void bfd_section_list_clear (bfd *);
++void
++bfd_section_list_clear PARAMS ((bfd *));
+
+-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
++asection *
++bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
+
+-char *bfd_get_unique_section_name
+- (bfd *abfd, const char *templat, int *count);
++char *
++bfd_get_unique_section_name PARAMS ((bfd *abfd, const char *templat, int *count));
+
+-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
++asection *
++bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
+
+-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
++asection *
++bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
+
+-asection *bfd_make_section (bfd *, const char *name);
++asection *
++bfd_make_section PARAMS ((bfd *, const char *name));
+
+-bfd_boolean bfd_set_section_flags
+- (bfd *abfd, asection *sec, flagword flags);
++bfd_boolean
++bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
+
+-void bfd_map_over_sections
+- (bfd *abfd,
++void
++bfd_map_over_sections PARAMS ((bfd *abfd,
+ void (*func) (bfd *abfd, asection *sect, void *obj),
+- void *obj);
++ void *obj));
+
+-bfd_boolean bfd_set_section_size
+- (bfd *abfd, asection *sec, bfd_size_type val);
++bfd_boolean
++bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
+
+-bfd_boolean bfd_set_section_contents
+- (bfd *abfd, asection *section, const void *data,
+- file_ptr offset, bfd_size_type count);
++bfd_boolean
++bfd_set_section_contents PARAMS ((bfd *abfd, asection *section, const void *data,
++ file_ptr offset, bfd_size_type count));
+
+-bfd_boolean bfd_get_section_contents
+- (bfd *abfd, asection *section, void *location, file_ptr offset,
+- bfd_size_type count);
++bfd_boolean
++bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, void *location, file_ptr offset,
++ bfd_size_type count));
+
+-bfd_boolean bfd_copy_private_section_data
+- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
++bfd_boolean
++bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec));
+
+ #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
+ BFD_SEND (obfd, _bfd_copy_private_section_data, \
+ (ibfd, isection, obfd, osection))
+-void _bfd_strip_section_from_output
+- (struct bfd_link_info *info, asection *section);
++void
++_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
+
+-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
++bfd_boolean
++bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
+
+ /* Extracted from archures.c. */
+ enum bfd_architecture
+@@ -1728,6 +1747,8 @@ enum bfd_architecture
+ #define bfd_mach_msp44 44
+ bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
+ #define bfd_mach_xtensa 1
++ bfd_arch_nios2,
++#define bfd_mach_nios2 1
+ bfd_arch_last
+ };
+
+@@ -1754,37 +1775,47 @@ typedef struct bfd_arch_info
+ }
+ bfd_arch_info_type;
+
+-const char *bfd_printable_name (bfd *abfd);
++const char *
++bfd_printable_name PARAMS ((bfd *abfd));
+
+-const bfd_arch_info_type *bfd_scan_arch (const char *string);
++const bfd_arch_info_type *
++bfd_scan_arch PARAMS ((const char *string));
+
+-const char **bfd_arch_list (void);
++const char **
++bfd_arch_list PARAMS ((void));
+
+-const bfd_arch_info_type *bfd_arch_get_compatible
+- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
++const bfd_arch_info_type *
++bfd_arch_get_compatible PARAMS ((const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns));
+
+-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
++void
++bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
+
+-enum bfd_architecture bfd_get_arch (bfd *abfd);
++enum bfd_architecture
++bfd_get_arch PARAMS ((bfd *abfd));
+
+-unsigned long bfd_get_mach (bfd *abfd);
++unsigned long
++bfd_get_mach PARAMS ((bfd *abfd));
+
+-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
++unsigned int
++bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
+
+-unsigned int bfd_arch_bits_per_address (bfd *abfd);
++unsigned int
++bfd_arch_bits_per_address PARAMS ((bfd *abfd));
+
+-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
++const bfd_arch_info_type *
++bfd_get_arch_info PARAMS ((bfd *abfd));
+
+-const bfd_arch_info_type *bfd_lookup_arch
+- (enum bfd_architecture arch, unsigned long machine);
++const bfd_arch_info_type *
++bfd_lookup_arch PARAMS ((enum bfd_architecture arch, unsigned long machine));
+
+-const char *bfd_printable_arch_mach
+- (enum bfd_architecture arch, unsigned long machine);
++const char *
++bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
+
+-unsigned int bfd_octets_per_byte (bfd *abfd);
++unsigned int
++bfd_octets_per_byte PARAMS ((bfd *abfd));
+
+-unsigned int bfd_arch_mach_octets_per_byte
+- (enum bfd_architecture arch, unsigned long machine);
++unsigned int
++bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, unsigned long machine));
+
+ /* Extracted from reloc.c. */
+ typedef enum bfd_reloc_status
+@@ -1967,7 +1998,8 @@ struct reloc_howto_struct
+ } \
+ }
+
+-unsigned int bfd_get_reloc_size (reloc_howto_type *);
++unsigned int
++bfd_get_reloc_size PARAMS ((reloc_howto_type *));
+
+ typedef struct relent_chain
+ {
+@@ -1976,27 +2008,27 @@ typedef struct relent_chain
+ }
+ arelent_chain;
+
+-bfd_reloc_status_type bfd_check_overflow
+- (enum complain_overflow how,
++bfd_reloc_status_type
++bfd_check_overflow PARAMS ((enum complain_overflow how,
+ unsigned int bitsize,
+ unsigned int rightshift,
+ unsigned int addrsize,
+- bfd_vma relocation);
++ bfd_vma relocation));
+
+-bfd_reloc_status_type bfd_perform_relocation
+- (bfd *abfd,
++bfd_reloc_status_type
++bfd_perform_relocation PARAMS ((bfd *abfd,
+ arelent *reloc_entry,
+ void *data,
+ asection *input_section,
+ bfd *output_bfd,
+- char **error_message);
++ char **error_message));
+
+-bfd_reloc_status_type bfd_install_relocation
+- (bfd *abfd,
++bfd_reloc_status_type
++bfd_install_relocation PARAMS ((bfd *abfd,
+ arelent *reloc_entry,
+ void *data, bfd_vma data_start,
+ asection *input_section,
+- char **error_message);
++ char **error_message));
+
+ enum bfd_reloc_code_real {
+ _dummy_first_bfd_reloc_code_real,
+@@ -3439,6 +3471,23 @@ This is the 5 bits of a value. */
+ BFD_RELOC_MSP430_16_PCREL_BYTE,
+ BFD_RELOC_MSP430_16_BYTE,
+
++/* Relocations used by the Altera New Jersey core */
++ BFD_RELOC_NIOS2_S16,
++ BFD_RELOC_NIOS2_U16,
++ BFD_RELOC_NIOS2_CALL26,
++ BFD_RELOC_NIOS2_IMM5,
++ BFD_RELOC_NIOS2_CACHE_OPX,
++ BFD_RELOC_NIOS2_IMM6,
++ BFD_RELOC_NIOS2_IMM8,
++ BFD_RELOC_NIOS2_HI16,
++ BFD_RELOC_NIOS2_LO16,
++ BFD_RELOC_NIOS2_HIADJ16,
++ BFD_RELOC_NIOS2_GPREL,
++ BFD_RELOC_NIOS2_UJMP,
++ BFD_RELOC_NIOS2_CJMP,
++ BFD_RELOC_NIOS2_CALLR,
++ BFD_RELOC_NIOS2_ALIGN,
++
+ /* IQ2000 Relocations. */
+ BFD_RELOC_IQ2000_OFFSET_16,
+ BFD_RELOC_IQ2000_OFFSET_21,
+@@ -3477,10 +3526,11 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
+ BFD_RELOC_XTENSA_ASM_SIMPLIFY,
+ BFD_RELOC_UNUSED };
+ typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
+-reloc_howto_type *bfd_reloc_type_lookup
+- (bfd *abfd, bfd_reloc_code_real_type code);
++reloc_howto_type *
++bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+
+-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
++const char *
++bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
+
+ /* Extracted from syms.c. */
+
+@@ -3611,9 +3661,11 @@ asymbol;
+ #define bfd_get_symtab_upper_bound(abfd) \
+ BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
+
+-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
++bfd_boolean
++bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
+
+-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
++bfd_boolean
++bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
+
+ #define bfd_is_local_label_name(abfd, name) \
+ BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+@@ -3621,27 +3673,32 @@ bfd_boolean bfd_is_local_label_name (bfd
+ #define bfd_canonicalize_symtab(abfd, location) \
+ BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
+
+-bfd_boolean bfd_set_symtab
+- (bfd *abfd, asymbol **location, unsigned int count);
++bfd_boolean
++bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
+
+-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
++void
++bfd_print_symbol_vandf PARAMS ((bfd *abfd, void *file, asymbol *symbol));
+
+ #define bfd_make_empty_symbol(abfd) \
+ BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+
+-asymbol *_bfd_generic_make_empty_symbol (bfd *);
++asymbol *
++_bfd_generic_make_empty_symbol PARAMS ((bfd *));
+
+ #define bfd_make_debug_symbol(abfd,ptr,size) \
+ BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+
+-int bfd_decode_symclass (asymbol *symbol);
++int
++bfd_decode_symclass PARAMS ((asymbol *symbol));
+
+-bfd_boolean bfd_is_undefined_symclass (int symclass);
++bfd_boolean
++bfd_is_undefined_symclass PARAMS ((int symclass));
+
+-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
++void
++bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
+
+-bfd_boolean bfd_copy_private_symbol_data
+- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
++bfd_boolean
++bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
+
+ #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
+ BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
+@@ -3840,57 +3897,76 @@ typedef enum bfd_error
+ }
+ bfd_error_type;
+
+-bfd_error_type bfd_get_error (void);
++bfd_error_type
++bfd_get_error PARAMS ((void));
+
+-void bfd_set_error (bfd_error_type error_tag);
++void
++bfd_set_error PARAMS ((bfd_error_type error_tag));
+
+-const char *bfd_errmsg (bfd_error_type error_tag);
++const char *
++bfd_errmsg PARAMS ((bfd_error_type error_tag));
+
+-void bfd_perror (const char *message);
++void
++bfd_perror PARAMS ((const char *message));
+
+ typedef void (*bfd_error_handler_type) (const char *, ...);
+
+-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
++bfd_error_handler_type
++bfd_set_error_handler PARAMS ((bfd_error_handler_type));
+
+-void bfd_set_error_program_name (const char *);
++void
++bfd_set_error_program_name PARAMS ((const char *));
+
+-bfd_error_handler_type bfd_get_error_handler (void);
++bfd_error_handler_type
++bfd_get_error_handler PARAMS ((void));
+
+-const char *bfd_archive_filename (bfd *);
++const char *
++bfd_archive_filename PARAMS ((bfd *));
+
+-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
++long
++bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
+
+-long bfd_canonicalize_reloc
+- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
++long
++bfd_canonicalize_reloc PARAMS ((bfd *abfd, asection *sec, arelent **loc, asymbol **syms));
+
+-void bfd_set_reloc
+- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
++void
++bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count));
+
+-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
++bfd_boolean
++bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
+
+-int bfd_get_arch_size (bfd *abfd);
++int
++bfd_get_arch_size PARAMS ((bfd *abfd));
+
+-int bfd_get_sign_extend_vma (bfd *abfd);
++int
++bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
+
+-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
++bfd_boolean
++bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
+
+-unsigned int bfd_get_gp_size (bfd *abfd);
++unsigned int
++bfd_get_gp_size PARAMS ((bfd *abfd));
+
+-void bfd_set_gp_size (bfd *abfd, unsigned int i);
++void
++bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
+
+-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
++bfd_vma
++bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
+
+-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
++bfd_boolean
++bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
+
+ #define bfd_copy_private_bfd_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
+ (ibfd, obfd))
+-bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
++bfd_boolean
++bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
+
+ #define bfd_merge_private_bfd_data(ibfd, obfd) \
+ BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
+ (ibfd, obfd))
+-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
++bfd_boolean
++bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
+
+ #define bfd_set_private_flags(abfd, flags) \
+ BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
+@@ -3968,7 +4044,8 @@ extern bfd_byte *bfd_get_relocated_secti
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
+ bfd_boolean, asymbol **);
+
+-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
++bfd_boolean
++bfd_alt_mach_code PARAMS ((bfd *abfd, int alternative));
+
+ struct bfd_preserve
+ {
+@@ -3982,27 +4059,34 @@ struct bfd_preserve
+ struct bfd_hash_table section_htab;
+ };
+
+-bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
++bfd_boolean
++bfd_preserve_save PARAMS ((bfd *, struct bfd_preserve *));
+
+-void bfd_preserve_restore (bfd *, struct bfd_preserve *);
++void
++bfd_preserve_restore PARAMS ((bfd *, struct bfd_preserve *));
+
+-void bfd_preserve_finish (bfd *, struct bfd_preserve *);
++void
++bfd_preserve_finish PARAMS ((bfd *, struct bfd_preserve *));
+
+ /* Extracted from archive.c. */
+-symindex bfd_get_next_mapent
+- (bfd *abfd, symindex previous, carsym **sym);
++symindex
++bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
+
+-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
++bfd_boolean
++bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
+
+-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
++bfd *
++bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
+
+ /* Extracted from corefile.c. */
+-const char *bfd_core_file_failing_command (bfd *abfd);
++const char *
++bfd_core_file_failing_command PARAMS ((bfd *abfd));
+
+-int bfd_core_file_failing_signal (bfd *abfd);
++int
++bfd_core_file_failing_signal PARAMS ((bfd *abfd));
+
+-bfd_boolean core_file_matches_executable_p
+- (bfd *core_bfd, bfd *exec_bfd);
++bfd_boolean
++core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+
+ /* Extracted from targets.c. */
+ #define BFD_SEND(bfd, message, arglist) \
+@@ -4362,35 +4446,42 @@ typedef struct bfd_target
+
+ } bfd_target;
+
+-bfd_boolean bfd_set_default_target (const char *name);
++bfd_boolean
++bfd_set_default_target PARAMS ((const char *name));
+
+-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
++const bfd_target *
++bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
+
+-const char ** bfd_target_list (void);
++const char **
++bfd_target_list PARAMS ((void));
+
+-const bfd_target *bfd_search_for_target
+- (int (*search_func) (const bfd_target *, void *),
+- void *);
++const bfd_target *
++bfd_search_for_target PARAMS ((int (*search_func) (const bfd_target *, void *),
++ void *));
+
+ /* Extracted from format.c. */
+-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
++bfd_boolean
++bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
+
+-bfd_boolean bfd_check_format_matches
+- (bfd *abfd, bfd_format format, char ***matching);
++bfd_boolean
++bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching));
+
+-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
++bfd_boolean
++bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
+
+-const char *bfd_format_string (bfd_format format);
++const char *
++bfd_format_string PARAMS ((bfd_format format));
+
+ /* Extracted from linker.c. */
+-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
++bfd_boolean
++bfd_link_split_section PARAMS ((bfd *abfd, asection *sec));
+
+ #define bfd_link_split_section(abfd, sec) \
+ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
+
+ /* Extracted from simple.c. */
+-bfd_byte *bfd_simple_get_relocated_section_contents
+- (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table);
++bfd_byte *
++bfd_simple_get_relocated_section_contents PARAMS ((bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table));
+
+ #ifdef __cplusplus
+ }
+--- binutils-2.15/bfd/config.bfd 2004-05-17 21:35:56.000000000 +0200
++++ binutils-2.15-nios2/bfd/config.bfd 2005-05-17 12:20:13.000000000 +0200
+@@ -59,6 +59,7 @@ m6812*|m68hc12*) targ_archs="bfd_m68hc12
+ m68*) targ_archs=bfd_m68k_arch ;;
+ m88*) targ_archs=bfd_m88k_arch ;;
+ mips*) targ_archs=bfd_mips_arch ;;
++nios2*) targ_archs=bfd_nios2_arch ;;
+ or32*) targ_archs=bfd_or32_arch ;;
+ pdp11*) targ_archs=bfd_pdp11_arch ;;
+ pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
+@@ -874,6 +875,10 @@ case "${targ}" in
+ targ_underscore=yes
+ ;;
+
++ nios2-*-*)
++ targ_defvec=bfd_elf32_littlenios2_vec
++ ;;
++
+ openrisc-*-elf)
+ targ_defvec=bfd_elf32_openrisc_vec
+ ;;
+--- binutils-2.15/bfd/configure 2004-05-17 21:35:57.000000000 +0200
++++ binutils-2.15-nios2/bfd/configure 2005-05-17 12:20:13.000000000 +0200
+@@ -6322,6 +6322,7 @@ do
+ bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
++ bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
+ bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
+ bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+--- binutils-2.15/bfd/configure.in 2004-05-17 21:35:57.000000000 +0200
++++ binutils-2.15-nios2/bfd/configure.in 2005-05-17 12:20:13.000000000 +0200
+@@ -631,6 +631,7 @@ do
+ bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
+ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
++ bfd_elf32_littlenios2_vec) tb="$tb elf32-nios2.lo elf32.lo $elf" ;;
+ bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
+ bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+--- binutils-2.15/bfd/cpu-nios2.c 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/bfd/cpu-nios2.c 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,70 @@
++/* bfd back-end for Altera Nios II support
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++This file is part of BFD, the Binary File Descriptor library.
++
++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 2 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, write to the Free Software
++Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#include "bfd.h"
++#include "sysdep.h"
++#include "libbfd.h"
++
++static const bfd_arch_info_type *nios2_compatible
++ (const bfd_arch_info_type *, const bfd_arch_info_type *);
++
++/* The default routine tests bits_per_word, which is wrong on mips as
++ mips word size doesn't correlate with reloc size. */
++
++static const bfd_arch_info_type *
++nios2_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
++{
++ if (a->arch != b->arch)
++ return NULL;
++
++ /* Machine compatibility is checked in
++ _bfd_mips_elf_merge_private_bfd_data. */
++
++ return a;
++}
++
++#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
++ { \
++ BITS_WORD, /* bits in a word */ \
++ BITS_ADDR, /* bits in an address */ \
++ 8, /* 8 bits in a byte */ \
++ bfd_arch_nios2, \
++ NUMBER, \
++ "nios2", \
++ PRINT, \
++ 3, \
++ DEFAULT, \
++ nios2_compatible, \
++ bfd_default_scan, \
++ NEXT, \
++ }
++
++#define NN(index) (&arch_info_struct[(index) + 1])
++
++static const bfd_arch_info_type arch_info_struct[] =
++{
++ N (32, 32, bfd_mach_nios2, "nios2", FALSE, 0),
++};
++
++/* There is only one architecture - but we give the default a machine number of 0
++ so the linker can distinguish it */
++const bfd_arch_info_type bfd_nios2_arch =
++N (32, 32, 0, "nios2", TRUE, &arch_info_struct[0]);
+--- binutils-2.15/bfd/elf.c 2004-05-17 21:35:57.000000000 +0200
++++ binutils-2.15-nios2/bfd/elf.c 2005-05-17 12:20:13.000000000 +0200
+@@ -3286,9 +3286,14 @@ map_sections_to_segments (bfd *abfd)
+ phdr_size = elf_tdata (abfd)->program_header_size;
+ if (phdr_size == 0)
+ phdr_size = get_elf_backend_data (abfd)->s->sizeof_phdr;
++
++ /* NG - for standalone embedded applications we don't want the program
++ headers or ELF header in the output memory map (cf CSP) */
+ if ((abfd->flags & D_PAGED) == 0
+ || sections[0]->lma < phdr_size
+- || sections[0]->lma % maxpagesize < phdr_size % maxpagesize)
++ || sections[0]->lma % maxpagesize < phdr_size % maxpagesize
++ || (elf_tdata (abfd)->elf_header[0].e_ident[EI_OSABI]
++ == ELFOSABI_STANDALONE))
+ phdr_in_segment = FALSE;
+ }
+
+--- binutils-2.15/bfd/elf32-nios2.c 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/bfd/elf32-nios2.c 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,2188 @@
++/* New Jersey-specific support for 32-bit ELF
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++
++This file is part of BFD, the Binary File Descriptor library.
++
++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 2 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, write to the Free Software
++Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++/* This file handles Altera New Jersey ELF targets */
++
++#include "bfd.h"
++#include "sysdep.h"
++#include "libbfd.h"
++#include "bfdlink.h"
++#include "genlink.h"
++#include "elf-bfd.h"
++#include "elf/nios2.h"
++#include "opcode/nios2.h"
++
++/* use RELA relocations*/
++#ifndef USE_RELA
++#define USE_RELA
++#endif
++
++#ifdef USE_REL
++#undef USE_REL
++#endif
++
++/* Function prototypes */
++
++static reloc_howto_type *nios2_elf32_bfd_reloc_type_lookup
++ (bfd *, bfd_reloc_code_real_type);
++
++static bfd_boolean nios2_elf32_relax_section
++ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
++
++static bfd_boolean nios2_elf32_relax_delete_bytes
++ (bfd *, asection *, bfd_vma, int);
++
++static reloc_howto_type *nios2_elf32_rtype_to_howto
++ (unsigned int r_type, bfd_boolean rela_p);
++
++static void nios2_elf32_info_to_howto
++ (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst);
++
++static bfd_boolean nios2_elf32_relocate_section
++ (bfd * output_bfd, struct bfd_link_info * info, bfd * input_bfd,
++ asection * input_section, bfd_byte * contents,
++ Elf_Internal_Rela * relocs, Elf_Internal_Sym * local_syms,
++ asection ** local_sections);
++
++static reloc_howto_type *lookup_howto (unsigned int rtype);
++
++static bfd_reloc_status_type nios2_elf_final_gp
++ (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *,
++ struct bfd_link_info *);
++
++static bfd_boolean nios2_elf_assign_gp
++ (bfd *, bfd_vma *, struct bfd_link_info *);
++
++static bfd_reloc_status_type nios2_elf32_ignore_reloc
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_hi16_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_lo16_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_hiadj16_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_pcrel16_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_call26_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_gprel_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_ujmp_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_cjmp_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_callr_relocate
++ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
++
++static bfd_reloc_status_type nios2_elf32_do_hi16_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_lo16_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_hiadj16_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_pcrel16_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_call26_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_gprel_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_ujmp_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_cjmp_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++static bfd_reloc_status_type nios2_elf32_do_callr_relocate
++ (bfd *, reloc_howto_type *, asection *,
++ bfd_byte *, bfd_vma, bfd_vma, bfd_vma);
++
++
++static void nios2_elf32_post_process_headers
++ (bfd *, struct bfd_link_info *);
++
++static bfd_boolean nios2_elf32_section_from_shdr
++ (bfd *, Elf_Internal_Shdr *, const char *name);
++
++static bfd_boolean nios2_elf32_section_flags
++ (flagword *, Elf_Internal_Shdr *);
++
++static bfd_boolean nios2_elf32_fake_sections
++ (bfd *, Elf_Internal_Shdr *, asection *);
++
++
++
++static bfd_boolean nios2_elf32_check_relocs
++ (bfd *, struct bfd_link_info *, asection *,
++ const Elf_Internal_Rela *);
++
++static asection *nios2_elf32_gc_mark_hook (asection * sec,
++ struct bfd_link_info *
++ info,
++ Elf_Internal_Rela * rel,
++ struct elf_link_hash_entry
++ * h,
++ Elf_Internal_Sym * sym);
++
++
++/* target vector */
++extern const bfd_target bfd_elf32_littlenios2_vec;
++
++/* The relocation table used for SHT_REL sections. */
++
++static reloc_howto_type elf_nios2_howto_table_rel[] = {
++ /* No relocation. */
++ HOWTO (R_NIOS2_NONE, /* type */
++ 0, /* rightshift */
++ 0, /* size (0 = byte, 1 = short, 2 = long) */
++ 0, /* bitsize */
++ FALSE, /* pc_relative */
++ 0, /* bitpos */
++ complain_overflow_dont, /* complain_on_overflow */
++ bfd_elf_generic_reloc, /* special_function */
++ "R_NIOS2_NONE", /* name */
++ FALSE, /* partial_inplace */
++ 0, /* src_mask */
++ 0, /* dst_mask */
++ FALSE), /* pcrel_offset */
++
++ /* 16-bit signed immediate relocation */
++ HOWTO (R_NIOS2_S16, /* type */
++ 0, /* rightshift */
++ 2, /* size (0 = byte, 1 = short, 2 = long) */
++ 16, /* bitsize */
++ FALSE, /* pc_relative */
++ 6, /* bitpos */
++ complain_overflow_signed, /* complain on overflow */
++ bfd_elf_generic_reloc, /* special function */
++ "R_NIOS2_S16", /* name */
++ FALSE, /* partial_inplace */
++ 0x003fffc0, /* src_mask */
++ 0x003fffc0, /* dest_mask */
++ FALSE), /* pcrel_offset */
++
++ /* 16-bit unsigned immediate relocation */
++ HOWTO (R_NIOS2_U16, /* type */
++ 0, /* rightshift */
++ 2, /* size (0 = byte, 1 = short, 2 = long) */
++ 16, /* bitsize */
++ FALSE, /* pc_relative */
++ 6, /* bitpos */
++ complain_overflow_unsigned, /* complain on overflow */
++ bfd_elf_generic_reloc, /* special function */
++ "R_NIOS2_U16", /* name */
++ FALSE, /* partial_inplace */
++ 0x003fffc0, /* src_mask */
++ 0x003fffc0, /* dest_mask */
++ FALSE), /* pcrel_offset */
++
++ HOWTO (R_NIOS2_PCREL16, /* type */
++ 0, /* rightshift */
++ 2, /* size (0 = byte, 1 = short, 2 = long) */
++ 16, /* bitsize */
++ TRUE, /* pc_relative */
++ 6, /* bitpos */
++ complain_overflow_signed, /* complain on overflow */
++ nios2_elf32_pcrel16_relocate, /* special function */
++ "R_NIOS2_PCREL16", /* name */
++ FALSE, /* partial_inplace */
++ 0x003fffc0, /* src_mask */
++ 0x003fffc0, /* dest_mask */
++ TRUE), /* pcrel_offset */
++
++ HOWTO (R_NIOS2_CALL26, /* type */
++ 2, /* rightshift */
++ 2, /* size (0 = byte, 1 = short, 2 = long) */
++ 26, /* bitsize */
++ FALSE, /* pc_relative */
++ 6, /* bitpos */
++ complain_overflow_dont, /* complain on overflow */
++ nios2_elf32_call26_relocate, /* special function */
++ "R_NIOS2_CALL26", /* name */
++ FALSE, /* partial_inplace */
++ 0xffffffc0, /* src_mask */
++ 0xffffffc0, /* dst_mask */
++ FALSE), /* pcrel_offset */
++
++ HOWTO (R_NIOS2_IMM5,
++ 0,
++ 2,
++ 5,
++ FALSE,
++ 6,
++ complain_overflow_bitfield,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_IMM5",
++ FALSE,
++ 0x000007c0,
++ 0x000007c0,
++ FALSE),
++
++ HOWTO (R_NIOS2_CACHE_OPX,
++ 0,
++ 2,
++ 5,
++ FALSE,
++ 22,
++ complain_overflow_bitfield,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_CACHE_OPX",
++ FALSE,
++ 0x07c00000,
++ 0x07c00000,
++ FALSE),
++
++ HOWTO (R_NIOS2_IMM6,
++ 0,
++ 2,
++ 6,
++ FALSE,
++ 6,
++ complain_overflow_bitfield,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_IMM6",
++ FALSE,
++ 0x00000fc0,
++ 0x00000fc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_IMM8,
++ 0,
++ 2,
++ 8,
++ FALSE,
++ 6,
++ complain_overflow_bitfield,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_IMM8",
++ FALSE,
++ 0x00003fc0,
++ 0x00003fc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_HI16,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_hi16_relocate,
++ "R_NIOS2_HI16",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_LO16,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_lo16_relocate,
++ "R_NIOS2_LO16",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_HIADJ16,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_hiadj16_relocate,
++ "R_NIOS2_HIADJ16",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_BFD_RELOC_32,
++ 0,
++ 2, /* long */
++ 32,
++ FALSE,
++ 0,
++ complain_overflow_dont,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_BFD_RELOC32",
++ FALSE,
++ 0xffffffff,
++ 0xffffffff,
++ FALSE),
++
++ HOWTO (R_NIOS2_BFD_RELOC_16,
++ 0,
++ 1, /* short */
++ 16,
++ FALSE,
++ 0,
++ complain_overflow_bitfield,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_BFD_RELOC16",
++ FALSE,
++ 0x0000ffff,
++ 0x0000ffff,
++ FALSE),
++
++ HOWTO (R_NIOS2_BFD_RELOC_8,
++ 0,
++ 0, /* byte */
++ 8,
++ FALSE,
++ 0,
++ complain_overflow_bitfield,
++ bfd_elf_generic_reloc,
++ "R_NIOS2_BFD_RELOC8",
++ FALSE,
++ 0x000000ff,
++ 0x000000ff,
++ FALSE),
++
++ HOWTO (R_NIOS2_GPREL,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_gprel_relocate,
++ "R_NIOS2_GPREL",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_GNU_VTINHERIT,
++ 0,
++ 2, /* short */
++ 0,
++ FALSE,
++ 0,
++ complain_overflow_dont,
++ NULL,
++ "R_NIOS2_GNU_VTINHERIT",
++ FALSE,
++ 0,
++ 0,
++ FALSE),
++
++ HOWTO (R_NIOS2_GNU_VTENTRY,
++ 0,
++ 2, /* byte */
++ 0,
++ FALSE,
++ 0,
++ complain_overflow_dont,
++ _bfd_elf_rel_vtable_reloc_fn,
++ "R_NIOS2_GNU_VTENTRY",
++ FALSE,
++ 0,
++ 0,
++ FALSE),
++
++ HOWTO (R_NIOS2_UJMP,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_ujmp_relocate,
++ "R_NIOS2_UJMP",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_CJMP,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_cjmp_relocate,
++ "R_NIOS2_CJMP",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_CALLR,
++ 0,
++ 2,
++ 32,
++ FALSE,
++ 6,
++ complain_overflow_dont,
++ nios2_elf32_callr_relocate,
++ "R_NIOS2_CALLR",
++ FALSE,
++ 0x003fffc0,
++ 0x003fffc0,
++ FALSE),
++
++ HOWTO (R_NIOS2_ALIGN,
++ 0,
++ 2,
++ 0,
++ FALSE,
++ 0,
++ complain_overflow_dont,
++ nios2_elf32_ignore_reloc,
++ "R_NIOS2_ALIGN",
++ FALSE,
++ 0,
++ 0,
++ TRUE),
++
++/* add other relocations here */
++};
++
++static unsigned char elf_code_to_howto_index[R_NIOS2_ILLEGAL + 1];
++
++static reloc_howto_type *
++lookup_howto (unsigned int rtype)
++{
++ static int initialized = 0;
++ int i;
++ int howto_tbl_size = (int) (sizeof (elf_nios2_howto_table_rel)
++ / sizeof (elf_nios2_howto_table_rel[0]));
++
++ if (!initialized)
++ {
++ initialized = 1;
++ memset (elf_code_to_howto_index, 0xff,
++ sizeof (elf_code_to_howto_index));
++ for (i = 0; i < howto_tbl_size; i++)
++ elf_code_to_howto_index[elf_nios2_howto_table_rel[i].type] = i;
++ }
++
++ BFD_ASSERT (rtype <= R_NIOS2_ILLEGAL);
++ i = elf_code_to_howto_index[rtype];
++ if (i >= howto_tbl_size)
++ return 0;
++ return elf_nios2_howto_table_rel + i;
++}
++
++/*
++ map for converting BFD reloc types to New Jersey
++ reloc types
++ */
++struct elf_reloc_map
++{
++ bfd_reloc_code_real_type bfd_val;
++ enum elf_nios2_reloc_type elf_val;
++};
++
++static const struct elf_reloc_map nios2_reloc_map[] = {
++ {BFD_RELOC_NIOS2_S16, R_NIOS2_S16},
++ {BFD_RELOC_NIOS2_U16, R_NIOS2_U16},
++ {BFD_RELOC_16_PCREL, R_NIOS2_PCREL16},
++ {BFD_RELOC_NIOS2_CALL26, R_NIOS2_CALL26},
++ {BFD_RELOC_NIOS2_IMM5, R_NIOS2_IMM5},
++ {BFD_RELOC_NIOS2_CACHE_OPX, R_NIOS2_CACHE_OPX},
++ {BFD_RELOC_NIOS2_IMM6, R_NIOS2_IMM6},
++ {BFD_RELOC_NIOS2_IMM8, R_NIOS2_IMM8},
++ {BFD_RELOC_NIOS2_HI16, R_NIOS2_HI16},
++ {BFD_RELOC_NIOS2_LO16, R_NIOS2_LO16},
++ {BFD_RELOC_NIOS2_HIADJ16, R_NIOS2_HIADJ16},
++ {BFD_RELOC_32, R_NIOS2_BFD_RELOC_32},
++ {BFD_RELOC_16, R_NIOS2_BFD_RELOC_16},
++ {BFD_RELOC_8, R_NIOS2_BFD_RELOC_8},
++ {BFD_RELOC_NIOS2_GPREL, R_NIOS2_GPREL},
++ {BFD_RELOC_VTABLE_INHERIT, R_NIOS2_GNU_VTINHERIT},
++ {BFD_RELOC_VTABLE_ENTRY, R_NIOS2_GNU_VTENTRY},
++ {BFD_RELOC_NIOS2_UJMP, R_NIOS2_UJMP},
++ {BFD_RELOC_NIOS2_CJMP, R_NIOS2_CJMP},
++ {BFD_RELOC_NIOS2_CALLR, R_NIOS2_CALLR},
++ {BFD_RELOC_NIOS2_ALIGN, R_NIOS2_ALIGN},
++};
++
++/* Given a BFD reloc type, return a howto structure. */
++
++static reloc_howto_type *
++nios2_elf32_bfd_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
++ bfd_reloc_code_real_type code)
++{
++ int i;
++ for (i = 0;
++ i < (int) (sizeof (nios2_reloc_map) / sizeof (struct elf_reloc_map));
++ ++i)
++ {
++ if (nios2_reloc_map[i].bfd_val == code)
++ return &elf_nios2_howto_table_rel[(int) nios2_reloc_map[i].elf_val];
++ }
++
++ return NULL;
++}
++
++/* Helper function for nios2_elf32_info_to_howto */
++
++static reloc_howto_type *
++nios2_elf32_rtype_to_howto (unsigned int r_type,
++ bfd_boolean rela_p ATTRIBUTE_UNUSED)
++{
++ BFD_ASSERT (r_type < R_NIOS2_ILLEGAL);
++ return &elf_nios2_howto_table_rel[r_type];
++}
++
++/* Given a ELF32 relocation, fill in a arelent structure */
++
++static void
++nios2_elf32_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr,
++ Elf_Internal_Rela * dst)
++{
++ unsigned int r_type;
++
++ r_type = ELF32_R_TYPE (dst->r_info);
++ cache_ptr->howto = nios2_elf32_rtype_to_howto (r_type, FALSE);
++
++ // FIXME - do we need to do anything else here???
++}
++
++/* The assembler has output long jmp/call sequences for all calls
++ * and pc-relative branches that it cannot guarantee are within
++ * range, so the linker must attempt to "relax" these sequences to
++ * short branches and calls if it can. We avoid having to re-relax by
++ * replacing redundant instructions with nops instead of deleting them.
++ *
++ *
++ **/
++static bfd_boolean
++nios2_elf32_relax_section (bfd * abfd,
++ asection * sec,
++ struct bfd_link_info *link_info, bfd_boolean * again)
++{
++ Elf_Internal_Shdr *symtab_hdr;
++ Elf_Internal_Rela *internal_relocs;
++ Elf_Internal_Rela *irel, *irelend;
++ bfd_byte *contents = NULL;
++ Elf_Internal_Sym *isymbuf = NULL;
++
++#define OP_MATCH_NOP 0x0001883a
++
++ /* Assume nothing changes. */
++ *again = FALSE;
++
++ /* We don't have to do anything for a relocatable link, if
++ this section does not have relocs, or if this is not a
++ code section. */
++ if (link_info->relocatable
++ || (sec->flags & SEC_RELOC) == 0
++ || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0)
++ return TRUE;
++
++ /* If this is the first time we have been called for this section,
++ initialize the cooked size. */
++ if (sec->_cooked_size == 0)
++ sec->_cooked_size = sec->_raw_size;
++
++ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
++
++ /* Get a copy of the native relocations. */
++ internal_relocs = (_bfd_elf_link_read_relocs
++ (abfd, sec, (void *) NULL, (Elf_Internal_Rela *) NULL,
++ link_info->keep_memory));
++ if (internal_relocs == NULL)
++ goto error_return;
++
++ /* Walk through them looking for relaxing opportunities. */
++ irelend = internal_relocs + sec->reloc_count;
++ for (irel = internal_relocs; irel < irelend; irel++)
++ {
++ bfd_vma symval;
++
++ /* If this isn't something that can be relaxed, then ignore
++ this reloc. */
++ if (ELF32_R_TYPE (irel->r_info) != (int) R_NIOS2_UJMP
++ && ELF32_R_TYPE (irel->r_info) != (int) R_NIOS2_CJMP
++ && ELF32_R_TYPE (irel->r_info) != (int) R_NIOS2_CALLR)
++ {
++ continue;
++ }
++
++ /* Get the section contents if we haven't done so already. */
++ if (contents == NULL)
++ {
++ /* Get cached copy if it exists. */
++ if (elf_section_data (sec)->this_hdr.contents != NULL)
++ contents = elf_section_data (sec)->this_hdr.contents;
++ else
++ {
++ /* Go get them off disk. */
++ contents = (bfd_byte *) bfd_malloc (sec->_raw_size);
++ if (contents == NULL)
++ goto error_return;
++
++ if (!bfd_get_section_contents (abfd, sec, contents,
++ (file_ptr) 0, sec->_raw_size))
++ goto error_return;
++ }
++ }
++
++ /* Read this BFD's local symbols if we haven't done so already. */
++ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
++ {
++ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
++ if (isymbuf == NULL)
++ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
++ symtab_hdr->sh_info, 0,
++ NULL, NULL, NULL);
++ if (isymbuf == NULL)
++ goto error_return;
++ }
++
++ /* Get the value of the symbol referred to by the reloc. */
++ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
++ {
++ /* A local symbol. */
++ Elf_Internal_Sym *isym;
++ asection *sym_sec;
++
++ isym = isymbuf + ELF32_R_SYM (irel->r_info);
++ if (isym->st_shndx == SHN_UNDEF)
++ sym_sec = bfd_und_section_ptr;
++ else if (isym->st_shndx == SHN_ABS)
++ sym_sec = bfd_abs_section_ptr;
++ else if (isym->st_shndx == SHN_COMMON)
++ sym_sec = bfd_com_section_ptr;
++ else
++ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
++ symval = (isym->st_value
++ + sym_sec->output_section->vma + sym_sec->output_offset);
++ }
++ else
++ {
++ unsigned long indx;
++ struct elf_link_hash_entry *h;
++
++ /* An external symbol. */
++ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
++ h = elf_sym_hashes (abfd)[indx];
++ BFD_ASSERT (h != NULL);
++ if (h->root.type != bfd_link_hash_defined
++ && h->root.type != bfd_link_hash_defweak)
++ {
++ /* This appears to be a reference to an undefined
++ symbol. Just ignore it--it will be caught by the
++ regular reloc processing. */
++ continue;
++ }
++
++ symval = (h->root.u.def.value
++ + h->root.u.def.section->output_section->vma
++ + h->root.u.def.section->output_offset);
++ }
++
++ /* For simplicity of coding, we are going to modify the section
++ contents, the section relocs, and the BFD symbol table. We
++ must tell the rest of the code not to free up this
++ information. It would be possible to instead create a table
++ of changes which have to be made, as is done in coff-mips.c;
++ that would be more work, but would require less memory when
++ the linker is run. */
++
++ /* try to turn :
++ * movhi at, %hi(symbol)
++ * movui at, %lo(symbol)
++ * callr at
++ * into:
++ * call symbol
++ */
++ if (ELF32_R_TYPE (irel->r_info) == (int) R_NIOS2_CALLR)
++ {
++ bfd_vma targ_addr = symval + irel->r_addend;
++ bfd_vma curr_addr = (sec->output_section->vma + sec->output_offset);
++ bfd_vma targ_page, curr_page;
++ targ_page = targ_addr & 0xf0000000;
++ curr_page = curr_addr & 0xf0000000;
++
++ if (targ_page == curr_page)
++ {
++ /* change the opcode to a call */
++ bfd_put_32 (abfd, OP_MATCH_CALL, contents + irel->r_offset);
++ /* Note that we've changed the relocs, section contents, etc. */
++ elf_section_data (sec)->relocs = internal_relocs;
++ elf_section_data (sec)->this_hdr.contents = contents;
++ symtab_hdr->contents = (unsigned char *) isymbuf;
++
++ /* Fix the relocation's type. */
++ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
++ R_NIOS2_CALL26);
++
++ /* replace next two instructions with nops */
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 4);
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 8);
++ }
++ }
++
++ /* try to turn :
++ * movhi at, %hi(symbol)
++ * movui at, %lo(symbol)
++ * jmp at
++ * into:
++ * br symbol
++ */
++ if (ELF32_R_TYPE (irel->r_info) == (int) R_NIOS2_UJMP)
++ {
++ bfd_vma pcrel_offset;
++ Elf_Internal_Rela *irelalign = NULL;
++ Elf_Internal_Rela *irela = elf_section_data (sec)->relocs;
++ Elf_Internal_Rela *irelend = irel + sec->reloc_count;
++
++ for (; irela < irelend; irela++)
++ {
++ if (ELF32_R_TYPE (irela->r_info) == (int) R_NIOS2_ALIGN
++ && irela->r_offset > irel->r_offset + 4
++ && 8 < (1 << irela->r_addend))
++ {
++ irelalign = irela;
++ break;
++ }
++ }
++
++ /* calculate the pcrelative offset from current location */
++ pcrel_offset = symval;
++ pcrel_offset -= (sec->output_section->vma + sec->output_offset);
++ pcrel_offset += irel->r_addend;
++
++ /* we need to compute the pcrel_offset from the next instruction */
++ pcrel_offset -= (irel->r_offset + 4);
++
++ /* does this value fit in 16 bits */
++ if ((irelalign == NULL && (long) pcrel_offset <= 0x8004
++ && (long) pcrel_offset >= -0x8000) || (irelalign != NULL
++ && (long) pcrel_offset
++ <= 0x7ffc
++ && (long) pcrel_offset
++ >= -0x8000))
++ {
++ /* change the opcode to an unconditional branch */
++ bfd_put_32 (abfd, OP_MATCH_BR, contents + irel->r_offset);
++ /* Note that we've changed the relocs, section contents, etc. */
++ elf_section_data (sec)->relocs = internal_relocs;
++ elf_section_data (sec)->this_hdr.contents = contents;
++ symtab_hdr->contents = (unsigned char *) isymbuf;
++
++ /* Fix the relocation's type. */
++ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
++ R_NIOS2_PCREL16);
++
++ /* replace next two instructions with nops */
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 4);
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 8);
++ }
++ }
++
++ /* try to turn :
++ * b{cond} a, b skip
++ * movhi at, %hi(symbol)
++ * movui at, %lo(symbol)
++ * jmp at
++ * skip:
++ * ...
++ * into:
++ * br{opp_cond} a, b, symbol
++ */
++ if (ELF32_R_TYPE (irel->r_info) == (int) R_NIOS2_CJMP)
++ {
++ bfd_vma pcrel_offset;
++ Elf_Internal_Rela *irelalign = NULL;
++ Elf_Internal_Rela *irela = elf_section_data (sec)->relocs;
++ Elf_Internal_Rela *irelend = irel + sec->reloc_count;
++
++ for (; irela < irelend; irela++)
++ {
++ if (ELF32_R_TYPE (irela->r_info) == (int) R_NIOS2_ALIGN
++ && irela->r_offset > irel->r_offset + 4
++ && 8 < (1 << irela->r_addend))
++ {
++ irelalign = irela;
++ break;
++ }
++ }
++
++ /* calculate the pcrelative offset from current location */
++ pcrel_offset = symval;
++ pcrel_offset -= (sec->output_section->vma + sec->output_offset);
++ pcrel_offset += irel->r_addend;
++
++ /* we need to compute the pcrel_offset from this instruction
++ * ie the movhi */
++ pcrel_offset -= (irel->r_offset);
++
++ /* does this value fit in 16 bits */
++ if ((irelalign == NULL && (long) pcrel_offset <= 0x8008
++ && (long) pcrel_offset >= -0x8000) || (irelalign != NULL
++ && (long) pcrel_offset
++ <= 0x7ffc
++ && (long) pcrel_offset
++ >= -0x8000))
++ {
++ unsigned long opcode, op_a, op_b;
++ /* get the conditional branch opcode */
++ opcode = bfd_get_32 (abfd, contents + irel->r_offset - 4);
++ /* reverse the condition */
++ switch (opcode & OP_MASK_OP)
++ {
++ case OP_MATCH_BEQ:
++ opcode = (opcode & ~OP_MASK_OP) | OP_MATCH_BNE;
++ break;
++ case OP_MATCH_BNE:
++ opcode = (opcode & ~OP_MASK_OP) | OP_MATCH_BEQ;
++ break;
++ case OP_MATCH_BGE:
++ case OP_MATCH_BGEU:
++ case OP_MATCH_BLT:
++ case OP_MATCH_BLTU:
++ /* swap the operands */
++ op_a = (opcode & OP_MASK_RRT) << 5;
++ op_b = (opcode & OP_MASK_RRS) >> 5;
++ opcode =
++ (opcode & ~(OP_MASK_RRS | OP_MASK_RRT)) | op_a | op_b;
++ break;
++ default:
++ fprintf (stderr,
++ "relaxation error - expecting conditional branch, aborting\n");
++ abort ();
++ break;
++ }
++
++ /* we must set the branch target to zero so that the skip over the jmp doesn't get
++ * added to the jmp */
++ opcode = opcode & (~OP_MASK_IMM16);
++
++ /* change the opcode to the reversed conditional branch */
++ bfd_put_32 (abfd, opcode, contents + irel->r_offset - 4);
++ /* Note that we've changed the relocs, section contents, etc. */
++ elf_section_data (sec)->relocs = internal_relocs;
++ elf_section_data (sec)->this_hdr.contents = contents;
++ symtab_hdr->contents = (unsigned char *) isymbuf;
++
++ /* Fix the relocation's type. */
++ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
++ R_NIOS2_PCREL16);
++
++ /* this relocation's offset has also been reduced by 4 bytes */
++ irel->r_offset -= 4;
++
++ /* replace next two instructions with nops */
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 4);
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 8);
++ bfd_put_32 (abfd, OP_MATCH_NOP, contents + irel->r_offset + 12);
++ }
++ }
++
++ /* otherwise, leave alone */
++ }
++
++ if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
++ {
++ if (!link_info->keep_memory)
++ free (isymbuf);
++ else
++ {
++ /* Cache the symbols for elf_link_input_bfd. */
++ symtab_hdr->contents = (unsigned char *) isymbuf;
++ }
++ }
++
++ if (contents != NULL
++ && elf_section_data (sec)->this_hdr.contents != contents)
++ {
++ if (!link_info->keep_memory)
++ free (contents);
++ else
++ {
++ /* Cache the section contents for elf_link_input_bfd. */
++ elf_section_data (sec)->this_hdr.contents = contents;
++ }
++ }
++
++ if (internal_relocs != NULL
++ && elf_section_data (sec)->relocs != internal_relocs)
++ free (internal_relocs);
++
++
++ return TRUE;
++
++error_return:
++ if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf)
++ free (isymbuf);
++ if (contents != NULL
++ && elf_section_data (sec)->this_hdr.contents != contents)
++ free (contents);
++ if (internal_relocs != NULL
++ && elf_section_data (sec)->relocs != internal_relocs)
++ free (internal_relocs);
++
++ return FALSE;
++}
++
++/* Delete some bytes from a section while relaxing.
++ * Copied from mn10200 port */
++
++static bfd_boolean
++nios2_elf32_relax_delete_bytes (bfd * abfd,
++ asection * sec, bfd_vma addr, int count)
++{
++ Elf_Internal_Shdr *symtab_hdr;
++ unsigned int sec_shndx;
++ bfd_byte *contents;
++ Elf_Internal_Rela *irel, *irelend;
++ Elf_Internal_Rela *irelalign;
++ bfd_vma toaddr;
++ Elf_Internal_Sym *isym;
++ Elf_Internal_Sym *isymend;
++ struct elf_link_hash_entry **sym_hashes;
++ struct elf_link_hash_entry **end_hashes;
++ unsigned int symcount;
++ asection *asec;
++
++ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
++
++ contents = elf_section_data (sec)->this_hdr.contents;
++
++ /* The deletion must stop at the next ALIGN reloc for an aligment
++ power larger than the number of bytes we are deleting. */
++
++ irelalign = NULL;
++ /* +1 because we need to readjust symbols at end of section */
++ toaddr = sec->_cooked_size + 1;
++
++ irel = elf_section_data (sec)->relocs;
++ irelend = irel + sec->reloc_count;
++
++ for (; irel < irelend; irel++)
++ {
++ if (ELF32_R_TYPE (irel->r_info) == (int) R_NIOS2_ALIGN
++ && irel->r_offset > addr && count < (1 << irel->r_addend))
++ {
++ irelalign = irel;
++ /* +1 because we need to readjust symbols at end of section */
++ toaddr = irel->r_offset + 1;
++ break;
++ }
++ }
++
++
++ /* Actually delete the bytes. */
++ memmove (contents + addr, contents + addr + count,
++ (size_t) ((toaddr - 1) - addr - count));
++
++ if (irelalign == NULL)
++ sec->_cooked_size -= count;
++ else
++ {
++ int i;
++
++#define NOP_OPCODE (0x0001883a)
++
++ BFD_ASSERT ((count & 3) == 0);
++ for (i = 0; i < count; i += 4)
++ bfd_put_32 (abfd, (bfd_vma) NOP_OPCODE,
++ contents + (toaddr - 1) - count + i);
++ }
++
++ /* get the symbol table */
++ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
++ isym = (Elf_Internal_Sym *) symtab_hdr->contents;
++
++ /* Adjust all the reloc offsets in this section. */
++ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
++ {
++ /* Get the new reloc address. */
++ if ((irel->r_offset > addr && irel->r_offset < toaddr))
++ irel->r_offset -= count;
++ }
++
++ /* Adjust relocations against targets in this section whose positions
++ * have moved as a result of the relaxation */
++
++ for (asec = abfd->sections; asec; asec = asec->next)
++ {
++ irelend = elf_section_data (asec)->relocs + asec->reloc_count;
++ for (irel = elf_section_data (asec)->relocs; irel < irelend; irel++)
++ {
++ Elf_Internal_Sym *sym;
++ /* if the symbol which this reloc is against doesn't change
++ * we need to change the reloc addend */
++
++ sym = isym + ELF32_R_SYM (irel->r_info);
++ if (sym->st_shndx == sec_shndx
++ && !(sym->st_value > addr && sym->st_value < toaddr)
++ && sym->st_value + irel->r_addend > addr
++ && sym->st_value + irel->r_addend < toaddr)
++ {
++ irel->r_addend -= count;
++ }
++
++ }
++ }
++
++ /* Adjust the local symbols defined in this section. */
++ for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
++ {
++ if (isym->st_shndx == sec_shndx
++ && isym->st_value > addr && isym->st_value < toaddr)
++ isym->st_value -= count;
++
++
++ }
++
++ /* Now adjust the global symbols defined in this section. */
++ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
++ - symtab_hdr->sh_info);
++ sym_hashes = elf_sym_hashes (abfd);
++ end_hashes = sym_hashes + symcount;
++ for (; sym_hashes < end_hashes; sym_hashes++)
++ {
++ struct elf_link_hash_entry *sym_hash = *sym_hashes;
++ if ((sym_hash->root.type == bfd_link_hash_defined
++ || sym_hash->root.type == bfd_link_hash_defweak)
++ && sym_hash->root.u.def.section == sec
++ && sym_hash->root.u.def.value > addr
++ && sym_hash->root.u.def.value < toaddr)
++ {
++ sym_hash->root.u.def.value -= count;
++ }
++ }
++
++ return TRUE;
++}
++
++struct bfd_link_info *nios2_link_info = NULL;
++
++void
++_bfd_set_link_info (info)
++ struct bfd_link_info *info;
++{
++ nios2_link_info = info;
++}
++
++bfd_boolean linker_force_make_executable = FALSE;
++
++void
++_bfd_set_force_make_executable (force)
++ bfd_boolean force;
++{
++ linker_force_make_executable = force;
++}
++
++/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
++ dangerous relocation. */
++
++static bfd_boolean
++nios2_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp, struct bfd_link_info *info)
++{
++
++ bfd_boolean gp_found;
++ struct bfd_hash_entry *h;
++ struct bfd_link_hash_entry *lh;
++
++ /* If we've already figured out what GP will be, just return it. */
++ *pgp = _bfd_get_gp_value (output_bfd);
++ if (*pgp)
++ return TRUE;
++
++ h = bfd_hash_lookup (&info->hash->table, "_gp", FALSE, FALSE);
++ lh = (struct bfd_link_hash_entry *) h;
++lookup:
++ if (lh)
++ {
++ switch (lh->type)
++ {
++ case bfd_link_hash_undefined:
++ case bfd_link_hash_undefweak:
++ case bfd_link_hash_common:
++ gp_found = FALSE;
++ break;
++ case bfd_link_hash_defined:
++ case bfd_link_hash_defweak:
++ gp_found = TRUE;
++ *pgp = lh->u.def.value;
++ break;
++ case bfd_link_hash_indirect:
++ case bfd_link_hash_warning:
++ lh = lh->u.i.link;
++ /* @@FIXME ignoring warning for now */
++ goto lookup;
++ case bfd_link_hash_new:
++ default:
++ abort ();
++ }
++ }
++ else
++ gp_found = FALSE;
++
++ if (!gp_found)
++ {
++ /* Only get the error once. */
++ *pgp = 4;
++ _bfd_set_gp_value (output_bfd, *pgp);
++ return FALSE;
++ }
++
++ _bfd_set_gp_value (output_bfd, *pgp);
++
++ return TRUE;
++}
++
++/* We have to figure out the gp value, so that we can adjust the
++ symbol value correctly. We look up the symbol _gp in the output
++ BFD. If we can't find it, we're stuck. We cache it in the ELF
++ target data. We don't need to adjust the symbol value for an
++ external symbol if we are producing relocatable output. */
++
++static bfd_reloc_status_type
++nios2_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable,
++ char **error_message, bfd_vma *pgp, struct bfd_link_info *info)
++{
++ if (bfd_is_und_section (symbol->section) && !relocatable)
++ {
++ *pgp = 0;
++ return bfd_reloc_undefined;
++ }
++
++ *pgp = _bfd_get_gp_value (output_bfd);
++ if (*pgp == 0 && (!relocatable || (symbol->flags & BSF_SECTION_SYM) != 0))
++ {
++ /* if this is called without link_info, then
++ we cannot be doing a final link */
++ if (info == NULL)
++ relocatable = TRUE;
++
++ if (relocatable)
++ {
++ /* Make up a value. */
++ *pgp = symbol->section->output_section->vma + 0x4000;
++ _bfd_set_gp_value (output_bfd, *pgp);
++ }
++ else if (!nios2_elf_assign_gp (output_bfd, pgp, info))
++ {
++ *error_message =
++ (char *)
++ _("global pointer relative relocation when _gp not defined");
++ return bfd_reloc_dangerous;
++ }
++ }
++
++ return bfd_reloc_ok;
++}
++
++
++/* Relocations that require special handling */
++
++/* This is for relocations used only when relaxing to ensure
++ * changes in size of section don't screw up .align */
++static bfd_reloc_status_type
++nios2_elf32_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
++ asymbol *symbol ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED,
++ asection *input_section, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
++{
++ if (output_bfd != NULL)
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++}
++
++static bfd_reloc_status_type
++nios2_elf32_hi16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data,
++ asection *input_section, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
++{
++ /* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_hi16_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ + symbol->section->output_section->vma
++ + symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_lo16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
++{
++/* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_lo16_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ + symbol->section->output_section->vma
++ + symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_hiadj16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd,
++ char **error_message ATTRIBUTE_UNUSED)
++{
++/* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_hiadj16_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ +
++ symbol->section->output_section->
++ vma +
++ symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_pcrel16_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd,
++ char **error_message ATTRIBUTE_UNUSED)
++{
++/* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_pcrel16_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ +
++ symbol->section->output_section->
++ vma +
++ symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_call26_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
++{
++/* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_call26_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ +
++ symbol->section->output_section->
++ vma +
++ symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_gprel_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd, char **msg)
++{
++ bfd_vma relocation;
++ bfd_vma gp;
++ bfd_reloc_status_type r;
++
++
++/* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ relocation = symbol->value
++ + symbol->section->output_section->vma + symbol->section->output_offset;
++
++ if ((r =
++ nios2_elf_final_gp (abfd, symbol, FALSE, msg, &gp,
++ nios2_link_info)) == bfd_reloc_ok)
++ {
++ relocation = relocation + reloc_entry->addend - gp;
++ reloc_entry->addend = 0;
++ if ((signed) relocation < -32768 || (signed) relocation > 32767)
++ {
++ *msg = _("global pointer relative address out of range");
++ r = bfd_reloc_outofrange;
++ }
++ else
++ {
++ r = nios2_elf32_do_gprel_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ relocation, reloc_entry->addend);
++ }
++ }
++
++ return r;
++}
++
++static bfd_reloc_status_type
++nios2_elf32_ujmp_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd, char **msg ATTRIBUTE_UNUSED)
++{
++ /* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_ujmp_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ + symbol->section->output_section->vma
++ + symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_cjmp_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd, char **msg ATTRIBUTE_UNUSED)
++{
++ /* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++ return nios2_elf32_do_cjmp_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ + symbol->section->output_section->vma
++ + symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_callr_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
++ void *data, asection *input_section, bfd *output_bfd, char **msg ATTRIBUTE_UNUSED)
++{
++ /* This part is from bfd_elf_generic_reloc. */
++ if (output_bfd != (bfd *) NULL
++ && (symbol->flags & BSF_SECTION_SYM) == 0
++ && (!reloc_entry->howto->partial_inplace || reloc_entry->addend == 0))
++ {
++ reloc_entry->address += input_section->output_offset;
++ return bfd_reloc_ok;
++ }
++
++ if (output_bfd != NULL)
++ /* FIXME: See bfd_perform_relocation. Is this right? */
++ return bfd_reloc_ok;
++
++
++ return nios2_elf32_do_callr_relocate (abfd, reloc_entry->howto,
++ input_section,
++ data, reloc_entry->address,
++ (symbol->value
++ +
++ symbol->section->output_section->
++ vma +
++ symbol->section->output_offset),
++ reloc_entry->addend);
++}
++
++/* Do the relocations which require special handling */
++
++static bfd_reloc_status_type
++nios2_elf32_do_hi16_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ symbol_value = symbol_value + addend;
++ addend = 0;
++ symbol_value = (symbol_value >> 16) & 0xffff;
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_value, addend);
++}
++
++
++static bfd_reloc_status_type
++nios2_elf32_do_lo16_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ symbol_value = symbol_value + addend;
++ addend = 0;
++ symbol_value = symbol_value & 0xffff;
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_value, addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_do_hiadj16_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data, bfd_vma offset,
++ bfd_vma symbol_value, bfd_vma addend)
++{
++ symbol_value = symbol_value + addend;
++ addend = 0;
++ symbol_value =
++ ((symbol_value >> 16) & 0xffff) + ((symbol_value >> 15) & 0x01);
++ return _bfd_final_link_relocate (howto, abfd, input_section, data, offset,
++ symbol_value, addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_do_pcrel16_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ // NIOS2 pc relative relocations are relative to the next 32-bit instruction so we need
++ // to subtract 4 before doing a final_link_relocate
++ symbol_value = symbol_value + addend - 4;
++ addend = 0;
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_value, addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_do_call26_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ /* check that the relocation is in the same page as the current address */
++ if (((symbol_value + addend) & 0xf0000000)
++ != ((input_section->output_section->vma + offset) & 0xf0000000))
++ return bfd_reloc_overflow;
++
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_value, addend);
++}
++
++
++static bfd_reloc_status_type
++nios2_elf32_do_gprel_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ // because we need the output_bfd, the special handling is done
++ // in nios2_elf32_relocate_section or in nios2_elf32_gprel_relocate
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_value, addend);
++}
++
++static bfd_reloc_status_type
++nios2_elf32_do_ujmp_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ bfd_vma symbol_lo16, symbol_hi16;
++ bfd_reloc_status_type r;
++ symbol_value = symbol_value + addend;
++ addend = 0;
++ symbol_hi16 = (symbol_value >> 16) & 0xffff;
++ symbol_lo16 = symbol_value & 0xffff;
++
++ r = _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_hi16, addend);
++
++ if (r == bfd_reloc_ok)
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset + 4, symbol_lo16, addend);
++
++ return r;
++}
++
++static bfd_reloc_status_type
++nios2_elf32_do_cjmp_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ bfd_vma symbol_lo16, symbol_hi16;
++ bfd_reloc_status_type r;
++ symbol_value = symbol_value + addend;
++ addend = 0;
++ symbol_hi16 = (symbol_value >> 16) & 0xffff;
++ symbol_lo16 = symbol_value & 0xffff;
++
++ r = _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_hi16, addend);
++
++ if (r == bfd_reloc_ok)
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset + 4, symbol_lo16, addend);
++
++ return r;
++}
++
++static bfd_reloc_status_type
++nios2_elf32_do_callr_relocate (bfd *abfd, reloc_howto_type *howto,
++ asection *input_section ATTRIBUTE_UNUSED, bfd_byte *data,
++ bfd_vma offset, bfd_vma symbol_value, bfd_vma addend)
++{
++ bfd_vma symbol_lo16, symbol_hi16;
++ bfd_reloc_status_type r;
++ symbol_value = symbol_value + addend;
++ addend = 0;
++ symbol_hi16 = (symbol_value >> 16) & 0xffff;
++ symbol_lo16 = symbol_value & 0xffff;
++
++ r = _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset, symbol_hi16, addend);
++
++ if (r == bfd_reloc_ok)
++ return _bfd_final_link_relocate (howto, abfd, input_section,
++ data, offset + 4, symbol_lo16, addend);
++
++ return r;
++}
++
++/*
++ The function nios2_elf32_relocate_section is used by the linker
++ to perform relocations
++*/
++static bfd_boolean
++nios2_elf32_relocate_section (bfd * output_bfd,
++ struct bfd_link_info *info,
++ bfd * input_bfd,
++ asection * input_section,
++ bfd_byte * contents,
++ Elf_Internal_Rela * relocs,
++ Elf_Internal_Sym * local_syms,
++ asection ** local_sections)
++{
++ Elf_Internal_Shdr *symtab_hdr;
++ struct elf_link_hash_entry **sym_hashes;
++ Elf_Internal_Rela *rel;
++ Elf_Internal_Rela *relend;
++
++ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
++ sym_hashes = elf_sym_hashes (input_bfd);
++ relend = relocs + input_section->reloc_count;
++
++// size_t psymalloc = 0;
++// _bfd_generic_link_output_symbols(output_bfd, input_bfd, info, &psymalloc);
++ for (rel = relocs; rel < relend; rel++)
++ {
++ reloc_howto_type *howto;
++ unsigned long r_symndx;
++ Elf_Internal_Sym *sym;
++ asection *sec;
++ struct elf_link_hash_entry *h;
++ bfd_vma relocation;
++ bfd_vma gp;
++ bfd_vma reloc_address;
++ bfd_reloc_status_type r = bfd_reloc_ok;
++ const char *name = NULL;
++ int r_type;
++ const char *format;
++ char msgbuf[256];
++ const char* msg = (const char*) NULL;
++
++
++
++ r_type = ELF32_R_TYPE (rel->r_info);
++
++ r_symndx = ELF32_R_SYM (rel->r_info);
++
++ if (info->relocatable)
++ {
++ /* This is a relocatable link. We don't have to change
++ anything, unless the reloc is against a section symbol,
++ in which case we have to adjust according to where the
++ section symbol winds up in the output section. */
++ if (r_symndx < symtab_hdr->sh_info)
++ {
++ sym = local_syms + r_symndx;
++
++ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
++ {
++ sec = local_sections[r_symndx];
++ rel->r_addend += sec->output_offset + sym->st_value;
++ }
++ }
++ continue;
++ }
++
++ /* This is a final link. */
++ howto = lookup_howto ((unsigned) ELF32_R_TYPE (rel->r_info));
++ h = NULL;
++ sym = NULL;
++ sec = NULL;
++
++ if (r_symndx < symtab_hdr->sh_info)
++ {
++ sym = local_syms + r_symndx;
++ sec = local_sections[r_symndx];
++
++ relocation = (sec->output_section->vma
++ + sec->output_offset + sym->st_value);
++
++ // this ensures that relocations against duplicated symbols
++ // in merged sections that have been removed are fixed up against
++ // the remaining symbol and not the one that has been removed
++ if ((sec->flags & SEC_MERGE)
++ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
++ {
++ rel->r_addend =
++ _bfd_elf_rel_local_sym (output_bfd, sym, &sec, rel->r_addend);
++ rel->r_addend -= relocation;
++ rel->r_addend += sec->output_section->vma + sec->output_offset;
++ }
++
++ name = bfd_elf_string_from_elf_section
++ (input_bfd, symtab_hdr->sh_link, sym->st_name);
++
++ name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
++ }
++ else
++ {
++ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
++
++ while (h->root.type == bfd_link_hash_indirect
++ || h->root.type == bfd_link_hash_warning)
++ h = (struct elf_link_hash_entry *) h->root.u.i.link;
++
++ name = h->root.root.string;
++
++ if (h->root.type == bfd_link_hash_defined
++ || h->root.type == bfd_link_hash_defweak)
++ {
++ sec = h->root.u.def.section;
++
++ relocation = (h->root.u.def.value
++ + sec->output_section->vma + sec->output_offset);
++ }
++ else if (h->root.type == bfd_link_hash_undefweak)
++ {
++ relocation = 0;
++ }
++ else
++ {
++ if (!((*info->callbacks->undefined_symbol)
++ (info, h->root.root.string, input_bfd,
++ input_section, rel->r_offset, TRUE)))
++ return FALSE;
++ relocation = 0;
++ }
++ }
++
++ if (sec)
++ reloc_address = sec->output_section->vma + sec->output_offset + rel->r_offset;
++ else
++ reloc_address = 0;
++
++ if (howto != NULL)
++ {
++ switch (howto->type)
++ {
++ case R_NIOS2_HI16:
++ r =
++ nios2_elf32_do_hi16_relocate (input_bfd, howto, input_section,
++ contents, rel->r_offset,
++ relocation, rel->r_addend);
++ break;
++ case R_NIOS2_LO16:
++ r =
++ nios2_elf32_do_lo16_relocate (input_bfd, howto, input_section,
++ contents, rel->r_offset,
++ relocation, rel->r_addend);
++ break;
++ case R_NIOS2_HIADJ16:
++ r =
++ nios2_elf32_do_hiadj16_relocate (input_bfd, howto,
++ input_section, contents,
++ rel->r_offset, relocation,
++ rel->r_addend);
++ break;
++ case R_NIOS2_PCREL16:
++ r =
++ nios2_elf32_do_pcrel16_relocate (input_bfd, howto,
++ input_section, contents,
++ rel->r_offset, relocation,
++ rel->r_addend);
++ break;
++ case R_NIOS2_GPREL:
++ // turns an absolute address into a gp-relative address
++ if (!nios2_elf_assign_gp (output_bfd, &gp, info))
++ {
++ format = _("global pointer relative relocation at address 0x%08x when _gp not defined\n");
++ sprintf(msgbuf, format, reloc_address);
++ msg = msgbuf;
++ r = bfd_reloc_dangerous;
++ }
++ else
++ {
++ relocation = relocation + rel->r_addend - gp;
++ rel->r_addend = 0;
++ if ((signed) relocation < -32768
++ || (signed) relocation > 32767)
++ {
++ format = _("global pointer relative offset %d at address 0x%08x out of range -32678 to 32767\n");
++ sprintf(msgbuf, format, (signed)relocation, reloc_address);
++ msg = msgbuf;
++ r = bfd_reloc_outofrange;
++ }
++ else
++ {
++ r =
++ _bfd_final_link_relocate (howto, input_bfd,
++ input_section, contents,
++ rel->r_offset, relocation,
++ rel->r_addend);
++ }
++ }
++
++ break;
++ case R_NIOS2_UJMP:
++ r =
++ nios2_elf32_do_ujmp_relocate (input_bfd, howto, input_section,
++ contents, rel->r_offset,
++ relocation, rel->r_addend);
++ break;
++ case R_NIOS2_CJMP:
++ r =
++ nios2_elf32_do_cjmp_relocate (input_bfd, howto, input_section,
++ contents, rel->r_offset,
++ relocation, rel->r_addend);
++ break;
++ case R_NIOS2_CALLR:
++ r =
++ nios2_elf32_do_callr_relocate (input_bfd, howto,
++ input_section, contents,
++ rel->r_offset, relocation,
++ rel->r_addend);
++ break;
++ case R_NIOS2_CALL26:
++ r =
++ nios2_elf32_do_call26_relocate (input_bfd, howto,
++ input_section, contents,
++ rel->r_offset, relocation,
++ rel->r_addend);
++ break;
++ case R_NIOS2_ALIGN:
++ r = bfd_reloc_ok;
++ /* comment - for symmetry this would be
++ r = nios2_elf32_do_ignore_reloc (input_bfd, howto, input_section,
++ contents, rel->r_offset,
++ relocation, rel->r_addend);
++ but do_ignore_reloc would do no more than return bfd_reloc_ok */
++ break;
++ default:
++ r = _bfd_final_link_relocate (howto, input_bfd, input_section,
++ contents, rel->r_offset,
++ relocation, rel->r_addend);
++ break;
++ }
++ }
++ else
++ {
++ r = bfd_reloc_notsupported;
++ }
++
++ if (r != bfd_reloc_ok)
++ {
++ if (h != NULL)
++ name = h->root.root.string;
++ else
++ {
++ name = (bfd_elf_string_from_elf_section
++ (input_bfd, symtab_hdr->sh_link, sym->st_name));
++ if (name == NULL || *name == '\0')
++ name = bfd_section_name (input_bfd, sec);
++ }
++
++ switch (r)
++ {
++ case bfd_reloc_overflow:
++ r = info->callbacks->reloc_overflow
++ (info, name, howto->name, (bfd_vma) 0,
++ input_bfd, input_section, rel->r_offset);
++ break;
++
++ case bfd_reloc_undefined:
++ r = info->callbacks->undefined_symbol
++ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
++ break;
++
++ case bfd_reloc_outofrange:
++ if (msg == NULL)
++ msg = _("relocation out of range");
++ break;
++
++ case bfd_reloc_notsupported:
++ if (msg == NULL)
++ msg = _("unsupported relocation");
++ break;
++
++ case bfd_reloc_dangerous:
++ if (msg == NULL)
++ msg = _("dangerous relocation");
++ break;
++
++ default:
++ if (msg == NULL)
++ msg = _("unknown error");
++ break;
++ }
++
++ if (msg)
++ {
++ r = info->callbacks->warning
++ (info, msg, name, input_bfd, input_section, rel->r_offset);
++ return linker_force_make_executable;
++ }
++ }
++ }
++ return TRUE;
++}
++
++
++
++/* Handle an NIOS2 specific section when reading an object file. This
++ is called when elfcode.h finds a section with an unknown type.
++ FIXME: We need to handle the SHF_NIOS2_GPREL flag */
++
++static bfd_boolean
++nios2_elf32_section_from_shdr (bfd *abfd,
++ Elf_Internal_Shdr *hdr, const char *name)
++{
++ asection *newsect;
++
++ /* NG - I'm keeping this code commented out at the moment
++ in case we add a .mdebug section */
++
++ /*
++ switch (hdr->sh_type)
++ {
++ case SHT_NIOS2_DEBUG:
++ if (strcmp (name, ".mdebug") != 0)
++ return FALSE;
++ break;
++ default:
++ return FALSE;
++ }
++ */
++
++ if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name))
++ return FALSE;
++
++ newsect = hdr->bfd_section;
++
++ /* ditto */
++ /*
++ if (hdr->sh_type == SHT_NIOS2_DEBUG)
++ {
++ if (! bfd_set_section_flags (abfd, newsect,
++ (bfd_get_section_flags (abfd, newsect)
++ | SEC_DEBUGGING)))
++ return FALSE;
++ }
++ */
++ return TRUE;
++}
++
++/* Convert NIOS2 specific section flags to bfd internal section flags. */
++
++static bfd_boolean
++nios2_elf32_section_flags (flagword *flags, Elf_Internal_Shdr *hdr)
++{
++ if (hdr->sh_flags & SHF_NIOS2_GPREL)
++ *flags |= SEC_SMALL_DATA;
++
++ return TRUE;
++}
++
++/* Set the correct type for an NIOS2 ELF section. We do this by the
++ section name, which is a hack, but ought to work. */
++
++static bfd_boolean
++nios2_elf32_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
++ Elf_Internal_Shdr *hdr, asection *sec)
++{
++ register const char *name;
++
++ name = bfd_get_section_name (abfd, sec);
++
++ if (strcmp (name, ".mdebug") == 0)
++ {
++ /* we don't yet have an .mdebug section, but I'm leaving this here
++ in case we ever do
++ hdr->sh_type = SHT_NIOS2_DEBUG;
++
++ if ((abfd->flags & DYNAMIC) != 0 )
++ hdr->sh_entsize = 0;
++ else
++ hdr->sh_entsize = 1;
++ */
++ }
++ else if ((sec->flags & SEC_SMALL_DATA)
++ || strcmp (name, ".sdata") == 0
++ || strcmp (name, ".sbss") == 0
++ || strcmp (name, ".lit4") == 0 || strcmp (name, ".lit8") == 0)
++ hdr->sh_flags |= SHF_NIOS2_GPREL;
++
++ return TRUE;
++}
++
++/* Look through the relocs for a section during the first phase.
++ Since we don't do .gots or .plts, we just need to consider the
++ virtual table relocs for gc. */
++
++static bfd_boolean
++nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info,
++ asection *sec, const Elf_Internal_Rela *relocs)
++{
++ Elf_Internal_Shdr *symtab_hdr;
++ struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
++ const Elf_Internal_Rela *rel;
++ const Elf_Internal_Rela *rel_end;
++
++ if (info->relocatable)
++ return TRUE;
++
++ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
++ sym_hashes = elf_sym_hashes (abfd);
++ sym_hashes_end =
++ sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
++ if (!elf_bad_symtab (abfd))
++ sym_hashes_end -= symtab_hdr->sh_info;
++
++ rel_end = relocs + sec->reloc_count;
++ for (rel = relocs; rel < rel_end; rel++)
++ {
++ struct elf_link_hash_entry *h;
++ unsigned long r_symndx;
++
++ r_symndx = ELF32_R_SYM (rel->r_info);
++ if (r_symndx < symtab_hdr->sh_info)
++ h = NULL;
++ else
++ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
++
++ switch (ELF32_R_TYPE (rel->r_info))
++ {
++ /* This relocation describes the C++ object vtable hierarchy.
++ Reconstruct it for later use during GC. */
++ case R_NIOS2_GNU_VTINHERIT:
++ if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
++ return FALSE;
++ break;
++
++ /* This relocation describes which C++ vtable entries are actually
++ used. Record for later use during GC. */
++ case R_NIOS2_GNU_VTENTRY:
++ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend))
++ return FALSE;
++ break;
++ }
++ }
++
++ return TRUE;
++}
++
++
++/* Return the section that should be marked against GC for a given
++ relocation. */
++
++asection *
++nios2_elf32_gc_mark_hook (asection *sec,
++ struct bfd_link_info *info ATTRIBUTE_UNUSED,
++ Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
++ Elf_Internal_Sym *sym)
++{
++ if (h != NULL)
++ {
++ switch (ELF32_R_TYPE (rel->r_info))
++ {
++ case R_NIOS2_GNU_VTINHERIT:
++ case R_NIOS2_GNU_VTENTRY:
++ break;
++
++ default:
++ switch (h->root.type)
++ {
++ case bfd_link_hash_defined:
++ case bfd_link_hash_defweak:
++ return h->root.u.def.section;
++
++ case bfd_link_hash_common:
++ return h->root.u.c.p->section;
++
++ default:
++ break;
++ }
++ }
++ }
++ else
++ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
++
++ return NULL;
++}
++
++/*
++ NG ??? I'm marking the sections as standalone ie. I'm linking for
++ standalone embedded applications, not for UNIX System V or any other
++ OS/ABI - this may need to change when we deal with embedded PIC or
++ dynamic linking
++*/
++
++static void
++nios2_elf32_post_process_headers (bfd *abfd,
++ struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
++{
++ Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
++
++ i_ehdrp = elf_elfheader (abfd);
++ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_STANDALONE;
++}
++
++#define ELF_ARCH bfd_arch_nios2
++#define ELF_MACHINE_CODE EM_ALTERA_NIOS2
++
++/* for now we just make this 1, as we have no MMU in New Jersey */
++
++#define ELF_MAXPAGESIZE 1
++
++/* relocation table lookup macros */
++
++#define bfd_elf32_bfd_reloc_type_lookup nios2_elf32_bfd_reloc_type_lookup
++
++/* JUMP_TABLE_LINK macros */
++
++#define bfd_elf32_bfd_relax_section nios2_elf32_relax_section
++
++/* elf_info_to_howto (using RELA relocations) */
++
++#define elf_info_to_howto nios2_elf32_info_to_howto
++
++/* elf backend functions */
++
++#define elf_backend_can_gc_sections 1
++
++#define elf_backend_relocate_section nios2_elf32_relocate_section
++#define elf_backend_section_from_shdr nios2_elf32_section_from_shdr
++#define elf_backend_section_flags nios2_elf32_section_flags
++#define elf_backend_fake_sections nios2_elf32_fake_sections
++#define elf_backend_post_process_headers nios2_elf32_post_process_headers
++#define elf_backend_check_relocs nios2_elf32_check_relocs
++
++#define elf_backend_gc_mark_hook nios2_elf32_gc_mark_hook
++
++
++
++/* Support for SGI-ish mips targets. */
++#define TARGET_LITTLE_SYM bfd_elf32_littlenios2_vec
++#define TARGET_LITTLE_NAME "elf32-littlenios2"
++//#define TARGET_BIG_SYM bfd_elf32_bignios2_vec
++//#define TARGET_BIG_NAME "elf32-bignios2"
++
++#include "elf32-target.h"
+--- binutils-2.15/bfd/libbfd.h 2004-02-12 00:23:20.000000000 +0100
++++ binutils-2.15-nios2/bfd/libbfd.h 2005-05-17 12:20:13.000000000 +0200
+@@ -652,9 +652,11 @@ extern bfd_boolean _bfd_sh_align_load_sp
+ #endif
+ /* Extracted from init.c. */
+ /* Extracted from libbfd.c. */
+-bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
++bfd_boolean
++bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
+
+-unsigned int bfd_log2 (bfd_vma x);
++unsigned int
++bfd_log2 PARAMS ((bfd_vma x));
+
+ /* Extracted from bfdio.c. */
+ /* Extracted from bfdwin.c. */
+@@ -673,13 +675,17 @@ extern bfd *bfd_last_cache;
+ ((x)==bfd_last_cache? \
+ (FILE*) (bfd_last_cache->iostream): \
+ bfd_cache_lookup_worker(x))
+-bfd_boolean bfd_cache_init (bfd *abfd);
++bfd_boolean
++bfd_cache_init PARAMS ((bfd *abfd));
+
+-bfd_boolean bfd_cache_close (bfd *abfd);
++bfd_boolean
++bfd_cache_close PARAMS ((bfd *abfd));
+
+-FILE* bfd_open_file (bfd *abfd);
++FILE*
++bfd_open_file PARAMS ((bfd *abfd));
+
+-FILE *bfd_cache_lookup_worker (bfd *abfd);
++FILE *
++bfd_cache_lookup_worker PARAMS ((bfd *abfd));
+
+ /* Extracted from reloc.c. */
+ #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
+@@ -1504,6 +1510,21 @@ static const char *const bfd_reloc_code_
+ "BFD_RELOC_MSP430_16",
+ "BFD_RELOC_MSP430_16_PCREL_BYTE",
+ "BFD_RELOC_MSP430_16_BYTE",
++ "BFD_RELOC_NIOS2_S16",
++ "BFD_RELOC_NIOS2_U16",
++ "BFD_RELOC_NIOS2_CALL26",
++ "BFD_RELOC_NIOS2_IMM5",
++ "BFD_RELOC_NIOS2_CACHE_OPX",
++ "BFD_RELOC_NIOS2_IMM6",
++ "BFD_RELOC_NIOS2_IMM8",
++ "BFD_RELOC_NIOS2_HI16",
++ "BFD_RELOC_NIOS2_LO16",
++ "BFD_RELOC_NIOS2_HIADJ16",
++ "BFD_RELOC_NIOS2_GPREL",
++ "BFD_RELOC_NIOS2_UJMP",
++ "BFD_RELOC_NIOS2_CJMP",
++ "BFD_RELOC_NIOS2_CALLR",
++ "BFD_RELOC_NIOS2_ALIGN",
+ "BFD_RELOC_IQ2000_OFFSET_16",
+ "BFD_RELOC_IQ2000_OFFSET_21",
+ "BFD_RELOC_IQ2000_UHI16",
+@@ -1521,40 +1542,41 @@ static const char *const bfd_reloc_code_
+ };
+ #endif
+
+-reloc_howto_type *bfd_default_reloc_type_lookup
+- (bfd *abfd, bfd_reloc_code_real_type code);
++reloc_howto_type *
++bfd_default_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+
+-bfd_boolean bfd_generic_relax_section
+- (bfd *abfd,
++bfd_boolean
++bfd_generic_relax_section PARAMS ((bfd *abfd,
+ asection *section,
+ struct bfd_link_info *,
+- bfd_boolean *);
++ bfd_boolean *));
+
+-bfd_boolean bfd_generic_gc_sections
+- (bfd *, struct bfd_link_info *);
++bfd_boolean
++bfd_generic_gc_sections PARAMS ((bfd *, struct bfd_link_info *));
+
+-bfd_boolean bfd_generic_merge_sections
+- (bfd *, struct bfd_link_info *);
++bfd_boolean
++bfd_generic_merge_sections PARAMS ((bfd *, struct bfd_link_info *));
+
+-bfd_byte *bfd_generic_get_relocated_section_contents
+- (bfd *abfd,
++bfd_byte *
++bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+- asymbol **symbols);
++ asymbol **symbols));
+
+ /* Extracted from archures.c. */
+ extern const bfd_arch_info_type bfd_default_arch_struct;
+-bfd_boolean bfd_default_set_arch_mach
+- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
++bfd_boolean
++bfd_default_set_arch_mach PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach));
+
+-const bfd_arch_info_type *bfd_default_compatible
+- (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
++const bfd_arch_info_type *
++bfd_default_compatible PARAMS ((const bfd_arch_info_type *a, const bfd_arch_info_type *b));
+
+-bfd_boolean bfd_default_scan
+- (const struct bfd_arch_info *info, const char *string);
++bfd_boolean
++bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
+
+ /* Extracted from elf.c. */
+-struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
++struct elf_internal_shdr *
++bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
+
+--- binutils-2.15/bfd/reloc.c 2004-01-21 12:17:53.000000000 +0100
++++ binutils-2.15-nios2/bfd/reloc.c 2005-05-17 12:20:13.000000000 +0200
+@@ -3943,6 +3943,39 @@ ENUMDOC
+ msp430 specific relocation codes
+
+ ENUM
++ BFD_RELOC_NIOS2_S16
++ENUMX
++ BFD_RELOC_NIOS2_U16
++ENUMX
++ BFD_RELOC_NIOS2_CALL26
++ENUMX
++ BFD_RELOC_NIOS2_IMM5
++ENUMX
++ BFD_RELOC_NIOS2_CACHE_OPX
++ENUMX
++ BFD_RELOC_NIOS2_IMM6
++ENUMX
++ BFD_RELOC_NIOS2_IMM8
++ENUMX
++ BFD_RELOC_NIOS2_HI16
++ENUMX
++ BFD_RELOC_NIOS2_LO16
++ENUMX
++ BFD_RELOC_NIOS2_HIADJ16
++ENUMX
++ BFD_RELOC_NIOS2_GPREL
++ENUMX
++ BFD_RELOC_NIOS2_UJMP
++ENUMX
++ BFD_RELOC_NIOS2_CJMP
++ENUMX
++ BFD_RELOC_NIOS2_CALLR
++ENUMX
++ BFD_RELOC_NIOS2_ALIGN
++ENUMDOC
++ Relocations used by the Altera New Jersey core
++
++ENUM
+ BFD_RELOC_IQ2000_OFFSET_16
+ ENUMX
+ BFD_RELOC_IQ2000_OFFSET_21
+--- binutils-2.15/bfd/srec.c 2003-11-30 19:40:41.000000000 +0100
++++ binutils-2.15-nios2/bfd/srec.c 2005-05-17 12:20:13.000000000 +0200
+@@ -1009,9 +1009,14 @@ srec_write_header (abfd)
+ {
+ unsigned int len = strlen (abfd->filename);
+
+- /* I'll put an arbitrary 40 char limit on header size. */
+- if (len > 40)
+- len = 40;
++ /* validate Chunk for header */
++ if (Chunk == 0)
++ Chunk = 1;
++ else if (Chunk > MAXCHUNK - 2) /* S0 has 2 address bytes */
++ Chunk = MAXCHUNK - 2;
++
++ if (len > Chunk)
++ len = Chunk;
+
+ return srec_write_record (abfd, 0, (bfd_vma) 0,
+ abfd->filename, abfd->filename + len);
+--- binutils-2.15/bfd/targets.c 2004-05-17 21:36:04.000000000 +0200
++++ binutils-2.15-nios2/bfd/targets.c 2005-05-17 12:20:13.000000000 +0200
+@@ -559,6 +559,7 @@ extern const bfd_target bfd_elf32_nbigmi
+ extern const bfd_target bfd_elf32_nlittlemips_vec;
+ extern const bfd_target bfd_elf32_ntradbigmips_vec;
+ extern const bfd_target bfd_elf32_ntradlittlemips_vec;
++extern const bfd_target bfd_elf32_littlenios2_vec;
+ extern const bfd_target bfd_elf32_openrisc_vec;
+ extern const bfd_target bfd_elf32_or32_big_vec;
+ extern const bfd_target bfd_elf32_pj_vec;
+@@ -746,6 +747,7 @@ extern const bfd_target sco5_core_vec;
+ extern const bfd_target trad_core_vec;
+
+ extern const bfd_target bfd_elf32_am33lin_vec;
++extern const bfd_target bfd_elf32_littlenios2_vec;
+ static const bfd_target * const _bfd_target_vector[] = {
+
+ #ifdef SELECT_VECS
+@@ -854,6 +856,7 @@ static const bfd_target * const _bfd_tar
+ &bfd_elf32_ntradbigmips_vec,
+ &bfd_elf32_ntradlittlemips_vec,
+ #endif
++ &bfd_elf32_littlenios2_vec,
+ &bfd_elf32_openrisc_vec,
+ &bfd_elf32_or32_big_vec,
+ &bfd_elf32_pj_vec,
+--- binutils-2.15/binutils/nios2_binutils_xfail.lst 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/binutils/nios2_binutils_xfail.lst 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1 @@
++No xfails
+--- binutils-2.15/binutils/readelf.c 2004-05-17 21:35:52.000000000 +0200
++++ binutils-2.15-nios2/binutils/readelf.c 2005-05-17 12:20:13.000000000 +0200
+@@ -110,6 +110,8 @@
+
+ #include "aout/ar.h"
+
++#include "elf/nios2.h"
++
+ #include "bucomm.h"
+ #include "getopt.h"
+ #include "libiberty.h"
+@@ -668,6 +670,7 @@ guess_is_rela (unsigned long e_machine)
+ case EM_XTENSA:
+ case EM_XTENSA_OLD:
+ case EM_M32R:
++ case EM_ALTERA_NIOS2:
+ return TRUE;
+
+ case EM_MMA:
+@@ -1166,6 +1169,10 @@ dump_relocations (FILE *file,
+ case EM_XTENSA:
+ rtype = elf_xtensa_reloc_type (type);
+ break;
++
++ case EM_ALTERA_NIOS2:
++ rtype = elf_nios2_reloc_type (type);
++ break;
+ }
+
+ if (rtype == NULL)
+@@ -1649,6 +1656,7 @@ get_machine_name (unsigned e_machine)
+ case EM_IQ2000: return "Vitesse IQ2000";
+ case EM_XTENSA_OLD:
+ case EM_XTENSA: return "Tensilica Xtensa Processor";
++ case EM_ALTERA_NIOS2: return "Altera Nios II";
+ default:
+ sprintf (buff, _("<unknown>: %x"), e_machine);
+ return buff;
+--- binutils-2.15/binutils/testsuite/binutils-all/bintest.s 1999-05-03 09:29:11.000000000 +0200
++++ binutils-2.15-nios2/binutils/testsuite/binutils-all/bintest.s 2005-05-17 12:20:13.000000000 +0200
+@@ -1,5 +1,8 @@
+ .globl text_symbol
+ .text
++ # this is needed to get the readelf -s, -S and -r tests to work
++ # with nios2 as it has relaxation on by default
++ .set norelax
+ text_symbol:
+ static_text_symbol:
+ .long 1
+--- binutils-2.15/binutils-2.15_copied 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/binutils-2.15_copied 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1 @@
++timestamp
+--- binutils-2.15/binutils-2.15_untarred 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/binutils-2.15_untarred 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1 @@
++timestamp
+--- binutils-2.15/configure 2004-05-17 21:36:20.000000000 +0200
++++ binutils-2.15-nios2/configure 2005-05-17 12:20:13.000000000 +0200
+@@ -1434,6 +1434,10 @@ case "${target}" in
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ ;;
++ nios2-*-*)
++ skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'`
++ noconfigdirs="$noconfigdirs"
++ ;;
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+--- binutils-2.15/configure.in 2004-05-17 21:40:54.000000000 +0200
++++ binutils-2.15-nios2/configure.in 2005-05-17 12:20:13.000000000 +0200
+@@ -18,6 +18,7 @@
+ ##############################################################################
+ ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
+
++
+ AC_INIT(move-if-change)
+ AC_PREREQ(2.13)
+ AC_CANONICAL_SYSTEM
+@@ -667,6 +668,10 @@ case "${target}" in
+ mips*-*-*)
+ noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ ;;
++ nios2-*-*)
++ skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'`
++ noconfigdirs="$noconfigdirs"
++ ;;
+ romp-*-*)
+ noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
+ ;;
+--- binutils-2.15/gas/Makefile.in 2004-05-17 21:36:07.000000000 +0200
++++ binutils-2.15-nios2/gas/Makefile.in 2005-05-17 12:20:13.000000000 +0200
+@@ -299,6 +299,7 @@ CPU_TYPES = \
+ mn10200 \
+ mn10300 \
+ msp430 \
++ nios2 \
+ ns32k \
+ openrisc \
+ or32 \
+@@ -493,6 +494,7 @@ TARGET_CPU_CFILES = \
+ config/tc-mn10200.c \
+ config/tc-mn10300.c \
+ config/tc-msp430.c \
++ config/tc-nios2.c \
+ config/tc-ns32k.c \
+ config/tc-openrisc.c \
+ config/tc-or32.c \
+@@ -545,6 +547,7 @@ TARGET_CPU_HFILES = \
+ config/tc-mn10200.h \
+ config/tc-mn10300.h \
+ config/tc-msp430.h \
++ config/tc-nios2.h \
+ config/tc-ns32k.h \
+ config/tc-openrisc.h \
+ config/tc-or32.h \
+@@ -1171,6 +1174,13 @@ DEPTC_msp430_elf = $(INCDIR)/symcat.h $(
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/msp430.h \
+ $(INCDIR)/safe-ctype.h
+
++DEPTC_nios2_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
++ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
++ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-nios2.h \
++ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
++ $(INCDIR)/opcode/nios2.h itbl-ops.h dwarf2dbg.h $(INCDIR)/elf/nios2.h \
++ $(INCDIR)/elf/reloc-macros.h
++
+ DEPTC_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
+@@ -1824,6 +1834,12 @@ DEPOBJ_msp430_elf = $(INCDIR)/symcat.h $
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+
++DEPOBJ_nios2_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
++ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
++ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-nios2.h \
++ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
++ $(INCDIR)/elf/nios2.h $(INCDIR)/elf/reloc-macros.h
++
+ DEPOBJ_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+@@ -2349,6 +2365,10 @@ DEP_msp430_elf = $(srcdir)/config/obj-el
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h
+
++DEP_nios2_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
++ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
++ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-nios2.h
++
+ DEP_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
+--- binutils-2.15/gas/config/obj-elf.c 2004-05-17 21:36:08.000000000 +0200
++++ binutils-2.15-nios2/gas/config/obj-elf.c 2005-05-17 12:20:13.000000000 +0200
+@@ -53,6 +53,10 @@
+ #include "elf/i370.h"
+ #endif
+
++#ifdef TC_NIOS2
++#include "elf/nios2.h"
++#endif
++
+ static void obj_elf_line (int);
+ static void obj_elf_size (int);
+ static void obj_elf_type (int);
+--- binutils-2.15/gas/config/tc-nios2.c 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/config/tc-nios2.c 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,2996 @@
++/* tc-nios2.c -- assemble code for a New Jersey processor.
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++
++ This file is part of GAS.
++
++ GAS 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 2, or (at your option)
++ any later version.
++
++ GAS 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 GAS; see the file COPYING. If not, write to the Free
++ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++ 02111-1307, USA. */
++
++
++#include <stdio.h>
++#include <limits.h>
++#include <string.h>
++#include <stdlib.h>
++#include "as.h"
++#include "opcode/nios2.h"
++#include "elf/nios2.h"
++#include "tc-nios2.h"
++#include "bfd.h"
++#include "dwarf2dbg.h"
++#include "subsegs.h"
++#include "safe-ctype.h"
++
++#ifndef OBJ_ELF
++ /* we are not supporting any other target
++ so we throw a compile time error */
++OBJ_ELF not defined
++#endif
++ typedef enum
++{
++ relax_section = 0,
++ relax_none,
++ relax_all
++}
++relax_optionT;
++
++
++/* struct contains all assembler options set with .set */
++struct
++{
++ /*
++ .set noat -> noat = 1 allows assembly code to use at without warning
++ and macro expansions will generate a warning.
++ .set at -> noat = 0, assembly code using at will warn
++ macro expansions will not generate warnings
++ */
++ bfd_boolean noat;
++
++ /*
++ .set nobreak -> nobreak = 1 allows assembly code to use ba,bt without warning
++ .set break -> nobreak = 0, assembly code using ba,bt will warn
++ */
++ bfd_boolean nobreak;
++
++ /*
++ .cmd line option -relax-all allows all branches and calls to be replaced
++ with longer versions
++ -no-relax inhibits branch/call conversion
++ default value is relax_section, which relaxes branches within a section
++ */
++ relax_optionT relax;
++
++}
++nios2_as_options =
++{
++FALSE, FALSE, relax_section};
++
++
++typedef struct nios2_insn_reloc
++{
++ /* any expression in the instruction is parsed into
++ this field which is passed to fix_new_exp() to
++ generate a fixup */
++ expressionS reloc_expression;
++
++ /* the type of the relocation to be applied */
++ bfd_reloc_code_real_type reloc_type;
++
++ /* pc relative */
++ unsigned int reloc_pcrel;
++
++ /* the next relocation to be applied to the instruction */
++ struct nios2_insn_reloc *reloc_next;
++}
++nios2_insn_relocS;
++
++
++/* ------------------------------------------------------------------
++ This struct is used by the functions in tc-nios2.c to assemble an
++ instruction
++ ------------------------------------------------------------------*/
++
++typedef struct nios2_insn_info
++{
++ /* assembled instruction */
++ unsigned long insn_code;
++ /* ptr to the relevant bit of the opcode table */
++ const struct nios2_opcode *insn_nios2_opcode;
++ /* after parsing ptrs to the tokens in the instruction fill this array
++ it is terminated with a null pointer ( hence the first +1
++ The second +1 is because in some parts of the code the opcode
++ is not counted as a token, but still placed in this array*/
++ const char *insn_tokens[NIOS2_MAX_INSN_TOKENS + 1 + 1];
++
++ /* this holds information used to generate fixups
++ and eventually relocations if it is not null */
++ nios2_insn_relocS *insn_reloc;
++}
++nios2_insn_infoS;
++
++
++/*
++ This struct associates an argument assemble function with
++ an argument syntax string. Used by the assembler to find out
++ how to parse and assemble a set of instruction operands and return the instruction
++ field values
++*/
++
++typedef struct nios2_arg_info
++{
++ const char *args;
++ void (*assemble_args_func) (nios2_insn_infoS * insn_info);
++}
++nios2_arg_infoS;
++
++/*
++ This struct is used to convert New Jersey pseudo-ops into the
++ corresponding real op
++ */
++typedef struct nios2_ps_insn_info
++{
++ const char *pseudo_insn;
++ const char *insn;
++ const char *arg_modifier;
++ void (*arg_modifer_func) (const char *arg, char **parsedArgs, int numArg,
++ int startIndex);
++ int num;
++ int index;
++}
++nios2_ps_insn_infoS;
++
++
++
++/* function prototypes */
++static void NIOS2_CHECK_ASSEMBLY (unsigned int opcode,
++ const char *exp_opcode);
++static void s_nios2_sdata (int);
++void nios2_assemble_args_dst (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_tsi (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_tsu (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_o (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_m (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_s (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_tis (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_dc (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_cs (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_ldst (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_none (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_dsj (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_is (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_sto (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_d (nios2_insn_infoS * insn_info);
++void nios2_assemble_args_b (nios2_insn_infoS * insn_info);
++
++nios2_insn_relocS *nios2_insn_reloc_new (bfd_reloc_code_real_type reloc_type,
++ unsigned int pcrel);
++void nios2_insn_reloc_destroy (nios2_insn_relocS * reloc);
++unsigned long nios2_assemble_expression (const char *exprstr,
++ nios2_insn_infoS * insn,
++ nios2_insn_relocS * prev_reloc,
++ bfd_reloc_code_real_type reloc_type,
++ unsigned int pcrel);
++char *nios2_consume_separator (char *argStr, const char *separator);
++char *nios2_consume_arg (char *argStr, const char *argType);
++void nios2_parse_args (char *argStr, const char *parseStr, char **parsedArgs);
++
++void nios2_modify_arg (const char *modifier, char **parsedArgs, int unused,
++ int index);
++void nios2_append_arg (const char *append, char **parsedArgs, int numAppend,
++ int startIndex);
++void nios2_insert_arg (const char *insert, char **parsedArgs, int numInsert,
++ int startIndex);
++void nios2_swap_args (const char *unused, char **parsedArgs, int index_1,
++ int index_2);
++void nios2_negate_arg (const char *modifier ATTRIBUTE_UNUSED,
++ char **parsedArgs, int unused ATTRIBUTE_UNUSED,
++ int index);
++void nios2_translate_pseudo_insn (nios2_insn_infoS * insn);
++valueT md_chars_to_number (char *buf, int n);
++void md_number_to_imm (char *buf, valueT val, int n);
++void md_number_to_disp (char *buf, valueT val, int n);
++void md_number_to_field (char *buf, valueT val, int n);
++static void nios2_align (int log_size, const char *pfill, symbolS * sym);
++static void s_nios2_ucons (int nbytes);
++static void s_nios2_set (int equiv);
++static void s_nios2_align (int ignore);
++static void s_nios2_text (int);
++static void s_nios2_data (int);
++static void s_nios2_section (int);
++static bfd_boolean nios2_coproc_reg (const char *reg_name);
++static void output_insn (void);
++static void output_ubranch (void);
++static void output_cbranch (void);
++static void output_call (void);
++static void output_movia (void);
++
++
++bfd_boolean nios2_check_overflow (valueT fixup, reloc_howto_type * howto);
++
++/* The known current alignment of the current section. */
++static int nios2_current_align;
++static segT nios2_current_align_seg;
++
++/* The last seen label in the current section. This is used to auto-align
++ labels preceeding instructions. */
++static symbolS *nios2_last_label;
++
++
++static int nios2_auto_align_on = 1;
++
++/* This array holds the chars that always start a comment. If the
++ pre-processor is disabled, these aren't very useful */
++const char comment_chars[] = "#";
++
++/* This array holds the chars that only start a comment at the beginning of
++ a line. If the line seems to have the form '# 123 filename'
++ .line and .file directives will appear in the pre-processed output */
++/* Note that input_file.c hand checks for '#' at the beginning of the
++ first line of the input file. This is because the compiler outputs
++ #NO_APP at the beginning of its output. */
++/* Also note that C style comments are always supported. */
++const char line_comment_chars[] = "#";
++
++/* This array holds machine specific line separator characters. */
++const char line_separator_chars[] = ";";
++
++/* Chars that can be used to separate mant from exp in floating point nums */
++const char EXP_CHARS[] = "eE";
++
++/* Chars that mean this number is a floating point constant */
++/* As in 0f12.456 */
++/* or 0d1.2345e12 */
++const char FLT_CHARS[] = "rRsSfFdDxXpP";
++
++/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
++ changed in read.c . Ideally it shouldn't have to know about it at all,
++ but nothing is ideal around here.
++ */
++
++/* handle of the OPCODE hash table */
++static struct hash_control *nios2_opcode_hash = NULL;
++
++/* handle of the Register hash table */
++static struct hash_control *nios2_reg_hash = NULL;
++
++/* handle of the parse args hash table */
++static struct hash_control *nios2_arg_hash = NULL;
++
++/* pseudo-op hash table */
++static struct hash_control *nios2_ps_hash = NULL;
++
++/* mode of the assembler */
++typedef enum
++{
++ NIOS2_MODE_ASSEMBLE, // ordinary operation
++ NIOS2_MODE_TEST // hidden mode used for self testing
++}
++NIOS2_MODE;
++
++static NIOS2_MODE nios2_mode = NIOS2_MODE_ASSEMBLE;
++
++/* this function is used to in self-checking mode
++ to check the assembled instruction
++ opcode should be the assembled opcode, and exp_opcode
++ the parsed string representing the expected opcode */
++void
++NIOS2_CHECK_ASSEMBLY (unsigned int opcode, const char *exp_opcode)
++{
++ if (nios2_mode == NIOS2_MODE_TEST)
++ {
++ if ((exp_opcode) == NULL)
++ {
++ as_bad (_("expecting opcode string in self test mode"));
++ }
++ else if ((opcode) != strtoul ((exp_opcode), NULL, 16))
++ {
++ as_bad (_("assembly 0x%08x, expected %s"), (opcode), (exp_opcode));
++ }
++ }
++}
++
++/* Machine-dependent command-line options */
++
++const char *md_shortopts = "r";
++
++struct option md_longopts[] = {
++#define OPTION_RELAX_ALL (OPTION_MD_BASE + 0)
++ {"relax-all", no_argument, NULL, OPTION_RELAX_ALL},
++#define OPTION_NORELAX (OPTION_MD_BASE + 1)
++ {"no-relax", no_argument, NULL, OPTION_NORELAX},
++#define OPTION_RELAX_SECTION (OPTION_MD_BASE + 2)
++ {"relax-section", no_argument, NULL, OPTION_RELAX_SECTION}
++};
++
++size_t md_longopts_size = sizeof (md_longopts);
++
++/* Machine dependent pseudo-ops
++ These are actually assembler directives
++ format of each entry is
++
++ { "directive", handler_func, param }
++*/
++const pseudo_typeS md_pseudo_table[] = {
++ {"align", s_nios2_align, 0},
++ {"text", s_nios2_text, 0},
++ {"data", s_nios2_data, 0},
++ {"section", s_nios2_section, 0},
++ {"section.s", s_nios2_section, 0},
++ {"sect", s_nios2_section, 0},
++ {"sect.s", s_nios2_section, 0},
++ /* .dword and .half are included for
++ compatibility with MIPS */
++ {"dword", cons, 8},
++ {"half", cons, 2},
++ /* NIOS2 native word size is 4 bytes, so we override
++ the GAS default of 2 */
++ {"word", cons, 4},
++ /* explicitly unaligned directives */
++ {"2byte", s_nios2_ucons, 2},
++ {"4byte", s_nios2_ucons, 4},
++ {"8byte", s_nios2_ucons, 8},
++ {"16byte", s_nios2_ucons, 16},
++#ifdef OBJ_ELF
++ {"sdata", s_nios2_sdata, 0},
++#endif
++ {"set", s_nios2_set, 0},
++ {NULL, NULL, 0}
++};
++
++#define BYTE_F 32764
++#define BYTE_B -32768
++#define ABS (long)0xffffffff /* special value to indicate non-pc relative jmp */
++
++#define UBRANCH 1
++#define UJMP 2
++#define CBRANCH 3
++#define CJMP 4
++
++
++#define RELAX_MAX_SIZE(type) nios2_relax_table[nios2_relax_table[type].rlx_more].rlx_length
++#define RELAX_SIZE(type) nios2_relax_table[type].rlx_length
++#define RELAX_SUBSTATE(type) type
++
++/* machine dependent relaxations */
++struct relax_type nios2_relax_table[] = {
++ /* first entry unused (ends relaxation sequence) */
++ {1, 1, 0, 0},
++ /* unconditional branch */
++ {BYTE_F, BYTE_B, 4, 2}, /* br label (label is in range) */
++ /* unconditional jmp */
++ {ABS, ABS, 12, 0}, /* movhi at, %hi(label) ; ori at, %lo(label) ; jmp at */
++ /* conditional branch */
++ {BYTE_F, BYTE_B, 4, 4}, /* br{cond} label (label is in range) */
++ /* conditional jmp */
++ {ABS, ABS, 16, 0}, /* br{opp_cond} skip ; movhi at, %hi(label) ; ori at, %lo(label) ; jmp at ; skip: } */
++};
++
++
++/* this is just the generic relax_frag function but
++ amended to include absolute jmps in the relax table
++ */
++
++long
++nios2_relax_frag (segT segment, fragS * fragP, long stretch)
++{
++ const relax_typeS *this_type;
++ const relax_typeS *start_type;
++ relax_substateT next_state;
++ relax_substateT this_state;
++ long growth;
++ offsetT aim;
++ addressT target;
++ addressT address;
++ symbolS *symbolP;
++ const relax_typeS *table;
++
++ target = fragP->fr_offset;
++ address = fragP->fr_address;
++ table = nios2_relax_table;
++ this_state = fragP->fr_subtype;
++ start_type = this_type = table + this_state;
++ symbolP = fragP->fr_symbol;
++
++ if (symbolP)
++ {
++ fragS *sym_frag;
++
++ sym_frag = symbol_get_frag (symbolP);
++
++#ifndef DIFF_EXPR_OK
++#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
++ know ((S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE)
++ || (S_GET_SEGMENT (symbolP) == SEG_DATA)
++ || (S_GET_SEGMENT (symbolP) == SEG_BSS)
++ || (S_GET_SEGMENT (symbolP) == SEG_TEXT));
++#endif
++ know (sym_frag != NULL);
++#endif
++ know (!(S_GET_SEGMENT (symbolP) == absolute_section)
++ || sym_frag == &zero_address_frag);
++ target += S_GET_VALUE (symbolP);
++
++ /* If frag has yet to be reached on this pass,
++ assume it will move by STRETCH just as we did.
++ If this is not so, it will be because some frag
++ between grows, and that will force another pass. */
++
++ if (stretch != 0
++ && sym_frag->relax_marker != fragP->relax_marker
++ && S_GET_SEGMENT (symbolP) == segment)
++ {
++ target += stretch;
++ }
++ }
++
++
++ /* NG we subtract 4 because all pc relative branches are
++ from the next instruction */
++ aim = target - address - fragP->fr_fix - 4;
++
++ if (aim < 0)
++ {
++ /* Look backwards. */
++ for (next_state = this_type->rlx_more; next_state;)
++ {
++ if (aim >= this_type->rlx_backward
++ || this_type->rlx_backward == ABS)
++ next_state = 0;
++ else
++ {
++ /* Grow to next state. */
++ this_state = next_state;
++ this_type = table + this_state;
++ next_state = this_type->rlx_more;
++ }
++ }
++ }
++ else
++ {
++ /* Look forwards. */
++
++ for (next_state = this_type->rlx_more; next_state;)
++ {
++ if (aim <= this_type->rlx_forward || this_type->rlx_forward == ABS)
++ next_state = 0;
++ else
++ {
++ /* Grow to next state. */
++ this_state = next_state;
++ this_type = table + this_state;
++ next_state = this_type->rlx_more;
++ }
++ }
++ }
++
++
++ growth = this_type->rlx_length - start_type->rlx_length;
++
++ if (growth != 0)
++ fragP->fr_subtype = this_state;
++
++ return growth;
++}
++
++/*--------------------------------------------------------------------------------
++ The next table associates pointers to functions which parse the arguments to an
++ instruction and fill in the relevant fields of the instruction
++ --------------------------------------------------------------------------------*/
++
++const nios2_arg_infoS nios2_arg_info_structs[] = {
++ /* args assemble_args_func */
++ {"d,s,t", nios2_assemble_args_dst},
++ {"d,s,t,E", nios2_assemble_args_dst},
++ {"t,s,i", nios2_assemble_args_tsi},
++ {"t,s,i,E", nios2_assemble_args_tsi},
++ {"t,s,u", nios2_assemble_args_tsu},
++ {"t,s,u,E", nios2_assemble_args_tsu},
++ {"s,t,o", nios2_assemble_args_sto},
++ {"s,t,o,E", nios2_assemble_args_sto},
++ {"o", nios2_assemble_args_o},
++ {"o,E", nios2_assemble_args_o},
++ {"s", nios2_assemble_args_s},
++ {"s,E", nios2_assemble_args_s},
++ {"", nios2_assemble_args_none},
++ {"E", nios2_assemble_args_none},
++ {"i(s)", nios2_assemble_args_is},
++ {"i(s)E", nios2_assemble_args_is},
++ {"m", nios2_assemble_args_m},
++ {"m,E", nios2_assemble_args_m},
++ {"t,i(s)", nios2_assemble_args_tis},
++ {"t,i(s)E", nios2_assemble_args_tis},
++ {"d,c", nios2_assemble_args_dc},
++ {"d,c,E", nios2_assemble_args_dc},
++ {"c,s", nios2_assemble_args_cs},
++ {"c,s,E", nios2_assemble_args_cs},
++ {"l,d,s,t", nios2_assemble_args_ldst},
++ {"l,d,s,t,E", nios2_assemble_args_ldst},
++ {"d,s,j", nios2_assemble_args_dsj},
++ {"d,s,j,E", nios2_assemble_args_dsj},
++ {"d", nios2_assemble_args_d},
++ {"d,E", nios2_assemble_args_d},
++ {"b", nios2_assemble_args_b},
++ {"b,E", nios2_assemble_args_b}
++};
++
++#define NIOS2_NUM_ARGS \
++ ((sizeof(nios2_arg_info_structs)/sizeof(nios2_arg_info_structs[0])))
++const int nios2_num_arg_info_structs = NIOS2_NUM_ARGS;
++
++
++const nios2_ps_insn_infoS nios2_ps_insn_info_structs[] = {
++ /* pseudo-op real-op arg arg_modifier_func num index */
++ {"mov", "add", "zero", nios2_append_arg, 1, 3},
++ {"movi", "addi", "zero", nios2_insert_arg, 1, 2},
++ {"movhi", "orhi", "zero", nios2_insert_arg, 1, 2},
++ {"movui", "ori", "zero", nios2_insert_arg, 1, 2},
++ {"movia", "orhi", "zero", nios2_insert_arg, 1, 2},
++ {"nop", "add", "zero", nios2_append_arg, 3, 1},
++ {"bgt", "blt", "", nios2_swap_args, 1, 2},
++ {"bgtu", "bltu", "", nios2_swap_args, 1, 2},
++ {"ble", "bge", "", nios2_swap_args, 1, 2},
++ {"bleu", "bgeu", "", nios2_swap_args, 1, 2},
++ {"cmpgt", "cmplt", "", nios2_swap_args, 2, 3},
++ {"cmpgtu", "cmpltu", "", nios2_swap_args, 2, 3},
++ {"cmple", "cmpge", "", nios2_swap_args, 2, 3},
++ {"cmpleu", "cmpgeu", "", nios2_swap_args, 2, 3},
++ {"cmpgti", "cmpgei", "+1", nios2_modify_arg, 0, 3},
++ {"cmpgtui", "cmpgeui", "+1", nios2_modify_arg, 0, 3},
++ {"cmplei", "cmplti", "+1", nios2_modify_arg, 0, 3},
++ {"cmpleui", "cmpltui", "+1", nios2_modify_arg, 0, 3},
++ {"subi", "addi", "", nios2_negate_arg, 0, 3}
++ /* add further pseudo-ops here */
++};
++
++#define NIOS2_NUM_PSEUDO_INSNS \
++ ((sizeof(nios2_ps_insn_info_structs)/sizeof(nios2_ps_insn_info_structs[0])))
++const int nios2_num_ps_insn_info_structs = NIOS2_NUM_PSEUDO_INSNS;
++
++/* special relocation directive strings */
++
++struct nios2_special_relocS
++{
++ const char *string;
++ bfd_reloc_code_real_type reloc_type;
++};
++
++struct nios2_special_relocS nios2_special_reloc[] = {
++ {"%hiadj", BFD_RELOC_NIOS2_HIADJ16},
++ {"%hi", BFD_RELOC_NIOS2_HI16},
++ {"%lo", BFD_RELOC_NIOS2_LO16},
++ {"%gprel", BFD_RELOC_NIOS2_GPREL}
++};
++
++#define NIOS2_NUM_SPECIAL_RELOCS \
++ (sizeof(nios2_special_reloc)/sizeof(nios2_special_reloc[0]))
++const int nios2_num_special_relocs = NIOS2_NUM_SPECIAL_RELOCS;
++
++/*
++ The function nios2_modify_arg appends the string modifier to the string contained
++ in the argument at index in the array parsedArgs[]
++*/
++void
++nios2_modify_arg (const char *modifier,
++ char **parsedArgs, int unused ATTRIBUTE_UNUSED, int index)
++{
++ assert (index < NIOS2_MAX_INSN_TOKENS);
++
++/*
++ we can't just strcat here because strcat will free the memory pointed to by the first
++ argument and allocate new memory - but at this stage, parsedArgs[index] may point into
++ the middle of a block of allocated memory, so trying to free it will cause a seg fault.
++
++ */
++ char *tmp = parsedArgs[index];
++ parsedArgs[index] =
++ (char *) malloc (strlen (parsedArgs[index]) + strlen (modifier) + 1);
++ strcpy (parsedArgs[index], tmp);
++ strcat (parsedArgs[index], modifier);
++}
++
++
++void
++nios2_negate_arg (const char *modifier ATTRIBUTE_UNUSED,
++ char **parsedArgs, int unused ATTRIBUTE_UNUSED, int index)
++{
++ char *tmp = parsedArgs[index];
++ parsedArgs[index] =
++ (char *) malloc (strlen ("~(") + strlen (parsedArgs[index]) +
++ strlen (")+1") + 1);
++
++ strcpy (parsedArgs[index], "~(");
++ strcat (parsedArgs[index], tmp);
++ strcat (parsedArgs[index], ")+1");
++}
++
++/*
++ The function nios2_swap_args swaps the pointers at indices index_1 and
++ index_2 in the array parsedArgs[] - this is used for operand swapping
++ for comparison operations
++ */
++void
++nios2_swap_args (const char *unused ATTRIBUTE_UNUSED,
++ char **parsedArgs, int index_1, int index_2)
++{
++ char *tmp;
++ assert (index_1 < NIOS2_MAX_INSN_TOKENS && index_2 < NIOS2_MAX_INSN_TOKENS);
++ tmp = parsedArgs[index_1];
++ parsedArgs[index_1] = parsedArgs[index_2];
++ parsedArgs[index_2] = tmp;
++}
++
++/*
++ This function appends the string append to the array of strings in
++ parsedArgs numAppend times starting at index startIndex in the array
++*/
++void
++nios2_append_arg (const char *append, char **parsedArgs, int numAppend,
++ int startIndex)
++{
++ int i, count;
++ char *tmp;
++
++ assert ((startIndex + numAppend) < NIOS2_MAX_INSN_TOKENS);
++ i = startIndex;
++ count = numAppend;
++
++ if (nios2_mode == NIOS2_MODE_TEST)
++ tmp = parsedArgs[startIndex];
++ else
++ tmp = NULL;
++
++ while (count > 0)
++ {
++ parsedArgs[i] = (char *) append;
++ ++i;
++ --count;
++ }
++
++ assert (i == (startIndex + numAppend));
++ parsedArgs[i] = tmp;
++ parsedArgs[i + 1] = NULL;
++}
++
++/* This function inserts the string insert numInsert times in the array parsedArgs,
++ starting at the index startIndex
++ */
++void
++nios2_insert_arg (const char *insert, char **parsedArgs, int numInsert,
++ int startIndex)
++{
++ int i, count, from, to;
++
++ assert ((startIndex + numInsert) < NIOS2_MAX_INSN_TOKENS);
++
++ to = startIndex + numInsert;
++ from = startIndex;
++
++ /* move the existing arguments up to create space */
++ i = NIOS2_MAX_INSN_TOKENS;
++ while ((i - numInsert) >= startIndex)
++ {
++ parsedArgs[i] = parsedArgs[i - numInsert];
++ --i;
++ }
++
++ i = startIndex;
++ count = numInsert;
++ while (count > 0)
++ {
++ parsedArgs[i] = (char *) insert;
++ ++i;
++ --count;
++ }
++}
++
++/*
++ This function swaps the pseudo-op for a real op
++ FIXME - only works for 1-to-1 correspondence
++ */
++void
++nios2_translate_pseudo_insn (nios2_insn_infoS * insn)
++{
++
++ nios2_ps_insn_infoS *ps_insn;
++
++ /* find which real insn the pseudo-op transates to and
++ switch the insn_info ptr to point to it */
++ ps_insn =
++ (nios2_ps_insn_infoS *) hash_find (nios2_ps_hash,
++ insn->insn_nios2_opcode->name);
++
++ if (ps_insn != NULL)
++ {
++ insn->insn_nios2_opcode =
++ (struct nios2_opcode *) hash_find (nios2_opcode_hash, ps_insn->insn);
++ insn->insn_tokens[0] = insn->insn_nios2_opcode->name;
++ // modify the args so they work with the real insn
++ ps_insn->arg_modifer_func (ps_insn->arg_modifier,
++ (char **) insn->insn_tokens, ps_insn->num,
++ ps_insn->index);
++ }
++ else
++ {
++ // we cannot recover from this
++ as_fatal (_("unrecognized pseudo-instruction %s"),
++ ps_insn->pseudo_insn);
++ }
++}
++
++/********************************************************************
++ The following functions are called by machine-independent parts of
++ the assembler
++ ********************************************************************/
++
++/*
++ Function : void md_parse_option
++ (char** option_ptr, int* argc_ptr, char*** argv_ptr)
++
++ Description :
++
++ */
++int
++md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
++{
++ switch (c)
++ {
++ case 'r':
++ /* hidden option for self-test mode */
++ nios2_mode = NIOS2_MODE_TEST;
++ break;
++ case OPTION_RELAX_ALL:
++ nios2_as_options.relax = relax_all;
++ break;
++ case OPTION_NORELAX:
++ nios2_as_options.relax = relax_none;
++ break;
++ case OPTION_RELAX_SECTION:
++ nios2_as_options.relax = relax_section;
++ break;
++ default:
++ return 0;
++ break;
++ }
++
++ return 1;
++}
++
++/*
++ Function : md_show_usage(FILE* stream)
++
++ Description : machine-dependent usage message
++*/
++void
++md_show_usage (FILE * stream)
++{
++ fprintf (stream, "\
++ NIOS2 options:\n\
++ -relax-all replace all branch and call instructions with jmp and callr sequences\n\
++ -relax-section replace identified out of range branches with jmp sequences (default)\n\
++ -no-relax do not replace any branches or calls\n");
++}
++
++/*
++ Function : void md_begin()
++
++ Description :
++ This function is called once, at assembler startup time.
++ It should set up all the tables, etc. that the MD part of the
++ assembler will need.
++*/
++void
++md_begin ()
++{
++ int i;
++ const char *inserted;
++
++ /* create and fill a hashtable for the New Jersey opcodes, registers and arguments */
++ nios2_opcode_hash = hash_new ();
++ nios2_reg_hash = hash_new ();
++ nios2_arg_hash = hash_new ();
++ nios2_ps_hash = hash_new ();
++
++ for (i = 0; i < NUMOPCODES; ++i)
++ {
++ inserted =
++ hash_insert (nios2_opcode_hash, nios2_opcodes[i].name,
++ (PTR) & nios2_opcodes[i]);
++ if (inserted != NULL)
++ {
++ fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
++ nios2_opcodes[i].name, inserted);
++ /* Probably a memory allocation problem? Give up now. */
++ as_fatal (_("Broken assembler. No assembly attempted."));
++ }
++ }
++
++ for (i = 0; i < nios2_num_regs; ++i)
++ {
++ inserted =
++ hash_insert (nios2_reg_hash, nios2_regs[i].name,
++ (PTR) & nios2_regs[i]);
++ if (inserted != NULL)
++ {
++ fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
++ nios2_regs[i].name, inserted);
++ /* Probably a memory allocation problem? Give up now. */
++ as_fatal (_("Broken assembler. No assembly attempted."));
++ }
++
++ }
++
++ for (i = 0; i < nios2_num_arg_info_structs; ++i)
++ {
++ inserted =
++ hash_insert (nios2_arg_hash, nios2_arg_info_structs[i].args,
++ (PTR) & nios2_arg_info_structs[i]);
++ if (inserted != NULL)
++ {
++ fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
++ nios2_arg_info_structs[i].args, inserted);
++ /* Probably a memory allocation problem? Give up now. */
++ as_fatal (_("Broken assembler. No assembly attempted."));
++ }
++ }
++
++ for (i = 0; i < nios2_num_ps_insn_info_structs; ++i)
++ {
++ inserted =
++ hash_insert (nios2_ps_hash, nios2_ps_insn_info_structs[i].pseudo_insn,
++ (PTR) & nios2_ps_insn_info_structs[i]);
++ if (inserted != NULL)
++ {
++ fprintf (stderr, _("internal error: can't hash `%s': %s\n"),
++ nios2_ps_insn_info_structs[i].pseudo_insn, inserted);
++ /* Probably a memory allocation problem? Give up now. */
++ as_fatal (_("Broken assembler. No assembly attempted."));
++ }
++ }
++
++ /* assembler option defaults */
++ nios2_as_options.noat = FALSE;
++ nios2_as_options.nobreak = FALSE;
++
++ /* debug information is incompatible with relaxation */
++ if (debug_type != DEBUG_UNSPECIFIED)
++ {
++ nios2_as_options.relax = relax_none;
++ }
++
++ /* initialize the alignment data */
++ nios2_current_align_seg = now_seg;
++ nios2_last_label = NULL;
++ nios2_current_align = 0;
++}
++
++
++
++
++/* made this global to avoid changing one function prototype */
++nios2_insn_infoS insn;
++
++/*
++ Function: void md_assemble(char* op_str)
++
++ Description: assembles a single line of Nios II assembly
++ language
++ */
++void
++md_assemble (char *op_str)
++{
++ char *argstr;
++ char *op_strdup;
++ nios2_arg_infoS *arg_info;
++ unsigned long saved_pinfo = 0;
++
++ /* make sure we are aligned on a 4-byte boundary */
++ if (nios2_current_align < 2)
++ nios2_align (2, NULL, nios2_last_label);
++ else if (nios2_current_align > 2)
++ nios2_current_align = 2;
++ nios2_last_label = NULL;
++
++
++ /* we don't want to clobber to op_str
++ because we want to be able to use it in messages */
++ op_strdup = strdup (op_str);
++
++ insn.insn_tokens[0] = strtok (op_strdup, " ");
++ argstr = strtok (NULL, "");
++
++ /* assemble the opcode */
++ insn.insn_nios2_opcode =
++ (struct nios2_opcode *) hash_find (nios2_opcode_hash,
++ insn.insn_tokens[0]);
++ insn.insn_reloc = NULL;
++
++ if (insn.insn_nios2_opcode != NULL)
++ {
++ /* set the opcode for the instruction */
++ insn.insn_code = insn.insn_nios2_opcode->match;
++
++ /* parse the arguments pointed to by argstr */
++ if (nios2_mode == NIOS2_MODE_ASSEMBLE)
++ {
++ nios2_parse_args (argstr, insn.insn_nios2_opcode->args,
++ (char **) &insn.insn_tokens[1]);
++ }
++ else
++ {
++ nios2_parse_args (argstr, insn.insn_nios2_opcode->args_test,
++ (char **) &insn.insn_tokens[1]);
++ }
++
++ /* we need to preserve the MOVIA macro as this is clobbered by translate_pseudo_insn */
++ if (insn.insn_nios2_opcode->pinfo == NIOS2_INSN_MACRO_MOVIA)
++ {
++ saved_pinfo = NIOS2_INSN_MACRO_MOVIA;
++ }
++ /* if the instruction is an pseudo-instruction, we want to replace it with its
++ real equivalent, and then continue */
++ if ((insn.insn_nios2_opcode->pinfo & NIOS2_INSN_MACRO) ==
++ NIOS2_INSN_MACRO)
++ {
++ nios2_translate_pseudo_insn (&insn);
++ }
++
++ /* find the assemble function, and call it */
++ arg_info =
++ (nios2_arg_infoS *) hash_find (nios2_arg_hash,
++ insn.insn_nios2_opcode->args);
++ if (arg_info != NULL)
++ {
++ arg_info->assemble_args_func (&insn);
++
++ if (nios2_as_options.relax != relax_none
++ && insn.insn_nios2_opcode->pinfo & NIOS2_INSN_UBRANCH)
++ output_ubranch ();
++ else if (nios2_as_options.relax != relax_none
++ && insn.insn_nios2_opcode->pinfo & NIOS2_INSN_CBRANCH)
++ output_cbranch ();
++ else if (nios2_as_options.relax == relax_all
++ && insn.insn_nios2_opcode->pinfo & NIOS2_INSN_CALL)
++ output_call ();
++ else if (saved_pinfo == NIOS2_INSN_MACRO_MOVIA)
++ output_movia ();
++ else
++ output_insn ();
++ }
++ else
++ {
++ /* the assembler is broken */
++ fprintf (stderr,
++ _("internal error: %s is not a valid argument syntax\n"),
++ insn.insn_nios2_opcode->args);
++ /* Probably a memory allocation problem? Give up now. */
++ as_fatal (_("Broken assembler. No assembly attempted."));
++ }
++ }
++ else
++ {
++ /* unrecognised instruction - error */
++ as_bad (_("unrecognised instruction %s"), insn.insn_tokens[0]);
++ }
++}
++
++/* output a normal instruction */
++static void
++output_insn ()
++{
++ char *f;
++ nios2_insn_relocS *reloc;
++
++ f = frag_more (4);
++ /* this allocates enough space for the instruction
++ and puts it in the current frag */
++ md_number_to_chars (f, insn.insn_code, 4);
++ /* emit debug info */
++ dwarf2_emit_insn (4);
++ /* create any fixups */
++ reloc = insn.insn_reloc;
++ while (reloc != NULL)
++ {
++ /* this creates any fixups to be acted on later */
++ fix_new_exp (frag_now, f - frag_now->fr_literal, 4,
++ &reloc->reloc_expression, reloc->reloc_pcrel,
++ reloc->reloc_type);
++ reloc = reloc->reloc_next;
++ }
++}
++
++/* output an unconditional branch */
++static void
++output_ubranch ()
++{
++ char *f;
++ nios2_insn_relocS *reloc;
++ symbolS *symp;
++ offsetT offset;
++
++ reloc = insn.insn_reloc;
++
++ /* if the reloc is NULL, there was an error assembling the branch */
++ if (reloc != NULL)
++ {
++
++ symp = reloc->reloc_expression.X_add_symbol;
++ offset = reloc->reloc_expression.X_add_number;
++
++ /* we must tag debug info here since we can't do it after
++ calling frag_var */
++ dwarf2_emit_insn (4);
++
++ /* we create a machine dependent frag which can grow
++ to accommodate the largest possible instruction sequence
++ this may generate */
++ f = frag_var (rs_machine_dependent,
++ RELAX_MAX_SIZE (UBRANCH),
++ RELAX_SIZE (UBRANCH),
++ RELAX_SUBSTATE (UBRANCH), symp, offset, NULL);
++
++ md_number_to_chars (f, insn.insn_code, 4);
++
++ /* we leave fixup generation to md_convert_frag */
++ }
++}
++
++/* output a conditional branch */
++static void
++output_cbranch ()
++{
++ char *f;
++ nios2_insn_relocS *reloc;
++ symbolS *symp;
++ offsetT offset;
++
++ reloc = insn.insn_reloc;
++
++ /* if the reloc is NULL, there was an error assembling the branch */
++ if (reloc != NULL)
++ {
++
++ symp = reloc->reloc_expression.X_add_symbol;
++ offset = reloc->reloc_expression.X_add_number;
++
++ /* we must tag debug info here since we can't do it after
++ calling frag_var */
++ dwarf2_emit_insn (4);
++
++ /* we create a machine dependent frag which can grow
++ to accommodate the largest possible instruction sequence
++ this may generate */
++ f = frag_var (rs_machine_dependent,
++ RELAX_MAX_SIZE (CBRANCH),
++ RELAX_SIZE (CBRANCH),
++ RELAX_SUBSTATE (CBRANCH), symp, offset, NULL);
++
++ md_number_to_chars (f, insn.insn_code, 4);
++
++
++ /* we leave fixup generation to md_convert_frag */
++ }
++}
++
++/* Output a call sequence. Since calls are not pc-relative for NIOS2,
++ but are page-relative, we cannot tell at any stage in assembly
++ whether a call will be out of range since a section may be linked
++ at any address. So if we are relaxing, we convert all call instructions
++ to long call sequences, and rely on the linker to relax them back to
++ short calls */
++static void
++output_call ()
++{
++ char *f;
++ nios2_insn_relocS *reloc;
++ f = frag_more (12);
++ /* this allocates enough space for the instruction
++ and puts it in the current frag */
++ reloc = insn.insn_reloc;
++
++ /* if the reloc is NULL, there was an error assembling the branch */
++ if (reloc != NULL)
++ {
++ md_number_to_chars (f, OP_MATCH_ORHI | 0x00400000, 4);
++ dwarf2_emit_insn (4);
++ md_number_to_chars (f + 4, OP_MATCH_ORI | 0x08400000, 4);
++ dwarf2_emit_insn (4);
++ md_number_to_chars (f + 8, OP_MATCH_CALLR | 0x08000000, 4);
++ dwarf2_emit_insn (4);
++ fix_new (frag_now, f - frag_now->fr_literal, 4,
++ reloc->reloc_expression.X_add_symbol,
++ reloc->reloc_expression.X_add_number, 0,
++ BFD_RELOC_NIOS2_CALLR);
++
++
++ }
++}
++
++/* output a movhi/addi pair for the movia pseudo-op */
++static void
++output_movia ()
++{
++ char *f;
++ nios2_insn_relocS *reloc;
++ f = frag_more (8);
++ unsigned long reg_index = GET_INSN_FIELD (IRT, insn.insn_code);
++
++ /* this allocates enough space for the instruction
++ and puts it in the current frag */
++ reloc = insn.insn_reloc;
++
++ /* if the reloc is NULL, there was an error assembling the movia */
++ if (reloc != NULL)
++ {
++ md_number_to_chars (f, insn.insn_code, 4);
++ dwarf2_emit_insn (4);
++ md_number_to_chars (f + 4,
++ OP_MATCH_ADDI | (reg_index << OP_SH_IRT) |
++ (reg_index << OP_SH_IRS), 4);
++ dwarf2_emit_insn (4);
++ fix_new (frag_now, f - frag_now->fr_literal, 4,
++ reloc->reloc_expression.X_add_symbol,
++ reloc->reloc_expression.X_add_number, 0,
++ BFD_RELOC_NIOS2_HIADJ16);
++ fix_new (frag_now, f + 4 - frag_now->fr_literal, 4,
++ reloc->reloc_expression.X_add_symbol,
++ reloc->reloc_expression.X_add_number, 0, BFD_RELOC_NIOS2_LO16);
++
++ }
++}
++
++/*
++ Function md_chars_to_number takes the sequence of
++ bytes in bug and returns the corresponding value
++ in an int. n must be 1, 2 or 4.
++ */
++valueT
++md_chars_to_number (char *buf, int n)
++{
++ // this assumes little endian format
++ int i;
++ valueT val;
++
++ assert (n == 1 || n == 2 || n == 4);
++
++ val = 0;
++ for (i = 0; i < n; ++i)
++ {
++ val = val | ((buf[i] & 0xff) << 8 * i);
++ }
++ return val;
++}
++
++
++/*
++ Function : void md_number_to_chars(char *buf, valueT val, int n)
++
++ Description : this function turns a C long int, short int or char
++ into the series of bytes that represent the number
++ on the target machine
++ */
++void
++md_number_to_chars (char *buf, valueT val, int n)
++{
++ /* this assumes little endian format */
++ int i;
++ assert (n == 1 || n == 2 || n == 4);
++ for (i = 0; i < n; ++i)
++ {
++ buf[i] = val & 0xFF;
++ val >>= 8;
++ }
++}
++
++/*
++ Function : void md_number_to_imm(char *buf, valueT val, int n)
++
++ Description : this function is identical to md_number_to_chars
++ */
++void
++md_number_to_imm (char *buf, valueT val, int n)
++{
++ md_number_to_chars (buf, val, n);
++}
++
++/*
++ Function : void md_number_to_disp(char *buf, valueT val, int n)
++
++ Description : this function is identical to md_number_to_chars
++ */
++void
++md_number_to_disp (char *buf, valueT val, int n)
++{
++ md_number_to_chars (buf, val, n);
++}
++
++/*
++ Function : void md_number_to_field(char *buf, valueT val, int n)
++
++ Description : this function is identical to md_number_to_chars
++ */
++void
++md_number_to_field (char *buf, valueT val, int n)
++{
++ md_number_to_chars (buf, val, n);
++}
++
++/*
++
++ Function : char * md_atof(int type, char *litP,int *sizeP)
++
++ Description :
++ Turn a string in input_line_pointer into a floating point constant
++ of type TYPE, and store the appropriate bytes in *LITP. The number
++ of LITTLENUMS emitted is stored in *SIZEP. An error message is
++ returned, or NULL on OK.
++
++ */
++
++char *
++md_atof (int type, char *litP, int *sizeP)
++{
++ int prec;
++ LITTLENUM_TYPE words[4];
++ char *t;
++ int i;
++
++ switch (type)
++ {
++ case 'f':
++ prec = 2;
++ break;
++ case 'd':
++ prec = 4;
++ break;
++ default:
++ *sizeP = 0;
++ return _("bad call to md_atof");
++ }
++
++ t = atof_ieee (input_line_pointer, type, words);
++ if (t)
++ input_line_pointer = t;
++
++ *sizeP = prec * 2;
++
++ /* little endian target */
++ for (i = prec - 1; i >= 0; i--)
++ {
++ md_number_to_chars (litP, (valueT) words[i], 2);
++ litP += 2;
++ }
++
++ return NULL;
++}
++
++
++
++int md_short_jump_size;
++int md_long_jump_size;
++
++void
++md_create_short_jump (char *result_ptr ATTRIBUTE_UNUSED,
++ addressT from_addr ATTRIBUTE_UNUSED,
++ addressT to_addr ATTRIBUTE_UNUSED,
++ fragS * frag ATTRIBUTE_UNUSED,
++ symbolS * to_symbol ATTRIBUTE_UNUSED)
++{
++ abort ();
++}
++
++void
++md_create_long_jump (char *ptr ATTRIBUTE_UNUSED,
++ addressT from_addr ATTRIBUTE_UNUSED,
++ addressT to_addr ATTRIBUTE_UNUSED,
++ fragS * frag ATTRIBUTE_UNUSED,
++ symbolS * to_symbol ATTRIBUTE_UNUSED)
++{
++ abort ();
++}
++
++int
++md_estimate_size_before_relax (fragS * fragp, segT segment ATTRIBUTE_UNUSED)
++{
++ /* we only support ELF targets */
++
++ switch (nios2_as_options.relax)
++ {
++ case relax_none:
++ case relax_section:
++ break;
++ case relax_all:
++ /* The NIOS2 linker performs relaxation so the assembler
++ always assumes the worst case, so that the linker can
++ replace with a better case if possible - this way, linker
++ relaxation can never cause a short branch to be out of range
++ */
++ while (nios2_relax_table[fragp->fr_subtype].rlx_more != 0)
++ fragp->fr_subtype = nios2_relax_table[fragp->fr_subtype].rlx_more;
++ break;
++ default:
++ abort ();
++ break;
++ }
++
++ /* return the estimated size of the frag */
++ return nios2_relax_table[fragp->fr_subtype].rlx_length;
++}
++
++
++void
++md_convert_frag (bfd * headers ATTRIBUTE_UNUSED, segT seg ATTRIBUTE_UNUSED,
++ fragS * fragp)
++{
++ unsigned char *buffer = fragp->fr_literal + fragp->fr_fix;
++ relax_substateT subtype = fragp->fr_subtype;
++ unsigned int growth = RELAX_SIZE (subtype);
++ unsigned int br_opcode, br_op_a, br_op_b;
++
++ switch (subtype)
++ {
++ case UBRANCH:
++ /* we just need to generate the fixup for the symbol and offset */
++ fix_new (fragp, fragp->fr_fix, 4, fragp->fr_symbol, fragp->fr_offset, 1,
++ BFD_RELOC_16_PCREL);
++ break;
++ case UJMP:
++ /* replace ubranch at fr_fix with :
++ movhi at, %hi(symbol+offset)
++ ori at, %lo(symbol+offset)
++ jmp at
++ */
++ md_number_to_chars (buffer, OP_MATCH_ORHI | 0x00400000, 4);
++ md_number_to_chars (buffer + 4, OP_MATCH_ORI | 0x08400000, 4);
++ md_number_to_chars (buffer + 8, OP_MATCH_JMP | 0x08000000, 4);
++ fix_new (fragp, fragp->fr_fix, 4, fragp->fr_symbol, fragp->fr_offset, 0,
++ BFD_RELOC_NIOS2_UJMP);
++ break;
++ case CBRANCH:
++ /* we just need to generate the fixup for the symbol and offset */
++ fix_new (fragp, fragp->fr_fix, 4, fragp->fr_symbol, fragp->fr_offset, 1,
++ BFD_RELOC_16_PCREL);
++ break;
++ case CJMP:
++ /* replace cbranch at fr_fix with :
++ b(opposite condition) r, s, skip
++ movhi at, %hi(symbol+offset)
++ ori at, %lo(symbol+offset)
++ jmp at
++ skip:
++ ...
++ */
++ br_opcode = md_chars_to_number (buffer, 4);
++
++ switch (br_opcode & OP_MASK_OP)
++ {
++ case OP_MATCH_BEQ:
++ br_opcode =
++ (br_opcode & ~OP_MASK_OP) | OP_MATCH_BNE | (12 << OP_SH_IMM16);
++ break;
++ case OP_MATCH_BNE:
++ br_opcode =
++ (br_opcode & ~OP_MASK_OP) | OP_MATCH_BEQ | (12 << OP_SH_IMM16);
++ break;
++ case OP_MATCH_BGE:
++ case OP_MATCH_BGEU:
++ case OP_MATCH_BLT:
++ case OP_MATCH_BLTU:
++ /* swap the operands */
++ br_op_a = (br_opcode & OP_MASK_RRT) << 5;
++ br_op_b = (br_opcode & OP_MASK_RRS) >> 5;
++ br_opcode =
++ (br_opcode & ~(OP_MASK_RRS | OP_MASK_RRT)) | br_op_a | br_op_b |
++ (12 << OP_SH_IMM16);
++ break;
++ default:
++ as_bad_where (fragp->fr_file, fragp->fr_line,
++ _("expecting conditional branch for relaxation\n"));
++ abort ();
++ }
++
++ md_number_to_chars (buffer, br_opcode, 4);
++ md_number_to_chars (buffer + 4, OP_MATCH_ORHI | 0x00400000, 4);
++ md_number_to_chars (buffer + 8, OP_MATCH_ORI | 0x08400000, 4);
++ md_number_to_chars (buffer + 12, OP_MATCH_JMP | 0x08000000, 4);
++ fix_new (fragp, fragp->fr_fix + 4, 4, fragp->fr_symbol,
++ fragp->fr_offset, 0, BFD_RELOC_NIOS2_CJMP);
++ break;
++ default:
++ as_bad_where (fragp->fr_file, fragp->fr_line,
++ _("can't relax instruction\n"));
++ abort ();
++ break;
++ }
++
++ fragp->fr_fix += growth;
++}
++
++
++/* round up section size */
++valueT
++md_section_align (asection * seg ATTRIBUTE_UNUSED, valueT size)
++{
++ /* I think byte alignment is fine here */
++ return size;
++}
++
++
++int
++nios2_force_relocation (fixS * fixp)
++{
++ if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
++ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY
++ || fixp->fx_r_type == BFD_RELOC_NIOS2_ALIGN)
++ return 1;
++
++ return 0;
++}
++
++/* nios2_fix_adjustable is called to see whether a reloc against a defined symbol
++ should be converted into a reloc against a section. */
++
++int
++nios2_fix_adjustable (fixS * fixp)
++{
++#ifdef OBJ_ELF
++ /* Prevent all adjustments to global symbols. */
++ if (OUTPUT_FLAVOR == bfd_target_elf_flavour
++ && (S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)))
++ return 0;
++#endif
++ if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
++ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
++ return 0;
++
++ return 1;
++}
++
++/*
++ nios2_frob_symbol is called in adjust_reloc_syms through the macro
++ tc_frob_symbol - it is used to remove *ABS* references from the
++ symbol table
++ */
++int
++nios2_frob_symbol (symbolS * symp)
++{
++ if ((OUTPUT_FLAVOR == bfd_target_elf_flavour
++ && (symp) == section_symbol (absolute_section))
++ || !S_IS_DEFINED (symp))
++ return 1;
++ else
++ return 0;
++}
++
++/*
++ The function tc_gen_reloc creates a relocation structure for the
++ fixup fixp, and returns a pointer to it. This structure is passed
++ to bfd_install_relocation so that it can be written to the object
++ file for linking
++*/
++arelent *
++tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
++{
++ arelent *reloc;
++ reloc = (arelent *) xmalloc (sizeof (arelent));
++ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
++ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
++
++ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
++ reloc->addend = fixp->fx_addnumber;
++ reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
++ if (reloc->howto == NULL)
++ {
++ as_bad_where (fixp->fx_file, fixp->fx_line,
++ _("can't represent relocation type %s"),
++ bfd_get_reloc_code_name (fixp->fx_r_type));
++
++ /* Set howto to a garbage value so that we can keep going. */
++ reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
++ assert (reloc->howto != NULL);
++ }
++ return reloc;
++}
++
++long
++md_pcrel_from (fixS * fixP ATTRIBUTE_UNUSED)
++{
++ return 0;
++}
++
++
++/* Apply a fixup to the object file. */
++void
++md_apply_fix3 (fixS * fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
++{
++ const struct nios2_opcode *opcode;
++ enum overflow_type overflow_msg_type;
++ bfd_boolean overflowed = FALSE;
++ valueT fixup = 0;
++
++ /* assert that the fixup is one we can handle */
++ assert (fixP != NULL && valP != NULL &&
++ (fixP->fx_r_type == BFD_RELOC_8 ||
++ fixP->fx_r_type == BFD_RELOC_16 ||
++ fixP->fx_r_type == BFD_RELOC_32 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_S16 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_U16 ||
++ fixP->fx_r_type == BFD_RELOC_16_PCREL ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_CALL26 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_IMM5 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_CACHE_OPX ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_IMM6 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_IMM8 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_HI16 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_LO16 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_HIADJ16 ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_GPREL ||
++ fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT ||
++ fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_UJMP ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_CJMP ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_CALLR ||
++ fixP->fx_r_type == BFD_RELOC_NIOS2_ALIGN
++ // add other relocs here as we generate them
++ ));
++
++
++ /* The value passed in valP can be the value of a fully
++ resolved expression, or it can be the value of a partially
++ resolved expression. In the former case, both fixP->fx_addsy
++ and fixP->fx_subsy are NULL, and fixP->fx_offset == *valP, and
++ we can fix up the instruction that fixP relates to.
++ In the latter case, one or both of fixP->fx_addsy and
++ fixP->fx_subsy are not NULL, and fixP->fx_offset may or may not
++ equal *valP. We don't need to check for fixP->fx_subsy being null
++ because the generic part of the assembler generates an error if
++ it is not an absolute symbol */
++
++ if (fixP->fx_addsy != NULL)
++ {
++ fixP->fx_addnumber = fixP->fx_offset;
++ fixP->fx_done = 0;
++ }
++ else
++ {
++ valueT value;
++
++ char *buf;
++ reloc_howto_type *howto;
++ howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
++
++ if (howto == NULL)
++ {
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _("relocation is not supported"));
++ }
++ else
++ {
++ fixup += *valP;
++
++ /* If this is a pc-relative relocation, we need to
++ subtract the current offset within the object file
++ FIXME : for some reason fixP->fx_pcrel isn't 1 when it should be
++ so I'm using the howto structure instead to determine this */
++ if (howto->pc_relative == 1)
++ fixup = fixup - (fixP->fx_frag->fr_address + fixP->fx_where + 4);
++
++
++
++ /* Get the instruction to be fixed up */
++ buf = fixP->fx_frag->fr_literal + fixP->fx_where;
++ value = md_chars_to_number (buf, 4);
++
++ /* What opcode is the instruction? This will determine
++ whether we check for overflow in immediate values
++ and what error message we get */
++ opcode = nios2_find_opcode_hash (value);
++ overflow_msg_type = opcode->overflow_msg;
++
++ overflowed = nios2_check_overflow (fixup, howto);
++
++
++ if (overflowed)
++ {
++ unsigned int range_min;
++ unsigned int range_max;
++ unsigned int address;
++ switch (overflow_msg_type)
++ {
++ case call_target_overflow:
++ range_min =
++ ((fixP->fx_frag->fr_address +
++ fixP->fx_where) & 0xf0000000);
++ range_max = range_min + 0x0fffffff;
++ address = fixup | range_min;
++
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[call_target_overflow]),
++ address, range_min, range_max);
++ break;
++ case branch_target_overflow:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[branch_target_overflow]),
++ fixup, BYTE_B, BYTE_F);
++ break;
++ case address_offset_overflow:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[address_offset_overflow]),
++ opcode->name, fixup, -32768, 32767);
++ break;
++ case signed_immed16_overflow:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[signed_immed16_overflow]),
++ fixup, -32768, 32767);
++ break;
++ case unsigned_immed16_overflow:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[unsigned_immed16_overflow]),
++ fixup, 0, 65535);
++ break;
++ case unsigned_immed5_overflow:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[unsigned_immed5_overflow]),
++ fixup, 0, 31);
++ break;
++ case custom_opcode_overflow:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _(overflow_msgs[custom_opcode_overflow]),
++ fixup, 0, 255);
++ break;
++ default:
++ as_bad_where (fixP->fx_file, fixP->fx_line,
++ _
++ ("unspecified overflow in immediate argument"));
++ break;
++ }
++ }
++
++
++ /* apply the rightshift */
++ (signed) fixup >>= howto->rightshift;
++
++ /* truncate the fixup to right size */
++ switch (fixP->fx_r_type)
++ {
++ case BFD_RELOC_NIOS2_HI16:
++ fixup = (fixup >> 16) & 0xFFFF;
++ break;
++ case BFD_RELOC_NIOS2_LO16:
++ fixup = fixup & 0xFFFF;
++ break;
++ case BFD_RELOC_NIOS2_HIADJ16:
++ fixup = ((fixup >> 16) & 0xFFFF) + ((fixup >> 15) & 0x01);
++ break;
++ default:
++ fixup =
++ (fixup << (32 - howto->bitsize)) >> (32 - howto->bitsize);
++ break;
++ }
++
++ /* fixup the instruction */
++ value = (value & ~howto->dst_mask) | (fixup << howto->bitpos);
++ md_number_to_chars (buf, value, 4);
++ }
++
++ fixP->fx_done = 1;
++ }
++
++ if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT)
++ {
++ fixP->fx_done = 0;
++ if (fixP->fx_addsy
++ && !S_IS_DEFINED (fixP->fx_addsy) && !S_IS_WEAK (fixP->fx_addsy))
++ S_SET_WEAK (fixP->fx_addsy);
++ }
++ else if (fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
++ {
++ fixP->fx_done = 0;
++ }
++}
++
++bfd_boolean
++nios2_check_overflow (valueT fixup, reloc_howto_type * howto)
++{
++ /* apply the rightshift before checking for overflow */
++ (signed) fixup >>= howto->rightshift;
++
++ /* check for overflow - return TRUE if overflow, FALSE if not */
++ switch (howto->complain_on_overflow)
++ {
++ case complain_overflow_dont:
++ break;
++ case complain_overflow_bitfield:
++ if ((fixup >> howto->bitsize) != 0)
++ return TRUE;
++ break;
++ case complain_overflow_signed:
++ if ((fixup & 0x80000000) > 0)
++ {
++ /* check for negative overflow */
++ if ((signed) fixup < ((signed) 0x80000000 >> howto->bitsize))
++ return TRUE;
++ }
++ else
++ {
++ /* check for positive overflow */
++ if (fixup >= ((unsigned) 1 << (howto->bitsize - 1)))
++ return TRUE;
++ }
++ break;
++ case complain_overflow_unsigned:
++ if ((fixup >> howto->bitsize) != 0)
++ return TRUE;
++ break;
++ default:
++ as_bad (_("error checking for overflow - broken assembler"));
++ break;
++ }
++
++ return FALSE;
++}
++
++/*
++ Function : void md_end()
++ Description : Called just before the assembler exits
++ */
++void
++md_end ()
++{
++ /* FIXME - not yet implemented */
++}
++
++
++/*
++ Creates a new nios2_insn_relocS and returns a pointer to it
++*/
++nios2_insn_relocS *
++nios2_insn_reloc_new (bfd_reloc_code_real_type reloc_type, unsigned int pcrel)
++{
++ nios2_insn_relocS *retval;
++ retval = (nios2_insn_relocS *) malloc (sizeof (nios2_insn_relocS));
++ if (retval == NULL)
++ {
++ as_bad (_("can't create relocation"));
++ abort ();
++ }
++
++ /* fill out the fields with default values */
++ retval->reloc_next = NULL;
++ retval->reloc_type = reloc_type;
++ retval->reloc_pcrel = pcrel;
++ return retval;
++}
++
++/*
++ Frees up memory previously allocated by nios2_insn_reloc_new()
++ */
++void
++nios2_insn_reloc_destroy (nios2_insn_relocS * reloc)
++{
++ assert (reloc != NULL);
++ free (reloc);
++}
++
++/*
++ Function : nios2_assemble_expression(char* exprstr)
++
++ Description : The various nios2_assemble_* functions call this
++ function to generate an expression from a
++ string representing an expression
++ It then tries to evaluate the expression, and
++ if it can, returns its value.
++ If not, it creates a new nios2_insn_relocS
++ and stores the expression and reloc_type
++ for future use
++ */
++unsigned long
++nios2_assemble_expression (const char *exprstr,
++ nios2_insn_infoS * insn,
++ nios2_insn_relocS * prev_reloc,
++ bfd_reloc_code_real_type reloc_type,
++ unsigned int pcrel)
++{
++ nios2_insn_relocS *reloc;
++ char *saved_line_ptr;
++ unsigned short value;
++ int i;
++
++ assert (exprstr != NULL);
++ assert (insn != NULL);
++
++ /* check for %gprel, %hi, %lo or %hiadj
++ change the relocation type
++ and advance the ptr to the start of
++ the expression proper */
++ for (i = 0; i < nios2_num_special_relocs; i++)
++ {
++ if (strstr (exprstr, nios2_special_reloc[i].string) != NULL)
++ {
++ reloc_type = nios2_special_reloc[i].reloc_type;
++ exprstr += strlen (nios2_special_reloc[i].string) + 1;
++ break;
++ }
++ }
++
++ /* we potentially have a relocation */
++ reloc = nios2_insn_reloc_new (reloc_type, pcrel);
++ if (prev_reloc != NULL)
++ prev_reloc->reloc_next = reloc;
++ else
++ insn->insn_reloc = reloc;
++
++ /* parse the expression string */
++ saved_line_ptr = input_line_pointer;
++ input_line_pointer = (char *) exprstr;
++ expression (&reloc->reloc_expression);
++ input_line_pointer = saved_line_ptr;
++
++ /* this is redundant as the fixup will put this into
++ the instruction, but it is included here so that
++ self-test mode (-r) works */
++ value = 0;
++ if (nios2_mode == NIOS2_MODE_TEST)
++ {
++ if (reloc->reloc_expression.X_op == O_constant)
++ value = reloc->reloc_expression.X_add_number;
++ }
++
++ return (unsigned long) value;
++}
++
++/*
++ The function consume_separate takes a pointer into a string
++ of instruction tokens (args) and a pointer into a string representing
++ the expected sequence of tokens and separators. It finds the first
++ instance of the character pointed to by separator in argStr, and
++ returns a pointer to the next element of argStr, which is the
++ following token in the sequence.
++ */
++char *
++nios2_consume_separator (char *argStr, const char *separator)
++{
++ char *argPtr;
++
++ /* if we have a opcode reg, expr(reg) type instruction, and
++ * we are separating the expr from the (reg), we find the last
++ * (, just in case the expression has brackets */
++
++ if (*separator == '(')
++ argPtr = strrchr (argStr, *separator);
++ else
++ argPtr = strchr (argStr, *separator);
++
++ if (argPtr != NULL)
++ *argPtr++ = 0;
++ else
++ as_bad (_("expecting %c near %s"), *separator, argStr);
++ return argPtr;
++}
++
++/*
++ The function consume_arg takes a pointer into a string
++ of instruction tokens (args) and a pointer into a string
++ representing the expected sequence of tokens and separators.
++ It checks whether the first argument in argStr is of the
++ expected type, throwing an error if it is not, and returns
++ the pointer argStr.
++ */
++char *
++nios2_consume_arg (char *argStr, const char *argType)
++{
++ char *temp;
++ int regno = -1;
++
++ switch (*argType)
++ {
++ case 'c':
++ if (strncmp (argStr, "ctl", strlen ("ctl")) != 0
++ && strncmp (argStr, "status", strlen ("status")) != 0
++ && strncmp (argStr, "estatus", strlen ("estatus")) != 0
++ && strncmp (argStr, "bstatus", strlen ("bstatus")) != 0
++ && strncmp (argStr, "ienable", strlen ("ienable")) != 0
++ && strncmp (argStr, "ipending", strlen ("ipending")) != 0)
++ {
++ as_bad (_("expecting control register"));
++ }
++ break;
++ case 'd':
++ case 's':
++ case 't':
++
++ /* we check to make sure we don't have a control register */
++ if (strncmp (argStr, "ctl", strlen ("ctl")) == 0
++ || strncmp (argStr, "status", strlen ("status")) == 0
++ || strncmp (argStr, "estatus", strlen ("estatus")) == 0
++ || strncmp (argStr, "bstatus", strlen ("bstatus")) == 0
++ || strncmp (argStr, "ienable", strlen ("ienable")) == 0
++ || strncmp (argStr, "ipending", strlen ("ipending")) == 0)
++ {
++ as_bad (_("illegal use of control register"));
++ }
++
++ /* and whether coprocessor registers are valid here */
++ if (nios2_coproc_reg (argStr)
++ && insn.insn_nios2_opcode->match != OP_MATCH_CUSTOM)
++ {
++ as_bad (_("illegal use of coprocessor register\n"));
++ }
++
++
++ /* extract a register number if the register is of the
++ form r[0-9]+, if it is a normal register, set
++ regno to its number (0-31), else set regno to -1 */
++ if (argStr[0] == 'r' && ISDIGIT (argStr[1]))
++ {
++ char *p = argStr;
++
++ ++p;
++ regno = 0;
++ do
++ {
++ regno *= 10;
++ regno += *p - '0';
++ ++p;
++ }
++ while (ISDIGIT (*p));
++ }
++ else
++ {
++ regno = -1;
++ }
++
++ /* and whether we are using at */
++ if (!nios2_as_options.noat
++ && (regno == 1
++ || strncmp (argStr, "at", strlen ("at")) == 0))
++ {
++ as_warn (_("Register at (r1) can sometimes be corrupted by assembler optimizations.\n"
++ "Use .set noat to turn off those optimizations (and this warning)."));
++ }
++
++ /* and whether we are using oci registers */
++ if (!nios2_as_options.nobreak
++ && (regno == 25
++ || strncmp (argStr, "bt", strlen ("bt")) == 0))
++ {
++ as_warn (_("The debugger will corrupt bt (r25). If you don't need to debug this\n"
++ "code then use .set nobreak to turn off this warning."));
++ }
++
++ if (!nios2_as_options.nobreak
++ && (regno == 30
++ || strncmp (argStr, "ba", strlen ("ba")) == 0))
++ {
++ as_warn (_("The debugger will corrupt ba (r30). If you don't need to debug this\n"
++ "code then use .set nobreak to turn off this warning."));
++ }
++ break;
++ case 'i':
++ case 'u':
++ if (*argStr == '%')
++ {
++ if (strstr (argStr, "%hi(") || strstr (argStr, "%lo(")
++ || strstr (argStr, "%hiadj(") || strstr (argStr, "%gprel("))
++ {
++ // we zap the brackets because we don't want them confused with separators
++ temp = strchr (argStr, '(');
++ if (temp != NULL)
++ *temp = ' ';
++ temp = strchr (argStr, ')');
++ if (temp != NULL)
++ *temp = ' ';
++ }
++ else
++ {
++ as_bad (_("badly formed expression near %s"), argStr);
++ }
++ }
++ break;
++ case 'm':
++ case 'j':
++ case 'k':
++ case 'l':
++ case 'b':
++ /* we can't have %hi, %lo or %hiadj here */
++ if (*argStr == '%')
++ as_bad (_("badly formed expression near %s"), argStr);
++ break;
++ default:
++ break;
++ }
++ return argStr;
++}
++
++/*
++ The principal argument parsing function which takes a string
++ representing the instruction arguments, and extracts the argument
++ tokens
++ */
++void
++nios2_parse_args (char *argStr, const char *parseStr, char **parsedArgs)
++{
++ char *p;
++ char *end = NULL;
++ int i;
++ p = argStr;
++ i = 0;
++ bfd_boolean terminate = FALSE;
++
++ /* This rest of this function is it too fragile and it mostly works,
++ therefore special case this one */
++ if (*parseStr == 0 && argStr != 0)
++ {
++ as_bad (_("too many arguments"));
++ parsedArgs[0] = NULL;
++ return;
++ }
++
++
++ while (p != NULL && !terminate && i < NIOS2_MAX_INSN_TOKENS)
++ {
++ parsedArgs[i] = nios2_consume_arg (p, parseStr);
++ ++parseStr;
++ if (*parseStr != '\0')
++ {
++ p = nios2_consume_separator (p, parseStr);
++ ++parseStr;
++ }
++ else
++ {
++ /* check that the argument string has no trailing arguments */
++ /* if we've got a %lo etc relocation, we've zapped the brackets with spaces */
++ if (strstr (p, "%lo") == p || strstr (p, "%hi") == p
++ || strstr (p, "%hiadj") == p || strstr (p, "%gprel") == p)
++ end = strpbrk (p, ",");
++ else
++ end = strpbrk (p, " ,");
++
++ if (end != NULL)
++ as_bad (_("too many arguments"));
++ }
++
++ if (*parseStr == '\0' || (p != NULL && *p == '\0'))
++ {
++ terminate = TRUE;
++ }
++ ++i;
++ }
++
++ parsedArgs[i] = NULL;
++
++ if (*parseStr != '\0' && insn.insn_nios2_opcode->match != OP_MATCH_BREAK)
++ as_bad (_("missing argument"));
++
++}
++
++
++/* checks whether the register name is a coprocessor
++ register - returns TRUE if it is, FALSE otherwise */
++
++static bfd_boolean
++nios2_coproc_reg (const char *reg_name)
++{
++ assert (reg_name != NULL);
++
++/* check that we do have a valid register name and that it is a
++ * coprocessor register
++ * it must begin with c, not be a control register, and be a valid
++ * register name */
++
++ if (strncmp (reg_name, "c", 1) == 0 &&
++ strncmp (reg_name, "ctl", strlen ("ctl")) != 0 &&
++ hash_find (nios2_reg_hash, reg_name) != NULL)
++ return TRUE;
++ else
++ return FALSE;
++}
++
++
++/*********************************************************************
++ Argument assemble functions
++
++ Description : All take an instruction argument string, and a pointer
++ to an instruction opcode. Upon return the insn_opcode
++ has the relevant fields filled in to represent the arg
++ string. The return value is NULL if successful, or
++ an error message if an error was detected
++ *********************************************************************/
++
++/* assembles register arguments "dst, src1, src2" */
++void
++nios2_assemble_args_dst (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *src1, *src2;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL && insn_info->insn_tokens[3] != NULL)
++ {
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ src1 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++ src2 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[3]);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (RRD, insn_info->insn_code, dst->index);
++
++ if (src1 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, src1->index);
++
++ if (src2 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[3]);
++ else
++ SET_INSN_FIELD (RRT, insn_info->insn_code, src2->index);
++
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[4]);
++ }
++}
++
++
++/* assembles arguments successfully parsed by nios2_parse_args_tsi */
++void
++nios2_assemble_args_tsi (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *src1;
++ unsigned int src2;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL && insn_info->insn_tokens[3] != NULL)
++ {
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ src1 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++ src2 =
++ nios2_assemble_expression (insn_info->insn_tokens[3], insn_info,
++ insn_info->insn_reloc, BFD_RELOC_NIOS2_S16,
++ 0);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (IRT, insn_info->insn_code, dst->index);
++
++ if (src1 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (IRS, insn_info->insn_code, src1->index);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, src2);
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[4]);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, 0);
++ }
++}
++
++
++/* assembles args successfully parsed by nios2_parse_args_tsu */
++void
++nios2_assemble_args_tsu (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *src1;
++ unsigned int src2;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL && insn_info->insn_tokens[3] != NULL)
++ {
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ src1 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++ src2 =
++ nios2_assemble_expression (insn_info->insn_tokens[3], insn_info,
++ insn_info->insn_reloc, BFD_RELOC_NIOS2_U16,
++ 0);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (IRT, insn_info->insn_code, dst->index);
++
++ if (src1 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (IRS, insn_info->insn_code, src1->index);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, src2);
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[4]);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, 0);
++ }
++}
++
++
++/* assembles args successfully parsed by nios2_parse_args_sti */
++void
++nios2_assemble_args_sto (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *src1;
++ unsigned int src2;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL && insn_info->insn_tokens[3] != NULL)
++ {
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ src1 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++ src2 =
++ nios2_assemble_expression (insn_info->insn_tokens[3], insn_info,
++ insn_info->insn_reloc, BFD_RELOC_16_PCREL,
++ 1);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (IRS, insn_info->insn_code, dst->index);
++
++ if (src1 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (IRT, insn_info->insn_code, src1->index);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, src2);
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[4]);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, 0);
++ }
++}
++
++
++void
++nios2_assemble_args_o (nios2_insn_infoS * insn_info)
++{
++ unsigned long immed;
++
++ if (insn_info->insn_tokens[1] != NULL)
++ {
++ immed =
++ nios2_assemble_expression (insn_info->insn_tokens[1], insn_info,
++ insn_info->insn_reloc, BFD_RELOC_16_PCREL,
++ 1);
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, immed);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[2]);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, 0);
++ }
++}
++
++
++void
++nios2_assemble_args_is (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *addr_src;
++ unsigned long immed;
++
++ if (insn_info->insn_tokens[1] != NULL && insn_info->insn_tokens[2] != NULL)
++ {
++ addr_src =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++
++ immed =
++ nios2_assemble_expression (insn_info->insn_tokens[1], insn_info,
++ insn_info->insn_reloc, BFD_RELOC_NIOS2_S16,
++ 0);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, immed);
++
++ if (addr_src == NULL)
++ as_bad (_("unknown base register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, addr_src->index);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[3]);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, 0);
++ }
++}
++
++
++void
++nios2_assemble_args_m (nios2_insn_infoS * insn_info)
++{
++ unsigned long immed;
++ if (insn_info->insn_tokens[1] != NULL)
++ {
++ immed =
++ nios2_assemble_expression (insn_info->insn_tokens[1], insn_info,
++ insn_info->insn_reloc,
++ BFD_RELOC_NIOS2_CALL26, 0);
++
++ SET_INSN_FIELD (IMM26, insn_info->insn_code, immed);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[2]);
++
++ SET_INSN_FIELD (IMM26, insn_info->insn_code, 0);
++ }
++}
++
++
++void
++nios2_assemble_args_s (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *src;
++
++ if (insn_info->insn_tokens[1] != NULL)
++ {
++ src =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++
++ if (src == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, src->index);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[2]);
++ }
++}
++
++
++void
++nios2_assemble_args_tis (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *addr_src, *dst;
++ unsigned long immed;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL && insn_info->insn_tokens[3] != NULL)
++ {
++
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ addr_src =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[3]);
++ immed =
++ nios2_assemble_expression (insn_info->insn_tokens[2], insn_info,
++ insn_info->insn_reloc, BFD_RELOC_NIOS2_S16,
++ 0);
++
++
++ if (addr_src == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[3]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, addr_src->index);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (RRT, insn_info->insn_code, dst->index);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, immed);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[4]);
++
++ SET_INSN_FIELD (IMM16, insn_info->insn_code, 0);
++ }
++}
++
++
++/* assemble rdctl dst, ctl */
++void
++nios2_assemble_args_dc (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *ctl;
++
++ if (insn_info->insn_tokens[1] != NULL && insn_info->insn_tokens[2] != NULL)
++ {
++ ctl =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++
++ if (ctl == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (RCTL, insn_info->insn_code, ctl->index);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (RRD, insn_info->insn_code, dst->index);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[3]);
++ }
++}
++
++
++/* assemble wrctl ctl, src */
++void
++nios2_assemble_args_cs (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *src, *ctl;
++
++ if (insn_info->insn_tokens[1] != NULL && insn_info->insn_tokens[2] != NULL)
++ {
++ ctl =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ src =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++
++ if (ctl == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else if (ctl->index == 4)
++ as_bad (_("ipending control register (ctl4) is read-only\n"));
++ else
++ SET_INSN_FIELD (RCTL, insn_info->insn_code, ctl->index);
++
++ if (src == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, src->index);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[3]);
++ }
++}
++
++
++
++void
++nios2_assemble_args_ldst (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *src1, *src2;
++ unsigned long custom_n;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL &&
++ insn_info->insn_tokens[3] != NULL && insn_info->insn_tokens[4] != NULL)
++ {
++#if 0 /* ??? Unused/half commented out code */
++ char *end_p;
++ /* custom_n = nios2_strtoul(insn_info->insn_tokens[1], &end_p); */
++#endif
++ custom_n =
++ nios2_assemble_expression (insn_info->insn_tokens[1], insn_info,
++ insn_info->insn_reloc,
++ BFD_RELOC_NIOS2_IMM8, 0);
++
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++ src1 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[3]);
++ src2 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[4]);
++
++ SET_INSN_FIELD (CUSTOM_N, insn_info->insn_code, custom_n);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (RRD, insn_info->insn_code, dst->index);
++
++ if (src1 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[3]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, src1->index);
++
++ if (src2 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[4]);
++ else
++ SET_INSN_FIELD (RRT, insn_info->insn_code, src2->index);
++
++ /* set or clear the bits to indicate whether coprocessor registers are used */
++ if (nios2_coproc_reg (insn_info->insn_tokens[2]))
++ SET_INSN_FIELD (CUSTOM_C, insn_info->insn_code, 0);
++ else
++ SET_INSN_FIELD (CUSTOM_C, insn_info->insn_code, 1);
++
++ if (nios2_coproc_reg (insn_info->insn_tokens[3]))
++ SET_INSN_FIELD (CUSTOM_A, insn_info->insn_code, 0);
++ else
++ SET_INSN_FIELD (CUSTOM_A, insn_info->insn_code, 1);
++
++ if (nios2_coproc_reg (insn_info->insn_tokens[4]))
++ SET_INSN_FIELD (CUSTOM_B, insn_info->insn_code, 0);
++ else
++ SET_INSN_FIELD (CUSTOM_B, insn_info->insn_code, 1);
++
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[5]);
++ }
++}
++
++
++void
++nios2_assemble_args_none (nios2_insn_infoS * insn_info ATTRIBUTE_UNUSED)
++{
++ // nothing to do
++}
++
++
++void
++nios2_assemble_args_dsj (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst, *src1;
++ unsigned int src2;
++
++ if (insn_info->insn_tokens[1] != NULL &&
++ insn_info->insn_tokens[2] != NULL && insn_info->insn_tokens[3] != NULL)
++ {
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++ src1 =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[2]);
++
++ // a 5-bit constant expression
++ src2 =
++ nios2_assemble_expression (insn_info->insn_tokens[3], insn_info,
++ insn_info->insn_reloc,
++ BFD_RELOC_NIOS2_IMM5, 0);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (RRD, insn_info->insn_code, dst->index);
++
++ if (src1 == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[2]);
++ else
++ SET_INSN_FIELD (RRS, insn_info->insn_code, src1->index);
++
++ SET_INSN_FIELD (IMM5, insn_info->insn_code, src2);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[4]);
++
++ SET_INSN_FIELD (IMM5, insn_info->insn_code, 0);
++ }
++}
++
++
++/* assembles register arguments "dst" */
++void
++nios2_assemble_args_d (nios2_insn_infoS * insn_info)
++{
++ struct nios2_reg *dst;
++
++ if (insn_info->insn_tokens[1] != NULL)
++ {
++ dst =
++ (struct nios2_reg *) hash_find (nios2_reg_hash,
++ insn_info->insn_tokens[1]);
++
++ if (dst == NULL)
++ as_bad (_("unknown register %s"), insn_info->insn_tokens[1]);
++ else
++ SET_INSN_FIELD (RRD, insn_info->insn_code, dst->index);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[2]);
++ }
++}
++
++/* assemble break op */
++void
++nios2_assemble_args_b (nios2_insn_infoS * insn_info)
++{
++ unsigned int imm5 = 0;
++
++ if (insn_info->insn_tokens[1] != NULL)
++ {
++ // a 5-bit constant expression
++ imm5 =
++ nios2_assemble_expression (insn_info->insn_tokens[1], insn_info,
++ insn_info->insn_reloc,
++ BFD_RELOC_NIOS2_IMM5, 0);
++
++ SET_INSN_FIELD (TRAP_IMM5, insn_info->insn_code, imm5);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[2]);
++ }
++
++ SET_INSN_FIELD (TRAP_IMM5, insn_info->insn_code, imm5);
++
++ NIOS2_CHECK_ASSEMBLY (insn_info->insn_code, insn_info->insn_tokens[2]);
++}
++
++/* Machine-dependent assembler directive handling follows */
++
++/*
++ .set sets assembler options eg noat/at and is also used
++ to set symbol values (.equ, .equiv )
++*/
++void
++s_nios2_set (int equiv)
++{
++ char *directive = input_line_pointer;
++ char delim = get_symbol_end ();
++ char *endline;
++ endline = input_line_pointer;
++ *endline = delim;
++
++ /* we only want to handle ".set XXX" if the
++ user has tried ".set XXX, YYY" they are not
++ trying a directive. This prevents
++ us from polluting the name space */
++
++ SKIP_WHITESPACE ();
++
++ if (is_end_of_line[(unsigned char) *input_line_pointer])
++ {
++ bfd_boolean done = FALSE;
++ *endline = 0;
++
++ if (!strcmp (directive, "noat"))
++ {
++ done = TRUE;
++ nios2_as_options.noat = TRUE;
++ }
++
++ if (!strcmp (directive, "at"))
++ {
++ done = TRUE;
++ nios2_as_options.noat = FALSE;
++ }
++
++ if (!strcmp (directive, "nobreak"))
++ {
++ done = TRUE;
++ nios2_as_options.nobreak = TRUE;
++ }
++
++ if (!strcmp (directive, "break"))
++ {
++ done = TRUE;
++ nios2_as_options.nobreak = FALSE;
++ }
++
++ if (!strcmp (directive, "norelax"))
++ {
++ done = TRUE;
++ nios2_as_options.relax = relax_none;
++ }
++ else if (!strcmp (directive, "relaxsection"))
++ {
++ done = TRUE;
++ nios2_as_options.relax = relax_section;
++ }
++ else if (!strcmp (directive, "relaxall"))
++ {
++ done = TRUE;
++ nios2_as_options.relax = relax_all;
++ }
++
++
++ if (done)
++ {
++ *endline = delim;
++ demand_empty_rest_of_line ();
++ return;
++ }
++ }
++
++
++ /* If we fall through to here, either we have ".set XXX, YYY"
++ or we have ".set XXX" where XXX is unknown or we have
++ a syntax error */
++ input_line_pointer = directive;
++ *endline = delim;
++ s_set (equiv);
++}
++
++/* nop fill pattern for text section */
++static char const nop[4] = { 0x3a, 0x88, 0x01, 0x00 };
++
++/* nios2_frob_label() is called when after a label is recognized. */
++
++void
++nios2_frob_label (symbolS * lab)
++{
++ /* Update the label's address with the current output pointer. */
++ symbol_set_frag (lab, frag_now);
++ S_SET_VALUE (lab, (valueT) frag_now_fix ());
++
++ /* Record this label for future adjustment after we find out what
++ kind of data it references, and the required alignment therewith. */
++ nios2_last_label = lab;
++}
++
++
++
++/* Hook into cons for auto-alignment. */
++
++void
++nios2_cons_align (int size)
++{
++ int log_size;
++ const char *pfill = NULL;
++
++ log_size = 0;
++ while ((size >>= 1) != 0)
++ ++log_size;
++
++ if (subseg_text_p (now_seg))
++ {
++ pfill = (const char *) &nop;
++ }
++ else
++ pfill = NULL;
++
++ if (nios2_auto_align_on)
++ nios2_align (log_size, pfill, NULL);
++
++ nios2_last_label = NULL;
++}
++
++static void
++s_nios2_sdata (int ignore ATTRIBUTE_UNUSED)
++{
++ int temp;
++
++ temp = get_absolute_expression ();
++ subseg_new (".sdata", 0);
++ demand_empty_rest_of_line ();
++}
++
++/* Map 's' to SHF_NIOS2_GPREL. */
++/* this is from the Alpha code tc-alpha.c */
++int
++nios2_elf_section_letter (int letter, char **ptr_msg)
++{
++ if (letter == 's')
++ return SHF_NIOS2_GPREL;
++
++ *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S,G,T in string");
++ return 0;
++}
++
++/* Map SHF_ALPHA_GPREL to SEC_SMALL_DATA. */
++/* this is from the Alpha code tc-alpha.c */
++flagword
++nios2_elf_section_flags (flagword flags, int attr, int type ATTRIBUTE_UNUSED)
++{
++ if (attr & SHF_NIOS2_GPREL)
++ flags |= SEC_SMALL_DATA;
++ return flags;
++}
++
++/* explicitly unaligned cons */
++
++static void
++s_nios2_ucons (int nbytes)
++{
++ int hold;
++ hold = nios2_auto_align_on;
++ nios2_auto_align_on = 0;
++ cons (nbytes);
++ nios2_auto_align_on = hold;
++}
++
++/* Handles all machine-dependent alignment needs */
++static void
++nios2_align (int log_size, const char *pfill, symbolS * label)
++{
++ int align;
++ long max_alignment = 15;
++
++ /* The front end is prone to changing segments out from under us
++ temporarily when -g is in effect. */
++ int switched_seg_p = (nios2_current_align_seg != now_seg);
++
++ align = log_size;
++ if (align > max_alignment)
++ {
++ align = max_alignment;
++ as_bad (_("Alignment too large: %d. assumed"), align);
++ }
++ else if (align < 0)
++ {
++ as_warn (_("Alignment negative: 0 assumed"));
++ align = 0;
++ }
++
++ if (align != 0)
++ {
++ if (subseg_text_p (now_seg) && align >= 2)
++ {
++ /* First, make sure we're on a four-byte boundary, in case
++ someone has been putting .byte values the text section. */
++ if (nios2_current_align < 2 || switched_seg_p)
++ frag_align (2, 0, 0);
++
++ /* now fill in the alignment pattern */
++ if (pfill != NULL)
++ frag_align_pattern (align, pfill, sizeof nop, 0);
++ else
++ frag_align (align, 0, 0);
++ }
++ else
++ {
++ frag_align (align, 0, 0);
++ }
++
++ if (!switched_seg_p)
++ nios2_current_align = align;
++
++ /* If the last label was in a different section we can't align it */
++ if (label != NULL && !switched_seg_p)
++ {
++ symbolS *sym;
++ int label_seen = FALSE;
++ struct frag *old_frag;
++ valueT old_value;
++ valueT new_value;
++
++ assert (S_GET_SEGMENT (label) == now_seg);
++
++ old_frag = symbol_get_frag (label);
++ old_value = S_GET_VALUE (label);
++ new_value = (valueT) frag_now_fix ();
++
++ /* It is possible to have more than one label at a particular
++ address, especially if debugging is enabled, so we must
++ take care to adjust all the labels at this address in this
++ fragment. To save time we search from the end of the symbol
++ list, backwards, since the symbols we are interested in are
++ almost certainly the ones that were most recently added.
++ Also to save time we stop searching once we have seen at least
++ one matching label, and we encounter a label that is no longer
++ in the target fragment. Note, this search is guaranteed to
++ find at least one match when sym == label, so no special case
++ code is necessary. */
++ for (sym = symbol_lastP; sym != NULL; sym = symbol_previous (sym))
++ {
++ if (symbol_get_frag (sym) == old_frag
++ && S_GET_VALUE (sym) == old_value)
++ {
++ label_seen = TRUE;
++ symbol_set_frag (sym, frag_now);
++ S_SET_VALUE (sym, new_value);
++ }
++ else if (label_seen && symbol_get_frag (sym) != old_frag)
++ break;
++ }
++ }
++ record_alignment (now_seg, align);
++ }
++}
++
++/* This is called from HANDLE_ALIGN in tc-nios2.h. */
++
++void
++nios2_handle_align (fragS * fragp)
++{
++ /* If we are expecting to relax in the linker, then we must output a relocation
++ * to tell the linker we are aligning code */
++ if (nios2_as_options.relax == relax_all
++ && (fragp->fr_type == rs_align
++ || fragp->fr_type == rs_align_code)
++ && fragp->fr_address + fragp->fr_fix > 0
++ && fragp->fr_offset > 1 && now_seg != bss_section)
++ fix_new (fragp, fragp->fr_fix, 4, &abs_symbol, fragp->fr_offset, 0,
++ BFD_RELOC_NIOS2_ALIGN);
++
++}
++
++/* Handle the .align pseudo-op. This aligns to a power of two. It
++ also adjusts any current instruction label. We treat this the same
++ way the MIPS port does: .align 0 turns off auto alignment. */
++
++static void
++s_nios2_align (int ignore ATTRIBUTE_UNUSED)
++{
++ int align;
++ char fill;
++ const char *pfill = NULL;
++ long max_alignment = 15;
++
++
++ align = get_absolute_expression ();
++ if (align > max_alignment)
++ {
++ align = max_alignment;
++ as_bad (_("Alignment too large: %d. assumed"), align);
++ }
++ else if (align < 0)
++ {
++ as_warn (_("Alignment negative: 0 assumed"));
++ align = 0;
++ }
++
++ if (*input_line_pointer == ',')
++ {
++ input_line_pointer++;
++ fill = get_absolute_expression ();
++ pfill = (const char *) &fill;
++ }
++ else if (subseg_text_p (now_seg))
++ {
++ pfill = (const char *) &nop;
++ }
++ else
++ {
++ pfill = NULL;
++ nios2_last_label = NULL;
++ }
++
++ if (align != 0)
++ {
++ nios2_auto_align_on = 1;
++ nios2_align (align, pfill, nios2_last_label);
++ nios2_last_label = NULL;
++ }
++ else
++ {
++ nios2_auto_align_on = 0;
++ }
++
++ demand_empty_rest_of_line ();
++}
++
++
++/* Handle the .text pseudo-op. This is like the usual one, but it
++ clears the saved last label and resets known alignment. */
++
++static void
++s_nios2_text (int i)
++{
++ s_text (i);
++ nios2_last_label = NULL;
++ nios2_current_align = 0;
++ nios2_current_align_seg = now_seg;
++}
++
++/* Handle the .data pseudo-op. This is like the usual one, but it
++ clears the saved last label and resets known alignment. */
++
++static void
++s_nios2_data (int i)
++{
++ s_data (i);
++ nios2_last_label = NULL;
++ nios2_current_align = 0;
++ nios2_current_align_seg = now_seg;
++}
++
++/* Handle the .section pseudo-op. This is like the usual one, but it
++ clears the saved last label and resets known alignment. */
++
++static void
++s_nios2_section (int ignore)
++{
++ obj_elf_section (ignore);
++ nios2_last_label = NULL;
++ nios2_current_align = 0;
++ nios2_current_align_seg = now_seg;
++}
+--- binutils-2.15/gas/config/tc-nios2.h 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/config/tc-nios2.h 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,98 @@
++/* tc-nios2.h -- header file for tc-nios2.c.
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++ This file is part of GAS.
++
++ GAS 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 2, or (at your option)
++ any later version.
++
++ GAS 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 GAS; see the file COPYING. If not, write to the Free
++ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++ 02111-1307, USA. */
++
++#ifndef TC_NIOS2
++#define TC_NIOS2
++
++
++#define TARGET_BYTES_BIG_ENDIAN 0
++
++#ifdef OBJ_ELF
++#define TARGET_FORMAT "elf32-littlenios2"
++#define TARGET_ARCH bfd_arch_nios2
++#endif
++
++/* An NIOS2 instruction consists of tokens and separator characters
++// the tokens are things like the instruction name (add, or jmp etc),
++// the register indices ($5, $7 etc), and constant expressions. The
++// separator characters are commas, brackets and space.
++// The instruction name is always separated from other tokens by a space
++// The maximum number of tokens in an instruction is 5 (the instruction name,
++// 3 arguments, and a 4th string representing the expected instructin opcode
++// after assembly. The latter is only used when the assemble is running in
++// self test mode, otherwise its presence will generate an error. */
++#define NIOS2_MAX_INSN_TOKENS 6
++
++/* There are no machine-specific operands so we #define this to nothing */
++#define md_operand(x)
++
++/* NG this may need to change when we look at implementing symbols */
++#define md_undefined_symbol(name) (0)
++
++/* function prototypes exported to rest of GAS */
++extern void md_assemble (char *op_str);
++extern void md_end (void);
++extern void md_begin (void);
++
++#define TC_FORCE_RELOCATION(fixp) nios2_force_relocation (fixp)
++extern int nios2_force_relocation (struct fix *);
++
++#define tc_fix_adjustable(fixp) nios2_fix_adjustable (fixp)
++extern int nios2_fix_adjustable (struct fix *);
++
++#define tc_frob_label(lab) nios2_frob_label(lab)
++extern void nios2_frob_label (symbolS *);
++
++#define tc_frob_symbol(symp, punt) punt = nios2_frob_symbol(symp) ? 1 : punt
++extern int nios2_frob_symbol (symbolS * symp);
++
++#define md_cons_align(nbytes) nios2_cons_align (nbytes)
++extern void nios2_cons_align (int);
++
++extern void md_convert_frag (bfd * headers, segT sec, fragS * fragP);
++
++/* When relaxing, we need to generate relocations for alignment
++ directives. */
++#define HANDLE_ALIGN(frag) nios2_handle_align (frag)
++extern void nios2_handle_align (fragS *);
++
++
++#define md_relax_frag nios2_relax_frag
++extern long nios2_relax_frag
++ (segT segment, fragS * fragP, long stretch);
++
++#ifdef OBJ_ELF
++#define ELF_TC_SPECIAL_SECTIONS \
++ { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_NIOS2_GPREL }, \
++ { ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_NIOS2_GPREL }, \
++ { ".lit4", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_NIOS2_GPREL }, \
++ { ".lit8", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_NIOS2_GPREL },
++
++/* Processor specific section directives */
++#define md_elf_section_letter nios2_elf_section_letter
++extern int nios2_elf_section_letter (int, char **);
++#define md_elf_section_flags nios2_elf_section_flags
++extern flagword nios2_elf_section_flags (flagword, int, int);
++#endif
++
++
++#endif // TC_NIOS2
+--- binutils-2.15/gas/configure 2004-05-17 21:36:07.000000000 +0200
++++ binutils-2.15-nios2/gas/configure 2005-05-17 12:20:13.000000000 +0200
+@@ -4173,6 +4173,7 @@ for this_target in $target $canon_target
+ m8*) cpu_type=m88k ;;
+ mips*el) cpu_type=mips endian=little ;;
+ mips*) cpu_type=mips endian=big ;;
++ nios2*|nios2*) cpu_type=nios2 ;;
+ or32*) cpu_type=or32 endian=big ;;
+ pjl*) cpu_type=pj endian=little ;;
+ pj*) cpu_type=pj endian=big ;;
+@@ -4439,6 +4440,7 @@ echo "$as_me: error: Unknown vendor for
+ mn10200-*-*) fmt=elf ;;
+ mn10300-*-*) fmt=elf ;;
+ msp430-*-*) fmt=elf ;;
++ nios2-*-*) fmt=elf ;;
+ openrisc-*-*) fmt=elf ;;
+ or32-*-rtems*) fmt=elf ;;
+ or32-*-coff) fmt=coff ;;
+@@ -4589,7 +4591,7 @@ _ACEOF
+ fi
+
+ case ${cpu_type}-${fmt} in
+- alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
++ alpha*-* | arm-* | i386-* | ia64*-* | mips-* | nios2-* | ns32k-* \
+ | pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
+ | *-elf | *-ecoff | *-som)
+ bfd_gas=yes ;;
+--- binutils-2.15/gas/configure.in 2004-05-17 21:36:07.000000000 +0200
++++ binutils-2.15-nios2/gas/configure.in 2005-05-17 12:20:13.000000000 +0200
+@@ -143,6 +143,7 @@ changequote([,])dnl
+ m8*) cpu_type=m88k ;;
+ mips*el) cpu_type=mips endian=little ;;
+ mips*) cpu_type=mips endian=big ;;
++ nios2*|nios2*) cpu_type=nios2 ;;
+ or32*) cpu_type=or32 endian=big ;;
+ pjl*) cpu_type=pj endian=little ;;
+ pj*) cpu_type=pj endian=big ;;
+@@ -400,6 +401,7 @@ changequote([,])dnl
+ mn10200-*-*) fmt=elf ;;
+ mn10300-*-*) fmt=elf ;;
+ msp430-*-*) fmt=elf ;;
++ nios2-*-*) fmt=elf ;;
+ openrisc-*-*) fmt=elf ;;
+ or32-*-rtems*) fmt=elf ;;
+ or32-*-coff) fmt=coff ;;
+@@ -539,7 +541,7 @@ changequote([,])dnl
+ fi
+
+ case ${cpu_type}-${fmt} in
+- alpha*-* | arm-* | i386-* | ia64*-* | mips-* | ns32k-* \
++ alpha*-* | arm-* | i386-* | ia64*-* | mips-* | nios2-* | ns32k-* \
+ | pdp11-* | ppc-* | sparc-* | strongarm-* | xscale-* \
+ | *-elf | *-ecoff | *-som)
+ bfd_gas=yes ;;
+--- binutils-2.15/gas/doc/Makefile.am 2004-01-05 23:16:05.000000000 +0100
++++ binutils-2.15-nios2/gas/doc/Makefile.am 2005-05-17 12:20:13.000000000 +0200
+@@ -24,6 +24,7 @@ asconfig.texi: $(CONFIG).texi
+ || cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
+
+ CPU_DOCS = \
++ c-nios2.texi \
+ c-a29k.texi \
+ c-alpha.texi \
+ c-arc.texi \
+--- binutils-2.15/gas/doc/Makefile.in 2004-05-17 21:36:11.000000000 +0200
++++ binutils-2.15-nios2/gas/doc/Makefile.in 2005-05-17 12:20:13.000000000 +0200
+@@ -213,6 +213,7 @@ POD2MAN = pod2man --center="GNU Developm
+ man_MANS = as.1
+ info_TEXINFOS = as.texinfo
+ CPU_DOCS = \
++ c-nios2.texi \
+ c-a29k.texi \
+ c-alpha.texi \
+ c-arc.texi \
+--- binutils-2.15/gas/doc/all.texi 2003-04-01 17:50:30.000000000 +0200
++++ binutils-2.15-nios2/gas/doc/all.texi 2005-05-17 12:20:13.000000000 +0200
+@@ -26,6 +26,7 @@
+
+ @c CPUs of interest
+ @c ================
++@set NIOSII
+ @set A29K
+ @set ALPHA
+ @set ARC
+--- binutils-2.15/gas/doc/as.texinfo 2004-01-09 03:34:04.000000000 +0100
++++ binutils-2.15-nios2/gas/doc/as.texinfo 2005-05-17 12:20:13.000000000 +0200
+@@ -238,6 +238,15 @@ gcc(1), ld(1), and the Info entries for
+ @c
+ @c Target dependent options are listed below. Keep the list sorted.
+ @c Add an empty line for separation.
++
++
++@ifset NIOSII
++@emph{Target Altera Nios II options:}
++ [@b{-relax-all}]
++ [@b{-relax-section}]
++ [@b{-no-relax}]
++@end ifset
++
+ @ifset A29K
+ @c am29k has no machine-dependent assembler options
+ @end ifset
+@@ -577,6 +586,21 @@ Standard input, or source files to assem
+
+ @end table
+
++@ifset NIOSII
++The following options are available when @value{AS} is configured for
++an Altera Nios II processor.
++
++@table @gcctabopt
++@item -relax-all
++Replace all branch and call instructions with @code{jmp} and @code{callr} sequences
++@item -relax-section
++Replace identified out of range branches with @code{jmp} sequences (default)
++@item -no-relax
++Do not replace any branches or calls
++@end table
++@end ifset
++
++
+ @ifset ARC
+ The following options are available when @value{AS} is configured for
+ an ARC processor.
+@@ -2035,6 +2059,9 @@ This means you may not nest these commen
+ @cindex line comment character
+ Anything from the @dfn{line comment} character to the next newline
+ is considered a comment and is ignored. The line comment character is
++@ifset NIOSII
++@samp{#} for the Altera Nios II family;
++@end ifset
+ @ifset A29K
+ @samp{;} for the AMD 29K family;
+ @end ifset
+@@ -3876,7 +3903,7 @@ is already a multiple of 8, no change is
+ first expression is the alignment request in words.
+
+ For other systems, including the i386 using a.out format, and the arm and
+-strongarm, it is the
++strongarm, and the Altera Nios II, it is the
+ number of low-order zero bits the location counter must have after
+ advancement. For example @samp{.align 3} advances the location
+ counter until it a multiple of 8. If the location counter is already a
+@@ -5864,6 +5891,9 @@ include details on any machine's instruc
+ subject, see the hardware manufacturer's manual.
+
+ @menu
++@ifset NIOSII
++* NiosII-Dependent:: Altera Nios II Dependent Features
++@end ifset
+ @ifset A29K
+ * AMD29K-Dependent:: AMD 29K Dependent Features
+ @end ifset
+@@ -5974,6 +6004,11 @@ subject, see the hardware manufacturer's
+ @c node and sectioning commands; hence the repetition of @chapter BLAH
+ @c in both conditional blocks.
+
++
++@ifset NIOSII
++@include c-nios2.texi
++@end ifset
++
+ @ifset A29K
+ @include c-a29k.texi
+ @end ifset
+--- binutils-2.15/gas/doc/c-nios2.texi 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/doc/c-nios2.texi 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,214 @@
++@c Copyright 2004
++@c This is part of the GAS manual.
++@c For copying conditions, see the file as.texinfo.
++@ifset GENERIC
++@page
++@node NiosII-Dependent
++@chapter Altera Nios II Dependent Features
++@end ifset
++@ifclear GENERIC
++@node Machine Dependencies
++@chapter ltera Nios II Dependent Features
++@end ifclear
++
++@cindex Altera Nios II support
++@cindex Nios support
++@cindex Nios II support
++@menu
++* Nios II Options:: Options
++* Nios II Syntax:: Syntax
++* Nios II Relocations:: Relocations
++* Nios II Directives:: Nios II Machine Directives
++* Nios II Opcodes:: Opcodes
++@end menu
++
++@node Nios II Options
++@section Options
++@cindex Nios II options
++@cindex options for Nios II
++
++@table @code
++
++@cindex @code{relax-all} command line option, Nios II
++@item -relax-all
++Replace all branch and call instructions with @code{jmp} and @code{callr} sequences
++
++@cindex @code{relax-section} command line option, Nios II
++@item -relax-section
++Replace identified out of range branches with @code{jmp} sequences (default)
++
++@cindex @code{no-relax} command line option, Nios II
++@item -no-relax
++Do not replace any branches or calls
++
++@end table
++
++
++@node Nios II Syntax
++@section Syntax
++@menu
++* Nios II Chars:: Special Characters
++@end menu
++
++
++@node Nios II Chars
++@subsection Special Characters
++
++@cindex line comment character, Nios II
++@cindex Nios II line comment character
++@samp{#} is the line comment character.
++
++@cindex line separator character, Nios II
++@cindex Nios II line separator character
++@samp{;} is the line separator character.
++
++
++@node Nios II Relocations
++@section Nios II Machine Relocations
++
++@cindex machine relocations, Nios II
++@cindex Nios II machine relocations
++
++@table @code
++@cindex @code{hiadj} directive, Nios II
++@item %hiadj(@var{expression})
++Extract the upper 16-bits of @var{expression} and add
++one if the 15th bit is set.
++
++The value of %hiadj is:
++((@var{expression} >> 16) & 0xffff) + ((@var{expression} >> 15) & 0x01).
++
++The intention of the @code{%hiadj} relocation is to be used with
++an @code{addi}, @code{ld} or @code{st} instructions
++along with a @code{%lo}.
++
++@smallexample
++movhi r2, %hiadj(symbol)
++addi r2, r2, %lo(symbol)
++@end smallexample
++
++@cindex @code{hi} directive, Nios II
++@item %hi(@var{expression})
++Extract the upper 16-bits of @var{expression}.
++
++
++@cindex @code{lo} directive, Nios II
++@item %lo(@var{expression})
++Extract the lower 16-bits of @var{expression}.
++
++
++@cindex @code{gprel} directive, Nios II
++@item %gprel(@var{expression})
++Subtract the value of the symbol @code{_gp} from
++@var{expression}.
++
++The intention of the @code{%gprel} relocation is
++to have a fast small area of memory which only
++takes a 16-bit immediate to access.
++
++@smallexample
++ .section .sdata
++fastint:
++ .int 123
++ .section .text
++ ldw r4, %gprel(fastint)(gp)
++@end smallexample
++
++
++@end table
++
++
++@node Nios II Directives
++@section Nios II Machine Directives
++
++@cindex machine directives, Nios II
++@cindex Nios II machine directives
++
++@table @code
++
++@cindex @code{align} directive, Nios II
++@item .align @var{expression} [, @var{expression}]
++This is the generic @var{.align} directive, however
++this aligns to a power of two.
++
++@cindex @code{half} directive, Nios II
++@item .half @var{expression}
++Create an aligned constant 2-bytes in size
++
++@cindex @code{word} directive, Nios II
++@item .word @var{expression}
++Create an aligned constant 4-bytes in size
++
++@cindex @code{dword} directive, Nios II
++@item .dword @var{expression}
++Create an aligned constant 8-bytes in size
++
++@cindex @code{2byte} directive, Nios II
++@item .2byte @var{expression}
++Create an un-aligned constant 2-bytes in size
++
++@cindex @code{4byte} directive, Nios II
++@item .4byte @var{expression}
++Create an un-aligned constant 4-bytes in size
++
++@cindex @code{8byte} directive, Nios II
++@item .8byte @var{expression}
++Create an un-aligned constant 8-bytes in size
++
++@cindex @code{16byte} directive, Nios II
++@item .16byte @var{expression}
++Create an un-aligned constant 16-bytes in size
++
++@cindex @code{set noat} directive, Nios II
++@item .set noat
++Allows assembly code to use @code{at} register without
++warning and macro or relaxation expansions will
++generate a warning.
++
++@cindex @code{set at} directive, Nios II
++@item .set at
++Assembly code using @code{at} register will generate
++warnings, and macro expansion and relaxation will be
++enabled.
++
++@cindex @code{set nobreak} directive, Nios II
++@item .set nobreak
++Allows assembly code to use @code{ba}, @code{bt},
++registers without warning.
++
++@cindex @code{set break} directive, Nios II
++@item .set break
++Turns warnings back on for using @code{ba}, @code{bt}
++registers.
++
++@cindex @code{set norelax} directive, Nios II
++@item .set norelax
++Do not replace any branches or calls.
++
++@cindex @code{set relaxsection} directive, Nios II
++@item .set relaxsection
++Replace identified out of range branches with
++@code{jmp} sequences (default).
++
++@cindex @code{set relaxall} directive, Nios II
++@item .set relaxsection
++Replace all branch and call instructions with
++@code{jmp} and @code{callr} sequences.
++
++@cindex @code{set} directive, Nios II
++@item .set @dots{}
++All other @code{.set} are the normal use.
++
++@end table
++
++@node Nios II Opcodes
++@section Opcodes
++
++@cindex Nios II opcodes
++@cindex opcodes for Nios II
++@code{@value{AS}} implements all the standard Nios II opcodes. No
++additional pseudo-instructions are needed on this family.
++
++For information on the Nios II machine instruction set, see the @cite{Nios II
++User's Manual}
++
+--- binutils-2.15/gas/testsuite/gas/macros/irp.s 1999-06-10 15:48:35.000000000 +0200
++++ binutils-2.15-nios2/gas/testsuite/gas/macros/irp.s 2005-05-17 12:20:13.000000000 +0200
+@@ -1,3 +1,4 @@
++ .set norelax
+ .irp param,1,2,3
+ .long foo\param
+ .endr
+--- binutils-2.15/gas/testsuite/gas/macros/rept.s 1999-06-10 15:48:39.000000000 +0200
++++ binutils-2.15-nios2/gas/testsuite/gas/macros/rept.s 2005-05-17 12:20:13.000000000 +0200
+@@ -1,3 +1,4 @@
++ .set norelax
+ .rept 3
+ .long foo1
+ .endr
+--- binutils-2.15/gas/testsuite/gas/macros/test2.s 2004-02-06 17:00:21.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/macros/test2.s 2005-05-17 12:20:13.000000000 +0200
+@@ -1,3 +1,4 @@
++ .set norelax
+ .macro m arg1 arg2 arg3
+ .long \arg1
+ .ifc ,\arg2\arg3
+--- binutils-2.15/gas/testsuite/gas/macros/test3.s 1999-06-10 15:48:44.000000000 +0200
++++ binutils-2.15-nios2/gas/testsuite/gas/macros/test3.s 2005-05-17 12:20:13.000000000 +0200
+@@ -1,3 +1,4 @@
++ .set norelax
+ .macro m arg1 arg2
+ \arg1
+ .exitm
+--- binutils-2.15/gas/testsuite/gas/nios2/add.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/add.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,16 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 add
++
++# Test the add instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> add r4,r4,r4
++0+0004 <[^>]*> addi r4,r4,32767
++0+0008 <[^>]*> addi r4,r4,-32768
++0+000c <[^>]*> addi r4,r4,0
++0+0010 <[^>]*> addi r4,r4,-1
++0+0014 <[^>]*> addi r4,r4,-1
++0+0018 <[^>]*> addi r4,r4,13398
++0+001c <[^>]*> nop
+--- binutils-2.15/gas/testsuite/gas/nios2/add.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/add.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,13 @@
++# Source file used to test the add and addi instructions.
++
++foo:
++ add r4,r4,r4
++ addi r4,r4,0x7fff
++ addi r4,r4,-0x8000
++ addi r4,r4,0x0
++ addi r4,r4,-0x01
++ subi r4,r4,0x01
++ addi r4,r4,0x3456
++
++# should disassemble to add r0,0,r0
++ nop
+--- binutils-2.15/gas/testsuite/gas/nios2/align_fill.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_fill.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,23 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 align_fill
++
++# Test the and macro.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> addi sp,sp,-8
++0+0004 <[^>]*> stw fp,4\(sp\)
++0+0008 <[^>]*> mov fp,sp
++0+000c <[^>]*> mov r3,zero
++0+0010 <[^>]*> nop
++0+0014 <[^>]*> nop
++0+0018 <[^>]*> nop
++0+001c <[^>]*> nop
++0+0020 <[^>]*> addi r3,r3,1
++0+0024 <[^>]*> cmplti r2,r3,100
++0+0028 <[^>]*> bne r2,zero,0+0020 <[^>*]*>
++0+002c <[^>]*> ldw fp,4\(sp\)
++0+0030 <[^>]*> addi sp,sp,8
++0+0034 <[^>]*> ret
++ ...
+--- binutils-2.15/gas/testsuite/gas/nios2/align_fill.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_fill.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,20 @@
++ .file "a.c"
++ .section .text
++ .align 3
++ .global x
++ .type x, @function
++x:
++ addi sp, sp, -8
++ stw fp, 4(sp)
++ mov fp, sp
++ mov r3, zero
++ .align 5
++.L6:
++ addi r3, r3, 1
++ cmplti r2, r3, 100
++ bne r2, zero, .L6
++ ldw fp, 4(sp)
++ addi sp, sp, 8
++ ret
++ .size x, .-x
++ .ident "GCC: (GNU) 3.3.3 (Altera Nios II 1.0 b302)"
+--- binutils-2.15/gas/testsuite/gas/nios2/align_text.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_text.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,22 @@
++#objdump: -dr
++#name: NIOS2 align_test
++
++# Test alignment in text sections.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++00000000 <label-0x20>:
++ 0: 00000000 call 0 <label-0x20>
++ 4: 0001883a nop
++ 8: 0001883a nop
++ c: 0001883a nop
++ 10: 0001883a nop
++ 14: 0001883a nop
++ 18: 0001883a nop
++ 1c: 0001883a nop
++
++00000020 <label>:
++ 20: 0001883a nop
++00000024 <label2>:
++ ...
+\ No newline at end of file
+--- binutils-2.15/gas/testsuite/gas/nios2/align_text.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/align_text.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,15 @@
++ .asciz "" # empty string
++ .align 2
++
++ nop
++ nop
++ label:
++ .align 5
++ nop
++ label2:
++ .section mysection
++ .align 2
++
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/and.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/and.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,17 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 and
++
++# Test the and macro.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> and r4,r4,r4
++0+0004 <[^>]*> andi r4,r4,32767
++0+0008 <[^>]*> andi r4,r4,32768
++0+000c <[^>]*> andi r4,r4,65535
++0+0010 <[^>]*> andi r4,r4,0
++0+0014 <[^>]*> andhi r4,r4,32767
++0+0018 <[^>]*> andhi r4,r4,32768
++0+001c <[^>]*> andhi r4,r4,65535
++0+0020 <[^>]*> andhi r4,r4,0
+--- binutils-2.15/gas/testsuite/gas/nios2/and.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/and.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,13 @@
++# Source file used to test the and, andhi and andi instructions
++
++foo:
++ and r4,r4,r4
++ andi r4,r4,0x7fff
++ andi r4,r4,0x8000
++ andi r4,r4,0xffff
++ andi r4,r4,0x0
++ andhi r4,r4,0x7fff
++ andhi r4,r4,0x8000
++ andhi r4,r4,0xffff
++ andhi r4,r4,0x0
++
+\ No newline at end of file
+--- binutils-2.15/gas/testsuite/gas/nios2/blt.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/blt.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1 @@
++This file is obsolete
+\ No newline at end of file
+--- binutils-2.15/gas/testsuite/gas/nios2/blt.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/blt.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1 @@
++This file is obsolete
+\ No newline at end of file
+--- binutils-2.15/gas/testsuite/gas/nios2/branch.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/branch.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,16 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 branch
++
++# Test the branch instructions.
++dump.o: file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> beq r4,r5,00000000 <text_label>
++0+0004 <[^>]*> bge r4,r5,00000000 <text_label>
++0+0008 <[^>]*> bgeu r4,r5,00000000 <text_label>
++0+000c <[^>]*> blt r4,r5,00000000 <text_label>
++0+0010 <[^>]*> bltu r4,r5,00000000 <text_label>
++0+0014 <[^>]*> bne r4,r5,00000000 <text_label>
++0+0018 <[^>]*> br 0000001c <text_label\+0x1c>
++[ ]*18: R_NIOS2_PCREL16 external_label
++
+--- binutils-2.15/gas/testsuite/gas/nios2/branch.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/branch.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,15 @@
++# Source file used to test the beq macro.
++ .globl text_label
++ .text
++.set norelax
++text_label:
++ beq r4,r5,text_label
++ bge r4,r5,text_label
++ bgeu r4,r5,text_label
++ blt r4,r5,text_label
++ bltu r4,r5,text_label
++ bne r4,r5,text_label
++
++# Branch to an external label.
++ br external_label
++
+--- binutils-2.15/gas/testsuite/gas/nios2/break.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/break.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,12 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 break
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> break 0
++0+0004 <[^>]*> break 0
++0+0008 <[^>]*> break 31
++0+000c <[^>]*> break 14
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/break.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/break.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,8 @@
++# Source file used to test the 20-bit break instructions
++foo:
++ break
++ break 0
++ break 31
++ break 14
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/bret.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/bret.d 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,8 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 bret
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> bret
++
+--- binutils-2.15/gas/testsuite/gas/nios2/bret.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/bret.s 2005-05-17 12:20:13.000000000 +0200
+@@ -0,0 +1,5 @@
++# Source file used to test the bret instructions
++foo:
++ bret
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/cache.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cache.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,17 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 cache
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> flushd -32768\(r6\)
++0+0004 <[^>]*> flushd 32767\(r6\)
++0+0008 <[^>]*> flushd 0\(r6\)
++0+000c <[^>]*> flushd -1\(r6\)
++0+0010 <[^>]*> flushd 0\(r6\)
++[ ]*10: R_NIOS2_S16 .text
++0+0014 <[^>]*> flushd 0\(r6\)
++[ ]*14: R_NIOS2_S16 external
++0+0018 <[^>]*> flushi r2
++0+001c <[^>]*> flushp
++
+--- binutils-2.15/gas/testsuite/gas/nios2/cache.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cache.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,21 @@
++# Source file used to test the cache instruction
++foo:
++ flushd -0x8000(r6)
++ flushd 0x7fff(r6)
++ flushd 0x0(r6)
++ flushd -0x0001(r6)
++
++# use symbol for offset
++ flushd foo(r6)
++
++# use external symbol
++ .global external
++ flushd external(r6)
++
++# flushi
++ flushi r2
++
++#flushp
++ flushp
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/call.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/call.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++# objdump: -dr --prefix-addresses
++#name: NIOS2 call
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> call 00000000 <foo>
++[ ]*0: R_NIOS2_CALL26 .text\+0xc
++0+0004 <[^>]*> callr r10
++0+0008 <[^>]*> call 00000000 <foo>
++[ ]*8: R_NIOS2_CALL26 external
+--- binutils-2.15/gas/testsuite/gas/nios2/call.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/call.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,13 @@
++# Source file used to test the call and callr instructions
++.text
++.set norelax
++foo:
++ call func1
++ callr r10
++# use external symbol
++ .global external
++ call external
++func1:
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/cmp.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cmp.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,24 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 cmp
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> cmpeq r11,r2,r3
++0+0004 <[^>]*> cmpge r11,r2,r3
++0+0008 <[^>]*> cmpgeu r11,r2,r3
++0+000c <[^>]*> cmplt r11,r2,r3
++0+0010 <[^>]*> cmpltu r11,r2,r3
++0+0014 <[^>]*> cmpne r11,r2,r3
++0+0018 <[^>]*> cmpgei r11,r2,0
++[ ]*18: R_NIOS2_S16 value
++0+001c <[^>]*> cmpgeui r11,r2,0
++[ ]*1c: R_NIOS2_U16 value\+0x200
++0+0020 <[^>]*> cmplti r11,r2,0
++[ ]*20: R_NIOS2_S16 value
++0+0024 <[^>]*> cmpltui r11,r2,0
++[ ]*24: R_NIOS2_U16 value\+0x200
++0+0028 <[^>]*> cmpgei r11,r2,32767
++0+002c <[^>]*> cmpgeui r11,r2,32768
++0+0030 <[^>]*> cmplti r11,r2,-32768
++0+0034 <[^>]*> cmpltui r11,r2,65535
+\ No newline at end of file
+--- binutils-2.15/gas/testsuite/gas/nios2/cmp.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/cmp.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,22 @@
++# Source file used to test the compare instructions
++foo:
++ cmpeq r11,r2,r3
++ cmpge r11,r2,r3
++ cmpgeu r11,r2,r3
++ cmplt r11,r2,r3
++ cmpltu r11,r2,r3
++ cmpne r11,r2,r3
++# test that cmp generates relocations correctly
++ cmpgei r11,r2,value
++ cmpgeui r11,r2,value+0x200
++ cmplti r11,r2,value
++ cmpltui r11,r2,value+0x200
++
++ cmpgei r11,r2,0x7fff
++ cmpgeui r11,r2,0x8000
++ cmplti r11,r2,-0x8000
++ cmpltui r11,r2,0xFFFF
++.global value
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/comments.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/comments.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,26 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 comments
++
++# Test the add instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> br 0000001c <start>
++0+0004 <[^>]*> br 00000008 <abort>
++0+0008 <[^>]*> movui r3,0
++0+000c <[^>]*> movui r2,1
++0+0010 <[^>]*> movui r3,0
++0+0014 <[^>]*> movui r2,0
++0+0018 <[^>]*> br 00000044 <exit>
++0+001c <[^>]*> addi r2,r2,-4
++0+0020 <[^>]*> movui r11,1
++0+0024 <[^>]*> movui r5,0
++0+0028 <[^>]*> movui r6,0
++0+002c <[^>]*> br 00000030 <ldst>
++0+0030 <[^>]*> movui r2,61452
++0+0034 <[^>]*> movui r20,64206
++0+0038 <[^>]*> stw r20,0\(r2\)
++0+003c <[^>]*> ldw r21,0\(r2\)
++0+0040 <[^>]*> br 00000010 <end>
++0+0044 <[^>]*> br 00000044 <exit>
+--- binutils-2.15/gas/testsuite/gas/nios2/comments.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/comments.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,28 @@
++.set norelax
++_main: br start
++trap:
++ br abort
++.globl _main
++abort: movui r3, 0x0
++ movui r2, 0x1
++
++end: movui r3, 0x0
++ movui r2, 0x0
++ br exit
++
++start:
++ addi r2, r2, -4 # test for ve numbers
++ movui r11, 0x1
++ ori r5, r0, %lo(0x0) # r5 = 0x0
++ ori r6, r0, %lo(0x0) # r6 = 0x0
++ br ldst
++
++ldst:
++ movui r2, 0xF00C
++ movui r20, 0xFACE
++ stw r20,(r2)
++ ldw r21, (r2)
++ br end
++
++
++exit: br exit
+--- binutils-2.15/gas/testsuite/gas/nios2/complex.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/complex.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,12 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 complex
++
++# Test complex expression parsing
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> ldw r2,-1\(r3\)
++0+0004 <[^>]*> ldw r2,1\(r3\)
++0+0008 <[^>]*> ldw r2,0\(r3\)
++ 8: R_NIOS2_S16 stack_top\+0xffffffff
+--- binutils-2.15/gas/testsuite/gas/nios2/complex.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/complex.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++foo:
++ ldw r2, (2-3)(r3)
++ ldw r2, 2 + (2-3)(r3)
++ ldw r2, 2 + (stack_top-3)(r3)
++
+--- binutils-2.15/gas/testsuite/gas/nios2/ctl.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ctl.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,20 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 ctl
++
++# Test the ctl instructions
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> rdctl r8,ctl31
++0+0004 <[^>]*> rdctl r8,ctl30
++0+0008 <[^>]*> rdctl r8,ctl29
++0+000c <[^>]*> rdctl r8,status
++0+0010 <[^>]*> rdctl r8,bstatus
++0+0014 <[^>]*> rdctl r8,estatus
++0+0018 <[^>]*> wrctl ctl31,r8
++0+001c <[^>]*> wrctl ctl30,r8
++0+0020 <[^>]*> wrctl ctl29,r8
++0+0024 <[^>]*> wrctl status,r8
++0+0028 <[^>]*> wrctl bstatus,r8
++0+002c <[^>]*> wrctl estatus,r8
+--- binutils-2.15/gas/testsuite/gas/nios2/ctl.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ctl.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,18 @@
++# Source file used to test the nor instruction
++
++foo:
++ rdctl r8,ctl31
++ rdctl r8,ctl30
++ rdctl r8,ctl29
++ rdctl r8,status
++ rdctl r8,bstatus
++ rdctl r8,estatus
++ wrctl ctl31,r8
++ wrctl ctl30,r8
++ wrctl ctl29,r8
++ wrctl status,r8
++ wrctl bstatus,r8
++ wrctl estatus,r8
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/custom.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/custom.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,13 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 custom
++
++# Test the custom instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> custom 0,r11,r2,r3
++0+0004 <[^>]*> custom 255,r11,r2,r3
++0+0008 <[^>]*> custom 150,c1,r2,r3
++0+000c <[^>]*> custom 24,c1,c2,r3
++0+0010 <[^>]*> custom 56,c1,c2,c3
+--- binutils-2.15/gas/testsuite/gas/nios2/custom.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/custom.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++# test progam for assembling user instructions
++
++foo:
++ custom 0, r11, r2, r3
++ custom 255, r11, r2, r3
++ custom 150, c1, r2, r3
++ custom 0x18, c1, c2, r3
++ custom 070, c1, c2, c3
+--- binutils-2.15/gas/testsuite/gas/nios2/etbt.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/etbt.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 etbt
++
++# Test the et, bt registers
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> add et,bt,r6
++0+0004 <[^>]*> add et,bt,r6
+--- binutils-2.15/gas/testsuite/gas/nios2/etbt.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/etbt.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,4 @@
++.set nobreak
++foo:
++ add r24, r25, r6
++ add et, bt, r6
+--- binutils-2.15/gas/testsuite/gas/nios2/hilo_symbol.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/hilo_symbol.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,3 @@
++.global long_symbol
++.set long_symbol, 0xDEADBEEF
++
+--- binutils-2.15/gas/testsuite/gas/nios2/illegal.l 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/illegal.l 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,14 @@
++.*illegal.s: Assembler messages:
++.*illegal.s:5: Error: unknown register r56
++.*illegal.s:8: Error: expecting \( near 0x1000
++.*illegal.s:8: Error: missing argument
++.*illegal.s:9: Error: expecting \) near r5
++.*illegal.s:10: Error: expecting \( near 0x1000r5\)
++.*illegal.s:10: Error: missing argument
++.*illegal.s:11: Error: expecting \( near 0x1000,r5
++.*illegal.s:11: Error: missing argument
++.*illegal.s:12: Error: unknown register 0x1000
++.*illegal.s:14: Error: unrecognised instruction fop
++.*illegal.s:16: Error: too many arguments
++.*illegal.s:17: Error: too many arguments
++.*illegal.s:17: Error: unknown register r2,r4
+--- binutils-2.15/gas/testsuite/gas/nios2/illegal.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/illegal.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,17 @@
++# Source file used to test illegal operands.
++
++foo:
++# Illegal registers
++ add r3,r4,r56
++ add r4,r0,r2
++# Illegal syntax
++ ldw r4,0x1000
++ ldw r4,0x1000(r5
++ ldw r4,0x1000r5)
++ ldw r4,0x1000,r5
++ ldw r4,(0x1000)r5
++# Illegal opcodes
++ fop r3,r4,r5
++# Extra operands
++ nop Crapola
++ add r2, r2, r2, r4
+--- binutils-2.15/gas/testsuite/gas/nios2/imm5_symbol.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/imm5_symbol.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,4 @@
++.global imm5
++.text
++.byte imm5
++.set imm5, 31
+--- binutils-2.15/gas/testsuite/gas/nios2/jmp.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/jmp.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 jmp
++
++# Test the jmp instruction.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> jmp bt
++
+--- binutils-2.15/gas/testsuite/gas/nios2/jmp.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/jmp.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,6 @@
++# Source file used to test the jmp instruction.
++.text
++.set nobreak
++foo:
++ jmp r25
++
+--- binutils-2.15/gas/testsuite/gas/nios2/ldb.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldb.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,196 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 ldb
++
++# Test the ld instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> ldb r4,0\(zero\)
++0+0004 <[^>]*> ldb r4,4\(zero\)
++0+0008 <[^>]*> ldb r4,32764\(zero\)
++0+000c <[^>]*> ldb r4,-32768\(zero\)
++0+0010 <[^>]*> ldb r4,0\(r5\)
++0+0014 <[^>]*> ldb r4,4\(r5\)
++0+0018 <[^>]*> ldb r4,32764\(r5\)
++0+001c <[^>]*> ldb r4,-32768\(r5\)
++0+0020 <[^>]*> ldb r4,0\(zero\)
++[ ]*20: R_NIOS2_S16 .data
++0+0024 <[^>]*> ldb r4,0\(zero\)
++[ ]*24: R_NIOS2_S16 big_external_data_label
++0+0028 <[^>]*> ldb r4,0\(zero\)
++[ ]*28: R_NIOS2_S16 small_external_data_label
++0+002c <[^>]*> ldb r4,0\(zero\)
++[ ]*2c: R_NIOS2_S16 big_external_common
++0+0030 <[^>]*> ldb r4,0\(zero\)
++[ ]*30: R_NIOS2_S16 small_external_common
++0+0034 <[^>]*> ldb r4,0\(zero\)
++[ ]*34: R_NIOS2_S16 .bss
++0+0038 <[^>]*> ldb r4,0\(zero\)
++[ ]*38: R_NIOS2_S16 .bss\+0x4000
++0+003c <[^>]*> ldb r4,0\(zero\)
++[ ]*3c: R_NIOS2_S16 .data\+0x4
++0+0040 <[^>]*> ldb r4,0\(zero\)
++[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
++0+0044 <[^>]*> ldb r4,0\(zero\)
++[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
++0+0048 <[^>]*> ldb r4,0\(zero\)
++[ ]*48: R_NIOS2_S16 big_external_common\+0x4
++0+004c <[^>]*> ldb r4,0\(zero\)
++[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
++0+0050 <[^>]*> ldb r4,0\(zero\)
++[ ]*50: R_NIOS2_S16 .bss\+0x4
++0+0054 <[^>]*> ldb r4,0\(zero\)
++[ ]*54: R_NIOS2_S16 .bss\+0x4004
++0+0058 <[^>]*> ldb r4,0\(zero\)
++[ ]*58: R_NIOS2_S16 .data\+0xffff8000
++0+005c <[^>]*> ldb r4,0\(zero\)
++[ ]*5c: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0060 <[^>]*> ldb r4,0\(zero\)
++[ ]*60: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0064 <[^>]*> ldb r4,0\(zero\)
++[ ]*64: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0068 <[^>]*> ldb r4,0\(zero\)
++[ ]*68: R_NIOS2_S16 small_external_common\+0xffff8000
++0+006c <[^>]*> ldb r4,0\(zero\)
++[ ]*6c: R_NIOS2_S16 .bss\+0xffff8000
++0+0070 <[^>]*> ldb r4,0\(zero\)
++[ ]*70: R_NIOS2_S16 .bss\+0xffffc000
++0+0074 <[^>]*> ldb r4,0\(zero\)
++[ ]*74: R_NIOS2_S16 .data\+0x10000
++0+0078 <[^>]*> ldb r4,0\(r5\)
++[ ]*78: R_NIOS2_S16 .data
++0+007c <[^>]*> ldb r4,0\(r5\)
++[ ]*7c: R_NIOS2_S16 big_external_data_label
++0+0080 <[^>]*> ldb r4,0\(r5\)
++[ ]*80: R_NIOS2_S16 small_external_data_label
++0+0084 <[^>]*> ldb r4,0\(r5\)
++[ ]*84: R_NIOS2_S16 big_external_common
++0+0088 <[^>]*> ldb r4,0\(r5\)
++[ ]*88: R_NIOS2_S16 small_external_common
++0+008c <[^>]*> ldb r4,0\(r5\)
++[ ]*8c: R_NIOS2_S16 .bss
++0+0090 <[^>]*> ldb r4,0\(r5\)
++[ ]*90: R_NIOS2_S16 .bss\+0x4000
++0+0094 <[^>]*> ldb r4,0\(r5\)
++[ ]*94: R_NIOS2_S16 .data\+0x4
++0+0098 <[^>]*> ldb r4,0\(r5\)
++[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
++0+009c <[^>]*> ldb r4,0\(r5\)
++[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
++0+00a0 <[^>]*> ldb r4,0\(r5\)
++[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
++0+00a4 <[^>]*> ldb r4,0\(r5\)
++[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
++0+00a8 <[^>]*> ldb r4,0\(r5\)
++[ ]*a8: R_NIOS2_S16 .bss\+0x4
++0+00ac <[^>]*> ldb r4,0\(r5\)
++[ ]*ac: R_NIOS2_S16 .bss\+0x4004
++0+00b0 <[^>]*> ldb r4,0\(r5\)
++[ ]*b0: R_NIOS2_S16 .data\+0xffff8000
++0+00b4 <[^>]*> ldb r4,0\(r5\)
++[ ]*b4: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+00b8 <[^>]*> ldb r4,0\(r5\)
++[ ]*b8: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+00bc <[^>]*> ldb r4,0\(r5\)
++[ ]*bc: R_NIOS2_S16 big_external_common\+0xffff8000
++0+00c0 <[^>]*> ldb r4,0\(r5\)
++[ ]*c0: R_NIOS2_S16 small_external_common\+0xffff8000
++0+00c4 <[^>]*> ldb r4,0\(r5\)
++[ ]*c4: R_NIOS2_S16 .bss\+0xffff8000
++0+00c8 <[^>]*> ldb r4,0\(r5\)
++[ ]*c8: R_NIOS2_S16 .bss\+0xffffc000
++0+00cc <[^>]*> ldbio r4,0\(zero\)
++0+00d0 <[^>]*> ldbio r4,4\(zero\)
++0+00d4 <[^>]*> ldbio r4,32764\(zero\)
++0+00d8 <[^>]*> ldbio r4,-32768\(zero\)
++0+00dc <[^>]*> ldbio r4,0\(r5\)
++0+00e0 <[^>]*> ldbio r4,4\(r5\)
++0+00e4 <[^>]*> ldbio r4,32764\(r5\)
++0+00e8 <[^>]*> ldbio r4,-32768\(r5\)
++0+00ec <[^>]*> ldbio r4,0\(zero\)
++[ ]*ec: R_NIOS2_S16 .data
++0+00f0 <[^>]*> ldbio r4,0\(zero\)
++[ ]*f0: R_NIOS2_S16 big_external_data_label
++0+00f4 <[^>]*> ldbio r4,0\(zero\)
++[ ]*f4: R_NIOS2_S16 small_external_data_label
++0+00f8 <[^>]*> ldbio r4,0\(zero\)
++[ ]*f8: R_NIOS2_S16 big_external_common
++0+00fc <[^>]*> ldbio r4,0\(zero\)
++[ ]*fc: R_NIOS2_S16 small_external_common
++0+0100 <[^>]*> ldbio r4,0\(zero\)
++[ ]*100: R_NIOS2_S16 .bss
++0+0104 <[^>]*> ldbio r4,0\(zero\)
++[ ]*104: R_NIOS2_S16 .bss\+0x4000
++0+0108 <[^>]*> ldbio r4,0\(zero\)
++[ ]*108: R_NIOS2_S16 .data\+0x4
++0+010c <[^>]*> ldbio r4,0\(zero\)
++[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
++0+0110 <[^>]*> ldbio r4,0\(zero\)
++[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
++0+0114 <[^>]*> ldbio r4,0\(zero\)
++[ ]*114: R_NIOS2_S16 big_external_common\+0x4
++0+0118 <[^>]*> ldbio r4,0\(zero\)
++[ ]*118: R_NIOS2_S16 small_external_common\+0x4
++0+011c <[^>]*> ldbio r4,0\(zero\)
++[ ]*11c: R_NIOS2_S16 .bss\+0x4
++0+0120 <[^>]*> ldbio r4,0\(zero\)
++[ ]*120: R_NIOS2_S16 .bss\+0x4004
++0+0124 <[^>]*> ldbio r4,0\(zero\)
++[ ]*124: R_NIOS2_S16 .data\+0xffff8000
++0+0128 <[^>]*> ldbio r4,0\(zero\)
++[ ]*128: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+012c <[^>]*> ldbio r4,0\(zero\)
++[ ]*12c: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0130 <[^>]*> ldbio r4,0\(zero\)
++[ ]*130: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0134 <[^>]*> ldbio r4,0\(zero\)
++[ ]*134: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0138 <[^>]*> ldbio r4,0\(zero\)
++[ ]*138: R_NIOS2_S16 .bss\+0xffff8000
++0+013c <[^>]*> ldbio r4,0\(zero\)
++[ ]*13c: R_NIOS2_S16 .bss\+0xffffc000
++0+0140 <[^>]*> ldbio r4,0\(zero\)
++[ ]*140: R_NIOS2_S16 .data\+0x10000
++0+0144 <[^>]*> ldbio r4,0\(r5\)
++[ ]*144: R_NIOS2_S16 .data
++0+0148 <[^>]*> ldbio r4,0\(r5\)
++[ ]*148: R_NIOS2_S16 big_external_data_label
++0+014c <[^>]*> ldbio r4,0\(r5\)
++[ ]*14c: R_NIOS2_S16 small_external_data_label
++0+0150 <[^>]*> ldbio r4,0\(r5\)
++[ ]*150: R_NIOS2_S16 big_external_common
++0+0154 <[^>]*> ldbio r4,0\(r5\)
++[ ]*154: R_NIOS2_S16 small_external_common
++0+0158 <[^>]*> ldbio r4,0\(r5\)
++[ ]*158: R_NIOS2_S16 .bss
++0+015c <[^>]*> ldbio r4,0\(r5\)
++[ ]*15c: R_NIOS2_S16 .bss\+0x4000
++0+0160 <[^>]*> ldbio r4,0\(r5\)
++[ ]*160: R_NIOS2_S16 .data\+0x4
++0+0164 <[^>]*> ldbio r4,0\(r5\)
++[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
++0+0168 <[^>]*> ldbio r4,0\(r5\)
++[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
++0+016c <[^>]*> ldbio r4,0\(r5\)
++[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
++0+0170 <[^>]*> ldbio r4,0\(r5\)
++[ ]*170: R_NIOS2_S16 small_external_common\+0x4
++0+0174 <[^>]*> ldbio r4,0\(r5\)
++[ ]*174: R_NIOS2_S16 .bss\+0x4
++0+0178 <[^>]*> ldbio r4,0\(r5\)
++[ ]*178: R_NIOS2_S16 .bss\+0x4004
++0+017c <[^>]*> ldbio r4,0\(r5\)
++[ ]*17c: R_NIOS2_S16 .data\+0xffff8000
++0+0180 <[^>]*> ldbio r4,0\(r5\)
++[ ]*180: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0184 <[^>]*> ldbio r4,0\(r5\)
++[ ]*184: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0188 <[^>]*> ldbio r4,0\(r5\)
++[ ]*188: R_NIOS2_S16 big_external_common\+0xffff8000
++0+018c <[^>]*> ldbio r4,0\(r5\)
++[ ]*18c: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0190 <[^>]*> ldbio r4,0\(r5\)
++[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
++0+0194 <[^>]*> ldbio r4,0\(r5\)
++[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
+--- binutils-2.15/gas/testsuite/gas/nios2/ldb.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldb.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,117 @@
++ .data
++data_label:
++ .extern big_external_data_label,0x4000
++ .extern small_external_data_label,4
++ .comm big_external_common,0x4000
++ .comm small_external_common,4
++ .lcomm big_local_common,0x4000
++ .lcomm small_local_common,4
++
++# the small symbols should have space allocated in the sbss section
++# but this is not yet supported in the assembler, so space is allocated
++# in the .bss section and the relocations are not gp-relative. this will
++# be updated when gp-relative relocations are added
++ .text
++ ldb r4,0(r0)
++ ldb r4,4(r0)
++ ldb r4,0x7ffc(r0)
++ ldb r4,-0x8000(r0)
++ ldb r4,0(r5)
++ ldb r4,4(r5)
++ ldb r4,0x7ffc(r5)
++ ldb r4,-0x8000(r5)
++ ldb r4,data_label(r0)
++ ldb r4,big_external_data_label(r0)
++ ldb r4,small_external_data_label(r0)
++ ldb r4,big_external_common(r0)
++ ldb r4,small_external_common(r0)
++ ldb r4,big_local_common(r0)
++ ldb r4,small_local_common(r0)
++ ldb r4,data_label+4(r0)
++ ldb r4,big_external_data_label+4(r0)
++ ldb r4,small_external_data_label+4(r0)
++ ldb r4,big_external_common+4(r0)
++ ldb r4,small_external_common+4(r0)
++ ldb r4,big_local_common+4(r0)
++ ldb r4,small_local_common+4(r0)
++ ldb r4,data_label-0x8000(r0)
++ ldb r4,big_external_data_label-0x8000(r0)
++ ldb r4,small_external_data_label-0x8000(r0)
++ ldb r4,big_external_common-0x8000(r0)
++ ldb r4,small_external_common-0x8000(r0)
++ ldb r4,big_local_common-0x8000(r0)
++ ldb r4,small_local_common-0x8000(r0)
++ ldb r4,data_label+0x10000(r0)
++ ldb r4,data_label(r5)
++ ldb r4,big_external_data_label(r5)
++ ldb r4,small_external_data_label(r5)
++ ldb r4,big_external_common(r5)
++ ldb r4,small_external_common(r5)
++ ldb r4,big_local_common(r5)
++ ldb r4,small_local_common(r5)
++ ldb r4,data_label+4(r5)
++ ldb r4,big_external_data_label+4(r5)
++ ldb r4,small_external_data_label+4(r5)
++ ldb r4,big_external_common+4(r5)
++ ldb r4,small_external_common+4(r5)
++ ldb r4,big_local_common+4(r5)
++ ldb r4,small_local_common+4(r5)
++ ldb r4,data_label-0x8000(r5)
++ ldb r4,big_external_data_label-0x8000(r5)
++ ldb r4,small_external_data_label-0x8000(r5)
++ ldb r4,big_external_common-0x8000(r5)
++ ldb r4,small_external_common-0x8000(r5)
++ ldb r4,big_local_common-0x8000(r5)
++ ldb r4,small_local_common-0x8000(r5)
++
++ ldbio r4,0(r0)
++ ldbio r4,4(r0)
++ ldbio r4,0x7ffc(r0)
++ ldbio r4,-0x8000(r0)
++ ldbio r4,0(r5)
++ ldbio r4,4(r5)
++ ldbio r4,0x7ffc(r5)
++ ldbio r4,-0x8000(r5)
++ ldbio r4,data_label(r0)
++ ldbio r4,big_external_data_label(r0)
++ ldbio r4,small_external_data_label(r0)
++ ldbio r4,big_external_common(r0)
++ ldbio r4,small_external_common(r0)
++ ldbio r4,big_local_common(r0)
++ ldbio r4,small_local_common(r0)
++ ldbio r4,data_label+4(r0)
++ ldbio r4,big_external_data_label+4(r0)
++ ldbio r4,small_external_data_label+4(r0)
++ ldbio r4,big_external_common+4(r0)
++ ldbio r4,small_external_common+4(r0)
++ ldbio r4,big_local_common+4(r0)
++ ldbio r4,small_local_common+4(r0)
++ ldbio r4,data_label-0x8000(r0)
++ ldbio r4,big_external_data_label-0x8000(r0)
++ ldbio r4,small_external_data_label-0x8000(r0)
++ ldbio r4,big_external_common-0x8000(r0)
++ ldbio r4,small_external_common-0x8000(r0)
++ ldbio r4,big_local_common-0x8000(r0)
++ ldbio r4,small_local_common-0x8000(r0)
++ ldbio r4,data_label+0x10000(r0)
++ ldbio r4,data_label(r5)
++ ldbio r4,big_external_data_label(r5)
++ ldbio r4,small_external_data_label(r5)
++ ldbio r4,big_external_common(r5)
++ ldbio r4,small_external_common(r5)
++ ldbio r4,big_local_common(r5)
++ ldbio r4,small_local_common(r5)
++ ldbio r4,data_label+4(r5)
++ ldbio r4,big_external_data_label+4(r5)
++ ldbio r4,small_external_data_label+4(r5)
++ ldbio r4,big_external_common+4(r5)
++ ldbio r4,small_external_common+4(r5)
++ ldbio r4,big_local_common+4(r5)
++ ldbio r4,small_local_common+4(r5)
++ ldbio r4,data_label-0x8000(r5)
++ ldbio r4,big_external_data_label-0x8000(r5)
++ ldbio r4,small_external_data_label-0x8000(r5)
++ ldbio r4,big_external_common-0x8000(r5)
++ ldbio r4,small_external_common-0x8000(r5)
++ ldbio r4,big_local_common-0x8000(r5)
++ ldbio r4,small_local_common-0x8000(r5)
+--- binutils-2.15/gas/testsuite/gas/nios2/ldh.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldh.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,196 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 ldh
++
++# Test the ld instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> ldh r4,0\(zero\)
++0+0004 <[^>]*> ldh r4,4\(zero\)
++0+0008 <[^>]*> ldh r4,32764\(zero\)
++0+000c <[^>]*> ldh r4,-32768\(zero\)
++0+0010 <[^>]*> ldh r4,0\(r5\)
++0+0014 <[^>]*> ldh r4,4\(r5\)
++0+0018 <[^>]*> ldh r4,32764\(r5\)
++0+001c <[^>]*> ldh r4,-32768\(r5\)
++0+0020 <[^>]*> ldh r4,0\(zero\)
++[ ]*20: R_NIOS2_S16 .data
++0+0024 <[^>]*> ldh r4,0\(zero\)
++[ ]*24: R_NIOS2_S16 big_external_data_label
++0+0028 <[^>]*> ldh r4,0\(zero\)
++[ ]*28: R_NIOS2_S16 small_external_data_label
++0+002c <[^>]*> ldh r4,0\(zero\)
++[ ]*2c: R_NIOS2_S16 big_external_common
++0+0030 <[^>]*> ldh r4,0\(zero\)
++[ ]*30: R_NIOS2_S16 small_external_common
++0+0034 <[^>]*> ldh r4,0\(zero\)
++[ ]*34: R_NIOS2_S16 .bss
++0+0038 <[^>]*> ldh r4,0\(zero\)
++[ ]*38: R_NIOS2_S16 .bss\+0x4000
++0+003c <[^>]*> ldh r4,0\(zero\)
++[ ]*3c: R_NIOS2_S16 .data\+0x4
++0+0040 <[^>]*> ldh r4,0\(zero\)
++[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
++0+0044 <[^>]*> ldh r4,0\(zero\)
++[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
++0+0048 <[^>]*> ldh r4,0\(zero\)
++[ ]*48: R_NIOS2_S16 big_external_common\+0x4
++0+004c <[^>]*> ldh r4,0\(zero\)
++[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
++0+0050 <[^>]*> ldh r4,0\(zero\)
++[ ]*50: R_NIOS2_S16 .bss\+0x4
++0+0054 <[^>]*> ldh r4,0\(zero\)
++[ ]*54: R_NIOS2_S16 .bss\+0x4004
++0+0058 <[^>]*> ldh r4,0\(zero\)
++[ ]*58: R_NIOS2_S16 .data\+0xffff8000
++0+005c <[^>]*> ldh r4,0\(zero\)
++[ ]*5c: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0060 <[^>]*> ldh r4,0\(zero\)
++[ ]*60: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0064 <[^>]*> ldh r4,0\(zero\)
++[ ]*64: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0068 <[^>]*> ldh r4,0\(zero\)
++[ ]*68: R_NIOS2_S16 small_external_common\+0xffff8000
++0+006c <[^>]*> ldh r4,0\(zero\)
++[ ]*6c: R_NIOS2_S16 .bss\+0xffff8000
++0+0070 <[^>]*> ldh r4,0\(zero\)
++[ ]*70: R_NIOS2_S16 .bss\+0xffffc000
++0+0074 <[^>]*> ldh r4,0\(zero\)
++[ ]*74: R_NIOS2_S16 .data\+0x10000
++0+0078 <[^>]*> ldh r4,0\(r5\)
++[ ]*78: R_NIOS2_S16 .data
++0+007c <[^>]*> ldh r4,0\(r5\)
++[ ]*7c: R_NIOS2_S16 big_external_data_label
++0+0080 <[^>]*> ldh r4,0\(r5\)
++[ ]*80: R_NIOS2_S16 small_external_data_label
++0+0084 <[^>]*> ldh r4,0\(r5\)
++[ ]*84: R_NIOS2_S16 big_external_common
++0+0088 <[^>]*> ldh r4,0\(r5\)
++[ ]*88: R_NIOS2_S16 small_external_common
++0+008c <[^>]*> ldh r4,0\(r5\)
++[ ]*8c: R_NIOS2_S16 .bss
++0+0090 <[^>]*> ldh r4,0\(r5\)
++[ ]*90: R_NIOS2_S16 .bss\+0x4000
++0+0094 <[^>]*> ldh r4,0\(r5\)
++[ ]*94: R_NIOS2_S16 .data\+0x4
++0+0098 <[^>]*> ldh r4,0\(r5\)
++[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
++0+009c <[^>]*> ldh r4,0\(r5\)
++[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
++0+00a0 <[^>]*> ldh r4,0\(r5\)
++[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
++0+00a4 <[^>]*> ldh r4,0\(r5\)
++[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
++0+00a8 <[^>]*> ldh r4,0\(r5\)
++[ ]*a8: R_NIOS2_S16 .bss\+0x4
++0+00ac <[^>]*> ldh r4,0\(r5\)
++[ ]*ac: R_NIOS2_S16 .bss\+0x4004
++0+00b0 <[^>]*> ldh r4,0\(r5\)
++[ ]*b0: R_NIOS2_S16 .data\+0xffff8000
++0+00b4 <[^>]*> ldh r4,0\(r5\)
++[ ]*b4: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+00b8 <[^>]*> ldh r4,0\(r5\)
++[ ]*b8: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+00bc <[^>]*> ldh r4,0\(r5\)
++[ ]*bc: R_NIOS2_S16 big_external_common\+0xffff8000
++0+00c0 <[^>]*> ldh r4,0\(r5\)
++[ ]*c0: R_NIOS2_S16 small_external_common\+0xffff8000
++0+00c4 <[^>]*> ldh r4,0\(r5\)
++[ ]*c4: R_NIOS2_S16 .bss\+0xffff8000
++0+00c8 <[^>]*> ldh r4,0\(r5\)
++[ ]*c8: R_NIOS2_S16 .bss\+0xffffc000
++0+00cc <[^>]*> ldhio r4,0\(zero\)
++0+00d0 <[^>]*> ldhio r4,4\(zero\)
++0+00d4 <[^>]*> ldhio r4,32764\(zero\)
++0+00d8 <[^>]*> ldhio r4,-32768\(zero\)
++0+00dc <[^>]*> ldhio r4,0\(r5\)
++0+00e0 <[^>]*> ldhio r4,4\(r5\)
++0+00e4 <[^>]*> ldhio r4,32764\(r5\)
++0+00e8 <[^>]*> ldhio r4,-32768\(r5\)
++0+00ec <[^>]*> ldhio r4,0\(zero\)
++[ ]*ec: R_NIOS2_S16 .data
++0+00f0 <[^>]*> ldhio r4,0\(zero\)
++[ ]*f0: R_NIOS2_S16 big_external_data_label
++0+00f4 <[^>]*> ldhio r4,0\(zero\)
++[ ]*f4: R_NIOS2_S16 small_external_data_label
++0+00f8 <[^>]*> ldhio r4,0\(zero\)
++[ ]*f8: R_NIOS2_S16 big_external_common
++0+00fc <[^>]*> ldhio r4,0\(zero\)
++[ ]*fc: R_NIOS2_S16 small_external_common
++0+0100 <[^>]*> ldhio r4,0\(zero\)
++[ ]*100: R_NIOS2_S16 .bss
++0+0104 <[^>]*> ldhio r4,0\(zero\)
++[ ]*104: R_NIOS2_S16 .bss\+0x4000
++0+0108 <[^>]*> ldhio r4,0\(zero\)
++[ ]*108: R_NIOS2_S16 .data\+0x4
++0+010c <[^>]*> ldhio r4,0\(zero\)
++[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
++0+0110 <[^>]*> ldhio r4,0\(zero\)
++[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
++0+0114 <[^>]*> ldhio r4,0\(zero\)
++[ ]*114: R_NIOS2_S16 big_external_common\+0x4
++0+0118 <[^>]*> ldhio r4,0\(zero\)
++[ ]*118: R_NIOS2_S16 small_external_common\+0x4
++0+011c <[^>]*> ldhio r4,0\(zero\)
++[ ]*11c: R_NIOS2_S16 .bss\+0x4
++0+0120 <[^>]*> ldhio r4,0\(zero\)
++[ ]*120: R_NIOS2_S16 .bss\+0x4004
++0+0124 <[^>]*> ldhio r4,0\(zero\)
++[ ]*124: R_NIOS2_S16 .data\+0xffff8000
++0+0128 <[^>]*> ldhio r4,0\(zero\)
++[ ]*128: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+012c <[^>]*> ldhio r4,0\(zero\)
++[ ]*12c: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0130 <[^>]*> ldhio r4,0\(zero\)
++[ ]*130: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0134 <[^>]*> ldhio r4,0\(zero\)
++[ ]*134: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0138 <[^>]*> ldhio r4,0\(zero\)
++[ ]*138: R_NIOS2_S16 .bss\+0xffff8000
++0+013c <[^>]*> ldhio r4,0\(zero\)
++[ ]*13c: R_NIOS2_S16 .bss\+0xffffc000
++0+0140 <[^>]*> ldhio r4,0\(zero\)
++[ ]*140: R_NIOS2_S16 .data\+0x10000
++0+0144 <[^>]*> ldhio r4,0\(r5\)
++[ ]*144: R_NIOS2_S16 .data
++0+0148 <[^>]*> ldhio r4,0\(r5\)
++[ ]*148: R_NIOS2_S16 big_external_data_label
++0+014c <[^>]*> ldhio r4,0\(r5\)
++[ ]*14c: R_NIOS2_S16 small_external_data_label
++0+0150 <[^>]*> ldhio r4,0\(r5\)
++[ ]*150: R_NIOS2_S16 big_external_common
++0+0154 <[^>]*> ldhio r4,0\(r5\)
++[ ]*154: R_NIOS2_S16 small_external_common
++0+0158 <[^>]*> ldhio r4,0\(r5\)
++[ ]*158: R_NIOS2_S16 .bss
++0+015c <[^>]*> ldhio r4,0\(r5\)
++[ ]*15c: R_NIOS2_S16 .bss\+0x4000
++0+0160 <[^>]*> ldhio r4,0\(r5\)
++[ ]*160: R_NIOS2_S16 .data\+0x4
++0+0164 <[^>]*> ldhio r4,0\(r5\)
++[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
++0+0168 <[^>]*> ldhio r4,0\(r5\)
++[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
++0+016c <[^>]*> ldhio r4,0\(r5\)
++[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
++0+0170 <[^>]*> ldhio r4,0\(r5\)
++[ ]*170: R_NIOS2_S16 small_external_common\+0x4
++0+0174 <[^>]*> ldhio r4,0\(r5\)
++[ ]*174: R_NIOS2_S16 .bss\+0x4
++0+0178 <[^>]*> ldhio r4,0\(r5\)
++[ ]*178: R_NIOS2_S16 .bss\+0x4004
++0+017c <[^>]*> ldhio r4,0\(r5\)
++[ ]*17c: R_NIOS2_S16 .data\+0xffff8000
++0+0180 <[^>]*> ldhio r4,0\(r5\)
++[ ]*180: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0184 <[^>]*> ldhio r4,0\(r5\)
++[ ]*184: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0188 <[^>]*> ldhio r4,0\(r5\)
++[ ]*188: R_NIOS2_S16 big_external_common\+0xffff8000
++0+018c <[^>]*> ldhio r4,0\(r5\)
++[ ]*18c: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0190 <[^>]*> ldhio r4,0\(r5\)
++[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
++0+0194 <[^>]*> ldhio r4,0\(r5\)
++[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
+--- binutils-2.15/gas/testsuite/gas/nios2/ldh.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldh.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,117 @@
++ .data
++data_label:
++ .extern big_external_data_label,0x4000
++ .extern small_external_data_label,4
++ .comm big_external_common,0x4000
++ .comm small_external_common,4
++ .lcomm big_local_common,0x4000
++ .lcomm small_local_common,4
++
++# the small symbols should have space allocated in the sbss section
++# but this is not yet supported in the assembler, so space is allocated
++# in the .bss section and the relocations are not gp-relative. this will
++# be updated when gp-relative relocations are added
++ .text
++ ldh r4,0(r0)
++ ldh r4,4(r0)
++ ldh r4,0x7ffc(r0)
++ ldh r4,-0x8000(r0)
++ ldh r4,0(r5)
++ ldh r4,4(r5)
++ ldh r4,0x7ffc(r5)
++ ldh r4,-0x8000(r5)
++ ldh r4,data_label(r0)
++ ldh r4,big_external_data_label(r0)
++ ldh r4,small_external_data_label(r0)
++ ldh r4,big_external_common(r0)
++ ldh r4,small_external_common(r0)
++ ldh r4,big_local_common(r0)
++ ldh r4,small_local_common(r0)
++ ldh r4,data_label+4(r0)
++ ldh r4,big_external_data_label+4(r0)
++ ldh r4,small_external_data_label+4(r0)
++ ldh r4,big_external_common+4(r0)
++ ldh r4,small_external_common+4(r0)
++ ldh r4,big_local_common+4(r0)
++ ldh r4,small_local_common+4(r0)
++ ldh r4,data_label-0x8000(r0)
++ ldh r4,big_external_data_label-0x8000(r0)
++ ldh r4,small_external_data_label-0x8000(r0)
++ ldh r4,big_external_common-0x8000(r0)
++ ldh r4,small_external_common-0x8000(r0)
++ ldh r4,big_local_common-0x8000(r0)
++ ldh r4,small_local_common-0x8000(r0)
++ ldh r4,data_label+0x10000(r0)
++ ldh r4,data_label(r5)
++ ldh r4,big_external_data_label(r5)
++ ldh r4,small_external_data_label(r5)
++ ldh r4,big_external_common(r5)
++ ldh r4,small_external_common(r5)
++ ldh r4,big_local_common(r5)
++ ldh r4,small_local_common(r5)
++ ldh r4,data_label+4(r5)
++ ldh r4,big_external_data_label+4(r5)
++ ldh r4,small_external_data_label+4(r5)
++ ldh r4,big_external_common+4(r5)
++ ldh r4,small_external_common+4(r5)
++ ldh r4,big_local_common+4(r5)
++ ldh r4,small_local_common+4(r5)
++ ldh r4,data_label-0x8000(r5)
++ ldh r4,big_external_data_label-0x8000(r5)
++ ldh r4,small_external_data_label-0x8000(r5)
++ ldh r4,big_external_common-0x8000(r5)
++ ldh r4,small_external_common-0x8000(r5)
++ ldh r4,big_local_common-0x8000(r5)
++ ldh r4,small_local_common-0x8000(r5)
++
++ ldhio r4,0(r0)
++ ldhio r4,4(r0)
++ ldhio r4,0x7ffc(r0)
++ ldhio r4,-0x8000(r0)
++ ldhio r4,0(r5)
++ ldhio r4,4(r5)
++ ldhio r4,0x7ffc(r5)
++ ldhio r4,-0x8000(r5)
++ ldhio r4,data_label(r0)
++ ldhio r4,big_external_data_label(r0)
++ ldhio r4,small_external_data_label(r0)
++ ldhio r4,big_external_common(r0)
++ ldhio r4,small_external_common(r0)
++ ldhio r4,big_local_common(r0)
++ ldhio r4,small_local_common(r0)
++ ldhio r4,data_label+4(r0)
++ ldhio r4,big_external_data_label+4(r0)
++ ldhio r4,small_external_data_label+4(r0)
++ ldhio r4,big_external_common+4(r0)
++ ldhio r4,small_external_common+4(r0)
++ ldhio r4,big_local_common+4(r0)
++ ldhio r4,small_local_common+4(r0)
++ ldhio r4,data_label-0x8000(r0)
++ ldhio r4,big_external_data_label-0x8000(r0)
++ ldhio r4,small_external_data_label-0x8000(r0)
++ ldhio r4,big_external_common-0x8000(r0)
++ ldhio r4,small_external_common-0x8000(r0)
++ ldhio r4,big_local_common-0x8000(r0)
++ ldhio r4,small_local_common-0x8000(r0)
++ ldhio r4,data_label+0x10000(r0)
++ ldhio r4,data_label(r5)
++ ldhio r4,big_external_data_label(r5)
++ ldhio r4,small_external_data_label(r5)
++ ldhio r4,big_external_common(r5)
++ ldhio r4,small_external_common(r5)
++ ldhio r4,big_local_common(r5)
++ ldhio r4,small_local_common(r5)
++ ldhio r4,data_label+4(r5)
++ ldhio r4,big_external_data_label+4(r5)
++ ldhio r4,small_external_data_label+4(r5)
++ ldhio r4,big_external_common+4(r5)
++ ldhio r4,small_external_common+4(r5)
++ ldhio r4,big_local_common+4(r5)
++ ldhio r4,small_local_common+4(r5)
++ ldhio r4,data_label-0x8000(r5)
++ ldhio r4,big_external_data_label-0x8000(r5)
++ ldhio r4,small_external_data_label-0x8000(r5)
++ ldhio r4,big_external_common-0x8000(r5)
++ ldhio r4,small_external_common-0x8000(r5)
++ ldhio r4,big_local_common-0x8000(r5)
++ ldhio r4,small_local_common-0x8000(r5)
+--- binutils-2.15/gas/testsuite/gas/nios2/ldw.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldw.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,196 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 ldw
++
++# Test the ld instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> ldw r4,0\(zero\)
++0+0004 <[^>]*> ldw r4,4\(zero\)
++0+0008 <[^>]*> ldw r4,32764\(zero\)
++0+000c <[^>]*> ldw r4,-32768\(zero\)
++0+0010 <[^>]*> ldw r4,0\(r5\)
++0+0014 <[^>]*> ldw r4,4\(r5\)
++0+0018 <[^>]*> ldw r4,32764\(r5\)
++0+001c <[^>]*> ldw r4,-32768\(r5\)
++0+0020 <[^>]*> ldw r4,0\(zero\)
++[ ]*20: R_NIOS2_S16 .data
++0+0024 <[^>]*> ldw r4,0\(zero\)
++[ ]*24: R_NIOS2_S16 big_external_data_label
++0+0028 <[^>]*> ldw r4,0\(zero\)
++[ ]*28: R_NIOS2_S16 small_external_data_label
++0+002c <[^>]*> ldw r4,0\(zero\)
++[ ]*2c: R_NIOS2_S16 big_external_common
++0+0030 <[^>]*> ldw r4,0\(zero\)
++[ ]*30: R_NIOS2_S16 small_external_common
++0+0034 <[^>]*> ldw r4,0\(zero\)
++[ ]*34: R_NIOS2_S16 .bss
++0+0038 <[^>]*> ldw r4,0\(zero\)
++[ ]*38: R_NIOS2_S16 .bss\+0x4000
++0+003c <[^>]*> ldw r4,0\(zero\)
++[ ]*3c: R_NIOS2_S16 .data\+0x4
++0+0040 <[^>]*> ldw r4,0\(zero\)
++[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
++0+0044 <[^>]*> ldw r4,0\(zero\)
++[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
++0+0048 <[^>]*> ldw r4,0\(zero\)
++[ ]*48: R_NIOS2_S16 big_external_common\+0x4
++0+004c <[^>]*> ldw r4,0\(zero\)
++[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
++0+0050 <[^>]*> ldw r4,0\(zero\)
++[ ]*50: R_NIOS2_S16 .bss\+0x4
++0+0054 <[^>]*> ldw r4,0\(zero\)
++[ ]*54: R_NIOS2_S16 .bss\+0x4004
++0+0058 <[^>]*> ldw r4,0\(zero\)
++[ ]*58: R_NIOS2_S16 .data\+0xffff8000
++0+005c <[^>]*> ldw r4,0\(zero\)
++[ ]*5c: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0060 <[^>]*> ldw r4,0\(zero\)
++[ ]*60: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0064 <[^>]*> ldw r4,0\(zero\)
++[ ]*64: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0068 <[^>]*> ldw r4,0\(zero\)
++[ ]*68: R_NIOS2_S16 small_external_common\+0xffff8000
++0+006c <[^>]*> ldw r4,0\(zero\)
++[ ]*6c: R_NIOS2_S16 .bss\+0xffff8000
++0+0070 <[^>]*> ldw r4,0\(zero\)
++[ ]*70: R_NIOS2_S16 .bss\+0xffffc000
++0+0074 <[^>]*> ldw r4,0\(zero\)
++[ ]*74: R_NIOS2_S16 .data\+0x10000
++0+0078 <[^>]*> ldw r4,0\(r5\)
++[ ]*78: R_NIOS2_S16 .data
++0+007c <[^>]*> ldw r4,0\(r5\)
++[ ]*7c: R_NIOS2_S16 big_external_data_label
++0+0080 <[^>]*> ldw r4,0\(r5\)
++[ ]*80: R_NIOS2_S16 small_external_data_label
++0+0084 <[^>]*> ldw r4,0\(r5\)
++[ ]*84: R_NIOS2_S16 big_external_common
++0+0088 <[^>]*> ldw r4,0\(r5\)
++[ ]*88: R_NIOS2_S16 small_external_common
++0+008c <[^>]*> ldw r4,0\(r5\)
++[ ]*8c: R_NIOS2_S16 .bss
++0+0090 <[^>]*> ldw r4,0\(r5\)
++[ ]*90: R_NIOS2_S16 .bss\+0x4000
++0+0094 <[^>]*> ldw r4,0\(r5\)
++[ ]*94: R_NIOS2_S16 .data\+0x4
++0+0098 <[^>]*> ldw r4,0\(r5\)
++[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
++0+009c <[^>]*> ldw r4,0\(r5\)
++[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
++0+00a0 <[^>]*> ldw r4,0\(r5\)
++[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
++0+00a4 <[^>]*> ldw r4,0\(r5\)
++[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
++0+00a8 <[^>]*> ldw r4,0\(r5\)
++[ ]*a8: R_NIOS2_S16 .bss\+0x4
++0+00ac <[^>]*> ldw r4,0\(r5\)
++[ ]*ac: R_NIOS2_S16 .bss\+0x4004
++0+00b0 <[^>]*> ldw r4,0\(r5\)
++[ ]*b0: R_NIOS2_S16 .data\+0xffff8000
++0+00b4 <[^>]*> ldw r4,0\(r5\)
++[ ]*b4: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+00b8 <[^>]*> ldw r4,0\(r5\)
++[ ]*b8: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+00bc <[^>]*> ldw r4,0\(r5\)
++[ ]*bc: R_NIOS2_S16 big_external_common\+0xffff8000
++0+00c0 <[^>]*> ldw r4,0\(r5\)
++[ ]*c0: R_NIOS2_S16 small_external_common\+0xffff8000
++0+00c4 <[^>]*> ldw r4,0\(r5\)
++[ ]*c4: R_NIOS2_S16 .bss\+0xffff8000
++0+00c8 <[^>]*> ldw r4,0\(r5\)
++[ ]*c8: R_NIOS2_S16 .bss\+0xffffc000
++0+00cc <[^>]*> ldwio r4,0\(zero\)
++0+00d0 <[^>]*> ldwio r4,4\(zero\)
++0+00d4 <[^>]*> ldwio r4,32764\(zero\)
++0+00d8 <[^>]*> ldwio r4,-32768\(zero\)
++0+00dc <[^>]*> ldwio r4,0\(r5\)
++0+00e0 <[^>]*> ldwio r4,4\(r5\)
++0+00e4 <[^>]*> ldwio r4,32764\(r5\)
++0+00e8 <[^>]*> ldwio r4,-32768\(r5\)
++0+00ec <[^>]*> ldwio r4,0\(zero\)
++[ ]*ec: R_NIOS2_S16 .data
++0+00f0 <[^>]*> ldwio r4,0\(zero\)
++[ ]*f0: R_NIOS2_S16 big_external_data_label
++0+00f4 <[^>]*> ldwio r4,0\(zero\)
++[ ]*f4: R_NIOS2_S16 small_external_data_label
++0+00f8 <[^>]*> ldwio r4,0\(zero\)
++[ ]*f8: R_NIOS2_S16 big_external_common
++0+00fc <[^>]*> ldwio r4,0\(zero\)
++[ ]*fc: R_NIOS2_S16 small_external_common
++0+0100 <[^>]*> ldwio r4,0\(zero\)
++[ ]*100: R_NIOS2_S16 .bss
++0+0104 <[^>]*> ldwio r4,0\(zero\)
++[ ]*104: R_NIOS2_S16 .bss\+0x4000
++0+0108 <[^>]*> ldwio r4,0\(zero\)
++[ ]*108: R_NIOS2_S16 .data\+0x4
++0+010c <[^>]*> ldwio r4,0\(zero\)
++[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
++0+0110 <[^>]*> ldwio r4,0\(zero\)
++[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
++0+0114 <[^>]*> ldwio r4,0\(zero\)
++[ ]*114: R_NIOS2_S16 big_external_common\+0x4
++0+0118 <[^>]*> ldwio r4,0\(zero\)
++[ ]*118: R_NIOS2_S16 small_external_common\+0x4
++0+011c <[^>]*> ldwio r4,0\(zero\)
++[ ]*11c: R_NIOS2_S16 .bss\+0x4
++0+0120 <[^>]*> ldwio r4,0\(zero\)
++[ ]*120: R_NIOS2_S16 .bss\+0x4004
++0+0124 <[^>]*> ldwio r4,0\(zero\)
++[ ]*124: R_NIOS2_S16 .data\+0xffff8000
++0+0128 <[^>]*> ldwio r4,0\(zero\)
++[ ]*128: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+012c <[^>]*> ldwio r4,0\(zero\)
++[ ]*12c: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0130 <[^>]*> ldwio r4,0\(zero\)
++[ ]*130: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0134 <[^>]*> ldwio r4,0\(zero\)
++[ ]*134: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0138 <[^>]*> ldwio r4,0\(zero\)
++[ ]*138: R_NIOS2_S16 .bss\+0xffff8000
++0+013c <[^>]*> ldwio r4,0\(zero\)
++[ ]*13c: R_NIOS2_S16 .bss\+0xffffc000
++0+0140 <[^>]*> ldwio r4,0\(zero\)
++[ ]*140: R_NIOS2_S16 .data\+0x10000
++0+0144 <[^>]*> ldwio r4,0\(r5\)
++[ ]*144: R_NIOS2_S16 .data
++0+0148 <[^>]*> ldwio r4,0\(r5\)
++[ ]*148: R_NIOS2_S16 big_external_data_label
++0+014c <[^>]*> ldwio r4,0\(r5\)
++[ ]*14c: R_NIOS2_S16 small_external_data_label
++0+0150 <[^>]*> ldwio r4,0\(r5\)
++[ ]*150: R_NIOS2_S16 big_external_common
++0+0154 <[^>]*> ldwio r4,0\(r5\)
++[ ]*154: R_NIOS2_S16 small_external_common
++0+0158 <[^>]*> ldwio r4,0\(r5\)
++[ ]*158: R_NIOS2_S16 .bss
++0+015c <[^>]*> ldwio r4,0\(r5\)
++[ ]*15c: R_NIOS2_S16 .bss\+0x4000
++0+0160 <[^>]*> ldwio r4,0\(r5\)
++[ ]*160: R_NIOS2_S16 .data\+0x4
++0+0164 <[^>]*> ldwio r4,0\(r5\)
++[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
++0+0168 <[^>]*> ldwio r4,0\(r5\)
++[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
++0+016c <[^>]*> ldwio r4,0\(r5\)
++[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
++0+0170 <[^>]*> ldwio r4,0\(r5\)
++[ ]*170: R_NIOS2_S16 small_external_common\+0x4
++0+0174 <[^>]*> ldwio r4,0\(r5\)
++[ ]*174: R_NIOS2_S16 .bss\+0x4
++0+0178 <[^>]*> ldwio r4,0\(r5\)
++[ ]*178: R_NIOS2_S16 .bss\+0x4004
++0+017c <[^>]*> ldwio r4,0\(r5\)
++[ ]*17c: R_NIOS2_S16 .data\+0xffff8000
++0+0180 <[^>]*> ldwio r4,0\(r5\)
++[ ]*180: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0184 <[^>]*> ldwio r4,0\(r5\)
++[ ]*184: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0188 <[^>]*> ldwio r4,0\(r5\)
++[ ]*188: R_NIOS2_S16 big_external_common\+0xffff8000
++0+018c <[^>]*> ldwio r4,0\(r5\)
++[ ]*18c: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0190 <[^>]*> ldwio r4,0\(r5\)
++[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
++0+0194 <[^>]*> ldwio r4,0\(r5\)
++[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
+--- binutils-2.15/gas/testsuite/gas/nios2/ldw.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ldw.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,117 @@
++ .data
++data_label:
++ .extern big_external_data_label,0x4000
++ .extern small_external_data_label,4
++ .comm big_external_common,0x4000
++ .comm small_external_common,4
++ .lcomm big_local_common,0x4000
++ .lcomm small_local_common,4
++
++# the small symbols should have space allocated in the sbss section
++# but this is not yet supported in the assembler, so space is allocated
++# in the .bss section and the relocations are not gp-relative. this will
++# be updated when gp-relative relocations are added
++ .text
++ ldw r4,0(r0)
++ ldw r4,4(r0)
++ ldw r4,0x7ffc(r0)
++ ldw r4,-0x8000(r0)
++ ldw r4,0(r5)
++ ldw r4,4(r5)
++ ldw r4,0x7ffc(r5)
++ ldw r4,-0x8000(r5)
++ ldw r4,data_label(r0)
++ ldw r4,big_external_data_label(r0)
++ ldw r4,small_external_data_label(r0)
++ ldw r4,big_external_common(r0)
++ ldw r4,small_external_common(r0)
++ ldw r4,big_local_common(r0)
++ ldw r4,small_local_common(r0)
++ ldw r4,data_label+4(r0)
++ ldw r4,big_external_data_label+4(r0)
++ ldw r4,small_external_data_label+4(r0)
++ ldw r4,big_external_common+4(r0)
++ ldw r4,small_external_common+4(r0)
++ ldw r4,big_local_common+4(r0)
++ ldw r4,small_local_common+4(r0)
++ ldw r4,data_label-0x8000(r0)
++ ldw r4,big_external_data_label-0x8000(r0)
++ ldw r4,small_external_data_label-0x8000(r0)
++ ldw r4,big_external_common-0x8000(r0)
++ ldw r4,small_external_common-0x8000(r0)
++ ldw r4,big_local_common-0x8000(r0)
++ ldw r4,small_local_common-0x8000(r0)
++ ldw r4,data_label+0x10000(r0)
++ ldw r4,data_label(r5)
++ ldw r4,big_external_data_label(r5)
++ ldw r4,small_external_data_label(r5)
++ ldw r4,big_external_common(r5)
++ ldw r4,small_external_common(r5)
++ ldw r4,big_local_common(r5)
++ ldw r4,small_local_common(r5)
++ ldw r4,data_label+4(r5)
++ ldw r4,big_external_data_label+4(r5)
++ ldw r4,small_external_data_label+4(r5)
++ ldw r4,big_external_common+4(r5)
++ ldw r4,small_external_common+4(r5)
++ ldw r4,big_local_common+4(r5)
++ ldw r4,small_local_common+4(r5)
++ ldw r4,data_label-0x8000(r5)
++ ldw r4,big_external_data_label-0x8000(r5)
++ ldw r4,small_external_data_label-0x8000(r5)
++ ldw r4,big_external_common-0x8000(r5)
++ ldw r4,small_external_common-0x8000(r5)
++ ldw r4,big_local_common-0x8000(r5)
++ ldw r4,small_local_common-0x8000(r5)
++
++ ldwio r4,0(r0)
++ ldwio r4,4(r0)
++ ldwio r4,0x7ffc(r0)
++ ldwio r4,-0x8000(r0)
++ ldwio r4,0(r5)
++ ldwio r4,4(r5)
++ ldwio r4,0x7ffc(r5)
++ ldwio r4,-0x8000(r5)
++ ldwio r4,data_label(r0)
++ ldwio r4,big_external_data_label(r0)
++ ldwio r4,small_external_data_label(r0)
++ ldwio r4,big_external_common(r0)
++ ldwio r4,small_external_common(r0)
++ ldwio r4,big_local_common(r0)
++ ldwio r4,small_local_common(r0)
++ ldwio r4,data_label+4(r0)
++ ldwio r4,big_external_data_label+4(r0)
++ ldwio r4,small_external_data_label+4(r0)
++ ldwio r4,big_external_common+4(r0)
++ ldwio r4,small_external_common+4(r0)
++ ldwio r4,big_local_common+4(r0)
++ ldwio r4,small_local_common+4(r0)
++ ldwio r4,data_label-0x8000(r0)
++ ldwio r4,big_external_data_label-0x8000(r0)
++ ldwio r4,small_external_data_label-0x8000(r0)
++ ldwio r4,big_external_common-0x8000(r0)
++ ldwio r4,small_external_common-0x8000(r0)
++ ldwio r4,big_local_common-0x8000(r0)
++ ldwio r4,small_local_common-0x8000(r0)
++ ldwio r4,data_label+0x10000(r0)
++ ldwio r4,data_label(r5)
++ ldwio r4,big_external_data_label(r5)
++ ldwio r4,small_external_data_label(r5)
++ ldwio r4,big_external_common(r5)
++ ldwio r4,small_external_common(r5)
++ ldwio r4,big_local_common(r5)
++ ldwio r4,small_local_common(r5)
++ ldwio r4,data_label+4(r5)
++ ldwio r4,big_external_data_label+4(r5)
++ ldwio r4,small_external_data_label+4(r5)
++ ldwio r4,big_external_common+4(r5)
++ ldwio r4,small_external_common+4(r5)
++ ldwio r4,big_local_common+4(r5)
++ ldwio r4,small_local_common+4(r5)
++ ldwio r4,data_label-0x8000(r5)
++ ldwio r4,big_external_data_label-0x8000(r5)
++ ldwio r4,small_external_data_label-0x8000(r5)
++ ldwio r4,big_external_common-0x8000(r5)
++ ldwio r4,small_external_common-0x8000(r5)
++ ldwio r4,big_local_common-0x8000(r5)
++ ldwio r4,small_local_common-0x8000(r5)
+--- binutils-2.15/gas/testsuite/gas/nios2/lineseparator.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/lineseparator.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 lineseparator
++
++# Test the add instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0x0+0000 mov r5,r4
++0x0+0004 mov r4,r5
+--- binutils-2.15/gas/testsuite/gas/nios2/lineseparator.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/lineseparator.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,4 @@
++mov r5, r4 ; mov r4, r5
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/link1.lds 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/link1.lds 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++/* Simple script for testing relaxation */
++
++OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2")
++OUTPUT_ARCH(nios2)
++ENTRY(_start)
++SECTIONS
++{
++ _start = .;
++ text2 0 : { *(text2) }
++ text1 0x8000 : { *(text1) }
++}
+--- binutils-2.15/gas/testsuite/gas/nios2/link2.lds 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/link2.lds 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++/* Simple script for testing relaxation */
++
++OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2")
++OUTPUT_ARCH(nios2)
++ENTRY(_start)
++SECTIONS
++{
++ _start = .;
++ text1 0 : { *(text1) }
++ text2 0x80000000 : { *(text2) }
++}
+--- binutils-2.15/gas/testsuite/gas/nios2/link3.lds 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/link3.lds 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++/* Simple script for testing relaxation */
++
++OUTPUT_FORMAT("elf32-littlenios2", "elf32-littlenios2", "elf32-littlenios2")
++OUTPUT_ARCH(nios2)
++ENTRY(_start)
++SECTIONS
++{
++ _start = .;
++ text1 0 : { *(text1) }
++ text2 0x08000000 : { *(text2) }
++}
+--- binutils-2.15/gas/testsuite/gas/nios2/mov.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mov.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 mov
++
++# Test the mov instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> movz \$4,\$5,\$6
++0+0004 <[^>]*> movnz \$4,\$5,\$6
++
+--- binutils-2.15/gas/testsuite/gas/nios2/mov.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mov.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++# Source file used to test the movz and movnz instructions
++
++foo:
++ movz $4,$5,$6
++ movnz $4,$5,$6
+--- binutils-2.15/gas/testsuite/gas/nios2/movi.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movi.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,13 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 movi
++
++# Test implicit conversion of movi/movhi etc
++.*: file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> movi r2,32
++0+0004 <[^>]*> movhi r2,8192
++0+0008 <[^>]*> movhi r2,65535
++0+000c <[^>]*> orhi r2,r5,65535
++0+0010 <[^>]*> xorhi r2,r10,65535
++0+0014 <[^>]*> andhi r2,r15,65535
+--- binutils-2.15/gas/testsuite/gas/nios2/movi.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movi.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,21 @@
++# Source file used to test silent conversion of
++# movi to orhi etc
++
++foo:
++# this doesn't get converted
++movi r2, 0x20
++
++# this does
++movi r2, 0x20000000
++
++# addi should convert only if the source register is r0
++addi r2, r0, 0xffff0000
++# but we can't test for non-conversion because the value would
++# be out of range
++
++# logical ops should convert for any register
++ori r2, r5, 0xffff0000
++xori r2, r10, 0xffff0000
++andi r2, r15, 0xffff0000
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/movia.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movia.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,18 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 movia
++
++# Test the movia instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> movhi r2,32897
++0+0004 <[^>]*> addi r2,r2,-32640
++0+0008 <[^>]*> movhi r3,0
++ 8: R_NIOS2_HIADJ16 sym\+0x80000000
++0+000c <[^>]*> addi r3,r3,0
++ c: R_NIOS2_LO16 sym\+0x80000000
++0+0010 <[^>]*> movhi r4,0
++ 10: R_NIOS2_HIADJ16 sym\+0x80000001
++0+0014 <[^>]*> addi r4,r4,0
++ 14: R_NIOS2_LO16 sym\+0x80000001
+--- binutils-2.15/gas/testsuite/gas/nios2/movia.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/movia.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,6 @@
++# Test program for movia reg, immed32 macro
++
++foo:
++ movia r2, 0x80808080
++ movia r3, sym + 0x80000000
++ movia r4, sym - 0x7fffffff
+--- binutils-2.15/gas/testsuite/gas/nios2/mul.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mul.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,19 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 mul
++
++# Test the mul macro.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> mul r4,r5,r6
++0+0004 <[^>]*> muli r4,r5,0
++0+0008 <[^>]*> muli r4,r5,1
++0+000c <[^>]*> muli r4,r5,-32768
++0+0010 <[^>]*> muli r4,r5,32767
++0+0014 <[^>]*> muli r4,r5,0
++[ ]*14: R_NIOS2_S16 undefined_symbol
++0+0018 <[^>]*> muli r4,r5,16448
++0+001c <[^>]*> mulxss r4,r5,r6
++0+0020 <[^>]*> mulxsu r4,r5,r6
++0+0024 <[^>]*> mulxuu r4,r5,r6
+--- binutils-2.15/gas/testsuite/gas/nios2/mul.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/mul.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,15 @@
++# Source file used to test the mul macro.
++
++foo:
++ mul r4,r5,r6
++ muli r4,r5,0
++ muli r4,r5,1
++ muli r4,r5,-0x8000
++ muli r4,r5,0x7fff
++ muli r4,r5,undefined_symbol
++ muli r4,r5,defined_symbol
++ mulxss r4,r5,r6
++ mulxsu r4,r5,r6
++ mulxuu r4,r5,r6
++.data
++.set defined_symbol, 0x4040
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,17 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 reloc against merged strings
++
++# Test the merged duplicate strings
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> addi r2,r2,32
++0+0004 <[^>]*> addi r3,r3,63
++0+0008 <[^>]*> addi r4,r4,70
++0+000c <[^>]*> call 00000000 <func1>
++0+0010 <[^>]*> addi r2,r2,101
++0+0014 <[^>]*> addi r3,r3,63
++0+0018 <[^>]*> addi r4,r4,132
++0+001c <[^>]*> call 00000000 <func1>
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-merged_strings.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,21 @@
++ .section .rodata.str1.1,"aMS",@progbits,1
++.LC0:
++ .string "DHRYSTONE PROGRAM, 1'ST STRING"
++.LC1:
++ .string "COMMON"
++.LC2:
++ .string "DHRYSTONE PROGRAM, 2'ND STRING"
++
++ .section .text
++ .align 3
++ .global func1
++ .type func1, @function
++func1:
++ #movhi $2, %hiadj(.LC0)
++ addi r2, r2, .LC0
++ #movhi $3, %hiadj(.LC1)
++ addi r3, r3, .LC1
++ #movhi $4, %hiadj(.LC2)
++ addi r4, r4, .LC2
++ .size func1, .-func1
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++#objdump: -s
++#name: NIOS2 R_NIOS2_BFD_RELOC_XX
++
++# Test the branch instructions.
++.*: +file format elf32-littlenios2
++
++Contents of section .text:
++ 0000 fa00cefa efbeadde facefaef beadde00 ................
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-bfd-reloc-xx.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,9 @@
++# Test for New Jersey 32-bit, 16 and 8-bit relocations
++
++.global byte_sym
++.global short_sym
++.global long_sym
++
++.set byte_sym, 0xFA
++.set short_sym, 0xFACE
++.set long_sym, 0xDEADBEEF
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 R_NIOS2_CACHE_OPX
++
++# Test the cache opx relocation
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> cache 0x1f,0x1000\(\$1\)
++0+0004 <[^>]*> Address 0x4 is out of bounds.
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-cache-opx.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,6 @@
++# Test the imm5 relocation
++
++.text
++ cache imm5, 0x1000($1)
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,76 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 nios2-reloc-r-nios2-call26
++
++# Test the branch instructions.
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++[ ]*\.\.\.
++[ ]*0: R_NIOS2_CALL26 .text\+0x100
++[ ]*4: R_NIOS2_CALL26 globalfunc
++0+0008 <[^>]*> nop
++0+000c <[^>]*> nop
++0+0010 <[^>]*> nop
++0+0014 <[^>]*> nop
++0+0018 <[^>]*> nop
++0+001c <[^>]*> nop
++0+0020 <[^>]*> nop
++0+0024 <[^>]*> nop
++0+0028 <[^>]*> nop
++0+002c <[^>]*> nop
++0+0030 <[^>]*> nop
++0+0034 <[^>]*> nop
++0+0038 <[^>]*> nop
++0+003c <[^>]*> nop
++0+0040 <[^>]*> nop
++0+0044 <[^>]*> nop
++0+0048 <[^>]*> nop
++0+004c <[^>]*> nop
++0+0050 <[^>]*> nop
++0+0054 <[^>]*> nop
++0+0058 <[^>]*> nop
++0+005c <[^>]*> nop
++0+0060 <[^>]*> nop
++0+0064 <[^>]*> nop
++0+0068 <[^>]*> nop
++0+006c <[^>]*> nop
++0+0070 <[^>]*> nop
++0+0074 <[^>]*> nop
++0+0078 <[^>]*> nop
++0+007c <[^>]*> nop
++0+0080 <[^>]*> nop
++0+0084 <[^>]*> nop
++0+0088 <[^>]*> nop
++0+008c <[^>]*> nop
++0+0090 <[^>]*> nop
++0+0094 <[^>]*> nop
++0+0098 <[^>]*> nop
++0+009c <[^>]*> nop
++0+00a0 <[^>]*> nop
++0+00a4 <[^>]*> nop
++0+00a8 <[^>]*> nop
++0+00ac <[^>]*> nop
++0+00b0 <[^>]*> nop
++0+00b4 <[^>]*> nop
++0+00b8 <[^>]*> nop
++0+00bc <[^>]*> nop
++0+00c0 <[^>]*> nop
++0+00c4 <[^>]*> nop
++0+00c8 <[^>]*> nop
++0+00cc <[^>]*> nop
++0+00d0 <[^>]*> nop
++0+00d4 <[^>]*> nop
++0+00d8 <[^>]*> nop
++0+00dc <[^>]*> nop
++0+00e0 <[^>]*> nop
++0+00e4 <[^>]*> nop
++0+00e8 <[^>]*> nop
++0+00ec <[^>]*> nop
++0+00f0 <[^>]*> nop
++0+00f4 <[^>]*> nop
++0+00f8 <[^>]*> nop
++0+00fc <[^>]*> nop
++0+0100 <[^>]*> nop
++ ...
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-call26.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,12 @@
++# Test for New Jersey 32-bit relocations
++
++.global globalfunc
++.text
++.set norelax
++start:
++ call localfunc
++ call globalfunc
++
++.align 8
++localfunc:
++ nop
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,15 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 gp-relative relocations
++
++# Test the %gprel macro.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> movui gp,32784
++0+0004 <[^>]*> ldw at,-32756\(gp\)
++0+0008 <[^>]*> ldw r2,-32752\(gp\)
++0+000c <[^>]*> ldb r3,-32748\(gp\)
++0+0010 <[^>]*> ldw at,-32744\(gp\)
++0+0014 <[^>]*> ldw r2,-32740\(gp\)
++0+0018 <[^>]*> ldb r3,-32736\(gp\)
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-gprel.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,24 @@
++.sdata
++sym1:
++.long 0xdead
++sym2:
++.long 0xbeef
++sym3:
++.byte 0x7f
++
++.section sdata1, "s"
++sym4:
++.long 0xdead
++sym5:
++.long 0xbeef
++sym6:
++.byte 0x7f
++
++.text
++ movui gp, _gp
++ ldw r1, %gprel(sym1)(gp)
++ ldw r2, %gprel(sym2)(gp)
++ ldb r3, %gprel(sym3)(gp)
++ ldw r1, %gprel(sym4)(gp)
++ ldw r2, %gprel(sym5)(gp)
++ ldb r3, %gprel(sym6)(gp)
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 R_NIOS2_HI16,LO16,HIADJ16
++
++# Test the %hi, %lo and %hiadi relocations
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> addi at,at,-8531
++0+0004 <[^>]*> addi at,at,-16657
++0+0008 <[^>]*> addi at,at,-8530
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-hilo16.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,6 @@
++# Test the %hi, lo and %hiadj relocations
++
++.text
++ addi r1, r1, %hi(long_symbol)
++ addi r1, r1, %lo(long_symbol)
++ addi r1, r1, %hiadj(long_symbol)
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 R_NIOS2_IMM5
++
++# Test the branch instructions.
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> roli at,at,31
++0+0004 <.[^>]*> Address 0x4 is out of bounds.
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-imm5.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,6 @@
++# Test the imm5 relocation
++
++.text
++ roli r1, r1, imm5
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,12 @@
++#objdump: -s
++#name: NIOS2 R_NIOS2_PCREL16
++
++# Test the relative branch relocations.
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++
++0+0000 <[^>]*> br 00000008 <ext_label>
++0+0004 <[^>]*> br 00000018 <__bss_start\+0x8>
++0+0008 <[^>]*> nop
++0+000c <[^>]*> nop
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-pcrel16.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,6 @@
++# Test for pc-relative relocations
++.set norelax
++.text
++ br ext_label
++ br ext_label + 16
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++
++a.exe: file format elf32-littlenios2
++
++Contents of section .text:
++ 0000 04004408 04006008 c4ff5f08 44004808 ..D...`..._.D.H.
++ 0010 44004008 D.@.
++Contents of section .data:
++Contents of section .sbss:
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,9 @@
++#objdump: -s
++#name: NIOS2 R_NIOS2_S16
++
++# Test the signed 16-bit relocations.
++.*: +file format elf32-littlenios2
++
++Contents of section .text:
++ 0000 04004408 04006008 c4ff5f08 44004808 ..D...`..._.D.H.
++ 0010 44004008 D.@.
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-s16.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,13 @@
++# Test for New Jersey 32-bit, 16 and 8-bit relocations
++
++.set some_other_sym, 0x1000
++.text
++# signed 16-bit relocation
++ addi r1, r1, some_sym
++ addi r1, r1, min
++ addi r1, r1, max
++ addi r1, r1, some_sym + some_other_sym + 1
++ addi r1, r1, some_sym - some_other_sym + 1
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,9 @@
++#objdump: -s
++#name: NIOS2 R_NIOS2_U16
++
++# Test the unsigned 16-bit relocations.
++.*: +file format elf32-littlenios2
++
++Contents of section .text:
++ 0000 0c004408 0c004008 ccff7f08 4c004808 ..D...@.....L.H.
++ 0010 4c004008 L.@.
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2-reloc-r-nios2-u16.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,13 @@
++# Test for New Jersey 32-bit, 16 and 8-bit relocations
++
++.set some_other_sym, 0x1000
++.text
++# signed 16-bit relocation
++ andi r1, r1, some_sym
++ andi r1, r1, min
++ andi r1, r1, max
++ andi r1, r1, some_sym + some_other_sym + 1
++ andi r1, r1, some_sym - some_other_sym + 1
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/nios2.exp 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nios2.exp 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,200 @@
++#
++# Some generic New Jersey tests
++#
++
++# "LOSE" marks information about tests which fail at a particular point
++# in time, but which are not XFAILed. Either they used to pass
++# and indicate either regressions or the need to tweak the tests to keep
++# up the with code, or they are new tests and it is unknown whether or not
++# they should pass as-is for the given object formats.
++
++if ![info exists LD] then {
++ set LD [findfile $base_dir/../../ld/ld-new]
++}
++
++proc run_list_test { name } {
++ global srcdir subdir
++ set testname "NIOS2 $name"
++ set file $srcdir/$subdir/$name
++ gas_run ${name}.s "" ">&dump.out"
++ if { [regexp_diff "dump.out" "${file}.l"] } then {
++ fail $testname
++ verbose "output is [file_contents "dump.out"]" 2
++ return
++ }
++ pass $testname
++}
++
++proc ld_run { obj0 obj1 opts } {
++ global LD
++ global comp_output
++ global srcdir
++ global subdir
++ global host_triplet
++
++ verbose "Executing $srcdir/lib/run $LD $obj0 $obj1 $opts"
++ catch "exec $srcdir/lib/run $LD $obj0 $obj1 $opts" comp_output
++ set comp_output [prune_warnings $comp_output]
++ verbose "output was $comp_output"
++ return [list $comp_output ""];
++}
++
++proc objdump_run { prog opts redir } {
++ global OBJDUMP
++ global comp_output
++ global srcdir
++ global subdir
++ global host_triplet
++
++ verbose "Executing $srcdir/lib/run $OBJDUMP -s $prog"
++ catch "exec $srcdir/lib/run $OBJDUMP $opts $prog $redir" comp_output
++ set comp_output [prune_warnings $comp_output]
++ verbose "output was $comp_output"
++ return [list $comp_output ""];
++}
++
++proc run_reloc_test { name other objdump_opts} {
++ global LD OBJDUMP AS
++ global srcdir subdir
++ set testname "NIOS2 $name"
++ set file $srcdir/$subdir/$name
++ set file1 $srcdir/$subdir/$other
++ gas_run ${name}.s "-o ${name}.o" ""
++ gas_run ${other}.s "-o ${other}.o" ""
++ ld_run ${name}.o ${other}.o "-o ${name}.exe"
++ objdump_run ${name}.exe ${objdump_opts} ">&dump.out"
++ if { [regexp_diff "dump.out" "${file}.d"] } then {
++ fail $testname
++ verbose "output is [file_contents "dump.out"]" 2
++ return
++ }
++ pass $testname
++}
++
++proc run_gpreloc_test { name objdump_opts} {
++ global LD OBJDUMP AS
++ global srcdir subdir
++ set testname "NIOS2 $name"
++ set file $srcdir/$subdir/$name
++ gas_run ${name}.s "-o ${name}.o" ""
++ ld_run ${name}.o "" "-o ${name}.exe"
++ objdump_run ${name}.exe ${objdump_opts} ">&dump.out"
++ if { [regexp_diff "dump.out" "${file}.d"] } then {
++ fail $testname
++ verbose "output is [file_contents "dump.out"]" 2
++ return
++ }
++ pass $testname
++}
++
++proc run_relax_test { name asm_opts link_opts objdump_opts} {
++ global LD OBJDUMP AS
++ global srcdir subdir
++ set testname "NIOS2 $name"
++ set file $srcdir/$subdir/$name
++ gas_run ${name}.s "-o ${name}.o" ${asm_opts}
++ ld_run ${name}.o "" "-o ${name}.exe -T${srcdir}/${subdir}/${link_opts} --relax"
++ objdump_run ${name}.exe ${objdump_opts} ">&dump.out"
++ if { [regexp_diff "dump.out" "${file}.d"] } then {
++ fail $testname
++ verbose "output is [file_contents "dump.out"]" 2
++ return
++ }
++ pass $testname
++}
++
++proc run_relax_section_test { name asm_opts objdump_opts} {
++ global LD OBJDUMP AS
++ global srcdir subdir
++ set testname "NIOS2 $name"
++ set file $srcdir/$subdir/$name
++ gas_run ${name}.s "-o ${name}.o" ${asm_opts}
++ ld_run ${name}.o "" "-o ${name}.exe"
++ objdump_run ${name}.exe ${objdump_opts} ">&dump.out"
++ if { [regexp_diff "dump.out" "${file}.d"] } then {
++ fail $testname
++ verbose "output is [file_contents "dump.out"]" 2
++ return
++ }
++ pass $testname
++}
++
++if { [istarget nios2-*-elf] } then {
++ set elf 1
++
++ run_dump_test "add"
++ run_dump_test "and"
++ run_dump_test "align_fill"
++ run_dump_test "align_text"
++
++ run_dump_test "branch"
++
++
++ run_dump_test "break"
++ run_dump_test "bret"
++ run_dump_test "cache"
++
++ run_dump_test "call"
++
++
++ run_dump_test "cmp"
++
++
++ run_dump_test "jmp"
++ run_dump_test "ldw"
++ run_dump_test "ldh"
++ run_dump_test "ldb"
++
++
++ run_dump_test "mul"
++
++ run_dump_test "nor"
++ run_dump_test "or"
++
++ run_dump_test "ctl"
++ run_dump_test "ret"
++ run_dump_test "rotate"
++
++ run_dump_test "stw"
++ run_dump_test "sth"
++ run_dump_test "stb"
++
++ run_dump_test "sub"
++ run_dump_test "sync"
++ run_dump_test "trap"
++ run_dump_test "tret"
++
++ run_dump_test "custom"
++ run_dump_test "xor"
++ run_dump_test "movia"
++
++ run_dump_test "complex"
++ run_dump_test "comments"
++ run_dump_test "etbt"
++ run_dump_test "lineseparator"
++ run_dump_test "movi"
++
++ run_list_test "illegal"
++ run_list_test "warn_nobreak"
++ run_list_test "warn_noat"
++
++
++# now lets make sure that the assembler generates all the relocations
++# that it should correctly, and that the linker links them correctly
++
++ run_reloc_test "nios2-reloc-r-nios2-bfd-reloc-xx" "reloc_symbols" "-s"
++ run_reloc_test "nios2-reloc-r-nios2-s16" "s16_symbol" "-s"
++ run_reloc_test "nios2-reloc-r-nios2-u16" "u16_symbol" "-s"
++ run_reloc_test "nios2-reloc-r-nios2-pcrel16" "pcrel_label" "-dr --prefix-addresses"
++ run_reloc_test "nios2-reloc-r-nios2-hilo16" "hilo_symbol" "-dr --prefix-addresses"
++ run_dump_test "nios2-reloc-r-nios2-call26"
++ run_reloc_test "nios2-reloc-r-nios2-imm5" "imm5_symbol" "-dr --prefix-addresses"
++ run_reloc_test "nios2-reloc-merged_strings" "str2" "-dr --prefix-addresses"
++ run_gpreloc_test "nios2-reloc-r-nios2-gprel" "-dr --prefix-addresses"
++
++# relaxation tests
++ run_relax_test "relax_ujmp" "-relax-all" "link1.lds" "-dr --prefix-addresses"
++ run_relax_test "relax_cjmp" "-relax-all" "link1.lds" "-dr --prefix-addresses"
++ run_relax_test "relax_callr" "-relax-all" "link3.lds" "-dr --prefix-addresses"
++ run_relax_section_test "relax_section" "-relax-section" "-dr --prefix-addresses"
++}
+--- binutils-2.15/gas/testsuite/gas/nios2/nor.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nor.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,9 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 nor
++
++# Test the nor instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> nor r6,r8,r10
+--- binutils-2.15/gas/testsuite/gas/nios2/nor.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/nor.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++# Source file used to test the nor instruction
++
++foo:
++ nor r6,r8,r10
++
+--- binutils-2.15/gas/testsuite/gas/nios2/or.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/or.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 or
++
++# Test the nor instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> or r6,r8,r10
++0+0004 <[^>]*> orhi r6,r7,65535
++0+0008 <[^>]*> ori r6,r7,65535
+--- binutils-2.15/gas/testsuite/gas/nios2/or.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/or.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,7 @@
++# Source file used to test the nor instruction
++
++foo:
++ or r6,r8,r10
++ orhi r6,r7,0xffff
++ ori r6,r7,0xffff
++
+--- binutils-2.15/gas/testsuite/gas/nios2/pcrel_label.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/pcrel_label.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++.text
++ext_label:
++ nop
++ nop
++.global ext_label
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_callr.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_callr.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,22 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 relax_callr
++# Test relaxation of callr
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section text1:
++00000000 <[^>]*> call 08000000 <func>
++00000004 <[^>]*> nop
++00000008 <[^>]*> nop
++0000000c <[^>]*> call 0800001c <func1>
++00000010 <[^>]*> nop
++00000014 <[^>]*> nop
++Disassembly of section text2:
++08000000 <[^>]*> nop
++08000004 <[^>]*> br 0800001c <func1>
++08000008 <[^>]*> nop
++0800000c <[^>]*> nop
++08000010 <[^>]*> nop
++08000014 <[^>]*> nop
++08000018 <[^>]*> nop
++0800001c <[^>]*> nop
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_callr.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_callr.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,17 @@
++# relaxation test for callr
++
++.globl text1
++.section text1, "ax", @progbits
++
++ call func
++ call func1
++
++.section text2, "ax", @progbits
++func:
++ nop
++ br func1
++ nop
++ nop
++ nop
++func1:
++ nop
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_cjmp.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_cjmp.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8227 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 relax_cjmp
++
++# Test relaxation of conditional jumps
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section text2:
++00000000 <[^>]*> bge r2,r3,00008000 <[^>]*>
++00000004 <[^>]*> nop
++00000008 <[^>]*> nop
++0000000c <[^>]*> nop
++00000010 <[^>]*> blt r3,r2,00000020 <[^>]*>
++00000014 <[^>]*> movhi at,1
++00000018 <[^>]*> ori at,at,36
++0000001c <[^>]*> jmp at
++00000020 <[^>]*> bge r3,r2,00000038 <[^>]*>
++00000024 <[^>]*> nop
++00000028 <[^>]*> nop
++0000002c <[^>]*> nop
++00000030 <[^>]*> nop
++00000034 <[^>]*> nop
++00000038 <[^>]*> nop
++Disassembly of section text1:
++00008000 <[^>]*> beq r2,r3,00010000 <[^>]*>
++00008004 <[^>]*> nop
++00008008 <[^>]*> nop
++0000800c <[^>]*> nop
++00008010 <[^>]*> bne r2,r3,00008020 <[^>]*>
++00008014 <[^>]*> movhi at,1
++00008018 <[^>]*> ori at,at,36
++0000801c <[^>]*> jmp at
++00008020 <[^>]*> nop
++00008024 <[^>]*> nop
++00008028 <[^>]*> nop
++0000802c <[^>]*> nop
++00008030 <[^>]*> nop
++00008034 <[^>]*> nop
++00008038 <[^>]*> nop
++0000803c <[^>]*> nop
++00008040 <[^>]*> nop
++00008044 <[^>]*> nop
++00008048 <[^>]*> nop
++0000804c <[^>]*> nop
++00008050 <[^>]*> nop
++00008054 <[^>]*> nop
++00008058 <[^>]*> nop
++0000805c <[^>]*> nop
++00008060 <[^>]*> nop
++00008064 <[^>]*> nop
++00008068 <[^>]*> nop
++0000806c <[^>]*> nop
++00008070 <[^>]*> nop
++00008074 <[^>]*> nop
++00008078 <[^>]*> nop
++0000807c <[^>]*> nop
++00008080 <[^>]*> nop
++00008084 <[^>]*> nop
++00008088 <[^>]*> nop
++0000808c <[^>]*> nop
++00008090 <[^>]*> nop
++00008094 <[^>]*> nop
++00008098 <[^>]*> nop
++0000809c <[^>]*> nop
++000080a0 <[^>]*> nop
++000080a4 <[^>]*> nop
++000080a8 <[^>]*> nop
++000080ac <[^>]*> nop
++000080b0 <[^>]*> nop
++000080b4 <[^>]*> nop
++000080b8 <[^>]*> nop
++000080bc <[^>]*> nop
++000080c0 <[^>]*> nop
++000080c4 <[^>]*> nop
++000080c8 <[^>]*> nop
++000080cc <[^>]*> nop
++000080d0 <[^>]*> nop
++000080d4 <[^>]*> nop
++000080d8 <[^>]*> nop
++000080dc <[^>]*> nop
++000080e0 <[^>]*> nop
++000080e4 <[^>]*> nop
++000080e8 <[^>]*> nop
++000080ec <[^>]*> nop
++000080f0 <[^>]*> nop
++000080f4 <[^>]*> nop
++000080f8 <[^>]*> nop
++000080fc <[^>]*> nop
++00008100 <[^>]*> nop
++00008104 <[^>]*> nop
++00008108 <[^>]*> nop
++0000810c <[^>]*> nop
++00008110 <[^>]*> nop
++00008114 <[^>]*> nop
++00008118 <[^>]*> nop
++0000811c <[^>]*> nop
++00008120 <[^>]*> nop
++00008124 <[^>]*> nop
++00008128 <[^>]*> nop
++0000812c <[^>]*> nop
++00008130 <[^>]*> nop
++00008134 <[^>]*> nop
++00008138 <[^>]*> nop
++0000813c <[^>]*> nop
++00008140 <[^>]*> nop
++00008144 <[^>]*> nop
++00008148 <[^>]*> nop
++0000814c <[^>]*> nop
++00008150 <[^>]*> nop
++00008154 <[^>]*> nop
++00008158 <[^>]*> nop
++0000815c <[^>]*> nop
++00008160 <[^>]*> nop
++00008164 <[^>]*> nop
++00008168 <[^>]*> nop
++0000816c <[^>]*> nop
++00008170 <[^>]*> nop
++00008174 <[^>]*> nop
++00008178 <[^>]*> nop
++0000817c <[^>]*> nop
++00008180 <[^>]*> nop
++00008184 <[^>]*> nop
++00008188 <[^>]*> nop
++0000818c <[^>]*> nop
++00008190 <[^>]*> nop
++00008194 <[^>]*> nop
++00008198 <[^>]*> nop
++0000819c <[^>]*> nop
++000081a0 <[^>]*> nop
++000081a4 <[^>]*> nop
++000081a8 <[^>]*> nop
++000081ac <[^>]*> nop
++000081b0 <[^>]*> nop
++000081b4 <[^>]*> nop
++000081b8 <[^>]*> nop
++000081bc <[^>]*> nop
++000081c0 <[^>]*> nop
++000081c4 <[^>]*> nop
++000081c8 <[^>]*> nop
++000081cc <[^>]*> nop
++000081d0 <[^>]*> nop
++000081d4 <[^>]*> nop
++000081d8 <[^>]*> nop
++000081dc <[^>]*> nop
++000081e0 <[^>]*> nop
++000081e4 <[^>]*> nop
++000081e8 <[^>]*> nop
++000081ec <[^>]*> nop
++000081f0 <[^>]*> nop
++000081f4 <[^>]*> nop
++000081f8 <[^>]*> nop
++000081fc <[^>]*> nop
++00008200 <[^>]*> nop
++00008204 <[^>]*> nop
++00008208 <[^>]*> nop
++0000820c <[^>]*> nop
++00008210 <[^>]*> nop
++00008214 <[^>]*> nop
++00008218 <[^>]*> nop
++0000821c <[^>]*> nop
++00008220 <[^>]*> nop
++00008224 <[^>]*> nop
++00008228 <[^>]*> nop
++0000822c <[^>]*> nop
++00008230 <[^>]*> nop
++00008234 <[^>]*> nop
++00008238 <[^>]*> nop
++0000823c <[^>]*> nop
++00008240 <[^>]*> nop
++00008244 <[^>]*> nop
++00008248 <[^>]*> nop
++0000824c <[^>]*> nop
++00008250 <[^>]*> nop
++00008254 <[^>]*> nop
++00008258 <[^>]*> nop
++0000825c <[^>]*> nop
++00008260 <[^>]*> nop
++00008264 <[^>]*> nop
++00008268 <[^>]*> nop
++0000826c <[^>]*> nop
++00008270 <[^>]*> nop
++00008274 <[^>]*> nop
++00008278 <[^>]*> nop
++0000827c <[^>]*> nop
++00008280 <[^>]*> nop
++00008284 <[^>]*> nop
++00008288 <[^>]*> nop
++0000828c <[^>]*> nop
++00008290 <[^>]*> nop
++00008294 <[^>]*> nop
++00008298 <[^>]*> nop
++0000829c <[^>]*> nop
++000082a0 <[^>]*> nop
++000082a4 <[^>]*> nop
++000082a8 <[^>]*> nop
++000082ac <[^>]*> nop
++000082b0 <[^>]*> nop
++000082b4 <[^>]*> nop
++000082b8 <[^>]*> nop
++000082bc <[^>]*> nop
++000082c0 <[^>]*> nop
++000082c4 <[^>]*> nop
++000082c8 <[^>]*> nop
++000082cc <[^>]*> nop
++000082d0 <[^>]*> nop
++000082d4 <[^>]*> nop
++000082d8 <[^>]*> nop
++000082dc <[^>]*> nop
++000082e0 <[^>]*> nop
++000082e4 <[^>]*> nop
++000082e8 <[^>]*> nop
++000082ec <[^>]*> nop
++000082f0 <[^>]*> nop
++000082f4 <[^>]*> nop
++000082f8 <[^>]*> nop
++000082fc <[^>]*> nop
++00008300 <[^>]*> nop
++00008304 <[^>]*> nop
++00008308 <[^>]*> nop
++0000830c <[^>]*> nop
++00008310 <[^>]*> nop
++00008314 <[^>]*> nop
++00008318 <[^>]*> nop
++0000831c <[^>]*> nop
++00008320 <[^>]*> nop
++00008324 <[^>]*> nop
++00008328 <[^>]*> nop
++0000832c <[^>]*> nop
++00008330 <[^>]*> nop
++00008334 <[^>]*> nop
++00008338 <[^>]*> nop
++0000833c <[^>]*> nop
++00008340 <[^>]*> nop
++00008344 <[^>]*> nop
++00008348 <[^>]*> nop
++0000834c <[^>]*> nop
++00008350 <[^>]*> nop
++00008354 <[^>]*> nop
++00008358 <[^>]*> nop
++0000835c <[^>]*> nop
++00008360 <[^>]*> nop
++00008364 <[^>]*> nop
++00008368 <[^>]*> nop
++0000836c <[^>]*> nop
++00008370 <[^>]*> nop
++00008374 <[^>]*> nop
++00008378 <[^>]*> nop
++0000837c <[^>]*> nop
++00008380 <[^>]*> nop
++00008384 <[^>]*> nop
++00008388 <[^>]*> nop
++0000838c <[^>]*> nop
++00008390 <[^>]*> nop
++00008394 <[^>]*> nop
++00008398 <[^>]*> nop
++0000839c <[^>]*> nop
++000083a0 <[^>]*> nop
++000083a4 <[^>]*> nop
++000083a8 <[^>]*> nop
++000083ac <[^>]*> nop
++000083b0 <[^>]*> nop
++000083b4 <[^>]*> nop
++000083b8 <[^>]*> nop
++000083bc <[^>]*> nop
++000083c0 <[^>]*> nop
++000083c4 <[^>]*> nop
++000083c8 <[^>]*> nop
++000083cc <[^>]*> nop
++000083d0 <[^>]*> nop
++000083d4 <[^>]*> nop
++000083d8 <[^>]*> nop
++000083dc <[^>]*> nop
++000083e0 <[^>]*> nop
++000083e4 <[^>]*> nop
++000083e8 <[^>]*> nop
++000083ec <[^>]*> nop
++000083f0 <[^>]*> nop
++000083f4 <[^>]*> nop
++000083f8 <[^>]*> nop
++000083fc <[^>]*> nop
++00008400 <[^>]*> nop
++00008404 <[^>]*> nop
++00008408 <[^>]*> nop
++0000840c <[^>]*> nop
++00008410 <[^>]*> nop
++00008414 <[^>]*> nop
++00008418 <[^>]*> nop
++0000841c <[^>]*> nop
++00008420 <[^>]*> nop
++00008424 <[^>]*> nop
++00008428 <[^>]*> nop
++0000842c <[^>]*> nop
++00008430 <[^>]*> nop
++00008434 <[^>]*> nop
++00008438 <[^>]*> nop
++0000843c <[^>]*> nop
++00008440 <[^>]*> nop
++00008444 <[^>]*> nop
++00008448 <[^>]*> nop
++0000844c <[^>]*> nop
++00008450 <[^>]*> nop
++00008454 <[^>]*> nop
++00008458 <[^>]*> nop
++0000845c <[^>]*> nop
++00008460 <[^>]*> nop
++00008464 <[^>]*> nop
++00008468 <[^>]*> nop
++0000846c <[^>]*> nop
++00008470 <[^>]*> nop
++00008474 <[^>]*> nop
++00008478 <[^>]*> nop
++0000847c <[^>]*> nop
++00008480 <[^>]*> nop
++00008484 <[^>]*> nop
++00008488 <[^>]*> nop
++0000848c <[^>]*> nop
++00008490 <[^>]*> nop
++00008494 <[^>]*> nop
++00008498 <[^>]*> nop
++0000849c <[^>]*> nop
++000084a0 <[^>]*> nop
++000084a4 <[^>]*> nop
++000084a8 <[^>]*> nop
++000084ac <[^>]*> nop
++000084b0 <[^>]*> nop
++000084b4 <[^>]*> nop
++000084b8 <[^>]*> nop
++000084bc <[^>]*> nop
++000084c0 <[^>]*> nop
++000084c4 <[^>]*> nop
++000084c8 <[^>]*> nop
++000084cc <[^>]*> nop
++000084d0 <[^>]*> nop
++000084d4 <[^>]*> nop
++000084d8 <[^>]*> nop
++000084dc <[^>]*> nop
++000084e0 <[^>]*> nop
++000084e4 <[^>]*> nop
++000084e8 <[^>]*> nop
++000084ec <[^>]*> nop
++000084f0 <[^>]*> nop
++000084f4 <[^>]*> nop
++000084f8 <[^>]*> nop
++000084fc <[^>]*> nop
++00008500 <[^>]*> nop
++00008504 <[^>]*> nop
++00008508 <[^>]*> nop
++0000850c <[^>]*> nop
++00008510 <[^>]*> nop
++00008514 <[^>]*> nop
++00008518 <[^>]*> nop
++0000851c <[^>]*> nop
++00008520 <[^>]*> nop
++00008524 <[^>]*> nop
++00008528 <[^>]*> nop
++0000852c <[^>]*> nop
++00008530 <[^>]*> nop
++00008534 <[^>]*> nop
++00008538 <[^>]*> nop
++0000853c <[^>]*> nop
++00008540 <[^>]*> nop
++00008544 <[^>]*> nop
++00008548 <[^>]*> nop
++0000854c <[^>]*> nop
++00008550 <[^>]*> nop
++00008554 <[^>]*> nop
++00008558 <[^>]*> nop
++0000855c <[^>]*> nop
++00008560 <[^>]*> nop
++00008564 <[^>]*> nop
++00008568 <[^>]*> nop
++0000856c <[^>]*> nop
++00008570 <[^>]*> nop
++00008574 <[^>]*> nop
++00008578 <[^>]*> nop
++0000857c <[^>]*> nop
++00008580 <[^>]*> nop
++00008584 <[^>]*> nop
++00008588 <[^>]*> nop
++0000858c <[^>]*> nop
++00008590 <[^>]*> nop
++00008594 <[^>]*> nop
++00008598 <[^>]*> nop
++0000859c <[^>]*> nop
++000085a0 <[^>]*> nop
++000085a4 <[^>]*> nop
++000085a8 <[^>]*> nop
++000085ac <[^>]*> nop
++000085b0 <[^>]*> nop
++000085b4 <[^>]*> nop
++000085b8 <[^>]*> nop
++000085bc <[^>]*> nop
++000085c0 <[^>]*> nop
++000085c4 <[^>]*> nop
++000085c8 <[^>]*> nop
++000085cc <[^>]*> nop
++000085d0 <[^>]*> nop
++000085d4 <[^>]*> nop
++000085d8 <[^>]*> nop
++000085dc <[^>]*> nop
++000085e0 <[^>]*> nop
++000085e4 <[^>]*> nop
++000085e8 <[^>]*> nop
++000085ec <[^>]*> nop
++000085f0 <[^>]*> nop
++000085f4 <[^>]*> nop
++000085f8 <[^>]*> nop
++000085fc <[^>]*> nop
++00008600 <[^>]*> nop
++00008604 <[^>]*> nop
++00008608 <[^>]*> nop
++0000860c <[^>]*> nop
++00008610 <[^>]*> nop
++00008614 <[^>]*> nop
++00008618 <[^>]*> nop
++0000861c <[^>]*> nop
++00008620 <[^>]*> nop
++00008624 <[^>]*> nop
++00008628 <[^>]*> nop
++0000862c <[^>]*> nop
++00008630 <[^>]*> nop
++00008634 <[^>]*> nop
++00008638 <[^>]*> nop
++0000863c <[^>]*> nop
++00008640 <[^>]*> nop
++00008644 <[^>]*> nop
++00008648 <[^>]*> nop
++0000864c <[^>]*> nop
++00008650 <[^>]*> nop
++00008654 <[^>]*> nop
++00008658 <[^>]*> nop
++0000865c <[^>]*> nop
++00008660 <[^>]*> nop
++00008664 <[^>]*> nop
++00008668 <[^>]*> nop
++0000866c <[^>]*> nop
++00008670 <[^>]*> nop
++00008674 <[^>]*> nop
++00008678 <[^>]*> nop
++0000867c <[^>]*> nop
++00008680 <[^>]*> nop
++00008684 <[^>]*> nop
++00008688 <[^>]*> nop
++0000868c <[^>]*> nop
++00008690 <[^>]*> nop
++00008694 <[^>]*> nop
++00008698 <[^>]*> nop
++0000869c <[^>]*> nop
++000086a0 <[^>]*> nop
++000086a4 <[^>]*> nop
++000086a8 <[^>]*> nop
++000086ac <[^>]*> nop
++000086b0 <[^>]*> nop
++000086b4 <[^>]*> nop
++000086b8 <[^>]*> nop
++000086bc <[^>]*> nop
++000086c0 <[^>]*> nop
++000086c4 <[^>]*> nop
++000086c8 <[^>]*> nop
++000086cc <[^>]*> nop
++000086d0 <[^>]*> nop
++000086d4 <[^>]*> nop
++000086d8 <[^>]*> nop
++000086dc <[^>]*> nop
++000086e0 <[^>]*> nop
++000086e4 <[^>]*> nop
++000086e8 <[^>]*> nop
++000086ec <[^>]*> nop
++000086f0 <[^>]*> nop
++000086f4 <[^>]*> nop
++000086f8 <[^>]*> nop
++000086fc <[^>]*> nop
++00008700 <[^>]*> nop
++00008704 <[^>]*> nop
++00008708 <[^>]*> nop
++0000870c <[^>]*> nop
++00008710 <[^>]*> nop
++00008714 <[^>]*> nop
++00008718 <[^>]*> nop
++0000871c <[^>]*> nop
++00008720 <[^>]*> nop
++00008724 <[^>]*> nop
++00008728 <[^>]*> nop
++0000872c <[^>]*> nop
++00008730 <[^>]*> nop
++00008734 <[^>]*> nop
++00008738 <[^>]*> nop
++0000873c <[^>]*> nop
++00008740 <[^>]*> nop
++00008744 <[^>]*> nop
++00008748 <[^>]*> nop
++0000874c <[^>]*> nop
++00008750 <[^>]*> nop
++00008754 <[^>]*> nop
++00008758 <[^>]*> nop
++0000875c <[^>]*> nop
++00008760 <[^>]*> nop
++00008764 <[^>]*> nop
++00008768 <[^>]*> nop
++0000876c <[^>]*> nop
++00008770 <[^>]*> nop
++00008774 <[^>]*> nop
++00008778 <[^>]*> nop
++0000877c <[^>]*> nop
++00008780 <[^>]*> nop
++00008784 <[^>]*> nop
++00008788 <[^>]*> nop
++0000878c <[^>]*> nop
++00008790 <[^>]*> nop
++00008794 <[^>]*> nop
++00008798 <[^>]*> nop
++0000879c <[^>]*> nop
++000087a0 <[^>]*> nop
++000087a4 <[^>]*> nop
++000087a8 <[^>]*> nop
++000087ac <[^>]*> nop
++000087b0 <[^>]*> nop
++000087b4 <[^>]*> nop
++000087b8 <[^>]*> nop
++000087bc <[^>]*> nop
++000087c0 <[^>]*> nop
++000087c4 <[^>]*> nop
++000087c8 <[^>]*> nop
++000087cc <[^>]*> nop
++000087d0 <[^>]*> nop
++000087d4 <[^>]*> nop
++000087d8 <[^>]*> nop
++000087dc <[^>]*> nop
++000087e0 <[^>]*> nop
++000087e4 <[^>]*> nop
++000087e8 <[^>]*> nop
++000087ec <[^>]*> nop
++000087f0 <[^>]*> nop
++000087f4 <[^>]*> nop
++000087f8 <[^>]*> nop
++000087fc <[^>]*> nop
++00008800 <[^>]*> nop
++00008804 <[^>]*> nop
++00008808 <[^>]*> nop
++0000880c <[^>]*> nop
++00008810 <[^>]*> nop
++00008814 <[^>]*> nop
++00008818 <[^>]*> nop
++0000881c <[^>]*> nop
++00008820 <[^>]*> nop
++00008824 <[^>]*> nop
++00008828 <[^>]*> nop
++0000882c <[^>]*> nop
++00008830 <[^>]*> nop
++00008834 <[^>]*> nop
++00008838 <[^>]*> nop
++0000883c <[^>]*> nop
++00008840 <[^>]*> nop
++00008844 <[^>]*> nop
++00008848 <[^>]*> nop
++0000884c <[^>]*> nop
++00008850 <[^>]*> nop
++00008854 <[^>]*> nop
++00008858 <[^>]*> nop
++0000885c <[^>]*> nop
++00008860 <[^>]*> nop
++00008864 <[^>]*> nop
++00008868 <[^>]*> nop
++0000886c <[^>]*> nop
++00008870 <[^>]*> nop
++00008874 <[^>]*> nop
++00008878 <[^>]*> nop
++0000887c <[^>]*> nop
++00008880 <[^>]*> nop
++00008884 <[^>]*> nop
++00008888 <[^>]*> nop
++0000888c <[^>]*> nop
++00008890 <[^>]*> nop
++00008894 <[^>]*> nop
++00008898 <[^>]*> nop
++0000889c <[^>]*> nop
++000088a0 <[^>]*> nop
++000088a4 <[^>]*> nop
++000088a8 <[^>]*> nop
++000088ac <[^>]*> nop
++000088b0 <[^>]*> nop
++000088b4 <[^>]*> nop
++000088b8 <[^>]*> nop
++000088bc <[^>]*> nop
++000088c0 <[^>]*> nop
++000088c4 <[^>]*> nop
++000088c8 <[^>]*> nop
++000088cc <[^>]*> nop
++000088d0 <[^>]*> nop
++000088d4 <[^>]*> nop
++000088d8 <[^>]*> nop
++000088dc <[^>]*> nop
++000088e0 <[^>]*> nop
++000088e4 <[^>]*> nop
++000088e8 <[^>]*> nop
++000088ec <[^>]*> nop
++000088f0 <[^>]*> nop
++000088f4 <[^>]*> nop
++000088f8 <[^>]*> nop
++000088fc <[^>]*> nop
++00008900 <[^>]*> nop
++00008904 <[^>]*> nop
++00008908 <[^>]*> nop
++0000890c <[^>]*> nop
++00008910 <[^>]*> nop
++00008914 <[^>]*> nop
++00008918 <[^>]*> nop
++0000891c <[^>]*> nop
++00008920 <[^>]*> nop
++00008924 <[^>]*> nop
++00008928 <[^>]*> nop
++0000892c <[^>]*> nop
++00008930 <[^>]*> nop
++00008934 <[^>]*> nop
++00008938 <[^>]*> nop
++0000893c <[^>]*> nop
++00008940 <[^>]*> nop
++00008944 <[^>]*> nop
++00008948 <[^>]*> nop
++0000894c <[^>]*> nop
++00008950 <[^>]*> nop
++00008954 <[^>]*> nop
++00008958 <[^>]*> nop
++0000895c <[^>]*> nop
++00008960 <[^>]*> nop
++00008964 <[^>]*> nop
++00008968 <[^>]*> nop
++0000896c <[^>]*> nop
++00008970 <[^>]*> nop
++00008974 <[^>]*> nop
++00008978 <[^>]*> nop
++0000897c <[^>]*> nop
++00008980 <[^>]*> nop
++00008984 <[^>]*> nop
++00008988 <[^>]*> nop
++0000898c <[^>]*> nop
++00008990 <[^>]*> nop
++00008994 <[^>]*> nop
++00008998 <[^>]*> nop
++0000899c <[^>]*> nop
++000089a0 <[^>]*> nop
++000089a4 <[^>]*> nop
++000089a8 <[^>]*> nop
++000089ac <[^>]*> nop
++000089b0 <[^>]*> nop
++000089b4 <[^>]*> nop
++000089b8 <[^>]*> nop
++000089bc <[^>]*> nop
++000089c0 <[^>]*> nop
++000089c4 <[^>]*> nop
++000089c8 <[^>]*> nop
++000089cc <[^>]*> nop
++000089d0 <[^>]*> nop
++000089d4 <[^>]*> nop
++000089d8 <[^>]*> nop
++000089dc <[^>]*> nop
++000089e0 <[^>]*> nop
++000089e4 <[^>]*> nop
++000089e8 <[^>]*> nop
++000089ec <[^>]*> nop
++000089f0 <[^>]*> nop
++000089f4 <[^>]*> nop
++000089f8 <[^>]*> nop
++000089fc <[^>]*> nop
++00008a00 <[^>]*> nop
++00008a04 <[^>]*> nop
++00008a08 <[^>]*> nop
++00008a0c <[^>]*> nop
++00008a10 <[^>]*> nop
++00008a14 <[^>]*> nop
++00008a18 <[^>]*> nop
++00008a1c <[^>]*> nop
++00008a20 <[^>]*> nop
++00008a24 <[^>]*> nop
++00008a28 <[^>]*> nop
++00008a2c <[^>]*> nop
++00008a30 <[^>]*> nop
++00008a34 <[^>]*> nop
++00008a38 <[^>]*> nop
++00008a3c <[^>]*> nop
++00008a40 <[^>]*> nop
++00008a44 <[^>]*> nop
++00008a48 <[^>]*> nop
++00008a4c <[^>]*> nop
++00008a50 <[^>]*> nop
++00008a54 <[^>]*> nop
++00008a58 <[^>]*> nop
++00008a5c <[^>]*> nop
++00008a60 <[^>]*> nop
++00008a64 <[^>]*> nop
++00008a68 <[^>]*> nop
++00008a6c <[^>]*> nop
++00008a70 <[^>]*> nop
++00008a74 <[^>]*> nop
++00008a78 <[^>]*> nop
++00008a7c <[^>]*> nop
++00008a80 <[^>]*> nop
++00008a84 <[^>]*> nop
++00008a88 <[^>]*> nop
++00008a8c <[^>]*> nop
++00008a90 <[^>]*> nop
++00008a94 <[^>]*> nop
++00008a98 <[^>]*> nop
++00008a9c <[^>]*> nop
++00008aa0 <[^>]*> nop
++00008aa4 <[^>]*> nop
++00008aa8 <[^>]*> nop
++00008aac <[^>]*> nop
++00008ab0 <[^>]*> nop
++00008ab4 <[^>]*> nop
++00008ab8 <[^>]*> nop
++00008abc <[^>]*> nop
++00008ac0 <[^>]*> nop
++00008ac4 <[^>]*> nop
++00008ac8 <[^>]*> nop
++00008acc <[^>]*> nop
++00008ad0 <[^>]*> nop
++00008ad4 <[^>]*> nop
++00008ad8 <[^>]*> nop
++00008adc <[^>]*> nop
++00008ae0 <[^>]*> nop
++00008ae4 <[^>]*> nop
++00008ae8 <[^>]*> nop
++00008aec <[^>]*> nop
++00008af0 <[^>]*> nop
++00008af4 <[^>]*> nop
++00008af8 <[^>]*> nop
++00008afc <[^>]*> nop
++00008b00 <[^>]*> nop
++00008b04 <[^>]*> nop
++00008b08 <[^>]*> nop
++00008b0c <[^>]*> nop
++00008b10 <[^>]*> nop
++00008b14 <[^>]*> nop
++00008b18 <[^>]*> nop
++00008b1c <[^>]*> nop
++00008b20 <[^>]*> nop
++00008b24 <[^>]*> nop
++00008b28 <[^>]*> nop
++00008b2c <[^>]*> nop
++00008b30 <[^>]*> nop
++00008b34 <[^>]*> nop
++00008b38 <[^>]*> nop
++00008b3c <[^>]*> nop
++00008b40 <[^>]*> nop
++00008b44 <[^>]*> nop
++00008b48 <[^>]*> nop
++00008b4c <[^>]*> nop
++00008b50 <[^>]*> nop
++00008b54 <[^>]*> nop
++00008b58 <[^>]*> nop
++00008b5c <[^>]*> nop
++00008b60 <[^>]*> nop
++00008b64 <[^>]*> nop
++00008b68 <[^>]*> nop
++00008b6c <[^>]*> nop
++00008b70 <[^>]*> nop
++00008b74 <[^>]*> nop
++00008b78 <[^>]*> nop
++00008b7c <[^>]*> nop
++00008b80 <[^>]*> nop
++00008b84 <[^>]*> nop
++00008b88 <[^>]*> nop
++00008b8c <[^>]*> nop
++00008b90 <[^>]*> nop
++00008b94 <[^>]*> nop
++00008b98 <[^>]*> nop
++00008b9c <[^>]*> nop
++00008ba0 <[^>]*> nop
++00008ba4 <[^>]*> nop
++00008ba8 <[^>]*> nop
++00008bac <[^>]*> nop
++00008bb0 <[^>]*> nop
++00008bb4 <[^>]*> nop
++00008bb8 <[^>]*> nop
++00008bbc <[^>]*> nop
++00008bc0 <[^>]*> nop
++00008bc4 <[^>]*> nop
++00008bc8 <[^>]*> nop
++00008bcc <[^>]*> nop
++00008bd0 <[^>]*> nop
++00008bd4 <[^>]*> nop
++00008bd8 <[^>]*> nop
++00008bdc <[^>]*> nop
++00008be0 <[^>]*> nop
++00008be4 <[^>]*> nop
++00008be8 <[^>]*> nop
++00008bec <[^>]*> nop
++00008bf0 <[^>]*> nop
++00008bf4 <[^>]*> nop
++00008bf8 <[^>]*> nop
++00008bfc <[^>]*> nop
++00008c00 <[^>]*> nop
++00008c04 <[^>]*> nop
++00008c08 <[^>]*> nop
++00008c0c <[^>]*> nop
++00008c10 <[^>]*> nop
++00008c14 <[^>]*> nop
++00008c18 <[^>]*> nop
++00008c1c <[^>]*> nop
++00008c20 <[^>]*> nop
++00008c24 <[^>]*> nop
++00008c28 <[^>]*> nop
++00008c2c <[^>]*> nop
++00008c30 <[^>]*> nop
++00008c34 <[^>]*> nop
++00008c38 <[^>]*> nop
++00008c3c <[^>]*> nop
++00008c40 <[^>]*> nop
++00008c44 <[^>]*> nop
++00008c48 <[^>]*> nop
++00008c4c <[^>]*> nop
++00008c50 <[^>]*> nop
++00008c54 <[^>]*> nop
++00008c58 <[^>]*> nop
++00008c5c <[^>]*> nop
++00008c60 <[^>]*> nop
++00008c64 <[^>]*> nop
++00008c68 <[^>]*> nop
++00008c6c <[^>]*> nop
++00008c70 <[^>]*> nop
++00008c74 <[^>]*> nop
++00008c78 <[^>]*> nop
++00008c7c <[^>]*> nop
++00008c80 <[^>]*> nop
++00008c84 <[^>]*> nop
++00008c88 <[^>]*> nop
++00008c8c <[^>]*> nop
++00008c90 <[^>]*> nop
++00008c94 <[^>]*> nop
++00008c98 <[^>]*> nop
++00008c9c <[^>]*> nop
++00008ca0 <[^>]*> nop
++00008ca4 <[^>]*> nop
++00008ca8 <[^>]*> nop
++00008cac <[^>]*> nop
++00008cb0 <[^>]*> nop
++00008cb4 <[^>]*> nop
++00008cb8 <[^>]*> nop
++00008cbc <[^>]*> nop
++00008cc0 <[^>]*> nop
++00008cc4 <[^>]*> nop
++00008cc8 <[^>]*> nop
++00008ccc <[^>]*> nop
++00008cd0 <[^>]*> nop
++00008cd4 <[^>]*> nop
++00008cd8 <[^>]*> nop
++00008cdc <[^>]*> nop
++00008ce0 <[^>]*> nop
++00008ce4 <[^>]*> nop
++00008ce8 <[^>]*> nop
++00008cec <[^>]*> nop
++00008cf0 <[^>]*> nop
++00008cf4 <[^>]*> nop
++00008cf8 <[^>]*> nop
++00008cfc <[^>]*> nop
++00008d00 <[^>]*> nop
++00008d04 <[^>]*> nop
++00008d08 <[^>]*> nop
++00008d0c <[^>]*> nop
++00008d10 <[^>]*> nop
++00008d14 <[^>]*> nop
++00008d18 <[^>]*> nop
++00008d1c <[^>]*> nop
++00008d20 <[^>]*> nop
++00008d24 <[^>]*> nop
++00008d28 <[^>]*> nop
++00008d2c <[^>]*> nop
++00008d30 <[^>]*> nop
++00008d34 <[^>]*> nop
++00008d38 <[^>]*> nop
++00008d3c <[^>]*> nop
++00008d40 <[^>]*> nop
++00008d44 <[^>]*> nop
++00008d48 <[^>]*> nop
++00008d4c <[^>]*> nop
++00008d50 <[^>]*> nop
++00008d54 <[^>]*> nop
++00008d58 <[^>]*> nop
++00008d5c <[^>]*> nop
++00008d60 <[^>]*> nop
++00008d64 <[^>]*> nop
++00008d68 <[^>]*> nop
++00008d6c <[^>]*> nop
++00008d70 <[^>]*> nop
++00008d74 <[^>]*> nop
++00008d78 <[^>]*> nop
++00008d7c <[^>]*> nop
++00008d80 <[^>]*> nop
++00008d84 <[^>]*> nop
++00008d88 <[^>]*> nop
++00008d8c <[^>]*> nop
++00008d90 <[^>]*> nop
++00008d94 <[^>]*> nop
++00008d98 <[^>]*> nop
++00008d9c <[^>]*> nop
++00008da0 <[^>]*> nop
++00008da4 <[^>]*> nop
++00008da8 <[^>]*> nop
++00008dac <[^>]*> nop
++00008db0 <[^>]*> nop
++00008db4 <[^>]*> nop
++00008db8 <[^>]*> nop
++00008dbc <[^>]*> nop
++00008dc0 <[^>]*> nop
++00008dc4 <[^>]*> nop
++00008dc8 <[^>]*> nop
++00008dcc <[^>]*> nop
++00008dd0 <[^>]*> nop
++00008dd4 <[^>]*> nop
++00008dd8 <[^>]*> nop
++00008ddc <[^>]*> nop
++00008de0 <[^>]*> nop
++00008de4 <[^>]*> nop
++00008de8 <[^>]*> nop
++00008dec <[^>]*> nop
++00008df0 <[^>]*> nop
++00008df4 <[^>]*> nop
++00008df8 <[^>]*> nop
++00008dfc <[^>]*> nop
++00008e00 <[^>]*> nop
++00008e04 <[^>]*> nop
++00008e08 <[^>]*> nop
++00008e0c <[^>]*> nop
++00008e10 <[^>]*> nop
++00008e14 <[^>]*> nop
++00008e18 <[^>]*> nop
++00008e1c <[^>]*> nop
++00008e20 <[^>]*> nop
++00008e24 <[^>]*> nop
++00008e28 <[^>]*> nop
++00008e2c <[^>]*> nop
++00008e30 <[^>]*> nop
++00008e34 <[^>]*> nop
++00008e38 <[^>]*> nop
++00008e3c <[^>]*> nop
++00008e40 <[^>]*> nop
++00008e44 <[^>]*> nop
++00008e48 <[^>]*> nop
++00008e4c <[^>]*> nop
++00008e50 <[^>]*> nop
++00008e54 <[^>]*> nop
++00008e58 <[^>]*> nop
++00008e5c <[^>]*> nop
++00008e60 <[^>]*> nop
++00008e64 <[^>]*> nop
++00008e68 <[^>]*> nop
++00008e6c <[^>]*> nop
++00008e70 <[^>]*> nop
++00008e74 <[^>]*> nop
++00008e78 <[^>]*> nop
++00008e7c <[^>]*> nop
++00008e80 <[^>]*> nop
++00008e84 <[^>]*> nop
++00008e88 <[^>]*> nop
++00008e8c <[^>]*> nop
++00008e90 <[^>]*> nop
++00008e94 <[^>]*> nop
++00008e98 <[^>]*> nop
++00008e9c <[^>]*> nop
++00008ea0 <[^>]*> nop
++00008ea4 <[^>]*> nop
++00008ea8 <[^>]*> nop
++00008eac <[^>]*> nop
++00008eb0 <[^>]*> nop
++00008eb4 <[^>]*> nop
++00008eb8 <[^>]*> nop
++00008ebc <[^>]*> nop
++00008ec0 <[^>]*> nop
++00008ec4 <[^>]*> nop
++00008ec8 <[^>]*> nop
++00008ecc <[^>]*> nop
++00008ed0 <[^>]*> nop
++00008ed4 <[^>]*> nop
++00008ed8 <[^>]*> nop
++00008edc <[^>]*> nop
++00008ee0 <[^>]*> nop
++00008ee4 <[^>]*> nop
++00008ee8 <[^>]*> nop
++00008eec <[^>]*> nop
++00008ef0 <[^>]*> nop
++00008ef4 <[^>]*> nop
++00008ef8 <[^>]*> nop
++00008efc <[^>]*> nop
++00008f00 <[^>]*> nop
++00008f04 <[^>]*> nop
++00008f08 <[^>]*> nop
++00008f0c <[^>]*> nop
++00008f10 <[^>]*> nop
++00008f14 <[^>]*> nop
++00008f18 <[^>]*> nop
++00008f1c <[^>]*> nop
++00008f20 <[^>]*> nop
++00008f24 <[^>]*> nop
++00008f28 <[^>]*> nop
++00008f2c <[^>]*> nop
++00008f30 <[^>]*> nop
++00008f34 <[^>]*> nop
++00008f38 <[^>]*> nop
++00008f3c <[^>]*> nop
++00008f40 <[^>]*> nop
++00008f44 <[^>]*> nop
++00008f48 <[^>]*> nop
++00008f4c <[^>]*> nop
++00008f50 <[^>]*> nop
++00008f54 <[^>]*> nop
++00008f58 <[^>]*> nop
++00008f5c <[^>]*> nop
++00008f60 <[^>]*> nop
++00008f64 <[^>]*> nop
++00008f68 <[^>]*> nop
++00008f6c <[^>]*> nop
++00008f70 <[^>]*> nop
++00008f74 <[^>]*> nop
++00008f78 <[^>]*> nop
++00008f7c <[^>]*> nop
++00008f80 <[^>]*> nop
++00008f84 <[^>]*> nop
++00008f88 <[^>]*> nop
++00008f8c <[^>]*> nop
++00008f90 <[^>]*> nop
++00008f94 <[^>]*> nop
++00008f98 <[^>]*> nop
++00008f9c <[^>]*> nop
++00008fa0 <[^>]*> nop
++00008fa4 <[^>]*> nop
++00008fa8 <[^>]*> nop
++00008fac <[^>]*> nop
++00008fb0 <[^>]*> nop
++00008fb4 <[^>]*> nop
++00008fb8 <[^>]*> nop
++00008fbc <[^>]*> nop
++00008fc0 <[^>]*> nop
++00008fc4 <[^>]*> nop
++00008fc8 <[^>]*> nop
++00008fcc <[^>]*> nop
++00008fd0 <[^>]*> nop
++00008fd4 <[^>]*> nop
++00008fd8 <[^>]*> nop
++00008fdc <[^>]*> nop
++00008fe0 <[^>]*> nop
++00008fe4 <[^>]*> nop
++00008fe8 <[^>]*> nop
++00008fec <[^>]*> nop
++00008ff0 <[^>]*> nop
++00008ff4 <[^>]*> nop
++00008ff8 <[^>]*> nop
++00008ffc <[^>]*> nop
++00009000 <[^>]*> nop
++00009004 <[^>]*> nop
++00009008 <[^>]*> nop
++0000900c <[^>]*> nop
++00009010 <[^>]*> nop
++00009014 <[^>]*> nop
++00009018 <[^>]*> nop
++0000901c <[^>]*> nop
++00009020 <[^>]*> nop
++00009024 <[^>]*> nop
++00009028 <[^>]*> nop
++0000902c <[^>]*> nop
++00009030 <[^>]*> nop
++00009034 <[^>]*> nop
++00009038 <[^>]*> nop
++0000903c <[^>]*> nop
++00009040 <[^>]*> nop
++00009044 <[^>]*> nop
++00009048 <[^>]*> nop
++0000904c <[^>]*> nop
++00009050 <[^>]*> nop
++00009054 <[^>]*> nop
++00009058 <[^>]*> nop
++0000905c <[^>]*> nop
++00009060 <[^>]*> nop
++00009064 <[^>]*> nop
++00009068 <[^>]*> nop
++0000906c <[^>]*> nop
++00009070 <[^>]*> nop
++00009074 <[^>]*> nop
++00009078 <[^>]*> nop
++0000907c <[^>]*> nop
++00009080 <[^>]*> nop
++00009084 <[^>]*> nop
++00009088 <[^>]*> nop
++0000908c <[^>]*> nop
++00009090 <[^>]*> nop
++00009094 <[^>]*> nop
++00009098 <[^>]*> nop
++0000909c <[^>]*> nop
++000090a0 <[^>]*> nop
++000090a4 <[^>]*> nop
++000090a8 <[^>]*> nop
++000090ac <[^>]*> nop
++000090b0 <[^>]*> nop
++000090b4 <[^>]*> nop
++000090b8 <[^>]*> nop
++000090bc <[^>]*> nop
++000090c0 <[^>]*> nop
++000090c4 <[^>]*> nop
++000090c8 <[^>]*> nop
++000090cc <[^>]*> nop
++000090d0 <[^>]*> nop
++000090d4 <[^>]*> nop
++000090d8 <[^>]*> nop
++000090dc <[^>]*> nop
++000090e0 <[^>]*> nop
++000090e4 <[^>]*> nop
++000090e8 <[^>]*> nop
++000090ec <[^>]*> nop
++000090f0 <[^>]*> nop
++000090f4 <[^>]*> nop
++000090f8 <[^>]*> nop
++000090fc <[^>]*> nop
++00009100 <[^>]*> nop
++00009104 <[^>]*> nop
++00009108 <[^>]*> nop
++0000910c <[^>]*> nop
++00009110 <[^>]*> nop
++00009114 <[^>]*> nop
++00009118 <[^>]*> nop
++0000911c <[^>]*> nop
++00009120 <[^>]*> nop
++00009124 <[^>]*> nop
++00009128 <[^>]*> nop
++0000912c <[^>]*> nop
++00009130 <[^>]*> nop
++00009134 <[^>]*> nop
++00009138 <[^>]*> nop
++0000913c <[^>]*> nop
++00009140 <[^>]*> nop
++00009144 <[^>]*> nop
++00009148 <[^>]*> nop
++0000914c <[^>]*> nop
++00009150 <[^>]*> nop
++00009154 <[^>]*> nop
++00009158 <[^>]*> nop
++0000915c <[^>]*> nop
++00009160 <[^>]*> nop
++00009164 <[^>]*> nop
++00009168 <[^>]*> nop
++0000916c <[^>]*> nop
++00009170 <[^>]*> nop
++00009174 <[^>]*> nop
++00009178 <[^>]*> nop
++0000917c <[^>]*> nop
++00009180 <[^>]*> nop
++00009184 <[^>]*> nop
++00009188 <[^>]*> nop
++0000918c <[^>]*> nop
++00009190 <[^>]*> nop
++00009194 <[^>]*> nop
++00009198 <[^>]*> nop
++0000919c <[^>]*> nop
++000091a0 <[^>]*> nop
++000091a4 <[^>]*> nop
++000091a8 <[^>]*> nop
++000091ac <[^>]*> nop
++000091b0 <[^>]*> nop
++000091b4 <[^>]*> nop
++000091b8 <[^>]*> nop
++000091bc <[^>]*> nop
++000091c0 <[^>]*> nop
++000091c4 <[^>]*> nop
++000091c8 <[^>]*> nop
++000091cc <[^>]*> nop
++000091d0 <[^>]*> nop
++000091d4 <[^>]*> nop
++000091d8 <[^>]*> nop
++000091dc <[^>]*> nop
++000091e0 <[^>]*> nop
++000091e4 <[^>]*> nop
++000091e8 <[^>]*> nop
++000091ec <[^>]*> nop
++000091f0 <[^>]*> nop
++000091f4 <[^>]*> nop
++000091f8 <[^>]*> nop
++000091fc <[^>]*> nop
++00009200 <[^>]*> nop
++00009204 <[^>]*> nop
++00009208 <[^>]*> nop
++0000920c <[^>]*> nop
++00009210 <[^>]*> nop
++00009214 <[^>]*> nop
++00009218 <[^>]*> nop
++0000921c <[^>]*> nop
++00009220 <[^>]*> nop
++00009224 <[^>]*> nop
++00009228 <[^>]*> nop
++0000922c <[^>]*> nop
++00009230 <[^>]*> nop
++00009234 <[^>]*> nop
++00009238 <[^>]*> nop
++0000923c <[^>]*> nop
++00009240 <[^>]*> nop
++00009244 <[^>]*> nop
++00009248 <[^>]*> nop
++0000924c <[^>]*> nop
++00009250 <[^>]*> nop
++00009254 <[^>]*> nop
++00009258 <[^>]*> nop
++0000925c <[^>]*> nop
++00009260 <[^>]*> nop
++00009264 <[^>]*> nop
++00009268 <[^>]*> nop
++0000926c <[^>]*> nop
++00009270 <[^>]*> nop
++00009274 <[^>]*> nop
++00009278 <[^>]*> nop
++0000927c <[^>]*> nop
++00009280 <[^>]*> nop
++00009284 <[^>]*> nop
++00009288 <[^>]*> nop
++0000928c <[^>]*> nop
++00009290 <[^>]*> nop
++00009294 <[^>]*> nop
++00009298 <[^>]*> nop
++0000929c <[^>]*> nop
++000092a0 <[^>]*> nop
++000092a4 <[^>]*> nop
++000092a8 <[^>]*> nop
++000092ac <[^>]*> nop
++000092b0 <[^>]*> nop
++000092b4 <[^>]*> nop
++000092b8 <[^>]*> nop
++000092bc <[^>]*> nop
++000092c0 <[^>]*> nop
++000092c4 <[^>]*> nop
++000092c8 <[^>]*> nop
++000092cc <[^>]*> nop
++000092d0 <[^>]*> nop
++000092d4 <[^>]*> nop
++000092d8 <[^>]*> nop
++000092dc <[^>]*> nop
++000092e0 <[^>]*> nop
++000092e4 <[^>]*> nop
++000092e8 <[^>]*> nop
++000092ec <[^>]*> nop
++000092f0 <[^>]*> nop
++000092f4 <[^>]*> nop
++000092f8 <[^>]*> nop
++000092fc <[^>]*> nop
++00009300 <[^>]*> nop
++00009304 <[^>]*> nop
++00009308 <[^>]*> nop
++0000930c <[^>]*> nop
++00009310 <[^>]*> nop
++00009314 <[^>]*> nop
++00009318 <[^>]*> nop
++0000931c <[^>]*> nop
++00009320 <[^>]*> nop
++00009324 <[^>]*> nop
++00009328 <[^>]*> nop
++0000932c <[^>]*> nop
++00009330 <[^>]*> nop
++00009334 <[^>]*> nop
++00009338 <[^>]*> nop
++0000933c <[^>]*> nop
++00009340 <[^>]*> nop
++00009344 <[^>]*> nop
++00009348 <[^>]*> nop
++0000934c <[^>]*> nop
++00009350 <[^>]*> nop
++00009354 <[^>]*> nop
++00009358 <[^>]*> nop
++0000935c <[^>]*> nop
++00009360 <[^>]*> nop
++00009364 <[^>]*> nop
++00009368 <[^>]*> nop
++0000936c <[^>]*> nop
++00009370 <[^>]*> nop
++00009374 <[^>]*> nop
++00009378 <[^>]*> nop
++0000937c <[^>]*> nop
++00009380 <[^>]*> nop
++00009384 <[^>]*> nop
++00009388 <[^>]*> nop
++0000938c <[^>]*> nop
++00009390 <[^>]*> nop
++00009394 <[^>]*> nop
++00009398 <[^>]*> nop
++0000939c <[^>]*> nop
++000093a0 <[^>]*> nop
++000093a4 <[^>]*> nop
++000093a8 <[^>]*> nop
++000093ac <[^>]*> nop
++000093b0 <[^>]*> nop
++000093b4 <[^>]*> nop
++000093b8 <[^>]*> nop
++000093bc <[^>]*> nop
++000093c0 <[^>]*> nop
++000093c4 <[^>]*> nop
++000093c8 <[^>]*> nop
++000093cc <[^>]*> nop
++000093d0 <[^>]*> nop
++000093d4 <[^>]*> nop
++000093d8 <[^>]*> nop
++000093dc <[^>]*> nop
++000093e0 <[^>]*> nop
++000093e4 <[^>]*> nop
++000093e8 <[^>]*> nop
++000093ec <[^>]*> nop
++000093f0 <[^>]*> nop
++000093f4 <[^>]*> nop
++000093f8 <[^>]*> nop
++000093fc <[^>]*> nop
++00009400 <[^>]*> nop
++00009404 <[^>]*> nop
++00009408 <[^>]*> nop
++0000940c <[^>]*> nop
++00009410 <[^>]*> nop
++00009414 <[^>]*> nop
++00009418 <[^>]*> nop
++0000941c <[^>]*> nop
++00009420 <[^>]*> nop
++00009424 <[^>]*> nop
++00009428 <[^>]*> nop
++0000942c <[^>]*> nop
++00009430 <[^>]*> nop
++00009434 <[^>]*> nop
++00009438 <[^>]*> nop
++0000943c <[^>]*> nop
++00009440 <[^>]*> nop
++00009444 <[^>]*> nop
++00009448 <[^>]*> nop
++0000944c <[^>]*> nop
++00009450 <[^>]*> nop
++00009454 <[^>]*> nop
++00009458 <[^>]*> nop
++0000945c <[^>]*> nop
++00009460 <[^>]*> nop
++00009464 <[^>]*> nop
++00009468 <[^>]*> nop
++0000946c <[^>]*> nop
++00009470 <[^>]*> nop
++00009474 <[^>]*> nop
++00009478 <[^>]*> nop
++0000947c <[^>]*> nop
++00009480 <[^>]*> nop
++00009484 <[^>]*> nop
++00009488 <[^>]*> nop
++0000948c <[^>]*> nop
++00009490 <[^>]*> nop
++00009494 <[^>]*> nop
++00009498 <[^>]*> nop
++0000949c <[^>]*> nop
++000094a0 <[^>]*> nop
++000094a4 <[^>]*> nop
++000094a8 <[^>]*> nop
++000094ac <[^>]*> nop
++000094b0 <[^>]*> nop
++000094b4 <[^>]*> nop
++000094b8 <[^>]*> nop
++000094bc <[^>]*> nop
++000094c0 <[^>]*> nop
++000094c4 <[^>]*> nop
++000094c8 <[^>]*> nop
++000094cc <[^>]*> nop
++000094d0 <[^>]*> nop
++000094d4 <[^>]*> nop
++000094d8 <[^>]*> nop
++000094dc <[^>]*> nop
++000094e0 <[^>]*> nop
++000094e4 <[^>]*> nop
++000094e8 <[^>]*> nop
++000094ec <[^>]*> nop
++000094f0 <[^>]*> nop
++000094f4 <[^>]*> nop
++000094f8 <[^>]*> nop
++000094fc <[^>]*> nop
++00009500 <[^>]*> nop
++00009504 <[^>]*> nop
++00009508 <[^>]*> nop
++0000950c <[^>]*> nop
++00009510 <[^>]*> nop
++00009514 <[^>]*> nop
++00009518 <[^>]*> nop
++0000951c <[^>]*> nop
++00009520 <[^>]*> nop
++00009524 <[^>]*> nop
++00009528 <[^>]*> nop
++0000952c <[^>]*> nop
++00009530 <[^>]*> nop
++00009534 <[^>]*> nop
++00009538 <[^>]*> nop
++0000953c <[^>]*> nop
++00009540 <[^>]*> nop
++00009544 <[^>]*> nop
++00009548 <[^>]*> nop
++0000954c <[^>]*> nop
++00009550 <[^>]*> nop
++00009554 <[^>]*> nop
++00009558 <[^>]*> nop
++0000955c <[^>]*> nop
++00009560 <[^>]*> nop
++00009564 <[^>]*> nop
++00009568 <[^>]*> nop
++0000956c <[^>]*> nop
++00009570 <[^>]*> nop
++00009574 <[^>]*> nop
++00009578 <[^>]*> nop
++0000957c <[^>]*> nop
++00009580 <[^>]*> nop
++00009584 <[^>]*> nop
++00009588 <[^>]*> nop
++0000958c <[^>]*> nop
++00009590 <[^>]*> nop
++00009594 <[^>]*> nop
++00009598 <[^>]*> nop
++0000959c <[^>]*> nop
++000095a0 <[^>]*> nop
++000095a4 <[^>]*> nop
++000095a8 <[^>]*> nop
++000095ac <[^>]*> nop
++000095b0 <[^>]*> nop
++000095b4 <[^>]*> nop
++000095b8 <[^>]*> nop
++000095bc <[^>]*> nop
++000095c0 <[^>]*> nop
++000095c4 <[^>]*> nop
++000095c8 <[^>]*> nop
++000095cc <[^>]*> nop
++000095d0 <[^>]*> nop
++000095d4 <[^>]*> nop
++000095d8 <[^>]*> nop
++000095dc <[^>]*> nop
++000095e0 <[^>]*> nop
++000095e4 <[^>]*> nop
++000095e8 <[^>]*> nop
++000095ec <[^>]*> nop
++000095f0 <[^>]*> nop
++000095f4 <[^>]*> nop
++000095f8 <[^>]*> nop
++000095fc <[^>]*> nop
++00009600 <[^>]*> nop
++00009604 <[^>]*> nop
++00009608 <[^>]*> nop
++0000960c <[^>]*> nop
++00009610 <[^>]*> nop
++00009614 <[^>]*> nop
++00009618 <[^>]*> nop
++0000961c <[^>]*> nop
++00009620 <[^>]*> nop
++00009624 <[^>]*> nop
++00009628 <[^>]*> nop
++0000962c <[^>]*> nop
++00009630 <[^>]*> nop
++00009634 <[^>]*> nop
++00009638 <[^>]*> nop
++0000963c <[^>]*> nop
++00009640 <[^>]*> nop
++00009644 <[^>]*> nop
++00009648 <[^>]*> nop
++0000964c <[^>]*> nop
++00009650 <[^>]*> nop
++00009654 <[^>]*> nop
++00009658 <[^>]*> nop
++0000965c <[^>]*> nop
++00009660 <[^>]*> nop
++00009664 <[^>]*> nop
++00009668 <[^>]*> nop
++0000966c <[^>]*> nop
++00009670 <[^>]*> nop
++00009674 <[^>]*> nop
++00009678 <[^>]*> nop
++0000967c <[^>]*> nop
++00009680 <[^>]*> nop
++00009684 <[^>]*> nop
++00009688 <[^>]*> nop
++0000968c <[^>]*> nop
++00009690 <[^>]*> nop
++00009694 <[^>]*> nop
++00009698 <[^>]*> nop
++0000969c <[^>]*> nop
++000096a0 <[^>]*> nop
++000096a4 <[^>]*> nop
++000096a8 <[^>]*> nop
++000096ac <[^>]*> nop
++000096b0 <[^>]*> nop
++000096b4 <[^>]*> nop
++000096b8 <[^>]*> nop
++000096bc <[^>]*> nop
++000096c0 <[^>]*> nop
++000096c4 <[^>]*> nop
++000096c8 <[^>]*> nop
++000096cc <[^>]*> nop
++000096d0 <[^>]*> nop
++000096d4 <[^>]*> nop
++000096d8 <[^>]*> nop
++000096dc <[^>]*> nop
++000096e0 <[^>]*> nop
++000096e4 <[^>]*> nop
++000096e8 <[^>]*> nop
++000096ec <[^>]*> nop
++000096f0 <[^>]*> nop
++000096f4 <[^>]*> nop
++000096f8 <[^>]*> nop
++000096fc <[^>]*> nop
++00009700 <[^>]*> nop
++00009704 <[^>]*> nop
++00009708 <[^>]*> nop
++0000970c <[^>]*> nop
++00009710 <[^>]*> nop
++00009714 <[^>]*> nop
++00009718 <[^>]*> nop
++0000971c <[^>]*> nop
++00009720 <[^>]*> nop
++00009724 <[^>]*> nop
++00009728 <[^>]*> nop
++0000972c <[^>]*> nop
++00009730 <[^>]*> nop
++00009734 <[^>]*> nop
++00009738 <[^>]*> nop
++0000973c <[^>]*> nop
++00009740 <[^>]*> nop
++00009744 <[^>]*> nop
++00009748 <[^>]*> nop
++0000974c <[^>]*> nop
++00009750 <[^>]*> nop
++00009754 <[^>]*> nop
++00009758 <[^>]*> nop
++0000975c <[^>]*> nop
++00009760 <[^>]*> nop
++00009764 <[^>]*> nop
++00009768 <[^>]*> nop
++0000976c <[^>]*> nop
++00009770 <[^>]*> nop
++00009774 <[^>]*> nop
++00009778 <[^>]*> nop
++0000977c <[^>]*> nop
++00009780 <[^>]*> nop
++00009784 <[^>]*> nop
++00009788 <[^>]*> nop
++0000978c <[^>]*> nop
++00009790 <[^>]*> nop
++00009794 <[^>]*> nop
++00009798 <[^>]*> nop
++0000979c <[^>]*> nop
++000097a0 <[^>]*> nop
++000097a4 <[^>]*> nop
++000097a8 <[^>]*> nop
++000097ac <[^>]*> nop
++000097b0 <[^>]*> nop
++000097b4 <[^>]*> nop
++000097b8 <[^>]*> nop
++000097bc <[^>]*> nop
++000097c0 <[^>]*> nop
++000097c4 <[^>]*> nop
++000097c8 <[^>]*> nop
++000097cc <[^>]*> nop
++000097d0 <[^>]*> nop
++000097d4 <[^>]*> nop
++000097d8 <[^>]*> nop
++000097dc <[^>]*> nop
++000097e0 <[^>]*> nop
++000097e4 <[^>]*> nop
++000097e8 <[^>]*> nop
++000097ec <[^>]*> nop
++000097f0 <[^>]*> nop
++000097f4 <[^>]*> nop
++000097f8 <[^>]*> nop
++000097fc <[^>]*> nop
++00009800 <[^>]*> nop
++00009804 <[^>]*> nop
++00009808 <[^>]*> nop
++0000980c <[^>]*> nop
++00009810 <[^>]*> nop
++00009814 <[^>]*> nop
++00009818 <[^>]*> nop
++0000981c <[^>]*> nop
++00009820 <[^>]*> nop
++00009824 <[^>]*> nop
++00009828 <[^>]*> nop
++0000982c <[^>]*> nop
++00009830 <[^>]*> nop
++00009834 <[^>]*> nop
++00009838 <[^>]*> nop
++0000983c <[^>]*> nop
++00009840 <[^>]*> nop
++00009844 <[^>]*> nop
++00009848 <[^>]*> nop
++0000984c <[^>]*> nop
++00009850 <[^>]*> nop
++00009854 <[^>]*> nop
++00009858 <[^>]*> nop
++0000985c <[^>]*> nop
++00009860 <[^>]*> nop
++00009864 <[^>]*> nop
++00009868 <[^>]*> nop
++0000986c <[^>]*> nop
++00009870 <[^>]*> nop
++00009874 <[^>]*> nop
++00009878 <[^>]*> nop
++0000987c <[^>]*> nop
++00009880 <[^>]*> nop
++00009884 <[^>]*> nop
++00009888 <[^>]*> nop
++0000988c <[^>]*> nop
++00009890 <[^>]*> nop
++00009894 <[^>]*> nop
++00009898 <[^>]*> nop
++0000989c <[^>]*> nop
++000098a0 <[^>]*> nop
++000098a4 <[^>]*> nop
++000098a8 <[^>]*> nop
++000098ac <[^>]*> nop
++000098b0 <[^>]*> nop
++000098b4 <[^>]*> nop
++000098b8 <[^>]*> nop
++000098bc <[^>]*> nop
++000098c0 <[^>]*> nop
++000098c4 <[^>]*> nop
++000098c8 <[^>]*> nop
++000098cc <[^>]*> nop
++000098d0 <[^>]*> nop
++000098d4 <[^>]*> nop
++000098d8 <[^>]*> nop
++000098dc <[^>]*> nop
++000098e0 <[^>]*> nop
++000098e4 <[^>]*> nop
++000098e8 <[^>]*> nop
++000098ec <[^>]*> nop
++000098f0 <[^>]*> nop
++000098f4 <[^>]*> nop
++000098f8 <[^>]*> nop
++000098fc <[^>]*> nop
++00009900 <[^>]*> nop
++00009904 <[^>]*> nop
++00009908 <[^>]*> nop
++0000990c <[^>]*> nop
++00009910 <[^>]*> nop
++00009914 <[^>]*> nop
++00009918 <[^>]*> nop
++0000991c <[^>]*> nop
++00009920 <[^>]*> nop
++00009924 <[^>]*> nop
++00009928 <[^>]*> nop
++0000992c <[^>]*> nop
++00009930 <[^>]*> nop
++00009934 <[^>]*> nop
++00009938 <[^>]*> nop
++0000993c <[^>]*> nop
++00009940 <[^>]*> nop
++00009944 <[^>]*> nop
++00009948 <[^>]*> nop
++0000994c <[^>]*> nop
++00009950 <[^>]*> nop
++00009954 <[^>]*> nop
++00009958 <[^>]*> nop
++0000995c <[^>]*> nop
++00009960 <[^>]*> nop
++00009964 <[^>]*> nop
++00009968 <[^>]*> nop
++0000996c <[^>]*> nop
++00009970 <[^>]*> nop
++00009974 <[^>]*> nop
++00009978 <[^>]*> nop
++0000997c <[^>]*> nop
++00009980 <[^>]*> nop
++00009984 <[^>]*> nop
++00009988 <[^>]*> nop
++0000998c <[^>]*> nop
++00009990 <[^>]*> nop
++00009994 <[^>]*> nop
++00009998 <[^>]*> nop
++0000999c <[^>]*> nop
++000099a0 <[^>]*> nop
++000099a4 <[^>]*> nop
++000099a8 <[^>]*> nop
++000099ac <[^>]*> nop
++000099b0 <[^>]*> nop
++000099b4 <[^>]*> nop
++000099b8 <[^>]*> nop
++000099bc <[^>]*> nop
++000099c0 <[^>]*> nop
++000099c4 <[^>]*> nop
++000099c8 <[^>]*> nop
++000099cc <[^>]*> nop
++000099d0 <[^>]*> nop
++000099d4 <[^>]*> nop
++000099d8 <[^>]*> nop
++000099dc <[^>]*> nop
++000099e0 <[^>]*> nop
++000099e4 <[^>]*> nop
++000099e8 <[^>]*> nop
++000099ec <[^>]*> nop
++000099f0 <[^>]*> nop
++000099f4 <[^>]*> nop
++000099f8 <[^>]*> nop
++000099fc <[^>]*> nop
++00009a00 <[^>]*> nop
++00009a04 <[^>]*> nop
++00009a08 <[^>]*> nop
++00009a0c <[^>]*> nop
++00009a10 <[^>]*> nop
++00009a14 <[^>]*> nop
++00009a18 <[^>]*> nop
++00009a1c <[^>]*> nop
++00009a20 <[^>]*> nop
++00009a24 <[^>]*> nop
++00009a28 <[^>]*> nop
++00009a2c <[^>]*> nop
++00009a30 <[^>]*> nop
++00009a34 <[^>]*> nop
++00009a38 <[^>]*> nop
++00009a3c <[^>]*> nop
++00009a40 <[^>]*> nop
++00009a44 <[^>]*> nop
++00009a48 <[^>]*> nop
++00009a4c <[^>]*> nop
++00009a50 <[^>]*> nop
++00009a54 <[^>]*> nop
++00009a58 <[^>]*> nop
++00009a5c <[^>]*> nop
++00009a60 <[^>]*> nop
++00009a64 <[^>]*> nop
++00009a68 <[^>]*> nop
++00009a6c <[^>]*> nop
++00009a70 <[^>]*> nop
++00009a74 <[^>]*> nop
++00009a78 <[^>]*> nop
++00009a7c <[^>]*> nop
++00009a80 <[^>]*> nop
++00009a84 <[^>]*> nop
++00009a88 <[^>]*> nop
++00009a8c <[^>]*> nop
++00009a90 <[^>]*> nop
++00009a94 <[^>]*> nop
++00009a98 <[^>]*> nop
++00009a9c <[^>]*> nop
++00009aa0 <[^>]*> nop
++00009aa4 <[^>]*> nop
++00009aa8 <[^>]*> nop
++00009aac <[^>]*> nop
++00009ab0 <[^>]*> nop
++00009ab4 <[^>]*> nop
++00009ab8 <[^>]*> nop
++00009abc <[^>]*> nop
++00009ac0 <[^>]*> nop
++00009ac4 <[^>]*> nop
++00009ac8 <[^>]*> nop
++00009acc <[^>]*> nop
++00009ad0 <[^>]*> nop
++00009ad4 <[^>]*> nop
++00009ad8 <[^>]*> nop
++00009adc <[^>]*> nop
++00009ae0 <[^>]*> nop
++00009ae4 <[^>]*> nop
++00009ae8 <[^>]*> nop
++00009aec <[^>]*> nop
++00009af0 <[^>]*> nop
++00009af4 <[^>]*> nop
++00009af8 <[^>]*> nop
++00009afc <[^>]*> nop
++00009b00 <[^>]*> nop
++00009b04 <[^>]*> nop
++00009b08 <[^>]*> nop
++00009b0c <[^>]*> nop
++00009b10 <[^>]*> nop
++00009b14 <[^>]*> nop
++00009b18 <[^>]*> nop
++00009b1c <[^>]*> nop
++00009b20 <[^>]*> nop
++00009b24 <[^>]*> nop
++00009b28 <[^>]*> nop
++00009b2c <[^>]*> nop
++00009b30 <[^>]*> nop
++00009b34 <[^>]*> nop
++00009b38 <[^>]*> nop
++00009b3c <[^>]*> nop
++00009b40 <[^>]*> nop
++00009b44 <[^>]*> nop
++00009b48 <[^>]*> nop
++00009b4c <[^>]*> nop
++00009b50 <[^>]*> nop
++00009b54 <[^>]*> nop
++00009b58 <[^>]*> nop
++00009b5c <[^>]*> nop
++00009b60 <[^>]*> nop
++00009b64 <[^>]*> nop
++00009b68 <[^>]*> nop
++00009b6c <[^>]*> nop
++00009b70 <[^>]*> nop
++00009b74 <[^>]*> nop
++00009b78 <[^>]*> nop
++00009b7c <[^>]*> nop
++00009b80 <[^>]*> nop
++00009b84 <[^>]*> nop
++00009b88 <[^>]*> nop
++00009b8c <[^>]*> nop
++00009b90 <[^>]*> nop
++00009b94 <[^>]*> nop
++00009b98 <[^>]*> nop
++00009b9c <[^>]*> nop
++00009ba0 <[^>]*> nop
++00009ba4 <[^>]*> nop
++00009ba8 <[^>]*> nop
++00009bac <[^>]*> nop
++00009bb0 <[^>]*> nop
++00009bb4 <[^>]*> nop
++00009bb8 <[^>]*> nop
++00009bbc <[^>]*> nop
++00009bc0 <[^>]*> nop
++00009bc4 <[^>]*> nop
++00009bc8 <[^>]*> nop
++00009bcc <[^>]*> nop
++00009bd0 <[^>]*> nop
++00009bd4 <[^>]*> nop
++00009bd8 <[^>]*> nop
++00009bdc <[^>]*> nop
++00009be0 <[^>]*> nop
++00009be4 <[^>]*> nop
++00009be8 <[^>]*> nop
++00009bec <[^>]*> nop
++00009bf0 <[^>]*> nop
++00009bf4 <[^>]*> nop
++00009bf8 <[^>]*> nop
++00009bfc <[^>]*> nop
++00009c00 <[^>]*> nop
++00009c04 <[^>]*> nop
++00009c08 <[^>]*> nop
++00009c0c <[^>]*> nop
++00009c10 <[^>]*> nop
++00009c14 <[^>]*> nop
++00009c18 <[^>]*> nop
++00009c1c <[^>]*> nop
++00009c20 <[^>]*> nop
++00009c24 <[^>]*> nop
++00009c28 <[^>]*> nop
++00009c2c <[^>]*> nop
++00009c30 <[^>]*> nop
++00009c34 <[^>]*> nop
++00009c38 <[^>]*> nop
++00009c3c <[^>]*> nop
++00009c40 <[^>]*> nop
++00009c44 <[^>]*> nop
++00009c48 <[^>]*> nop
++00009c4c <[^>]*> nop
++00009c50 <[^>]*> nop
++00009c54 <[^>]*> nop
++00009c58 <[^>]*> nop
++00009c5c <[^>]*> nop
++00009c60 <[^>]*> nop
++00009c64 <[^>]*> nop
++00009c68 <[^>]*> nop
++00009c6c <[^>]*> nop
++00009c70 <[^>]*> nop
++00009c74 <[^>]*> nop
++00009c78 <[^>]*> nop
++00009c7c <[^>]*> nop
++00009c80 <[^>]*> nop
++00009c84 <[^>]*> nop
++00009c88 <[^>]*> nop
++00009c8c <[^>]*> nop
++00009c90 <[^>]*> nop
++00009c94 <[^>]*> nop
++00009c98 <[^>]*> nop
++00009c9c <[^>]*> nop
++00009ca0 <[^>]*> nop
++00009ca4 <[^>]*> nop
++00009ca8 <[^>]*> nop
++00009cac <[^>]*> nop
++00009cb0 <[^>]*> nop
++00009cb4 <[^>]*> nop
++00009cb8 <[^>]*> nop
++00009cbc <[^>]*> nop
++00009cc0 <[^>]*> nop
++00009cc4 <[^>]*> nop
++00009cc8 <[^>]*> nop
++00009ccc <[^>]*> nop
++00009cd0 <[^>]*> nop
++00009cd4 <[^>]*> nop
++00009cd8 <[^>]*> nop
++00009cdc <[^>]*> nop
++00009ce0 <[^>]*> nop
++00009ce4 <[^>]*> nop
++00009ce8 <[^>]*> nop
++00009cec <[^>]*> nop
++00009cf0 <[^>]*> nop
++00009cf4 <[^>]*> nop
++00009cf8 <[^>]*> nop
++00009cfc <[^>]*> nop
++00009d00 <[^>]*> nop
++00009d04 <[^>]*> nop
++00009d08 <[^>]*> nop
++00009d0c <[^>]*> nop
++00009d10 <[^>]*> nop
++00009d14 <[^>]*> nop
++00009d18 <[^>]*> nop
++00009d1c <[^>]*> nop
++00009d20 <[^>]*> nop
++00009d24 <[^>]*> nop
++00009d28 <[^>]*> nop
++00009d2c <[^>]*> nop
++00009d30 <[^>]*> nop
++00009d34 <[^>]*> nop
++00009d38 <[^>]*> nop
++00009d3c <[^>]*> nop
++00009d40 <[^>]*> nop
++00009d44 <[^>]*> nop
++00009d48 <[^>]*> nop
++00009d4c <[^>]*> nop
++00009d50 <[^>]*> nop
++00009d54 <[^>]*> nop
++00009d58 <[^>]*> nop
++00009d5c <[^>]*> nop
++00009d60 <[^>]*> nop
++00009d64 <[^>]*> nop
++00009d68 <[^>]*> nop
++00009d6c <[^>]*> nop
++00009d70 <[^>]*> nop
++00009d74 <[^>]*> nop
++00009d78 <[^>]*> nop
++00009d7c <[^>]*> nop
++00009d80 <[^>]*> nop
++00009d84 <[^>]*> nop
++00009d88 <[^>]*> nop
++00009d8c <[^>]*> nop
++00009d90 <[^>]*> nop
++00009d94 <[^>]*> nop
++00009d98 <[^>]*> nop
++00009d9c <[^>]*> nop
++00009da0 <[^>]*> nop
++00009da4 <[^>]*> nop
++00009da8 <[^>]*> nop
++00009dac <[^>]*> nop
++00009db0 <[^>]*> nop
++00009db4 <[^>]*> nop
++00009db8 <[^>]*> nop
++00009dbc <[^>]*> nop
++00009dc0 <[^>]*> nop
++00009dc4 <[^>]*> nop
++00009dc8 <[^>]*> nop
++00009dcc <[^>]*> nop
++00009dd0 <[^>]*> nop
++00009dd4 <[^>]*> nop
++00009dd8 <[^>]*> nop
++00009ddc <[^>]*> nop
++00009de0 <[^>]*> nop
++00009de4 <[^>]*> nop
++00009de8 <[^>]*> nop
++00009dec <[^>]*> nop
++00009df0 <[^>]*> nop
++00009df4 <[^>]*> nop
++00009df8 <[^>]*> nop
++00009dfc <[^>]*> nop
++00009e00 <[^>]*> nop
++00009e04 <[^>]*> nop
++00009e08 <[^>]*> nop
++00009e0c <[^>]*> nop
++00009e10 <[^>]*> nop
++00009e14 <[^>]*> nop
++00009e18 <[^>]*> nop
++00009e1c <[^>]*> nop
++00009e20 <[^>]*> nop
++00009e24 <[^>]*> nop
++00009e28 <[^>]*> nop
++00009e2c <[^>]*> nop
++00009e30 <[^>]*> nop
++00009e34 <[^>]*> nop
++00009e38 <[^>]*> nop
++00009e3c <[^>]*> nop
++00009e40 <[^>]*> nop
++00009e44 <[^>]*> nop
++00009e48 <[^>]*> nop
++00009e4c <[^>]*> nop
++00009e50 <[^>]*> nop
++00009e54 <[^>]*> nop
++00009e58 <[^>]*> nop
++00009e5c <[^>]*> nop
++00009e60 <[^>]*> nop
++00009e64 <[^>]*> nop
++00009e68 <[^>]*> nop
++00009e6c <[^>]*> nop
++00009e70 <[^>]*> nop
++00009e74 <[^>]*> nop
++00009e78 <[^>]*> nop
++00009e7c <[^>]*> nop
++00009e80 <[^>]*> nop
++00009e84 <[^>]*> nop
++00009e88 <[^>]*> nop
++00009e8c <[^>]*> nop
++00009e90 <[^>]*> nop
++00009e94 <[^>]*> nop
++00009e98 <[^>]*> nop
++00009e9c <[^>]*> nop
++00009ea0 <[^>]*> nop
++00009ea4 <[^>]*> nop
++00009ea8 <[^>]*> nop
++00009eac <[^>]*> nop
++00009eb0 <[^>]*> nop
++00009eb4 <[^>]*> nop
++00009eb8 <[^>]*> nop
++00009ebc <[^>]*> nop
++00009ec0 <[^>]*> nop
++00009ec4 <[^>]*> nop
++00009ec8 <[^>]*> nop
++00009ecc <[^>]*> nop
++00009ed0 <[^>]*> nop
++00009ed4 <[^>]*> nop
++00009ed8 <[^>]*> nop
++00009edc <[^>]*> nop
++00009ee0 <[^>]*> nop
++00009ee4 <[^>]*> nop
++00009ee8 <[^>]*> nop
++00009eec <[^>]*> nop
++00009ef0 <[^>]*> nop
++00009ef4 <[^>]*> nop
++00009ef8 <[^>]*> nop
++00009efc <[^>]*> nop
++00009f00 <[^>]*> nop
++00009f04 <[^>]*> nop
++00009f08 <[^>]*> nop
++00009f0c <[^>]*> nop
++00009f10 <[^>]*> nop
++00009f14 <[^>]*> nop
++00009f18 <[^>]*> nop
++00009f1c <[^>]*> nop
++00009f20 <[^>]*> nop
++00009f24 <[^>]*> nop
++00009f28 <[^>]*> nop
++00009f2c <[^>]*> nop
++00009f30 <[^>]*> nop
++00009f34 <[^>]*> nop
++00009f38 <[^>]*> nop
++00009f3c <[^>]*> nop
++00009f40 <[^>]*> nop
++00009f44 <[^>]*> nop
++00009f48 <[^>]*> nop
++00009f4c <[^>]*> nop
++00009f50 <[^>]*> nop
++00009f54 <[^>]*> nop
++00009f58 <[^>]*> nop
++00009f5c <[^>]*> nop
++00009f60 <[^>]*> nop
++00009f64 <[^>]*> nop
++00009f68 <[^>]*> nop
++00009f6c <[^>]*> nop
++00009f70 <[^>]*> nop
++00009f74 <[^>]*> nop
++00009f78 <[^>]*> nop
++00009f7c <[^>]*> nop
++00009f80 <[^>]*> nop
++00009f84 <[^>]*> nop
++00009f88 <[^>]*> nop
++00009f8c <[^>]*> nop
++00009f90 <[^>]*> nop
++00009f94 <[^>]*> nop
++00009f98 <[^>]*> nop
++00009f9c <[^>]*> nop
++00009fa0 <[^>]*> nop
++00009fa4 <[^>]*> nop
++00009fa8 <[^>]*> nop
++00009fac <[^>]*> nop
++00009fb0 <[^>]*> nop
++00009fb4 <[^>]*> nop
++00009fb8 <[^>]*> nop
++00009fbc <[^>]*> nop
++00009fc0 <[^>]*> nop
++00009fc4 <[^>]*> nop
++00009fc8 <[^>]*> nop
++00009fcc <[^>]*> nop
++00009fd0 <[^>]*> nop
++00009fd4 <[^>]*> nop
++00009fd8 <[^>]*> nop
++00009fdc <[^>]*> nop
++00009fe0 <[^>]*> nop
++00009fe4 <[^>]*> nop
++00009fe8 <[^>]*> nop
++00009fec <[^>]*> nop
++00009ff0 <[^>]*> nop
++00009ff4 <[^>]*> nop
++00009ff8 <[^>]*> nop
++00009ffc <[^>]*> nop
++0000a000 <[^>]*> nop
++0000a004 <[^>]*> nop
++0000a008 <[^>]*> nop
++0000a00c <[^>]*> nop
++0000a010 <[^>]*> nop
++0000a014 <[^>]*> nop
++0000a018 <[^>]*> nop
++0000a01c <[^>]*> nop
++0000a020 <[^>]*> nop
++0000a024 <[^>]*> nop
++0000a028 <[^>]*> nop
++0000a02c <[^>]*> nop
++0000a030 <[^>]*> nop
++0000a034 <[^>]*> nop
++0000a038 <[^>]*> nop
++0000a03c <[^>]*> nop
++0000a040 <[^>]*> nop
++0000a044 <[^>]*> nop
++0000a048 <[^>]*> nop
++0000a04c <[^>]*> nop
++0000a050 <[^>]*> nop
++0000a054 <[^>]*> nop
++0000a058 <[^>]*> nop
++0000a05c <[^>]*> nop
++0000a060 <[^>]*> nop
++0000a064 <[^>]*> nop
++0000a068 <[^>]*> nop
++0000a06c <[^>]*> nop
++0000a070 <[^>]*> nop
++0000a074 <[^>]*> nop
++0000a078 <[^>]*> nop
++0000a07c <[^>]*> nop
++0000a080 <[^>]*> nop
++0000a084 <[^>]*> nop
++0000a088 <[^>]*> nop
++0000a08c <[^>]*> nop
++0000a090 <[^>]*> nop
++0000a094 <[^>]*> nop
++0000a098 <[^>]*> nop
++0000a09c <[^>]*> nop
++0000a0a0 <[^>]*> nop
++0000a0a4 <[^>]*> nop
++0000a0a8 <[^>]*> nop
++0000a0ac <[^>]*> nop
++0000a0b0 <[^>]*> nop
++0000a0b4 <[^>]*> nop
++0000a0b8 <[^>]*> nop
++0000a0bc <[^>]*> nop
++0000a0c0 <[^>]*> nop
++0000a0c4 <[^>]*> nop
++0000a0c8 <[^>]*> nop
++0000a0cc <[^>]*> nop
++0000a0d0 <[^>]*> nop
++0000a0d4 <[^>]*> nop
++0000a0d8 <[^>]*> nop
++0000a0dc <[^>]*> nop
++0000a0e0 <[^>]*> nop
++0000a0e4 <[^>]*> nop
++0000a0e8 <[^>]*> nop
++0000a0ec <[^>]*> nop
++0000a0f0 <[^>]*> nop
++0000a0f4 <[^>]*> nop
++0000a0f8 <[^>]*> nop
++0000a0fc <[^>]*> nop
++0000a100 <[^>]*> nop
++0000a104 <[^>]*> nop
++0000a108 <[^>]*> nop
++0000a10c <[^>]*> nop
++0000a110 <[^>]*> nop
++0000a114 <[^>]*> nop
++0000a118 <[^>]*> nop
++0000a11c <[^>]*> nop
++0000a120 <[^>]*> nop
++0000a124 <[^>]*> nop
++0000a128 <[^>]*> nop
++0000a12c <[^>]*> nop
++0000a130 <[^>]*> nop
++0000a134 <[^>]*> nop
++0000a138 <[^>]*> nop
++0000a13c <[^>]*> nop
++0000a140 <[^>]*> nop
++0000a144 <[^>]*> nop
++0000a148 <[^>]*> nop
++0000a14c <[^>]*> nop
++0000a150 <[^>]*> nop
++0000a154 <[^>]*> nop
++0000a158 <[^>]*> nop
++0000a15c <[^>]*> nop
++0000a160 <[^>]*> nop
++0000a164 <[^>]*> nop
++0000a168 <[^>]*> nop
++0000a16c <[^>]*> nop
++0000a170 <[^>]*> nop
++0000a174 <[^>]*> nop
++0000a178 <[^>]*> nop
++0000a17c <[^>]*> nop
++0000a180 <[^>]*> nop
++0000a184 <[^>]*> nop
++0000a188 <[^>]*> nop
++0000a18c <[^>]*> nop
++0000a190 <[^>]*> nop
++0000a194 <[^>]*> nop
++0000a198 <[^>]*> nop
++0000a19c <[^>]*> nop
++0000a1a0 <[^>]*> nop
++0000a1a4 <[^>]*> nop
++0000a1a8 <[^>]*> nop
++0000a1ac <[^>]*> nop
++0000a1b0 <[^>]*> nop
++0000a1b4 <[^>]*> nop
++0000a1b8 <[^>]*> nop
++0000a1bc <[^>]*> nop
++0000a1c0 <[^>]*> nop
++0000a1c4 <[^>]*> nop
++0000a1c8 <[^>]*> nop
++0000a1cc <[^>]*> nop
++0000a1d0 <[^>]*> nop
++0000a1d4 <[^>]*> nop
++0000a1d8 <[^>]*> nop
++0000a1dc <[^>]*> nop
++0000a1e0 <[^>]*> nop
++0000a1e4 <[^>]*> nop
++0000a1e8 <[^>]*> nop
++0000a1ec <[^>]*> nop
++0000a1f0 <[^>]*> nop
++0000a1f4 <[^>]*> nop
++0000a1f8 <[^>]*> nop
++0000a1fc <[^>]*> nop
++0000a200 <[^>]*> nop
++0000a204 <[^>]*> nop
++0000a208 <[^>]*> nop
++0000a20c <[^>]*> nop
++0000a210 <[^>]*> nop
++0000a214 <[^>]*> nop
++0000a218 <[^>]*> nop
++0000a21c <[^>]*> nop
++0000a220 <[^>]*> nop
++0000a224 <[^>]*> nop
++0000a228 <[^>]*> nop
++0000a22c <[^>]*> nop
++0000a230 <[^>]*> nop
++0000a234 <[^>]*> nop
++0000a238 <[^>]*> nop
++0000a23c <[^>]*> nop
++0000a240 <[^>]*> nop
++0000a244 <[^>]*> nop
++0000a248 <[^>]*> nop
++0000a24c <[^>]*> nop
++0000a250 <[^>]*> nop
++0000a254 <[^>]*> nop
++0000a258 <[^>]*> nop
++0000a25c <[^>]*> nop
++0000a260 <[^>]*> nop
++0000a264 <[^>]*> nop
++0000a268 <[^>]*> nop
++0000a26c <[^>]*> nop
++0000a270 <[^>]*> nop
++0000a274 <[^>]*> nop
++0000a278 <[^>]*> nop
++0000a27c <[^>]*> nop
++0000a280 <[^>]*> nop
++0000a284 <[^>]*> nop
++0000a288 <[^>]*> nop
++0000a28c <[^>]*> nop
++0000a290 <[^>]*> nop
++0000a294 <[^>]*> nop
++0000a298 <[^>]*> nop
++0000a29c <[^>]*> nop
++0000a2a0 <[^>]*> nop
++0000a2a4 <[^>]*> nop
++0000a2a8 <[^>]*> nop
++0000a2ac <[^>]*> nop
++0000a2b0 <[^>]*> nop
++0000a2b4 <[^>]*> nop
++0000a2b8 <[^>]*> nop
++0000a2bc <[^>]*> nop
++0000a2c0 <[^>]*> nop
++0000a2c4 <[^>]*> nop
++0000a2c8 <[^>]*> nop
++0000a2cc <[^>]*> nop
++0000a2d0 <[^>]*> nop
++0000a2d4 <[^>]*> nop
++0000a2d8 <[^>]*> nop
++0000a2dc <[^>]*> nop
++0000a2e0 <[^>]*> nop
++0000a2e4 <[^>]*> nop
++0000a2e8 <[^>]*> nop
++0000a2ec <[^>]*> nop
++0000a2f0 <[^>]*> nop
++0000a2f4 <[^>]*> nop
++0000a2f8 <[^>]*> nop
++0000a2fc <[^>]*> nop
++0000a300 <[^>]*> nop
++0000a304 <[^>]*> nop
++0000a308 <[^>]*> nop
++0000a30c <[^>]*> nop
++0000a310 <[^>]*> nop
++0000a314 <[^>]*> nop
++0000a318 <[^>]*> nop
++0000a31c <[^>]*> nop
++0000a320 <[^>]*> nop
++0000a324 <[^>]*> nop
++0000a328 <[^>]*> nop
++0000a32c <[^>]*> nop
++0000a330 <[^>]*> nop
++0000a334 <[^>]*> nop
++0000a338 <[^>]*> nop
++0000a33c <[^>]*> nop
++0000a340 <[^>]*> nop
++0000a344 <[^>]*> nop
++0000a348 <[^>]*> nop
++0000a34c <[^>]*> nop
++0000a350 <[^>]*> nop
++0000a354 <[^>]*> nop
++0000a358 <[^>]*> nop
++0000a35c <[^>]*> nop
++0000a360 <[^>]*> nop
++0000a364 <[^>]*> nop
++0000a368 <[^>]*> nop
++0000a36c <[^>]*> nop
++0000a370 <[^>]*> nop
++0000a374 <[^>]*> nop
++0000a378 <[^>]*> nop
++0000a37c <[^>]*> nop
++0000a380 <[^>]*> nop
++0000a384 <[^>]*> nop
++0000a388 <[^>]*> nop
++0000a38c <[^>]*> nop
++0000a390 <[^>]*> nop
++0000a394 <[^>]*> nop
++0000a398 <[^>]*> nop
++0000a39c <[^>]*> nop
++0000a3a0 <[^>]*> nop
++0000a3a4 <[^>]*> nop
++0000a3a8 <[^>]*> nop
++0000a3ac <[^>]*> nop
++0000a3b0 <[^>]*> nop
++0000a3b4 <[^>]*> nop
++0000a3b8 <[^>]*> nop
++0000a3bc <[^>]*> nop
++0000a3c0 <[^>]*> nop
++0000a3c4 <[^>]*> nop
++0000a3c8 <[^>]*> nop
++0000a3cc <[^>]*> nop
++0000a3d0 <[^>]*> nop
++0000a3d4 <[^>]*> nop
++0000a3d8 <[^>]*> nop
++0000a3dc <[^>]*> nop
++0000a3e0 <[^>]*> nop
++0000a3e4 <[^>]*> nop
++0000a3e8 <[^>]*> nop
++0000a3ec <[^>]*> nop
++0000a3f0 <[^>]*> nop
++0000a3f4 <[^>]*> nop
++0000a3f8 <[^>]*> nop
++0000a3fc <[^>]*> nop
++0000a400 <[^>]*> nop
++0000a404 <[^>]*> nop
++0000a408 <[^>]*> nop
++0000a40c <[^>]*> nop
++0000a410 <[^>]*> nop
++0000a414 <[^>]*> nop
++0000a418 <[^>]*> nop
++0000a41c <[^>]*> nop
++0000a420 <[^>]*> nop
++0000a424 <[^>]*> nop
++0000a428 <[^>]*> nop
++0000a42c <[^>]*> nop
++0000a430 <[^>]*> nop
++0000a434 <[^>]*> nop
++0000a438 <[^>]*> nop
++0000a43c <[^>]*> nop
++0000a440 <[^>]*> nop
++0000a444 <[^>]*> nop
++0000a448 <[^>]*> nop
++0000a44c <[^>]*> nop
++0000a450 <[^>]*> nop
++0000a454 <[^>]*> nop
++0000a458 <[^>]*> nop
++0000a45c <[^>]*> nop
++0000a460 <[^>]*> nop
++0000a464 <[^>]*> nop
++0000a468 <[^>]*> nop
++0000a46c <[^>]*> nop
++0000a470 <[^>]*> nop
++0000a474 <[^>]*> nop
++0000a478 <[^>]*> nop
++0000a47c <[^>]*> nop
++0000a480 <[^>]*> nop
++0000a484 <[^>]*> nop
++0000a488 <[^>]*> nop
++0000a48c <[^>]*> nop
++0000a490 <[^>]*> nop
++0000a494 <[^>]*> nop
++0000a498 <[^>]*> nop
++0000a49c <[^>]*> nop
++0000a4a0 <[^>]*> nop
++0000a4a4 <[^>]*> nop
++0000a4a8 <[^>]*> nop
++0000a4ac <[^>]*> nop
++0000a4b0 <[^>]*> nop
++0000a4b4 <[^>]*> nop
++0000a4b8 <[^>]*> nop
++0000a4bc <[^>]*> nop
++0000a4c0 <[^>]*> nop
++0000a4c4 <[^>]*> nop
++0000a4c8 <[^>]*> nop
++0000a4cc <[^>]*> nop
++0000a4d0 <[^>]*> nop
++0000a4d4 <[^>]*> nop
++0000a4d8 <[^>]*> nop
++0000a4dc <[^>]*> nop
++0000a4e0 <[^>]*> nop
++0000a4e4 <[^>]*> nop
++0000a4e8 <[^>]*> nop
++0000a4ec <[^>]*> nop
++0000a4f0 <[^>]*> nop
++0000a4f4 <[^>]*> nop
++0000a4f8 <[^>]*> nop
++0000a4fc <[^>]*> nop
++0000a500 <[^>]*> nop
++0000a504 <[^>]*> nop
++0000a508 <[^>]*> nop
++0000a50c <[^>]*> nop
++0000a510 <[^>]*> nop
++0000a514 <[^>]*> nop
++0000a518 <[^>]*> nop
++0000a51c <[^>]*> nop
++0000a520 <[^>]*> nop
++0000a524 <[^>]*> nop
++0000a528 <[^>]*> nop
++0000a52c <[^>]*> nop
++0000a530 <[^>]*> nop
++0000a534 <[^>]*> nop
++0000a538 <[^>]*> nop
++0000a53c <[^>]*> nop
++0000a540 <[^>]*> nop
++0000a544 <[^>]*> nop
++0000a548 <[^>]*> nop
++0000a54c <[^>]*> nop
++0000a550 <[^>]*> nop
++0000a554 <[^>]*> nop
++0000a558 <[^>]*> nop
++0000a55c <[^>]*> nop
++0000a560 <[^>]*> nop
++0000a564 <[^>]*> nop
++0000a568 <[^>]*> nop
++0000a56c <[^>]*> nop
++0000a570 <[^>]*> nop
++0000a574 <[^>]*> nop
++0000a578 <[^>]*> nop
++0000a57c <[^>]*> nop
++0000a580 <[^>]*> nop
++0000a584 <[^>]*> nop
++0000a588 <[^>]*> nop
++0000a58c <[^>]*> nop
++0000a590 <[^>]*> nop
++0000a594 <[^>]*> nop
++0000a598 <[^>]*> nop
++0000a59c <[^>]*> nop
++0000a5a0 <[^>]*> nop
++0000a5a4 <[^>]*> nop
++0000a5a8 <[^>]*> nop
++0000a5ac <[^>]*> nop
++0000a5b0 <[^>]*> nop
++0000a5b4 <[^>]*> nop
++0000a5b8 <[^>]*> nop
++0000a5bc <[^>]*> nop
++0000a5c0 <[^>]*> nop
++0000a5c4 <[^>]*> nop
++0000a5c8 <[^>]*> nop
++0000a5cc <[^>]*> nop
++0000a5d0 <[^>]*> nop
++0000a5d4 <[^>]*> nop
++0000a5d8 <[^>]*> nop
++0000a5dc <[^>]*> nop
++0000a5e0 <[^>]*> nop
++0000a5e4 <[^>]*> nop
++0000a5e8 <[^>]*> nop
++0000a5ec <[^>]*> nop
++0000a5f0 <[^>]*> nop
++0000a5f4 <[^>]*> nop
++0000a5f8 <[^>]*> nop
++0000a5fc <[^>]*> nop
++0000a600 <[^>]*> nop
++0000a604 <[^>]*> nop
++0000a608 <[^>]*> nop
++0000a60c <[^>]*> nop
++0000a610 <[^>]*> nop
++0000a614 <[^>]*> nop
++0000a618 <[^>]*> nop
++0000a61c <[^>]*> nop
++0000a620 <[^>]*> nop
++0000a624 <[^>]*> nop
++0000a628 <[^>]*> nop
++0000a62c <[^>]*> nop
++0000a630 <[^>]*> nop
++0000a634 <[^>]*> nop
++0000a638 <[^>]*> nop
++0000a63c <[^>]*> nop
++0000a640 <[^>]*> nop
++0000a644 <[^>]*> nop
++0000a648 <[^>]*> nop
++0000a64c <[^>]*> nop
++0000a650 <[^>]*> nop
++0000a654 <[^>]*> nop
++0000a658 <[^>]*> nop
++0000a65c <[^>]*> nop
++0000a660 <[^>]*> nop
++0000a664 <[^>]*> nop
++0000a668 <[^>]*> nop
++0000a66c <[^>]*> nop
++0000a670 <[^>]*> nop
++0000a674 <[^>]*> nop
++0000a678 <[^>]*> nop
++0000a67c <[^>]*> nop
++0000a680 <[^>]*> nop
++0000a684 <[^>]*> nop
++0000a688 <[^>]*> nop
++0000a68c <[^>]*> nop
++0000a690 <[^>]*> nop
++0000a694 <[^>]*> nop
++0000a698 <[^>]*> nop
++0000a69c <[^>]*> nop
++0000a6a0 <[^>]*> nop
++0000a6a4 <[^>]*> nop
++0000a6a8 <[^>]*> nop
++0000a6ac <[^>]*> nop
++0000a6b0 <[^>]*> nop
++0000a6b4 <[^>]*> nop
++0000a6b8 <[^>]*> nop
++0000a6bc <[^>]*> nop
++0000a6c0 <[^>]*> nop
++0000a6c4 <[^>]*> nop
++0000a6c8 <[^>]*> nop
++0000a6cc <[^>]*> nop
++0000a6d0 <[^>]*> nop
++0000a6d4 <[^>]*> nop
++0000a6d8 <[^>]*> nop
++0000a6dc <[^>]*> nop
++0000a6e0 <[^>]*> nop
++0000a6e4 <[^>]*> nop
++0000a6e8 <[^>]*> nop
++0000a6ec <[^>]*> nop
++0000a6f0 <[^>]*> nop
++0000a6f4 <[^>]*> nop
++0000a6f8 <[^>]*> nop
++0000a6fc <[^>]*> nop
++0000a700 <[^>]*> nop
++0000a704 <[^>]*> nop
++0000a708 <[^>]*> nop
++0000a70c <[^>]*> nop
++0000a710 <[^>]*> nop
++0000a714 <[^>]*> nop
++0000a718 <[^>]*> nop
++0000a71c <[^>]*> nop
++0000a720 <[^>]*> nop
++0000a724 <[^>]*> nop
++0000a728 <[^>]*> nop
++0000a72c <[^>]*> nop
++0000a730 <[^>]*> nop
++0000a734 <[^>]*> nop
++0000a738 <[^>]*> nop
++0000a73c <[^>]*> nop
++0000a740 <[^>]*> nop
++0000a744 <[^>]*> nop
++0000a748 <[^>]*> nop
++0000a74c <[^>]*> nop
++0000a750 <[^>]*> nop
++0000a754 <[^>]*> nop
++0000a758 <[^>]*> nop
++0000a75c <[^>]*> nop
++0000a760 <[^>]*> nop
++0000a764 <[^>]*> nop
++0000a768 <[^>]*> nop
++0000a76c <[^>]*> nop
++0000a770 <[^>]*> nop
++0000a774 <[^>]*> nop
++0000a778 <[^>]*> nop
++0000a77c <[^>]*> nop
++0000a780 <[^>]*> nop
++0000a784 <[^>]*> nop
++0000a788 <[^>]*> nop
++0000a78c <[^>]*> nop
++0000a790 <[^>]*> nop
++0000a794 <[^>]*> nop
++0000a798 <[^>]*> nop
++0000a79c <[^>]*> nop
++0000a7a0 <[^>]*> nop
++0000a7a4 <[^>]*> nop
++0000a7a8 <[^>]*> nop
++0000a7ac <[^>]*> nop
++0000a7b0 <[^>]*> nop
++0000a7b4 <[^>]*> nop
++0000a7b8 <[^>]*> nop
++0000a7bc <[^>]*> nop
++0000a7c0 <[^>]*> nop
++0000a7c4 <[^>]*> nop
++0000a7c8 <[^>]*> nop
++0000a7cc <[^>]*> nop
++0000a7d0 <[^>]*> nop
++0000a7d4 <[^>]*> nop
++0000a7d8 <[^>]*> nop
++0000a7dc <[^>]*> nop
++0000a7e0 <[^>]*> nop
++0000a7e4 <[^>]*> nop
++0000a7e8 <[^>]*> nop
++0000a7ec <[^>]*> nop
++0000a7f0 <[^>]*> nop
++0000a7f4 <[^>]*> nop
++0000a7f8 <[^>]*> nop
++0000a7fc <[^>]*> nop
++0000a800 <[^>]*> nop
++0000a804 <[^>]*> nop
++0000a808 <[^>]*> nop
++0000a80c <[^>]*> nop
++0000a810 <[^>]*> nop
++0000a814 <[^>]*> nop
++0000a818 <[^>]*> nop
++0000a81c <[^>]*> nop
++0000a820 <[^>]*> nop
++0000a824 <[^>]*> nop
++0000a828 <[^>]*> nop
++0000a82c <[^>]*> nop
++0000a830 <[^>]*> nop
++0000a834 <[^>]*> nop
++0000a838 <[^>]*> nop
++0000a83c <[^>]*> nop
++0000a840 <[^>]*> nop
++0000a844 <[^>]*> nop
++0000a848 <[^>]*> nop
++0000a84c <[^>]*> nop
++0000a850 <[^>]*> nop
++0000a854 <[^>]*> nop
++0000a858 <[^>]*> nop
++0000a85c <[^>]*> nop
++0000a860 <[^>]*> nop
++0000a864 <[^>]*> nop
++0000a868 <[^>]*> nop
++0000a86c <[^>]*> nop
++0000a870 <[^>]*> nop
++0000a874 <[^>]*> nop
++0000a878 <[^>]*> nop
++0000a87c <[^>]*> nop
++0000a880 <[^>]*> nop
++0000a884 <[^>]*> nop
++0000a888 <[^>]*> nop
++0000a88c <[^>]*> nop
++0000a890 <[^>]*> nop
++0000a894 <[^>]*> nop
++0000a898 <[^>]*> nop
++0000a89c <[^>]*> nop
++0000a8a0 <[^>]*> nop
++0000a8a4 <[^>]*> nop
++0000a8a8 <[^>]*> nop
++0000a8ac <[^>]*> nop
++0000a8b0 <[^>]*> nop
++0000a8b4 <[^>]*> nop
++0000a8b8 <[^>]*> nop
++0000a8bc <[^>]*> nop
++0000a8c0 <[^>]*> nop
++0000a8c4 <[^>]*> nop
++0000a8c8 <[^>]*> nop
++0000a8cc <[^>]*> nop
++0000a8d0 <[^>]*> nop
++0000a8d4 <[^>]*> nop
++0000a8d8 <[^>]*> nop
++0000a8dc <[^>]*> nop
++0000a8e0 <[^>]*> nop
++0000a8e4 <[^>]*> nop
++0000a8e8 <[^>]*> nop
++0000a8ec <[^>]*> nop
++0000a8f0 <[^>]*> nop
++0000a8f4 <[^>]*> nop
++0000a8f8 <[^>]*> nop
++0000a8fc <[^>]*> nop
++0000a900 <[^>]*> nop
++0000a904 <[^>]*> nop
++0000a908 <[^>]*> nop
++0000a90c <[^>]*> nop
++0000a910 <[^>]*> nop
++0000a914 <[^>]*> nop
++0000a918 <[^>]*> nop
++0000a91c <[^>]*> nop
++0000a920 <[^>]*> nop
++0000a924 <[^>]*> nop
++0000a928 <[^>]*> nop
++0000a92c <[^>]*> nop
++0000a930 <[^>]*> nop
++0000a934 <[^>]*> nop
++0000a938 <[^>]*> nop
++0000a93c <[^>]*> nop
++0000a940 <[^>]*> nop
++0000a944 <[^>]*> nop
++0000a948 <[^>]*> nop
++0000a94c <[^>]*> nop
++0000a950 <[^>]*> nop
++0000a954 <[^>]*> nop
++0000a958 <[^>]*> nop
++0000a95c <[^>]*> nop
++0000a960 <[^>]*> nop
++0000a964 <[^>]*> nop
++0000a968 <[^>]*> nop
++0000a96c <[^>]*> nop
++0000a970 <[^>]*> nop
++0000a974 <[^>]*> nop
++0000a978 <[^>]*> nop
++0000a97c <[^>]*> nop
++0000a980 <[^>]*> nop
++0000a984 <[^>]*> nop
++0000a988 <[^>]*> nop
++0000a98c <[^>]*> nop
++0000a990 <[^>]*> nop
++0000a994 <[^>]*> nop
++0000a998 <[^>]*> nop
++0000a99c <[^>]*> nop
++0000a9a0 <[^>]*> nop
++0000a9a4 <[^>]*> nop
++0000a9a8 <[^>]*> nop
++0000a9ac <[^>]*> nop
++0000a9b0 <[^>]*> nop
++0000a9b4 <[^>]*> nop
++0000a9b8 <[^>]*> nop
++0000a9bc <[^>]*> nop
++0000a9c0 <[^>]*> nop
++0000a9c4 <[^>]*> nop
++0000a9c8 <[^>]*> nop
++0000a9cc <[^>]*> nop
++0000a9d0 <[^>]*> nop
++0000a9d4 <[^>]*> nop
++0000a9d8 <[^>]*> nop
++0000a9dc <[^>]*> nop
++0000a9e0 <[^>]*> nop
++0000a9e4 <[^>]*> nop
++0000a9e8 <[^>]*> nop
++0000a9ec <[^>]*> nop
++0000a9f0 <[^>]*> nop
++0000a9f4 <[^>]*> nop
++0000a9f8 <[^>]*> nop
++0000a9fc <[^>]*> nop
++0000aa00 <[^>]*> nop
++0000aa04 <[^>]*> nop
++0000aa08 <[^>]*> nop
++0000aa0c <[^>]*> nop
++0000aa10 <[^>]*> nop
++0000aa14 <[^>]*> nop
++0000aa18 <[^>]*> nop
++0000aa1c <[^>]*> nop
++0000aa20 <[^>]*> nop
++0000aa24 <[^>]*> nop
++0000aa28 <[^>]*> nop
++0000aa2c <[^>]*> nop
++0000aa30 <[^>]*> nop
++0000aa34 <[^>]*> nop
++0000aa38 <[^>]*> nop
++0000aa3c <[^>]*> nop
++0000aa40 <[^>]*> nop
++0000aa44 <[^>]*> nop
++0000aa48 <[^>]*> nop
++0000aa4c <[^>]*> nop
++0000aa50 <[^>]*> nop
++0000aa54 <[^>]*> nop
++0000aa58 <[^>]*> nop
++0000aa5c <[^>]*> nop
++0000aa60 <[^>]*> nop
++0000aa64 <[^>]*> nop
++0000aa68 <[^>]*> nop
++0000aa6c <[^>]*> nop
++0000aa70 <[^>]*> nop
++0000aa74 <[^>]*> nop
++0000aa78 <[^>]*> nop
++0000aa7c <[^>]*> nop
++0000aa80 <[^>]*> nop
++0000aa84 <[^>]*> nop
++0000aa88 <[^>]*> nop
++0000aa8c <[^>]*> nop
++0000aa90 <[^>]*> nop
++0000aa94 <[^>]*> nop
++0000aa98 <[^>]*> nop
++0000aa9c <[^>]*> nop
++0000aaa0 <[^>]*> nop
++0000aaa4 <[^>]*> nop
++0000aaa8 <[^>]*> nop
++0000aaac <[^>]*> nop
++0000aab0 <[^>]*> nop
++0000aab4 <[^>]*> nop
++0000aab8 <[^>]*> nop
++0000aabc <[^>]*> nop
++0000aac0 <[^>]*> nop
++0000aac4 <[^>]*> nop
++0000aac8 <[^>]*> nop
++0000aacc <[^>]*> nop
++0000aad0 <[^>]*> nop
++0000aad4 <[^>]*> nop
++0000aad8 <[^>]*> nop
++0000aadc <[^>]*> nop
++0000aae0 <[^>]*> nop
++0000aae4 <[^>]*> nop
++0000aae8 <[^>]*> nop
++0000aaec <[^>]*> nop
++0000aaf0 <[^>]*> nop
++0000aaf4 <[^>]*> nop
++0000aaf8 <[^>]*> nop
++0000aafc <[^>]*> nop
++0000ab00 <[^>]*> nop
++0000ab04 <[^>]*> nop
++0000ab08 <[^>]*> nop
++0000ab0c <[^>]*> nop
++0000ab10 <[^>]*> nop
++0000ab14 <[^>]*> nop
++0000ab18 <[^>]*> nop
++0000ab1c <[^>]*> nop
++0000ab20 <[^>]*> nop
++0000ab24 <[^>]*> nop
++0000ab28 <[^>]*> nop
++0000ab2c <[^>]*> nop
++0000ab30 <[^>]*> nop
++0000ab34 <[^>]*> nop
++0000ab38 <[^>]*> nop
++0000ab3c <[^>]*> nop
++0000ab40 <[^>]*> nop
++0000ab44 <[^>]*> nop
++0000ab48 <[^>]*> nop
++0000ab4c <[^>]*> nop
++0000ab50 <[^>]*> nop
++0000ab54 <[^>]*> nop
++0000ab58 <[^>]*> nop
++0000ab5c <[^>]*> nop
++0000ab60 <[^>]*> nop
++0000ab64 <[^>]*> nop
++0000ab68 <[^>]*> nop
++0000ab6c <[^>]*> nop
++0000ab70 <[^>]*> nop
++0000ab74 <[^>]*> nop
++0000ab78 <[^>]*> nop
++0000ab7c <[^>]*> nop
++0000ab80 <[^>]*> nop
++0000ab84 <[^>]*> nop
++0000ab88 <[^>]*> nop
++0000ab8c <[^>]*> nop
++0000ab90 <[^>]*> nop
++0000ab94 <[^>]*> nop
++0000ab98 <[^>]*> nop
++0000ab9c <[^>]*> nop
++0000aba0 <[^>]*> nop
++0000aba4 <[^>]*> nop
++0000aba8 <[^>]*> nop
++0000abac <[^>]*> nop
++0000abb0 <[^>]*> nop
++0000abb4 <[^>]*> nop
++0000abb8 <[^>]*> nop
++0000abbc <[^>]*> nop
++0000abc0 <[^>]*> nop
++0000abc4 <[^>]*> nop
++0000abc8 <[^>]*> nop
++0000abcc <[^>]*> nop
++0000abd0 <[^>]*> nop
++0000abd4 <[^>]*> nop
++0000abd8 <[^>]*> nop
++0000abdc <[^>]*> nop
++0000abe0 <[^>]*> nop
++0000abe4 <[^>]*> nop
++0000abe8 <[^>]*> nop
++0000abec <[^>]*> nop
++0000abf0 <[^>]*> nop
++0000abf4 <[^>]*> nop
++0000abf8 <[^>]*> nop
++0000abfc <[^>]*> nop
++0000ac00 <[^>]*> nop
++0000ac04 <[^>]*> nop
++0000ac08 <[^>]*> nop
++0000ac0c <[^>]*> nop
++0000ac10 <[^>]*> nop
++0000ac14 <[^>]*> nop
++0000ac18 <[^>]*> nop
++0000ac1c <[^>]*> nop
++0000ac20 <[^>]*> nop
++0000ac24 <[^>]*> nop
++0000ac28 <[^>]*> nop
++0000ac2c <[^>]*> nop
++0000ac30 <[^>]*> nop
++0000ac34 <[^>]*> nop
++0000ac38 <[^>]*> nop
++0000ac3c <[^>]*> nop
++0000ac40 <[^>]*> nop
++0000ac44 <[^>]*> nop
++0000ac48 <[^>]*> nop
++0000ac4c <[^>]*> nop
++0000ac50 <[^>]*> nop
++0000ac54 <[^>]*> nop
++0000ac58 <[^>]*> nop
++0000ac5c <[^>]*> nop
++0000ac60 <[^>]*> nop
++0000ac64 <[^>]*> nop
++0000ac68 <[^>]*> nop
++0000ac6c <[^>]*> nop
++0000ac70 <[^>]*> nop
++0000ac74 <[^>]*> nop
++0000ac78 <[^>]*> nop
++0000ac7c <[^>]*> nop
++0000ac80 <[^>]*> nop
++0000ac84 <[^>]*> nop
++0000ac88 <[^>]*> nop
++0000ac8c <[^>]*> nop
++0000ac90 <[^>]*> nop
++0000ac94 <[^>]*> nop
++0000ac98 <[^>]*> nop
++0000ac9c <[^>]*> nop
++0000aca0 <[^>]*> nop
++0000aca4 <[^>]*> nop
++0000aca8 <[^>]*> nop
++0000acac <[^>]*> nop
++0000acb0 <[^>]*> nop
++0000acb4 <[^>]*> nop
++0000acb8 <[^>]*> nop
++0000acbc <[^>]*> nop
++0000acc0 <[^>]*> nop
++0000acc4 <[^>]*> nop
++0000acc8 <[^>]*> nop
++0000accc <[^>]*> nop
++0000acd0 <[^>]*> nop
++0000acd4 <[^>]*> nop
++0000acd8 <[^>]*> nop
++0000acdc <[^>]*> nop
++0000ace0 <[^>]*> nop
++0000ace4 <[^>]*> nop
++0000ace8 <[^>]*> nop
++0000acec <[^>]*> nop
++0000acf0 <[^>]*> nop
++0000acf4 <[^>]*> nop
++0000acf8 <[^>]*> nop
++0000acfc <[^>]*> nop
++0000ad00 <[^>]*> nop
++0000ad04 <[^>]*> nop
++0000ad08 <[^>]*> nop
++0000ad0c <[^>]*> nop
++0000ad10 <[^>]*> nop
++0000ad14 <[^>]*> nop
++0000ad18 <[^>]*> nop
++0000ad1c <[^>]*> nop
++0000ad20 <[^>]*> nop
++0000ad24 <[^>]*> nop
++0000ad28 <[^>]*> nop
++0000ad2c <[^>]*> nop
++0000ad30 <[^>]*> nop
++0000ad34 <[^>]*> nop
++0000ad38 <[^>]*> nop
++0000ad3c <[^>]*> nop
++0000ad40 <[^>]*> nop
++0000ad44 <[^>]*> nop
++0000ad48 <[^>]*> nop
++0000ad4c <[^>]*> nop
++0000ad50 <[^>]*> nop
++0000ad54 <[^>]*> nop
++0000ad58 <[^>]*> nop
++0000ad5c <[^>]*> nop
++0000ad60 <[^>]*> nop
++0000ad64 <[^>]*> nop
++0000ad68 <[^>]*> nop
++0000ad6c <[^>]*> nop
++0000ad70 <[^>]*> nop
++0000ad74 <[^>]*> nop
++0000ad78 <[^>]*> nop
++0000ad7c <[^>]*> nop
++0000ad80 <[^>]*> nop
++0000ad84 <[^>]*> nop
++0000ad88 <[^>]*> nop
++0000ad8c <[^>]*> nop
++0000ad90 <[^>]*> nop
++0000ad94 <[^>]*> nop
++0000ad98 <[^>]*> nop
++0000ad9c <[^>]*> nop
++0000ada0 <[^>]*> nop
++0000ada4 <[^>]*> nop
++0000ada8 <[^>]*> nop
++0000adac <[^>]*> nop
++0000adb0 <[^>]*> nop
++0000adb4 <[^>]*> nop
++0000adb8 <[^>]*> nop
++0000adbc <[^>]*> nop
++0000adc0 <[^>]*> nop
++0000adc4 <[^>]*> nop
++0000adc8 <[^>]*> nop
++0000adcc <[^>]*> nop
++0000add0 <[^>]*> nop
++0000add4 <[^>]*> nop
++0000add8 <[^>]*> nop
++0000addc <[^>]*> nop
++0000ade0 <[^>]*> nop
++0000ade4 <[^>]*> nop
++0000ade8 <[^>]*> nop
++0000adec <[^>]*> nop
++0000adf0 <[^>]*> nop
++0000adf4 <[^>]*> nop
++0000adf8 <[^>]*> nop
++0000adfc <[^>]*> nop
++0000ae00 <[^>]*> nop
++0000ae04 <[^>]*> nop
++0000ae08 <[^>]*> nop
++0000ae0c <[^>]*> nop
++0000ae10 <[^>]*> nop
++0000ae14 <[^>]*> nop
++0000ae18 <[^>]*> nop
++0000ae1c <[^>]*> nop
++0000ae20 <[^>]*> nop
++0000ae24 <[^>]*> nop
++0000ae28 <[^>]*> nop
++0000ae2c <[^>]*> nop
++0000ae30 <[^>]*> nop
++0000ae34 <[^>]*> nop
++0000ae38 <[^>]*> nop
++0000ae3c <[^>]*> nop
++0000ae40 <[^>]*> nop
++0000ae44 <[^>]*> nop
++0000ae48 <[^>]*> nop
++0000ae4c <[^>]*> nop
++0000ae50 <[^>]*> nop
++0000ae54 <[^>]*> nop
++0000ae58 <[^>]*> nop
++0000ae5c <[^>]*> nop
++0000ae60 <[^>]*> nop
++0000ae64 <[^>]*> nop
++0000ae68 <[^>]*> nop
++0000ae6c <[^>]*> nop
++0000ae70 <[^>]*> nop
++0000ae74 <[^>]*> nop
++0000ae78 <[^>]*> nop
++0000ae7c <[^>]*> nop
++0000ae80 <[^>]*> nop
++0000ae84 <[^>]*> nop
++0000ae88 <[^>]*> nop
++0000ae8c <[^>]*> nop
++0000ae90 <[^>]*> nop
++0000ae94 <[^>]*> nop
++0000ae98 <[^>]*> nop
++0000ae9c <[^>]*> nop
++0000aea0 <[^>]*> nop
++0000aea4 <[^>]*> nop
++0000aea8 <[^>]*> nop
++0000aeac <[^>]*> nop
++0000aeb0 <[^>]*> nop
++0000aeb4 <[^>]*> nop
++0000aeb8 <[^>]*> nop
++0000aebc <[^>]*> nop
++0000aec0 <[^>]*> nop
++0000aec4 <[^>]*> nop
++0000aec8 <[^>]*> nop
++0000aecc <[^>]*> nop
++0000aed0 <[^>]*> nop
++0000aed4 <[^>]*> nop
++0000aed8 <[^>]*> nop
++0000aedc <[^>]*> nop
++0000aee0 <[^>]*> nop
++0000aee4 <[^>]*> nop
++0000aee8 <[^>]*> nop
++0000aeec <[^>]*> nop
++0000aef0 <[^>]*> nop
++0000aef4 <[^>]*> nop
++0000aef8 <[^>]*> nop
++0000aefc <[^>]*> nop
++0000af00 <[^>]*> nop
++0000af04 <[^>]*> nop
++0000af08 <[^>]*> nop
++0000af0c <[^>]*> nop
++0000af10 <[^>]*> nop
++0000af14 <[^>]*> nop
++0000af18 <[^>]*> nop
++0000af1c <[^>]*> nop
++0000af20 <[^>]*> nop
++0000af24 <[^>]*> nop
++0000af28 <[^>]*> nop
++0000af2c <[^>]*> nop
++0000af30 <[^>]*> nop
++0000af34 <[^>]*> nop
++0000af38 <[^>]*> nop
++0000af3c <[^>]*> nop
++0000af40 <[^>]*> nop
++0000af44 <[^>]*> nop
++0000af48 <[^>]*> nop
++0000af4c <[^>]*> nop
++0000af50 <[^>]*> nop
++0000af54 <[^>]*> nop
++0000af58 <[^>]*> nop
++0000af5c <[^>]*> nop
++0000af60 <[^>]*> nop
++0000af64 <[^>]*> nop
++0000af68 <[^>]*> nop
++0000af6c <[^>]*> nop
++0000af70 <[^>]*> nop
++0000af74 <[^>]*> nop
++0000af78 <[^>]*> nop
++0000af7c <[^>]*> nop
++0000af80 <[^>]*> nop
++0000af84 <[^>]*> nop
++0000af88 <[^>]*> nop
++0000af8c <[^>]*> nop
++0000af90 <[^>]*> nop
++0000af94 <[^>]*> nop
++0000af98 <[^>]*> nop
++0000af9c <[^>]*> nop
++0000afa0 <[^>]*> nop
++0000afa4 <[^>]*> nop
++0000afa8 <[^>]*> nop
++0000afac <[^>]*> nop
++0000afb0 <[^>]*> nop
++0000afb4 <[^>]*> nop
++0000afb8 <[^>]*> nop
++0000afbc <[^>]*> nop
++0000afc0 <[^>]*> nop
++0000afc4 <[^>]*> nop
++0000afc8 <[^>]*> nop
++0000afcc <[^>]*> nop
++0000afd0 <[^>]*> nop
++0000afd4 <[^>]*> nop
++0000afd8 <[^>]*> nop
++0000afdc <[^>]*> nop
++0000afe0 <[^>]*> nop
++0000afe4 <[^>]*> nop
++0000afe8 <[^>]*> nop
++0000afec <[^>]*> nop
++0000aff0 <[^>]*> nop
++0000aff4 <[^>]*> nop
++0000aff8 <[^>]*> nop
++0000affc <[^>]*> nop
++0000b000 <[^>]*> nop
++0000b004 <[^>]*> nop
++0000b008 <[^>]*> nop
++0000b00c <[^>]*> nop
++0000b010 <[^>]*> nop
++0000b014 <[^>]*> nop
++0000b018 <[^>]*> nop
++0000b01c <[^>]*> nop
++0000b020 <[^>]*> nop
++0000b024 <[^>]*> nop
++0000b028 <[^>]*> nop
++0000b02c <[^>]*> nop
++0000b030 <[^>]*> nop
++0000b034 <[^>]*> nop
++0000b038 <[^>]*> nop
++0000b03c <[^>]*> nop
++0000b040 <[^>]*> nop
++0000b044 <[^>]*> nop
++0000b048 <[^>]*> nop
++0000b04c <[^>]*> nop
++0000b050 <[^>]*> nop
++0000b054 <[^>]*> nop
++0000b058 <[^>]*> nop
++0000b05c <[^>]*> nop
++0000b060 <[^>]*> nop
++0000b064 <[^>]*> nop
++0000b068 <[^>]*> nop
++0000b06c <[^>]*> nop
++0000b070 <[^>]*> nop
++0000b074 <[^>]*> nop
++0000b078 <[^>]*> nop
++0000b07c <[^>]*> nop
++0000b080 <[^>]*> nop
++0000b084 <[^>]*> nop
++0000b088 <[^>]*> nop
++0000b08c <[^>]*> nop
++0000b090 <[^>]*> nop
++0000b094 <[^>]*> nop
++0000b098 <[^>]*> nop
++0000b09c <[^>]*> nop
++0000b0a0 <[^>]*> nop
++0000b0a4 <[^>]*> nop
++0000b0a8 <[^>]*> nop
++0000b0ac <[^>]*> nop
++0000b0b0 <[^>]*> nop
++0000b0b4 <[^>]*> nop
++0000b0b8 <[^>]*> nop
++0000b0bc <[^>]*> nop
++0000b0c0 <[^>]*> nop
++0000b0c4 <[^>]*> nop
++0000b0c8 <[^>]*> nop
++0000b0cc <[^>]*> nop
++0000b0d0 <[^>]*> nop
++0000b0d4 <[^>]*> nop
++0000b0d8 <[^>]*> nop
++0000b0dc <[^>]*> nop
++0000b0e0 <[^>]*> nop
++0000b0e4 <[^>]*> nop
++0000b0e8 <[^>]*> nop
++0000b0ec <[^>]*> nop
++0000b0f0 <[^>]*> nop
++0000b0f4 <[^>]*> nop
++0000b0f8 <[^>]*> nop
++0000b0fc <[^>]*> nop
++0000b100 <[^>]*> nop
++0000b104 <[^>]*> nop
++0000b108 <[^>]*> nop
++0000b10c <[^>]*> nop
++0000b110 <[^>]*> nop
++0000b114 <[^>]*> nop
++0000b118 <[^>]*> nop
++0000b11c <[^>]*> nop
++0000b120 <[^>]*> nop
++0000b124 <[^>]*> nop
++0000b128 <[^>]*> nop
++0000b12c <[^>]*> nop
++0000b130 <[^>]*> nop
++0000b134 <[^>]*> nop
++0000b138 <[^>]*> nop
++0000b13c <[^>]*> nop
++0000b140 <[^>]*> nop
++0000b144 <[^>]*> nop
++0000b148 <[^>]*> nop
++0000b14c <[^>]*> nop
++0000b150 <[^>]*> nop
++0000b154 <[^>]*> nop
++0000b158 <[^>]*> nop
++0000b15c <[^>]*> nop
++0000b160 <[^>]*> nop
++0000b164 <[^>]*> nop
++0000b168 <[^>]*> nop
++0000b16c <[^>]*> nop
++0000b170 <[^>]*> nop
++0000b174 <[^>]*> nop
++0000b178 <[^>]*> nop
++0000b17c <[^>]*> nop
++0000b180 <[^>]*> nop
++0000b184 <[^>]*> nop
++0000b188 <[^>]*> nop
++0000b18c <[^>]*> nop
++0000b190 <[^>]*> nop
++0000b194 <[^>]*> nop
++0000b198 <[^>]*> nop
++0000b19c <[^>]*> nop
++0000b1a0 <[^>]*> nop
++0000b1a4 <[^>]*> nop
++0000b1a8 <[^>]*> nop
++0000b1ac <[^>]*> nop
++0000b1b0 <[^>]*> nop
++0000b1b4 <[^>]*> nop
++0000b1b8 <[^>]*> nop
++0000b1bc <[^>]*> nop
++0000b1c0 <[^>]*> nop
++0000b1c4 <[^>]*> nop
++0000b1c8 <[^>]*> nop
++0000b1cc <[^>]*> nop
++0000b1d0 <[^>]*> nop
++0000b1d4 <[^>]*> nop
++0000b1d8 <[^>]*> nop
++0000b1dc <[^>]*> nop
++0000b1e0 <[^>]*> nop
++0000b1e4 <[^>]*> nop
++0000b1e8 <[^>]*> nop
++0000b1ec <[^>]*> nop
++0000b1f0 <[^>]*> nop
++0000b1f4 <[^>]*> nop
++0000b1f8 <[^>]*> nop
++0000b1fc <[^>]*> nop
++0000b200 <[^>]*> nop
++0000b204 <[^>]*> nop
++0000b208 <[^>]*> nop
++0000b20c <[^>]*> nop
++0000b210 <[^>]*> nop
++0000b214 <[^>]*> nop
++0000b218 <[^>]*> nop
++0000b21c <[^>]*> nop
++0000b220 <[^>]*> nop
++0000b224 <[^>]*> nop
++0000b228 <[^>]*> nop
++0000b22c <[^>]*> nop
++0000b230 <[^>]*> nop
++0000b234 <[^>]*> nop
++0000b238 <[^>]*> nop
++0000b23c <[^>]*> nop
++0000b240 <[^>]*> nop
++0000b244 <[^>]*> nop
++0000b248 <[^>]*> nop
++0000b24c <[^>]*> nop
++0000b250 <[^>]*> nop
++0000b254 <[^>]*> nop
++0000b258 <[^>]*> nop
++0000b25c <[^>]*> nop
++0000b260 <[^>]*> nop
++0000b264 <[^>]*> nop
++0000b268 <[^>]*> nop
++0000b26c <[^>]*> nop
++0000b270 <[^>]*> nop
++0000b274 <[^>]*> nop
++0000b278 <[^>]*> nop
++0000b27c <[^>]*> nop
++0000b280 <[^>]*> nop
++0000b284 <[^>]*> nop
++0000b288 <[^>]*> nop
++0000b28c <[^>]*> nop
++0000b290 <[^>]*> nop
++0000b294 <[^>]*> nop
++0000b298 <[^>]*> nop
++0000b29c <[^>]*> nop
++0000b2a0 <[^>]*> nop
++0000b2a4 <[^>]*> nop
++0000b2a8 <[^>]*> nop
++0000b2ac <[^>]*> nop
++0000b2b0 <[^>]*> nop
++0000b2b4 <[^>]*> nop
++0000b2b8 <[^>]*> nop
++0000b2bc <[^>]*> nop
++0000b2c0 <[^>]*> nop
++0000b2c4 <[^>]*> nop
++0000b2c8 <[^>]*> nop
++0000b2cc <[^>]*> nop
++0000b2d0 <[^>]*> nop
++0000b2d4 <[^>]*> nop
++0000b2d8 <[^>]*> nop
++0000b2dc <[^>]*> nop
++0000b2e0 <[^>]*> nop
++0000b2e4 <[^>]*> nop
++0000b2e8 <[^>]*> nop
++0000b2ec <[^>]*> nop
++0000b2f0 <[^>]*> nop
++0000b2f4 <[^>]*> nop
++0000b2f8 <[^>]*> nop
++0000b2fc <[^>]*> nop
++0000b300 <[^>]*> nop
++0000b304 <[^>]*> nop
++0000b308 <[^>]*> nop
++0000b30c <[^>]*> nop
++0000b310 <[^>]*> nop
++0000b314 <[^>]*> nop
++0000b318 <[^>]*> nop
++0000b31c <[^>]*> nop
++0000b320 <[^>]*> nop
++0000b324 <[^>]*> nop
++0000b328 <[^>]*> nop
++0000b32c <[^>]*> nop
++0000b330 <[^>]*> nop
++0000b334 <[^>]*> nop
++0000b338 <[^>]*> nop
++0000b33c <[^>]*> nop
++0000b340 <[^>]*> nop
++0000b344 <[^>]*> nop
++0000b348 <[^>]*> nop
++0000b34c <[^>]*> nop
++0000b350 <[^>]*> nop
++0000b354 <[^>]*> nop
++0000b358 <[^>]*> nop
++0000b35c <[^>]*> nop
++0000b360 <[^>]*> nop
++0000b364 <[^>]*> nop
++0000b368 <[^>]*> nop
++0000b36c <[^>]*> nop
++0000b370 <[^>]*> nop
++0000b374 <[^>]*> nop
++0000b378 <[^>]*> nop
++0000b37c <[^>]*> nop
++0000b380 <[^>]*> nop
++0000b384 <[^>]*> nop
++0000b388 <[^>]*> nop
++0000b38c <[^>]*> nop
++0000b390 <[^>]*> nop
++0000b394 <[^>]*> nop
++0000b398 <[^>]*> nop
++0000b39c <[^>]*> nop
++0000b3a0 <[^>]*> nop
++0000b3a4 <[^>]*> nop
++0000b3a8 <[^>]*> nop
++0000b3ac <[^>]*> nop
++0000b3b0 <[^>]*> nop
++0000b3b4 <[^>]*> nop
++0000b3b8 <[^>]*> nop
++0000b3bc <[^>]*> nop
++0000b3c0 <[^>]*> nop
++0000b3c4 <[^>]*> nop
++0000b3c8 <[^>]*> nop
++0000b3cc <[^>]*> nop
++0000b3d0 <[^>]*> nop
++0000b3d4 <[^>]*> nop
++0000b3d8 <[^>]*> nop
++0000b3dc <[^>]*> nop
++0000b3e0 <[^>]*> nop
++0000b3e4 <[^>]*> nop
++0000b3e8 <[^>]*> nop
++0000b3ec <[^>]*> nop
++0000b3f0 <[^>]*> nop
++0000b3f4 <[^>]*> nop
++0000b3f8 <[^>]*> nop
++0000b3fc <[^>]*> nop
++0000b400 <[^>]*> nop
++0000b404 <[^>]*> nop
++0000b408 <[^>]*> nop
++0000b40c <[^>]*> nop
++0000b410 <[^>]*> nop
++0000b414 <[^>]*> nop
++0000b418 <[^>]*> nop
++0000b41c <[^>]*> nop
++0000b420 <[^>]*> nop
++0000b424 <[^>]*> nop
++0000b428 <[^>]*> nop
++0000b42c <[^>]*> nop
++0000b430 <[^>]*> nop
++0000b434 <[^>]*> nop
++0000b438 <[^>]*> nop
++0000b43c <[^>]*> nop
++0000b440 <[^>]*> nop
++0000b444 <[^>]*> nop
++0000b448 <[^>]*> nop
++0000b44c <[^>]*> nop
++0000b450 <[^>]*> nop
++0000b454 <[^>]*> nop
++0000b458 <[^>]*> nop
++0000b45c <[^>]*> nop
++0000b460 <[^>]*> nop
++0000b464 <[^>]*> nop
++0000b468 <[^>]*> nop
++0000b46c <[^>]*> nop
++0000b470 <[^>]*> nop
++0000b474 <[^>]*> nop
++0000b478 <[^>]*> nop
++0000b47c <[^>]*> nop
++0000b480 <[^>]*> nop
++0000b484 <[^>]*> nop
++0000b488 <[^>]*> nop
++0000b48c <[^>]*> nop
++0000b490 <[^>]*> nop
++0000b494 <[^>]*> nop
++0000b498 <[^>]*> nop
++0000b49c <[^>]*> nop
++0000b4a0 <[^>]*> nop
++0000b4a4 <[^>]*> nop
++0000b4a8 <[^>]*> nop
++0000b4ac <[^>]*> nop
++0000b4b0 <[^>]*> nop
++0000b4b4 <[^>]*> nop
++0000b4b8 <[^>]*> nop
++0000b4bc <[^>]*> nop
++0000b4c0 <[^>]*> nop
++0000b4c4 <[^>]*> nop
++0000b4c8 <[^>]*> nop
++0000b4cc <[^>]*> nop
++0000b4d0 <[^>]*> nop
++0000b4d4 <[^>]*> nop
++0000b4d8 <[^>]*> nop
++0000b4dc <[^>]*> nop
++0000b4e0 <[^>]*> nop
++0000b4e4 <[^>]*> nop
++0000b4e8 <[^>]*> nop
++0000b4ec <[^>]*> nop
++0000b4f0 <[^>]*> nop
++0000b4f4 <[^>]*> nop
++0000b4f8 <[^>]*> nop
++0000b4fc <[^>]*> nop
++0000b500 <[^>]*> nop
++0000b504 <[^>]*> nop
++0000b508 <[^>]*> nop
++0000b50c <[^>]*> nop
++0000b510 <[^>]*> nop
++0000b514 <[^>]*> nop
++0000b518 <[^>]*> nop
++0000b51c <[^>]*> nop
++0000b520 <[^>]*> nop
++0000b524 <[^>]*> nop
++0000b528 <[^>]*> nop
++0000b52c <[^>]*> nop
++0000b530 <[^>]*> nop
++0000b534 <[^>]*> nop
++0000b538 <[^>]*> nop
++0000b53c <[^>]*> nop
++0000b540 <[^>]*> nop
++0000b544 <[^>]*> nop
++0000b548 <[^>]*> nop
++0000b54c <[^>]*> nop
++0000b550 <[^>]*> nop
++0000b554 <[^>]*> nop
++0000b558 <[^>]*> nop
++0000b55c <[^>]*> nop
++0000b560 <[^>]*> nop
++0000b564 <[^>]*> nop
++0000b568 <[^>]*> nop
++0000b56c <[^>]*> nop
++0000b570 <[^>]*> nop
++0000b574 <[^>]*> nop
++0000b578 <[^>]*> nop
++0000b57c <[^>]*> nop
++0000b580 <[^>]*> nop
++0000b584 <[^>]*> nop
++0000b588 <[^>]*> nop
++0000b58c <[^>]*> nop
++0000b590 <[^>]*> nop
++0000b594 <[^>]*> nop
++0000b598 <[^>]*> nop
++0000b59c <[^>]*> nop
++0000b5a0 <[^>]*> nop
++0000b5a4 <[^>]*> nop
++0000b5a8 <[^>]*> nop
++0000b5ac <[^>]*> nop
++0000b5b0 <[^>]*> nop
++0000b5b4 <[^>]*> nop
++0000b5b8 <[^>]*> nop
++0000b5bc <[^>]*> nop
++0000b5c0 <[^>]*> nop
++0000b5c4 <[^>]*> nop
++0000b5c8 <[^>]*> nop
++0000b5cc <[^>]*> nop
++0000b5d0 <[^>]*> nop
++0000b5d4 <[^>]*> nop
++0000b5d8 <[^>]*> nop
++0000b5dc <[^>]*> nop
++0000b5e0 <[^>]*> nop
++0000b5e4 <[^>]*> nop
++0000b5e8 <[^>]*> nop
++0000b5ec <[^>]*> nop
++0000b5f0 <[^>]*> nop
++0000b5f4 <[^>]*> nop
++0000b5f8 <[^>]*> nop
++0000b5fc <[^>]*> nop
++0000b600 <[^>]*> nop
++0000b604 <[^>]*> nop
++0000b608 <[^>]*> nop
++0000b60c <[^>]*> nop
++0000b610 <[^>]*> nop
++0000b614 <[^>]*> nop
++0000b618 <[^>]*> nop
++0000b61c <[^>]*> nop
++0000b620 <[^>]*> nop
++0000b624 <[^>]*> nop
++0000b628 <[^>]*> nop
++0000b62c <[^>]*> nop
++0000b630 <[^>]*> nop
++0000b634 <[^>]*> nop
++0000b638 <[^>]*> nop
++0000b63c <[^>]*> nop
++0000b640 <[^>]*> nop
++0000b644 <[^>]*> nop
++0000b648 <[^>]*> nop
++0000b64c <[^>]*> nop
++0000b650 <[^>]*> nop
++0000b654 <[^>]*> nop
++0000b658 <[^>]*> nop
++0000b65c <[^>]*> nop
++0000b660 <[^>]*> nop
++0000b664 <[^>]*> nop
++0000b668 <[^>]*> nop
++0000b66c <[^>]*> nop
++0000b670 <[^>]*> nop
++0000b674 <[^>]*> nop
++0000b678 <[^>]*> nop
++0000b67c <[^>]*> nop
++0000b680 <[^>]*> nop
++0000b684 <[^>]*> nop
++0000b688 <[^>]*> nop
++0000b68c <[^>]*> nop
++0000b690 <[^>]*> nop
++0000b694 <[^>]*> nop
++0000b698 <[^>]*> nop
++0000b69c <[^>]*> nop
++0000b6a0 <[^>]*> nop
++0000b6a4 <[^>]*> nop
++0000b6a8 <[^>]*> nop
++0000b6ac <[^>]*> nop
++0000b6b0 <[^>]*> nop
++0000b6b4 <[^>]*> nop
++0000b6b8 <[^>]*> nop
++0000b6bc <[^>]*> nop
++0000b6c0 <[^>]*> nop
++0000b6c4 <[^>]*> nop
++0000b6c8 <[^>]*> nop
++0000b6cc <[^>]*> nop
++0000b6d0 <[^>]*> nop
++0000b6d4 <[^>]*> nop
++0000b6d8 <[^>]*> nop
++0000b6dc <[^>]*> nop
++0000b6e0 <[^>]*> nop
++0000b6e4 <[^>]*> nop
++0000b6e8 <[^>]*> nop
++0000b6ec <[^>]*> nop
++0000b6f0 <[^>]*> nop
++0000b6f4 <[^>]*> nop
++0000b6f8 <[^>]*> nop
++0000b6fc <[^>]*> nop
++0000b700 <[^>]*> nop
++0000b704 <[^>]*> nop
++0000b708 <[^>]*> nop
++0000b70c <[^>]*> nop
++0000b710 <[^>]*> nop
++0000b714 <[^>]*> nop
++0000b718 <[^>]*> nop
++0000b71c <[^>]*> nop
++0000b720 <[^>]*> nop
++0000b724 <[^>]*> nop
++0000b728 <[^>]*> nop
++0000b72c <[^>]*> nop
++0000b730 <[^>]*> nop
++0000b734 <[^>]*> nop
++0000b738 <[^>]*> nop
++0000b73c <[^>]*> nop
++0000b740 <[^>]*> nop
++0000b744 <[^>]*> nop
++0000b748 <[^>]*> nop
++0000b74c <[^>]*> nop
++0000b750 <[^>]*> nop
++0000b754 <[^>]*> nop
++0000b758 <[^>]*> nop
++0000b75c <[^>]*> nop
++0000b760 <[^>]*> nop
++0000b764 <[^>]*> nop
++0000b768 <[^>]*> nop
++0000b76c <[^>]*> nop
++0000b770 <[^>]*> nop
++0000b774 <[^>]*> nop
++0000b778 <[^>]*> nop
++0000b77c <[^>]*> nop
++0000b780 <[^>]*> nop
++0000b784 <[^>]*> nop
++0000b788 <[^>]*> nop
++0000b78c <[^>]*> nop
++0000b790 <[^>]*> nop
++0000b794 <[^>]*> nop
++0000b798 <[^>]*> nop
++0000b79c <[^>]*> nop
++0000b7a0 <[^>]*> nop
++0000b7a4 <[^>]*> nop
++0000b7a8 <[^>]*> nop
++0000b7ac <[^>]*> nop
++0000b7b0 <[^>]*> nop
++0000b7b4 <[^>]*> nop
++0000b7b8 <[^>]*> nop
++0000b7bc <[^>]*> nop
++0000b7c0 <[^>]*> nop
++0000b7c4 <[^>]*> nop
++0000b7c8 <[^>]*> nop
++0000b7cc <[^>]*> nop
++0000b7d0 <[^>]*> nop
++0000b7d4 <[^>]*> nop
++0000b7d8 <[^>]*> nop
++0000b7dc <[^>]*> nop
++0000b7e0 <[^>]*> nop
++0000b7e4 <[^>]*> nop
++0000b7e8 <[^>]*> nop
++0000b7ec <[^>]*> nop
++0000b7f0 <[^>]*> nop
++0000b7f4 <[^>]*> nop
++0000b7f8 <[^>]*> nop
++0000b7fc <[^>]*> nop
++0000b800 <[^>]*> nop
++0000b804 <[^>]*> nop
++0000b808 <[^>]*> nop
++0000b80c <[^>]*> nop
++0000b810 <[^>]*> nop
++0000b814 <[^>]*> nop
++0000b818 <[^>]*> nop
++0000b81c <[^>]*> nop
++0000b820 <[^>]*> nop
++0000b824 <[^>]*> nop
++0000b828 <[^>]*> nop
++0000b82c <[^>]*> nop
++0000b830 <[^>]*> nop
++0000b834 <[^>]*> nop
++0000b838 <[^>]*> nop
++0000b83c <[^>]*> nop
++0000b840 <[^>]*> nop
++0000b844 <[^>]*> nop
++0000b848 <[^>]*> nop
++0000b84c <[^>]*> nop
++0000b850 <[^>]*> nop
++0000b854 <[^>]*> nop
++0000b858 <[^>]*> nop
++0000b85c <[^>]*> nop
++0000b860 <[^>]*> nop
++0000b864 <[^>]*> nop
++0000b868 <[^>]*> nop
++0000b86c <[^>]*> nop
++0000b870 <[^>]*> nop
++0000b874 <[^>]*> nop
++0000b878 <[^>]*> nop
++0000b87c <[^>]*> nop
++0000b880 <[^>]*> nop
++0000b884 <[^>]*> nop
++0000b888 <[^>]*> nop
++0000b88c <[^>]*> nop
++0000b890 <[^>]*> nop
++0000b894 <[^>]*> nop
++0000b898 <[^>]*> nop
++0000b89c <[^>]*> nop
++0000b8a0 <[^>]*> nop
++0000b8a4 <[^>]*> nop
++0000b8a8 <[^>]*> nop
++0000b8ac <[^>]*> nop
++0000b8b0 <[^>]*> nop
++0000b8b4 <[^>]*> nop
++0000b8b8 <[^>]*> nop
++0000b8bc <[^>]*> nop
++0000b8c0 <[^>]*> nop
++0000b8c4 <[^>]*> nop
++0000b8c8 <[^>]*> nop
++0000b8cc <[^>]*> nop
++0000b8d0 <[^>]*> nop
++0000b8d4 <[^>]*> nop
++0000b8d8 <[^>]*> nop
++0000b8dc <[^>]*> nop
++0000b8e0 <[^>]*> nop
++0000b8e4 <[^>]*> nop
++0000b8e8 <[^>]*> nop
++0000b8ec <[^>]*> nop
++0000b8f0 <[^>]*> nop
++0000b8f4 <[^>]*> nop
++0000b8f8 <[^>]*> nop
++0000b8fc <[^>]*> nop
++0000b900 <[^>]*> nop
++0000b904 <[^>]*> nop
++0000b908 <[^>]*> nop
++0000b90c <[^>]*> nop
++0000b910 <[^>]*> nop
++0000b914 <[^>]*> nop
++0000b918 <[^>]*> nop
++0000b91c <[^>]*> nop
++0000b920 <[^>]*> nop
++0000b924 <[^>]*> nop
++0000b928 <[^>]*> nop
++0000b92c <[^>]*> nop
++0000b930 <[^>]*> nop
++0000b934 <[^>]*> nop
++0000b938 <[^>]*> nop
++0000b93c <[^>]*> nop
++0000b940 <[^>]*> nop
++0000b944 <[^>]*> nop
++0000b948 <[^>]*> nop
++0000b94c <[^>]*> nop
++0000b950 <[^>]*> nop
++0000b954 <[^>]*> nop
++0000b958 <[^>]*> nop
++0000b95c <[^>]*> nop
++0000b960 <[^>]*> nop
++0000b964 <[^>]*> nop
++0000b968 <[^>]*> nop
++0000b96c <[^>]*> nop
++0000b970 <[^>]*> nop
++0000b974 <[^>]*> nop
++0000b978 <[^>]*> nop
++0000b97c <[^>]*> nop
++0000b980 <[^>]*> nop
++0000b984 <[^>]*> nop
++0000b988 <[^>]*> nop
++0000b98c <[^>]*> nop
++0000b990 <[^>]*> nop
++0000b994 <[^>]*> nop
++0000b998 <[^>]*> nop
++0000b99c <[^>]*> nop
++0000b9a0 <[^>]*> nop
++0000b9a4 <[^>]*> nop
++0000b9a8 <[^>]*> nop
++0000b9ac <[^>]*> nop
++0000b9b0 <[^>]*> nop
++0000b9b4 <[^>]*> nop
++0000b9b8 <[^>]*> nop
++0000b9bc <[^>]*> nop
++0000b9c0 <[^>]*> nop
++0000b9c4 <[^>]*> nop
++0000b9c8 <[^>]*> nop
++0000b9cc <[^>]*> nop
++0000b9d0 <[^>]*> nop
++0000b9d4 <[^>]*> nop
++0000b9d8 <[^>]*> nop
++0000b9dc <[^>]*> nop
++0000b9e0 <[^>]*> nop
++0000b9e4 <[^>]*> nop
++0000b9e8 <[^>]*> nop
++0000b9ec <[^>]*> nop
++0000b9f0 <[^>]*> nop
++0000b9f4 <[^>]*> nop
++0000b9f8 <[^>]*> nop
++0000b9fc <[^>]*> nop
++0000ba00 <[^>]*> nop
++0000ba04 <[^>]*> nop
++0000ba08 <[^>]*> nop
++0000ba0c <[^>]*> nop
++0000ba10 <[^>]*> nop
++0000ba14 <[^>]*> nop
++0000ba18 <[^>]*> nop
++0000ba1c <[^>]*> nop
++0000ba20 <[^>]*> nop
++0000ba24 <[^>]*> nop
++0000ba28 <[^>]*> nop
++0000ba2c <[^>]*> nop
++0000ba30 <[^>]*> nop
++0000ba34 <[^>]*> nop
++0000ba38 <[^>]*> nop
++0000ba3c <[^>]*> nop
++0000ba40 <[^>]*> nop
++0000ba44 <[^>]*> nop
++0000ba48 <[^>]*> nop
++0000ba4c <[^>]*> nop
++0000ba50 <[^>]*> nop
++0000ba54 <[^>]*> nop
++0000ba58 <[^>]*> nop
++0000ba5c <[^>]*> nop
++0000ba60 <[^>]*> nop
++0000ba64 <[^>]*> nop
++0000ba68 <[^>]*> nop
++0000ba6c <[^>]*> nop
++0000ba70 <[^>]*> nop
++0000ba74 <[^>]*> nop
++0000ba78 <[^>]*> nop
++0000ba7c <[^>]*> nop
++0000ba80 <[^>]*> nop
++0000ba84 <[^>]*> nop
++0000ba88 <[^>]*> nop
++0000ba8c <[^>]*> nop
++0000ba90 <[^>]*> nop
++0000ba94 <[^>]*> nop
++0000ba98 <[^>]*> nop
++0000ba9c <[^>]*> nop
++0000baa0 <[^>]*> nop
++0000baa4 <[^>]*> nop
++0000baa8 <[^>]*> nop
++0000baac <[^>]*> nop
++0000bab0 <[^>]*> nop
++0000bab4 <[^>]*> nop
++0000bab8 <[^>]*> nop
++0000babc <[^>]*> nop
++0000bac0 <[^>]*> nop
++0000bac4 <[^>]*> nop
++0000bac8 <[^>]*> nop
++0000bacc <[^>]*> nop
++0000bad0 <[^>]*> nop
++0000bad4 <[^>]*> nop
++0000bad8 <[^>]*> nop
++0000badc <[^>]*> nop
++0000bae0 <[^>]*> nop
++0000bae4 <[^>]*> nop
++0000bae8 <[^>]*> nop
++0000baec <[^>]*> nop
++0000baf0 <[^>]*> nop
++0000baf4 <[^>]*> nop
++0000baf8 <[^>]*> nop
++0000bafc <[^>]*> nop
++0000bb00 <[^>]*> nop
++0000bb04 <[^>]*> nop
++0000bb08 <[^>]*> nop
++0000bb0c <[^>]*> nop
++0000bb10 <[^>]*> nop
++0000bb14 <[^>]*> nop
++0000bb18 <[^>]*> nop
++0000bb1c <[^>]*> nop
++0000bb20 <[^>]*> nop
++0000bb24 <[^>]*> nop
++0000bb28 <[^>]*> nop
++0000bb2c <[^>]*> nop
++0000bb30 <[^>]*> nop
++0000bb34 <[^>]*> nop
++0000bb38 <[^>]*> nop
++0000bb3c <[^>]*> nop
++0000bb40 <[^>]*> nop
++0000bb44 <[^>]*> nop
++0000bb48 <[^>]*> nop
++0000bb4c <[^>]*> nop
++0000bb50 <[^>]*> nop
++0000bb54 <[^>]*> nop
++0000bb58 <[^>]*> nop
++0000bb5c <[^>]*> nop
++0000bb60 <[^>]*> nop
++0000bb64 <[^>]*> nop
++0000bb68 <[^>]*> nop
++0000bb6c <[^>]*> nop
++0000bb70 <[^>]*> nop
++0000bb74 <[^>]*> nop
++0000bb78 <[^>]*> nop
++0000bb7c <[^>]*> nop
++0000bb80 <[^>]*> nop
++0000bb84 <[^>]*> nop
++0000bb88 <[^>]*> nop
++0000bb8c <[^>]*> nop
++0000bb90 <[^>]*> nop
++0000bb94 <[^>]*> nop
++0000bb98 <[^>]*> nop
++0000bb9c <[^>]*> nop
++0000bba0 <[^>]*> nop
++0000bba4 <[^>]*> nop
++0000bba8 <[^>]*> nop
++0000bbac <[^>]*> nop
++0000bbb0 <[^>]*> nop
++0000bbb4 <[^>]*> nop
++0000bbb8 <[^>]*> nop
++0000bbbc <[^>]*> nop
++0000bbc0 <[^>]*> nop
++0000bbc4 <[^>]*> nop
++0000bbc8 <[^>]*> nop
++0000bbcc <[^>]*> nop
++0000bbd0 <[^>]*> nop
++0000bbd4 <[^>]*> nop
++0000bbd8 <[^>]*> nop
++0000bbdc <[^>]*> nop
++0000bbe0 <[^>]*> nop
++0000bbe4 <[^>]*> nop
++0000bbe8 <[^>]*> nop
++0000bbec <[^>]*> nop
++0000bbf0 <[^>]*> nop
++0000bbf4 <[^>]*> nop
++0000bbf8 <[^>]*> nop
++0000bbfc <[^>]*> nop
++0000bc00 <[^>]*> nop
++0000bc04 <[^>]*> nop
++0000bc08 <[^>]*> nop
++0000bc0c <[^>]*> nop
++0000bc10 <[^>]*> nop
++0000bc14 <[^>]*> nop
++0000bc18 <[^>]*> nop
++0000bc1c <[^>]*> nop
++0000bc20 <[^>]*> nop
++0000bc24 <[^>]*> nop
++0000bc28 <[^>]*> nop
++0000bc2c <[^>]*> nop
++0000bc30 <[^>]*> nop
++0000bc34 <[^>]*> nop
++0000bc38 <[^>]*> nop
++0000bc3c <[^>]*> nop
++0000bc40 <[^>]*> nop
++0000bc44 <[^>]*> nop
++0000bc48 <[^>]*> nop
++0000bc4c <[^>]*> nop
++0000bc50 <[^>]*> nop
++0000bc54 <[^>]*> nop
++0000bc58 <[^>]*> nop
++0000bc5c <[^>]*> nop
++0000bc60 <[^>]*> nop
++0000bc64 <[^>]*> nop
++0000bc68 <[^>]*> nop
++0000bc6c <[^>]*> nop
++0000bc70 <[^>]*> nop
++0000bc74 <[^>]*> nop
++0000bc78 <[^>]*> nop
++0000bc7c <[^>]*> nop
++0000bc80 <[^>]*> nop
++0000bc84 <[^>]*> nop
++0000bc88 <[^>]*> nop
++0000bc8c <[^>]*> nop
++0000bc90 <[^>]*> nop
++0000bc94 <[^>]*> nop
++0000bc98 <[^>]*> nop
++0000bc9c <[^>]*> nop
++0000bca0 <[^>]*> nop
++0000bca4 <[^>]*> nop
++0000bca8 <[^>]*> nop
++0000bcac <[^>]*> nop
++0000bcb0 <[^>]*> nop
++0000bcb4 <[^>]*> nop
++0000bcb8 <[^>]*> nop
++0000bcbc <[^>]*> nop
++0000bcc0 <[^>]*> nop
++0000bcc4 <[^>]*> nop
++0000bcc8 <[^>]*> nop
++0000bccc <[^>]*> nop
++0000bcd0 <[^>]*> nop
++0000bcd4 <[^>]*> nop
++0000bcd8 <[^>]*> nop
++0000bcdc <[^>]*> nop
++0000bce0 <[^>]*> nop
++0000bce4 <[^>]*> nop
++0000bce8 <[^>]*> nop
++0000bcec <[^>]*> nop
++0000bcf0 <[^>]*> nop
++0000bcf4 <[^>]*> nop
++0000bcf8 <[^>]*> nop
++0000bcfc <[^>]*> nop
++0000bd00 <[^>]*> nop
++0000bd04 <[^>]*> nop
++0000bd08 <[^>]*> nop
++0000bd0c <[^>]*> nop
++0000bd10 <[^>]*> nop
++0000bd14 <[^>]*> nop
++0000bd18 <[^>]*> nop
++0000bd1c <[^>]*> nop
++0000bd20 <[^>]*> nop
++0000bd24 <[^>]*> nop
++0000bd28 <[^>]*> nop
++0000bd2c <[^>]*> nop
++0000bd30 <[^>]*> nop
++0000bd34 <[^>]*> nop
++0000bd38 <[^>]*> nop
++0000bd3c <[^>]*> nop
++0000bd40 <[^>]*> nop
++0000bd44 <[^>]*> nop
++0000bd48 <[^>]*> nop
++0000bd4c <[^>]*> nop
++0000bd50 <[^>]*> nop
++0000bd54 <[^>]*> nop
++0000bd58 <[^>]*> nop
++0000bd5c <[^>]*> nop
++0000bd60 <[^>]*> nop
++0000bd64 <[^>]*> nop
++0000bd68 <[^>]*> nop
++0000bd6c <[^>]*> nop
++0000bd70 <[^>]*> nop
++0000bd74 <[^>]*> nop
++0000bd78 <[^>]*> nop
++0000bd7c <[^>]*> nop
++0000bd80 <[^>]*> nop
++0000bd84 <[^>]*> nop
++0000bd88 <[^>]*> nop
++0000bd8c <[^>]*> nop
++0000bd90 <[^>]*> nop
++0000bd94 <[^>]*> nop
++0000bd98 <[^>]*> nop
++0000bd9c <[^>]*> nop
++0000bda0 <[^>]*> nop
++0000bda4 <[^>]*> nop
++0000bda8 <[^>]*> nop
++0000bdac <[^>]*> nop
++0000bdb0 <[^>]*> nop
++0000bdb4 <[^>]*> nop
++0000bdb8 <[^>]*> nop
++0000bdbc <[^>]*> nop
++0000bdc0 <[^>]*> nop
++0000bdc4 <[^>]*> nop
++0000bdc8 <[^>]*> nop
++0000bdcc <[^>]*> nop
++0000bdd0 <[^>]*> nop
++0000bdd4 <[^>]*> nop
++0000bdd8 <[^>]*> nop
++0000bddc <[^>]*> nop
++0000bde0 <[^>]*> nop
++0000bde4 <[^>]*> nop
++0000bde8 <[^>]*> nop
++0000bdec <[^>]*> nop
++0000bdf0 <[^>]*> nop
++0000bdf4 <[^>]*> nop
++0000bdf8 <[^>]*> nop
++0000bdfc <[^>]*> nop
++0000be00 <[^>]*> nop
++0000be04 <[^>]*> nop
++0000be08 <[^>]*> nop
++0000be0c <[^>]*> nop
++0000be10 <[^>]*> nop
++0000be14 <[^>]*> nop
++0000be18 <[^>]*> nop
++0000be1c <[^>]*> nop
++0000be20 <[^>]*> nop
++0000be24 <[^>]*> nop
++0000be28 <[^>]*> nop
++0000be2c <[^>]*> nop
++0000be30 <[^>]*> nop
++0000be34 <[^>]*> nop
++0000be38 <[^>]*> nop
++0000be3c <[^>]*> nop
++0000be40 <[^>]*> nop
++0000be44 <[^>]*> nop
++0000be48 <[^>]*> nop
++0000be4c <[^>]*> nop
++0000be50 <[^>]*> nop
++0000be54 <[^>]*> nop
++0000be58 <[^>]*> nop
++0000be5c <[^>]*> nop
++0000be60 <[^>]*> nop
++0000be64 <[^>]*> nop
++0000be68 <[^>]*> nop
++0000be6c <[^>]*> nop
++0000be70 <[^>]*> nop
++0000be74 <[^>]*> nop
++0000be78 <[^>]*> nop
++0000be7c <[^>]*> nop
++0000be80 <[^>]*> nop
++0000be84 <[^>]*> nop
++0000be88 <[^>]*> nop
++0000be8c <[^>]*> nop
++0000be90 <[^>]*> nop
++0000be94 <[^>]*> nop
++0000be98 <[^>]*> nop
++0000be9c <[^>]*> nop
++0000bea0 <[^>]*> nop
++0000bea4 <[^>]*> nop
++0000bea8 <[^>]*> nop
++0000beac <[^>]*> nop
++0000beb0 <[^>]*> nop
++0000beb4 <[^>]*> nop
++0000beb8 <[^>]*> nop
++0000bebc <[^>]*> nop
++0000bec0 <[^>]*> nop
++0000bec4 <[^>]*> nop
++0000bec8 <[^>]*> nop
++0000becc <[^>]*> nop
++0000bed0 <[^>]*> nop
++0000bed4 <[^>]*> nop
++0000bed8 <[^>]*> nop
++0000bedc <[^>]*> nop
++0000bee0 <[^>]*> nop
++0000bee4 <[^>]*> nop
++0000bee8 <[^>]*> nop
++0000beec <[^>]*> nop
++0000bef0 <[^>]*> nop
++0000bef4 <[^>]*> nop
++0000bef8 <[^>]*> nop
++0000befc <[^>]*> nop
++0000bf00 <[^>]*> nop
++0000bf04 <[^>]*> nop
++0000bf08 <[^>]*> nop
++0000bf0c <[^>]*> nop
++0000bf10 <[^>]*> nop
++0000bf14 <[^>]*> nop
++0000bf18 <[^>]*> nop
++0000bf1c <[^>]*> nop
++0000bf20 <[^>]*> nop
++0000bf24 <[^>]*> nop
++0000bf28 <[^>]*> nop
++0000bf2c <[^>]*> nop
++0000bf30 <[^>]*> nop
++0000bf34 <[^>]*> nop
++0000bf38 <[^>]*> nop
++0000bf3c <[^>]*> nop
++0000bf40 <[^>]*> nop
++0000bf44 <[^>]*> nop
++0000bf48 <[^>]*> nop
++0000bf4c <[^>]*> nop
++0000bf50 <[^>]*> nop
++0000bf54 <[^>]*> nop
++0000bf58 <[^>]*> nop
++0000bf5c <[^>]*> nop
++0000bf60 <[^>]*> nop
++0000bf64 <[^>]*> nop
++0000bf68 <[^>]*> nop
++0000bf6c <[^>]*> nop
++0000bf70 <[^>]*> nop
++0000bf74 <[^>]*> nop
++0000bf78 <[^>]*> nop
++0000bf7c <[^>]*> nop
++0000bf80 <[^>]*> nop
++0000bf84 <[^>]*> nop
++0000bf88 <[^>]*> nop
++0000bf8c <[^>]*> nop
++0000bf90 <[^>]*> nop
++0000bf94 <[^>]*> nop
++0000bf98 <[^>]*> nop
++0000bf9c <[^>]*> nop
++0000bfa0 <[^>]*> nop
++0000bfa4 <[^>]*> nop
++0000bfa8 <[^>]*> nop
++0000bfac <[^>]*> nop
++0000bfb0 <[^>]*> nop
++0000bfb4 <[^>]*> nop
++0000bfb8 <[^>]*> nop
++0000bfbc <[^>]*> nop
++0000bfc0 <[^>]*> nop
++0000bfc4 <[^>]*> nop
++0000bfc8 <[^>]*> nop
++0000bfcc <[^>]*> nop
++0000bfd0 <[^>]*> nop
++0000bfd4 <[^>]*> nop
++0000bfd8 <[^>]*> nop
++0000bfdc <[^>]*> nop
++0000bfe0 <[^>]*> nop
++0000bfe4 <[^>]*> nop
++0000bfe8 <[^>]*> nop
++0000bfec <[^>]*> nop
++0000bff0 <[^>]*> nop
++0000bff4 <[^>]*> nop
++0000bff8 <[^>]*> nop
++0000bffc <[^>]*> nop
++0000c000 <[^>]*> nop
++0000c004 <[^>]*> nop
++0000c008 <[^>]*> nop
++0000c00c <[^>]*> nop
++0000c010 <[^>]*> nop
++0000c014 <[^>]*> nop
++0000c018 <[^>]*> nop
++0000c01c <[^>]*> nop
++0000c020 <[^>]*> nop
++0000c024 <[^>]*> nop
++0000c028 <[^>]*> nop
++0000c02c <[^>]*> nop
++0000c030 <[^>]*> nop
++0000c034 <[^>]*> nop
++0000c038 <[^>]*> nop
++0000c03c <[^>]*> nop
++0000c040 <[^>]*> nop
++0000c044 <[^>]*> nop
++0000c048 <[^>]*> nop
++0000c04c <[^>]*> nop
++0000c050 <[^>]*> nop
++0000c054 <[^>]*> nop
++0000c058 <[^>]*> nop
++0000c05c <[^>]*> nop
++0000c060 <[^>]*> nop
++0000c064 <[^>]*> nop
++0000c068 <[^>]*> nop
++0000c06c <[^>]*> nop
++0000c070 <[^>]*> nop
++0000c074 <[^>]*> nop
++0000c078 <[^>]*> nop
++0000c07c <[^>]*> nop
++0000c080 <[^>]*> nop
++0000c084 <[^>]*> nop
++0000c088 <[^>]*> nop
++0000c08c <[^>]*> nop
++0000c090 <[^>]*> nop
++0000c094 <[^>]*> nop
++0000c098 <[^>]*> nop
++0000c09c <[^>]*> nop
++0000c0a0 <[^>]*> nop
++0000c0a4 <[^>]*> nop
++0000c0a8 <[^>]*> nop
++0000c0ac <[^>]*> nop
++0000c0b0 <[^>]*> nop
++0000c0b4 <[^>]*> nop
++0000c0b8 <[^>]*> nop
++0000c0bc <[^>]*> nop
++0000c0c0 <[^>]*> nop
++0000c0c4 <[^>]*> nop
++0000c0c8 <[^>]*> nop
++0000c0cc <[^>]*> nop
++0000c0d0 <[^>]*> nop
++0000c0d4 <[^>]*> nop
++0000c0d8 <[^>]*> nop
++0000c0dc <[^>]*> nop
++0000c0e0 <[^>]*> nop
++0000c0e4 <[^>]*> nop
++0000c0e8 <[^>]*> nop
++0000c0ec <[^>]*> nop
++0000c0f0 <[^>]*> nop
++0000c0f4 <[^>]*> nop
++0000c0f8 <[^>]*> nop
++0000c0fc <[^>]*> nop
++0000c100 <[^>]*> nop
++0000c104 <[^>]*> nop
++0000c108 <[^>]*> nop
++0000c10c <[^>]*> nop
++0000c110 <[^>]*> nop
++0000c114 <[^>]*> nop
++0000c118 <[^>]*> nop
++0000c11c <[^>]*> nop
++0000c120 <[^>]*> nop
++0000c124 <[^>]*> nop
++0000c128 <[^>]*> nop
++0000c12c <[^>]*> nop
++0000c130 <[^>]*> nop
++0000c134 <[^>]*> nop
++0000c138 <[^>]*> nop
++0000c13c <[^>]*> nop
++0000c140 <[^>]*> nop
++0000c144 <[^>]*> nop
++0000c148 <[^>]*> nop
++0000c14c <[^>]*> nop
++0000c150 <[^>]*> nop
++0000c154 <[^>]*> nop
++0000c158 <[^>]*> nop
++0000c15c <[^>]*> nop
++0000c160 <[^>]*> nop
++0000c164 <[^>]*> nop
++0000c168 <[^>]*> nop
++0000c16c <[^>]*> nop
++0000c170 <[^>]*> nop
++0000c174 <[^>]*> nop
++0000c178 <[^>]*> nop
++0000c17c <[^>]*> nop
++0000c180 <[^>]*> nop
++0000c184 <[^>]*> nop
++0000c188 <[^>]*> nop
++0000c18c <[^>]*> nop
++0000c190 <[^>]*> nop
++0000c194 <[^>]*> nop
++0000c198 <[^>]*> nop
++0000c19c <[^>]*> nop
++0000c1a0 <[^>]*> nop
++0000c1a4 <[^>]*> nop
++0000c1a8 <[^>]*> nop
++0000c1ac <[^>]*> nop
++0000c1b0 <[^>]*> nop
++0000c1b4 <[^>]*> nop
++0000c1b8 <[^>]*> nop
++0000c1bc <[^>]*> nop
++0000c1c0 <[^>]*> nop
++0000c1c4 <[^>]*> nop
++0000c1c8 <[^>]*> nop
++0000c1cc <[^>]*> nop
++0000c1d0 <[^>]*> nop
++0000c1d4 <[^>]*> nop
++0000c1d8 <[^>]*> nop
++0000c1dc <[^>]*> nop
++0000c1e0 <[^>]*> nop
++0000c1e4 <[^>]*> nop
++0000c1e8 <[^>]*> nop
++0000c1ec <[^>]*> nop
++0000c1f0 <[^>]*> nop
++0000c1f4 <[^>]*> nop
++0000c1f8 <[^>]*> nop
++0000c1fc <[^>]*> nop
++0000c200 <[^>]*> nop
++0000c204 <[^>]*> nop
++0000c208 <[^>]*> nop
++0000c20c <[^>]*> nop
++0000c210 <[^>]*> nop
++0000c214 <[^>]*> nop
++0000c218 <[^>]*> nop
++0000c21c <[^>]*> nop
++0000c220 <[^>]*> nop
++0000c224 <[^>]*> nop
++0000c228 <[^>]*> nop
++0000c22c <[^>]*> nop
++0000c230 <[^>]*> nop
++0000c234 <[^>]*> nop
++0000c238 <[^>]*> nop
++0000c23c <[^>]*> nop
++0000c240 <[^>]*> nop
++0000c244 <[^>]*> nop
++0000c248 <[^>]*> nop
++0000c24c <[^>]*> nop
++0000c250 <[^>]*> nop
++0000c254 <[^>]*> nop
++0000c258 <[^>]*> nop
++0000c25c <[^>]*> nop
++0000c260 <[^>]*> nop
++0000c264 <[^>]*> nop
++0000c268 <[^>]*> nop
++0000c26c <[^>]*> nop
++0000c270 <[^>]*> nop
++0000c274 <[^>]*> nop
++0000c278 <[^>]*> nop
++0000c27c <[^>]*> nop
++0000c280 <[^>]*> nop
++0000c284 <[^>]*> nop
++0000c288 <[^>]*> nop
++0000c28c <[^>]*> nop
++0000c290 <[^>]*> nop
++0000c294 <[^>]*> nop
++0000c298 <[^>]*> nop
++0000c29c <[^>]*> nop
++0000c2a0 <[^>]*> nop
++0000c2a4 <[^>]*> nop
++0000c2a8 <[^>]*> nop
++0000c2ac <[^>]*> nop
++0000c2b0 <[^>]*> nop
++0000c2b4 <[^>]*> nop
++0000c2b8 <[^>]*> nop
++0000c2bc <[^>]*> nop
++0000c2c0 <[^>]*> nop
++0000c2c4 <[^>]*> nop
++0000c2c8 <[^>]*> nop
++0000c2cc <[^>]*> nop
++0000c2d0 <[^>]*> nop
++0000c2d4 <[^>]*> nop
++0000c2d8 <[^>]*> nop
++0000c2dc <[^>]*> nop
++0000c2e0 <[^>]*> nop
++0000c2e4 <[^>]*> nop
++0000c2e8 <[^>]*> nop
++0000c2ec <[^>]*> nop
++0000c2f0 <[^>]*> nop
++0000c2f4 <[^>]*> nop
++0000c2f8 <[^>]*> nop
++0000c2fc <[^>]*> nop
++0000c300 <[^>]*> nop
++0000c304 <[^>]*> nop
++0000c308 <[^>]*> nop
++0000c30c <[^>]*> nop
++0000c310 <[^>]*> nop
++0000c314 <[^>]*> nop
++0000c318 <[^>]*> nop
++0000c31c <[^>]*> nop
++0000c320 <[^>]*> nop
++0000c324 <[^>]*> nop
++0000c328 <[^>]*> nop
++0000c32c <[^>]*> nop
++0000c330 <[^>]*> nop
++0000c334 <[^>]*> nop
++0000c338 <[^>]*> nop
++0000c33c <[^>]*> nop
++0000c340 <[^>]*> nop
++0000c344 <[^>]*> nop
++0000c348 <[^>]*> nop
++0000c34c <[^>]*> nop
++0000c350 <[^>]*> nop
++0000c354 <[^>]*> nop
++0000c358 <[^>]*> nop
++0000c35c <[^>]*> nop
++0000c360 <[^>]*> nop
++0000c364 <[^>]*> nop
++0000c368 <[^>]*> nop
++0000c36c <[^>]*> nop
++0000c370 <[^>]*> nop
++0000c374 <[^>]*> nop
++0000c378 <[^>]*> nop
++0000c37c <[^>]*> nop
++0000c380 <[^>]*> nop
++0000c384 <[^>]*> nop
++0000c388 <[^>]*> nop
++0000c38c <[^>]*> nop
++0000c390 <[^>]*> nop
++0000c394 <[^>]*> nop
++0000c398 <[^>]*> nop
++0000c39c <[^>]*> nop
++0000c3a0 <[^>]*> nop
++0000c3a4 <[^>]*> nop
++0000c3a8 <[^>]*> nop
++0000c3ac <[^>]*> nop
++0000c3b0 <[^>]*> nop
++0000c3b4 <[^>]*> nop
++0000c3b8 <[^>]*> nop
++0000c3bc <[^>]*> nop
++0000c3c0 <[^>]*> nop
++0000c3c4 <[^>]*> nop
++0000c3c8 <[^>]*> nop
++0000c3cc <[^>]*> nop
++0000c3d0 <[^>]*> nop
++0000c3d4 <[^>]*> nop
++0000c3d8 <[^>]*> nop
++0000c3dc <[^>]*> nop
++0000c3e0 <[^>]*> nop
++0000c3e4 <[^>]*> nop
++0000c3e8 <[^>]*> nop
++0000c3ec <[^>]*> nop
++0000c3f0 <[^>]*> nop
++0000c3f4 <[^>]*> nop
++0000c3f8 <[^>]*> nop
++0000c3fc <[^>]*> nop
++0000c400 <[^>]*> nop
++0000c404 <[^>]*> nop
++0000c408 <[^>]*> nop
++0000c40c <[^>]*> nop
++0000c410 <[^>]*> nop
++0000c414 <[^>]*> nop
++0000c418 <[^>]*> nop
++0000c41c <[^>]*> nop
++0000c420 <[^>]*> nop
++0000c424 <[^>]*> nop
++0000c428 <[^>]*> nop
++0000c42c <[^>]*> nop
++0000c430 <[^>]*> nop
++0000c434 <[^>]*> nop
++0000c438 <[^>]*> nop
++0000c43c <[^>]*> nop
++0000c440 <[^>]*> nop
++0000c444 <[^>]*> nop
++0000c448 <[^>]*> nop
++0000c44c <[^>]*> nop
++0000c450 <[^>]*> nop
++0000c454 <[^>]*> nop
++0000c458 <[^>]*> nop
++0000c45c <[^>]*> nop
++0000c460 <[^>]*> nop
++0000c464 <[^>]*> nop
++0000c468 <[^>]*> nop
++0000c46c <[^>]*> nop
++0000c470 <[^>]*> nop
++0000c474 <[^>]*> nop
++0000c478 <[^>]*> nop
++0000c47c <[^>]*> nop
++0000c480 <[^>]*> nop
++0000c484 <[^>]*> nop
++0000c488 <[^>]*> nop
++0000c48c <[^>]*> nop
++0000c490 <[^>]*> nop
++0000c494 <[^>]*> nop
++0000c498 <[^>]*> nop
++0000c49c <[^>]*> nop
++0000c4a0 <[^>]*> nop
++0000c4a4 <[^>]*> nop
++0000c4a8 <[^>]*> nop
++0000c4ac <[^>]*> nop
++0000c4b0 <[^>]*> nop
++0000c4b4 <[^>]*> nop
++0000c4b8 <[^>]*> nop
++0000c4bc <[^>]*> nop
++0000c4c0 <[^>]*> nop
++0000c4c4 <[^>]*> nop
++0000c4c8 <[^>]*> nop
++0000c4cc <[^>]*> nop
++0000c4d0 <[^>]*> nop
++0000c4d4 <[^>]*> nop
++0000c4d8 <[^>]*> nop
++0000c4dc <[^>]*> nop
++0000c4e0 <[^>]*> nop
++0000c4e4 <[^>]*> nop
++0000c4e8 <[^>]*> nop
++0000c4ec <[^>]*> nop
++0000c4f0 <[^>]*> nop
++0000c4f4 <[^>]*> nop
++0000c4f8 <[^>]*> nop
++0000c4fc <[^>]*> nop
++0000c500 <[^>]*> nop
++0000c504 <[^>]*> nop
++0000c508 <[^>]*> nop
++0000c50c <[^>]*> nop
++0000c510 <[^>]*> nop
++0000c514 <[^>]*> nop
++0000c518 <[^>]*> nop
++0000c51c <[^>]*> nop
++0000c520 <[^>]*> nop
++0000c524 <[^>]*> nop
++0000c528 <[^>]*> nop
++0000c52c <[^>]*> nop
++0000c530 <[^>]*> nop
++0000c534 <[^>]*> nop
++0000c538 <[^>]*> nop
++0000c53c <[^>]*> nop
++0000c540 <[^>]*> nop
++0000c544 <[^>]*> nop
++0000c548 <[^>]*> nop
++0000c54c <[^>]*> nop
++0000c550 <[^>]*> nop
++0000c554 <[^>]*> nop
++0000c558 <[^>]*> nop
++0000c55c <[^>]*> nop
++0000c560 <[^>]*> nop
++0000c564 <[^>]*> nop
++0000c568 <[^>]*> nop
++0000c56c <[^>]*> nop
++0000c570 <[^>]*> nop
++0000c574 <[^>]*> nop
++0000c578 <[^>]*> nop
++0000c57c <[^>]*> nop
++0000c580 <[^>]*> nop
++0000c584 <[^>]*> nop
++0000c588 <[^>]*> nop
++0000c58c <[^>]*> nop
++0000c590 <[^>]*> nop
++0000c594 <[^>]*> nop
++0000c598 <[^>]*> nop
++0000c59c <[^>]*> nop
++0000c5a0 <[^>]*> nop
++0000c5a4 <[^>]*> nop
++0000c5a8 <[^>]*> nop
++0000c5ac <[^>]*> nop
++0000c5b0 <[^>]*> nop
++0000c5b4 <[^>]*> nop
++0000c5b8 <[^>]*> nop
++0000c5bc <[^>]*> nop
++0000c5c0 <[^>]*> nop
++0000c5c4 <[^>]*> nop
++0000c5c8 <[^>]*> nop
++0000c5cc <[^>]*> nop
++0000c5d0 <[^>]*> nop
++0000c5d4 <[^>]*> nop
++0000c5d8 <[^>]*> nop
++0000c5dc <[^>]*> nop
++0000c5e0 <[^>]*> nop
++0000c5e4 <[^>]*> nop
++0000c5e8 <[^>]*> nop
++0000c5ec <[^>]*> nop
++0000c5f0 <[^>]*> nop
++0000c5f4 <[^>]*> nop
++0000c5f8 <[^>]*> nop
++0000c5fc <[^>]*> nop
++0000c600 <[^>]*> nop
++0000c604 <[^>]*> nop
++0000c608 <[^>]*> nop
++0000c60c <[^>]*> nop
++0000c610 <[^>]*> nop
++0000c614 <[^>]*> nop
++0000c618 <[^>]*> nop
++0000c61c <[^>]*> nop
++0000c620 <[^>]*> nop
++0000c624 <[^>]*> nop
++0000c628 <[^>]*> nop
++0000c62c <[^>]*> nop
++0000c630 <[^>]*> nop
++0000c634 <[^>]*> nop
++0000c638 <[^>]*> nop
++0000c63c <[^>]*> nop
++0000c640 <[^>]*> nop
++0000c644 <[^>]*> nop
++0000c648 <[^>]*> nop
++0000c64c <[^>]*> nop
++0000c650 <[^>]*> nop
++0000c654 <[^>]*> nop
++0000c658 <[^>]*> nop
++0000c65c <[^>]*> nop
++0000c660 <[^>]*> nop
++0000c664 <[^>]*> nop
++0000c668 <[^>]*> nop
++0000c66c <[^>]*> nop
++0000c670 <[^>]*> nop
++0000c674 <[^>]*> nop
++0000c678 <[^>]*> nop
++0000c67c <[^>]*> nop
++0000c680 <[^>]*> nop
++0000c684 <[^>]*> nop
++0000c688 <[^>]*> nop
++0000c68c <[^>]*> nop
++0000c690 <[^>]*> nop
++0000c694 <[^>]*> nop
++0000c698 <[^>]*> nop
++0000c69c <[^>]*> nop
++0000c6a0 <[^>]*> nop
++0000c6a4 <[^>]*> nop
++0000c6a8 <[^>]*> nop
++0000c6ac <[^>]*> nop
++0000c6b0 <[^>]*> nop
++0000c6b4 <[^>]*> nop
++0000c6b8 <[^>]*> nop
++0000c6bc <[^>]*> nop
++0000c6c0 <[^>]*> nop
++0000c6c4 <[^>]*> nop
++0000c6c8 <[^>]*> nop
++0000c6cc <[^>]*> nop
++0000c6d0 <[^>]*> nop
++0000c6d4 <[^>]*> nop
++0000c6d8 <[^>]*> nop
++0000c6dc <[^>]*> nop
++0000c6e0 <[^>]*> nop
++0000c6e4 <[^>]*> nop
++0000c6e8 <[^>]*> nop
++0000c6ec <[^>]*> nop
++0000c6f0 <[^>]*> nop
++0000c6f4 <[^>]*> nop
++0000c6f8 <[^>]*> nop
++0000c6fc <[^>]*> nop
++0000c700 <[^>]*> nop
++0000c704 <[^>]*> nop
++0000c708 <[^>]*> nop
++0000c70c <[^>]*> nop
++0000c710 <[^>]*> nop
++0000c714 <[^>]*> nop
++0000c718 <[^>]*> nop
++0000c71c <[^>]*> nop
++0000c720 <[^>]*> nop
++0000c724 <[^>]*> nop
++0000c728 <[^>]*> nop
++0000c72c <[^>]*> nop
++0000c730 <[^>]*> nop
++0000c734 <[^>]*> nop
++0000c738 <[^>]*> nop
++0000c73c <[^>]*> nop
++0000c740 <[^>]*> nop
++0000c744 <[^>]*> nop
++0000c748 <[^>]*> nop
++0000c74c <[^>]*> nop
++0000c750 <[^>]*> nop
++0000c754 <[^>]*> nop
++0000c758 <[^>]*> nop
++0000c75c <[^>]*> nop
++0000c760 <[^>]*> nop
++0000c764 <[^>]*> nop
++0000c768 <[^>]*> nop
++0000c76c <[^>]*> nop
++0000c770 <[^>]*> nop
++0000c774 <[^>]*> nop
++0000c778 <[^>]*> nop
++0000c77c <[^>]*> nop
++0000c780 <[^>]*> nop
++0000c784 <[^>]*> nop
++0000c788 <[^>]*> nop
++0000c78c <[^>]*> nop
++0000c790 <[^>]*> nop
++0000c794 <[^>]*> nop
++0000c798 <[^>]*> nop
++0000c79c <[^>]*> nop
++0000c7a0 <[^>]*> nop
++0000c7a4 <[^>]*> nop
++0000c7a8 <[^>]*> nop
++0000c7ac <[^>]*> nop
++0000c7b0 <[^>]*> nop
++0000c7b4 <[^>]*> nop
++0000c7b8 <[^>]*> nop
++0000c7bc <[^>]*> nop
++0000c7c0 <[^>]*> nop
++0000c7c4 <[^>]*> nop
++0000c7c8 <[^>]*> nop
++0000c7cc <[^>]*> nop
++0000c7d0 <[^>]*> nop
++0000c7d4 <[^>]*> nop
++0000c7d8 <[^>]*> nop
++0000c7dc <[^>]*> nop
++0000c7e0 <[^>]*> nop
++0000c7e4 <[^>]*> nop
++0000c7e8 <[^>]*> nop
++0000c7ec <[^>]*> nop
++0000c7f0 <[^>]*> nop
++0000c7f4 <[^>]*> nop
++0000c7f8 <[^>]*> nop
++0000c7fc <[^>]*> nop
++0000c800 <[^>]*> nop
++0000c804 <[^>]*> nop
++0000c808 <[^>]*> nop
++0000c80c <[^>]*> nop
++0000c810 <[^>]*> nop
++0000c814 <[^>]*> nop
++0000c818 <[^>]*> nop
++0000c81c <[^>]*> nop
++0000c820 <[^>]*> nop
++0000c824 <[^>]*> nop
++0000c828 <[^>]*> nop
++0000c82c <[^>]*> nop
++0000c830 <[^>]*> nop
++0000c834 <[^>]*> nop
++0000c838 <[^>]*> nop
++0000c83c <[^>]*> nop
++0000c840 <[^>]*> nop
++0000c844 <[^>]*> nop
++0000c848 <[^>]*> nop
++0000c84c <[^>]*> nop
++0000c850 <[^>]*> nop
++0000c854 <[^>]*> nop
++0000c858 <[^>]*> nop
++0000c85c <[^>]*> nop
++0000c860 <[^>]*> nop
++0000c864 <[^>]*> nop
++0000c868 <[^>]*> nop
++0000c86c <[^>]*> nop
++0000c870 <[^>]*> nop
++0000c874 <[^>]*> nop
++0000c878 <[^>]*> nop
++0000c87c <[^>]*> nop
++0000c880 <[^>]*> nop
++0000c884 <[^>]*> nop
++0000c888 <[^>]*> nop
++0000c88c <[^>]*> nop
++0000c890 <[^>]*> nop
++0000c894 <[^>]*> nop
++0000c898 <[^>]*> nop
++0000c89c <[^>]*> nop
++0000c8a0 <[^>]*> nop
++0000c8a4 <[^>]*> nop
++0000c8a8 <[^>]*> nop
++0000c8ac <[^>]*> nop
++0000c8b0 <[^>]*> nop
++0000c8b4 <[^>]*> nop
++0000c8b8 <[^>]*> nop
++0000c8bc <[^>]*> nop
++0000c8c0 <[^>]*> nop
++0000c8c4 <[^>]*> nop
++0000c8c8 <[^>]*> nop
++0000c8cc <[^>]*> nop
++0000c8d0 <[^>]*> nop
++0000c8d4 <[^>]*> nop
++0000c8d8 <[^>]*> nop
++0000c8dc <[^>]*> nop
++0000c8e0 <[^>]*> nop
++0000c8e4 <[^>]*> nop
++0000c8e8 <[^>]*> nop
++0000c8ec <[^>]*> nop
++0000c8f0 <[^>]*> nop
++0000c8f4 <[^>]*> nop
++0000c8f8 <[^>]*> nop
++0000c8fc <[^>]*> nop
++0000c900 <[^>]*> nop
++0000c904 <[^>]*> nop
++0000c908 <[^>]*> nop
++0000c90c <[^>]*> nop
++0000c910 <[^>]*> nop
++0000c914 <[^>]*> nop
++0000c918 <[^>]*> nop
++0000c91c <[^>]*> nop
++0000c920 <[^>]*> nop
++0000c924 <[^>]*> nop
++0000c928 <[^>]*> nop
++0000c92c <[^>]*> nop
++0000c930 <[^>]*> nop
++0000c934 <[^>]*> nop
++0000c938 <[^>]*> nop
++0000c93c <[^>]*> nop
++0000c940 <[^>]*> nop
++0000c944 <[^>]*> nop
++0000c948 <[^>]*> nop
++0000c94c <[^>]*> nop
++0000c950 <[^>]*> nop
++0000c954 <[^>]*> nop
++0000c958 <[^>]*> nop
++0000c95c <[^>]*> nop
++0000c960 <[^>]*> nop
++0000c964 <[^>]*> nop
++0000c968 <[^>]*> nop
++0000c96c <[^>]*> nop
++0000c970 <[^>]*> nop
++0000c974 <[^>]*> nop
++0000c978 <[^>]*> nop
++0000c97c <[^>]*> nop
++0000c980 <[^>]*> nop
++0000c984 <[^>]*> nop
++0000c988 <[^>]*> nop
++0000c98c <[^>]*> nop
++0000c990 <[^>]*> nop
++0000c994 <[^>]*> nop
++0000c998 <[^>]*> nop
++0000c99c <[^>]*> nop
++0000c9a0 <[^>]*> nop
++0000c9a4 <[^>]*> nop
++0000c9a8 <[^>]*> nop
++0000c9ac <[^>]*> nop
++0000c9b0 <[^>]*> nop
++0000c9b4 <[^>]*> nop
++0000c9b8 <[^>]*> nop
++0000c9bc <[^>]*> nop
++0000c9c0 <[^>]*> nop
++0000c9c4 <[^>]*> nop
++0000c9c8 <[^>]*> nop
++0000c9cc <[^>]*> nop
++0000c9d0 <[^>]*> nop
++0000c9d4 <[^>]*> nop
++0000c9d8 <[^>]*> nop
++0000c9dc <[^>]*> nop
++0000c9e0 <[^>]*> nop
++0000c9e4 <[^>]*> nop
++0000c9e8 <[^>]*> nop
++0000c9ec <[^>]*> nop
++0000c9f0 <[^>]*> nop
++0000c9f4 <[^>]*> nop
++0000c9f8 <[^>]*> nop
++0000c9fc <[^>]*> nop
++0000ca00 <[^>]*> nop
++0000ca04 <[^>]*> nop
++0000ca08 <[^>]*> nop
++0000ca0c <[^>]*> nop
++0000ca10 <[^>]*> nop
++0000ca14 <[^>]*> nop
++0000ca18 <[^>]*> nop
++0000ca1c <[^>]*> nop
++0000ca20 <[^>]*> nop
++0000ca24 <[^>]*> nop
++0000ca28 <[^>]*> nop
++0000ca2c <[^>]*> nop
++0000ca30 <[^>]*> nop
++0000ca34 <[^>]*> nop
++0000ca38 <[^>]*> nop
++0000ca3c <[^>]*> nop
++0000ca40 <[^>]*> nop
++0000ca44 <[^>]*> nop
++0000ca48 <[^>]*> nop
++0000ca4c <[^>]*> nop
++0000ca50 <[^>]*> nop
++0000ca54 <[^>]*> nop
++0000ca58 <[^>]*> nop
++0000ca5c <[^>]*> nop
++0000ca60 <[^>]*> nop
++0000ca64 <[^>]*> nop
++0000ca68 <[^>]*> nop
++0000ca6c <[^>]*> nop
++0000ca70 <[^>]*> nop
++0000ca74 <[^>]*> nop
++0000ca78 <[^>]*> nop
++0000ca7c <[^>]*> nop
++0000ca80 <[^>]*> nop
++0000ca84 <[^>]*> nop
++0000ca88 <[^>]*> nop
++0000ca8c <[^>]*> nop
++0000ca90 <[^>]*> nop
++0000ca94 <[^>]*> nop
++0000ca98 <[^>]*> nop
++0000ca9c <[^>]*> nop
++0000caa0 <[^>]*> nop
++0000caa4 <[^>]*> nop
++0000caa8 <[^>]*> nop
++0000caac <[^>]*> nop
++0000cab0 <[^>]*> nop
++0000cab4 <[^>]*> nop
++0000cab8 <[^>]*> nop
++0000cabc <[^>]*> nop
++0000cac0 <[^>]*> nop
++0000cac4 <[^>]*> nop
++0000cac8 <[^>]*> nop
++0000cacc <[^>]*> nop
++0000cad0 <[^>]*> nop
++0000cad4 <[^>]*> nop
++0000cad8 <[^>]*> nop
++0000cadc <[^>]*> nop
++0000cae0 <[^>]*> nop
++0000cae4 <[^>]*> nop
++0000cae8 <[^>]*> nop
++0000caec <[^>]*> nop
++0000caf0 <[^>]*> nop
++0000caf4 <[^>]*> nop
++0000caf8 <[^>]*> nop
++0000cafc <[^>]*> nop
++0000cb00 <[^>]*> nop
++0000cb04 <[^>]*> nop
++0000cb08 <[^>]*> nop
++0000cb0c <[^>]*> nop
++0000cb10 <[^>]*> nop
++0000cb14 <[^>]*> nop
++0000cb18 <[^>]*> nop
++0000cb1c <[^>]*> nop
++0000cb20 <[^>]*> nop
++0000cb24 <[^>]*> nop
++0000cb28 <[^>]*> nop
++0000cb2c <[^>]*> nop
++0000cb30 <[^>]*> nop
++0000cb34 <[^>]*> nop
++0000cb38 <[^>]*> nop
++0000cb3c <[^>]*> nop
++0000cb40 <[^>]*> nop
++0000cb44 <[^>]*> nop
++0000cb48 <[^>]*> nop
++0000cb4c <[^>]*> nop
++0000cb50 <[^>]*> nop
++0000cb54 <[^>]*> nop
++0000cb58 <[^>]*> nop
++0000cb5c <[^>]*> nop
++0000cb60 <[^>]*> nop
++0000cb64 <[^>]*> nop
++0000cb68 <[^>]*> nop
++0000cb6c <[^>]*> nop
++0000cb70 <[^>]*> nop
++0000cb74 <[^>]*> nop
++0000cb78 <[^>]*> nop
++0000cb7c <[^>]*> nop
++0000cb80 <[^>]*> nop
++0000cb84 <[^>]*> nop
++0000cb88 <[^>]*> nop
++0000cb8c <[^>]*> nop
++0000cb90 <[^>]*> nop
++0000cb94 <[^>]*> nop
++0000cb98 <[^>]*> nop
++0000cb9c <[^>]*> nop
++0000cba0 <[^>]*> nop
++0000cba4 <[^>]*> nop
++0000cba8 <[^>]*> nop
++0000cbac <[^>]*> nop
++0000cbb0 <[^>]*> nop
++0000cbb4 <[^>]*> nop
++0000cbb8 <[^>]*> nop
++0000cbbc <[^>]*> nop
++0000cbc0 <[^>]*> nop
++0000cbc4 <[^>]*> nop
++0000cbc8 <[^>]*> nop
++0000cbcc <[^>]*> nop
++0000cbd0 <[^>]*> nop
++0000cbd4 <[^>]*> nop
++0000cbd8 <[^>]*> nop
++0000cbdc <[^>]*> nop
++0000cbe0 <[^>]*> nop
++0000cbe4 <[^>]*> nop
++0000cbe8 <[^>]*> nop
++0000cbec <[^>]*> nop
++0000cbf0 <[^>]*> nop
++0000cbf4 <[^>]*> nop
++0000cbf8 <[^>]*> nop
++0000cbfc <[^>]*> nop
++0000cc00 <[^>]*> nop
++0000cc04 <[^>]*> nop
++0000cc08 <[^>]*> nop
++0000cc0c <[^>]*> nop
++0000cc10 <[^>]*> nop
++0000cc14 <[^>]*> nop
++0000cc18 <[^>]*> nop
++0000cc1c <[^>]*> nop
++0000cc20 <[^>]*> nop
++0000cc24 <[^>]*> nop
++0000cc28 <[^>]*> nop
++0000cc2c <[^>]*> nop
++0000cc30 <[^>]*> nop
++0000cc34 <[^>]*> nop
++0000cc38 <[^>]*> nop
++0000cc3c <[^>]*> nop
++0000cc40 <[^>]*> nop
++0000cc44 <[^>]*> nop
++0000cc48 <[^>]*> nop
++0000cc4c <[^>]*> nop
++0000cc50 <[^>]*> nop
++0000cc54 <[^>]*> nop
++0000cc58 <[^>]*> nop
++0000cc5c <[^>]*> nop
++0000cc60 <[^>]*> nop
++0000cc64 <[^>]*> nop
++0000cc68 <[^>]*> nop
++0000cc6c <[^>]*> nop
++0000cc70 <[^>]*> nop
++0000cc74 <[^>]*> nop
++0000cc78 <[^>]*> nop
++0000cc7c <[^>]*> nop
++0000cc80 <[^>]*> nop
++0000cc84 <[^>]*> nop
++0000cc88 <[^>]*> nop
++0000cc8c <[^>]*> nop
++0000cc90 <[^>]*> nop
++0000cc94 <[^>]*> nop
++0000cc98 <[^>]*> nop
++0000cc9c <[^>]*> nop
++0000cca0 <[^>]*> nop
++0000cca4 <[^>]*> nop
++0000cca8 <[^>]*> nop
++0000ccac <[^>]*> nop
++0000ccb0 <[^>]*> nop
++0000ccb4 <[^>]*> nop
++0000ccb8 <[^>]*> nop
++0000ccbc <[^>]*> nop
++0000ccc0 <[^>]*> nop
++0000ccc4 <[^>]*> nop
++0000ccc8 <[^>]*> nop
++0000cccc <[^>]*> nop
++0000ccd0 <[^>]*> nop
++0000ccd4 <[^>]*> nop
++0000ccd8 <[^>]*> nop
++0000ccdc <[^>]*> nop
++0000cce0 <[^>]*> nop
++0000cce4 <[^>]*> nop
++0000cce8 <[^>]*> nop
++0000ccec <[^>]*> nop
++0000ccf0 <[^>]*> nop
++0000ccf4 <[^>]*> nop
++0000ccf8 <[^>]*> nop
++0000ccfc <[^>]*> nop
++0000cd00 <[^>]*> nop
++0000cd04 <[^>]*> nop
++0000cd08 <[^>]*> nop
++0000cd0c <[^>]*> nop
++0000cd10 <[^>]*> nop
++0000cd14 <[^>]*> nop
++0000cd18 <[^>]*> nop
++0000cd1c <[^>]*> nop
++0000cd20 <[^>]*> nop
++0000cd24 <[^>]*> nop
++0000cd28 <[^>]*> nop
++0000cd2c <[^>]*> nop
++0000cd30 <[^>]*> nop
++0000cd34 <[^>]*> nop
++0000cd38 <[^>]*> nop
++0000cd3c <[^>]*> nop
++0000cd40 <[^>]*> nop
++0000cd44 <[^>]*> nop
++0000cd48 <[^>]*> nop
++0000cd4c <[^>]*> nop
++0000cd50 <[^>]*> nop
++0000cd54 <[^>]*> nop
++0000cd58 <[^>]*> nop
++0000cd5c <[^>]*> nop
++0000cd60 <[^>]*> nop
++0000cd64 <[^>]*> nop
++0000cd68 <[^>]*> nop
++0000cd6c <[^>]*> nop
++0000cd70 <[^>]*> nop
++0000cd74 <[^>]*> nop
++0000cd78 <[^>]*> nop
++0000cd7c <[^>]*> nop
++0000cd80 <[^>]*> nop
++0000cd84 <[^>]*> nop
++0000cd88 <[^>]*> nop
++0000cd8c <[^>]*> nop
++0000cd90 <[^>]*> nop
++0000cd94 <[^>]*> nop
++0000cd98 <[^>]*> nop
++0000cd9c <[^>]*> nop
++0000cda0 <[^>]*> nop
++0000cda4 <[^>]*> nop
++0000cda8 <[^>]*> nop
++0000cdac <[^>]*> nop
++0000cdb0 <[^>]*> nop
++0000cdb4 <[^>]*> nop
++0000cdb8 <[^>]*> nop
++0000cdbc <[^>]*> nop
++0000cdc0 <[^>]*> nop
++0000cdc4 <[^>]*> nop
++0000cdc8 <[^>]*> nop
++0000cdcc <[^>]*> nop
++0000cdd0 <[^>]*> nop
++0000cdd4 <[^>]*> nop
++0000cdd8 <[^>]*> nop
++0000cddc <[^>]*> nop
++0000cde0 <[^>]*> nop
++0000cde4 <[^>]*> nop
++0000cde8 <[^>]*> nop
++0000cdec <[^>]*> nop
++0000cdf0 <[^>]*> nop
++0000cdf4 <[^>]*> nop
++0000cdf8 <[^>]*> nop
++0000cdfc <[^>]*> nop
++0000ce00 <[^>]*> nop
++0000ce04 <[^>]*> nop
++0000ce08 <[^>]*> nop
++0000ce0c <[^>]*> nop
++0000ce10 <[^>]*> nop
++0000ce14 <[^>]*> nop
++0000ce18 <[^>]*> nop
++0000ce1c <[^>]*> nop
++0000ce20 <[^>]*> nop
++0000ce24 <[^>]*> nop
++0000ce28 <[^>]*> nop
++0000ce2c <[^>]*> nop
++0000ce30 <[^>]*> nop
++0000ce34 <[^>]*> nop
++0000ce38 <[^>]*> nop
++0000ce3c <[^>]*> nop
++0000ce40 <[^>]*> nop
++0000ce44 <[^>]*> nop
++0000ce48 <[^>]*> nop
++0000ce4c <[^>]*> nop
++0000ce50 <[^>]*> nop
++0000ce54 <[^>]*> nop
++0000ce58 <[^>]*> nop
++0000ce5c <[^>]*> nop
++0000ce60 <[^>]*> nop
++0000ce64 <[^>]*> nop
++0000ce68 <[^>]*> nop
++0000ce6c <[^>]*> nop
++0000ce70 <[^>]*> nop
++0000ce74 <[^>]*> nop
++0000ce78 <[^>]*> nop
++0000ce7c <[^>]*> nop
++0000ce80 <[^>]*> nop
++0000ce84 <[^>]*> nop
++0000ce88 <[^>]*> nop
++0000ce8c <[^>]*> nop
++0000ce90 <[^>]*> nop
++0000ce94 <[^>]*> nop
++0000ce98 <[^>]*> nop
++0000ce9c <[^>]*> nop
++0000cea0 <[^>]*> nop
++0000cea4 <[^>]*> nop
++0000cea8 <[^>]*> nop
++0000ceac <[^>]*> nop
++0000ceb0 <[^>]*> nop
++0000ceb4 <[^>]*> nop
++0000ceb8 <[^>]*> nop
++0000cebc <[^>]*> nop
++0000cec0 <[^>]*> nop
++0000cec4 <[^>]*> nop
++0000cec8 <[^>]*> nop
++0000cecc <[^>]*> nop
++0000ced0 <[^>]*> nop
++0000ced4 <[^>]*> nop
++0000ced8 <[^>]*> nop
++0000cedc <[^>]*> nop
++0000cee0 <[^>]*> nop
++0000cee4 <[^>]*> nop
++0000cee8 <[^>]*> nop
++0000ceec <[^>]*> nop
++0000cef0 <[^>]*> nop
++0000cef4 <[^>]*> nop
++0000cef8 <[^>]*> nop
++0000cefc <[^>]*> nop
++0000cf00 <[^>]*> nop
++0000cf04 <[^>]*> nop
++0000cf08 <[^>]*> nop
++0000cf0c <[^>]*> nop
++0000cf10 <[^>]*> nop
++0000cf14 <[^>]*> nop
++0000cf18 <[^>]*> nop
++0000cf1c <[^>]*> nop
++0000cf20 <[^>]*> nop
++0000cf24 <[^>]*> nop
++0000cf28 <[^>]*> nop
++0000cf2c <[^>]*> nop
++0000cf30 <[^>]*> nop
++0000cf34 <[^>]*> nop
++0000cf38 <[^>]*> nop
++0000cf3c <[^>]*> nop
++0000cf40 <[^>]*> nop
++0000cf44 <[^>]*> nop
++0000cf48 <[^>]*> nop
++0000cf4c <[^>]*> nop
++0000cf50 <[^>]*> nop
++0000cf54 <[^>]*> nop
++0000cf58 <[^>]*> nop
++0000cf5c <[^>]*> nop
++0000cf60 <[^>]*> nop
++0000cf64 <[^>]*> nop
++0000cf68 <[^>]*> nop
++0000cf6c <[^>]*> nop
++0000cf70 <[^>]*> nop
++0000cf74 <[^>]*> nop
++0000cf78 <[^>]*> nop
++0000cf7c <[^>]*> nop
++0000cf80 <[^>]*> nop
++0000cf84 <[^>]*> nop
++0000cf88 <[^>]*> nop
++0000cf8c <[^>]*> nop
++0000cf90 <[^>]*> nop
++0000cf94 <[^>]*> nop
++0000cf98 <[^>]*> nop
++0000cf9c <[^>]*> nop
++0000cfa0 <[^>]*> nop
++0000cfa4 <[^>]*> nop
++0000cfa8 <[^>]*> nop
++0000cfac <[^>]*> nop
++0000cfb0 <[^>]*> nop
++0000cfb4 <[^>]*> nop
++0000cfb8 <[^>]*> nop
++0000cfbc <[^>]*> nop
++0000cfc0 <[^>]*> nop
++0000cfc4 <[^>]*> nop
++0000cfc8 <[^>]*> nop
++0000cfcc <[^>]*> nop
++0000cfd0 <[^>]*> nop
++0000cfd4 <[^>]*> nop
++0000cfd8 <[^>]*> nop
++0000cfdc <[^>]*> nop
++0000cfe0 <[^>]*> nop
++0000cfe4 <[^>]*> nop
++0000cfe8 <[^>]*> nop
++0000cfec <[^>]*> nop
++0000cff0 <[^>]*> nop
++0000cff4 <[^>]*> nop
++0000cff8 <[^>]*> nop
++0000cffc <[^>]*> nop
++0000d000 <[^>]*> nop
++0000d004 <[^>]*> nop
++0000d008 <[^>]*> nop
++0000d00c <[^>]*> nop
++0000d010 <[^>]*> nop
++0000d014 <[^>]*> nop
++0000d018 <[^>]*> nop
++0000d01c <[^>]*> nop
++0000d020 <[^>]*> nop
++0000d024 <[^>]*> nop
++0000d028 <[^>]*> nop
++0000d02c <[^>]*> nop
++0000d030 <[^>]*> nop
++0000d034 <[^>]*> nop
++0000d038 <[^>]*> nop
++0000d03c <[^>]*> nop
++0000d040 <[^>]*> nop
++0000d044 <[^>]*> nop
++0000d048 <[^>]*> nop
++0000d04c <[^>]*> nop
++0000d050 <[^>]*> nop
++0000d054 <[^>]*> nop
++0000d058 <[^>]*> nop
++0000d05c <[^>]*> nop
++0000d060 <[^>]*> nop
++0000d064 <[^>]*> nop
++0000d068 <[^>]*> nop
++0000d06c <[^>]*> nop
++0000d070 <[^>]*> nop
++0000d074 <[^>]*> nop
++0000d078 <[^>]*> nop
++0000d07c <[^>]*> nop
++0000d080 <[^>]*> nop
++0000d084 <[^>]*> nop
++0000d088 <[^>]*> nop
++0000d08c <[^>]*> nop
++0000d090 <[^>]*> nop
++0000d094 <[^>]*> nop
++0000d098 <[^>]*> nop
++0000d09c <[^>]*> nop
++0000d0a0 <[^>]*> nop
++0000d0a4 <[^>]*> nop
++0000d0a8 <[^>]*> nop
++0000d0ac <[^>]*> nop
++0000d0b0 <[^>]*> nop
++0000d0b4 <[^>]*> nop
++0000d0b8 <[^>]*> nop
++0000d0bc <[^>]*> nop
++0000d0c0 <[^>]*> nop
++0000d0c4 <[^>]*> nop
++0000d0c8 <[^>]*> nop
++0000d0cc <[^>]*> nop
++0000d0d0 <[^>]*> nop
++0000d0d4 <[^>]*> nop
++0000d0d8 <[^>]*> nop
++0000d0dc <[^>]*> nop
++0000d0e0 <[^>]*> nop
++0000d0e4 <[^>]*> nop
++0000d0e8 <[^>]*> nop
++0000d0ec <[^>]*> nop
++0000d0f0 <[^>]*> nop
++0000d0f4 <[^>]*> nop
++0000d0f8 <[^>]*> nop
++0000d0fc <[^>]*> nop
++0000d100 <[^>]*> nop
++0000d104 <[^>]*> nop
++0000d108 <[^>]*> nop
++0000d10c <[^>]*> nop
++0000d110 <[^>]*> nop
++0000d114 <[^>]*> nop
++0000d118 <[^>]*> nop
++0000d11c <[^>]*> nop
++0000d120 <[^>]*> nop
++0000d124 <[^>]*> nop
++0000d128 <[^>]*> nop
++0000d12c <[^>]*> nop
++0000d130 <[^>]*> nop
++0000d134 <[^>]*> nop
++0000d138 <[^>]*> nop
++0000d13c <[^>]*> nop
++0000d140 <[^>]*> nop
++0000d144 <[^>]*> nop
++0000d148 <[^>]*> nop
++0000d14c <[^>]*> nop
++0000d150 <[^>]*> nop
++0000d154 <[^>]*> nop
++0000d158 <[^>]*> nop
++0000d15c <[^>]*> nop
++0000d160 <[^>]*> nop
++0000d164 <[^>]*> nop
++0000d168 <[^>]*> nop
++0000d16c <[^>]*> nop
++0000d170 <[^>]*> nop
++0000d174 <[^>]*> nop
++0000d178 <[^>]*> nop
++0000d17c <[^>]*> nop
++0000d180 <[^>]*> nop
++0000d184 <[^>]*> nop
++0000d188 <[^>]*> nop
++0000d18c <[^>]*> nop
++0000d190 <[^>]*> nop
++0000d194 <[^>]*> nop
++0000d198 <[^>]*> nop
++0000d19c <[^>]*> nop
++0000d1a0 <[^>]*> nop
++0000d1a4 <[^>]*> nop
++0000d1a8 <[^>]*> nop
++0000d1ac <[^>]*> nop
++0000d1b0 <[^>]*> nop
++0000d1b4 <[^>]*> nop
++0000d1b8 <[^>]*> nop
++0000d1bc <[^>]*> nop
++0000d1c0 <[^>]*> nop
++0000d1c4 <[^>]*> nop
++0000d1c8 <[^>]*> nop
++0000d1cc <[^>]*> nop
++0000d1d0 <[^>]*> nop
++0000d1d4 <[^>]*> nop
++0000d1d8 <[^>]*> nop
++0000d1dc <[^>]*> nop
++0000d1e0 <[^>]*> nop
++0000d1e4 <[^>]*> nop
++0000d1e8 <[^>]*> nop
++0000d1ec <[^>]*> nop
++0000d1f0 <[^>]*> nop
++0000d1f4 <[^>]*> nop
++0000d1f8 <[^>]*> nop
++0000d1fc <[^>]*> nop
++0000d200 <[^>]*> nop
++0000d204 <[^>]*> nop
++0000d208 <[^>]*> nop
++0000d20c <[^>]*> nop
++0000d210 <[^>]*> nop
++0000d214 <[^>]*> nop
++0000d218 <[^>]*> nop
++0000d21c <[^>]*> nop
++0000d220 <[^>]*> nop
++0000d224 <[^>]*> nop
++0000d228 <[^>]*> nop
++0000d22c <[^>]*> nop
++0000d230 <[^>]*> nop
++0000d234 <[^>]*> nop
++0000d238 <[^>]*> nop
++0000d23c <[^>]*> nop
++0000d240 <[^>]*> nop
++0000d244 <[^>]*> nop
++0000d248 <[^>]*> nop
++0000d24c <[^>]*> nop
++0000d250 <[^>]*> nop
++0000d254 <[^>]*> nop
++0000d258 <[^>]*> nop
++0000d25c <[^>]*> nop
++0000d260 <[^>]*> nop
++0000d264 <[^>]*> nop
++0000d268 <[^>]*> nop
++0000d26c <[^>]*> nop
++0000d270 <[^>]*> nop
++0000d274 <[^>]*> nop
++0000d278 <[^>]*> nop
++0000d27c <[^>]*> nop
++0000d280 <[^>]*> nop
++0000d284 <[^>]*> nop
++0000d288 <[^>]*> nop
++0000d28c <[^>]*> nop
++0000d290 <[^>]*> nop
++0000d294 <[^>]*> nop
++0000d298 <[^>]*> nop
++0000d29c <[^>]*> nop
++0000d2a0 <[^>]*> nop
++0000d2a4 <[^>]*> nop
++0000d2a8 <[^>]*> nop
++0000d2ac <[^>]*> nop
++0000d2b0 <[^>]*> nop
++0000d2b4 <[^>]*> nop
++0000d2b8 <[^>]*> nop
++0000d2bc <[^>]*> nop
++0000d2c0 <[^>]*> nop
++0000d2c4 <[^>]*> nop
++0000d2c8 <[^>]*> nop
++0000d2cc <[^>]*> nop
++0000d2d0 <[^>]*> nop
++0000d2d4 <[^>]*> nop
++0000d2d8 <[^>]*> nop
++0000d2dc <[^>]*> nop
++0000d2e0 <[^>]*> nop
++0000d2e4 <[^>]*> nop
++0000d2e8 <[^>]*> nop
++0000d2ec <[^>]*> nop
++0000d2f0 <[^>]*> nop
++0000d2f4 <[^>]*> nop
++0000d2f8 <[^>]*> nop
++0000d2fc <[^>]*> nop
++0000d300 <[^>]*> nop
++0000d304 <[^>]*> nop
++0000d308 <[^>]*> nop
++0000d30c <[^>]*> nop
++0000d310 <[^>]*> nop
++0000d314 <[^>]*> nop
++0000d318 <[^>]*> nop
++0000d31c <[^>]*> nop
++0000d320 <[^>]*> nop
++0000d324 <[^>]*> nop
++0000d328 <[^>]*> nop
++0000d32c <[^>]*> nop
++0000d330 <[^>]*> nop
++0000d334 <[^>]*> nop
++0000d338 <[^>]*> nop
++0000d33c <[^>]*> nop
++0000d340 <[^>]*> nop
++0000d344 <[^>]*> nop
++0000d348 <[^>]*> nop
++0000d34c <[^>]*> nop
++0000d350 <[^>]*> nop
++0000d354 <[^>]*> nop
++0000d358 <[^>]*> nop
++0000d35c <[^>]*> nop
++0000d360 <[^>]*> nop
++0000d364 <[^>]*> nop
++0000d368 <[^>]*> nop
++0000d36c <[^>]*> nop
++0000d370 <[^>]*> nop
++0000d374 <[^>]*> nop
++0000d378 <[^>]*> nop
++0000d37c <[^>]*> nop
++0000d380 <[^>]*> nop
++0000d384 <[^>]*> nop
++0000d388 <[^>]*> nop
++0000d38c <[^>]*> nop
++0000d390 <[^>]*> nop
++0000d394 <[^>]*> nop
++0000d398 <[^>]*> nop
++0000d39c <[^>]*> nop
++0000d3a0 <[^>]*> nop
++0000d3a4 <[^>]*> nop
++0000d3a8 <[^>]*> nop
++0000d3ac <[^>]*> nop
++0000d3b0 <[^>]*> nop
++0000d3b4 <[^>]*> nop
++0000d3b8 <[^>]*> nop
++0000d3bc <[^>]*> nop
++0000d3c0 <[^>]*> nop
++0000d3c4 <[^>]*> nop
++0000d3c8 <[^>]*> nop
++0000d3cc <[^>]*> nop
++0000d3d0 <[^>]*> nop
++0000d3d4 <[^>]*> nop
++0000d3d8 <[^>]*> nop
++0000d3dc <[^>]*> nop
++0000d3e0 <[^>]*> nop
++0000d3e4 <[^>]*> nop
++0000d3e8 <[^>]*> nop
++0000d3ec <[^>]*> nop
++0000d3f0 <[^>]*> nop
++0000d3f4 <[^>]*> nop
++0000d3f8 <[^>]*> nop
++0000d3fc <[^>]*> nop
++0000d400 <[^>]*> nop
++0000d404 <[^>]*> nop
++0000d408 <[^>]*> nop
++0000d40c <[^>]*> nop
++0000d410 <[^>]*> nop
++0000d414 <[^>]*> nop
++0000d418 <[^>]*> nop
++0000d41c <[^>]*> nop
++0000d420 <[^>]*> nop
++0000d424 <[^>]*> nop
++0000d428 <[^>]*> nop
++0000d42c <[^>]*> nop
++0000d430 <[^>]*> nop
++0000d434 <[^>]*> nop
++0000d438 <[^>]*> nop
++0000d43c <[^>]*> nop
++0000d440 <[^>]*> nop
++0000d444 <[^>]*> nop
++0000d448 <[^>]*> nop
++0000d44c <[^>]*> nop
++0000d450 <[^>]*> nop
++0000d454 <[^>]*> nop
++0000d458 <[^>]*> nop
++0000d45c <[^>]*> nop
++0000d460 <[^>]*> nop
++0000d464 <[^>]*> nop
++0000d468 <[^>]*> nop
++0000d46c <[^>]*> nop
++0000d470 <[^>]*> nop
++0000d474 <[^>]*> nop
++0000d478 <[^>]*> nop
++0000d47c <[^>]*> nop
++0000d480 <[^>]*> nop
++0000d484 <[^>]*> nop
++0000d488 <[^>]*> nop
++0000d48c <[^>]*> nop
++0000d490 <[^>]*> nop
++0000d494 <[^>]*> nop
++0000d498 <[^>]*> nop
++0000d49c <[^>]*> nop
++0000d4a0 <[^>]*> nop
++0000d4a4 <[^>]*> nop
++0000d4a8 <[^>]*> nop
++0000d4ac <[^>]*> nop
++0000d4b0 <[^>]*> nop
++0000d4b4 <[^>]*> nop
++0000d4b8 <[^>]*> nop
++0000d4bc <[^>]*> nop
++0000d4c0 <[^>]*> nop
++0000d4c4 <[^>]*> nop
++0000d4c8 <[^>]*> nop
++0000d4cc <[^>]*> nop
++0000d4d0 <[^>]*> nop
++0000d4d4 <[^>]*> nop
++0000d4d8 <[^>]*> nop
++0000d4dc <[^>]*> nop
++0000d4e0 <[^>]*> nop
++0000d4e4 <[^>]*> nop
++0000d4e8 <[^>]*> nop
++0000d4ec <[^>]*> nop
++0000d4f0 <[^>]*> nop
++0000d4f4 <[^>]*> nop
++0000d4f8 <[^>]*> nop
++0000d4fc <[^>]*> nop
++0000d500 <[^>]*> nop
++0000d504 <[^>]*> nop
++0000d508 <[^>]*> nop
++0000d50c <[^>]*> nop
++0000d510 <[^>]*> nop
++0000d514 <[^>]*> nop
++0000d518 <[^>]*> nop
++0000d51c <[^>]*> nop
++0000d520 <[^>]*> nop
++0000d524 <[^>]*> nop
++0000d528 <[^>]*> nop
++0000d52c <[^>]*> nop
++0000d530 <[^>]*> nop
++0000d534 <[^>]*> nop
++0000d538 <[^>]*> nop
++0000d53c <[^>]*> nop
++0000d540 <[^>]*> nop
++0000d544 <[^>]*> nop
++0000d548 <[^>]*> nop
++0000d54c <[^>]*> nop
++0000d550 <[^>]*> nop
++0000d554 <[^>]*> nop
++0000d558 <[^>]*> nop
++0000d55c <[^>]*> nop
++0000d560 <[^>]*> nop
++0000d564 <[^>]*> nop
++0000d568 <[^>]*> nop
++0000d56c <[^>]*> nop
++0000d570 <[^>]*> nop
++0000d574 <[^>]*> nop
++0000d578 <[^>]*> nop
++0000d57c <[^>]*> nop
++0000d580 <[^>]*> nop
++0000d584 <[^>]*> nop
++0000d588 <[^>]*> nop
++0000d58c <[^>]*> nop
++0000d590 <[^>]*> nop
++0000d594 <[^>]*> nop
++0000d598 <[^>]*> nop
++0000d59c <[^>]*> nop
++0000d5a0 <[^>]*> nop
++0000d5a4 <[^>]*> nop
++0000d5a8 <[^>]*> nop
++0000d5ac <[^>]*> nop
++0000d5b0 <[^>]*> nop
++0000d5b4 <[^>]*> nop
++0000d5b8 <[^>]*> nop
++0000d5bc <[^>]*> nop
++0000d5c0 <[^>]*> nop
++0000d5c4 <[^>]*> nop
++0000d5c8 <[^>]*> nop
++0000d5cc <[^>]*> nop
++0000d5d0 <[^>]*> nop
++0000d5d4 <[^>]*> nop
++0000d5d8 <[^>]*> nop
++0000d5dc <[^>]*> nop
++0000d5e0 <[^>]*> nop
++0000d5e4 <[^>]*> nop
++0000d5e8 <[^>]*> nop
++0000d5ec <[^>]*> nop
++0000d5f0 <[^>]*> nop
++0000d5f4 <[^>]*> nop
++0000d5f8 <[^>]*> nop
++0000d5fc <[^>]*> nop
++0000d600 <[^>]*> nop
++0000d604 <[^>]*> nop
++0000d608 <[^>]*> nop
++0000d60c <[^>]*> nop
++0000d610 <[^>]*> nop
++0000d614 <[^>]*> nop
++0000d618 <[^>]*> nop
++0000d61c <[^>]*> nop
++0000d620 <[^>]*> nop
++0000d624 <[^>]*> nop
++0000d628 <[^>]*> nop
++0000d62c <[^>]*> nop
++0000d630 <[^>]*> nop
++0000d634 <[^>]*> nop
++0000d638 <[^>]*> nop
++0000d63c <[^>]*> nop
++0000d640 <[^>]*> nop
++0000d644 <[^>]*> nop
++0000d648 <[^>]*> nop
++0000d64c <[^>]*> nop
++0000d650 <[^>]*> nop
++0000d654 <[^>]*> nop
++0000d658 <[^>]*> nop
++0000d65c <[^>]*> nop
++0000d660 <[^>]*> nop
++0000d664 <[^>]*> nop
++0000d668 <[^>]*> nop
++0000d66c <[^>]*> nop
++0000d670 <[^>]*> nop
++0000d674 <[^>]*> nop
++0000d678 <[^>]*> nop
++0000d67c <[^>]*> nop
++0000d680 <[^>]*> nop
++0000d684 <[^>]*> nop
++0000d688 <[^>]*> nop
++0000d68c <[^>]*> nop
++0000d690 <[^>]*> nop
++0000d694 <[^>]*> nop
++0000d698 <[^>]*> nop
++0000d69c <[^>]*> nop
++0000d6a0 <[^>]*> nop
++0000d6a4 <[^>]*> nop
++0000d6a8 <[^>]*> nop
++0000d6ac <[^>]*> nop
++0000d6b0 <[^>]*> nop
++0000d6b4 <[^>]*> nop
++0000d6b8 <[^>]*> nop
++0000d6bc <[^>]*> nop
++0000d6c0 <[^>]*> nop
++0000d6c4 <[^>]*> nop
++0000d6c8 <[^>]*> nop
++0000d6cc <[^>]*> nop
++0000d6d0 <[^>]*> nop
++0000d6d4 <[^>]*> nop
++0000d6d8 <[^>]*> nop
++0000d6dc <[^>]*> nop
++0000d6e0 <[^>]*> nop
++0000d6e4 <[^>]*> nop
++0000d6e8 <[^>]*> nop
++0000d6ec <[^>]*> nop
++0000d6f0 <[^>]*> nop
++0000d6f4 <[^>]*> nop
++0000d6f8 <[^>]*> nop
++0000d6fc <[^>]*> nop
++0000d700 <[^>]*> nop
++0000d704 <[^>]*> nop
++0000d708 <[^>]*> nop
++0000d70c <[^>]*> nop
++0000d710 <[^>]*> nop
++0000d714 <[^>]*> nop
++0000d718 <[^>]*> nop
++0000d71c <[^>]*> nop
++0000d720 <[^>]*> nop
++0000d724 <[^>]*> nop
++0000d728 <[^>]*> nop
++0000d72c <[^>]*> nop
++0000d730 <[^>]*> nop
++0000d734 <[^>]*> nop
++0000d738 <[^>]*> nop
++0000d73c <[^>]*> nop
++0000d740 <[^>]*> nop
++0000d744 <[^>]*> nop
++0000d748 <[^>]*> nop
++0000d74c <[^>]*> nop
++0000d750 <[^>]*> nop
++0000d754 <[^>]*> nop
++0000d758 <[^>]*> nop
++0000d75c <[^>]*> nop
++0000d760 <[^>]*> nop
++0000d764 <[^>]*> nop
++0000d768 <[^>]*> nop
++0000d76c <[^>]*> nop
++0000d770 <[^>]*> nop
++0000d774 <[^>]*> nop
++0000d778 <[^>]*> nop
++0000d77c <[^>]*> nop
++0000d780 <[^>]*> nop
++0000d784 <[^>]*> nop
++0000d788 <[^>]*> nop
++0000d78c <[^>]*> nop
++0000d790 <[^>]*> nop
++0000d794 <[^>]*> nop
++0000d798 <[^>]*> nop
++0000d79c <[^>]*> nop
++0000d7a0 <[^>]*> nop
++0000d7a4 <[^>]*> nop
++0000d7a8 <[^>]*> nop
++0000d7ac <[^>]*> nop
++0000d7b0 <[^>]*> nop
++0000d7b4 <[^>]*> nop
++0000d7b8 <[^>]*> nop
++0000d7bc <[^>]*> nop
++0000d7c0 <[^>]*> nop
++0000d7c4 <[^>]*> nop
++0000d7c8 <[^>]*> nop
++0000d7cc <[^>]*> nop
++0000d7d0 <[^>]*> nop
++0000d7d4 <[^>]*> nop
++0000d7d8 <[^>]*> nop
++0000d7dc <[^>]*> nop
++0000d7e0 <[^>]*> nop
++0000d7e4 <[^>]*> nop
++0000d7e8 <[^>]*> nop
++0000d7ec <[^>]*> nop
++0000d7f0 <[^>]*> nop
++0000d7f4 <[^>]*> nop
++0000d7f8 <[^>]*> nop
++0000d7fc <[^>]*> nop
++0000d800 <[^>]*> nop
++0000d804 <[^>]*> nop
++0000d808 <[^>]*> nop
++0000d80c <[^>]*> nop
++0000d810 <[^>]*> nop
++0000d814 <[^>]*> nop
++0000d818 <[^>]*> nop
++0000d81c <[^>]*> nop
++0000d820 <[^>]*> nop
++0000d824 <[^>]*> nop
++0000d828 <[^>]*> nop
++0000d82c <[^>]*> nop
++0000d830 <[^>]*> nop
++0000d834 <[^>]*> nop
++0000d838 <[^>]*> nop
++0000d83c <[^>]*> nop
++0000d840 <[^>]*> nop
++0000d844 <[^>]*> nop
++0000d848 <[^>]*> nop
++0000d84c <[^>]*> nop
++0000d850 <[^>]*> nop
++0000d854 <[^>]*> nop
++0000d858 <[^>]*> nop
++0000d85c <[^>]*> nop
++0000d860 <[^>]*> nop
++0000d864 <[^>]*> nop
++0000d868 <[^>]*> nop
++0000d86c <[^>]*> nop
++0000d870 <[^>]*> nop
++0000d874 <[^>]*> nop
++0000d878 <[^>]*> nop
++0000d87c <[^>]*> nop
++0000d880 <[^>]*> nop
++0000d884 <[^>]*> nop
++0000d888 <[^>]*> nop
++0000d88c <[^>]*> nop
++0000d890 <[^>]*> nop
++0000d894 <[^>]*> nop
++0000d898 <[^>]*> nop
++0000d89c <[^>]*> nop
++0000d8a0 <[^>]*> nop
++0000d8a4 <[^>]*> nop
++0000d8a8 <[^>]*> nop
++0000d8ac <[^>]*> nop
++0000d8b0 <[^>]*> nop
++0000d8b4 <[^>]*> nop
++0000d8b8 <[^>]*> nop
++0000d8bc <[^>]*> nop
++0000d8c0 <[^>]*> nop
++0000d8c4 <[^>]*> nop
++0000d8c8 <[^>]*> nop
++0000d8cc <[^>]*> nop
++0000d8d0 <[^>]*> nop
++0000d8d4 <[^>]*> nop
++0000d8d8 <[^>]*> nop
++0000d8dc <[^>]*> nop
++0000d8e0 <[^>]*> nop
++0000d8e4 <[^>]*> nop
++0000d8e8 <[^>]*> nop
++0000d8ec <[^>]*> nop
++0000d8f0 <[^>]*> nop
++0000d8f4 <[^>]*> nop
++0000d8f8 <[^>]*> nop
++0000d8fc <[^>]*> nop
++0000d900 <[^>]*> nop
++0000d904 <[^>]*> nop
++0000d908 <[^>]*> nop
++0000d90c <[^>]*> nop
++0000d910 <[^>]*> nop
++0000d914 <[^>]*> nop
++0000d918 <[^>]*> nop
++0000d91c <[^>]*> nop
++0000d920 <[^>]*> nop
++0000d924 <[^>]*> nop
++0000d928 <[^>]*> nop
++0000d92c <[^>]*> nop
++0000d930 <[^>]*> nop
++0000d934 <[^>]*> nop
++0000d938 <[^>]*> nop
++0000d93c <[^>]*> nop
++0000d940 <[^>]*> nop
++0000d944 <[^>]*> nop
++0000d948 <[^>]*> nop
++0000d94c <[^>]*> nop
++0000d950 <[^>]*> nop
++0000d954 <[^>]*> nop
++0000d958 <[^>]*> nop
++0000d95c <[^>]*> nop
++0000d960 <[^>]*> nop
++0000d964 <[^>]*> nop
++0000d968 <[^>]*> nop
++0000d96c <[^>]*> nop
++0000d970 <[^>]*> nop
++0000d974 <[^>]*> nop
++0000d978 <[^>]*> nop
++0000d97c <[^>]*> nop
++0000d980 <[^>]*> nop
++0000d984 <[^>]*> nop
++0000d988 <[^>]*> nop
++0000d98c <[^>]*> nop
++0000d990 <[^>]*> nop
++0000d994 <[^>]*> nop
++0000d998 <[^>]*> nop
++0000d99c <[^>]*> nop
++0000d9a0 <[^>]*> nop
++0000d9a4 <[^>]*> nop
++0000d9a8 <[^>]*> nop
++0000d9ac <[^>]*> nop
++0000d9b0 <[^>]*> nop
++0000d9b4 <[^>]*> nop
++0000d9b8 <[^>]*> nop
++0000d9bc <[^>]*> nop
++0000d9c0 <[^>]*> nop
++0000d9c4 <[^>]*> nop
++0000d9c8 <[^>]*> nop
++0000d9cc <[^>]*> nop
++0000d9d0 <[^>]*> nop
++0000d9d4 <[^>]*> nop
++0000d9d8 <[^>]*> nop
++0000d9dc <[^>]*> nop
++0000d9e0 <[^>]*> nop
++0000d9e4 <[^>]*> nop
++0000d9e8 <[^>]*> nop
++0000d9ec <[^>]*> nop
++0000d9f0 <[^>]*> nop
++0000d9f4 <[^>]*> nop
++0000d9f8 <[^>]*> nop
++0000d9fc <[^>]*> nop
++0000da00 <[^>]*> nop
++0000da04 <[^>]*> nop
++0000da08 <[^>]*> nop
++0000da0c <[^>]*> nop
++0000da10 <[^>]*> nop
++0000da14 <[^>]*> nop
++0000da18 <[^>]*> nop
++0000da1c <[^>]*> nop
++0000da20 <[^>]*> nop
++0000da24 <[^>]*> nop
++0000da28 <[^>]*> nop
++0000da2c <[^>]*> nop
++0000da30 <[^>]*> nop
++0000da34 <[^>]*> nop
++0000da38 <[^>]*> nop
++0000da3c <[^>]*> nop
++0000da40 <[^>]*> nop
++0000da44 <[^>]*> nop
++0000da48 <[^>]*> nop
++0000da4c <[^>]*> nop
++0000da50 <[^>]*> nop
++0000da54 <[^>]*> nop
++0000da58 <[^>]*> nop
++0000da5c <[^>]*> nop
++0000da60 <[^>]*> nop
++0000da64 <[^>]*> nop
++0000da68 <[^>]*> nop
++0000da6c <[^>]*> nop
++0000da70 <[^>]*> nop
++0000da74 <[^>]*> nop
++0000da78 <[^>]*> nop
++0000da7c <[^>]*> nop
++0000da80 <[^>]*> nop
++0000da84 <[^>]*> nop
++0000da88 <[^>]*> nop
++0000da8c <[^>]*> nop
++0000da90 <[^>]*> nop
++0000da94 <[^>]*> nop
++0000da98 <[^>]*> nop
++0000da9c <[^>]*> nop
++0000daa0 <[^>]*> nop
++0000daa4 <[^>]*> nop
++0000daa8 <[^>]*> nop
++0000daac <[^>]*> nop
++0000dab0 <[^>]*> nop
++0000dab4 <[^>]*> nop
++0000dab8 <[^>]*> nop
++0000dabc <[^>]*> nop
++0000dac0 <[^>]*> nop
++0000dac4 <[^>]*> nop
++0000dac8 <[^>]*> nop
++0000dacc <[^>]*> nop
++0000dad0 <[^>]*> nop
++0000dad4 <[^>]*> nop
++0000dad8 <[^>]*> nop
++0000dadc <[^>]*> nop
++0000dae0 <[^>]*> nop
++0000dae4 <[^>]*> nop
++0000dae8 <[^>]*> nop
++0000daec <[^>]*> nop
++0000daf0 <[^>]*> nop
++0000daf4 <[^>]*> nop
++0000daf8 <[^>]*> nop
++0000dafc <[^>]*> nop
++0000db00 <[^>]*> nop
++0000db04 <[^>]*> nop
++0000db08 <[^>]*> nop
++0000db0c <[^>]*> nop
++0000db10 <[^>]*> nop
++0000db14 <[^>]*> nop
++0000db18 <[^>]*> nop
++0000db1c <[^>]*> nop
++0000db20 <[^>]*> nop
++0000db24 <[^>]*> nop
++0000db28 <[^>]*> nop
++0000db2c <[^>]*> nop
++0000db30 <[^>]*> nop
++0000db34 <[^>]*> nop
++0000db38 <[^>]*> nop
++0000db3c <[^>]*> nop
++0000db40 <[^>]*> nop
++0000db44 <[^>]*> nop
++0000db48 <[^>]*> nop
++0000db4c <[^>]*> nop
++0000db50 <[^>]*> nop
++0000db54 <[^>]*> nop
++0000db58 <[^>]*> nop
++0000db5c <[^>]*> nop
++0000db60 <[^>]*> nop
++0000db64 <[^>]*> nop
++0000db68 <[^>]*> nop
++0000db6c <[^>]*> nop
++0000db70 <[^>]*> nop
++0000db74 <[^>]*> nop
++0000db78 <[^>]*> nop
++0000db7c <[^>]*> nop
++0000db80 <[^>]*> nop
++0000db84 <[^>]*> nop
++0000db88 <[^>]*> nop
++0000db8c <[^>]*> nop
++0000db90 <[^>]*> nop
++0000db94 <[^>]*> nop
++0000db98 <[^>]*> nop
++0000db9c <[^>]*> nop
++0000dba0 <[^>]*> nop
++0000dba4 <[^>]*> nop
++0000dba8 <[^>]*> nop
++0000dbac <[^>]*> nop
++0000dbb0 <[^>]*> nop
++0000dbb4 <[^>]*> nop
++0000dbb8 <[^>]*> nop
++0000dbbc <[^>]*> nop
++0000dbc0 <[^>]*> nop
++0000dbc4 <[^>]*> nop
++0000dbc8 <[^>]*> nop
++0000dbcc <[^>]*> nop
++0000dbd0 <[^>]*> nop
++0000dbd4 <[^>]*> nop
++0000dbd8 <[^>]*> nop
++0000dbdc <[^>]*> nop
++0000dbe0 <[^>]*> nop
++0000dbe4 <[^>]*> nop
++0000dbe8 <[^>]*> nop
++0000dbec <[^>]*> nop
++0000dbf0 <[^>]*> nop
++0000dbf4 <[^>]*> nop
++0000dbf8 <[^>]*> nop
++0000dbfc <[^>]*> nop
++0000dc00 <[^>]*> nop
++0000dc04 <[^>]*> nop
++0000dc08 <[^>]*> nop
++0000dc0c <[^>]*> nop
++0000dc10 <[^>]*> nop
++0000dc14 <[^>]*> nop
++0000dc18 <[^>]*> nop
++0000dc1c <[^>]*> nop
++0000dc20 <[^>]*> nop
++0000dc24 <[^>]*> nop
++0000dc28 <[^>]*> nop
++0000dc2c <[^>]*> nop
++0000dc30 <[^>]*> nop
++0000dc34 <[^>]*> nop
++0000dc38 <[^>]*> nop
++0000dc3c <[^>]*> nop
++0000dc40 <[^>]*> nop
++0000dc44 <[^>]*> nop
++0000dc48 <[^>]*> nop
++0000dc4c <[^>]*> nop
++0000dc50 <[^>]*> nop
++0000dc54 <[^>]*> nop
++0000dc58 <[^>]*> nop
++0000dc5c <[^>]*> nop
++0000dc60 <[^>]*> nop
++0000dc64 <[^>]*> nop
++0000dc68 <[^>]*> nop
++0000dc6c <[^>]*> nop
++0000dc70 <[^>]*> nop
++0000dc74 <[^>]*> nop
++0000dc78 <[^>]*> nop
++0000dc7c <[^>]*> nop
++0000dc80 <[^>]*> nop
++0000dc84 <[^>]*> nop
++0000dc88 <[^>]*> nop
++0000dc8c <[^>]*> nop
++0000dc90 <[^>]*> nop
++0000dc94 <[^>]*> nop
++0000dc98 <[^>]*> nop
++0000dc9c <[^>]*> nop
++0000dca0 <[^>]*> nop
++0000dca4 <[^>]*> nop
++0000dca8 <[^>]*> nop
++0000dcac <[^>]*> nop
++0000dcb0 <[^>]*> nop
++0000dcb4 <[^>]*> nop
++0000dcb8 <[^>]*> nop
++0000dcbc <[^>]*> nop
++0000dcc0 <[^>]*> nop
++0000dcc4 <[^>]*> nop
++0000dcc8 <[^>]*> nop
++0000dccc <[^>]*> nop
++0000dcd0 <[^>]*> nop
++0000dcd4 <[^>]*> nop
++0000dcd8 <[^>]*> nop
++0000dcdc <[^>]*> nop
++0000dce0 <[^>]*> nop
++0000dce4 <[^>]*> nop
++0000dce8 <[^>]*> nop
++0000dcec <[^>]*> nop
++0000dcf0 <[^>]*> nop
++0000dcf4 <[^>]*> nop
++0000dcf8 <[^>]*> nop
++0000dcfc <[^>]*> nop
++0000dd00 <[^>]*> nop
++0000dd04 <[^>]*> nop
++0000dd08 <[^>]*> nop
++0000dd0c <[^>]*> nop
++0000dd10 <[^>]*> nop
++0000dd14 <[^>]*> nop
++0000dd18 <[^>]*> nop
++0000dd1c <[^>]*> nop
++0000dd20 <[^>]*> nop
++0000dd24 <[^>]*> nop
++0000dd28 <[^>]*> nop
++0000dd2c <[^>]*> nop
++0000dd30 <[^>]*> nop
++0000dd34 <[^>]*> nop
++0000dd38 <[^>]*> nop
++0000dd3c <[^>]*> nop
++0000dd40 <[^>]*> nop
++0000dd44 <[^>]*> nop
++0000dd48 <[^>]*> nop
++0000dd4c <[^>]*> nop
++0000dd50 <[^>]*> nop
++0000dd54 <[^>]*> nop
++0000dd58 <[^>]*> nop
++0000dd5c <[^>]*> nop
++0000dd60 <[^>]*> nop
++0000dd64 <[^>]*> nop
++0000dd68 <[^>]*> nop
++0000dd6c <[^>]*> nop
++0000dd70 <[^>]*> nop
++0000dd74 <[^>]*> nop
++0000dd78 <[^>]*> nop
++0000dd7c <[^>]*> nop
++0000dd80 <[^>]*> nop
++0000dd84 <[^>]*> nop
++0000dd88 <[^>]*> nop
++0000dd8c <[^>]*> nop
++0000dd90 <[^>]*> nop
++0000dd94 <[^>]*> nop
++0000dd98 <[^>]*> nop
++0000dd9c <[^>]*> nop
++0000dda0 <[^>]*> nop
++0000dda4 <[^>]*> nop
++0000dda8 <[^>]*> nop
++0000ddac <[^>]*> nop
++0000ddb0 <[^>]*> nop
++0000ddb4 <[^>]*> nop
++0000ddb8 <[^>]*> nop
++0000ddbc <[^>]*> nop
++0000ddc0 <[^>]*> nop
++0000ddc4 <[^>]*> nop
++0000ddc8 <[^>]*> nop
++0000ddcc <[^>]*> nop
++0000ddd0 <[^>]*> nop
++0000ddd4 <[^>]*> nop
++0000ddd8 <[^>]*> nop
++0000dddc <[^>]*> nop
++0000dde0 <[^>]*> nop
++0000dde4 <[^>]*> nop
++0000dde8 <[^>]*> nop
++0000ddec <[^>]*> nop
++0000ddf0 <[^>]*> nop
++0000ddf4 <[^>]*> nop
++0000ddf8 <[^>]*> nop
++0000ddfc <[^>]*> nop
++0000de00 <[^>]*> nop
++0000de04 <[^>]*> nop
++0000de08 <[^>]*> nop
++0000de0c <[^>]*> nop
++0000de10 <[^>]*> nop
++0000de14 <[^>]*> nop
++0000de18 <[^>]*> nop
++0000de1c <[^>]*> nop
++0000de20 <[^>]*> nop
++0000de24 <[^>]*> nop
++0000de28 <[^>]*> nop
++0000de2c <[^>]*> nop
++0000de30 <[^>]*> nop
++0000de34 <[^>]*> nop
++0000de38 <[^>]*> nop
++0000de3c <[^>]*> nop
++0000de40 <[^>]*> nop
++0000de44 <[^>]*> nop
++0000de48 <[^>]*> nop
++0000de4c <[^>]*> nop
++0000de50 <[^>]*> nop
++0000de54 <[^>]*> nop
++0000de58 <[^>]*> nop
++0000de5c <[^>]*> nop
++0000de60 <[^>]*> nop
++0000de64 <[^>]*> nop
++0000de68 <[^>]*> nop
++0000de6c <[^>]*> nop
++0000de70 <[^>]*> nop
++0000de74 <[^>]*> nop
++0000de78 <[^>]*> nop
++0000de7c <[^>]*> nop
++0000de80 <[^>]*> nop
++0000de84 <[^>]*> nop
++0000de88 <[^>]*> nop
++0000de8c <[^>]*> nop
++0000de90 <[^>]*> nop
++0000de94 <[^>]*> nop
++0000de98 <[^>]*> nop
++0000de9c <[^>]*> nop
++0000dea0 <[^>]*> nop
++0000dea4 <[^>]*> nop
++0000dea8 <[^>]*> nop
++0000deac <[^>]*> nop
++0000deb0 <[^>]*> nop
++0000deb4 <[^>]*> nop
++0000deb8 <[^>]*> nop
++0000debc <[^>]*> nop
++0000dec0 <[^>]*> nop
++0000dec4 <[^>]*> nop
++0000dec8 <[^>]*> nop
++0000decc <[^>]*> nop
++0000ded0 <[^>]*> nop
++0000ded4 <[^>]*> nop
++0000ded8 <[^>]*> nop
++0000dedc <[^>]*> nop
++0000dee0 <[^>]*> nop
++0000dee4 <[^>]*> nop
++0000dee8 <[^>]*> nop
++0000deec <[^>]*> nop
++0000def0 <[^>]*> nop
++0000def4 <[^>]*> nop
++0000def8 <[^>]*> nop
++0000defc <[^>]*> nop
++0000df00 <[^>]*> nop
++0000df04 <[^>]*> nop
++0000df08 <[^>]*> nop
++0000df0c <[^>]*> nop
++0000df10 <[^>]*> nop
++0000df14 <[^>]*> nop
++0000df18 <[^>]*> nop
++0000df1c <[^>]*> nop
++0000df20 <[^>]*> nop
++0000df24 <[^>]*> nop
++0000df28 <[^>]*> nop
++0000df2c <[^>]*> nop
++0000df30 <[^>]*> nop
++0000df34 <[^>]*> nop
++0000df38 <[^>]*> nop
++0000df3c <[^>]*> nop
++0000df40 <[^>]*> nop
++0000df44 <[^>]*> nop
++0000df48 <[^>]*> nop
++0000df4c <[^>]*> nop
++0000df50 <[^>]*> nop
++0000df54 <[^>]*> nop
++0000df58 <[^>]*> nop
++0000df5c <[^>]*> nop
++0000df60 <[^>]*> nop
++0000df64 <[^>]*> nop
++0000df68 <[^>]*> nop
++0000df6c <[^>]*> nop
++0000df70 <[^>]*> nop
++0000df74 <[^>]*> nop
++0000df78 <[^>]*> nop
++0000df7c <[^>]*> nop
++0000df80 <[^>]*> nop
++0000df84 <[^>]*> nop
++0000df88 <[^>]*> nop
++0000df8c <[^>]*> nop
++0000df90 <[^>]*> nop
++0000df94 <[^>]*> nop
++0000df98 <[^>]*> nop
++0000df9c <[^>]*> nop
++0000dfa0 <[^>]*> nop
++0000dfa4 <[^>]*> nop
++0000dfa8 <[^>]*> nop
++0000dfac <[^>]*> nop
++0000dfb0 <[^>]*> nop
++0000dfb4 <[^>]*> nop
++0000dfb8 <[^>]*> nop
++0000dfbc <[^>]*> nop
++0000dfc0 <[^>]*> nop
++0000dfc4 <[^>]*> nop
++0000dfc8 <[^>]*> nop
++0000dfcc <[^>]*> nop
++0000dfd0 <[^>]*> nop
++0000dfd4 <[^>]*> nop
++0000dfd8 <[^>]*> nop
++0000dfdc <[^>]*> nop
++0000dfe0 <[^>]*> nop
++0000dfe4 <[^>]*> nop
++0000dfe8 <[^>]*> nop
++0000dfec <[^>]*> nop
++0000dff0 <[^>]*> nop
++0000dff4 <[^>]*> nop
++0000dff8 <[^>]*> nop
++0000dffc <[^>]*> nop
++0000e000 <[^>]*> nop
++0000e004 <[^>]*> nop
++0000e008 <[^>]*> nop
++0000e00c <[^>]*> nop
++0000e010 <[^>]*> nop
++0000e014 <[^>]*> nop
++0000e018 <[^>]*> nop
++0000e01c <[^>]*> nop
++0000e020 <[^>]*> nop
++0000e024 <[^>]*> nop
++0000e028 <[^>]*> nop
++0000e02c <[^>]*> nop
++0000e030 <[^>]*> nop
++0000e034 <[^>]*> nop
++0000e038 <[^>]*> nop
++0000e03c <[^>]*> nop
++0000e040 <[^>]*> nop
++0000e044 <[^>]*> nop
++0000e048 <[^>]*> nop
++0000e04c <[^>]*> nop
++0000e050 <[^>]*> nop
++0000e054 <[^>]*> nop
++0000e058 <[^>]*> nop
++0000e05c <[^>]*> nop
++0000e060 <[^>]*> nop
++0000e064 <[^>]*> nop
++0000e068 <[^>]*> nop
++0000e06c <[^>]*> nop
++0000e070 <[^>]*> nop
++0000e074 <[^>]*> nop
++0000e078 <[^>]*> nop
++0000e07c <[^>]*> nop
++0000e080 <[^>]*> nop
++0000e084 <[^>]*> nop
++0000e088 <[^>]*> nop
++0000e08c <[^>]*> nop
++0000e090 <[^>]*> nop
++0000e094 <[^>]*> nop
++0000e098 <[^>]*> nop
++0000e09c <[^>]*> nop
++0000e0a0 <[^>]*> nop
++0000e0a4 <[^>]*> nop
++0000e0a8 <[^>]*> nop
++0000e0ac <[^>]*> nop
++0000e0b0 <[^>]*> nop
++0000e0b4 <[^>]*> nop
++0000e0b8 <[^>]*> nop
++0000e0bc <[^>]*> nop
++0000e0c0 <[^>]*> nop
++0000e0c4 <[^>]*> nop
++0000e0c8 <[^>]*> nop
++0000e0cc <[^>]*> nop
++0000e0d0 <[^>]*> nop
++0000e0d4 <[^>]*> nop
++0000e0d8 <[^>]*> nop
++0000e0dc <[^>]*> nop
++0000e0e0 <[^>]*> nop
++0000e0e4 <[^>]*> nop
++0000e0e8 <[^>]*> nop
++0000e0ec <[^>]*> nop
++0000e0f0 <[^>]*> nop
++0000e0f4 <[^>]*> nop
++0000e0f8 <[^>]*> nop
++0000e0fc <[^>]*> nop
++0000e100 <[^>]*> nop
++0000e104 <[^>]*> nop
++0000e108 <[^>]*> nop
++0000e10c <[^>]*> nop
++0000e110 <[^>]*> nop
++0000e114 <[^>]*> nop
++0000e118 <[^>]*> nop
++0000e11c <[^>]*> nop
++0000e120 <[^>]*> nop
++0000e124 <[^>]*> nop
++0000e128 <[^>]*> nop
++0000e12c <[^>]*> nop
++0000e130 <[^>]*> nop
++0000e134 <[^>]*> nop
++0000e138 <[^>]*> nop
++0000e13c <[^>]*> nop
++0000e140 <[^>]*> nop
++0000e144 <[^>]*> nop
++0000e148 <[^>]*> nop
++0000e14c <[^>]*> nop
++0000e150 <[^>]*> nop
++0000e154 <[^>]*> nop
++0000e158 <[^>]*> nop
++0000e15c <[^>]*> nop
++0000e160 <[^>]*> nop
++0000e164 <[^>]*> nop
++0000e168 <[^>]*> nop
++0000e16c <[^>]*> nop
++0000e170 <[^>]*> nop
++0000e174 <[^>]*> nop
++0000e178 <[^>]*> nop
++0000e17c <[^>]*> nop
++0000e180 <[^>]*> nop
++0000e184 <[^>]*> nop
++0000e188 <[^>]*> nop
++0000e18c <[^>]*> nop
++0000e190 <[^>]*> nop
++0000e194 <[^>]*> nop
++0000e198 <[^>]*> nop
++0000e19c <[^>]*> nop
++0000e1a0 <[^>]*> nop
++0000e1a4 <[^>]*> nop
++0000e1a8 <[^>]*> nop
++0000e1ac <[^>]*> nop
++0000e1b0 <[^>]*> nop
++0000e1b4 <[^>]*> nop
++0000e1b8 <[^>]*> nop
++0000e1bc <[^>]*> nop
++0000e1c0 <[^>]*> nop
++0000e1c4 <[^>]*> nop
++0000e1c8 <[^>]*> nop
++0000e1cc <[^>]*> nop
++0000e1d0 <[^>]*> nop
++0000e1d4 <[^>]*> nop
++0000e1d8 <[^>]*> nop
++0000e1dc <[^>]*> nop
++0000e1e0 <[^>]*> nop
++0000e1e4 <[^>]*> nop
++0000e1e8 <[^>]*> nop
++0000e1ec <[^>]*> nop
++0000e1f0 <[^>]*> nop
++0000e1f4 <[^>]*> nop
++0000e1f8 <[^>]*> nop
++0000e1fc <[^>]*> nop
++0000e200 <[^>]*> nop
++0000e204 <[^>]*> nop
++0000e208 <[^>]*> nop
++0000e20c <[^>]*> nop
++0000e210 <[^>]*> nop
++0000e214 <[^>]*> nop
++0000e218 <[^>]*> nop
++0000e21c <[^>]*> nop
++0000e220 <[^>]*> nop
++0000e224 <[^>]*> nop
++0000e228 <[^>]*> nop
++0000e22c <[^>]*> nop
++0000e230 <[^>]*> nop
++0000e234 <[^>]*> nop
++0000e238 <[^>]*> nop
++0000e23c <[^>]*> nop
++0000e240 <[^>]*> nop
++0000e244 <[^>]*> nop
++0000e248 <[^>]*> nop
++0000e24c <[^>]*> nop
++0000e250 <[^>]*> nop
++0000e254 <[^>]*> nop
++0000e258 <[^>]*> nop
++0000e25c <[^>]*> nop
++0000e260 <[^>]*> nop
++0000e264 <[^>]*> nop
++0000e268 <[^>]*> nop
++0000e26c <[^>]*> nop
++0000e270 <[^>]*> nop
++0000e274 <[^>]*> nop
++0000e278 <[^>]*> nop
++0000e27c <[^>]*> nop
++0000e280 <[^>]*> nop
++0000e284 <[^>]*> nop
++0000e288 <[^>]*> nop
++0000e28c <[^>]*> nop
++0000e290 <[^>]*> nop
++0000e294 <[^>]*> nop
++0000e298 <[^>]*> nop
++0000e29c <[^>]*> nop
++0000e2a0 <[^>]*> nop
++0000e2a4 <[^>]*> nop
++0000e2a8 <[^>]*> nop
++0000e2ac <[^>]*> nop
++0000e2b0 <[^>]*> nop
++0000e2b4 <[^>]*> nop
++0000e2b8 <[^>]*> nop
++0000e2bc <[^>]*> nop
++0000e2c0 <[^>]*> nop
++0000e2c4 <[^>]*> nop
++0000e2c8 <[^>]*> nop
++0000e2cc <[^>]*> nop
++0000e2d0 <[^>]*> nop
++0000e2d4 <[^>]*> nop
++0000e2d8 <[^>]*> nop
++0000e2dc <[^>]*> nop
++0000e2e0 <[^>]*> nop
++0000e2e4 <[^>]*> nop
++0000e2e8 <[^>]*> nop
++0000e2ec <[^>]*> nop
++0000e2f0 <[^>]*> nop
++0000e2f4 <[^>]*> nop
++0000e2f8 <[^>]*> nop
++0000e2fc <[^>]*> nop
++0000e300 <[^>]*> nop
++0000e304 <[^>]*> nop
++0000e308 <[^>]*> nop
++0000e30c <[^>]*> nop
++0000e310 <[^>]*> nop
++0000e314 <[^>]*> nop
++0000e318 <[^>]*> nop
++0000e31c <[^>]*> nop
++0000e320 <[^>]*> nop
++0000e324 <[^>]*> nop
++0000e328 <[^>]*> nop
++0000e32c <[^>]*> nop
++0000e330 <[^>]*> nop
++0000e334 <[^>]*> nop
++0000e338 <[^>]*> nop
++0000e33c <[^>]*> nop
++0000e340 <[^>]*> nop
++0000e344 <[^>]*> nop
++0000e348 <[^>]*> nop
++0000e34c <[^>]*> nop
++0000e350 <[^>]*> nop
++0000e354 <[^>]*> nop
++0000e358 <[^>]*> nop
++0000e35c <[^>]*> nop
++0000e360 <[^>]*> nop
++0000e364 <[^>]*> nop
++0000e368 <[^>]*> nop
++0000e36c <[^>]*> nop
++0000e370 <[^>]*> nop
++0000e374 <[^>]*> nop
++0000e378 <[^>]*> nop
++0000e37c <[^>]*> nop
++0000e380 <[^>]*> nop
++0000e384 <[^>]*> nop
++0000e388 <[^>]*> nop
++0000e38c <[^>]*> nop
++0000e390 <[^>]*> nop
++0000e394 <[^>]*> nop
++0000e398 <[^>]*> nop
++0000e39c <[^>]*> nop
++0000e3a0 <[^>]*> nop
++0000e3a4 <[^>]*> nop
++0000e3a8 <[^>]*> nop
++0000e3ac <[^>]*> nop
++0000e3b0 <[^>]*> nop
++0000e3b4 <[^>]*> nop
++0000e3b8 <[^>]*> nop
++0000e3bc <[^>]*> nop
++0000e3c0 <[^>]*> nop
++0000e3c4 <[^>]*> nop
++0000e3c8 <[^>]*> nop
++0000e3cc <[^>]*> nop
++0000e3d0 <[^>]*> nop
++0000e3d4 <[^>]*> nop
++0000e3d8 <[^>]*> nop
++0000e3dc <[^>]*> nop
++0000e3e0 <[^>]*> nop
++0000e3e4 <[^>]*> nop
++0000e3e8 <[^>]*> nop
++0000e3ec <[^>]*> nop
++0000e3f0 <[^>]*> nop
++0000e3f4 <[^>]*> nop
++0000e3f8 <[^>]*> nop
++0000e3fc <[^>]*> nop
++0000e400 <[^>]*> nop
++0000e404 <[^>]*> nop
++0000e408 <[^>]*> nop
++0000e40c <[^>]*> nop
++0000e410 <[^>]*> nop
++0000e414 <[^>]*> nop
++0000e418 <[^>]*> nop
++0000e41c <[^>]*> nop
++0000e420 <[^>]*> nop
++0000e424 <[^>]*> nop
++0000e428 <[^>]*> nop
++0000e42c <[^>]*> nop
++0000e430 <[^>]*> nop
++0000e434 <[^>]*> nop
++0000e438 <[^>]*> nop
++0000e43c <[^>]*> nop
++0000e440 <[^>]*> nop
++0000e444 <[^>]*> nop
++0000e448 <[^>]*> nop
++0000e44c <[^>]*> nop
++0000e450 <[^>]*> nop
++0000e454 <[^>]*> nop
++0000e458 <[^>]*> nop
++0000e45c <[^>]*> nop
++0000e460 <[^>]*> nop
++0000e464 <[^>]*> nop
++0000e468 <[^>]*> nop
++0000e46c <[^>]*> nop
++0000e470 <[^>]*> nop
++0000e474 <[^>]*> nop
++0000e478 <[^>]*> nop
++0000e47c <[^>]*> nop
++0000e480 <[^>]*> nop
++0000e484 <[^>]*> nop
++0000e488 <[^>]*> nop
++0000e48c <[^>]*> nop
++0000e490 <[^>]*> nop
++0000e494 <[^>]*> nop
++0000e498 <[^>]*> nop
++0000e49c <[^>]*> nop
++0000e4a0 <[^>]*> nop
++0000e4a4 <[^>]*> nop
++0000e4a8 <[^>]*> nop
++0000e4ac <[^>]*> nop
++0000e4b0 <[^>]*> nop
++0000e4b4 <[^>]*> nop
++0000e4b8 <[^>]*> nop
++0000e4bc <[^>]*> nop
++0000e4c0 <[^>]*> nop
++0000e4c4 <[^>]*> nop
++0000e4c8 <[^>]*> nop
++0000e4cc <[^>]*> nop
++0000e4d0 <[^>]*> nop
++0000e4d4 <[^>]*> nop
++0000e4d8 <[^>]*> nop
++0000e4dc <[^>]*> nop
++0000e4e0 <[^>]*> nop
++0000e4e4 <[^>]*> nop
++0000e4e8 <[^>]*> nop
++0000e4ec <[^>]*> nop
++0000e4f0 <[^>]*> nop
++0000e4f4 <[^>]*> nop
++0000e4f8 <[^>]*> nop
++0000e4fc <[^>]*> nop
++0000e500 <[^>]*> nop
++0000e504 <[^>]*> nop
++0000e508 <[^>]*> nop
++0000e50c <[^>]*> nop
++0000e510 <[^>]*> nop
++0000e514 <[^>]*> nop
++0000e518 <[^>]*> nop
++0000e51c <[^>]*> nop
++0000e520 <[^>]*> nop
++0000e524 <[^>]*> nop
++0000e528 <[^>]*> nop
++0000e52c <[^>]*> nop
++0000e530 <[^>]*> nop
++0000e534 <[^>]*> nop
++0000e538 <[^>]*> nop
++0000e53c <[^>]*> nop
++0000e540 <[^>]*> nop
++0000e544 <[^>]*> nop
++0000e548 <[^>]*> nop
++0000e54c <[^>]*> nop
++0000e550 <[^>]*> nop
++0000e554 <[^>]*> nop
++0000e558 <[^>]*> nop
++0000e55c <[^>]*> nop
++0000e560 <[^>]*> nop
++0000e564 <[^>]*> nop
++0000e568 <[^>]*> nop
++0000e56c <[^>]*> nop
++0000e570 <[^>]*> nop
++0000e574 <[^>]*> nop
++0000e578 <[^>]*> nop
++0000e57c <[^>]*> nop
++0000e580 <[^>]*> nop
++0000e584 <[^>]*> nop
++0000e588 <[^>]*> nop
++0000e58c <[^>]*> nop
++0000e590 <[^>]*> nop
++0000e594 <[^>]*> nop
++0000e598 <[^>]*> nop
++0000e59c <[^>]*> nop
++0000e5a0 <[^>]*> nop
++0000e5a4 <[^>]*> nop
++0000e5a8 <[^>]*> nop
++0000e5ac <[^>]*> nop
++0000e5b0 <[^>]*> nop
++0000e5b4 <[^>]*> nop
++0000e5b8 <[^>]*> nop
++0000e5bc <[^>]*> nop
++0000e5c0 <[^>]*> nop
++0000e5c4 <[^>]*> nop
++0000e5c8 <[^>]*> nop
++0000e5cc <[^>]*> nop
++0000e5d0 <[^>]*> nop
++0000e5d4 <[^>]*> nop
++0000e5d8 <[^>]*> nop
++0000e5dc <[^>]*> nop
++0000e5e0 <[^>]*> nop
++0000e5e4 <[^>]*> nop
++0000e5e8 <[^>]*> nop
++0000e5ec <[^>]*> nop
++0000e5f0 <[^>]*> nop
++0000e5f4 <[^>]*> nop
++0000e5f8 <[^>]*> nop
++0000e5fc <[^>]*> nop
++0000e600 <[^>]*> nop
++0000e604 <[^>]*> nop
++0000e608 <[^>]*> nop
++0000e60c <[^>]*> nop
++0000e610 <[^>]*> nop
++0000e614 <[^>]*> nop
++0000e618 <[^>]*> nop
++0000e61c <[^>]*> nop
++0000e620 <[^>]*> nop
++0000e624 <[^>]*> nop
++0000e628 <[^>]*> nop
++0000e62c <[^>]*> nop
++0000e630 <[^>]*> nop
++0000e634 <[^>]*> nop
++0000e638 <[^>]*> nop
++0000e63c <[^>]*> nop
++0000e640 <[^>]*> nop
++0000e644 <[^>]*> nop
++0000e648 <[^>]*> nop
++0000e64c <[^>]*> nop
++0000e650 <[^>]*> nop
++0000e654 <[^>]*> nop
++0000e658 <[^>]*> nop
++0000e65c <[^>]*> nop
++0000e660 <[^>]*> nop
++0000e664 <[^>]*> nop
++0000e668 <[^>]*> nop
++0000e66c <[^>]*> nop
++0000e670 <[^>]*> nop
++0000e674 <[^>]*> nop
++0000e678 <[^>]*> nop
++0000e67c <[^>]*> nop
++0000e680 <[^>]*> nop
++0000e684 <[^>]*> nop
++0000e688 <[^>]*> nop
++0000e68c <[^>]*> nop
++0000e690 <[^>]*> nop
++0000e694 <[^>]*> nop
++0000e698 <[^>]*> nop
++0000e69c <[^>]*> nop
++0000e6a0 <[^>]*> nop
++0000e6a4 <[^>]*> nop
++0000e6a8 <[^>]*> nop
++0000e6ac <[^>]*> nop
++0000e6b0 <[^>]*> nop
++0000e6b4 <[^>]*> nop
++0000e6b8 <[^>]*> nop
++0000e6bc <[^>]*> nop
++0000e6c0 <[^>]*> nop
++0000e6c4 <[^>]*> nop
++0000e6c8 <[^>]*> nop
++0000e6cc <[^>]*> nop
++0000e6d0 <[^>]*> nop
++0000e6d4 <[^>]*> nop
++0000e6d8 <[^>]*> nop
++0000e6dc <[^>]*> nop
++0000e6e0 <[^>]*> nop
++0000e6e4 <[^>]*> nop
++0000e6e8 <[^>]*> nop
++0000e6ec <[^>]*> nop
++0000e6f0 <[^>]*> nop
++0000e6f4 <[^>]*> nop
++0000e6f8 <[^>]*> nop
++0000e6fc <[^>]*> nop
++0000e700 <[^>]*> nop
++0000e704 <[^>]*> nop
++0000e708 <[^>]*> nop
++0000e70c <[^>]*> nop
++0000e710 <[^>]*> nop
++0000e714 <[^>]*> nop
++0000e718 <[^>]*> nop
++0000e71c <[^>]*> nop
++0000e720 <[^>]*> nop
++0000e724 <[^>]*> nop
++0000e728 <[^>]*> nop
++0000e72c <[^>]*> nop
++0000e730 <[^>]*> nop
++0000e734 <[^>]*> nop
++0000e738 <[^>]*> nop
++0000e73c <[^>]*> nop
++0000e740 <[^>]*> nop
++0000e744 <[^>]*> nop
++0000e748 <[^>]*> nop
++0000e74c <[^>]*> nop
++0000e750 <[^>]*> nop
++0000e754 <[^>]*> nop
++0000e758 <[^>]*> nop
++0000e75c <[^>]*> nop
++0000e760 <[^>]*> nop
++0000e764 <[^>]*> nop
++0000e768 <[^>]*> nop
++0000e76c <[^>]*> nop
++0000e770 <[^>]*> nop
++0000e774 <[^>]*> nop
++0000e778 <[^>]*> nop
++0000e77c <[^>]*> nop
++0000e780 <[^>]*> nop
++0000e784 <[^>]*> nop
++0000e788 <[^>]*> nop
++0000e78c <[^>]*> nop
++0000e790 <[^>]*> nop
++0000e794 <[^>]*> nop
++0000e798 <[^>]*> nop
++0000e79c <[^>]*> nop
++0000e7a0 <[^>]*> nop
++0000e7a4 <[^>]*> nop
++0000e7a8 <[^>]*> nop
++0000e7ac <[^>]*> nop
++0000e7b0 <[^>]*> nop
++0000e7b4 <[^>]*> nop
++0000e7b8 <[^>]*> nop
++0000e7bc <[^>]*> nop
++0000e7c0 <[^>]*> nop
++0000e7c4 <[^>]*> nop
++0000e7c8 <[^>]*> nop
++0000e7cc <[^>]*> nop
++0000e7d0 <[^>]*> nop
++0000e7d4 <[^>]*> nop
++0000e7d8 <[^>]*> nop
++0000e7dc <[^>]*> nop
++0000e7e0 <[^>]*> nop
++0000e7e4 <[^>]*> nop
++0000e7e8 <[^>]*> nop
++0000e7ec <[^>]*> nop
++0000e7f0 <[^>]*> nop
++0000e7f4 <[^>]*> nop
++0000e7f8 <[^>]*> nop
++0000e7fc <[^>]*> nop
++0000e800 <[^>]*> nop
++0000e804 <[^>]*> nop
++0000e808 <[^>]*> nop
++0000e80c <[^>]*> nop
++0000e810 <[^>]*> nop
++0000e814 <[^>]*> nop
++0000e818 <[^>]*> nop
++0000e81c <[^>]*> nop
++0000e820 <[^>]*> nop
++0000e824 <[^>]*> nop
++0000e828 <[^>]*> nop
++0000e82c <[^>]*> nop
++0000e830 <[^>]*> nop
++0000e834 <[^>]*> nop
++0000e838 <[^>]*> nop
++0000e83c <[^>]*> nop
++0000e840 <[^>]*> nop
++0000e844 <[^>]*> nop
++0000e848 <[^>]*> nop
++0000e84c <[^>]*> nop
++0000e850 <[^>]*> nop
++0000e854 <[^>]*> nop
++0000e858 <[^>]*> nop
++0000e85c <[^>]*> nop
++0000e860 <[^>]*> nop
++0000e864 <[^>]*> nop
++0000e868 <[^>]*> nop
++0000e86c <[^>]*> nop
++0000e870 <[^>]*> nop
++0000e874 <[^>]*> nop
++0000e878 <[^>]*> nop
++0000e87c <[^>]*> nop
++0000e880 <[^>]*> nop
++0000e884 <[^>]*> nop
++0000e888 <[^>]*> nop
++0000e88c <[^>]*> nop
++0000e890 <[^>]*> nop
++0000e894 <[^>]*> nop
++0000e898 <[^>]*> nop
++0000e89c <[^>]*> nop
++0000e8a0 <[^>]*> nop
++0000e8a4 <[^>]*> nop
++0000e8a8 <[^>]*> nop
++0000e8ac <[^>]*> nop
++0000e8b0 <[^>]*> nop
++0000e8b4 <[^>]*> nop
++0000e8b8 <[^>]*> nop
++0000e8bc <[^>]*> nop
++0000e8c0 <[^>]*> nop
++0000e8c4 <[^>]*> nop
++0000e8c8 <[^>]*> nop
++0000e8cc <[^>]*> nop
++0000e8d0 <[^>]*> nop
++0000e8d4 <[^>]*> nop
++0000e8d8 <[^>]*> nop
++0000e8dc <[^>]*> nop
++0000e8e0 <[^>]*> nop
++0000e8e4 <[^>]*> nop
++0000e8e8 <[^>]*> nop
++0000e8ec <[^>]*> nop
++0000e8f0 <[^>]*> nop
++0000e8f4 <[^>]*> nop
++0000e8f8 <[^>]*> nop
++0000e8fc <[^>]*> nop
++0000e900 <[^>]*> nop
++0000e904 <[^>]*> nop
++0000e908 <[^>]*> nop
++0000e90c <[^>]*> nop
++0000e910 <[^>]*> nop
++0000e914 <[^>]*> nop
++0000e918 <[^>]*> nop
++0000e91c <[^>]*> nop
++0000e920 <[^>]*> nop
++0000e924 <[^>]*> nop
++0000e928 <[^>]*> nop
++0000e92c <[^>]*> nop
++0000e930 <[^>]*> nop
++0000e934 <[^>]*> nop
++0000e938 <[^>]*> nop
++0000e93c <[^>]*> nop
++0000e940 <[^>]*> nop
++0000e944 <[^>]*> nop
++0000e948 <[^>]*> nop
++0000e94c <[^>]*> nop
++0000e950 <[^>]*> nop
++0000e954 <[^>]*> nop
++0000e958 <[^>]*> nop
++0000e95c <[^>]*> nop
++0000e960 <[^>]*> nop
++0000e964 <[^>]*> nop
++0000e968 <[^>]*> nop
++0000e96c <[^>]*> nop
++0000e970 <[^>]*> nop
++0000e974 <[^>]*> nop
++0000e978 <[^>]*> nop
++0000e97c <[^>]*> nop
++0000e980 <[^>]*> nop
++0000e984 <[^>]*> nop
++0000e988 <[^>]*> nop
++0000e98c <[^>]*> nop
++0000e990 <[^>]*> nop
++0000e994 <[^>]*> nop
++0000e998 <[^>]*> nop
++0000e99c <[^>]*> nop
++0000e9a0 <[^>]*> nop
++0000e9a4 <[^>]*> nop
++0000e9a8 <[^>]*> nop
++0000e9ac <[^>]*> nop
++0000e9b0 <[^>]*> nop
++0000e9b4 <[^>]*> nop
++0000e9b8 <[^>]*> nop
++0000e9bc <[^>]*> nop
++0000e9c0 <[^>]*> nop
++0000e9c4 <[^>]*> nop
++0000e9c8 <[^>]*> nop
++0000e9cc <[^>]*> nop
++0000e9d0 <[^>]*> nop
++0000e9d4 <[^>]*> nop
++0000e9d8 <[^>]*> nop
++0000e9dc <[^>]*> nop
++0000e9e0 <[^>]*> nop
++0000e9e4 <[^>]*> nop
++0000e9e8 <[^>]*> nop
++0000e9ec <[^>]*> nop
++0000e9f0 <[^>]*> nop
++0000e9f4 <[^>]*> nop
++0000e9f8 <[^>]*> nop
++0000e9fc <[^>]*> nop
++0000ea00 <[^>]*> nop
++0000ea04 <[^>]*> nop
++0000ea08 <[^>]*> nop
++0000ea0c <[^>]*> nop
++0000ea10 <[^>]*> nop
++0000ea14 <[^>]*> nop
++0000ea18 <[^>]*> nop
++0000ea1c <[^>]*> nop
++0000ea20 <[^>]*> nop
++0000ea24 <[^>]*> nop
++0000ea28 <[^>]*> nop
++0000ea2c <[^>]*> nop
++0000ea30 <[^>]*> nop
++0000ea34 <[^>]*> nop
++0000ea38 <[^>]*> nop
++0000ea3c <[^>]*> nop
++0000ea40 <[^>]*> nop
++0000ea44 <[^>]*> nop
++0000ea48 <[^>]*> nop
++0000ea4c <[^>]*> nop
++0000ea50 <[^>]*> nop
++0000ea54 <[^>]*> nop
++0000ea58 <[^>]*> nop
++0000ea5c <[^>]*> nop
++0000ea60 <[^>]*> nop
++0000ea64 <[^>]*> nop
++0000ea68 <[^>]*> nop
++0000ea6c <[^>]*> nop
++0000ea70 <[^>]*> nop
++0000ea74 <[^>]*> nop
++0000ea78 <[^>]*> nop
++0000ea7c <[^>]*> nop
++0000ea80 <[^>]*> nop
++0000ea84 <[^>]*> nop
++0000ea88 <[^>]*> nop
++0000ea8c <[^>]*> nop
++0000ea90 <[^>]*> nop
++0000ea94 <[^>]*> nop
++0000ea98 <[^>]*> nop
++0000ea9c <[^>]*> nop
++0000eaa0 <[^>]*> nop
++0000eaa4 <[^>]*> nop
++0000eaa8 <[^>]*> nop
++0000eaac <[^>]*> nop
++0000eab0 <[^>]*> nop
++0000eab4 <[^>]*> nop
++0000eab8 <[^>]*> nop
++0000eabc <[^>]*> nop
++0000eac0 <[^>]*> nop
++0000eac4 <[^>]*> nop
++0000eac8 <[^>]*> nop
++0000eacc <[^>]*> nop
++0000ead0 <[^>]*> nop
++0000ead4 <[^>]*> nop
++0000ead8 <[^>]*> nop
++0000eadc <[^>]*> nop
++0000eae0 <[^>]*> nop
++0000eae4 <[^>]*> nop
++0000eae8 <[^>]*> nop
++0000eaec <[^>]*> nop
++0000eaf0 <[^>]*> nop
++0000eaf4 <[^>]*> nop
++0000eaf8 <[^>]*> nop
++0000eafc <[^>]*> nop
++0000eb00 <[^>]*> nop
++0000eb04 <[^>]*> nop
++0000eb08 <[^>]*> nop
++0000eb0c <[^>]*> nop
++0000eb10 <[^>]*> nop
++0000eb14 <[^>]*> nop
++0000eb18 <[^>]*> nop
++0000eb1c <[^>]*> nop
++0000eb20 <[^>]*> nop
++0000eb24 <[^>]*> nop
++0000eb28 <[^>]*> nop
++0000eb2c <[^>]*> nop
++0000eb30 <[^>]*> nop
++0000eb34 <[^>]*> nop
++0000eb38 <[^>]*> nop
++0000eb3c <[^>]*> nop
++0000eb40 <[^>]*> nop
++0000eb44 <[^>]*> nop
++0000eb48 <[^>]*> nop
++0000eb4c <[^>]*> nop
++0000eb50 <[^>]*> nop
++0000eb54 <[^>]*> nop
++0000eb58 <[^>]*> nop
++0000eb5c <[^>]*> nop
++0000eb60 <[^>]*> nop
++0000eb64 <[^>]*> nop
++0000eb68 <[^>]*> nop
++0000eb6c <[^>]*> nop
++0000eb70 <[^>]*> nop
++0000eb74 <[^>]*> nop
++0000eb78 <[^>]*> nop
++0000eb7c <[^>]*> nop
++0000eb80 <[^>]*> nop
++0000eb84 <[^>]*> nop
++0000eb88 <[^>]*> nop
++0000eb8c <[^>]*> nop
++0000eb90 <[^>]*> nop
++0000eb94 <[^>]*> nop
++0000eb98 <[^>]*> nop
++0000eb9c <[^>]*> nop
++0000eba0 <[^>]*> nop
++0000eba4 <[^>]*> nop
++0000eba8 <[^>]*> nop
++0000ebac <[^>]*> nop
++0000ebb0 <[^>]*> nop
++0000ebb4 <[^>]*> nop
++0000ebb8 <[^>]*> nop
++0000ebbc <[^>]*> nop
++0000ebc0 <[^>]*> nop
++0000ebc4 <[^>]*> nop
++0000ebc8 <[^>]*> nop
++0000ebcc <[^>]*> nop
++0000ebd0 <[^>]*> nop
++0000ebd4 <[^>]*> nop
++0000ebd8 <[^>]*> nop
++0000ebdc <[^>]*> nop
++0000ebe0 <[^>]*> nop
++0000ebe4 <[^>]*> nop
++0000ebe8 <[^>]*> nop
++0000ebec <[^>]*> nop
++0000ebf0 <[^>]*> nop
++0000ebf4 <[^>]*> nop
++0000ebf8 <[^>]*> nop
++0000ebfc <[^>]*> nop
++0000ec00 <[^>]*> nop
++0000ec04 <[^>]*> nop
++0000ec08 <[^>]*> nop
++0000ec0c <[^>]*> nop
++0000ec10 <[^>]*> nop
++0000ec14 <[^>]*> nop
++0000ec18 <[^>]*> nop
++0000ec1c <[^>]*> nop
++0000ec20 <[^>]*> nop
++0000ec24 <[^>]*> nop
++0000ec28 <[^>]*> nop
++0000ec2c <[^>]*> nop
++0000ec30 <[^>]*> nop
++0000ec34 <[^>]*> nop
++0000ec38 <[^>]*> nop
++0000ec3c <[^>]*> nop
++0000ec40 <[^>]*> nop
++0000ec44 <[^>]*> nop
++0000ec48 <[^>]*> nop
++0000ec4c <[^>]*> nop
++0000ec50 <[^>]*> nop
++0000ec54 <[^>]*> nop
++0000ec58 <[^>]*> nop
++0000ec5c <[^>]*> nop
++0000ec60 <[^>]*> nop
++0000ec64 <[^>]*> nop
++0000ec68 <[^>]*> nop
++0000ec6c <[^>]*> nop
++0000ec70 <[^>]*> nop
++0000ec74 <[^>]*> nop
++0000ec78 <[^>]*> nop
++0000ec7c <[^>]*> nop
++0000ec80 <[^>]*> nop
++0000ec84 <[^>]*> nop
++0000ec88 <[^>]*> nop
++0000ec8c <[^>]*> nop
++0000ec90 <[^>]*> nop
++0000ec94 <[^>]*> nop
++0000ec98 <[^>]*> nop
++0000ec9c <[^>]*> nop
++0000eca0 <[^>]*> nop
++0000eca4 <[^>]*> nop
++0000eca8 <[^>]*> nop
++0000ecac <[^>]*> nop
++0000ecb0 <[^>]*> nop
++0000ecb4 <[^>]*> nop
++0000ecb8 <[^>]*> nop
++0000ecbc <[^>]*> nop
++0000ecc0 <[^>]*> nop
++0000ecc4 <[^>]*> nop
++0000ecc8 <[^>]*> nop
++0000eccc <[^>]*> nop
++0000ecd0 <[^>]*> nop
++0000ecd4 <[^>]*> nop
++0000ecd8 <[^>]*> nop
++0000ecdc <[^>]*> nop
++0000ece0 <[^>]*> nop
++0000ece4 <[^>]*> nop
++0000ece8 <[^>]*> nop
++0000ecec <[^>]*> nop
++0000ecf0 <[^>]*> nop
++0000ecf4 <[^>]*> nop
++0000ecf8 <[^>]*> nop
++0000ecfc <[^>]*> nop
++0000ed00 <[^>]*> nop
++0000ed04 <[^>]*> nop
++0000ed08 <[^>]*> nop
++0000ed0c <[^>]*> nop
++0000ed10 <[^>]*> nop
++0000ed14 <[^>]*> nop
++0000ed18 <[^>]*> nop
++0000ed1c <[^>]*> nop
++0000ed20 <[^>]*> nop
++0000ed24 <[^>]*> nop
++0000ed28 <[^>]*> nop
++0000ed2c <[^>]*> nop
++0000ed30 <[^>]*> nop
++0000ed34 <[^>]*> nop
++0000ed38 <[^>]*> nop
++0000ed3c <[^>]*> nop
++0000ed40 <[^>]*> nop
++0000ed44 <[^>]*> nop
++0000ed48 <[^>]*> nop
++0000ed4c <[^>]*> nop
++0000ed50 <[^>]*> nop
++0000ed54 <[^>]*> nop
++0000ed58 <[^>]*> nop
++0000ed5c <[^>]*> nop
++0000ed60 <[^>]*> nop
++0000ed64 <[^>]*> nop
++0000ed68 <[^>]*> nop
++0000ed6c <[^>]*> nop
++0000ed70 <[^>]*> nop
++0000ed74 <[^>]*> nop
++0000ed78 <[^>]*> nop
++0000ed7c <[^>]*> nop
++0000ed80 <[^>]*> nop
++0000ed84 <[^>]*> nop
++0000ed88 <[^>]*> nop
++0000ed8c <[^>]*> nop
++0000ed90 <[^>]*> nop
++0000ed94 <[^>]*> nop
++0000ed98 <[^>]*> nop
++0000ed9c <[^>]*> nop
++0000eda0 <[^>]*> nop
++0000eda4 <[^>]*> nop
++0000eda8 <[^>]*> nop
++0000edac <[^>]*> nop
++0000edb0 <[^>]*> nop
++0000edb4 <[^>]*> nop
++0000edb8 <[^>]*> nop
++0000edbc <[^>]*> nop
++0000edc0 <[^>]*> nop
++0000edc4 <[^>]*> nop
++0000edc8 <[^>]*> nop
++0000edcc <[^>]*> nop
++0000edd0 <[^>]*> nop
++0000edd4 <[^>]*> nop
++0000edd8 <[^>]*> nop
++0000eddc <[^>]*> nop
++0000ede0 <[^>]*> nop
++0000ede4 <[^>]*> nop
++0000ede8 <[^>]*> nop
++0000edec <[^>]*> nop
++0000edf0 <[^>]*> nop
++0000edf4 <[^>]*> nop
++0000edf8 <[^>]*> nop
++0000edfc <[^>]*> nop
++0000ee00 <[^>]*> nop
++0000ee04 <[^>]*> nop
++0000ee08 <[^>]*> nop
++0000ee0c <[^>]*> nop
++0000ee10 <[^>]*> nop
++0000ee14 <[^>]*> nop
++0000ee18 <[^>]*> nop
++0000ee1c <[^>]*> nop
++0000ee20 <[^>]*> nop
++0000ee24 <[^>]*> nop
++0000ee28 <[^>]*> nop
++0000ee2c <[^>]*> nop
++0000ee30 <[^>]*> nop
++0000ee34 <[^>]*> nop
++0000ee38 <[^>]*> nop
++0000ee3c <[^>]*> nop
++0000ee40 <[^>]*> nop
++0000ee44 <[^>]*> nop
++0000ee48 <[^>]*> nop
++0000ee4c <[^>]*> nop
++0000ee50 <[^>]*> nop
++0000ee54 <[^>]*> nop
++0000ee58 <[^>]*> nop
++0000ee5c <[^>]*> nop
++0000ee60 <[^>]*> nop
++0000ee64 <[^>]*> nop
++0000ee68 <[^>]*> nop
++0000ee6c <[^>]*> nop
++0000ee70 <[^>]*> nop
++0000ee74 <[^>]*> nop
++0000ee78 <[^>]*> nop
++0000ee7c <[^>]*> nop
++0000ee80 <[^>]*> nop
++0000ee84 <[^>]*> nop
++0000ee88 <[^>]*> nop
++0000ee8c <[^>]*> nop
++0000ee90 <[^>]*> nop
++0000ee94 <[^>]*> nop
++0000ee98 <[^>]*> nop
++0000ee9c <[^>]*> nop
++0000eea0 <[^>]*> nop
++0000eea4 <[^>]*> nop
++0000eea8 <[^>]*> nop
++0000eeac <[^>]*> nop
++0000eeb0 <[^>]*> nop
++0000eeb4 <[^>]*> nop
++0000eeb8 <[^>]*> nop
++0000eebc <[^>]*> nop
++0000eec0 <[^>]*> nop
++0000eec4 <[^>]*> nop
++0000eec8 <[^>]*> nop
++0000eecc <[^>]*> nop
++0000eed0 <[^>]*> nop
++0000eed4 <[^>]*> nop
++0000eed8 <[^>]*> nop
++0000eedc <[^>]*> nop
++0000eee0 <[^>]*> nop
++0000eee4 <[^>]*> nop
++0000eee8 <[^>]*> nop
++0000eeec <[^>]*> nop
++0000eef0 <[^>]*> nop
++0000eef4 <[^>]*> nop
++0000eef8 <[^>]*> nop
++0000eefc <[^>]*> nop
++0000ef00 <[^>]*> nop
++0000ef04 <[^>]*> nop
++0000ef08 <[^>]*> nop
++0000ef0c <[^>]*> nop
++0000ef10 <[^>]*> nop
++0000ef14 <[^>]*> nop
++0000ef18 <[^>]*> nop
++0000ef1c <[^>]*> nop
++0000ef20 <[^>]*> nop
++0000ef24 <[^>]*> nop
++0000ef28 <[^>]*> nop
++0000ef2c <[^>]*> nop
++0000ef30 <[^>]*> nop
++0000ef34 <[^>]*> nop
++0000ef38 <[^>]*> nop
++0000ef3c <[^>]*> nop
++0000ef40 <[^>]*> nop
++0000ef44 <[^>]*> nop
++0000ef48 <[^>]*> nop
++0000ef4c <[^>]*> nop
++0000ef50 <[^>]*> nop
++0000ef54 <[^>]*> nop
++0000ef58 <[^>]*> nop
++0000ef5c <[^>]*> nop
++0000ef60 <[^>]*> nop
++0000ef64 <[^>]*> nop
++0000ef68 <[^>]*> nop
++0000ef6c <[^>]*> nop
++0000ef70 <[^>]*> nop
++0000ef74 <[^>]*> nop
++0000ef78 <[^>]*> nop
++0000ef7c <[^>]*> nop
++0000ef80 <[^>]*> nop
++0000ef84 <[^>]*> nop
++0000ef88 <[^>]*> nop
++0000ef8c <[^>]*> nop
++0000ef90 <[^>]*> nop
++0000ef94 <[^>]*> nop
++0000ef98 <[^>]*> nop
++0000ef9c <[^>]*> nop
++0000efa0 <[^>]*> nop
++0000efa4 <[^>]*> nop
++0000efa8 <[^>]*> nop
++0000efac <[^>]*> nop
++0000efb0 <[^>]*> nop
++0000efb4 <[^>]*> nop
++0000efb8 <[^>]*> nop
++0000efbc <[^>]*> nop
++0000efc0 <[^>]*> nop
++0000efc4 <[^>]*> nop
++0000efc8 <[^>]*> nop
++0000efcc <[^>]*> nop
++0000efd0 <[^>]*> nop
++0000efd4 <[^>]*> nop
++0000efd8 <[^>]*> nop
++0000efdc <[^>]*> nop
++0000efe0 <[^>]*> nop
++0000efe4 <[^>]*> nop
++0000efe8 <[^>]*> nop
++0000efec <[^>]*> nop
++0000eff0 <[^>]*> nop
++0000eff4 <[^>]*> nop
++0000eff8 <[^>]*> nop
++0000effc <[^>]*> nop
++0000f000 <[^>]*> nop
++0000f004 <[^>]*> nop
++0000f008 <[^>]*> nop
++0000f00c <[^>]*> nop
++0000f010 <[^>]*> nop
++0000f014 <[^>]*> nop
++0000f018 <[^>]*> nop
++0000f01c <[^>]*> nop
++0000f020 <[^>]*> nop
++0000f024 <[^>]*> nop
++0000f028 <[^>]*> nop
++0000f02c <[^>]*> nop
++0000f030 <[^>]*> nop
++0000f034 <[^>]*> nop
++0000f038 <[^>]*> nop
++0000f03c <[^>]*> nop
++0000f040 <[^>]*> nop
++0000f044 <[^>]*> nop
++0000f048 <[^>]*> nop
++0000f04c <[^>]*> nop
++0000f050 <[^>]*> nop
++0000f054 <[^>]*> nop
++0000f058 <[^>]*> nop
++0000f05c <[^>]*> nop
++0000f060 <[^>]*> nop
++0000f064 <[^>]*> nop
++0000f068 <[^>]*> nop
++0000f06c <[^>]*> nop
++0000f070 <[^>]*> nop
++0000f074 <[^>]*> nop
++0000f078 <[^>]*> nop
++0000f07c <[^>]*> nop
++0000f080 <[^>]*> nop
++0000f084 <[^>]*> nop
++0000f088 <[^>]*> nop
++0000f08c <[^>]*> nop
++0000f090 <[^>]*> nop
++0000f094 <[^>]*> nop
++0000f098 <[^>]*> nop
++0000f09c <[^>]*> nop
++0000f0a0 <[^>]*> nop
++0000f0a4 <[^>]*> nop
++0000f0a8 <[^>]*> nop
++0000f0ac <[^>]*> nop
++0000f0b0 <[^>]*> nop
++0000f0b4 <[^>]*> nop
++0000f0b8 <[^>]*> nop
++0000f0bc <[^>]*> nop
++0000f0c0 <[^>]*> nop
++0000f0c4 <[^>]*> nop
++0000f0c8 <[^>]*> nop
++0000f0cc <[^>]*> nop
++0000f0d0 <[^>]*> nop
++0000f0d4 <[^>]*> nop
++0000f0d8 <[^>]*> nop
++0000f0dc <[^>]*> nop
++0000f0e0 <[^>]*> nop
++0000f0e4 <[^>]*> nop
++0000f0e8 <[^>]*> nop
++0000f0ec <[^>]*> nop
++0000f0f0 <[^>]*> nop
++0000f0f4 <[^>]*> nop
++0000f0f8 <[^>]*> nop
++0000f0fc <[^>]*> nop
++0000f100 <[^>]*> nop
++0000f104 <[^>]*> nop
++0000f108 <[^>]*> nop
++0000f10c <[^>]*> nop
++0000f110 <[^>]*> nop
++0000f114 <[^>]*> nop
++0000f118 <[^>]*> nop
++0000f11c <[^>]*> nop
++0000f120 <[^>]*> nop
++0000f124 <[^>]*> nop
++0000f128 <[^>]*> nop
++0000f12c <[^>]*> nop
++0000f130 <[^>]*> nop
++0000f134 <[^>]*> nop
++0000f138 <[^>]*> nop
++0000f13c <[^>]*> nop
++0000f140 <[^>]*> nop
++0000f144 <[^>]*> nop
++0000f148 <[^>]*> nop
++0000f14c <[^>]*> nop
++0000f150 <[^>]*> nop
++0000f154 <[^>]*> nop
++0000f158 <[^>]*> nop
++0000f15c <[^>]*> nop
++0000f160 <[^>]*> nop
++0000f164 <[^>]*> nop
++0000f168 <[^>]*> nop
++0000f16c <[^>]*> nop
++0000f170 <[^>]*> nop
++0000f174 <[^>]*> nop
++0000f178 <[^>]*> nop
++0000f17c <[^>]*> nop
++0000f180 <[^>]*> nop
++0000f184 <[^>]*> nop
++0000f188 <[^>]*> nop
++0000f18c <[^>]*> nop
++0000f190 <[^>]*> nop
++0000f194 <[^>]*> nop
++0000f198 <[^>]*> nop
++0000f19c <[^>]*> nop
++0000f1a0 <[^>]*> nop
++0000f1a4 <[^>]*> nop
++0000f1a8 <[^>]*> nop
++0000f1ac <[^>]*> nop
++0000f1b0 <[^>]*> nop
++0000f1b4 <[^>]*> nop
++0000f1b8 <[^>]*> nop
++0000f1bc <[^>]*> nop
++0000f1c0 <[^>]*> nop
++0000f1c4 <[^>]*> nop
++0000f1c8 <[^>]*> nop
++0000f1cc <[^>]*> nop
++0000f1d0 <[^>]*> nop
++0000f1d4 <[^>]*> nop
++0000f1d8 <[^>]*> nop
++0000f1dc <[^>]*> nop
++0000f1e0 <[^>]*> nop
++0000f1e4 <[^>]*> nop
++0000f1e8 <[^>]*> nop
++0000f1ec <[^>]*> nop
++0000f1f0 <[^>]*> nop
++0000f1f4 <[^>]*> nop
++0000f1f8 <[^>]*> nop
++0000f1fc <[^>]*> nop
++0000f200 <[^>]*> nop
++0000f204 <[^>]*> nop
++0000f208 <[^>]*> nop
++0000f20c <[^>]*> nop
++0000f210 <[^>]*> nop
++0000f214 <[^>]*> nop
++0000f218 <[^>]*> nop
++0000f21c <[^>]*> nop
++0000f220 <[^>]*> nop
++0000f224 <[^>]*> nop
++0000f228 <[^>]*> nop
++0000f22c <[^>]*> nop
++0000f230 <[^>]*> nop
++0000f234 <[^>]*> nop
++0000f238 <[^>]*> nop
++0000f23c <[^>]*> nop
++0000f240 <[^>]*> nop
++0000f244 <[^>]*> nop
++0000f248 <[^>]*> nop
++0000f24c <[^>]*> nop
++0000f250 <[^>]*> nop
++0000f254 <[^>]*> nop
++0000f258 <[^>]*> nop
++0000f25c <[^>]*> nop
++0000f260 <[^>]*> nop
++0000f264 <[^>]*> nop
++0000f268 <[^>]*> nop
++0000f26c <[^>]*> nop
++0000f270 <[^>]*> nop
++0000f274 <[^>]*> nop
++0000f278 <[^>]*> nop
++0000f27c <[^>]*> nop
++0000f280 <[^>]*> nop
++0000f284 <[^>]*> nop
++0000f288 <[^>]*> nop
++0000f28c <[^>]*> nop
++0000f290 <[^>]*> nop
++0000f294 <[^>]*> nop
++0000f298 <[^>]*> nop
++0000f29c <[^>]*> nop
++0000f2a0 <[^>]*> nop
++0000f2a4 <[^>]*> nop
++0000f2a8 <[^>]*> nop
++0000f2ac <[^>]*> nop
++0000f2b0 <[^>]*> nop
++0000f2b4 <[^>]*> nop
++0000f2b8 <[^>]*> nop
++0000f2bc <[^>]*> nop
++0000f2c0 <[^>]*> nop
++0000f2c4 <[^>]*> nop
++0000f2c8 <[^>]*> nop
++0000f2cc <[^>]*> nop
++0000f2d0 <[^>]*> nop
++0000f2d4 <[^>]*> nop
++0000f2d8 <[^>]*> nop
++0000f2dc <[^>]*> nop
++0000f2e0 <[^>]*> nop
++0000f2e4 <[^>]*> nop
++0000f2e8 <[^>]*> nop
++0000f2ec <[^>]*> nop
++0000f2f0 <[^>]*> nop
++0000f2f4 <[^>]*> nop
++0000f2f8 <[^>]*> nop
++0000f2fc <[^>]*> nop
++0000f300 <[^>]*> nop
++0000f304 <[^>]*> nop
++0000f308 <[^>]*> nop
++0000f30c <[^>]*> nop
++0000f310 <[^>]*> nop
++0000f314 <[^>]*> nop
++0000f318 <[^>]*> nop
++0000f31c <[^>]*> nop
++0000f320 <[^>]*> nop
++0000f324 <[^>]*> nop
++0000f328 <[^>]*> nop
++0000f32c <[^>]*> nop
++0000f330 <[^>]*> nop
++0000f334 <[^>]*> nop
++0000f338 <[^>]*> nop
++0000f33c <[^>]*> nop
++0000f340 <[^>]*> nop
++0000f344 <[^>]*> nop
++0000f348 <[^>]*> nop
++0000f34c <[^>]*> nop
++0000f350 <[^>]*> nop
++0000f354 <[^>]*> nop
++0000f358 <[^>]*> nop
++0000f35c <[^>]*> nop
++0000f360 <[^>]*> nop
++0000f364 <[^>]*> nop
++0000f368 <[^>]*> nop
++0000f36c <[^>]*> nop
++0000f370 <[^>]*> nop
++0000f374 <[^>]*> nop
++0000f378 <[^>]*> nop
++0000f37c <[^>]*> nop
++0000f380 <[^>]*> nop
++0000f384 <[^>]*> nop
++0000f388 <[^>]*> nop
++0000f38c <[^>]*> nop
++0000f390 <[^>]*> nop
++0000f394 <[^>]*> nop
++0000f398 <[^>]*> nop
++0000f39c <[^>]*> nop
++0000f3a0 <[^>]*> nop
++0000f3a4 <[^>]*> nop
++0000f3a8 <[^>]*> nop
++0000f3ac <[^>]*> nop
++0000f3b0 <[^>]*> nop
++0000f3b4 <[^>]*> nop
++0000f3b8 <[^>]*> nop
++0000f3bc <[^>]*> nop
++0000f3c0 <[^>]*> nop
++0000f3c4 <[^>]*> nop
++0000f3c8 <[^>]*> nop
++0000f3cc <[^>]*> nop
++0000f3d0 <[^>]*> nop
++0000f3d4 <[^>]*> nop
++0000f3d8 <[^>]*> nop
++0000f3dc <[^>]*> nop
++0000f3e0 <[^>]*> nop
++0000f3e4 <[^>]*> nop
++0000f3e8 <[^>]*> nop
++0000f3ec <[^>]*> nop
++0000f3f0 <[^>]*> nop
++0000f3f4 <[^>]*> nop
++0000f3f8 <[^>]*> nop
++0000f3fc <[^>]*> nop
++0000f400 <[^>]*> nop
++0000f404 <[^>]*> nop
++0000f408 <[^>]*> nop
++0000f40c <[^>]*> nop
++0000f410 <[^>]*> nop
++0000f414 <[^>]*> nop
++0000f418 <[^>]*> nop
++0000f41c <[^>]*> nop
++0000f420 <[^>]*> nop
++0000f424 <[^>]*> nop
++0000f428 <[^>]*> nop
++0000f42c <[^>]*> nop
++0000f430 <[^>]*> nop
++0000f434 <[^>]*> nop
++0000f438 <[^>]*> nop
++0000f43c <[^>]*> nop
++0000f440 <[^>]*> nop
++0000f444 <[^>]*> nop
++0000f448 <[^>]*> nop
++0000f44c <[^>]*> nop
++0000f450 <[^>]*> nop
++0000f454 <[^>]*> nop
++0000f458 <[^>]*> nop
++0000f45c <[^>]*> nop
++0000f460 <[^>]*> nop
++0000f464 <[^>]*> nop
++0000f468 <[^>]*> nop
++0000f46c <[^>]*> nop
++0000f470 <[^>]*> nop
++0000f474 <[^>]*> nop
++0000f478 <[^>]*> nop
++0000f47c <[^>]*> nop
++0000f480 <[^>]*> nop
++0000f484 <[^>]*> nop
++0000f488 <[^>]*> nop
++0000f48c <[^>]*> nop
++0000f490 <[^>]*> nop
++0000f494 <[^>]*> nop
++0000f498 <[^>]*> nop
++0000f49c <[^>]*> nop
++0000f4a0 <[^>]*> nop
++0000f4a4 <[^>]*> nop
++0000f4a8 <[^>]*> nop
++0000f4ac <[^>]*> nop
++0000f4b0 <[^>]*> nop
++0000f4b4 <[^>]*> nop
++0000f4b8 <[^>]*> nop
++0000f4bc <[^>]*> nop
++0000f4c0 <[^>]*> nop
++0000f4c4 <[^>]*> nop
++0000f4c8 <[^>]*> nop
++0000f4cc <[^>]*> nop
++0000f4d0 <[^>]*> nop
++0000f4d4 <[^>]*> nop
++0000f4d8 <[^>]*> nop
++0000f4dc <[^>]*> nop
++0000f4e0 <[^>]*> nop
++0000f4e4 <[^>]*> nop
++0000f4e8 <[^>]*> nop
++0000f4ec <[^>]*> nop
++0000f4f0 <[^>]*> nop
++0000f4f4 <[^>]*> nop
++0000f4f8 <[^>]*> nop
++0000f4fc <[^>]*> nop
++0000f500 <[^>]*> nop
++0000f504 <[^>]*> nop
++0000f508 <[^>]*> nop
++0000f50c <[^>]*> nop
++0000f510 <[^>]*> nop
++0000f514 <[^>]*> nop
++0000f518 <[^>]*> nop
++0000f51c <[^>]*> nop
++0000f520 <[^>]*> nop
++0000f524 <[^>]*> nop
++0000f528 <[^>]*> nop
++0000f52c <[^>]*> nop
++0000f530 <[^>]*> nop
++0000f534 <[^>]*> nop
++0000f538 <[^>]*> nop
++0000f53c <[^>]*> nop
++0000f540 <[^>]*> nop
++0000f544 <[^>]*> nop
++0000f548 <[^>]*> nop
++0000f54c <[^>]*> nop
++0000f550 <[^>]*> nop
++0000f554 <[^>]*> nop
++0000f558 <[^>]*> nop
++0000f55c <[^>]*> nop
++0000f560 <[^>]*> nop
++0000f564 <[^>]*> nop
++0000f568 <[^>]*> nop
++0000f56c <[^>]*> nop
++0000f570 <[^>]*> nop
++0000f574 <[^>]*> nop
++0000f578 <[^>]*> nop
++0000f57c <[^>]*> nop
++0000f580 <[^>]*> nop
++0000f584 <[^>]*> nop
++0000f588 <[^>]*> nop
++0000f58c <[^>]*> nop
++0000f590 <[^>]*> nop
++0000f594 <[^>]*> nop
++0000f598 <[^>]*> nop
++0000f59c <[^>]*> nop
++0000f5a0 <[^>]*> nop
++0000f5a4 <[^>]*> nop
++0000f5a8 <[^>]*> nop
++0000f5ac <[^>]*> nop
++0000f5b0 <[^>]*> nop
++0000f5b4 <[^>]*> nop
++0000f5b8 <[^>]*> nop
++0000f5bc <[^>]*> nop
++0000f5c0 <[^>]*> nop
++0000f5c4 <[^>]*> nop
++0000f5c8 <[^>]*> nop
++0000f5cc <[^>]*> nop
++0000f5d0 <[^>]*> nop
++0000f5d4 <[^>]*> nop
++0000f5d8 <[^>]*> nop
++0000f5dc <[^>]*> nop
++0000f5e0 <[^>]*> nop
++0000f5e4 <[^>]*> nop
++0000f5e8 <[^>]*> nop
++0000f5ec <[^>]*> nop
++0000f5f0 <[^>]*> nop
++0000f5f4 <[^>]*> nop
++0000f5f8 <[^>]*> nop
++0000f5fc <[^>]*> nop
++0000f600 <[^>]*> nop
++0000f604 <[^>]*> nop
++0000f608 <[^>]*> nop
++0000f60c <[^>]*> nop
++0000f610 <[^>]*> nop
++0000f614 <[^>]*> nop
++0000f618 <[^>]*> nop
++0000f61c <[^>]*> nop
++0000f620 <[^>]*> nop
++0000f624 <[^>]*> nop
++0000f628 <[^>]*> nop
++0000f62c <[^>]*> nop
++0000f630 <[^>]*> nop
++0000f634 <[^>]*> nop
++0000f638 <[^>]*> nop
++0000f63c <[^>]*> nop
++0000f640 <[^>]*> nop
++0000f644 <[^>]*> nop
++0000f648 <[^>]*> nop
++0000f64c <[^>]*> nop
++0000f650 <[^>]*> nop
++0000f654 <[^>]*> nop
++0000f658 <[^>]*> nop
++0000f65c <[^>]*> nop
++0000f660 <[^>]*> nop
++0000f664 <[^>]*> nop
++0000f668 <[^>]*> nop
++0000f66c <[^>]*> nop
++0000f670 <[^>]*> nop
++0000f674 <[^>]*> nop
++0000f678 <[^>]*> nop
++0000f67c <[^>]*> nop
++0000f680 <[^>]*> nop
++0000f684 <[^>]*> nop
++0000f688 <[^>]*> nop
++0000f68c <[^>]*> nop
++0000f690 <[^>]*> nop
++0000f694 <[^>]*> nop
++0000f698 <[^>]*> nop
++0000f69c <[^>]*> nop
++0000f6a0 <[^>]*> nop
++0000f6a4 <[^>]*> nop
++0000f6a8 <[^>]*> nop
++0000f6ac <[^>]*> nop
++0000f6b0 <[^>]*> nop
++0000f6b4 <[^>]*> nop
++0000f6b8 <[^>]*> nop
++0000f6bc <[^>]*> nop
++0000f6c0 <[^>]*> nop
++0000f6c4 <[^>]*> nop
++0000f6c8 <[^>]*> nop
++0000f6cc <[^>]*> nop
++0000f6d0 <[^>]*> nop
++0000f6d4 <[^>]*> nop
++0000f6d8 <[^>]*> nop
++0000f6dc <[^>]*> nop
++0000f6e0 <[^>]*> nop
++0000f6e4 <[^>]*> nop
++0000f6e8 <[^>]*> nop
++0000f6ec <[^>]*> nop
++0000f6f0 <[^>]*> nop
++0000f6f4 <[^>]*> nop
++0000f6f8 <[^>]*> nop
++0000f6fc <[^>]*> nop
++0000f700 <[^>]*> nop
++0000f704 <[^>]*> nop
++0000f708 <[^>]*> nop
++0000f70c <[^>]*> nop
++0000f710 <[^>]*> nop
++0000f714 <[^>]*> nop
++0000f718 <[^>]*> nop
++0000f71c <[^>]*> nop
++0000f720 <[^>]*> nop
++0000f724 <[^>]*> nop
++0000f728 <[^>]*> nop
++0000f72c <[^>]*> nop
++0000f730 <[^>]*> nop
++0000f734 <[^>]*> nop
++0000f738 <[^>]*> nop
++0000f73c <[^>]*> nop
++0000f740 <[^>]*> nop
++0000f744 <[^>]*> nop
++0000f748 <[^>]*> nop
++0000f74c <[^>]*> nop
++0000f750 <[^>]*> nop
++0000f754 <[^>]*> nop
++0000f758 <[^>]*> nop
++0000f75c <[^>]*> nop
++0000f760 <[^>]*> nop
++0000f764 <[^>]*> nop
++0000f768 <[^>]*> nop
++0000f76c <[^>]*> nop
++0000f770 <[^>]*> nop
++0000f774 <[^>]*> nop
++0000f778 <[^>]*> nop
++0000f77c <[^>]*> nop
++0000f780 <[^>]*> nop
++0000f784 <[^>]*> nop
++0000f788 <[^>]*> nop
++0000f78c <[^>]*> nop
++0000f790 <[^>]*> nop
++0000f794 <[^>]*> nop
++0000f798 <[^>]*> nop
++0000f79c <[^>]*> nop
++0000f7a0 <[^>]*> nop
++0000f7a4 <[^>]*> nop
++0000f7a8 <[^>]*> nop
++0000f7ac <[^>]*> nop
++0000f7b0 <[^>]*> nop
++0000f7b4 <[^>]*> nop
++0000f7b8 <[^>]*> nop
++0000f7bc <[^>]*> nop
++0000f7c0 <[^>]*> nop
++0000f7c4 <[^>]*> nop
++0000f7c8 <[^>]*> nop
++0000f7cc <[^>]*> nop
++0000f7d0 <[^>]*> nop
++0000f7d4 <[^>]*> nop
++0000f7d8 <[^>]*> nop
++0000f7dc <[^>]*> nop
++0000f7e0 <[^>]*> nop
++0000f7e4 <[^>]*> nop
++0000f7e8 <[^>]*> nop
++0000f7ec <[^>]*> nop
++0000f7f0 <[^>]*> nop
++0000f7f4 <[^>]*> nop
++0000f7f8 <[^>]*> nop
++0000f7fc <[^>]*> nop
++0000f800 <[^>]*> nop
++0000f804 <[^>]*> nop
++0000f808 <[^>]*> nop
++0000f80c <[^>]*> nop
++0000f810 <[^>]*> nop
++0000f814 <[^>]*> nop
++0000f818 <[^>]*> nop
++0000f81c <[^>]*> nop
++0000f820 <[^>]*> nop
++0000f824 <[^>]*> nop
++0000f828 <[^>]*> nop
++0000f82c <[^>]*> nop
++0000f830 <[^>]*> nop
++0000f834 <[^>]*> nop
++0000f838 <[^>]*> nop
++0000f83c <[^>]*> nop
++0000f840 <[^>]*> nop
++0000f844 <[^>]*> nop
++0000f848 <[^>]*> nop
++0000f84c <[^>]*> nop
++0000f850 <[^>]*> nop
++0000f854 <[^>]*> nop
++0000f858 <[^>]*> nop
++0000f85c <[^>]*> nop
++0000f860 <[^>]*> nop
++0000f864 <[^>]*> nop
++0000f868 <[^>]*> nop
++0000f86c <[^>]*> nop
++0000f870 <[^>]*> nop
++0000f874 <[^>]*> nop
++0000f878 <[^>]*> nop
++0000f87c <[^>]*> nop
++0000f880 <[^>]*> nop
++0000f884 <[^>]*> nop
++0000f888 <[^>]*> nop
++0000f88c <[^>]*> nop
++0000f890 <[^>]*> nop
++0000f894 <[^>]*> nop
++0000f898 <[^>]*> nop
++0000f89c <[^>]*> nop
++0000f8a0 <[^>]*> nop
++0000f8a4 <[^>]*> nop
++0000f8a8 <[^>]*> nop
++0000f8ac <[^>]*> nop
++0000f8b0 <[^>]*> nop
++0000f8b4 <[^>]*> nop
++0000f8b8 <[^>]*> nop
++0000f8bc <[^>]*> nop
++0000f8c0 <[^>]*> nop
++0000f8c4 <[^>]*> nop
++0000f8c8 <[^>]*> nop
++0000f8cc <[^>]*> nop
++0000f8d0 <[^>]*> nop
++0000f8d4 <[^>]*> nop
++0000f8d8 <[^>]*> nop
++0000f8dc <[^>]*> nop
++0000f8e0 <[^>]*> nop
++0000f8e4 <[^>]*> nop
++0000f8e8 <[^>]*> nop
++0000f8ec <[^>]*> nop
++0000f8f0 <[^>]*> nop
++0000f8f4 <[^>]*> nop
++0000f8f8 <[^>]*> nop
++0000f8fc <[^>]*> nop
++0000f900 <[^>]*> nop
++0000f904 <[^>]*> nop
++0000f908 <[^>]*> nop
++0000f90c <[^>]*> nop
++0000f910 <[^>]*> nop
++0000f914 <[^>]*> nop
++0000f918 <[^>]*> nop
++0000f91c <[^>]*> nop
++0000f920 <[^>]*> nop
++0000f924 <[^>]*> nop
++0000f928 <[^>]*> nop
++0000f92c <[^>]*> nop
++0000f930 <[^>]*> nop
++0000f934 <[^>]*> nop
++0000f938 <[^>]*> nop
++0000f93c <[^>]*> nop
++0000f940 <[^>]*> nop
++0000f944 <[^>]*> nop
++0000f948 <[^>]*> nop
++0000f94c <[^>]*> nop
++0000f950 <[^>]*> nop
++0000f954 <[^>]*> nop
++0000f958 <[^>]*> nop
++0000f95c <[^>]*> nop
++0000f960 <[^>]*> nop
++0000f964 <[^>]*> nop
++0000f968 <[^>]*> nop
++0000f96c <[^>]*> nop
++0000f970 <[^>]*> nop
++0000f974 <[^>]*> nop
++0000f978 <[^>]*> nop
++0000f97c <[^>]*> nop
++0000f980 <[^>]*> nop
++0000f984 <[^>]*> nop
++0000f988 <[^>]*> nop
++0000f98c <[^>]*> nop
++0000f990 <[^>]*> nop
++0000f994 <[^>]*> nop
++0000f998 <[^>]*> nop
++0000f99c <[^>]*> nop
++0000f9a0 <[^>]*> nop
++0000f9a4 <[^>]*> nop
++0000f9a8 <[^>]*> nop
++0000f9ac <[^>]*> nop
++0000f9b0 <[^>]*> nop
++0000f9b4 <[^>]*> nop
++0000f9b8 <[^>]*> nop
++0000f9bc <[^>]*> nop
++0000f9c0 <[^>]*> nop
++0000f9c4 <[^>]*> nop
++0000f9c8 <[^>]*> nop
++0000f9cc <[^>]*> nop
++0000f9d0 <[^>]*> nop
++0000f9d4 <[^>]*> nop
++0000f9d8 <[^>]*> nop
++0000f9dc <[^>]*> nop
++0000f9e0 <[^>]*> nop
++0000f9e4 <[^>]*> nop
++0000f9e8 <[^>]*> nop
++0000f9ec <[^>]*> nop
++0000f9f0 <[^>]*> nop
++0000f9f4 <[^>]*> nop
++0000f9f8 <[^>]*> nop
++0000f9fc <[^>]*> nop
++0000fa00 <[^>]*> nop
++0000fa04 <[^>]*> nop
++0000fa08 <[^>]*> nop
++0000fa0c <[^>]*> nop
++0000fa10 <[^>]*> nop
++0000fa14 <[^>]*> nop
++0000fa18 <[^>]*> nop
++0000fa1c <[^>]*> nop
++0000fa20 <[^>]*> nop
++0000fa24 <[^>]*> nop
++0000fa28 <[^>]*> nop
++0000fa2c <[^>]*> nop
++0000fa30 <[^>]*> nop
++0000fa34 <[^>]*> nop
++0000fa38 <[^>]*> nop
++0000fa3c <[^>]*> nop
++0000fa40 <[^>]*> nop
++0000fa44 <[^>]*> nop
++0000fa48 <[^>]*> nop
++0000fa4c <[^>]*> nop
++0000fa50 <[^>]*> nop
++0000fa54 <[^>]*> nop
++0000fa58 <[^>]*> nop
++0000fa5c <[^>]*> nop
++0000fa60 <[^>]*> nop
++0000fa64 <[^>]*> nop
++0000fa68 <[^>]*> nop
++0000fa6c <[^>]*> nop
++0000fa70 <[^>]*> nop
++0000fa74 <[^>]*> nop
++0000fa78 <[^>]*> nop
++0000fa7c <[^>]*> nop
++0000fa80 <[^>]*> nop
++0000fa84 <[^>]*> nop
++0000fa88 <[^>]*> nop
++0000fa8c <[^>]*> nop
++0000fa90 <[^>]*> nop
++0000fa94 <[^>]*> nop
++0000fa98 <[^>]*> nop
++0000fa9c <[^>]*> nop
++0000faa0 <[^>]*> nop
++0000faa4 <[^>]*> nop
++0000faa8 <[^>]*> nop
++0000faac <[^>]*> nop
++0000fab0 <[^>]*> nop
++0000fab4 <[^>]*> nop
++0000fab8 <[^>]*> nop
++0000fabc <[^>]*> nop
++0000fac0 <[^>]*> nop
++0000fac4 <[^>]*> nop
++0000fac8 <[^>]*> nop
++0000facc <[^>]*> nop
++0000fad0 <[^>]*> nop
++0000fad4 <[^>]*> nop
++0000fad8 <[^>]*> nop
++0000fadc <[^>]*> nop
++0000fae0 <[^>]*> nop
++0000fae4 <[^>]*> nop
++0000fae8 <[^>]*> nop
++0000faec <[^>]*> nop
++0000faf0 <[^>]*> nop
++0000faf4 <[^>]*> nop
++0000faf8 <[^>]*> nop
++0000fafc <[^>]*> nop
++0000fb00 <[^>]*> nop
++0000fb04 <[^>]*> nop
++0000fb08 <[^>]*> nop
++0000fb0c <[^>]*> nop
++0000fb10 <[^>]*> nop
++0000fb14 <[^>]*> nop
++0000fb18 <[^>]*> nop
++0000fb1c <[^>]*> nop
++0000fb20 <[^>]*> nop
++0000fb24 <[^>]*> nop
++0000fb28 <[^>]*> nop
++0000fb2c <[^>]*> nop
++0000fb30 <[^>]*> nop
++0000fb34 <[^>]*> nop
++0000fb38 <[^>]*> nop
++0000fb3c <[^>]*> nop
++0000fb40 <[^>]*> nop
++0000fb44 <[^>]*> nop
++0000fb48 <[^>]*> nop
++0000fb4c <[^>]*> nop
++0000fb50 <[^>]*> nop
++0000fb54 <[^>]*> nop
++0000fb58 <[^>]*> nop
++0000fb5c <[^>]*> nop
++0000fb60 <[^>]*> nop
++0000fb64 <[^>]*> nop
++0000fb68 <[^>]*> nop
++0000fb6c <[^>]*> nop
++0000fb70 <[^>]*> nop
++0000fb74 <[^>]*> nop
++0000fb78 <[^>]*> nop
++0000fb7c <[^>]*> nop
++0000fb80 <[^>]*> nop
++0000fb84 <[^>]*> nop
++0000fb88 <[^>]*> nop
++0000fb8c <[^>]*> nop
++0000fb90 <[^>]*> nop
++0000fb94 <[^>]*> nop
++0000fb98 <[^>]*> nop
++0000fb9c <[^>]*> nop
++0000fba0 <[^>]*> nop
++0000fba4 <[^>]*> nop
++0000fba8 <[^>]*> nop
++0000fbac <[^>]*> nop
++0000fbb0 <[^>]*> nop
++0000fbb4 <[^>]*> nop
++0000fbb8 <[^>]*> nop
++0000fbbc <[^>]*> nop
++0000fbc0 <[^>]*> nop
++0000fbc4 <[^>]*> nop
++0000fbc8 <[^>]*> nop
++0000fbcc <[^>]*> nop
++0000fbd0 <[^>]*> nop
++0000fbd4 <[^>]*> nop
++0000fbd8 <[^>]*> nop
++0000fbdc <[^>]*> nop
++0000fbe0 <[^>]*> nop
++0000fbe4 <[^>]*> nop
++0000fbe8 <[^>]*> nop
++0000fbec <[^>]*> nop
++0000fbf0 <[^>]*> nop
++0000fbf4 <[^>]*> nop
++0000fbf8 <[^>]*> nop
++0000fbfc <[^>]*> nop
++0000fc00 <[^>]*> nop
++0000fc04 <[^>]*> nop
++0000fc08 <[^>]*> nop
++0000fc0c <[^>]*> nop
++0000fc10 <[^>]*> nop
++0000fc14 <[^>]*> nop
++0000fc18 <[^>]*> nop
++0000fc1c <[^>]*> nop
++0000fc20 <[^>]*> nop
++0000fc24 <[^>]*> nop
++0000fc28 <[^>]*> nop
++0000fc2c <[^>]*> nop
++0000fc30 <[^>]*> nop
++0000fc34 <[^>]*> nop
++0000fc38 <[^>]*> nop
++0000fc3c <[^>]*> nop
++0000fc40 <[^>]*> nop
++0000fc44 <[^>]*> nop
++0000fc48 <[^>]*> nop
++0000fc4c <[^>]*> nop
++0000fc50 <[^>]*> nop
++0000fc54 <[^>]*> nop
++0000fc58 <[^>]*> nop
++0000fc5c <[^>]*> nop
++0000fc60 <[^>]*> nop
++0000fc64 <[^>]*> nop
++0000fc68 <[^>]*> nop
++0000fc6c <[^>]*> nop
++0000fc70 <[^>]*> nop
++0000fc74 <[^>]*> nop
++0000fc78 <[^>]*> nop
++0000fc7c <[^>]*> nop
++0000fc80 <[^>]*> nop
++0000fc84 <[^>]*> nop
++0000fc88 <[^>]*> nop
++0000fc8c <[^>]*> nop
++0000fc90 <[^>]*> nop
++0000fc94 <[^>]*> nop
++0000fc98 <[^>]*> nop
++0000fc9c <[^>]*> nop
++0000fca0 <[^>]*> nop
++0000fca4 <[^>]*> nop
++0000fca8 <[^>]*> nop
++0000fcac <[^>]*> nop
++0000fcb0 <[^>]*> nop
++0000fcb4 <[^>]*> nop
++0000fcb8 <[^>]*> nop
++0000fcbc <[^>]*> nop
++0000fcc0 <[^>]*> nop
++0000fcc4 <[^>]*> nop
++0000fcc8 <[^>]*> nop
++0000fccc <[^>]*> nop
++0000fcd0 <[^>]*> nop
++0000fcd4 <[^>]*> nop
++0000fcd8 <[^>]*> nop
++0000fcdc <[^>]*> nop
++0000fce0 <[^>]*> nop
++0000fce4 <[^>]*> nop
++0000fce8 <[^>]*> nop
++0000fcec <[^>]*> nop
++0000fcf0 <[^>]*> nop
++0000fcf4 <[^>]*> nop
++0000fcf8 <[^>]*> nop
++0000fcfc <[^>]*> nop
++0000fd00 <[^>]*> nop
++0000fd04 <[^>]*> nop
++0000fd08 <[^>]*> nop
++0000fd0c <[^>]*> nop
++0000fd10 <[^>]*> nop
++0000fd14 <[^>]*> nop
++0000fd18 <[^>]*> nop
++0000fd1c <[^>]*> nop
++0000fd20 <[^>]*> nop
++0000fd24 <[^>]*> nop
++0000fd28 <[^>]*> nop
++0000fd2c <[^>]*> nop
++0000fd30 <[^>]*> nop
++0000fd34 <[^>]*> nop
++0000fd38 <[^>]*> nop
++0000fd3c <[^>]*> nop
++0000fd40 <[^>]*> nop
++0000fd44 <[^>]*> nop
++0000fd48 <[^>]*> nop
++0000fd4c <[^>]*> nop
++0000fd50 <[^>]*> nop
++0000fd54 <[^>]*> nop
++0000fd58 <[^>]*> nop
++0000fd5c <[^>]*> nop
++0000fd60 <[^>]*> nop
++0000fd64 <[^>]*> nop
++0000fd68 <[^>]*> nop
++0000fd6c <[^>]*> nop
++0000fd70 <[^>]*> nop
++0000fd74 <[^>]*> nop
++0000fd78 <[^>]*> nop
++0000fd7c <[^>]*> nop
++0000fd80 <[^>]*> nop
++0000fd84 <[^>]*> nop
++0000fd88 <[^>]*> nop
++0000fd8c <[^>]*> nop
++0000fd90 <[^>]*> nop
++0000fd94 <[^>]*> nop
++0000fd98 <[^>]*> nop
++0000fd9c <[^>]*> nop
++0000fda0 <[^>]*> nop
++0000fda4 <[^>]*> nop
++0000fda8 <[^>]*> nop
++0000fdac <[^>]*> nop
++0000fdb0 <[^>]*> nop
++0000fdb4 <[^>]*> nop
++0000fdb8 <[^>]*> nop
++0000fdbc <[^>]*> nop
++0000fdc0 <[^>]*> nop
++0000fdc4 <[^>]*> nop
++0000fdc8 <[^>]*> nop
++0000fdcc <[^>]*> nop
++0000fdd0 <[^>]*> nop
++0000fdd4 <[^>]*> nop
++0000fdd8 <[^>]*> nop
++0000fddc <[^>]*> nop
++0000fde0 <[^>]*> nop
++0000fde4 <[^>]*> nop
++0000fde8 <[^>]*> nop
++0000fdec <[^>]*> nop
++0000fdf0 <[^>]*> nop
++0000fdf4 <[^>]*> nop
++0000fdf8 <[^>]*> nop
++0000fdfc <[^>]*> nop
++0000fe00 <[^>]*> nop
++0000fe04 <[^>]*> nop
++0000fe08 <[^>]*> nop
++0000fe0c <[^>]*> nop
++0000fe10 <[^>]*> nop
++0000fe14 <[^>]*> nop
++0000fe18 <[^>]*> nop
++0000fe1c <[^>]*> nop
++0000fe20 <[^>]*> nop
++0000fe24 <[^>]*> nop
++0000fe28 <[^>]*> nop
++0000fe2c <[^>]*> nop
++0000fe30 <[^>]*> nop
++0000fe34 <[^>]*> nop
++0000fe38 <[^>]*> nop
++0000fe3c <[^>]*> nop
++0000fe40 <[^>]*> nop
++0000fe44 <[^>]*> nop
++0000fe48 <[^>]*> nop
++0000fe4c <[^>]*> nop
++0000fe50 <[^>]*> nop
++0000fe54 <[^>]*> nop
++0000fe58 <[^>]*> nop
++0000fe5c <[^>]*> nop
++0000fe60 <[^>]*> nop
++0000fe64 <[^>]*> nop
++0000fe68 <[^>]*> nop
++0000fe6c <[^>]*> nop
++0000fe70 <[^>]*> nop
++0000fe74 <[^>]*> nop
++0000fe78 <[^>]*> nop
++0000fe7c <[^>]*> nop
++0000fe80 <[^>]*> nop
++0000fe84 <[^>]*> nop
++0000fe88 <[^>]*> nop
++0000fe8c <[^>]*> nop
++0000fe90 <[^>]*> nop
++0000fe94 <[^>]*> nop
++0000fe98 <[^>]*> nop
++0000fe9c <[^>]*> nop
++0000fea0 <[^>]*> nop
++0000fea4 <[^>]*> nop
++0000fea8 <[^>]*> nop
++0000feac <[^>]*> nop
++0000feb0 <[^>]*> nop
++0000feb4 <[^>]*> nop
++0000feb8 <[^>]*> nop
++0000febc <[^>]*> nop
++0000fec0 <[^>]*> nop
++0000fec4 <[^>]*> nop
++0000fec8 <[^>]*> nop
++0000fecc <[^>]*> nop
++0000fed0 <[^>]*> nop
++0000fed4 <[^>]*> nop
++0000fed8 <[^>]*> nop
++0000fedc <[^>]*> nop
++0000fee0 <[^>]*> nop
++0000fee4 <[^>]*> nop
++0000fee8 <[^>]*> nop
++0000feec <[^>]*> nop
++0000fef0 <[^>]*> nop
++0000fef4 <[^>]*> nop
++0000fef8 <[^>]*> nop
++0000fefc <[^>]*> nop
++0000ff00 <[^>]*> nop
++0000ff04 <[^>]*> nop
++0000ff08 <[^>]*> nop
++0000ff0c <[^>]*> nop
++0000ff10 <[^>]*> nop
++0000ff14 <[^>]*> nop
++0000ff18 <[^>]*> nop
++0000ff1c <[^>]*> nop
++0000ff20 <[^>]*> nop
++0000ff24 <[^>]*> nop
++0000ff28 <[^>]*> nop
++0000ff2c <[^>]*> nop
++0000ff30 <[^>]*> nop
++0000ff34 <[^>]*> nop
++0000ff38 <[^>]*> nop
++0000ff3c <[^>]*> nop
++0000ff40 <[^>]*> nop
++0000ff44 <[^>]*> nop
++0000ff48 <[^>]*> nop
++0000ff4c <[^>]*> nop
++0000ff50 <[^>]*> nop
++0000ff54 <[^>]*> nop
++0000ff58 <[^>]*> nop
++0000ff5c <[^>]*> nop
++0000ff60 <[^>]*> nop
++0000ff64 <[^>]*> nop
++0000ff68 <[^>]*> nop
++0000ff6c <[^>]*> nop
++0000ff70 <[^>]*> nop
++0000ff74 <[^>]*> nop
++0000ff78 <[^>]*> nop
++0000ff7c <[^>]*> nop
++0000ff80 <[^>]*> nop
++0000ff84 <[^>]*> nop
++0000ff88 <[^>]*> nop
++0000ff8c <[^>]*> nop
++0000ff90 <[^>]*> nop
++0000ff94 <[^>]*> nop
++0000ff98 <[^>]*> nop
++0000ff9c <[^>]*> nop
++0000ffa0 <[^>]*> nop
++0000ffa4 <[^>]*> nop
++0000ffa8 <[^>]*> nop
++0000ffac <[^>]*> nop
++0000ffb0 <[^>]*> nop
++0000ffb4 <[^>]*> nop
++0000ffb8 <[^>]*> nop
++0000ffbc <[^>]*> nop
++0000ffc0 <[^>]*> nop
++0000ffc4 <[^>]*> nop
++0000ffc8 <[^>]*> nop
++0000ffcc <[^>]*> nop
++0000ffd0 <[^>]*> nop
++0000ffd4 <[^>]*> nop
++0000ffd8 <[^>]*> nop
++0000ffdc <[^>]*> nop
++0000ffe0 <[^>]*> nop
++0000ffe4 <[^>]*> nop
++0000ffe8 <[^>]*> nop
++0000ffec <[^>]*> nop
++0000fff0 <[^>]*> nop
++0000fff4 <[^>]*> nop
++0000fff8 <[^>]*> nop
++0000fffc <[^>]*> nop
++00010000 <[^>]*> bne r2,r3,00010024 <[^>]*>
++00010004 <[^>]*> nop
++00010008 <[^>]*> nop
++0001000c <[^>]*> nop
++00010010 <[^>]*> nop
++00010014 <[^>]*> nop
++00010018 <[^>]*> nop
++0001001c <[^>]*> nop
++00010020 <[^>]*> nop
++00010024 <[^>]*> nop
++ ...
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_cjmp.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_cjmp.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,37 @@
++# relaxing unconditional jumps
++
++.globl text1
++.section text1, "ax", @progbits
++
++ beq r2, r3, on_border
++ beq r2, r3, out_of_range
++ nop
++ nop
++
++
++.align 15
++ #nop
++ #nop
++ #nop
++on_border:
++ bne r2, r3, in_range
++ nop
++ nop
++ nop
++ nop
++ nop
++out_of_range:
++in_range:
++ nop
++
++.globl text2
++.section text2, "ax", @progbits
++
++ bge r2, r3, text1
++ blt r2, r3, out_of_range
++ ble r2, r3, sym
++ nop
++ nop
++sym:
++ nop
++
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_section.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_section.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8206 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 relax_section
++
++# Test relaxation of section
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> bne r2,r3,00000010 <in_range-0xc>
++0+0004 <[^>]*> movhi at,0
++0+0008 <[^>]*> ori at,at,32780
++0+000c <[^>]*> jmp at
++0+0010 <[^>]*> bne r2,r3,0000001c <in_range>
++0+0014 <[^>]*> nop
++0+0018 <[^>]*> nop
++0+001c <[^>]*> nop
++0+0020 <[^>]*> nop
++0+0024 <[^>]*> nop
++0+0028 <[^>]*> nop
++0+002c <[^>]*> nop
++0+0030 <[^>]*> nop
++0+0034 <[^>]*> nop
++0+0038 <[^>]*> nop
++0+003c <[^>]*> nop
++0+0040 <[^>]*> nop
++0+0044 <[^>]*> nop
++0+0048 <[^>]*> nop
++0+004c <[^>]*> nop
++0+0050 <[^>]*> nop
++0+0054 <[^>]*> nop
++0+0058 <[^>]*> nop
++0+005c <[^>]*> nop
++0+0060 <[^>]*> nop
++0+0064 <[^>]*> nop
++0+0068 <[^>]*> nop
++0+006c <[^>]*> nop
++0+0070 <[^>]*> nop
++0+0074 <[^>]*> nop
++0+0078 <[^>]*> nop
++0+007c <[^>]*> nop
++0+0080 <[^>]*> nop
++0+0084 <[^>]*> nop
++0+0088 <[^>]*> nop
++0+008c <[^>]*> nop
++0+0090 <[^>]*> nop
++0+0094 <[^>]*> nop
++0+0098 <[^>]*> nop
++0+009c <[^>]*> nop
++0+00a0 <[^>]*> nop
++0+00a4 <[^>]*> nop
++0+00a8 <[^>]*> nop
++0+00ac <[^>]*> nop
++0+00b0 <[^>]*> nop
++0+00b4 <[^>]*> nop
++0+00b8 <[^>]*> nop
++0+00bc <[^>]*> nop
++0+00c0 <[^>]*> nop
++0+00c4 <[^>]*> nop
++0+00c8 <[^>]*> nop
++0+00cc <[^>]*> nop
++0+00d0 <[^>]*> nop
++0+00d4 <[^>]*> nop
++0+00d8 <[^>]*> nop
++0+00dc <[^>]*> nop
++0+00e0 <[^>]*> nop
++0+00e4 <[^>]*> nop
++0+00e8 <[^>]*> nop
++0+00ec <[^>]*> nop
++0+00f0 <[^>]*> nop
++0+00f4 <[^>]*> nop
++0+00f8 <[^>]*> nop
++0+00fc <[^>]*> nop
++0+0100 <[^>]*> nop
++0+0104 <[^>]*> nop
++0+0108 <[^>]*> nop
++0+010c <[^>]*> nop
++0+0110 <[^>]*> nop
++0+0114 <[^>]*> nop
++0+0118 <[^>]*> nop
++0+011c <[^>]*> nop
++0+0120 <[^>]*> nop
++0+0124 <[^>]*> nop
++0+0128 <[^>]*> nop
++0+012c <[^>]*> nop
++0+0130 <[^>]*> nop
++0+0134 <[^>]*> nop
++0+0138 <[^>]*> nop
++0+013c <[^>]*> nop
++0+0140 <[^>]*> nop
++0+0144 <[^>]*> nop
++0+0148 <[^>]*> nop
++0+014c <[^>]*> nop
++0+0150 <[^>]*> nop
++0+0154 <[^>]*> nop
++0+0158 <[^>]*> nop
++0+015c <[^>]*> nop
++0+0160 <[^>]*> nop
++0+0164 <[^>]*> nop
++0+0168 <[^>]*> nop
++0+016c <[^>]*> nop
++0+0170 <[^>]*> nop
++0+0174 <[^>]*> nop
++0+0178 <[^>]*> nop
++0+017c <[^>]*> nop
++0+0180 <[^>]*> nop
++0+0184 <[^>]*> nop
++0+0188 <[^>]*> nop
++0+018c <[^>]*> nop
++0+0190 <[^>]*> nop
++0+0194 <[^>]*> nop
++0+0198 <[^>]*> nop
++0+019c <[^>]*> nop
++0+01a0 <[^>]*> nop
++0+01a4 <[^>]*> nop
++0+01a8 <[^>]*> nop
++0+01ac <[^>]*> nop
++0+01b0 <[^>]*> nop
++0+01b4 <[^>]*> nop
++0+01b8 <[^>]*> nop
++0+01bc <[^>]*> nop
++0+01c0 <[^>]*> nop
++0+01c4 <[^>]*> nop
++0+01c8 <[^>]*> nop
++0+01cc <[^>]*> nop
++0+01d0 <[^>]*> nop
++0+01d4 <[^>]*> nop
++0+01d8 <[^>]*> nop
++0+01dc <[^>]*> nop
++0+01e0 <[^>]*> nop
++0+01e4 <[^>]*> nop
++0+01e8 <[^>]*> nop
++0+01ec <[^>]*> nop
++0+01f0 <[^>]*> nop
++0+01f4 <[^>]*> nop
++0+01f8 <[^>]*> nop
++0+01fc <[^>]*> nop
++0+0200 <[^>]*> nop
++0+0204 <[^>]*> nop
++0+0208 <[^>]*> nop
++0+020c <[^>]*> nop
++0+0210 <[^>]*> nop
++0+0214 <[^>]*> nop
++0+0218 <[^>]*> nop
++0+021c <[^>]*> nop
++0+0220 <[^>]*> nop
++0+0224 <[^>]*> nop
++0+0228 <[^>]*> nop
++0+022c <[^>]*> nop
++0+0230 <[^>]*> nop
++0+0234 <[^>]*> nop
++0+0238 <[^>]*> nop
++0+023c <[^>]*> nop
++0+0240 <[^>]*> nop
++0+0244 <[^>]*> nop
++0+0248 <[^>]*> nop
++0+024c <[^>]*> nop
++0+0250 <[^>]*> nop
++0+0254 <[^>]*> nop
++0+0258 <[^>]*> nop
++0+025c <[^>]*> nop
++0+0260 <[^>]*> nop
++0+0264 <[^>]*> nop
++0+0268 <[^>]*> nop
++0+026c <[^>]*> nop
++0+0270 <[^>]*> nop
++0+0274 <[^>]*> nop
++0+0278 <[^>]*> nop
++0+027c <[^>]*> nop
++0+0280 <[^>]*> nop
++0+0284 <[^>]*> nop
++0+0288 <[^>]*> nop
++0+028c <[^>]*> nop
++0+0290 <[^>]*> nop
++0+0294 <[^>]*> nop
++0+0298 <[^>]*> nop
++0+029c <[^>]*> nop
++0+02a0 <[^>]*> nop
++0+02a4 <[^>]*> nop
++0+02a8 <[^>]*> nop
++0+02ac <[^>]*> nop
++0+02b0 <[^>]*> nop
++0+02b4 <[^>]*> nop
++0+02b8 <[^>]*> nop
++0+02bc <[^>]*> nop
++0+02c0 <[^>]*> nop
++0+02c4 <[^>]*> nop
++0+02c8 <[^>]*> nop
++0+02cc <[^>]*> nop
++0+02d0 <[^>]*> nop
++0+02d4 <[^>]*> nop
++0+02d8 <[^>]*> nop
++0+02dc <[^>]*> nop
++0+02e0 <[^>]*> nop
++0+02e4 <[^>]*> nop
++0+02e8 <[^>]*> nop
++0+02ec <[^>]*> nop
++0+02f0 <[^>]*> nop
++0+02f4 <[^>]*> nop
++0+02f8 <[^>]*> nop
++0+02fc <[^>]*> nop
++0+0300 <[^>]*> nop
++0+0304 <[^>]*> nop
++0+0308 <[^>]*> nop
++0+030c <[^>]*> nop
++0+0310 <[^>]*> nop
++0+0314 <[^>]*> nop
++0+0318 <[^>]*> nop
++0+031c <[^>]*> nop
++0+0320 <[^>]*> nop
++0+0324 <[^>]*> nop
++0+0328 <[^>]*> nop
++0+032c <[^>]*> nop
++0+0330 <[^>]*> nop
++0+0334 <[^>]*> nop
++0+0338 <[^>]*> nop
++0+033c <[^>]*> nop
++0+0340 <[^>]*> nop
++0+0344 <[^>]*> nop
++0+0348 <[^>]*> nop
++0+034c <[^>]*> nop
++0+0350 <[^>]*> nop
++0+0354 <[^>]*> nop
++0+0358 <[^>]*> nop
++0+035c <[^>]*> nop
++0+0360 <[^>]*> nop
++0+0364 <[^>]*> nop
++0+0368 <[^>]*> nop
++0+036c <[^>]*> nop
++0+0370 <[^>]*> nop
++0+0374 <[^>]*> nop
++0+0378 <[^>]*> nop
++0+037c <[^>]*> nop
++0+0380 <[^>]*> nop
++0+0384 <[^>]*> nop
++0+0388 <[^>]*> nop
++0+038c <[^>]*> nop
++0+0390 <[^>]*> nop
++0+0394 <[^>]*> nop
++0+0398 <[^>]*> nop
++0+039c <[^>]*> nop
++0+03a0 <[^>]*> nop
++0+03a4 <[^>]*> nop
++0+03a8 <[^>]*> nop
++0+03ac <[^>]*> nop
++0+03b0 <[^>]*> nop
++0+03b4 <[^>]*> nop
++0+03b8 <[^>]*> nop
++0+03bc <[^>]*> nop
++0+03c0 <[^>]*> nop
++0+03c4 <[^>]*> nop
++0+03c8 <[^>]*> nop
++0+03cc <[^>]*> nop
++0+03d0 <[^>]*> nop
++0+03d4 <[^>]*> nop
++0+03d8 <[^>]*> nop
++0+03dc <[^>]*> nop
++0+03e0 <[^>]*> nop
++0+03e4 <[^>]*> nop
++0+03e8 <[^>]*> nop
++0+03ec <[^>]*> nop
++0+03f0 <[^>]*> nop
++0+03f4 <[^>]*> nop
++0+03f8 <[^>]*> nop
++0+03fc <[^>]*> nop
++0+0400 <[^>]*> nop
++0+0404 <[^>]*> nop
++0+0408 <[^>]*> nop
++0+040c <[^>]*> nop
++0+0410 <[^>]*> nop
++0+0414 <[^>]*> nop
++0+0418 <[^>]*> nop
++0+041c <[^>]*> nop
++0+0420 <[^>]*> nop
++0+0424 <[^>]*> nop
++0+0428 <[^>]*> nop
++0+042c <[^>]*> nop
++0+0430 <[^>]*> nop
++0+0434 <[^>]*> nop
++0+0438 <[^>]*> nop
++0+043c <[^>]*> nop
++0+0440 <[^>]*> nop
++0+0444 <[^>]*> nop
++0+0448 <[^>]*> nop
++0+044c <[^>]*> nop
++0+0450 <[^>]*> nop
++0+0454 <[^>]*> nop
++0+0458 <[^>]*> nop
++0+045c <[^>]*> nop
++0+0460 <[^>]*> nop
++0+0464 <[^>]*> nop
++0+0468 <[^>]*> nop
++0+046c <[^>]*> nop
++0+0470 <[^>]*> nop
++0+0474 <[^>]*> nop
++0+0478 <[^>]*> nop
++0+047c <[^>]*> nop
++0+0480 <[^>]*> nop
++0+0484 <[^>]*> nop
++0+0488 <[^>]*> nop
++0+048c <[^>]*> nop
++0+0490 <[^>]*> nop
++0+0494 <[^>]*> nop
++0+0498 <[^>]*> nop
++0+049c <[^>]*> nop
++0+04a0 <[^>]*> nop
++0+04a4 <[^>]*> nop
++0+04a8 <[^>]*> nop
++0+04ac <[^>]*> nop
++0+04b0 <[^>]*> nop
++0+04b4 <[^>]*> nop
++0+04b8 <[^>]*> nop
++0+04bc <[^>]*> nop
++0+04c0 <[^>]*> nop
++0+04c4 <[^>]*> nop
++0+04c8 <[^>]*> nop
++0+04cc <[^>]*> nop
++0+04d0 <[^>]*> nop
++0+04d4 <[^>]*> nop
++0+04d8 <[^>]*> nop
++0+04dc <[^>]*> nop
++0+04e0 <[^>]*> nop
++0+04e4 <[^>]*> nop
++0+04e8 <[^>]*> nop
++0+04ec <[^>]*> nop
++0+04f0 <[^>]*> nop
++0+04f4 <[^>]*> nop
++0+04f8 <[^>]*> nop
++0+04fc <[^>]*> nop
++0+0500 <[^>]*> nop
++0+0504 <[^>]*> nop
++0+0508 <[^>]*> nop
++0+050c <[^>]*> nop
++0+0510 <[^>]*> nop
++0+0514 <[^>]*> nop
++0+0518 <[^>]*> nop
++0+051c <[^>]*> nop
++0+0520 <[^>]*> nop
++0+0524 <[^>]*> nop
++0+0528 <[^>]*> nop
++0+052c <[^>]*> nop
++0+0530 <[^>]*> nop
++0+0534 <[^>]*> nop
++0+0538 <[^>]*> nop
++0+053c <[^>]*> nop
++0+0540 <[^>]*> nop
++0+0544 <[^>]*> nop
++0+0548 <[^>]*> nop
++0+054c <[^>]*> nop
++0+0550 <[^>]*> nop
++0+0554 <[^>]*> nop
++0+0558 <[^>]*> nop
++0+055c <[^>]*> nop
++0+0560 <[^>]*> nop
++0+0564 <[^>]*> nop
++0+0568 <[^>]*> nop
++0+056c <[^>]*> nop
++0+0570 <[^>]*> nop
++0+0574 <[^>]*> nop
++0+0578 <[^>]*> nop
++0+057c <[^>]*> nop
++0+0580 <[^>]*> nop
++0+0584 <[^>]*> nop
++0+0588 <[^>]*> nop
++0+058c <[^>]*> nop
++0+0590 <[^>]*> nop
++0+0594 <[^>]*> nop
++0+0598 <[^>]*> nop
++0+059c <[^>]*> nop
++0+05a0 <[^>]*> nop
++0+05a4 <[^>]*> nop
++0+05a8 <[^>]*> nop
++0+05ac <[^>]*> nop
++0+05b0 <[^>]*> nop
++0+05b4 <[^>]*> nop
++0+05b8 <[^>]*> nop
++0+05bc <[^>]*> nop
++0+05c0 <[^>]*> nop
++0+05c4 <[^>]*> nop
++0+05c8 <[^>]*> nop
++0+05cc <[^>]*> nop
++0+05d0 <[^>]*> nop
++0+05d4 <[^>]*> nop
++0+05d8 <[^>]*> nop
++0+05dc <[^>]*> nop
++0+05e0 <[^>]*> nop
++0+05e4 <[^>]*> nop
++0+05e8 <[^>]*> nop
++0+05ec <[^>]*> nop
++0+05f0 <[^>]*> nop
++0+05f4 <[^>]*> nop
++0+05f8 <[^>]*> nop
++0+05fc <[^>]*> nop
++0+0600 <[^>]*> nop
++0+0604 <[^>]*> nop
++0+0608 <[^>]*> nop
++0+060c <[^>]*> nop
++0+0610 <[^>]*> nop
++0+0614 <[^>]*> nop
++0+0618 <[^>]*> nop
++0+061c <[^>]*> nop
++0+0620 <[^>]*> nop
++0+0624 <[^>]*> nop
++0+0628 <[^>]*> nop
++0+062c <[^>]*> nop
++0+0630 <[^>]*> nop
++0+0634 <[^>]*> nop
++0+0638 <[^>]*> nop
++0+063c <[^>]*> nop
++0+0640 <[^>]*> nop
++0+0644 <[^>]*> nop
++0+0648 <[^>]*> nop
++0+064c <[^>]*> nop
++0+0650 <[^>]*> nop
++0+0654 <[^>]*> nop
++0+0658 <[^>]*> nop
++0+065c <[^>]*> nop
++0+0660 <[^>]*> nop
++0+0664 <[^>]*> nop
++0+0668 <[^>]*> nop
++0+066c <[^>]*> nop
++0+0670 <[^>]*> nop
++0+0674 <[^>]*> nop
++0+0678 <[^>]*> nop
++0+067c <[^>]*> nop
++0+0680 <[^>]*> nop
++0+0684 <[^>]*> nop
++0+0688 <[^>]*> nop
++0+068c <[^>]*> nop
++0+0690 <[^>]*> nop
++0+0694 <[^>]*> nop
++0+0698 <[^>]*> nop
++0+069c <[^>]*> nop
++0+06a0 <[^>]*> nop
++0+06a4 <[^>]*> nop
++0+06a8 <[^>]*> nop
++0+06ac <[^>]*> nop
++0+06b0 <[^>]*> nop
++0+06b4 <[^>]*> nop
++0+06b8 <[^>]*> nop
++0+06bc <[^>]*> nop
++0+06c0 <[^>]*> nop
++0+06c4 <[^>]*> nop
++0+06c8 <[^>]*> nop
++0+06cc <[^>]*> nop
++0+06d0 <[^>]*> nop
++0+06d4 <[^>]*> nop
++0+06d8 <[^>]*> nop
++0+06dc <[^>]*> nop
++0+06e0 <[^>]*> nop
++0+06e4 <[^>]*> nop
++0+06e8 <[^>]*> nop
++0+06ec <[^>]*> nop
++0+06f0 <[^>]*> nop
++0+06f4 <[^>]*> nop
++0+06f8 <[^>]*> nop
++0+06fc <[^>]*> nop
++0+0700 <[^>]*> nop
++0+0704 <[^>]*> nop
++0+0708 <[^>]*> nop
++0+070c <[^>]*> nop
++0+0710 <[^>]*> nop
++0+0714 <[^>]*> nop
++0+0718 <[^>]*> nop
++0+071c <[^>]*> nop
++0+0720 <[^>]*> nop
++0+0724 <[^>]*> nop
++0+0728 <[^>]*> nop
++0+072c <[^>]*> nop
++0+0730 <[^>]*> nop
++0+0734 <[^>]*> nop
++0+0738 <[^>]*> nop
++0+073c <[^>]*> nop
++0+0740 <[^>]*> nop
++0+0744 <[^>]*> nop
++0+0748 <[^>]*> nop
++0+074c <[^>]*> nop
++0+0750 <[^>]*> nop
++0+0754 <[^>]*> nop
++0+0758 <[^>]*> nop
++0+075c <[^>]*> nop
++0+0760 <[^>]*> nop
++0+0764 <[^>]*> nop
++0+0768 <[^>]*> nop
++0+076c <[^>]*> nop
++0+0770 <[^>]*> nop
++0+0774 <[^>]*> nop
++0+0778 <[^>]*> nop
++0+077c <[^>]*> nop
++0+0780 <[^>]*> nop
++0+0784 <[^>]*> nop
++0+0788 <[^>]*> nop
++0+078c <[^>]*> nop
++0+0790 <[^>]*> nop
++0+0794 <[^>]*> nop
++0+0798 <[^>]*> nop
++0+079c <[^>]*> nop
++0+07a0 <[^>]*> nop
++0+07a4 <[^>]*> nop
++0+07a8 <[^>]*> nop
++0+07ac <[^>]*> nop
++0+07b0 <[^>]*> nop
++0+07b4 <[^>]*> nop
++0+07b8 <[^>]*> nop
++0+07bc <[^>]*> nop
++0+07c0 <[^>]*> nop
++0+07c4 <[^>]*> nop
++0+07c8 <[^>]*> nop
++0+07cc <[^>]*> nop
++0+07d0 <[^>]*> nop
++0+07d4 <[^>]*> nop
++0+07d8 <[^>]*> nop
++0+07dc <[^>]*> nop
++0+07e0 <[^>]*> nop
++0+07e4 <[^>]*> nop
++0+07e8 <[^>]*> nop
++0+07ec <[^>]*> nop
++0+07f0 <[^>]*> nop
++0+07f4 <[^>]*> nop
++0+07f8 <[^>]*> nop
++0+07fc <[^>]*> nop
++0+0800 <[^>]*> nop
++0+0804 <[^>]*> nop
++0+0808 <[^>]*> nop
++0+080c <[^>]*> nop
++0+0810 <[^>]*> nop
++0+0814 <[^>]*> nop
++0+0818 <[^>]*> nop
++0+081c <[^>]*> nop
++0+0820 <[^>]*> nop
++0+0824 <[^>]*> nop
++0+0828 <[^>]*> nop
++0+082c <[^>]*> nop
++0+0830 <[^>]*> nop
++0+0834 <[^>]*> nop
++0+0838 <[^>]*> nop
++0+083c <[^>]*> nop
++0+0840 <[^>]*> nop
++0+0844 <[^>]*> nop
++0+0848 <[^>]*> nop
++0+084c <[^>]*> nop
++0+0850 <[^>]*> nop
++0+0854 <[^>]*> nop
++0+0858 <[^>]*> nop
++0+085c <[^>]*> nop
++0+0860 <[^>]*> nop
++0+0864 <[^>]*> nop
++0+0868 <[^>]*> nop
++0+086c <[^>]*> nop
++0+0870 <[^>]*> nop
++0+0874 <[^>]*> nop
++0+0878 <[^>]*> nop
++0+087c <[^>]*> nop
++0+0880 <[^>]*> nop
++0+0884 <[^>]*> nop
++0+0888 <[^>]*> nop
++0+088c <[^>]*> nop
++0+0890 <[^>]*> nop
++0+0894 <[^>]*> nop
++0+0898 <[^>]*> nop
++0+089c <[^>]*> nop
++0+08a0 <[^>]*> nop
++0+08a4 <[^>]*> nop
++0+08a8 <[^>]*> nop
++0+08ac <[^>]*> nop
++0+08b0 <[^>]*> nop
++0+08b4 <[^>]*> nop
++0+08b8 <[^>]*> nop
++0+08bc <[^>]*> nop
++0+08c0 <[^>]*> nop
++0+08c4 <[^>]*> nop
++0+08c8 <[^>]*> nop
++0+08cc <[^>]*> nop
++0+08d0 <[^>]*> nop
++0+08d4 <[^>]*> nop
++0+08d8 <[^>]*> nop
++0+08dc <[^>]*> nop
++0+08e0 <[^>]*> nop
++0+08e4 <[^>]*> nop
++0+08e8 <[^>]*> nop
++0+08ec <[^>]*> nop
++0+08f0 <[^>]*> nop
++0+08f4 <[^>]*> nop
++0+08f8 <[^>]*> nop
++0+08fc <[^>]*> nop
++0+0900 <[^>]*> nop
++0+0904 <[^>]*> nop
++0+0908 <[^>]*> nop
++0+090c <[^>]*> nop
++0+0910 <[^>]*> nop
++0+0914 <[^>]*> nop
++0+0918 <[^>]*> nop
++0+091c <[^>]*> nop
++0+0920 <[^>]*> nop
++0+0924 <[^>]*> nop
++0+0928 <[^>]*> nop
++0+092c <[^>]*> nop
++0+0930 <[^>]*> nop
++0+0934 <[^>]*> nop
++0+0938 <[^>]*> nop
++0+093c <[^>]*> nop
++0+0940 <[^>]*> nop
++0+0944 <[^>]*> nop
++0+0948 <[^>]*> nop
++0+094c <[^>]*> nop
++0+0950 <[^>]*> nop
++0+0954 <[^>]*> nop
++0+0958 <[^>]*> nop
++0+095c <[^>]*> nop
++0+0960 <[^>]*> nop
++0+0964 <[^>]*> nop
++0+0968 <[^>]*> nop
++0+096c <[^>]*> nop
++0+0970 <[^>]*> nop
++0+0974 <[^>]*> nop
++0+0978 <[^>]*> nop
++0+097c <[^>]*> nop
++0+0980 <[^>]*> nop
++0+0984 <[^>]*> nop
++0+0988 <[^>]*> nop
++0+098c <[^>]*> nop
++0+0990 <[^>]*> nop
++0+0994 <[^>]*> nop
++0+0998 <[^>]*> nop
++0+099c <[^>]*> nop
++0+09a0 <[^>]*> nop
++0+09a4 <[^>]*> nop
++0+09a8 <[^>]*> nop
++0+09ac <[^>]*> nop
++0+09b0 <[^>]*> nop
++0+09b4 <[^>]*> nop
++0+09b8 <[^>]*> nop
++0+09bc <[^>]*> nop
++0+09c0 <[^>]*> nop
++0+09c4 <[^>]*> nop
++0+09c8 <[^>]*> nop
++0+09cc <[^>]*> nop
++0+09d0 <[^>]*> nop
++0+09d4 <[^>]*> nop
++0+09d8 <[^>]*> nop
++0+09dc <[^>]*> nop
++0+09e0 <[^>]*> nop
++0+09e4 <[^>]*> nop
++0+09e8 <[^>]*> nop
++0+09ec <[^>]*> nop
++0+09f0 <[^>]*> nop
++0+09f4 <[^>]*> nop
++0+09f8 <[^>]*> nop
++0+09fc <[^>]*> nop
++0+0a00 <[^>]*> nop
++0+0a04 <[^>]*> nop
++0+0a08 <[^>]*> nop
++0+0a0c <[^>]*> nop
++0+0a10 <[^>]*> nop
++0+0a14 <[^>]*> nop
++0+0a18 <[^>]*> nop
++0+0a1c <[^>]*> nop
++0+0a20 <[^>]*> nop
++0+0a24 <[^>]*> nop
++0+0a28 <[^>]*> nop
++0+0a2c <[^>]*> nop
++0+0a30 <[^>]*> nop
++0+0a34 <[^>]*> nop
++0+0a38 <[^>]*> nop
++0+0a3c <[^>]*> nop
++0+0a40 <[^>]*> nop
++0+0a44 <[^>]*> nop
++0+0a48 <[^>]*> nop
++0+0a4c <[^>]*> nop
++0+0a50 <[^>]*> nop
++0+0a54 <[^>]*> nop
++0+0a58 <[^>]*> nop
++0+0a5c <[^>]*> nop
++0+0a60 <[^>]*> nop
++0+0a64 <[^>]*> nop
++0+0a68 <[^>]*> nop
++0+0a6c <[^>]*> nop
++0+0a70 <[^>]*> nop
++0+0a74 <[^>]*> nop
++0+0a78 <[^>]*> nop
++0+0a7c <[^>]*> nop
++0+0a80 <[^>]*> nop
++0+0a84 <[^>]*> nop
++0+0a88 <[^>]*> nop
++0+0a8c <[^>]*> nop
++0+0a90 <[^>]*> nop
++0+0a94 <[^>]*> nop
++0+0a98 <[^>]*> nop
++0+0a9c <[^>]*> nop
++0+0aa0 <[^>]*> nop
++0+0aa4 <[^>]*> nop
++0+0aa8 <[^>]*> nop
++0+0aac <[^>]*> nop
++0+0ab0 <[^>]*> nop
++0+0ab4 <[^>]*> nop
++0+0ab8 <[^>]*> nop
++0+0abc <[^>]*> nop
++0+0ac0 <[^>]*> nop
++0+0ac4 <[^>]*> nop
++0+0ac8 <[^>]*> nop
++0+0acc <[^>]*> nop
++0+0ad0 <[^>]*> nop
++0+0ad4 <[^>]*> nop
++0+0ad8 <[^>]*> nop
++0+0adc <[^>]*> nop
++0+0ae0 <[^>]*> nop
++0+0ae4 <[^>]*> nop
++0+0ae8 <[^>]*> nop
++0+0aec <[^>]*> nop
++0+0af0 <[^>]*> nop
++0+0af4 <[^>]*> nop
++0+0af8 <[^>]*> nop
++0+0afc <[^>]*> nop
++0+0b00 <[^>]*> nop
++0+0b04 <[^>]*> nop
++0+0b08 <[^>]*> nop
++0+0b0c <[^>]*> nop
++0+0b10 <[^>]*> nop
++0+0b14 <[^>]*> nop
++0+0b18 <[^>]*> nop
++0+0b1c <[^>]*> nop
++0+0b20 <[^>]*> nop
++0+0b24 <[^>]*> nop
++0+0b28 <[^>]*> nop
++0+0b2c <[^>]*> nop
++0+0b30 <[^>]*> nop
++0+0b34 <[^>]*> nop
++0+0b38 <[^>]*> nop
++0+0b3c <[^>]*> nop
++0+0b40 <[^>]*> nop
++0+0b44 <[^>]*> nop
++0+0b48 <[^>]*> nop
++0+0b4c <[^>]*> nop
++0+0b50 <[^>]*> nop
++0+0b54 <[^>]*> nop
++0+0b58 <[^>]*> nop
++0+0b5c <[^>]*> nop
++0+0b60 <[^>]*> nop
++0+0b64 <[^>]*> nop
++0+0b68 <[^>]*> nop
++0+0b6c <[^>]*> nop
++0+0b70 <[^>]*> nop
++0+0b74 <[^>]*> nop
++0+0b78 <[^>]*> nop
++0+0b7c <[^>]*> nop
++0+0b80 <[^>]*> nop
++0+0b84 <[^>]*> nop
++0+0b88 <[^>]*> nop
++0+0b8c <[^>]*> nop
++0+0b90 <[^>]*> nop
++0+0b94 <[^>]*> nop
++0+0b98 <[^>]*> nop
++0+0b9c <[^>]*> nop
++0+0ba0 <[^>]*> nop
++0+0ba4 <[^>]*> nop
++0+0ba8 <[^>]*> nop
++0+0bac <[^>]*> nop
++0+0bb0 <[^>]*> nop
++0+0bb4 <[^>]*> nop
++0+0bb8 <[^>]*> nop
++0+0bbc <[^>]*> nop
++0+0bc0 <[^>]*> nop
++0+0bc4 <[^>]*> nop
++0+0bc8 <[^>]*> nop
++0+0bcc <[^>]*> nop
++0+0bd0 <[^>]*> nop
++0+0bd4 <[^>]*> nop
++0+0bd8 <[^>]*> nop
++0+0bdc <[^>]*> nop
++0+0be0 <[^>]*> nop
++0+0be4 <[^>]*> nop
++0+0be8 <[^>]*> nop
++0+0bec <[^>]*> nop
++0+0bf0 <[^>]*> nop
++0+0bf4 <[^>]*> nop
++0+0bf8 <[^>]*> nop
++0+0bfc <[^>]*> nop
++0+0c00 <[^>]*> nop
++0+0c04 <[^>]*> nop
++0+0c08 <[^>]*> nop
++0+0c0c <[^>]*> nop
++0+0c10 <[^>]*> nop
++0+0c14 <[^>]*> nop
++0+0c18 <[^>]*> nop
++0+0c1c <[^>]*> nop
++0+0c20 <[^>]*> nop
++0+0c24 <[^>]*> nop
++0+0c28 <[^>]*> nop
++0+0c2c <[^>]*> nop
++0+0c30 <[^>]*> nop
++0+0c34 <[^>]*> nop
++0+0c38 <[^>]*> nop
++0+0c3c <[^>]*> nop
++0+0c40 <[^>]*> nop
++0+0c44 <[^>]*> nop
++0+0c48 <[^>]*> nop
++0+0c4c <[^>]*> nop
++0+0c50 <[^>]*> nop
++0+0c54 <[^>]*> nop
++0+0c58 <[^>]*> nop
++0+0c5c <[^>]*> nop
++0+0c60 <[^>]*> nop
++0+0c64 <[^>]*> nop
++0+0c68 <[^>]*> nop
++0+0c6c <[^>]*> nop
++0+0c70 <[^>]*> nop
++0+0c74 <[^>]*> nop
++0+0c78 <[^>]*> nop
++0+0c7c <[^>]*> nop
++0+0c80 <[^>]*> nop
++0+0c84 <[^>]*> nop
++0+0c88 <[^>]*> nop
++0+0c8c <[^>]*> nop
++0+0c90 <[^>]*> nop
++0+0c94 <[^>]*> nop
++0+0c98 <[^>]*> nop
++0+0c9c <[^>]*> nop
++0+0ca0 <[^>]*> nop
++0+0ca4 <[^>]*> nop
++0+0ca8 <[^>]*> nop
++0+0cac <[^>]*> nop
++0+0cb0 <[^>]*> nop
++0+0cb4 <[^>]*> nop
++0+0cb8 <[^>]*> nop
++0+0cbc <[^>]*> nop
++0+0cc0 <[^>]*> nop
++0+0cc4 <[^>]*> nop
++0+0cc8 <[^>]*> nop
++0+0ccc <[^>]*> nop
++0+0cd0 <[^>]*> nop
++0+0cd4 <[^>]*> nop
++0+0cd8 <[^>]*> nop
++0+0cdc <[^>]*> nop
++0+0ce0 <[^>]*> nop
++0+0ce4 <[^>]*> nop
++0+0ce8 <[^>]*> nop
++0+0cec <[^>]*> nop
++0+0cf0 <[^>]*> nop
++0+0cf4 <[^>]*> nop
++0+0cf8 <[^>]*> nop
++0+0cfc <[^>]*> nop
++0+0d00 <[^>]*> nop
++0+0d04 <[^>]*> nop
++0+0d08 <[^>]*> nop
++0+0d0c <[^>]*> nop
++0+0d10 <[^>]*> nop
++0+0d14 <[^>]*> nop
++0+0d18 <[^>]*> nop
++0+0d1c <[^>]*> nop
++0+0d20 <[^>]*> nop
++0+0d24 <[^>]*> nop
++0+0d28 <[^>]*> nop
++0+0d2c <[^>]*> nop
++0+0d30 <[^>]*> nop
++0+0d34 <[^>]*> nop
++0+0d38 <[^>]*> nop
++0+0d3c <[^>]*> nop
++0+0d40 <[^>]*> nop
++0+0d44 <[^>]*> nop
++0+0d48 <[^>]*> nop
++0+0d4c <[^>]*> nop
++0+0d50 <[^>]*> nop
++0+0d54 <[^>]*> nop
++0+0d58 <[^>]*> nop
++0+0d5c <[^>]*> nop
++0+0d60 <[^>]*> nop
++0+0d64 <[^>]*> nop
++0+0d68 <[^>]*> nop
++0+0d6c <[^>]*> nop
++0+0d70 <[^>]*> nop
++0+0d74 <[^>]*> nop
++0+0d78 <[^>]*> nop
++0+0d7c <[^>]*> nop
++0+0d80 <[^>]*> nop
++0+0d84 <[^>]*> nop
++0+0d88 <[^>]*> nop
++0+0d8c <[^>]*> nop
++0+0d90 <[^>]*> nop
++0+0d94 <[^>]*> nop
++0+0d98 <[^>]*> nop
++0+0d9c <[^>]*> nop
++0+0da0 <[^>]*> nop
++0+0da4 <[^>]*> nop
++0+0da8 <[^>]*> nop
++0+0dac <[^>]*> nop
++0+0db0 <[^>]*> nop
++0+0db4 <[^>]*> nop
++0+0db8 <[^>]*> nop
++0+0dbc <[^>]*> nop
++0+0dc0 <[^>]*> nop
++0+0dc4 <[^>]*> nop
++0+0dc8 <[^>]*> nop
++0+0dcc <[^>]*> nop
++0+0dd0 <[^>]*> nop
++0+0dd4 <[^>]*> nop
++0+0dd8 <[^>]*> nop
++0+0ddc <[^>]*> nop
++0+0de0 <[^>]*> nop
++0+0de4 <[^>]*> nop
++0+0de8 <[^>]*> nop
++0+0dec <[^>]*> nop
++0+0df0 <[^>]*> nop
++0+0df4 <[^>]*> nop
++0+0df8 <[^>]*> nop
++0+0dfc <[^>]*> nop
++0+0e00 <[^>]*> nop
++0+0e04 <[^>]*> nop
++0+0e08 <[^>]*> nop
++0+0e0c <[^>]*> nop
++0+0e10 <[^>]*> nop
++0+0e14 <[^>]*> nop
++0+0e18 <[^>]*> nop
++0+0e1c <[^>]*> nop
++0+0e20 <[^>]*> nop
++0+0e24 <[^>]*> nop
++0+0e28 <[^>]*> nop
++0+0e2c <[^>]*> nop
++0+0e30 <[^>]*> nop
++0+0e34 <[^>]*> nop
++0+0e38 <[^>]*> nop
++0+0e3c <[^>]*> nop
++0+0e40 <[^>]*> nop
++0+0e44 <[^>]*> nop
++0+0e48 <[^>]*> nop
++0+0e4c <[^>]*> nop
++0+0e50 <[^>]*> nop
++0+0e54 <[^>]*> nop
++0+0e58 <[^>]*> nop
++0+0e5c <[^>]*> nop
++0+0e60 <[^>]*> nop
++0+0e64 <[^>]*> nop
++0+0e68 <[^>]*> nop
++0+0e6c <[^>]*> nop
++0+0e70 <[^>]*> nop
++0+0e74 <[^>]*> nop
++0+0e78 <[^>]*> nop
++0+0e7c <[^>]*> nop
++0+0e80 <[^>]*> nop
++0+0e84 <[^>]*> nop
++0+0e88 <[^>]*> nop
++0+0e8c <[^>]*> nop
++0+0e90 <[^>]*> nop
++0+0e94 <[^>]*> nop
++0+0e98 <[^>]*> nop
++0+0e9c <[^>]*> nop
++0+0ea0 <[^>]*> nop
++0+0ea4 <[^>]*> nop
++0+0ea8 <[^>]*> nop
++0+0eac <[^>]*> nop
++0+0eb0 <[^>]*> nop
++0+0eb4 <[^>]*> nop
++0+0eb8 <[^>]*> nop
++0+0ebc <[^>]*> nop
++0+0ec0 <[^>]*> nop
++0+0ec4 <[^>]*> nop
++0+0ec8 <[^>]*> nop
++0+0ecc <[^>]*> nop
++0+0ed0 <[^>]*> nop
++0+0ed4 <[^>]*> nop
++0+0ed8 <[^>]*> nop
++0+0edc <[^>]*> nop
++0+0ee0 <[^>]*> nop
++0+0ee4 <[^>]*> nop
++0+0ee8 <[^>]*> nop
++0+0eec <[^>]*> nop
++0+0ef0 <[^>]*> nop
++0+0ef4 <[^>]*> nop
++0+0ef8 <[^>]*> nop
++0+0efc <[^>]*> nop
++0+0f00 <[^>]*> nop
++0+0f04 <[^>]*> nop
++0+0f08 <[^>]*> nop
++0+0f0c <[^>]*> nop
++0+0f10 <[^>]*> nop
++0+0f14 <[^>]*> nop
++0+0f18 <[^>]*> nop
++0+0f1c <[^>]*> nop
++0+0f20 <[^>]*> nop
++0+0f24 <[^>]*> nop
++0+0f28 <[^>]*> nop
++0+0f2c <[^>]*> nop
++0+0f30 <[^>]*> nop
++0+0f34 <[^>]*> nop
++0+0f38 <[^>]*> nop
++0+0f3c <[^>]*> nop
++0+0f40 <[^>]*> nop
++0+0f44 <[^>]*> nop
++0+0f48 <[^>]*> nop
++0+0f4c <[^>]*> nop
++0+0f50 <[^>]*> nop
++0+0f54 <[^>]*> nop
++0+0f58 <[^>]*> nop
++0+0f5c <[^>]*> nop
++0+0f60 <[^>]*> nop
++0+0f64 <[^>]*> nop
++0+0f68 <[^>]*> nop
++0+0f6c <[^>]*> nop
++0+0f70 <[^>]*> nop
++0+0f74 <[^>]*> nop
++0+0f78 <[^>]*> nop
++0+0f7c <[^>]*> nop
++0+0f80 <[^>]*> nop
++0+0f84 <[^>]*> nop
++0+0f88 <[^>]*> nop
++0+0f8c <[^>]*> nop
++0+0f90 <[^>]*> nop
++0+0f94 <[^>]*> nop
++0+0f98 <[^>]*> nop
++0+0f9c <[^>]*> nop
++0+0fa0 <[^>]*> nop
++0+0fa4 <[^>]*> nop
++0+0fa8 <[^>]*> nop
++0+0fac <[^>]*> nop
++0+0fb0 <[^>]*> nop
++0+0fb4 <[^>]*> nop
++0+0fb8 <[^>]*> nop
++0+0fbc <[^>]*> nop
++0+0fc0 <[^>]*> nop
++0+0fc4 <[^>]*> nop
++0+0fc8 <[^>]*> nop
++0+0fcc <[^>]*> nop
++0+0fd0 <[^>]*> nop
++0+0fd4 <[^>]*> nop
++0+0fd8 <[^>]*> nop
++0+0fdc <[^>]*> nop
++0+0fe0 <[^>]*> nop
++0+0fe4 <[^>]*> nop
++0+0fe8 <[^>]*> nop
++0+0fec <[^>]*> nop
++0+0ff0 <[^>]*> nop
++0+0ff4 <[^>]*> nop
++0+0ff8 <[^>]*> nop
++0+0ffc <[^>]*> nop
++0+1000 <[^>]*> nop
++0+1004 <[^>]*> nop
++0+1008 <[^>]*> nop
++0+100c <[^>]*> nop
++0+1010 <[^>]*> nop
++0+1014 <[^>]*> nop
++0+1018 <[^>]*> nop
++0+101c <[^>]*> nop
++0+1020 <[^>]*> nop
++0+1024 <[^>]*> nop
++0+1028 <[^>]*> nop
++0+102c <[^>]*> nop
++0+1030 <[^>]*> nop
++0+1034 <[^>]*> nop
++0+1038 <[^>]*> nop
++0+103c <[^>]*> nop
++0+1040 <[^>]*> nop
++0+1044 <[^>]*> nop
++0+1048 <[^>]*> nop
++0+104c <[^>]*> nop
++0+1050 <[^>]*> nop
++0+1054 <[^>]*> nop
++0+1058 <[^>]*> nop
++0+105c <[^>]*> nop
++0+1060 <[^>]*> nop
++0+1064 <[^>]*> nop
++0+1068 <[^>]*> nop
++0+106c <[^>]*> nop
++0+1070 <[^>]*> nop
++0+1074 <[^>]*> nop
++0+1078 <[^>]*> nop
++0+107c <[^>]*> nop
++0+1080 <[^>]*> nop
++0+1084 <[^>]*> nop
++0+1088 <[^>]*> nop
++0+108c <[^>]*> nop
++0+1090 <[^>]*> nop
++0+1094 <[^>]*> nop
++0+1098 <[^>]*> nop
++0+109c <[^>]*> nop
++0+10a0 <[^>]*> nop
++0+10a4 <[^>]*> nop
++0+10a8 <[^>]*> nop
++0+10ac <[^>]*> nop
++0+10b0 <[^>]*> nop
++0+10b4 <[^>]*> nop
++0+10b8 <[^>]*> nop
++0+10bc <[^>]*> nop
++0+10c0 <[^>]*> nop
++0+10c4 <[^>]*> nop
++0+10c8 <[^>]*> nop
++0+10cc <[^>]*> nop
++0+10d0 <[^>]*> nop
++0+10d4 <[^>]*> nop
++0+10d8 <[^>]*> nop
++0+10dc <[^>]*> nop
++0+10e0 <[^>]*> nop
++0+10e4 <[^>]*> nop
++0+10e8 <[^>]*> nop
++0+10ec <[^>]*> nop
++0+10f0 <[^>]*> nop
++0+10f4 <[^>]*> nop
++0+10f8 <[^>]*> nop
++0+10fc <[^>]*> nop
++0+1100 <[^>]*> nop
++0+1104 <[^>]*> nop
++0+1108 <[^>]*> nop
++0+110c <[^>]*> nop
++0+1110 <[^>]*> nop
++0+1114 <[^>]*> nop
++0+1118 <[^>]*> nop
++0+111c <[^>]*> nop
++0+1120 <[^>]*> nop
++0+1124 <[^>]*> nop
++0+1128 <[^>]*> nop
++0+112c <[^>]*> nop
++0+1130 <[^>]*> nop
++0+1134 <[^>]*> nop
++0+1138 <[^>]*> nop
++0+113c <[^>]*> nop
++0+1140 <[^>]*> nop
++0+1144 <[^>]*> nop
++0+1148 <[^>]*> nop
++0+114c <[^>]*> nop
++0+1150 <[^>]*> nop
++0+1154 <[^>]*> nop
++0+1158 <[^>]*> nop
++0+115c <[^>]*> nop
++0+1160 <[^>]*> nop
++0+1164 <[^>]*> nop
++0+1168 <[^>]*> nop
++0+116c <[^>]*> nop
++0+1170 <[^>]*> nop
++0+1174 <[^>]*> nop
++0+1178 <[^>]*> nop
++0+117c <[^>]*> nop
++0+1180 <[^>]*> nop
++0+1184 <[^>]*> nop
++0+1188 <[^>]*> nop
++0+118c <[^>]*> nop
++0+1190 <[^>]*> nop
++0+1194 <[^>]*> nop
++0+1198 <[^>]*> nop
++0+119c <[^>]*> nop
++0+11a0 <[^>]*> nop
++0+11a4 <[^>]*> nop
++0+11a8 <[^>]*> nop
++0+11ac <[^>]*> nop
++0+11b0 <[^>]*> nop
++0+11b4 <[^>]*> nop
++0+11b8 <[^>]*> nop
++0+11bc <[^>]*> nop
++0+11c0 <[^>]*> nop
++0+11c4 <[^>]*> nop
++0+11c8 <[^>]*> nop
++0+11cc <[^>]*> nop
++0+11d0 <[^>]*> nop
++0+11d4 <[^>]*> nop
++0+11d8 <[^>]*> nop
++0+11dc <[^>]*> nop
++0+11e0 <[^>]*> nop
++0+11e4 <[^>]*> nop
++0+11e8 <[^>]*> nop
++0+11ec <[^>]*> nop
++0+11f0 <[^>]*> nop
++0+11f4 <[^>]*> nop
++0+11f8 <[^>]*> nop
++0+11fc <[^>]*> nop
++0+1200 <[^>]*> nop
++0+1204 <[^>]*> nop
++0+1208 <[^>]*> nop
++0+120c <[^>]*> nop
++0+1210 <[^>]*> nop
++0+1214 <[^>]*> nop
++0+1218 <[^>]*> nop
++0+121c <[^>]*> nop
++0+1220 <[^>]*> nop
++0+1224 <[^>]*> nop
++0+1228 <[^>]*> nop
++0+122c <[^>]*> nop
++0+1230 <[^>]*> nop
++0+1234 <[^>]*> nop
++0+1238 <[^>]*> nop
++0+123c <[^>]*> nop
++0+1240 <[^>]*> nop
++0+1244 <[^>]*> nop
++0+1248 <[^>]*> nop
++0+124c <[^>]*> nop
++0+1250 <[^>]*> nop
++0+1254 <[^>]*> nop
++0+1258 <[^>]*> nop
++0+125c <[^>]*> nop
++0+1260 <[^>]*> nop
++0+1264 <[^>]*> nop
++0+1268 <[^>]*> nop
++0+126c <[^>]*> nop
++0+1270 <[^>]*> nop
++0+1274 <[^>]*> nop
++0+1278 <[^>]*> nop
++0+127c <[^>]*> nop
++0+1280 <[^>]*> nop
++0+1284 <[^>]*> nop
++0+1288 <[^>]*> nop
++0+128c <[^>]*> nop
++0+1290 <[^>]*> nop
++0+1294 <[^>]*> nop
++0+1298 <[^>]*> nop
++0+129c <[^>]*> nop
++0+12a0 <[^>]*> nop
++0+12a4 <[^>]*> nop
++0+12a8 <[^>]*> nop
++0+12ac <[^>]*> nop
++0+12b0 <[^>]*> nop
++0+12b4 <[^>]*> nop
++0+12b8 <[^>]*> nop
++0+12bc <[^>]*> nop
++0+12c0 <[^>]*> nop
++0+12c4 <[^>]*> nop
++0+12c8 <[^>]*> nop
++0+12cc <[^>]*> nop
++0+12d0 <[^>]*> nop
++0+12d4 <[^>]*> nop
++0+12d8 <[^>]*> nop
++0+12dc <[^>]*> nop
++0+12e0 <[^>]*> nop
++0+12e4 <[^>]*> nop
++0+12e8 <[^>]*> nop
++0+12ec <[^>]*> nop
++0+12f0 <[^>]*> nop
++0+12f4 <[^>]*> nop
++0+12f8 <[^>]*> nop
++0+12fc <[^>]*> nop
++0+1300 <[^>]*> nop
++0+1304 <[^>]*> nop
++0+1308 <[^>]*> nop
++0+130c <[^>]*> nop
++0+1310 <[^>]*> nop
++0+1314 <[^>]*> nop
++0+1318 <[^>]*> nop
++0+131c <[^>]*> nop
++0+1320 <[^>]*> nop
++0+1324 <[^>]*> nop
++0+1328 <[^>]*> nop
++0+132c <[^>]*> nop
++0+1330 <[^>]*> nop
++0+1334 <[^>]*> nop
++0+1338 <[^>]*> nop
++0+133c <[^>]*> nop
++0+1340 <[^>]*> nop
++0+1344 <[^>]*> nop
++0+1348 <[^>]*> nop
++0+134c <[^>]*> nop
++0+1350 <[^>]*> nop
++0+1354 <[^>]*> nop
++0+1358 <[^>]*> nop
++0+135c <[^>]*> nop
++0+1360 <[^>]*> nop
++0+1364 <[^>]*> nop
++0+1368 <[^>]*> nop
++0+136c <[^>]*> nop
++0+1370 <[^>]*> nop
++0+1374 <[^>]*> nop
++0+1378 <[^>]*> nop
++0+137c <[^>]*> nop
++0+1380 <[^>]*> nop
++0+1384 <[^>]*> nop
++0+1388 <[^>]*> nop
++0+138c <[^>]*> nop
++0+1390 <[^>]*> nop
++0+1394 <[^>]*> nop
++0+1398 <[^>]*> nop
++0+139c <[^>]*> nop
++0+13a0 <[^>]*> nop
++0+13a4 <[^>]*> nop
++0+13a8 <[^>]*> nop
++0+13ac <[^>]*> nop
++0+13b0 <[^>]*> nop
++0+13b4 <[^>]*> nop
++0+13b8 <[^>]*> nop
++0+13bc <[^>]*> nop
++0+13c0 <[^>]*> nop
++0+13c4 <[^>]*> nop
++0+13c8 <[^>]*> nop
++0+13cc <[^>]*> nop
++0+13d0 <[^>]*> nop
++0+13d4 <[^>]*> nop
++0+13d8 <[^>]*> nop
++0+13dc <[^>]*> nop
++0+13e0 <[^>]*> nop
++0+13e4 <[^>]*> nop
++0+13e8 <[^>]*> nop
++0+13ec <[^>]*> nop
++0+13f0 <[^>]*> nop
++0+13f4 <[^>]*> nop
++0+13f8 <[^>]*> nop
++0+13fc <[^>]*> nop
++0+1400 <[^>]*> nop
++0+1404 <[^>]*> nop
++0+1408 <[^>]*> nop
++0+140c <[^>]*> nop
++0+1410 <[^>]*> nop
++0+1414 <[^>]*> nop
++0+1418 <[^>]*> nop
++0+141c <[^>]*> nop
++0+1420 <[^>]*> nop
++0+1424 <[^>]*> nop
++0+1428 <[^>]*> nop
++0+142c <[^>]*> nop
++0+1430 <[^>]*> nop
++0+1434 <[^>]*> nop
++0+1438 <[^>]*> nop
++0+143c <[^>]*> nop
++0+1440 <[^>]*> nop
++0+1444 <[^>]*> nop
++0+1448 <[^>]*> nop
++0+144c <[^>]*> nop
++0+1450 <[^>]*> nop
++0+1454 <[^>]*> nop
++0+1458 <[^>]*> nop
++0+145c <[^>]*> nop
++0+1460 <[^>]*> nop
++0+1464 <[^>]*> nop
++0+1468 <[^>]*> nop
++0+146c <[^>]*> nop
++0+1470 <[^>]*> nop
++0+1474 <[^>]*> nop
++0+1478 <[^>]*> nop
++0+147c <[^>]*> nop
++0+1480 <[^>]*> nop
++0+1484 <[^>]*> nop
++0+1488 <[^>]*> nop
++0+148c <[^>]*> nop
++0+1490 <[^>]*> nop
++0+1494 <[^>]*> nop
++0+1498 <[^>]*> nop
++0+149c <[^>]*> nop
++0+14a0 <[^>]*> nop
++0+14a4 <[^>]*> nop
++0+14a8 <[^>]*> nop
++0+14ac <[^>]*> nop
++0+14b0 <[^>]*> nop
++0+14b4 <[^>]*> nop
++0+14b8 <[^>]*> nop
++0+14bc <[^>]*> nop
++0+14c0 <[^>]*> nop
++0+14c4 <[^>]*> nop
++0+14c8 <[^>]*> nop
++0+14cc <[^>]*> nop
++0+14d0 <[^>]*> nop
++0+14d4 <[^>]*> nop
++0+14d8 <[^>]*> nop
++0+14dc <[^>]*> nop
++0+14e0 <[^>]*> nop
++0+14e4 <[^>]*> nop
++0+14e8 <[^>]*> nop
++0+14ec <[^>]*> nop
++0+14f0 <[^>]*> nop
++0+14f4 <[^>]*> nop
++0+14f8 <[^>]*> nop
++0+14fc <[^>]*> nop
++0+1500 <[^>]*> nop
++0+1504 <[^>]*> nop
++0+1508 <[^>]*> nop
++0+150c <[^>]*> nop
++0+1510 <[^>]*> nop
++0+1514 <[^>]*> nop
++0+1518 <[^>]*> nop
++0+151c <[^>]*> nop
++0+1520 <[^>]*> nop
++0+1524 <[^>]*> nop
++0+1528 <[^>]*> nop
++0+152c <[^>]*> nop
++0+1530 <[^>]*> nop
++0+1534 <[^>]*> nop
++0+1538 <[^>]*> nop
++0+153c <[^>]*> nop
++0+1540 <[^>]*> nop
++0+1544 <[^>]*> nop
++0+1548 <[^>]*> nop
++0+154c <[^>]*> nop
++0+1550 <[^>]*> nop
++0+1554 <[^>]*> nop
++0+1558 <[^>]*> nop
++0+155c <[^>]*> nop
++0+1560 <[^>]*> nop
++0+1564 <[^>]*> nop
++0+1568 <[^>]*> nop
++0+156c <[^>]*> nop
++0+1570 <[^>]*> nop
++0+1574 <[^>]*> nop
++0+1578 <[^>]*> nop
++0+157c <[^>]*> nop
++0+1580 <[^>]*> nop
++0+1584 <[^>]*> nop
++0+1588 <[^>]*> nop
++0+158c <[^>]*> nop
++0+1590 <[^>]*> nop
++0+1594 <[^>]*> nop
++0+1598 <[^>]*> nop
++0+159c <[^>]*> nop
++0+15a0 <[^>]*> nop
++0+15a4 <[^>]*> nop
++0+15a8 <[^>]*> nop
++0+15ac <[^>]*> nop
++0+15b0 <[^>]*> nop
++0+15b4 <[^>]*> nop
++0+15b8 <[^>]*> nop
++0+15bc <[^>]*> nop
++0+15c0 <[^>]*> nop
++0+15c4 <[^>]*> nop
++0+15c8 <[^>]*> nop
++0+15cc <[^>]*> nop
++0+15d0 <[^>]*> nop
++0+15d4 <[^>]*> nop
++0+15d8 <[^>]*> nop
++0+15dc <[^>]*> nop
++0+15e0 <[^>]*> nop
++0+15e4 <[^>]*> nop
++0+15e8 <[^>]*> nop
++0+15ec <[^>]*> nop
++0+15f0 <[^>]*> nop
++0+15f4 <[^>]*> nop
++0+15f8 <[^>]*> nop
++0+15fc <[^>]*> nop
++0+1600 <[^>]*> nop
++0+1604 <[^>]*> nop
++0+1608 <[^>]*> nop
++0+160c <[^>]*> nop
++0+1610 <[^>]*> nop
++0+1614 <[^>]*> nop
++0+1618 <[^>]*> nop
++0+161c <[^>]*> nop
++0+1620 <[^>]*> nop
++0+1624 <[^>]*> nop
++0+1628 <[^>]*> nop
++0+162c <[^>]*> nop
++0+1630 <[^>]*> nop
++0+1634 <[^>]*> nop
++0+1638 <[^>]*> nop
++0+163c <[^>]*> nop
++0+1640 <[^>]*> nop
++0+1644 <[^>]*> nop
++0+1648 <[^>]*> nop
++0+164c <[^>]*> nop
++0+1650 <[^>]*> nop
++0+1654 <[^>]*> nop
++0+1658 <[^>]*> nop
++0+165c <[^>]*> nop
++0+1660 <[^>]*> nop
++0+1664 <[^>]*> nop
++0+1668 <[^>]*> nop
++0+166c <[^>]*> nop
++0+1670 <[^>]*> nop
++0+1674 <[^>]*> nop
++0+1678 <[^>]*> nop
++0+167c <[^>]*> nop
++0+1680 <[^>]*> nop
++0+1684 <[^>]*> nop
++0+1688 <[^>]*> nop
++0+168c <[^>]*> nop
++0+1690 <[^>]*> nop
++0+1694 <[^>]*> nop
++0+1698 <[^>]*> nop
++0+169c <[^>]*> nop
++0+16a0 <[^>]*> nop
++0+16a4 <[^>]*> nop
++0+16a8 <[^>]*> nop
++0+16ac <[^>]*> nop
++0+16b0 <[^>]*> nop
++0+16b4 <[^>]*> nop
++0+16b8 <[^>]*> nop
++0+16bc <[^>]*> nop
++0+16c0 <[^>]*> nop
++0+16c4 <[^>]*> nop
++0+16c8 <[^>]*> nop
++0+16cc <[^>]*> nop
++0+16d0 <[^>]*> nop
++0+16d4 <[^>]*> nop
++0+16d8 <[^>]*> nop
++0+16dc <[^>]*> nop
++0+16e0 <[^>]*> nop
++0+16e4 <[^>]*> nop
++0+16e8 <[^>]*> nop
++0+16ec <[^>]*> nop
++0+16f0 <[^>]*> nop
++0+16f4 <[^>]*> nop
++0+16f8 <[^>]*> nop
++0+16fc <[^>]*> nop
++0+1700 <[^>]*> nop
++0+1704 <[^>]*> nop
++0+1708 <[^>]*> nop
++0+170c <[^>]*> nop
++0+1710 <[^>]*> nop
++0+1714 <[^>]*> nop
++0+1718 <[^>]*> nop
++0+171c <[^>]*> nop
++0+1720 <[^>]*> nop
++0+1724 <[^>]*> nop
++0+1728 <[^>]*> nop
++0+172c <[^>]*> nop
++0+1730 <[^>]*> nop
++0+1734 <[^>]*> nop
++0+1738 <[^>]*> nop
++0+173c <[^>]*> nop
++0+1740 <[^>]*> nop
++0+1744 <[^>]*> nop
++0+1748 <[^>]*> nop
++0+174c <[^>]*> nop
++0+1750 <[^>]*> nop
++0+1754 <[^>]*> nop
++0+1758 <[^>]*> nop
++0+175c <[^>]*> nop
++0+1760 <[^>]*> nop
++0+1764 <[^>]*> nop
++0+1768 <[^>]*> nop
++0+176c <[^>]*> nop
++0+1770 <[^>]*> nop
++0+1774 <[^>]*> nop
++0+1778 <[^>]*> nop
++0+177c <[^>]*> nop
++0+1780 <[^>]*> nop
++0+1784 <[^>]*> nop
++0+1788 <[^>]*> nop
++0+178c <[^>]*> nop
++0+1790 <[^>]*> nop
++0+1794 <[^>]*> nop
++0+1798 <[^>]*> nop
++0+179c <[^>]*> nop
++0+17a0 <[^>]*> nop
++0+17a4 <[^>]*> nop
++0+17a8 <[^>]*> nop
++0+17ac <[^>]*> nop
++0+17b0 <[^>]*> nop
++0+17b4 <[^>]*> nop
++0+17b8 <[^>]*> nop
++0+17bc <[^>]*> nop
++0+17c0 <[^>]*> nop
++0+17c4 <[^>]*> nop
++0+17c8 <[^>]*> nop
++0+17cc <[^>]*> nop
++0+17d0 <[^>]*> nop
++0+17d4 <[^>]*> nop
++0+17d8 <[^>]*> nop
++0+17dc <[^>]*> nop
++0+17e0 <[^>]*> nop
++0+17e4 <[^>]*> nop
++0+17e8 <[^>]*> nop
++0+17ec <[^>]*> nop
++0+17f0 <[^>]*> nop
++0+17f4 <[^>]*> nop
++0+17f8 <[^>]*> nop
++0+17fc <[^>]*> nop
++0+1800 <[^>]*> nop
++0+1804 <[^>]*> nop
++0+1808 <[^>]*> nop
++0+180c <[^>]*> nop
++0+1810 <[^>]*> nop
++0+1814 <[^>]*> nop
++0+1818 <[^>]*> nop
++0+181c <[^>]*> nop
++0+1820 <[^>]*> nop
++0+1824 <[^>]*> nop
++0+1828 <[^>]*> nop
++0+182c <[^>]*> nop
++0+1830 <[^>]*> nop
++0+1834 <[^>]*> nop
++0+1838 <[^>]*> nop
++0+183c <[^>]*> nop
++0+1840 <[^>]*> nop
++0+1844 <[^>]*> nop
++0+1848 <[^>]*> nop
++0+184c <[^>]*> nop
++0+1850 <[^>]*> nop
++0+1854 <[^>]*> nop
++0+1858 <[^>]*> nop
++0+185c <[^>]*> nop
++0+1860 <[^>]*> nop
++0+1864 <[^>]*> nop
++0+1868 <[^>]*> nop
++0+186c <[^>]*> nop
++0+1870 <[^>]*> nop
++0+1874 <[^>]*> nop
++0+1878 <[^>]*> nop
++0+187c <[^>]*> nop
++0+1880 <[^>]*> nop
++0+1884 <[^>]*> nop
++0+1888 <[^>]*> nop
++0+188c <[^>]*> nop
++0+1890 <[^>]*> nop
++0+1894 <[^>]*> nop
++0+1898 <[^>]*> nop
++0+189c <[^>]*> nop
++0+18a0 <[^>]*> nop
++0+18a4 <[^>]*> nop
++0+18a8 <[^>]*> nop
++0+18ac <[^>]*> nop
++0+18b0 <[^>]*> nop
++0+18b4 <[^>]*> nop
++0+18b8 <[^>]*> nop
++0+18bc <[^>]*> nop
++0+18c0 <[^>]*> nop
++0+18c4 <[^>]*> nop
++0+18c8 <[^>]*> nop
++0+18cc <[^>]*> nop
++0+18d0 <[^>]*> nop
++0+18d4 <[^>]*> nop
++0+18d8 <[^>]*> nop
++0+18dc <[^>]*> nop
++0+18e0 <[^>]*> nop
++0+18e4 <[^>]*> nop
++0+18e8 <[^>]*> nop
++0+18ec <[^>]*> nop
++0+18f0 <[^>]*> nop
++0+18f4 <[^>]*> nop
++0+18f8 <[^>]*> nop
++0+18fc <[^>]*> nop
++0+1900 <[^>]*> nop
++0+1904 <[^>]*> nop
++0+1908 <[^>]*> nop
++0+190c <[^>]*> nop
++0+1910 <[^>]*> nop
++0+1914 <[^>]*> nop
++0+1918 <[^>]*> nop
++0+191c <[^>]*> nop
++0+1920 <[^>]*> nop
++0+1924 <[^>]*> nop
++0+1928 <[^>]*> nop
++0+192c <[^>]*> nop
++0+1930 <[^>]*> nop
++0+1934 <[^>]*> nop
++0+1938 <[^>]*> nop
++0+193c <[^>]*> nop
++0+1940 <[^>]*> nop
++0+1944 <[^>]*> nop
++0+1948 <[^>]*> nop
++0+194c <[^>]*> nop
++0+1950 <[^>]*> nop
++0+1954 <[^>]*> nop
++0+1958 <[^>]*> nop
++0+195c <[^>]*> nop
++0+1960 <[^>]*> nop
++0+1964 <[^>]*> nop
++0+1968 <[^>]*> nop
++0+196c <[^>]*> nop
++0+1970 <[^>]*> nop
++0+1974 <[^>]*> nop
++0+1978 <[^>]*> nop
++0+197c <[^>]*> nop
++0+1980 <[^>]*> nop
++0+1984 <[^>]*> nop
++0+1988 <[^>]*> nop
++0+198c <[^>]*> nop
++0+1990 <[^>]*> nop
++0+1994 <[^>]*> nop
++0+1998 <[^>]*> nop
++0+199c <[^>]*> nop
++0+19a0 <[^>]*> nop
++0+19a4 <[^>]*> nop
++0+19a8 <[^>]*> nop
++0+19ac <[^>]*> nop
++0+19b0 <[^>]*> nop
++0+19b4 <[^>]*> nop
++0+19b8 <[^>]*> nop
++0+19bc <[^>]*> nop
++0+19c0 <[^>]*> nop
++0+19c4 <[^>]*> nop
++0+19c8 <[^>]*> nop
++0+19cc <[^>]*> nop
++0+19d0 <[^>]*> nop
++0+19d4 <[^>]*> nop
++0+19d8 <[^>]*> nop
++0+19dc <[^>]*> nop
++0+19e0 <[^>]*> nop
++0+19e4 <[^>]*> nop
++0+19e8 <[^>]*> nop
++0+19ec <[^>]*> nop
++0+19f0 <[^>]*> nop
++0+19f4 <[^>]*> nop
++0+19f8 <[^>]*> nop
++0+19fc <[^>]*> nop
++0+1a00 <[^>]*> nop
++0+1a04 <[^>]*> nop
++0+1a08 <[^>]*> nop
++0+1a0c <[^>]*> nop
++0+1a10 <[^>]*> nop
++0+1a14 <[^>]*> nop
++0+1a18 <[^>]*> nop
++0+1a1c <[^>]*> nop
++0+1a20 <[^>]*> nop
++0+1a24 <[^>]*> nop
++0+1a28 <[^>]*> nop
++0+1a2c <[^>]*> nop
++0+1a30 <[^>]*> nop
++0+1a34 <[^>]*> nop
++0+1a38 <[^>]*> nop
++0+1a3c <[^>]*> nop
++0+1a40 <[^>]*> nop
++0+1a44 <[^>]*> nop
++0+1a48 <[^>]*> nop
++0+1a4c <[^>]*> nop
++0+1a50 <[^>]*> nop
++0+1a54 <[^>]*> nop
++0+1a58 <[^>]*> nop
++0+1a5c <[^>]*> nop
++0+1a60 <[^>]*> nop
++0+1a64 <[^>]*> nop
++0+1a68 <[^>]*> nop
++0+1a6c <[^>]*> nop
++0+1a70 <[^>]*> nop
++0+1a74 <[^>]*> nop
++0+1a78 <[^>]*> nop
++0+1a7c <[^>]*> nop
++0+1a80 <[^>]*> nop
++0+1a84 <[^>]*> nop
++0+1a88 <[^>]*> nop
++0+1a8c <[^>]*> nop
++0+1a90 <[^>]*> nop
++0+1a94 <[^>]*> nop
++0+1a98 <[^>]*> nop
++0+1a9c <[^>]*> nop
++0+1aa0 <[^>]*> nop
++0+1aa4 <[^>]*> nop
++0+1aa8 <[^>]*> nop
++0+1aac <[^>]*> nop
++0+1ab0 <[^>]*> nop
++0+1ab4 <[^>]*> nop
++0+1ab8 <[^>]*> nop
++0+1abc <[^>]*> nop
++0+1ac0 <[^>]*> nop
++0+1ac4 <[^>]*> nop
++0+1ac8 <[^>]*> nop
++0+1acc <[^>]*> nop
++0+1ad0 <[^>]*> nop
++0+1ad4 <[^>]*> nop
++0+1ad8 <[^>]*> nop
++0+1adc <[^>]*> nop
++0+1ae0 <[^>]*> nop
++0+1ae4 <[^>]*> nop
++0+1ae8 <[^>]*> nop
++0+1aec <[^>]*> nop
++0+1af0 <[^>]*> nop
++0+1af4 <[^>]*> nop
++0+1af8 <[^>]*> nop
++0+1afc <[^>]*> nop
++0+1b00 <[^>]*> nop
++0+1b04 <[^>]*> nop
++0+1b08 <[^>]*> nop
++0+1b0c <[^>]*> nop
++0+1b10 <[^>]*> nop
++0+1b14 <[^>]*> nop
++0+1b18 <[^>]*> nop
++0+1b1c <[^>]*> nop
++0+1b20 <[^>]*> nop
++0+1b24 <[^>]*> nop
++0+1b28 <[^>]*> nop
++0+1b2c <[^>]*> nop
++0+1b30 <[^>]*> nop
++0+1b34 <[^>]*> nop
++0+1b38 <[^>]*> nop
++0+1b3c <[^>]*> nop
++0+1b40 <[^>]*> nop
++0+1b44 <[^>]*> nop
++0+1b48 <[^>]*> nop
++0+1b4c <[^>]*> nop
++0+1b50 <[^>]*> nop
++0+1b54 <[^>]*> nop
++0+1b58 <[^>]*> nop
++0+1b5c <[^>]*> nop
++0+1b60 <[^>]*> nop
++0+1b64 <[^>]*> nop
++0+1b68 <[^>]*> nop
++0+1b6c <[^>]*> nop
++0+1b70 <[^>]*> nop
++0+1b74 <[^>]*> nop
++0+1b78 <[^>]*> nop
++0+1b7c <[^>]*> nop
++0+1b80 <[^>]*> nop
++0+1b84 <[^>]*> nop
++0+1b88 <[^>]*> nop
++0+1b8c <[^>]*> nop
++0+1b90 <[^>]*> nop
++0+1b94 <[^>]*> nop
++0+1b98 <[^>]*> nop
++0+1b9c <[^>]*> nop
++0+1ba0 <[^>]*> nop
++0+1ba4 <[^>]*> nop
++0+1ba8 <[^>]*> nop
++0+1bac <[^>]*> nop
++0+1bb0 <[^>]*> nop
++0+1bb4 <[^>]*> nop
++0+1bb8 <[^>]*> nop
++0+1bbc <[^>]*> nop
++0+1bc0 <[^>]*> nop
++0+1bc4 <[^>]*> nop
++0+1bc8 <[^>]*> nop
++0+1bcc <[^>]*> nop
++0+1bd0 <[^>]*> nop
++0+1bd4 <[^>]*> nop
++0+1bd8 <[^>]*> nop
++0+1bdc <[^>]*> nop
++0+1be0 <[^>]*> nop
++0+1be4 <[^>]*> nop
++0+1be8 <[^>]*> nop
++0+1bec <[^>]*> nop
++0+1bf0 <[^>]*> nop
++0+1bf4 <[^>]*> nop
++0+1bf8 <[^>]*> nop
++0+1bfc <[^>]*> nop
++0+1c00 <[^>]*> nop
++0+1c04 <[^>]*> nop
++0+1c08 <[^>]*> nop
++0+1c0c <[^>]*> nop
++0+1c10 <[^>]*> nop
++0+1c14 <[^>]*> nop
++0+1c18 <[^>]*> nop
++0+1c1c <[^>]*> nop
++0+1c20 <[^>]*> nop
++0+1c24 <[^>]*> nop
++0+1c28 <[^>]*> nop
++0+1c2c <[^>]*> nop
++0+1c30 <[^>]*> nop
++0+1c34 <[^>]*> nop
++0+1c38 <[^>]*> nop
++0+1c3c <[^>]*> nop
++0+1c40 <[^>]*> nop
++0+1c44 <[^>]*> nop
++0+1c48 <[^>]*> nop
++0+1c4c <[^>]*> nop
++0+1c50 <[^>]*> nop
++0+1c54 <[^>]*> nop
++0+1c58 <[^>]*> nop
++0+1c5c <[^>]*> nop
++0+1c60 <[^>]*> nop
++0+1c64 <[^>]*> nop
++0+1c68 <[^>]*> nop
++0+1c6c <[^>]*> nop
++0+1c70 <[^>]*> nop
++0+1c74 <[^>]*> nop
++0+1c78 <[^>]*> nop
++0+1c7c <[^>]*> nop
++0+1c80 <[^>]*> nop
++0+1c84 <[^>]*> nop
++0+1c88 <[^>]*> nop
++0+1c8c <[^>]*> nop
++0+1c90 <[^>]*> nop
++0+1c94 <[^>]*> nop
++0+1c98 <[^>]*> nop
++0+1c9c <[^>]*> nop
++0+1ca0 <[^>]*> nop
++0+1ca4 <[^>]*> nop
++0+1ca8 <[^>]*> nop
++0+1cac <[^>]*> nop
++0+1cb0 <[^>]*> nop
++0+1cb4 <[^>]*> nop
++0+1cb8 <[^>]*> nop
++0+1cbc <[^>]*> nop
++0+1cc0 <[^>]*> nop
++0+1cc4 <[^>]*> nop
++0+1cc8 <[^>]*> nop
++0+1ccc <[^>]*> nop
++0+1cd0 <[^>]*> nop
++0+1cd4 <[^>]*> nop
++0+1cd8 <[^>]*> nop
++0+1cdc <[^>]*> nop
++0+1ce0 <[^>]*> nop
++0+1ce4 <[^>]*> nop
++0+1ce8 <[^>]*> nop
++0+1cec <[^>]*> nop
++0+1cf0 <[^>]*> nop
++0+1cf4 <[^>]*> nop
++0+1cf8 <[^>]*> nop
++0+1cfc <[^>]*> nop
++0+1d00 <[^>]*> nop
++0+1d04 <[^>]*> nop
++0+1d08 <[^>]*> nop
++0+1d0c <[^>]*> nop
++0+1d10 <[^>]*> nop
++0+1d14 <[^>]*> nop
++0+1d18 <[^>]*> nop
++0+1d1c <[^>]*> nop
++0+1d20 <[^>]*> nop
++0+1d24 <[^>]*> nop
++0+1d28 <[^>]*> nop
++0+1d2c <[^>]*> nop
++0+1d30 <[^>]*> nop
++0+1d34 <[^>]*> nop
++0+1d38 <[^>]*> nop
++0+1d3c <[^>]*> nop
++0+1d40 <[^>]*> nop
++0+1d44 <[^>]*> nop
++0+1d48 <[^>]*> nop
++0+1d4c <[^>]*> nop
++0+1d50 <[^>]*> nop
++0+1d54 <[^>]*> nop
++0+1d58 <[^>]*> nop
++0+1d5c <[^>]*> nop
++0+1d60 <[^>]*> nop
++0+1d64 <[^>]*> nop
++0+1d68 <[^>]*> nop
++0+1d6c <[^>]*> nop
++0+1d70 <[^>]*> nop
++0+1d74 <[^>]*> nop
++0+1d78 <[^>]*> nop
++0+1d7c <[^>]*> nop
++0+1d80 <[^>]*> nop
++0+1d84 <[^>]*> nop
++0+1d88 <[^>]*> nop
++0+1d8c <[^>]*> nop
++0+1d90 <[^>]*> nop
++0+1d94 <[^>]*> nop
++0+1d98 <[^>]*> nop
++0+1d9c <[^>]*> nop
++0+1da0 <[^>]*> nop
++0+1da4 <[^>]*> nop
++0+1da8 <[^>]*> nop
++0+1dac <[^>]*> nop
++0+1db0 <[^>]*> nop
++0+1db4 <[^>]*> nop
++0+1db8 <[^>]*> nop
++0+1dbc <[^>]*> nop
++0+1dc0 <[^>]*> nop
++0+1dc4 <[^>]*> nop
++0+1dc8 <[^>]*> nop
++0+1dcc <[^>]*> nop
++0+1dd0 <[^>]*> nop
++0+1dd4 <[^>]*> nop
++0+1dd8 <[^>]*> nop
++0+1ddc <[^>]*> nop
++0+1de0 <[^>]*> nop
++0+1de4 <[^>]*> nop
++0+1de8 <[^>]*> nop
++0+1dec <[^>]*> nop
++0+1df0 <[^>]*> nop
++0+1df4 <[^>]*> nop
++0+1df8 <[^>]*> nop
++0+1dfc <[^>]*> nop
++0+1e00 <[^>]*> nop
++0+1e04 <[^>]*> nop
++0+1e08 <[^>]*> nop
++0+1e0c <[^>]*> nop
++0+1e10 <[^>]*> nop
++0+1e14 <[^>]*> nop
++0+1e18 <[^>]*> nop
++0+1e1c <[^>]*> nop
++0+1e20 <[^>]*> nop
++0+1e24 <[^>]*> nop
++0+1e28 <[^>]*> nop
++0+1e2c <[^>]*> nop
++0+1e30 <[^>]*> nop
++0+1e34 <[^>]*> nop
++0+1e38 <[^>]*> nop
++0+1e3c <[^>]*> nop
++0+1e40 <[^>]*> nop
++0+1e44 <[^>]*> nop
++0+1e48 <[^>]*> nop
++0+1e4c <[^>]*> nop
++0+1e50 <[^>]*> nop
++0+1e54 <[^>]*> nop
++0+1e58 <[^>]*> nop
++0+1e5c <[^>]*> nop
++0+1e60 <[^>]*> nop
++0+1e64 <[^>]*> nop
++0+1e68 <[^>]*> nop
++0+1e6c <[^>]*> nop
++0+1e70 <[^>]*> nop
++0+1e74 <[^>]*> nop
++0+1e78 <[^>]*> nop
++0+1e7c <[^>]*> nop
++0+1e80 <[^>]*> nop
++0+1e84 <[^>]*> nop
++0+1e88 <[^>]*> nop
++0+1e8c <[^>]*> nop
++0+1e90 <[^>]*> nop
++0+1e94 <[^>]*> nop
++0+1e98 <[^>]*> nop
++0+1e9c <[^>]*> nop
++0+1ea0 <[^>]*> nop
++0+1ea4 <[^>]*> nop
++0+1ea8 <[^>]*> nop
++0+1eac <[^>]*> nop
++0+1eb0 <[^>]*> nop
++0+1eb4 <[^>]*> nop
++0+1eb8 <[^>]*> nop
++0+1ebc <[^>]*> nop
++0+1ec0 <[^>]*> nop
++0+1ec4 <[^>]*> nop
++0+1ec8 <[^>]*> nop
++0+1ecc <[^>]*> nop
++0+1ed0 <[^>]*> nop
++0+1ed4 <[^>]*> nop
++0+1ed8 <[^>]*> nop
++0+1edc <[^>]*> nop
++0+1ee0 <[^>]*> nop
++0+1ee4 <[^>]*> nop
++0+1ee8 <[^>]*> nop
++0+1eec <[^>]*> nop
++0+1ef0 <[^>]*> nop
++0+1ef4 <[^>]*> nop
++0+1ef8 <[^>]*> nop
++0+1efc <[^>]*> nop
++0+1f00 <[^>]*> nop
++0+1f04 <[^>]*> nop
++0+1f08 <[^>]*> nop
++0+1f0c <[^>]*> nop
++0+1f10 <[^>]*> nop
++0+1f14 <[^>]*> nop
++0+1f18 <[^>]*> nop
++0+1f1c <[^>]*> nop
++0+1f20 <[^>]*> nop
++0+1f24 <[^>]*> nop
++0+1f28 <[^>]*> nop
++0+1f2c <[^>]*> nop
++0+1f30 <[^>]*> nop
++0+1f34 <[^>]*> nop
++0+1f38 <[^>]*> nop
++0+1f3c <[^>]*> nop
++0+1f40 <[^>]*> nop
++0+1f44 <[^>]*> nop
++0+1f48 <[^>]*> nop
++0+1f4c <[^>]*> nop
++0+1f50 <[^>]*> nop
++0+1f54 <[^>]*> nop
++0+1f58 <[^>]*> nop
++0+1f5c <[^>]*> nop
++0+1f60 <[^>]*> nop
++0+1f64 <[^>]*> nop
++0+1f68 <[^>]*> nop
++0+1f6c <[^>]*> nop
++0+1f70 <[^>]*> nop
++0+1f74 <[^>]*> nop
++0+1f78 <[^>]*> nop
++0+1f7c <[^>]*> nop
++0+1f80 <[^>]*> nop
++0+1f84 <[^>]*> nop
++0+1f88 <[^>]*> nop
++0+1f8c <[^>]*> nop
++0+1f90 <[^>]*> nop
++0+1f94 <[^>]*> nop
++0+1f98 <[^>]*> nop
++0+1f9c <[^>]*> nop
++0+1fa0 <[^>]*> nop
++0+1fa4 <[^>]*> nop
++0+1fa8 <[^>]*> nop
++0+1fac <[^>]*> nop
++0+1fb0 <[^>]*> nop
++0+1fb4 <[^>]*> nop
++0+1fb8 <[^>]*> nop
++0+1fbc <[^>]*> nop
++0+1fc0 <[^>]*> nop
++0+1fc4 <[^>]*> nop
++0+1fc8 <[^>]*> nop
++0+1fcc <[^>]*> nop
++0+1fd0 <[^>]*> nop
++0+1fd4 <[^>]*> nop
++0+1fd8 <[^>]*> nop
++0+1fdc <[^>]*> nop
++0+1fe0 <[^>]*> nop
++0+1fe4 <[^>]*> nop
++0+1fe8 <[^>]*> nop
++0+1fec <[^>]*> nop
++0+1ff0 <[^>]*> nop
++0+1ff4 <[^>]*> nop
++0+1ff8 <[^>]*> nop
++0+1ffc <[^>]*> nop
++0+2000 <[^>]*> nop
++0+2004 <[^>]*> nop
++0+2008 <[^>]*> nop
++0+200c <[^>]*> nop
++0+2010 <[^>]*> nop
++0+2014 <[^>]*> nop
++0+2018 <[^>]*> nop
++0+201c <[^>]*> nop
++0+2020 <[^>]*> nop
++0+2024 <[^>]*> nop
++0+2028 <[^>]*> nop
++0+202c <[^>]*> nop
++0+2030 <[^>]*> nop
++0+2034 <[^>]*> nop
++0+2038 <[^>]*> nop
++0+203c <[^>]*> nop
++0+2040 <[^>]*> nop
++0+2044 <[^>]*> nop
++0+2048 <[^>]*> nop
++0+204c <[^>]*> nop
++0+2050 <[^>]*> nop
++0+2054 <[^>]*> nop
++0+2058 <[^>]*> nop
++0+205c <[^>]*> nop
++0+2060 <[^>]*> nop
++0+2064 <[^>]*> nop
++0+2068 <[^>]*> nop
++0+206c <[^>]*> nop
++0+2070 <[^>]*> nop
++0+2074 <[^>]*> nop
++0+2078 <[^>]*> nop
++0+207c <[^>]*> nop
++0+2080 <[^>]*> nop
++0+2084 <[^>]*> nop
++0+2088 <[^>]*> nop
++0+208c <[^>]*> nop
++0+2090 <[^>]*> nop
++0+2094 <[^>]*> nop
++0+2098 <[^>]*> nop
++0+209c <[^>]*> nop
++0+20a0 <[^>]*> nop
++0+20a4 <[^>]*> nop
++0+20a8 <[^>]*> nop
++0+20ac <[^>]*> nop
++0+20b0 <[^>]*> nop
++0+20b4 <[^>]*> nop
++0+20b8 <[^>]*> nop
++0+20bc <[^>]*> nop
++0+20c0 <[^>]*> nop
++0+20c4 <[^>]*> nop
++0+20c8 <[^>]*> nop
++0+20cc <[^>]*> nop
++0+20d0 <[^>]*> nop
++0+20d4 <[^>]*> nop
++0+20d8 <[^>]*> nop
++0+20dc <[^>]*> nop
++0+20e0 <[^>]*> nop
++0+20e4 <[^>]*> nop
++0+20e8 <[^>]*> nop
++0+20ec <[^>]*> nop
++0+20f0 <[^>]*> nop
++0+20f4 <[^>]*> nop
++0+20f8 <[^>]*> nop
++0+20fc <[^>]*> nop
++0+2100 <[^>]*> nop
++0+2104 <[^>]*> nop
++0+2108 <[^>]*> nop
++0+210c <[^>]*> nop
++0+2110 <[^>]*> nop
++0+2114 <[^>]*> nop
++0+2118 <[^>]*> nop
++0+211c <[^>]*> nop
++0+2120 <[^>]*> nop
++0+2124 <[^>]*> nop
++0+2128 <[^>]*> nop
++0+212c <[^>]*> nop
++0+2130 <[^>]*> nop
++0+2134 <[^>]*> nop
++0+2138 <[^>]*> nop
++0+213c <[^>]*> nop
++0+2140 <[^>]*> nop
++0+2144 <[^>]*> nop
++0+2148 <[^>]*> nop
++0+214c <[^>]*> nop
++0+2150 <[^>]*> nop
++0+2154 <[^>]*> nop
++0+2158 <[^>]*> nop
++0+215c <[^>]*> nop
++0+2160 <[^>]*> nop
++0+2164 <[^>]*> nop
++0+2168 <[^>]*> nop
++0+216c <[^>]*> nop
++0+2170 <[^>]*> nop
++0+2174 <[^>]*> nop
++0+2178 <[^>]*> nop
++0+217c <[^>]*> nop
++0+2180 <[^>]*> nop
++0+2184 <[^>]*> nop
++0+2188 <[^>]*> nop
++0+218c <[^>]*> nop
++0+2190 <[^>]*> nop
++0+2194 <[^>]*> nop
++0+2198 <[^>]*> nop
++0+219c <[^>]*> nop
++0+21a0 <[^>]*> nop
++0+21a4 <[^>]*> nop
++0+21a8 <[^>]*> nop
++0+21ac <[^>]*> nop
++0+21b0 <[^>]*> nop
++0+21b4 <[^>]*> nop
++0+21b8 <[^>]*> nop
++0+21bc <[^>]*> nop
++0+21c0 <[^>]*> nop
++0+21c4 <[^>]*> nop
++0+21c8 <[^>]*> nop
++0+21cc <[^>]*> nop
++0+21d0 <[^>]*> nop
++0+21d4 <[^>]*> nop
++0+21d8 <[^>]*> nop
++0+21dc <[^>]*> nop
++0+21e0 <[^>]*> nop
++0+21e4 <[^>]*> nop
++0+21e8 <[^>]*> nop
++0+21ec <[^>]*> nop
++0+21f0 <[^>]*> nop
++0+21f4 <[^>]*> nop
++0+21f8 <[^>]*> nop
++0+21fc <[^>]*> nop
++0+2200 <[^>]*> nop
++0+2204 <[^>]*> nop
++0+2208 <[^>]*> nop
++0+220c <[^>]*> nop
++0+2210 <[^>]*> nop
++0+2214 <[^>]*> nop
++0+2218 <[^>]*> nop
++0+221c <[^>]*> nop
++0+2220 <[^>]*> nop
++0+2224 <[^>]*> nop
++0+2228 <[^>]*> nop
++0+222c <[^>]*> nop
++0+2230 <[^>]*> nop
++0+2234 <[^>]*> nop
++0+2238 <[^>]*> nop
++0+223c <[^>]*> nop
++0+2240 <[^>]*> nop
++0+2244 <[^>]*> nop
++0+2248 <[^>]*> nop
++0+224c <[^>]*> nop
++0+2250 <[^>]*> nop
++0+2254 <[^>]*> nop
++0+2258 <[^>]*> nop
++0+225c <[^>]*> nop
++0+2260 <[^>]*> nop
++0+2264 <[^>]*> nop
++0+2268 <[^>]*> nop
++0+226c <[^>]*> nop
++0+2270 <[^>]*> nop
++0+2274 <[^>]*> nop
++0+2278 <[^>]*> nop
++0+227c <[^>]*> nop
++0+2280 <[^>]*> nop
++0+2284 <[^>]*> nop
++0+2288 <[^>]*> nop
++0+228c <[^>]*> nop
++0+2290 <[^>]*> nop
++0+2294 <[^>]*> nop
++0+2298 <[^>]*> nop
++0+229c <[^>]*> nop
++0+22a0 <[^>]*> nop
++0+22a4 <[^>]*> nop
++0+22a8 <[^>]*> nop
++0+22ac <[^>]*> nop
++0+22b0 <[^>]*> nop
++0+22b4 <[^>]*> nop
++0+22b8 <[^>]*> nop
++0+22bc <[^>]*> nop
++0+22c0 <[^>]*> nop
++0+22c4 <[^>]*> nop
++0+22c8 <[^>]*> nop
++0+22cc <[^>]*> nop
++0+22d0 <[^>]*> nop
++0+22d4 <[^>]*> nop
++0+22d8 <[^>]*> nop
++0+22dc <[^>]*> nop
++0+22e0 <[^>]*> nop
++0+22e4 <[^>]*> nop
++0+22e8 <[^>]*> nop
++0+22ec <[^>]*> nop
++0+22f0 <[^>]*> nop
++0+22f4 <[^>]*> nop
++0+22f8 <[^>]*> nop
++0+22fc <[^>]*> nop
++0+2300 <[^>]*> nop
++0+2304 <[^>]*> nop
++0+2308 <[^>]*> nop
++0+230c <[^>]*> nop
++0+2310 <[^>]*> nop
++0+2314 <[^>]*> nop
++0+2318 <[^>]*> nop
++0+231c <[^>]*> nop
++0+2320 <[^>]*> nop
++0+2324 <[^>]*> nop
++0+2328 <[^>]*> nop
++0+232c <[^>]*> nop
++0+2330 <[^>]*> nop
++0+2334 <[^>]*> nop
++0+2338 <[^>]*> nop
++0+233c <[^>]*> nop
++0+2340 <[^>]*> nop
++0+2344 <[^>]*> nop
++0+2348 <[^>]*> nop
++0+234c <[^>]*> nop
++0+2350 <[^>]*> nop
++0+2354 <[^>]*> nop
++0+2358 <[^>]*> nop
++0+235c <[^>]*> nop
++0+2360 <[^>]*> nop
++0+2364 <[^>]*> nop
++0+2368 <[^>]*> nop
++0+236c <[^>]*> nop
++0+2370 <[^>]*> nop
++0+2374 <[^>]*> nop
++0+2378 <[^>]*> nop
++0+237c <[^>]*> nop
++0+2380 <[^>]*> nop
++0+2384 <[^>]*> nop
++0+2388 <[^>]*> nop
++0+238c <[^>]*> nop
++0+2390 <[^>]*> nop
++0+2394 <[^>]*> nop
++0+2398 <[^>]*> nop
++0+239c <[^>]*> nop
++0+23a0 <[^>]*> nop
++0+23a4 <[^>]*> nop
++0+23a8 <[^>]*> nop
++0+23ac <[^>]*> nop
++0+23b0 <[^>]*> nop
++0+23b4 <[^>]*> nop
++0+23b8 <[^>]*> nop
++0+23bc <[^>]*> nop
++0+23c0 <[^>]*> nop
++0+23c4 <[^>]*> nop
++0+23c8 <[^>]*> nop
++0+23cc <[^>]*> nop
++0+23d0 <[^>]*> nop
++0+23d4 <[^>]*> nop
++0+23d8 <[^>]*> nop
++0+23dc <[^>]*> nop
++0+23e0 <[^>]*> nop
++0+23e4 <[^>]*> nop
++0+23e8 <[^>]*> nop
++0+23ec <[^>]*> nop
++0+23f0 <[^>]*> nop
++0+23f4 <[^>]*> nop
++0+23f8 <[^>]*> nop
++0+23fc <[^>]*> nop
++0+2400 <[^>]*> nop
++0+2404 <[^>]*> nop
++0+2408 <[^>]*> nop
++0+240c <[^>]*> nop
++0+2410 <[^>]*> nop
++0+2414 <[^>]*> nop
++0+2418 <[^>]*> nop
++0+241c <[^>]*> nop
++0+2420 <[^>]*> nop
++0+2424 <[^>]*> nop
++0+2428 <[^>]*> nop
++0+242c <[^>]*> nop
++0+2430 <[^>]*> nop
++0+2434 <[^>]*> nop
++0+2438 <[^>]*> nop
++0+243c <[^>]*> nop
++0+2440 <[^>]*> nop
++0+2444 <[^>]*> nop
++0+2448 <[^>]*> nop
++0+244c <[^>]*> nop
++0+2450 <[^>]*> nop
++0+2454 <[^>]*> nop
++0+2458 <[^>]*> nop
++0+245c <[^>]*> nop
++0+2460 <[^>]*> nop
++0+2464 <[^>]*> nop
++0+2468 <[^>]*> nop
++0+246c <[^>]*> nop
++0+2470 <[^>]*> nop
++0+2474 <[^>]*> nop
++0+2478 <[^>]*> nop
++0+247c <[^>]*> nop
++0+2480 <[^>]*> nop
++0+2484 <[^>]*> nop
++0+2488 <[^>]*> nop
++0+248c <[^>]*> nop
++0+2490 <[^>]*> nop
++0+2494 <[^>]*> nop
++0+2498 <[^>]*> nop
++0+249c <[^>]*> nop
++0+24a0 <[^>]*> nop
++0+24a4 <[^>]*> nop
++0+24a8 <[^>]*> nop
++0+24ac <[^>]*> nop
++0+24b0 <[^>]*> nop
++0+24b4 <[^>]*> nop
++0+24b8 <[^>]*> nop
++0+24bc <[^>]*> nop
++0+24c0 <[^>]*> nop
++0+24c4 <[^>]*> nop
++0+24c8 <[^>]*> nop
++0+24cc <[^>]*> nop
++0+24d0 <[^>]*> nop
++0+24d4 <[^>]*> nop
++0+24d8 <[^>]*> nop
++0+24dc <[^>]*> nop
++0+24e0 <[^>]*> nop
++0+24e4 <[^>]*> nop
++0+24e8 <[^>]*> nop
++0+24ec <[^>]*> nop
++0+24f0 <[^>]*> nop
++0+24f4 <[^>]*> nop
++0+24f8 <[^>]*> nop
++0+24fc <[^>]*> nop
++0+2500 <[^>]*> nop
++0+2504 <[^>]*> nop
++0+2508 <[^>]*> nop
++0+250c <[^>]*> nop
++0+2510 <[^>]*> nop
++0+2514 <[^>]*> nop
++0+2518 <[^>]*> nop
++0+251c <[^>]*> nop
++0+2520 <[^>]*> nop
++0+2524 <[^>]*> nop
++0+2528 <[^>]*> nop
++0+252c <[^>]*> nop
++0+2530 <[^>]*> nop
++0+2534 <[^>]*> nop
++0+2538 <[^>]*> nop
++0+253c <[^>]*> nop
++0+2540 <[^>]*> nop
++0+2544 <[^>]*> nop
++0+2548 <[^>]*> nop
++0+254c <[^>]*> nop
++0+2550 <[^>]*> nop
++0+2554 <[^>]*> nop
++0+2558 <[^>]*> nop
++0+255c <[^>]*> nop
++0+2560 <[^>]*> nop
++0+2564 <[^>]*> nop
++0+2568 <[^>]*> nop
++0+256c <[^>]*> nop
++0+2570 <[^>]*> nop
++0+2574 <[^>]*> nop
++0+2578 <[^>]*> nop
++0+257c <[^>]*> nop
++0+2580 <[^>]*> nop
++0+2584 <[^>]*> nop
++0+2588 <[^>]*> nop
++0+258c <[^>]*> nop
++0+2590 <[^>]*> nop
++0+2594 <[^>]*> nop
++0+2598 <[^>]*> nop
++0+259c <[^>]*> nop
++0+25a0 <[^>]*> nop
++0+25a4 <[^>]*> nop
++0+25a8 <[^>]*> nop
++0+25ac <[^>]*> nop
++0+25b0 <[^>]*> nop
++0+25b4 <[^>]*> nop
++0+25b8 <[^>]*> nop
++0+25bc <[^>]*> nop
++0+25c0 <[^>]*> nop
++0+25c4 <[^>]*> nop
++0+25c8 <[^>]*> nop
++0+25cc <[^>]*> nop
++0+25d0 <[^>]*> nop
++0+25d4 <[^>]*> nop
++0+25d8 <[^>]*> nop
++0+25dc <[^>]*> nop
++0+25e0 <[^>]*> nop
++0+25e4 <[^>]*> nop
++0+25e8 <[^>]*> nop
++0+25ec <[^>]*> nop
++0+25f0 <[^>]*> nop
++0+25f4 <[^>]*> nop
++0+25f8 <[^>]*> nop
++0+25fc <[^>]*> nop
++0+2600 <[^>]*> nop
++0+2604 <[^>]*> nop
++0+2608 <[^>]*> nop
++0+260c <[^>]*> nop
++0+2610 <[^>]*> nop
++0+2614 <[^>]*> nop
++0+2618 <[^>]*> nop
++0+261c <[^>]*> nop
++0+2620 <[^>]*> nop
++0+2624 <[^>]*> nop
++0+2628 <[^>]*> nop
++0+262c <[^>]*> nop
++0+2630 <[^>]*> nop
++0+2634 <[^>]*> nop
++0+2638 <[^>]*> nop
++0+263c <[^>]*> nop
++0+2640 <[^>]*> nop
++0+2644 <[^>]*> nop
++0+2648 <[^>]*> nop
++0+264c <[^>]*> nop
++0+2650 <[^>]*> nop
++0+2654 <[^>]*> nop
++0+2658 <[^>]*> nop
++0+265c <[^>]*> nop
++0+2660 <[^>]*> nop
++0+2664 <[^>]*> nop
++0+2668 <[^>]*> nop
++0+266c <[^>]*> nop
++0+2670 <[^>]*> nop
++0+2674 <[^>]*> nop
++0+2678 <[^>]*> nop
++0+267c <[^>]*> nop
++0+2680 <[^>]*> nop
++0+2684 <[^>]*> nop
++0+2688 <[^>]*> nop
++0+268c <[^>]*> nop
++0+2690 <[^>]*> nop
++0+2694 <[^>]*> nop
++0+2698 <[^>]*> nop
++0+269c <[^>]*> nop
++0+26a0 <[^>]*> nop
++0+26a4 <[^>]*> nop
++0+26a8 <[^>]*> nop
++0+26ac <[^>]*> nop
++0+26b0 <[^>]*> nop
++0+26b4 <[^>]*> nop
++0+26b8 <[^>]*> nop
++0+26bc <[^>]*> nop
++0+26c0 <[^>]*> nop
++0+26c4 <[^>]*> nop
++0+26c8 <[^>]*> nop
++0+26cc <[^>]*> nop
++0+26d0 <[^>]*> nop
++0+26d4 <[^>]*> nop
++0+26d8 <[^>]*> nop
++0+26dc <[^>]*> nop
++0+26e0 <[^>]*> nop
++0+26e4 <[^>]*> nop
++0+26e8 <[^>]*> nop
++0+26ec <[^>]*> nop
++0+26f0 <[^>]*> nop
++0+26f4 <[^>]*> nop
++0+26f8 <[^>]*> nop
++0+26fc <[^>]*> nop
++0+2700 <[^>]*> nop
++0+2704 <[^>]*> nop
++0+2708 <[^>]*> nop
++0+270c <[^>]*> nop
++0+2710 <[^>]*> nop
++0+2714 <[^>]*> nop
++0+2718 <[^>]*> nop
++0+271c <[^>]*> nop
++0+2720 <[^>]*> nop
++0+2724 <[^>]*> nop
++0+2728 <[^>]*> nop
++0+272c <[^>]*> nop
++0+2730 <[^>]*> nop
++0+2734 <[^>]*> nop
++0+2738 <[^>]*> nop
++0+273c <[^>]*> nop
++0+2740 <[^>]*> nop
++0+2744 <[^>]*> nop
++0+2748 <[^>]*> nop
++0+274c <[^>]*> nop
++0+2750 <[^>]*> nop
++0+2754 <[^>]*> nop
++0+2758 <[^>]*> nop
++0+275c <[^>]*> nop
++0+2760 <[^>]*> nop
++0+2764 <[^>]*> nop
++0+2768 <[^>]*> nop
++0+276c <[^>]*> nop
++0+2770 <[^>]*> nop
++0+2774 <[^>]*> nop
++0+2778 <[^>]*> nop
++0+277c <[^>]*> nop
++0+2780 <[^>]*> nop
++0+2784 <[^>]*> nop
++0+2788 <[^>]*> nop
++0+278c <[^>]*> nop
++0+2790 <[^>]*> nop
++0+2794 <[^>]*> nop
++0+2798 <[^>]*> nop
++0+279c <[^>]*> nop
++0+27a0 <[^>]*> nop
++0+27a4 <[^>]*> nop
++0+27a8 <[^>]*> nop
++0+27ac <[^>]*> nop
++0+27b0 <[^>]*> nop
++0+27b4 <[^>]*> nop
++0+27b8 <[^>]*> nop
++0+27bc <[^>]*> nop
++0+27c0 <[^>]*> nop
++0+27c4 <[^>]*> nop
++0+27c8 <[^>]*> nop
++0+27cc <[^>]*> nop
++0+27d0 <[^>]*> nop
++0+27d4 <[^>]*> nop
++0+27d8 <[^>]*> nop
++0+27dc <[^>]*> nop
++0+27e0 <[^>]*> nop
++0+27e4 <[^>]*> nop
++0+27e8 <[^>]*> nop
++0+27ec <[^>]*> nop
++0+27f0 <[^>]*> nop
++0+27f4 <[^>]*> nop
++0+27f8 <[^>]*> nop
++0+27fc <[^>]*> nop
++0+2800 <[^>]*> nop
++0+2804 <[^>]*> nop
++0+2808 <[^>]*> nop
++0+280c <[^>]*> nop
++0+2810 <[^>]*> nop
++0+2814 <[^>]*> nop
++0+2818 <[^>]*> nop
++0+281c <[^>]*> nop
++0+2820 <[^>]*> nop
++0+2824 <[^>]*> nop
++0+2828 <[^>]*> nop
++0+282c <[^>]*> nop
++0+2830 <[^>]*> nop
++0+2834 <[^>]*> nop
++0+2838 <[^>]*> nop
++0+283c <[^>]*> nop
++0+2840 <[^>]*> nop
++0+2844 <[^>]*> nop
++0+2848 <[^>]*> nop
++0+284c <[^>]*> nop
++0+2850 <[^>]*> nop
++0+2854 <[^>]*> nop
++0+2858 <[^>]*> nop
++0+285c <[^>]*> nop
++0+2860 <[^>]*> nop
++0+2864 <[^>]*> nop
++0+2868 <[^>]*> nop
++0+286c <[^>]*> nop
++0+2870 <[^>]*> nop
++0+2874 <[^>]*> nop
++0+2878 <[^>]*> nop
++0+287c <[^>]*> nop
++0+2880 <[^>]*> nop
++0+2884 <[^>]*> nop
++0+2888 <[^>]*> nop
++0+288c <[^>]*> nop
++0+2890 <[^>]*> nop
++0+2894 <[^>]*> nop
++0+2898 <[^>]*> nop
++0+289c <[^>]*> nop
++0+28a0 <[^>]*> nop
++0+28a4 <[^>]*> nop
++0+28a8 <[^>]*> nop
++0+28ac <[^>]*> nop
++0+28b0 <[^>]*> nop
++0+28b4 <[^>]*> nop
++0+28b8 <[^>]*> nop
++0+28bc <[^>]*> nop
++0+28c0 <[^>]*> nop
++0+28c4 <[^>]*> nop
++0+28c8 <[^>]*> nop
++0+28cc <[^>]*> nop
++0+28d0 <[^>]*> nop
++0+28d4 <[^>]*> nop
++0+28d8 <[^>]*> nop
++0+28dc <[^>]*> nop
++0+28e0 <[^>]*> nop
++0+28e4 <[^>]*> nop
++0+28e8 <[^>]*> nop
++0+28ec <[^>]*> nop
++0+28f0 <[^>]*> nop
++0+28f4 <[^>]*> nop
++0+28f8 <[^>]*> nop
++0+28fc <[^>]*> nop
++0+2900 <[^>]*> nop
++0+2904 <[^>]*> nop
++0+2908 <[^>]*> nop
++0+290c <[^>]*> nop
++0+2910 <[^>]*> nop
++0+2914 <[^>]*> nop
++0+2918 <[^>]*> nop
++0+291c <[^>]*> nop
++0+2920 <[^>]*> nop
++0+2924 <[^>]*> nop
++0+2928 <[^>]*> nop
++0+292c <[^>]*> nop
++0+2930 <[^>]*> nop
++0+2934 <[^>]*> nop
++0+2938 <[^>]*> nop
++0+293c <[^>]*> nop
++0+2940 <[^>]*> nop
++0+2944 <[^>]*> nop
++0+2948 <[^>]*> nop
++0+294c <[^>]*> nop
++0+2950 <[^>]*> nop
++0+2954 <[^>]*> nop
++0+2958 <[^>]*> nop
++0+295c <[^>]*> nop
++0+2960 <[^>]*> nop
++0+2964 <[^>]*> nop
++0+2968 <[^>]*> nop
++0+296c <[^>]*> nop
++0+2970 <[^>]*> nop
++0+2974 <[^>]*> nop
++0+2978 <[^>]*> nop
++0+297c <[^>]*> nop
++0+2980 <[^>]*> nop
++0+2984 <[^>]*> nop
++0+2988 <[^>]*> nop
++0+298c <[^>]*> nop
++0+2990 <[^>]*> nop
++0+2994 <[^>]*> nop
++0+2998 <[^>]*> nop
++0+299c <[^>]*> nop
++0+29a0 <[^>]*> nop
++0+29a4 <[^>]*> nop
++0+29a8 <[^>]*> nop
++0+29ac <[^>]*> nop
++0+29b0 <[^>]*> nop
++0+29b4 <[^>]*> nop
++0+29b8 <[^>]*> nop
++0+29bc <[^>]*> nop
++0+29c0 <[^>]*> nop
++0+29c4 <[^>]*> nop
++0+29c8 <[^>]*> nop
++0+29cc <[^>]*> nop
++0+29d0 <[^>]*> nop
++0+29d4 <[^>]*> nop
++0+29d8 <[^>]*> nop
++0+29dc <[^>]*> nop
++0+29e0 <[^>]*> nop
++0+29e4 <[^>]*> nop
++0+29e8 <[^>]*> nop
++0+29ec <[^>]*> nop
++0+29f0 <[^>]*> nop
++0+29f4 <[^>]*> nop
++0+29f8 <[^>]*> nop
++0+29fc <[^>]*> nop
++0+2a00 <[^>]*> nop
++0+2a04 <[^>]*> nop
++0+2a08 <[^>]*> nop
++0+2a0c <[^>]*> nop
++0+2a10 <[^>]*> nop
++0+2a14 <[^>]*> nop
++0+2a18 <[^>]*> nop
++0+2a1c <[^>]*> nop
++0+2a20 <[^>]*> nop
++0+2a24 <[^>]*> nop
++0+2a28 <[^>]*> nop
++0+2a2c <[^>]*> nop
++0+2a30 <[^>]*> nop
++0+2a34 <[^>]*> nop
++0+2a38 <[^>]*> nop
++0+2a3c <[^>]*> nop
++0+2a40 <[^>]*> nop
++0+2a44 <[^>]*> nop
++0+2a48 <[^>]*> nop
++0+2a4c <[^>]*> nop
++0+2a50 <[^>]*> nop
++0+2a54 <[^>]*> nop
++0+2a58 <[^>]*> nop
++0+2a5c <[^>]*> nop
++0+2a60 <[^>]*> nop
++0+2a64 <[^>]*> nop
++0+2a68 <[^>]*> nop
++0+2a6c <[^>]*> nop
++0+2a70 <[^>]*> nop
++0+2a74 <[^>]*> nop
++0+2a78 <[^>]*> nop
++0+2a7c <[^>]*> nop
++0+2a80 <[^>]*> nop
++0+2a84 <[^>]*> nop
++0+2a88 <[^>]*> nop
++0+2a8c <[^>]*> nop
++0+2a90 <[^>]*> nop
++0+2a94 <[^>]*> nop
++0+2a98 <[^>]*> nop
++0+2a9c <[^>]*> nop
++0+2aa0 <[^>]*> nop
++0+2aa4 <[^>]*> nop
++0+2aa8 <[^>]*> nop
++0+2aac <[^>]*> nop
++0+2ab0 <[^>]*> nop
++0+2ab4 <[^>]*> nop
++0+2ab8 <[^>]*> nop
++0+2abc <[^>]*> nop
++0+2ac0 <[^>]*> nop
++0+2ac4 <[^>]*> nop
++0+2ac8 <[^>]*> nop
++0+2acc <[^>]*> nop
++0+2ad0 <[^>]*> nop
++0+2ad4 <[^>]*> nop
++0+2ad8 <[^>]*> nop
++0+2adc <[^>]*> nop
++0+2ae0 <[^>]*> nop
++0+2ae4 <[^>]*> nop
++0+2ae8 <[^>]*> nop
++0+2aec <[^>]*> nop
++0+2af0 <[^>]*> nop
++0+2af4 <[^>]*> nop
++0+2af8 <[^>]*> nop
++0+2afc <[^>]*> nop
++0+2b00 <[^>]*> nop
++0+2b04 <[^>]*> nop
++0+2b08 <[^>]*> nop
++0+2b0c <[^>]*> nop
++0+2b10 <[^>]*> nop
++0+2b14 <[^>]*> nop
++0+2b18 <[^>]*> nop
++0+2b1c <[^>]*> nop
++0+2b20 <[^>]*> nop
++0+2b24 <[^>]*> nop
++0+2b28 <[^>]*> nop
++0+2b2c <[^>]*> nop
++0+2b30 <[^>]*> nop
++0+2b34 <[^>]*> nop
++0+2b38 <[^>]*> nop
++0+2b3c <[^>]*> nop
++0+2b40 <[^>]*> nop
++0+2b44 <[^>]*> nop
++0+2b48 <[^>]*> nop
++0+2b4c <[^>]*> nop
++0+2b50 <[^>]*> nop
++0+2b54 <[^>]*> nop
++0+2b58 <[^>]*> nop
++0+2b5c <[^>]*> nop
++0+2b60 <[^>]*> nop
++0+2b64 <[^>]*> nop
++0+2b68 <[^>]*> nop
++0+2b6c <[^>]*> nop
++0+2b70 <[^>]*> nop
++0+2b74 <[^>]*> nop
++0+2b78 <[^>]*> nop
++0+2b7c <[^>]*> nop
++0+2b80 <[^>]*> nop
++0+2b84 <[^>]*> nop
++0+2b88 <[^>]*> nop
++0+2b8c <[^>]*> nop
++0+2b90 <[^>]*> nop
++0+2b94 <[^>]*> nop
++0+2b98 <[^>]*> nop
++0+2b9c <[^>]*> nop
++0+2ba0 <[^>]*> nop
++0+2ba4 <[^>]*> nop
++0+2ba8 <[^>]*> nop
++0+2bac <[^>]*> nop
++0+2bb0 <[^>]*> nop
++0+2bb4 <[^>]*> nop
++0+2bb8 <[^>]*> nop
++0+2bbc <[^>]*> nop
++0+2bc0 <[^>]*> nop
++0+2bc4 <[^>]*> nop
++0+2bc8 <[^>]*> nop
++0+2bcc <[^>]*> nop
++0+2bd0 <[^>]*> nop
++0+2bd4 <[^>]*> nop
++0+2bd8 <[^>]*> nop
++0+2bdc <[^>]*> nop
++0+2be0 <[^>]*> nop
++0+2be4 <[^>]*> nop
++0+2be8 <[^>]*> nop
++0+2bec <[^>]*> nop
++0+2bf0 <[^>]*> nop
++0+2bf4 <[^>]*> nop
++0+2bf8 <[^>]*> nop
++0+2bfc <[^>]*> nop
++0+2c00 <[^>]*> nop
++0+2c04 <[^>]*> nop
++0+2c08 <[^>]*> nop
++0+2c0c <[^>]*> nop
++0+2c10 <[^>]*> nop
++0+2c14 <[^>]*> nop
++0+2c18 <[^>]*> nop
++0+2c1c <[^>]*> nop
++0+2c20 <[^>]*> nop
++0+2c24 <[^>]*> nop
++0+2c28 <[^>]*> nop
++0+2c2c <[^>]*> nop
++0+2c30 <[^>]*> nop
++0+2c34 <[^>]*> nop
++0+2c38 <[^>]*> nop
++0+2c3c <[^>]*> nop
++0+2c40 <[^>]*> nop
++0+2c44 <[^>]*> nop
++0+2c48 <[^>]*> nop
++0+2c4c <[^>]*> nop
++0+2c50 <[^>]*> nop
++0+2c54 <[^>]*> nop
++0+2c58 <[^>]*> nop
++0+2c5c <[^>]*> nop
++0+2c60 <[^>]*> nop
++0+2c64 <[^>]*> nop
++0+2c68 <[^>]*> nop
++0+2c6c <[^>]*> nop
++0+2c70 <[^>]*> nop
++0+2c74 <[^>]*> nop
++0+2c78 <[^>]*> nop
++0+2c7c <[^>]*> nop
++0+2c80 <[^>]*> nop
++0+2c84 <[^>]*> nop
++0+2c88 <[^>]*> nop
++0+2c8c <[^>]*> nop
++0+2c90 <[^>]*> nop
++0+2c94 <[^>]*> nop
++0+2c98 <[^>]*> nop
++0+2c9c <[^>]*> nop
++0+2ca0 <[^>]*> nop
++0+2ca4 <[^>]*> nop
++0+2ca8 <[^>]*> nop
++0+2cac <[^>]*> nop
++0+2cb0 <[^>]*> nop
++0+2cb4 <[^>]*> nop
++0+2cb8 <[^>]*> nop
++0+2cbc <[^>]*> nop
++0+2cc0 <[^>]*> nop
++0+2cc4 <[^>]*> nop
++0+2cc8 <[^>]*> nop
++0+2ccc <[^>]*> nop
++0+2cd0 <[^>]*> nop
++0+2cd4 <[^>]*> nop
++0+2cd8 <[^>]*> nop
++0+2cdc <[^>]*> nop
++0+2ce0 <[^>]*> nop
++0+2ce4 <[^>]*> nop
++0+2ce8 <[^>]*> nop
++0+2cec <[^>]*> nop
++0+2cf0 <[^>]*> nop
++0+2cf4 <[^>]*> nop
++0+2cf8 <[^>]*> nop
++0+2cfc <[^>]*> nop
++0+2d00 <[^>]*> nop
++0+2d04 <[^>]*> nop
++0+2d08 <[^>]*> nop
++0+2d0c <[^>]*> nop
++0+2d10 <[^>]*> nop
++0+2d14 <[^>]*> nop
++0+2d18 <[^>]*> nop
++0+2d1c <[^>]*> nop
++0+2d20 <[^>]*> nop
++0+2d24 <[^>]*> nop
++0+2d28 <[^>]*> nop
++0+2d2c <[^>]*> nop
++0+2d30 <[^>]*> nop
++0+2d34 <[^>]*> nop
++0+2d38 <[^>]*> nop
++0+2d3c <[^>]*> nop
++0+2d40 <[^>]*> nop
++0+2d44 <[^>]*> nop
++0+2d48 <[^>]*> nop
++0+2d4c <[^>]*> nop
++0+2d50 <[^>]*> nop
++0+2d54 <[^>]*> nop
++0+2d58 <[^>]*> nop
++0+2d5c <[^>]*> nop
++0+2d60 <[^>]*> nop
++0+2d64 <[^>]*> nop
++0+2d68 <[^>]*> nop
++0+2d6c <[^>]*> nop
++0+2d70 <[^>]*> nop
++0+2d74 <[^>]*> nop
++0+2d78 <[^>]*> nop
++0+2d7c <[^>]*> nop
++0+2d80 <[^>]*> nop
++0+2d84 <[^>]*> nop
++0+2d88 <[^>]*> nop
++0+2d8c <[^>]*> nop
++0+2d90 <[^>]*> nop
++0+2d94 <[^>]*> nop
++0+2d98 <[^>]*> nop
++0+2d9c <[^>]*> nop
++0+2da0 <[^>]*> nop
++0+2da4 <[^>]*> nop
++0+2da8 <[^>]*> nop
++0+2dac <[^>]*> nop
++0+2db0 <[^>]*> nop
++0+2db4 <[^>]*> nop
++0+2db8 <[^>]*> nop
++0+2dbc <[^>]*> nop
++0+2dc0 <[^>]*> nop
++0+2dc4 <[^>]*> nop
++0+2dc8 <[^>]*> nop
++0+2dcc <[^>]*> nop
++0+2dd0 <[^>]*> nop
++0+2dd4 <[^>]*> nop
++0+2dd8 <[^>]*> nop
++0+2ddc <[^>]*> nop
++0+2de0 <[^>]*> nop
++0+2de4 <[^>]*> nop
++0+2de8 <[^>]*> nop
++0+2dec <[^>]*> nop
++0+2df0 <[^>]*> nop
++0+2df4 <[^>]*> nop
++0+2df8 <[^>]*> nop
++0+2dfc <[^>]*> nop
++0+2e00 <[^>]*> nop
++0+2e04 <[^>]*> nop
++0+2e08 <[^>]*> nop
++0+2e0c <[^>]*> nop
++0+2e10 <[^>]*> nop
++0+2e14 <[^>]*> nop
++0+2e18 <[^>]*> nop
++0+2e1c <[^>]*> nop
++0+2e20 <[^>]*> nop
++0+2e24 <[^>]*> nop
++0+2e28 <[^>]*> nop
++0+2e2c <[^>]*> nop
++0+2e30 <[^>]*> nop
++0+2e34 <[^>]*> nop
++0+2e38 <[^>]*> nop
++0+2e3c <[^>]*> nop
++0+2e40 <[^>]*> nop
++0+2e44 <[^>]*> nop
++0+2e48 <[^>]*> nop
++0+2e4c <[^>]*> nop
++0+2e50 <[^>]*> nop
++0+2e54 <[^>]*> nop
++0+2e58 <[^>]*> nop
++0+2e5c <[^>]*> nop
++0+2e60 <[^>]*> nop
++0+2e64 <[^>]*> nop
++0+2e68 <[^>]*> nop
++0+2e6c <[^>]*> nop
++0+2e70 <[^>]*> nop
++0+2e74 <[^>]*> nop
++0+2e78 <[^>]*> nop
++0+2e7c <[^>]*> nop
++0+2e80 <[^>]*> nop
++0+2e84 <[^>]*> nop
++0+2e88 <[^>]*> nop
++0+2e8c <[^>]*> nop
++0+2e90 <[^>]*> nop
++0+2e94 <[^>]*> nop
++0+2e98 <[^>]*> nop
++0+2e9c <[^>]*> nop
++0+2ea0 <[^>]*> nop
++0+2ea4 <[^>]*> nop
++0+2ea8 <[^>]*> nop
++0+2eac <[^>]*> nop
++0+2eb0 <[^>]*> nop
++0+2eb4 <[^>]*> nop
++0+2eb8 <[^>]*> nop
++0+2ebc <[^>]*> nop
++0+2ec0 <[^>]*> nop
++0+2ec4 <[^>]*> nop
++0+2ec8 <[^>]*> nop
++0+2ecc <[^>]*> nop
++0+2ed0 <[^>]*> nop
++0+2ed4 <[^>]*> nop
++0+2ed8 <[^>]*> nop
++0+2edc <[^>]*> nop
++0+2ee0 <[^>]*> nop
++0+2ee4 <[^>]*> nop
++0+2ee8 <[^>]*> nop
++0+2eec <[^>]*> nop
++0+2ef0 <[^>]*> nop
++0+2ef4 <[^>]*> nop
++0+2ef8 <[^>]*> nop
++0+2efc <[^>]*> nop
++0+2f00 <[^>]*> nop
++0+2f04 <[^>]*> nop
++0+2f08 <[^>]*> nop
++0+2f0c <[^>]*> nop
++0+2f10 <[^>]*> nop
++0+2f14 <[^>]*> nop
++0+2f18 <[^>]*> nop
++0+2f1c <[^>]*> nop
++0+2f20 <[^>]*> nop
++0+2f24 <[^>]*> nop
++0+2f28 <[^>]*> nop
++0+2f2c <[^>]*> nop
++0+2f30 <[^>]*> nop
++0+2f34 <[^>]*> nop
++0+2f38 <[^>]*> nop
++0+2f3c <[^>]*> nop
++0+2f40 <[^>]*> nop
++0+2f44 <[^>]*> nop
++0+2f48 <[^>]*> nop
++0+2f4c <[^>]*> nop
++0+2f50 <[^>]*> nop
++0+2f54 <[^>]*> nop
++0+2f58 <[^>]*> nop
++0+2f5c <[^>]*> nop
++0+2f60 <[^>]*> nop
++0+2f64 <[^>]*> nop
++0+2f68 <[^>]*> nop
++0+2f6c <[^>]*> nop
++0+2f70 <[^>]*> nop
++0+2f74 <[^>]*> nop
++0+2f78 <[^>]*> nop
++0+2f7c <[^>]*> nop
++0+2f80 <[^>]*> nop
++0+2f84 <[^>]*> nop
++0+2f88 <[^>]*> nop
++0+2f8c <[^>]*> nop
++0+2f90 <[^>]*> nop
++0+2f94 <[^>]*> nop
++0+2f98 <[^>]*> nop
++0+2f9c <[^>]*> nop
++0+2fa0 <[^>]*> nop
++0+2fa4 <[^>]*> nop
++0+2fa8 <[^>]*> nop
++0+2fac <[^>]*> nop
++0+2fb0 <[^>]*> nop
++0+2fb4 <[^>]*> nop
++0+2fb8 <[^>]*> nop
++0+2fbc <[^>]*> nop
++0+2fc0 <[^>]*> nop
++0+2fc4 <[^>]*> nop
++0+2fc8 <[^>]*> nop
++0+2fcc <[^>]*> nop
++0+2fd0 <[^>]*> nop
++0+2fd4 <[^>]*> nop
++0+2fd8 <[^>]*> nop
++0+2fdc <[^>]*> nop
++0+2fe0 <[^>]*> nop
++0+2fe4 <[^>]*> nop
++0+2fe8 <[^>]*> nop
++0+2fec <[^>]*> nop
++0+2ff0 <[^>]*> nop
++0+2ff4 <[^>]*> nop
++0+2ff8 <[^>]*> nop
++0+2ffc <[^>]*> nop
++0+3000 <[^>]*> nop
++0+3004 <[^>]*> nop
++0+3008 <[^>]*> nop
++0+300c <[^>]*> nop
++0+3010 <[^>]*> nop
++0+3014 <[^>]*> nop
++0+3018 <[^>]*> nop
++0+301c <[^>]*> nop
++0+3020 <[^>]*> nop
++0+3024 <[^>]*> nop
++0+3028 <[^>]*> nop
++0+302c <[^>]*> nop
++0+3030 <[^>]*> nop
++0+3034 <[^>]*> nop
++0+3038 <[^>]*> nop
++0+303c <[^>]*> nop
++0+3040 <[^>]*> nop
++0+3044 <[^>]*> nop
++0+3048 <[^>]*> nop
++0+304c <[^>]*> nop
++0+3050 <[^>]*> nop
++0+3054 <[^>]*> nop
++0+3058 <[^>]*> nop
++0+305c <[^>]*> nop
++0+3060 <[^>]*> nop
++0+3064 <[^>]*> nop
++0+3068 <[^>]*> nop
++0+306c <[^>]*> nop
++0+3070 <[^>]*> nop
++0+3074 <[^>]*> nop
++0+3078 <[^>]*> nop
++0+307c <[^>]*> nop
++0+3080 <[^>]*> nop
++0+3084 <[^>]*> nop
++0+3088 <[^>]*> nop
++0+308c <[^>]*> nop
++0+3090 <[^>]*> nop
++0+3094 <[^>]*> nop
++0+3098 <[^>]*> nop
++0+309c <[^>]*> nop
++0+30a0 <[^>]*> nop
++0+30a4 <[^>]*> nop
++0+30a8 <[^>]*> nop
++0+30ac <[^>]*> nop
++0+30b0 <[^>]*> nop
++0+30b4 <[^>]*> nop
++0+30b8 <[^>]*> nop
++0+30bc <[^>]*> nop
++0+30c0 <[^>]*> nop
++0+30c4 <[^>]*> nop
++0+30c8 <[^>]*> nop
++0+30cc <[^>]*> nop
++0+30d0 <[^>]*> nop
++0+30d4 <[^>]*> nop
++0+30d8 <[^>]*> nop
++0+30dc <[^>]*> nop
++0+30e0 <[^>]*> nop
++0+30e4 <[^>]*> nop
++0+30e8 <[^>]*> nop
++0+30ec <[^>]*> nop
++0+30f0 <[^>]*> nop
++0+30f4 <[^>]*> nop
++0+30f8 <[^>]*> nop
++0+30fc <[^>]*> nop
++0+3100 <[^>]*> nop
++0+3104 <[^>]*> nop
++0+3108 <[^>]*> nop
++0+310c <[^>]*> nop
++0+3110 <[^>]*> nop
++0+3114 <[^>]*> nop
++0+3118 <[^>]*> nop
++0+311c <[^>]*> nop
++0+3120 <[^>]*> nop
++0+3124 <[^>]*> nop
++0+3128 <[^>]*> nop
++0+312c <[^>]*> nop
++0+3130 <[^>]*> nop
++0+3134 <[^>]*> nop
++0+3138 <[^>]*> nop
++0+313c <[^>]*> nop
++0+3140 <[^>]*> nop
++0+3144 <[^>]*> nop
++0+3148 <[^>]*> nop
++0+314c <[^>]*> nop
++0+3150 <[^>]*> nop
++0+3154 <[^>]*> nop
++0+3158 <[^>]*> nop
++0+315c <[^>]*> nop
++0+3160 <[^>]*> nop
++0+3164 <[^>]*> nop
++0+3168 <[^>]*> nop
++0+316c <[^>]*> nop
++0+3170 <[^>]*> nop
++0+3174 <[^>]*> nop
++0+3178 <[^>]*> nop
++0+317c <[^>]*> nop
++0+3180 <[^>]*> nop
++0+3184 <[^>]*> nop
++0+3188 <[^>]*> nop
++0+318c <[^>]*> nop
++0+3190 <[^>]*> nop
++0+3194 <[^>]*> nop
++0+3198 <[^>]*> nop
++0+319c <[^>]*> nop
++0+31a0 <[^>]*> nop
++0+31a4 <[^>]*> nop
++0+31a8 <[^>]*> nop
++0+31ac <[^>]*> nop
++0+31b0 <[^>]*> nop
++0+31b4 <[^>]*> nop
++0+31b8 <[^>]*> nop
++0+31bc <[^>]*> nop
++0+31c0 <[^>]*> nop
++0+31c4 <[^>]*> nop
++0+31c8 <[^>]*> nop
++0+31cc <[^>]*> nop
++0+31d0 <[^>]*> nop
++0+31d4 <[^>]*> nop
++0+31d8 <[^>]*> nop
++0+31dc <[^>]*> nop
++0+31e0 <[^>]*> nop
++0+31e4 <[^>]*> nop
++0+31e8 <[^>]*> nop
++0+31ec <[^>]*> nop
++0+31f0 <[^>]*> nop
++0+31f4 <[^>]*> nop
++0+31f8 <[^>]*> nop
++0+31fc <[^>]*> nop
++0+3200 <[^>]*> nop
++0+3204 <[^>]*> nop
++0+3208 <[^>]*> nop
++0+320c <[^>]*> nop
++0+3210 <[^>]*> nop
++0+3214 <[^>]*> nop
++0+3218 <[^>]*> nop
++0+321c <[^>]*> nop
++0+3220 <[^>]*> nop
++0+3224 <[^>]*> nop
++0+3228 <[^>]*> nop
++0+322c <[^>]*> nop
++0+3230 <[^>]*> nop
++0+3234 <[^>]*> nop
++0+3238 <[^>]*> nop
++0+323c <[^>]*> nop
++0+3240 <[^>]*> nop
++0+3244 <[^>]*> nop
++0+3248 <[^>]*> nop
++0+324c <[^>]*> nop
++0+3250 <[^>]*> nop
++0+3254 <[^>]*> nop
++0+3258 <[^>]*> nop
++0+325c <[^>]*> nop
++0+3260 <[^>]*> nop
++0+3264 <[^>]*> nop
++0+3268 <[^>]*> nop
++0+326c <[^>]*> nop
++0+3270 <[^>]*> nop
++0+3274 <[^>]*> nop
++0+3278 <[^>]*> nop
++0+327c <[^>]*> nop
++0+3280 <[^>]*> nop
++0+3284 <[^>]*> nop
++0+3288 <[^>]*> nop
++0+328c <[^>]*> nop
++0+3290 <[^>]*> nop
++0+3294 <[^>]*> nop
++0+3298 <[^>]*> nop
++0+329c <[^>]*> nop
++0+32a0 <[^>]*> nop
++0+32a4 <[^>]*> nop
++0+32a8 <[^>]*> nop
++0+32ac <[^>]*> nop
++0+32b0 <[^>]*> nop
++0+32b4 <[^>]*> nop
++0+32b8 <[^>]*> nop
++0+32bc <[^>]*> nop
++0+32c0 <[^>]*> nop
++0+32c4 <[^>]*> nop
++0+32c8 <[^>]*> nop
++0+32cc <[^>]*> nop
++0+32d0 <[^>]*> nop
++0+32d4 <[^>]*> nop
++0+32d8 <[^>]*> nop
++0+32dc <[^>]*> nop
++0+32e0 <[^>]*> nop
++0+32e4 <[^>]*> nop
++0+32e8 <[^>]*> nop
++0+32ec <[^>]*> nop
++0+32f0 <[^>]*> nop
++0+32f4 <[^>]*> nop
++0+32f8 <[^>]*> nop
++0+32fc <[^>]*> nop
++0+3300 <[^>]*> nop
++0+3304 <[^>]*> nop
++0+3308 <[^>]*> nop
++0+330c <[^>]*> nop
++0+3310 <[^>]*> nop
++0+3314 <[^>]*> nop
++0+3318 <[^>]*> nop
++0+331c <[^>]*> nop
++0+3320 <[^>]*> nop
++0+3324 <[^>]*> nop
++0+3328 <[^>]*> nop
++0+332c <[^>]*> nop
++0+3330 <[^>]*> nop
++0+3334 <[^>]*> nop
++0+3338 <[^>]*> nop
++0+333c <[^>]*> nop
++0+3340 <[^>]*> nop
++0+3344 <[^>]*> nop
++0+3348 <[^>]*> nop
++0+334c <[^>]*> nop
++0+3350 <[^>]*> nop
++0+3354 <[^>]*> nop
++0+3358 <[^>]*> nop
++0+335c <[^>]*> nop
++0+3360 <[^>]*> nop
++0+3364 <[^>]*> nop
++0+3368 <[^>]*> nop
++0+336c <[^>]*> nop
++0+3370 <[^>]*> nop
++0+3374 <[^>]*> nop
++0+3378 <[^>]*> nop
++0+337c <[^>]*> nop
++0+3380 <[^>]*> nop
++0+3384 <[^>]*> nop
++0+3388 <[^>]*> nop
++0+338c <[^>]*> nop
++0+3390 <[^>]*> nop
++0+3394 <[^>]*> nop
++0+3398 <[^>]*> nop
++0+339c <[^>]*> nop
++0+33a0 <[^>]*> nop
++0+33a4 <[^>]*> nop
++0+33a8 <[^>]*> nop
++0+33ac <[^>]*> nop
++0+33b0 <[^>]*> nop
++0+33b4 <[^>]*> nop
++0+33b8 <[^>]*> nop
++0+33bc <[^>]*> nop
++0+33c0 <[^>]*> nop
++0+33c4 <[^>]*> nop
++0+33c8 <[^>]*> nop
++0+33cc <[^>]*> nop
++0+33d0 <[^>]*> nop
++0+33d4 <[^>]*> nop
++0+33d8 <[^>]*> nop
++0+33dc <[^>]*> nop
++0+33e0 <[^>]*> nop
++0+33e4 <[^>]*> nop
++0+33e8 <[^>]*> nop
++0+33ec <[^>]*> nop
++0+33f0 <[^>]*> nop
++0+33f4 <[^>]*> nop
++0+33f8 <[^>]*> nop
++0+33fc <[^>]*> nop
++0+3400 <[^>]*> nop
++0+3404 <[^>]*> nop
++0+3408 <[^>]*> nop
++0+340c <[^>]*> nop
++0+3410 <[^>]*> nop
++0+3414 <[^>]*> nop
++0+3418 <[^>]*> nop
++0+341c <[^>]*> nop
++0+3420 <[^>]*> nop
++0+3424 <[^>]*> nop
++0+3428 <[^>]*> nop
++0+342c <[^>]*> nop
++0+3430 <[^>]*> nop
++0+3434 <[^>]*> nop
++0+3438 <[^>]*> nop
++0+343c <[^>]*> nop
++0+3440 <[^>]*> nop
++0+3444 <[^>]*> nop
++0+3448 <[^>]*> nop
++0+344c <[^>]*> nop
++0+3450 <[^>]*> nop
++0+3454 <[^>]*> nop
++0+3458 <[^>]*> nop
++0+345c <[^>]*> nop
++0+3460 <[^>]*> nop
++0+3464 <[^>]*> nop
++0+3468 <[^>]*> nop
++0+346c <[^>]*> nop
++0+3470 <[^>]*> nop
++0+3474 <[^>]*> nop
++0+3478 <[^>]*> nop
++0+347c <[^>]*> nop
++0+3480 <[^>]*> nop
++0+3484 <[^>]*> nop
++0+3488 <[^>]*> nop
++0+348c <[^>]*> nop
++0+3490 <[^>]*> nop
++0+3494 <[^>]*> nop
++0+3498 <[^>]*> nop
++0+349c <[^>]*> nop
++0+34a0 <[^>]*> nop
++0+34a4 <[^>]*> nop
++0+34a8 <[^>]*> nop
++0+34ac <[^>]*> nop
++0+34b0 <[^>]*> nop
++0+34b4 <[^>]*> nop
++0+34b8 <[^>]*> nop
++0+34bc <[^>]*> nop
++0+34c0 <[^>]*> nop
++0+34c4 <[^>]*> nop
++0+34c8 <[^>]*> nop
++0+34cc <[^>]*> nop
++0+34d0 <[^>]*> nop
++0+34d4 <[^>]*> nop
++0+34d8 <[^>]*> nop
++0+34dc <[^>]*> nop
++0+34e0 <[^>]*> nop
++0+34e4 <[^>]*> nop
++0+34e8 <[^>]*> nop
++0+34ec <[^>]*> nop
++0+34f0 <[^>]*> nop
++0+34f4 <[^>]*> nop
++0+34f8 <[^>]*> nop
++0+34fc <[^>]*> nop
++0+3500 <[^>]*> nop
++0+3504 <[^>]*> nop
++0+3508 <[^>]*> nop
++0+350c <[^>]*> nop
++0+3510 <[^>]*> nop
++0+3514 <[^>]*> nop
++0+3518 <[^>]*> nop
++0+351c <[^>]*> nop
++0+3520 <[^>]*> nop
++0+3524 <[^>]*> nop
++0+3528 <[^>]*> nop
++0+352c <[^>]*> nop
++0+3530 <[^>]*> nop
++0+3534 <[^>]*> nop
++0+3538 <[^>]*> nop
++0+353c <[^>]*> nop
++0+3540 <[^>]*> nop
++0+3544 <[^>]*> nop
++0+3548 <[^>]*> nop
++0+354c <[^>]*> nop
++0+3550 <[^>]*> nop
++0+3554 <[^>]*> nop
++0+3558 <[^>]*> nop
++0+355c <[^>]*> nop
++0+3560 <[^>]*> nop
++0+3564 <[^>]*> nop
++0+3568 <[^>]*> nop
++0+356c <[^>]*> nop
++0+3570 <[^>]*> nop
++0+3574 <[^>]*> nop
++0+3578 <[^>]*> nop
++0+357c <[^>]*> nop
++0+3580 <[^>]*> nop
++0+3584 <[^>]*> nop
++0+3588 <[^>]*> nop
++0+358c <[^>]*> nop
++0+3590 <[^>]*> nop
++0+3594 <[^>]*> nop
++0+3598 <[^>]*> nop
++0+359c <[^>]*> nop
++0+35a0 <[^>]*> nop
++0+35a4 <[^>]*> nop
++0+35a8 <[^>]*> nop
++0+35ac <[^>]*> nop
++0+35b0 <[^>]*> nop
++0+35b4 <[^>]*> nop
++0+35b8 <[^>]*> nop
++0+35bc <[^>]*> nop
++0+35c0 <[^>]*> nop
++0+35c4 <[^>]*> nop
++0+35c8 <[^>]*> nop
++0+35cc <[^>]*> nop
++0+35d0 <[^>]*> nop
++0+35d4 <[^>]*> nop
++0+35d8 <[^>]*> nop
++0+35dc <[^>]*> nop
++0+35e0 <[^>]*> nop
++0+35e4 <[^>]*> nop
++0+35e8 <[^>]*> nop
++0+35ec <[^>]*> nop
++0+35f0 <[^>]*> nop
++0+35f4 <[^>]*> nop
++0+35f8 <[^>]*> nop
++0+35fc <[^>]*> nop
++0+3600 <[^>]*> nop
++0+3604 <[^>]*> nop
++0+3608 <[^>]*> nop
++0+360c <[^>]*> nop
++0+3610 <[^>]*> nop
++0+3614 <[^>]*> nop
++0+3618 <[^>]*> nop
++0+361c <[^>]*> nop
++0+3620 <[^>]*> nop
++0+3624 <[^>]*> nop
++0+3628 <[^>]*> nop
++0+362c <[^>]*> nop
++0+3630 <[^>]*> nop
++0+3634 <[^>]*> nop
++0+3638 <[^>]*> nop
++0+363c <[^>]*> nop
++0+3640 <[^>]*> nop
++0+3644 <[^>]*> nop
++0+3648 <[^>]*> nop
++0+364c <[^>]*> nop
++0+3650 <[^>]*> nop
++0+3654 <[^>]*> nop
++0+3658 <[^>]*> nop
++0+365c <[^>]*> nop
++0+3660 <[^>]*> nop
++0+3664 <[^>]*> nop
++0+3668 <[^>]*> nop
++0+366c <[^>]*> nop
++0+3670 <[^>]*> nop
++0+3674 <[^>]*> nop
++0+3678 <[^>]*> nop
++0+367c <[^>]*> nop
++0+3680 <[^>]*> nop
++0+3684 <[^>]*> nop
++0+3688 <[^>]*> nop
++0+368c <[^>]*> nop
++0+3690 <[^>]*> nop
++0+3694 <[^>]*> nop
++0+3698 <[^>]*> nop
++0+369c <[^>]*> nop
++0+36a0 <[^>]*> nop
++0+36a4 <[^>]*> nop
++0+36a8 <[^>]*> nop
++0+36ac <[^>]*> nop
++0+36b0 <[^>]*> nop
++0+36b4 <[^>]*> nop
++0+36b8 <[^>]*> nop
++0+36bc <[^>]*> nop
++0+36c0 <[^>]*> nop
++0+36c4 <[^>]*> nop
++0+36c8 <[^>]*> nop
++0+36cc <[^>]*> nop
++0+36d0 <[^>]*> nop
++0+36d4 <[^>]*> nop
++0+36d8 <[^>]*> nop
++0+36dc <[^>]*> nop
++0+36e0 <[^>]*> nop
++0+36e4 <[^>]*> nop
++0+36e8 <[^>]*> nop
++0+36ec <[^>]*> nop
++0+36f0 <[^>]*> nop
++0+36f4 <[^>]*> nop
++0+36f8 <[^>]*> nop
++0+36fc <[^>]*> nop
++0+3700 <[^>]*> nop
++0+3704 <[^>]*> nop
++0+3708 <[^>]*> nop
++0+370c <[^>]*> nop
++0+3710 <[^>]*> nop
++0+3714 <[^>]*> nop
++0+3718 <[^>]*> nop
++0+371c <[^>]*> nop
++0+3720 <[^>]*> nop
++0+3724 <[^>]*> nop
++0+3728 <[^>]*> nop
++0+372c <[^>]*> nop
++0+3730 <[^>]*> nop
++0+3734 <[^>]*> nop
++0+3738 <[^>]*> nop
++0+373c <[^>]*> nop
++0+3740 <[^>]*> nop
++0+3744 <[^>]*> nop
++0+3748 <[^>]*> nop
++0+374c <[^>]*> nop
++0+3750 <[^>]*> nop
++0+3754 <[^>]*> nop
++0+3758 <[^>]*> nop
++0+375c <[^>]*> nop
++0+3760 <[^>]*> nop
++0+3764 <[^>]*> nop
++0+3768 <[^>]*> nop
++0+376c <[^>]*> nop
++0+3770 <[^>]*> nop
++0+3774 <[^>]*> nop
++0+3778 <[^>]*> nop
++0+377c <[^>]*> nop
++0+3780 <[^>]*> nop
++0+3784 <[^>]*> nop
++0+3788 <[^>]*> nop
++0+378c <[^>]*> nop
++0+3790 <[^>]*> nop
++0+3794 <[^>]*> nop
++0+3798 <[^>]*> nop
++0+379c <[^>]*> nop
++0+37a0 <[^>]*> nop
++0+37a4 <[^>]*> nop
++0+37a8 <[^>]*> nop
++0+37ac <[^>]*> nop
++0+37b0 <[^>]*> nop
++0+37b4 <[^>]*> nop
++0+37b8 <[^>]*> nop
++0+37bc <[^>]*> nop
++0+37c0 <[^>]*> nop
++0+37c4 <[^>]*> nop
++0+37c8 <[^>]*> nop
++0+37cc <[^>]*> nop
++0+37d0 <[^>]*> nop
++0+37d4 <[^>]*> nop
++0+37d8 <[^>]*> nop
++0+37dc <[^>]*> nop
++0+37e0 <[^>]*> nop
++0+37e4 <[^>]*> nop
++0+37e8 <[^>]*> nop
++0+37ec <[^>]*> nop
++0+37f0 <[^>]*> nop
++0+37f4 <[^>]*> nop
++0+37f8 <[^>]*> nop
++0+37fc <[^>]*> nop
++0+3800 <[^>]*> nop
++0+3804 <[^>]*> nop
++0+3808 <[^>]*> nop
++0+380c <[^>]*> nop
++0+3810 <[^>]*> nop
++0+3814 <[^>]*> nop
++0+3818 <[^>]*> nop
++0+381c <[^>]*> nop
++0+3820 <[^>]*> nop
++0+3824 <[^>]*> nop
++0+3828 <[^>]*> nop
++0+382c <[^>]*> nop
++0+3830 <[^>]*> nop
++0+3834 <[^>]*> nop
++0+3838 <[^>]*> nop
++0+383c <[^>]*> nop
++0+3840 <[^>]*> nop
++0+3844 <[^>]*> nop
++0+3848 <[^>]*> nop
++0+384c <[^>]*> nop
++0+3850 <[^>]*> nop
++0+3854 <[^>]*> nop
++0+3858 <[^>]*> nop
++0+385c <[^>]*> nop
++0+3860 <[^>]*> nop
++0+3864 <[^>]*> nop
++0+3868 <[^>]*> nop
++0+386c <[^>]*> nop
++0+3870 <[^>]*> nop
++0+3874 <[^>]*> nop
++0+3878 <[^>]*> nop
++0+387c <[^>]*> nop
++0+3880 <[^>]*> nop
++0+3884 <[^>]*> nop
++0+3888 <[^>]*> nop
++0+388c <[^>]*> nop
++0+3890 <[^>]*> nop
++0+3894 <[^>]*> nop
++0+3898 <[^>]*> nop
++0+389c <[^>]*> nop
++0+38a0 <[^>]*> nop
++0+38a4 <[^>]*> nop
++0+38a8 <[^>]*> nop
++0+38ac <[^>]*> nop
++0+38b0 <[^>]*> nop
++0+38b4 <[^>]*> nop
++0+38b8 <[^>]*> nop
++0+38bc <[^>]*> nop
++0+38c0 <[^>]*> nop
++0+38c4 <[^>]*> nop
++0+38c8 <[^>]*> nop
++0+38cc <[^>]*> nop
++0+38d0 <[^>]*> nop
++0+38d4 <[^>]*> nop
++0+38d8 <[^>]*> nop
++0+38dc <[^>]*> nop
++0+38e0 <[^>]*> nop
++0+38e4 <[^>]*> nop
++0+38e8 <[^>]*> nop
++0+38ec <[^>]*> nop
++0+38f0 <[^>]*> nop
++0+38f4 <[^>]*> nop
++0+38f8 <[^>]*> nop
++0+38fc <[^>]*> nop
++0+3900 <[^>]*> nop
++0+3904 <[^>]*> nop
++0+3908 <[^>]*> nop
++0+390c <[^>]*> nop
++0+3910 <[^>]*> nop
++0+3914 <[^>]*> nop
++0+3918 <[^>]*> nop
++0+391c <[^>]*> nop
++0+3920 <[^>]*> nop
++0+3924 <[^>]*> nop
++0+3928 <[^>]*> nop
++0+392c <[^>]*> nop
++0+3930 <[^>]*> nop
++0+3934 <[^>]*> nop
++0+3938 <[^>]*> nop
++0+393c <[^>]*> nop
++0+3940 <[^>]*> nop
++0+3944 <[^>]*> nop
++0+3948 <[^>]*> nop
++0+394c <[^>]*> nop
++0+3950 <[^>]*> nop
++0+3954 <[^>]*> nop
++0+3958 <[^>]*> nop
++0+395c <[^>]*> nop
++0+3960 <[^>]*> nop
++0+3964 <[^>]*> nop
++0+3968 <[^>]*> nop
++0+396c <[^>]*> nop
++0+3970 <[^>]*> nop
++0+3974 <[^>]*> nop
++0+3978 <[^>]*> nop
++0+397c <[^>]*> nop
++0+3980 <[^>]*> nop
++0+3984 <[^>]*> nop
++0+3988 <[^>]*> nop
++0+398c <[^>]*> nop
++0+3990 <[^>]*> nop
++0+3994 <[^>]*> nop
++0+3998 <[^>]*> nop
++0+399c <[^>]*> nop
++0+39a0 <[^>]*> nop
++0+39a4 <[^>]*> nop
++0+39a8 <[^>]*> nop
++0+39ac <[^>]*> nop
++0+39b0 <[^>]*> nop
++0+39b4 <[^>]*> nop
++0+39b8 <[^>]*> nop
++0+39bc <[^>]*> nop
++0+39c0 <[^>]*> nop
++0+39c4 <[^>]*> nop
++0+39c8 <[^>]*> nop
++0+39cc <[^>]*> nop
++0+39d0 <[^>]*> nop
++0+39d4 <[^>]*> nop
++0+39d8 <[^>]*> nop
++0+39dc <[^>]*> nop
++0+39e0 <[^>]*> nop
++0+39e4 <[^>]*> nop
++0+39e8 <[^>]*> nop
++0+39ec <[^>]*> nop
++0+39f0 <[^>]*> nop
++0+39f4 <[^>]*> nop
++0+39f8 <[^>]*> nop
++0+39fc <[^>]*> nop
++0+3a00 <[^>]*> nop
++0+3a04 <[^>]*> nop
++0+3a08 <[^>]*> nop
++0+3a0c <[^>]*> nop
++0+3a10 <[^>]*> nop
++0+3a14 <[^>]*> nop
++0+3a18 <[^>]*> nop
++0+3a1c <[^>]*> nop
++0+3a20 <[^>]*> nop
++0+3a24 <[^>]*> nop
++0+3a28 <[^>]*> nop
++0+3a2c <[^>]*> nop
++0+3a30 <[^>]*> nop
++0+3a34 <[^>]*> nop
++0+3a38 <[^>]*> nop
++0+3a3c <[^>]*> nop
++0+3a40 <[^>]*> nop
++0+3a44 <[^>]*> nop
++0+3a48 <[^>]*> nop
++0+3a4c <[^>]*> nop
++0+3a50 <[^>]*> nop
++0+3a54 <[^>]*> nop
++0+3a58 <[^>]*> nop
++0+3a5c <[^>]*> nop
++0+3a60 <[^>]*> nop
++0+3a64 <[^>]*> nop
++0+3a68 <[^>]*> nop
++0+3a6c <[^>]*> nop
++0+3a70 <[^>]*> nop
++0+3a74 <[^>]*> nop
++0+3a78 <[^>]*> nop
++0+3a7c <[^>]*> nop
++0+3a80 <[^>]*> nop
++0+3a84 <[^>]*> nop
++0+3a88 <[^>]*> nop
++0+3a8c <[^>]*> nop
++0+3a90 <[^>]*> nop
++0+3a94 <[^>]*> nop
++0+3a98 <[^>]*> nop
++0+3a9c <[^>]*> nop
++0+3aa0 <[^>]*> nop
++0+3aa4 <[^>]*> nop
++0+3aa8 <[^>]*> nop
++0+3aac <[^>]*> nop
++0+3ab0 <[^>]*> nop
++0+3ab4 <[^>]*> nop
++0+3ab8 <[^>]*> nop
++0+3abc <[^>]*> nop
++0+3ac0 <[^>]*> nop
++0+3ac4 <[^>]*> nop
++0+3ac8 <[^>]*> nop
++0+3acc <[^>]*> nop
++0+3ad0 <[^>]*> nop
++0+3ad4 <[^>]*> nop
++0+3ad8 <[^>]*> nop
++0+3adc <[^>]*> nop
++0+3ae0 <[^>]*> nop
++0+3ae4 <[^>]*> nop
++0+3ae8 <[^>]*> nop
++0+3aec <[^>]*> nop
++0+3af0 <[^>]*> nop
++0+3af4 <[^>]*> nop
++0+3af8 <[^>]*> nop
++0+3afc <[^>]*> nop
++0+3b00 <[^>]*> nop
++0+3b04 <[^>]*> nop
++0+3b08 <[^>]*> nop
++0+3b0c <[^>]*> nop
++0+3b10 <[^>]*> nop
++0+3b14 <[^>]*> nop
++0+3b18 <[^>]*> nop
++0+3b1c <[^>]*> nop
++0+3b20 <[^>]*> nop
++0+3b24 <[^>]*> nop
++0+3b28 <[^>]*> nop
++0+3b2c <[^>]*> nop
++0+3b30 <[^>]*> nop
++0+3b34 <[^>]*> nop
++0+3b38 <[^>]*> nop
++0+3b3c <[^>]*> nop
++0+3b40 <[^>]*> nop
++0+3b44 <[^>]*> nop
++0+3b48 <[^>]*> nop
++0+3b4c <[^>]*> nop
++0+3b50 <[^>]*> nop
++0+3b54 <[^>]*> nop
++0+3b58 <[^>]*> nop
++0+3b5c <[^>]*> nop
++0+3b60 <[^>]*> nop
++0+3b64 <[^>]*> nop
++0+3b68 <[^>]*> nop
++0+3b6c <[^>]*> nop
++0+3b70 <[^>]*> nop
++0+3b74 <[^>]*> nop
++0+3b78 <[^>]*> nop
++0+3b7c <[^>]*> nop
++0+3b80 <[^>]*> nop
++0+3b84 <[^>]*> nop
++0+3b88 <[^>]*> nop
++0+3b8c <[^>]*> nop
++0+3b90 <[^>]*> nop
++0+3b94 <[^>]*> nop
++0+3b98 <[^>]*> nop
++0+3b9c <[^>]*> nop
++0+3ba0 <[^>]*> nop
++0+3ba4 <[^>]*> nop
++0+3ba8 <[^>]*> nop
++0+3bac <[^>]*> nop
++0+3bb0 <[^>]*> nop
++0+3bb4 <[^>]*> nop
++0+3bb8 <[^>]*> nop
++0+3bbc <[^>]*> nop
++0+3bc0 <[^>]*> nop
++0+3bc4 <[^>]*> nop
++0+3bc8 <[^>]*> nop
++0+3bcc <[^>]*> nop
++0+3bd0 <[^>]*> nop
++0+3bd4 <[^>]*> nop
++0+3bd8 <[^>]*> nop
++0+3bdc <[^>]*> nop
++0+3be0 <[^>]*> nop
++0+3be4 <[^>]*> nop
++0+3be8 <[^>]*> nop
++0+3bec <[^>]*> nop
++0+3bf0 <[^>]*> nop
++0+3bf4 <[^>]*> nop
++0+3bf8 <[^>]*> nop
++0+3bfc <[^>]*> nop
++0+3c00 <[^>]*> nop
++0+3c04 <[^>]*> nop
++0+3c08 <[^>]*> nop
++0+3c0c <[^>]*> nop
++0+3c10 <[^>]*> nop
++0+3c14 <[^>]*> nop
++0+3c18 <[^>]*> nop
++0+3c1c <[^>]*> nop
++0+3c20 <[^>]*> nop
++0+3c24 <[^>]*> nop
++0+3c28 <[^>]*> nop
++0+3c2c <[^>]*> nop
++0+3c30 <[^>]*> nop
++0+3c34 <[^>]*> nop
++0+3c38 <[^>]*> nop
++0+3c3c <[^>]*> nop
++0+3c40 <[^>]*> nop
++0+3c44 <[^>]*> nop
++0+3c48 <[^>]*> nop
++0+3c4c <[^>]*> nop
++0+3c50 <[^>]*> nop
++0+3c54 <[^>]*> nop
++0+3c58 <[^>]*> nop
++0+3c5c <[^>]*> nop
++0+3c60 <[^>]*> nop
++0+3c64 <[^>]*> nop
++0+3c68 <[^>]*> nop
++0+3c6c <[^>]*> nop
++0+3c70 <[^>]*> nop
++0+3c74 <[^>]*> nop
++0+3c78 <[^>]*> nop
++0+3c7c <[^>]*> nop
++0+3c80 <[^>]*> nop
++0+3c84 <[^>]*> nop
++0+3c88 <[^>]*> nop
++0+3c8c <[^>]*> nop
++0+3c90 <[^>]*> nop
++0+3c94 <[^>]*> nop
++0+3c98 <[^>]*> nop
++0+3c9c <[^>]*> nop
++0+3ca0 <[^>]*> nop
++0+3ca4 <[^>]*> nop
++0+3ca8 <[^>]*> nop
++0+3cac <[^>]*> nop
++0+3cb0 <[^>]*> nop
++0+3cb4 <[^>]*> nop
++0+3cb8 <[^>]*> nop
++0+3cbc <[^>]*> nop
++0+3cc0 <[^>]*> nop
++0+3cc4 <[^>]*> nop
++0+3cc8 <[^>]*> nop
++0+3ccc <[^>]*> nop
++0+3cd0 <[^>]*> nop
++0+3cd4 <[^>]*> nop
++0+3cd8 <[^>]*> nop
++0+3cdc <[^>]*> nop
++0+3ce0 <[^>]*> nop
++0+3ce4 <[^>]*> nop
++0+3ce8 <[^>]*> nop
++0+3cec <[^>]*> nop
++0+3cf0 <[^>]*> nop
++0+3cf4 <[^>]*> nop
++0+3cf8 <[^>]*> nop
++0+3cfc <[^>]*> nop
++0+3d00 <[^>]*> nop
++0+3d04 <[^>]*> nop
++0+3d08 <[^>]*> nop
++0+3d0c <[^>]*> nop
++0+3d10 <[^>]*> nop
++0+3d14 <[^>]*> nop
++0+3d18 <[^>]*> nop
++0+3d1c <[^>]*> nop
++0+3d20 <[^>]*> nop
++0+3d24 <[^>]*> nop
++0+3d28 <[^>]*> nop
++0+3d2c <[^>]*> nop
++0+3d30 <[^>]*> nop
++0+3d34 <[^>]*> nop
++0+3d38 <[^>]*> nop
++0+3d3c <[^>]*> nop
++0+3d40 <[^>]*> nop
++0+3d44 <[^>]*> nop
++0+3d48 <[^>]*> nop
++0+3d4c <[^>]*> nop
++0+3d50 <[^>]*> nop
++0+3d54 <[^>]*> nop
++0+3d58 <[^>]*> nop
++0+3d5c <[^>]*> nop
++0+3d60 <[^>]*> nop
++0+3d64 <[^>]*> nop
++0+3d68 <[^>]*> nop
++0+3d6c <[^>]*> nop
++0+3d70 <[^>]*> nop
++0+3d74 <[^>]*> nop
++0+3d78 <[^>]*> nop
++0+3d7c <[^>]*> nop
++0+3d80 <[^>]*> nop
++0+3d84 <[^>]*> nop
++0+3d88 <[^>]*> nop
++0+3d8c <[^>]*> nop
++0+3d90 <[^>]*> nop
++0+3d94 <[^>]*> nop
++0+3d98 <[^>]*> nop
++0+3d9c <[^>]*> nop
++0+3da0 <[^>]*> nop
++0+3da4 <[^>]*> nop
++0+3da8 <[^>]*> nop
++0+3dac <[^>]*> nop
++0+3db0 <[^>]*> nop
++0+3db4 <[^>]*> nop
++0+3db8 <[^>]*> nop
++0+3dbc <[^>]*> nop
++0+3dc0 <[^>]*> nop
++0+3dc4 <[^>]*> nop
++0+3dc8 <[^>]*> nop
++0+3dcc <[^>]*> nop
++0+3dd0 <[^>]*> nop
++0+3dd4 <[^>]*> nop
++0+3dd8 <[^>]*> nop
++0+3ddc <[^>]*> nop
++0+3de0 <[^>]*> nop
++0+3de4 <[^>]*> nop
++0+3de8 <[^>]*> nop
++0+3dec <[^>]*> nop
++0+3df0 <[^>]*> nop
++0+3df4 <[^>]*> nop
++0+3df8 <[^>]*> nop
++0+3dfc <[^>]*> nop
++0+3e00 <[^>]*> nop
++0+3e04 <[^>]*> nop
++0+3e08 <[^>]*> nop
++0+3e0c <[^>]*> nop
++0+3e10 <[^>]*> nop
++0+3e14 <[^>]*> nop
++0+3e18 <[^>]*> nop
++0+3e1c <[^>]*> nop
++0+3e20 <[^>]*> nop
++0+3e24 <[^>]*> nop
++0+3e28 <[^>]*> nop
++0+3e2c <[^>]*> nop
++0+3e30 <[^>]*> nop
++0+3e34 <[^>]*> nop
++0+3e38 <[^>]*> nop
++0+3e3c <[^>]*> nop
++0+3e40 <[^>]*> nop
++0+3e44 <[^>]*> nop
++0+3e48 <[^>]*> nop
++0+3e4c <[^>]*> nop
++0+3e50 <[^>]*> nop
++0+3e54 <[^>]*> nop
++0+3e58 <[^>]*> nop
++0+3e5c <[^>]*> nop
++0+3e60 <[^>]*> nop
++0+3e64 <[^>]*> nop
++0+3e68 <[^>]*> nop
++0+3e6c <[^>]*> nop
++0+3e70 <[^>]*> nop
++0+3e74 <[^>]*> nop
++0+3e78 <[^>]*> nop
++0+3e7c <[^>]*> nop
++0+3e80 <[^>]*> nop
++0+3e84 <[^>]*> nop
++0+3e88 <[^>]*> nop
++0+3e8c <[^>]*> nop
++0+3e90 <[^>]*> nop
++0+3e94 <[^>]*> nop
++0+3e98 <[^>]*> nop
++0+3e9c <[^>]*> nop
++0+3ea0 <[^>]*> nop
++0+3ea4 <[^>]*> nop
++0+3ea8 <[^>]*> nop
++0+3eac <[^>]*> nop
++0+3eb0 <[^>]*> nop
++0+3eb4 <[^>]*> nop
++0+3eb8 <[^>]*> nop
++0+3ebc <[^>]*> nop
++0+3ec0 <[^>]*> nop
++0+3ec4 <[^>]*> nop
++0+3ec8 <[^>]*> nop
++0+3ecc <[^>]*> nop
++0+3ed0 <[^>]*> nop
++0+3ed4 <[^>]*> nop
++0+3ed8 <[^>]*> nop
++0+3edc <[^>]*> nop
++0+3ee0 <[^>]*> nop
++0+3ee4 <[^>]*> nop
++0+3ee8 <[^>]*> nop
++0+3eec <[^>]*> nop
++0+3ef0 <[^>]*> nop
++0+3ef4 <[^>]*> nop
++0+3ef8 <[^>]*> nop
++0+3efc <[^>]*> nop
++0+3f00 <[^>]*> nop
++0+3f04 <[^>]*> nop
++0+3f08 <[^>]*> nop
++0+3f0c <[^>]*> nop
++0+3f10 <[^>]*> nop
++0+3f14 <[^>]*> nop
++0+3f18 <[^>]*> nop
++0+3f1c <[^>]*> nop
++0+3f20 <[^>]*> nop
++0+3f24 <[^>]*> nop
++0+3f28 <[^>]*> nop
++0+3f2c <[^>]*> nop
++0+3f30 <[^>]*> nop
++0+3f34 <[^>]*> nop
++0+3f38 <[^>]*> nop
++0+3f3c <[^>]*> nop
++0+3f40 <[^>]*> nop
++0+3f44 <[^>]*> nop
++0+3f48 <[^>]*> nop
++0+3f4c <[^>]*> nop
++0+3f50 <[^>]*> nop
++0+3f54 <[^>]*> nop
++0+3f58 <[^>]*> nop
++0+3f5c <[^>]*> nop
++0+3f60 <[^>]*> nop
++0+3f64 <[^>]*> nop
++0+3f68 <[^>]*> nop
++0+3f6c <[^>]*> nop
++0+3f70 <[^>]*> nop
++0+3f74 <[^>]*> nop
++0+3f78 <[^>]*> nop
++0+3f7c <[^>]*> nop
++0+3f80 <[^>]*> nop
++0+3f84 <[^>]*> nop
++0+3f88 <[^>]*> nop
++0+3f8c <[^>]*> nop
++0+3f90 <[^>]*> nop
++0+3f94 <[^>]*> nop
++0+3f98 <[^>]*> nop
++0+3f9c <[^>]*> nop
++0+3fa0 <[^>]*> nop
++0+3fa4 <[^>]*> nop
++0+3fa8 <[^>]*> nop
++0+3fac <[^>]*> nop
++0+3fb0 <[^>]*> nop
++0+3fb4 <[^>]*> nop
++0+3fb8 <[^>]*> nop
++0+3fbc <[^>]*> nop
++0+3fc0 <[^>]*> nop
++0+3fc4 <[^>]*> nop
++0+3fc8 <[^>]*> nop
++0+3fcc <[^>]*> nop
++0+3fd0 <[^>]*> nop
++0+3fd4 <[^>]*> nop
++0+3fd8 <[^>]*> nop
++0+3fdc <[^>]*> nop
++0+3fe0 <[^>]*> nop
++0+3fe4 <[^>]*> nop
++0+3fe8 <[^>]*> nop
++0+3fec <[^>]*> nop
++0+3ff0 <[^>]*> nop
++0+3ff4 <[^>]*> nop
++0+3ff8 <[^>]*> nop
++0+3ffc <[^>]*> nop
++0+4000 <[^>]*> nop
++0+4004 <[^>]*> nop
++0+4008 <[^>]*> nop
++0+400c <[^>]*> nop
++0+4010 <[^>]*> nop
++0+4014 <[^>]*> nop
++0+4018 <[^>]*> nop
++0+401c <[^>]*> nop
++0+4020 <[^>]*> nop
++0+4024 <[^>]*> nop
++0+4028 <[^>]*> nop
++0+402c <[^>]*> nop
++0+4030 <[^>]*> nop
++0+4034 <[^>]*> nop
++0+4038 <[^>]*> nop
++0+403c <[^>]*> nop
++0+4040 <[^>]*> nop
++0+4044 <[^>]*> nop
++0+4048 <[^>]*> nop
++0+404c <[^>]*> nop
++0+4050 <[^>]*> nop
++0+4054 <[^>]*> nop
++0+4058 <[^>]*> nop
++0+405c <[^>]*> nop
++0+4060 <[^>]*> nop
++0+4064 <[^>]*> nop
++0+4068 <[^>]*> nop
++0+406c <[^>]*> nop
++0+4070 <[^>]*> nop
++0+4074 <[^>]*> nop
++0+4078 <[^>]*> nop
++0+407c <[^>]*> nop
++0+4080 <[^>]*> nop
++0+4084 <[^>]*> nop
++0+4088 <[^>]*> nop
++0+408c <[^>]*> nop
++0+4090 <[^>]*> nop
++0+4094 <[^>]*> nop
++0+4098 <[^>]*> nop
++0+409c <[^>]*> nop
++0+40a0 <[^>]*> nop
++0+40a4 <[^>]*> nop
++0+40a8 <[^>]*> nop
++0+40ac <[^>]*> nop
++0+40b0 <[^>]*> nop
++0+40b4 <[^>]*> nop
++0+40b8 <[^>]*> nop
++0+40bc <[^>]*> nop
++0+40c0 <[^>]*> nop
++0+40c4 <[^>]*> nop
++0+40c8 <[^>]*> nop
++0+40cc <[^>]*> nop
++0+40d0 <[^>]*> nop
++0+40d4 <[^>]*> nop
++0+40d8 <[^>]*> nop
++0+40dc <[^>]*> nop
++0+40e0 <[^>]*> nop
++0+40e4 <[^>]*> nop
++0+40e8 <[^>]*> nop
++0+40ec <[^>]*> nop
++0+40f0 <[^>]*> nop
++0+40f4 <[^>]*> nop
++0+40f8 <[^>]*> nop
++0+40fc <[^>]*> nop
++0+4100 <[^>]*> nop
++0+4104 <[^>]*> nop
++0+4108 <[^>]*> nop
++0+410c <[^>]*> nop
++0+4110 <[^>]*> nop
++0+4114 <[^>]*> nop
++0+4118 <[^>]*> nop
++0+411c <[^>]*> nop
++0+4120 <[^>]*> nop
++0+4124 <[^>]*> nop
++0+4128 <[^>]*> nop
++0+412c <[^>]*> nop
++0+4130 <[^>]*> nop
++0+4134 <[^>]*> nop
++0+4138 <[^>]*> nop
++0+413c <[^>]*> nop
++0+4140 <[^>]*> nop
++0+4144 <[^>]*> nop
++0+4148 <[^>]*> nop
++0+414c <[^>]*> nop
++0+4150 <[^>]*> nop
++0+4154 <[^>]*> nop
++0+4158 <[^>]*> nop
++0+415c <[^>]*> nop
++0+4160 <[^>]*> nop
++0+4164 <[^>]*> nop
++0+4168 <[^>]*> nop
++0+416c <[^>]*> nop
++0+4170 <[^>]*> nop
++0+4174 <[^>]*> nop
++0+4178 <[^>]*> nop
++0+417c <[^>]*> nop
++0+4180 <[^>]*> nop
++0+4184 <[^>]*> nop
++0+4188 <[^>]*> nop
++0+418c <[^>]*> nop
++0+4190 <[^>]*> nop
++0+4194 <[^>]*> nop
++0+4198 <[^>]*> nop
++0+419c <[^>]*> nop
++0+41a0 <[^>]*> nop
++0+41a4 <[^>]*> nop
++0+41a8 <[^>]*> nop
++0+41ac <[^>]*> nop
++0+41b0 <[^>]*> nop
++0+41b4 <[^>]*> nop
++0+41b8 <[^>]*> nop
++0+41bc <[^>]*> nop
++0+41c0 <[^>]*> nop
++0+41c4 <[^>]*> nop
++0+41c8 <[^>]*> nop
++0+41cc <[^>]*> nop
++0+41d0 <[^>]*> nop
++0+41d4 <[^>]*> nop
++0+41d8 <[^>]*> nop
++0+41dc <[^>]*> nop
++0+41e0 <[^>]*> nop
++0+41e4 <[^>]*> nop
++0+41e8 <[^>]*> nop
++0+41ec <[^>]*> nop
++0+41f0 <[^>]*> nop
++0+41f4 <[^>]*> nop
++0+41f8 <[^>]*> nop
++0+41fc <[^>]*> nop
++0+4200 <[^>]*> nop
++0+4204 <[^>]*> nop
++0+4208 <[^>]*> nop
++0+420c <[^>]*> nop
++0+4210 <[^>]*> nop
++0+4214 <[^>]*> nop
++0+4218 <[^>]*> nop
++0+421c <[^>]*> nop
++0+4220 <[^>]*> nop
++0+4224 <[^>]*> nop
++0+4228 <[^>]*> nop
++0+422c <[^>]*> nop
++0+4230 <[^>]*> nop
++0+4234 <[^>]*> nop
++0+4238 <[^>]*> nop
++0+423c <[^>]*> nop
++0+4240 <[^>]*> nop
++0+4244 <[^>]*> nop
++0+4248 <[^>]*> nop
++0+424c <[^>]*> nop
++0+4250 <[^>]*> nop
++0+4254 <[^>]*> nop
++0+4258 <[^>]*> nop
++0+425c <[^>]*> nop
++0+4260 <[^>]*> nop
++0+4264 <[^>]*> nop
++0+4268 <[^>]*> nop
++0+426c <[^>]*> nop
++0+4270 <[^>]*> nop
++0+4274 <[^>]*> nop
++0+4278 <[^>]*> nop
++0+427c <[^>]*> nop
++0+4280 <[^>]*> nop
++0+4284 <[^>]*> nop
++0+4288 <[^>]*> nop
++0+428c <[^>]*> nop
++0+4290 <[^>]*> nop
++0+4294 <[^>]*> nop
++0+4298 <[^>]*> nop
++0+429c <[^>]*> nop
++0+42a0 <[^>]*> nop
++0+42a4 <[^>]*> nop
++0+42a8 <[^>]*> nop
++0+42ac <[^>]*> nop
++0+42b0 <[^>]*> nop
++0+42b4 <[^>]*> nop
++0+42b8 <[^>]*> nop
++0+42bc <[^>]*> nop
++0+42c0 <[^>]*> nop
++0+42c4 <[^>]*> nop
++0+42c8 <[^>]*> nop
++0+42cc <[^>]*> nop
++0+42d0 <[^>]*> nop
++0+42d4 <[^>]*> nop
++0+42d8 <[^>]*> nop
++0+42dc <[^>]*> nop
++0+42e0 <[^>]*> nop
++0+42e4 <[^>]*> nop
++0+42e8 <[^>]*> nop
++0+42ec <[^>]*> nop
++0+42f0 <[^>]*> nop
++0+42f4 <[^>]*> nop
++0+42f8 <[^>]*> nop
++0+42fc <[^>]*> nop
++0+4300 <[^>]*> nop
++0+4304 <[^>]*> nop
++0+4308 <[^>]*> nop
++0+430c <[^>]*> nop
++0+4310 <[^>]*> nop
++0+4314 <[^>]*> nop
++0+4318 <[^>]*> nop
++0+431c <[^>]*> nop
++0+4320 <[^>]*> nop
++0+4324 <[^>]*> nop
++0+4328 <[^>]*> nop
++0+432c <[^>]*> nop
++0+4330 <[^>]*> nop
++0+4334 <[^>]*> nop
++0+4338 <[^>]*> nop
++0+433c <[^>]*> nop
++0+4340 <[^>]*> nop
++0+4344 <[^>]*> nop
++0+4348 <[^>]*> nop
++0+434c <[^>]*> nop
++0+4350 <[^>]*> nop
++0+4354 <[^>]*> nop
++0+4358 <[^>]*> nop
++0+435c <[^>]*> nop
++0+4360 <[^>]*> nop
++0+4364 <[^>]*> nop
++0+4368 <[^>]*> nop
++0+436c <[^>]*> nop
++0+4370 <[^>]*> nop
++0+4374 <[^>]*> nop
++0+4378 <[^>]*> nop
++0+437c <[^>]*> nop
++0+4380 <[^>]*> nop
++0+4384 <[^>]*> nop
++0+4388 <[^>]*> nop
++0+438c <[^>]*> nop
++0+4390 <[^>]*> nop
++0+4394 <[^>]*> nop
++0+4398 <[^>]*> nop
++0+439c <[^>]*> nop
++0+43a0 <[^>]*> nop
++0+43a4 <[^>]*> nop
++0+43a8 <[^>]*> nop
++0+43ac <[^>]*> nop
++0+43b0 <[^>]*> nop
++0+43b4 <[^>]*> nop
++0+43b8 <[^>]*> nop
++0+43bc <[^>]*> nop
++0+43c0 <[^>]*> nop
++0+43c4 <[^>]*> nop
++0+43c8 <[^>]*> nop
++0+43cc <[^>]*> nop
++0+43d0 <[^>]*> nop
++0+43d4 <[^>]*> nop
++0+43d8 <[^>]*> nop
++0+43dc <[^>]*> nop
++0+43e0 <[^>]*> nop
++0+43e4 <[^>]*> nop
++0+43e8 <[^>]*> nop
++0+43ec <[^>]*> nop
++0+43f0 <[^>]*> nop
++0+43f4 <[^>]*> nop
++0+43f8 <[^>]*> nop
++0+43fc <[^>]*> nop
++0+4400 <[^>]*> nop
++0+4404 <[^>]*> nop
++0+4408 <[^>]*> nop
++0+440c <[^>]*> nop
++0+4410 <[^>]*> nop
++0+4414 <[^>]*> nop
++0+4418 <[^>]*> nop
++0+441c <[^>]*> nop
++0+4420 <[^>]*> nop
++0+4424 <[^>]*> nop
++0+4428 <[^>]*> nop
++0+442c <[^>]*> nop
++0+4430 <[^>]*> nop
++0+4434 <[^>]*> nop
++0+4438 <[^>]*> nop
++0+443c <[^>]*> nop
++0+4440 <[^>]*> nop
++0+4444 <[^>]*> nop
++0+4448 <[^>]*> nop
++0+444c <[^>]*> nop
++0+4450 <[^>]*> nop
++0+4454 <[^>]*> nop
++0+4458 <[^>]*> nop
++0+445c <[^>]*> nop
++0+4460 <[^>]*> nop
++0+4464 <[^>]*> nop
++0+4468 <[^>]*> nop
++0+446c <[^>]*> nop
++0+4470 <[^>]*> nop
++0+4474 <[^>]*> nop
++0+4478 <[^>]*> nop
++0+447c <[^>]*> nop
++0+4480 <[^>]*> nop
++0+4484 <[^>]*> nop
++0+4488 <[^>]*> nop
++0+448c <[^>]*> nop
++0+4490 <[^>]*> nop
++0+4494 <[^>]*> nop
++0+4498 <[^>]*> nop
++0+449c <[^>]*> nop
++0+44a0 <[^>]*> nop
++0+44a4 <[^>]*> nop
++0+44a8 <[^>]*> nop
++0+44ac <[^>]*> nop
++0+44b0 <[^>]*> nop
++0+44b4 <[^>]*> nop
++0+44b8 <[^>]*> nop
++0+44bc <[^>]*> nop
++0+44c0 <[^>]*> nop
++0+44c4 <[^>]*> nop
++0+44c8 <[^>]*> nop
++0+44cc <[^>]*> nop
++0+44d0 <[^>]*> nop
++0+44d4 <[^>]*> nop
++0+44d8 <[^>]*> nop
++0+44dc <[^>]*> nop
++0+44e0 <[^>]*> nop
++0+44e4 <[^>]*> nop
++0+44e8 <[^>]*> nop
++0+44ec <[^>]*> nop
++0+44f0 <[^>]*> nop
++0+44f4 <[^>]*> nop
++0+44f8 <[^>]*> nop
++0+44fc <[^>]*> nop
++0+4500 <[^>]*> nop
++0+4504 <[^>]*> nop
++0+4508 <[^>]*> nop
++0+450c <[^>]*> nop
++0+4510 <[^>]*> nop
++0+4514 <[^>]*> nop
++0+4518 <[^>]*> nop
++0+451c <[^>]*> nop
++0+4520 <[^>]*> nop
++0+4524 <[^>]*> nop
++0+4528 <[^>]*> nop
++0+452c <[^>]*> nop
++0+4530 <[^>]*> nop
++0+4534 <[^>]*> nop
++0+4538 <[^>]*> nop
++0+453c <[^>]*> nop
++0+4540 <[^>]*> nop
++0+4544 <[^>]*> nop
++0+4548 <[^>]*> nop
++0+454c <[^>]*> nop
++0+4550 <[^>]*> nop
++0+4554 <[^>]*> nop
++0+4558 <[^>]*> nop
++0+455c <[^>]*> nop
++0+4560 <[^>]*> nop
++0+4564 <[^>]*> nop
++0+4568 <[^>]*> nop
++0+456c <[^>]*> nop
++0+4570 <[^>]*> nop
++0+4574 <[^>]*> nop
++0+4578 <[^>]*> nop
++0+457c <[^>]*> nop
++0+4580 <[^>]*> nop
++0+4584 <[^>]*> nop
++0+4588 <[^>]*> nop
++0+458c <[^>]*> nop
++0+4590 <[^>]*> nop
++0+4594 <[^>]*> nop
++0+4598 <[^>]*> nop
++0+459c <[^>]*> nop
++0+45a0 <[^>]*> nop
++0+45a4 <[^>]*> nop
++0+45a8 <[^>]*> nop
++0+45ac <[^>]*> nop
++0+45b0 <[^>]*> nop
++0+45b4 <[^>]*> nop
++0+45b8 <[^>]*> nop
++0+45bc <[^>]*> nop
++0+45c0 <[^>]*> nop
++0+45c4 <[^>]*> nop
++0+45c8 <[^>]*> nop
++0+45cc <[^>]*> nop
++0+45d0 <[^>]*> nop
++0+45d4 <[^>]*> nop
++0+45d8 <[^>]*> nop
++0+45dc <[^>]*> nop
++0+45e0 <[^>]*> nop
++0+45e4 <[^>]*> nop
++0+45e8 <[^>]*> nop
++0+45ec <[^>]*> nop
++0+45f0 <[^>]*> nop
++0+45f4 <[^>]*> nop
++0+45f8 <[^>]*> nop
++0+45fc <[^>]*> nop
++0+4600 <[^>]*> nop
++0+4604 <[^>]*> nop
++0+4608 <[^>]*> nop
++0+460c <[^>]*> nop
++0+4610 <[^>]*> nop
++0+4614 <[^>]*> nop
++0+4618 <[^>]*> nop
++0+461c <[^>]*> nop
++0+4620 <[^>]*> nop
++0+4624 <[^>]*> nop
++0+4628 <[^>]*> nop
++0+462c <[^>]*> nop
++0+4630 <[^>]*> nop
++0+4634 <[^>]*> nop
++0+4638 <[^>]*> nop
++0+463c <[^>]*> nop
++0+4640 <[^>]*> nop
++0+4644 <[^>]*> nop
++0+4648 <[^>]*> nop
++0+464c <[^>]*> nop
++0+4650 <[^>]*> nop
++0+4654 <[^>]*> nop
++0+4658 <[^>]*> nop
++0+465c <[^>]*> nop
++0+4660 <[^>]*> nop
++0+4664 <[^>]*> nop
++0+4668 <[^>]*> nop
++0+466c <[^>]*> nop
++0+4670 <[^>]*> nop
++0+4674 <[^>]*> nop
++0+4678 <[^>]*> nop
++0+467c <[^>]*> nop
++0+4680 <[^>]*> nop
++0+4684 <[^>]*> nop
++0+4688 <[^>]*> nop
++0+468c <[^>]*> nop
++0+4690 <[^>]*> nop
++0+4694 <[^>]*> nop
++0+4698 <[^>]*> nop
++0+469c <[^>]*> nop
++0+46a0 <[^>]*> nop
++0+46a4 <[^>]*> nop
++0+46a8 <[^>]*> nop
++0+46ac <[^>]*> nop
++0+46b0 <[^>]*> nop
++0+46b4 <[^>]*> nop
++0+46b8 <[^>]*> nop
++0+46bc <[^>]*> nop
++0+46c0 <[^>]*> nop
++0+46c4 <[^>]*> nop
++0+46c8 <[^>]*> nop
++0+46cc <[^>]*> nop
++0+46d0 <[^>]*> nop
++0+46d4 <[^>]*> nop
++0+46d8 <[^>]*> nop
++0+46dc <[^>]*> nop
++0+46e0 <[^>]*> nop
++0+46e4 <[^>]*> nop
++0+46e8 <[^>]*> nop
++0+46ec <[^>]*> nop
++0+46f0 <[^>]*> nop
++0+46f4 <[^>]*> nop
++0+46f8 <[^>]*> nop
++0+46fc <[^>]*> nop
++0+4700 <[^>]*> nop
++0+4704 <[^>]*> nop
++0+4708 <[^>]*> nop
++0+470c <[^>]*> nop
++0+4710 <[^>]*> nop
++0+4714 <[^>]*> nop
++0+4718 <[^>]*> nop
++0+471c <[^>]*> nop
++0+4720 <[^>]*> nop
++0+4724 <[^>]*> nop
++0+4728 <[^>]*> nop
++0+472c <[^>]*> nop
++0+4730 <[^>]*> nop
++0+4734 <[^>]*> nop
++0+4738 <[^>]*> nop
++0+473c <[^>]*> nop
++0+4740 <[^>]*> nop
++0+4744 <[^>]*> nop
++0+4748 <[^>]*> nop
++0+474c <[^>]*> nop
++0+4750 <[^>]*> nop
++0+4754 <[^>]*> nop
++0+4758 <[^>]*> nop
++0+475c <[^>]*> nop
++0+4760 <[^>]*> nop
++0+4764 <[^>]*> nop
++0+4768 <[^>]*> nop
++0+476c <[^>]*> nop
++0+4770 <[^>]*> nop
++0+4774 <[^>]*> nop
++0+4778 <[^>]*> nop
++0+477c <[^>]*> nop
++0+4780 <[^>]*> nop
++0+4784 <[^>]*> nop
++0+4788 <[^>]*> nop
++0+478c <[^>]*> nop
++0+4790 <[^>]*> nop
++0+4794 <[^>]*> nop
++0+4798 <[^>]*> nop
++0+479c <[^>]*> nop
++0+47a0 <[^>]*> nop
++0+47a4 <[^>]*> nop
++0+47a8 <[^>]*> nop
++0+47ac <[^>]*> nop
++0+47b0 <[^>]*> nop
++0+47b4 <[^>]*> nop
++0+47b8 <[^>]*> nop
++0+47bc <[^>]*> nop
++0+47c0 <[^>]*> nop
++0+47c4 <[^>]*> nop
++0+47c8 <[^>]*> nop
++0+47cc <[^>]*> nop
++0+47d0 <[^>]*> nop
++0+47d4 <[^>]*> nop
++0+47d8 <[^>]*> nop
++0+47dc <[^>]*> nop
++0+47e0 <[^>]*> nop
++0+47e4 <[^>]*> nop
++0+47e8 <[^>]*> nop
++0+47ec <[^>]*> nop
++0+47f0 <[^>]*> nop
++0+47f4 <[^>]*> nop
++0+47f8 <[^>]*> nop
++0+47fc <[^>]*> nop
++0+4800 <[^>]*> nop
++0+4804 <[^>]*> nop
++0+4808 <[^>]*> nop
++0+480c <[^>]*> nop
++0+4810 <[^>]*> nop
++0+4814 <[^>]*> nop
++0+4818 <[^>]*> nop
++0+481c <[^>]*> nop
++0+4820 <[^>]*> nop
++0+4824 <[^>]*> nop
++0+4828 <[^>]*> nop
++0+482c <[^>]*> nop
++0+4830 <[^>]*> nop
++0+4834 <[^>]*> nop
++0+4838 <[^>]*> nop
++0+483c <[^>]*> nop
++0+4840 <[^>]*> nop
++0+4844 <[^>]*> nop
++0+4848 <[^>]*> nop
++0+484c <[^>]*> nop
++0+4850 <[^>]*> nop
++0+4854 <[^>]*> nop
++0+4858 <[^>]*> nop
++0+485c <[^>]*> nop
++0+4860 <[^>]*> nop
++0+4864 <[^>]*> nop
++0+4868 <[^>]*> nop
++0+486c <[^>]*> nop
++0+4870 <[^>]*> nop
++0+4874 <[^>]*> nop
++0+4878 <[^>]*> nop
++0+487c <[^>]*> nop
++0+4880 <[^>]*> nop
++0+4884 <[^>]*> nop
++0+4888 <[^>]*> nop
++0+488c <[^>]*> nop
++0+4890 <[^>]*> nop
++0+4894 <[^>]*> nop
++0+4898 <[^>]*> nop
++0+489c <[^>]*> nop
++0+48a0 <[^>]*> nop
++0+48a4 <[^>]*> nop
++0+48a8 <[^>]*> nop
++0+48ac <[^>]*> nop
++0+48b0 <[^>]*> nop
++0+48b4 <[^>]*> nop
++0+48b8 <[^>]*> nop
++0+48bc <[^>]*> nop
++0+48c0 <[^>]*> nop
++0+48c4 <[^>]*> nop
++0+48c8 <[^>]*> nop
++0+48cc <[^>]*> nop
++0+48d0 <[^>]*> nop
++0+48d4 <[^>]*> nop
++0+48d8 <[^>]*> nop
++0+48dc <[^>]*> nop
++0+48e0 <[^>]*> nop
++0+48e4 <[^>]*> nop
++0+48e8 <[^>]*> nop
++0+48ec <[^>]*> nop
++0+48f0 <[^>]*> nop
++0+48f4 <[^>]*> nop
++0+48f8 <[^>]*> nop
++0+48fc <[^>]*> nop
++0+4900 <[^>]*> nop
++0+4904 <[^>]*> nop
++0+4908 <[^>]*> nop
++0+490c <[^>]*> nop
++0+4910 <[^>]*> nop
++0+4914 <[^>]*> nop
++0+4918 <[^>]*> nop
++0+491c <[^>]*> nop
++0+4920 <[^>]*> nop
++0+4924 <[^>]*> nop
++0+4928 <[^>]*> nop
++0+492c <[^>]*> nop
++0+4930 <[^>]*> nop
++0+4934 <[^>]*> nop
++0+4938 <[^>]*> nop
++0+493c <[^>]*> nop
++0+4940 <[^>]*> nop
++0+4944 <[^>]*> nop
++0+4948 <[^>]*> nop
++0+494c <[^>]*> nop
++0+4950 <[^>]*> nop
++0+4954 <[^>]*> nop
++0+4958 <[^>]*> nop
++0+495c <[^>]*> nop
++0+4960 <[^>]*> nop
++0+4964 <[^>]*> nop
++0+4968 <[^>]*> nop
++0+496c <[^>]*> nop
++0+4970 <[^>]*> nop
++0+4974 <[^>]*> nop
++0+4978 <[^>]*> nop
++0+497c <[^>]*> nop
++0+4980 <[^>]*> nop
++0+4984 <[^>]*> nop
++0+4988 <[^>]*> nop
++0+498c <[^>]*> nop
++0+4990 <[^>]*> nop
++0+4994 <[^>]*> nop
++0+4998 <[^>]*> nop
++0+499c <[^>]*> nop
++0+49a0 <[^>]*> nop
++0+49a4 <[^>]*> nop
++0+49a8 <[^>]*> nop
++0+49ac <[^>]*> nop
++0+49b0 <[^>]*> nop
++0+49b4 <[^>]*> nop
++0+49b8 <[^>]*> nop
++0+49bc <[^>]*> nop
++0+49c0 <[^>]*> nop
++0+49c4 <[^>]*> nop
++0+49c8 <[^>]*> nop
++0+49cc <[^>]*> nop
++0+49d0 <[^>]*> nop
++0+49d4 <[^>]*> nop
++0+49d8 <[^>]*> nop
++0+49dc <[^>]*> nop
++0+49e0 <[^>]*> nop
++0+49e4 <[^>]*> nop
++0+49e8 <[^>]*> nop
++0+49ec <[^>]*> nop
++0+49f0 <[^>]*> nop
++0+49f4 <[^>]*> nop
++0+49f8 <[^>]*> nop
++0+49fc <[^>]*> nop
++0+4a00 <[^>]*> nop
++0+4a04 <[^>]*> nop
++0+4a08 <[^>]*> nop
++0+4a0c <[^>]*> nop
++0+4a10 <[^>]*> nop
++0+4a14 <[^>]*> nop
++0+4a18 <[^>]*> nop
++0+4a1c <[^>]*> nop
++0+4a20 <[^>]*> nop
++0+4a24 <[^>]*> nop
++0+4a28 <[^>]*> nop
++0+4a2c <[^>]*> nop
++0+4a30 <[^>]*> nop
++0+4a34 <[^>]*> nop
++0+4a38 <[^>]*> nop
++0+4a3c <[^>]*> nop
++0+4a40 <[^>]*> nop
++0+4a44 <[^>]*> nop
++0+4a48 <[^>]*> nop
++0+4a4c <[^>]*> nop
++0+4a50 <[^>]*> nop
++0+4a54 <[^>]*> nop
++0+4a58 <[^>]*> nop
++0+4a5c <[^>]*> nop
++0+4a60 <[^>]*> nop
++0+4a64 <[^>]*> nop
++0+4a68 <[^>]*> nop
++0+4a6c <[^>]*> nop
++0+4a70 <[^>]*> nop
++0+4a74 <[^>]*> nop
++0+4a78 <[^>]*> nop
++0+4a7c <[^>]*> nop
++0+4a80 <[^>]*> nop
++0+4a84 <[^>]*> nop
++0+4a88 <[^>]*> nop
++0+4a8c <[^>]*> nop
++0+4a90 <[^>]*> nop
++0+4a94 <[^>]*> nop
++0+4a98 <[^>]*> nop
++0+4a9c <[^>]*> nop
++0+4aa0 <[^>]*> nop
++0+4aa4 <[^>]*> nop
++0+4aa8 <[^>]*> nop
++0+4aac <[^>]*> nop
++0+4ab0 <[^>]*> nop
++0+4ab4 <[^>]*> nop
++0+4ab8 <[^>]*> nop
++0+4abc <[^>]*> nop
++0+4ac0 <[^>]*> nop
++0+4ac4 <[^>]*> nop
++0+4ac8 <[^>]*> nop
++0+4acc <[^>]*> nop
++0+4ad0 <[^>]*> nop
++0+4ad4 <[^>]*> nop
++0+4ad8 <[^>]*> nop
++0+4adc <[^>]*> nop
++0+4ae0 <[^>]*> nop
++0+4ae4 <[^>]*> nop
++0+4ae8 <[^>]*> nop
++0+4aec <[^>]*> nop
++0+4af0 <[^>]*> nop
++0+4af4 <[^>]*> nop
++0+4af8 <[^>]*> nop
++0+4afc <[^>]*> nop
++0+4b00 <[^>]*> nop
++0+4b04 <[^>]*> nop
++0+4b08 <[^>]*> nop
++0+4b0c <[^>]*> nop
++0+4b10 <[^>]*> nop
++0+4b14 <[^>]*> nop
++0+4b18 <[^>]*> nop
++0+4b1c <[^>]*> nop
++0+4b20 <[^>]*> nop
++0+4b24 <[^>]*> nop
++0+4b28 <[^>]*> nop
++0+4b2c <[^>]*> nop
++0+4b30 <[^>]*> nop
++0+4b34 <[^>]*> nop
++0+4b38 <[^>]*> nop
++0+4b3c <[^>]*> nop
++0+4b40 <[^>]*> nop
++0+4b44 <[^>]*> nop
++0+4b48 <[^>]*> nop
++0+4b4c <[^>]*> nop
++0+4b50 <[^>]*> nop
++0+4b54 <[^>]*> nop
++0+4b58 <[^>]*> nop
++0+4b5c <[^>]*> nop
++0+4b60 <[^>]*> nop
++0+4b64 <[^>]*> nop
++0+4b68 <[^>]*> nop
++0+4b6c <[^>]*> nop
++0+4b70 <[^>]*> nop
++0+4b74 <[^>]*> nop
++0+4b78 <[^>]*> nop
++0+4b7c <[^>]*> nop
++0+4b80 <[^>]*> nop
++0+4b84 <[^>]*> nop
++0+4b88 <[^>]*> nop
++0+4b8c <[^>]*> nop
++0+4b90 <[^>]*> nop
++0+4b94 <[^>]*> nop
++0+4b98 <[^>]*> nop
++0+4b9c <[^>]*> nop
++0+4ba0 <[^>]*> nop
++0+4ba4 <[^>]*> nop
++0+4ba8 <[^>]*> nop
++0+4bac <[^>]*> nop
++0+4bb0 <[^>]*> nop
++0+4bb4 <[^>]*> nop
++0+4bb8 <[^>]*> nop
++0+4bbc <[^>]*> nop
++0+4bc0 <[^>]*> nop
++0+4bc4 <[^>]*> nop
++0+4bc8 <[^>]*> nop
++0+4bcc <[^>]*> nop
++0+4bd0 <[^>]*> nop
++0+4bd4 <[^>]*> nop
++0+4bd8 <[^>]*> nop
++0+4bdc <[^>]*> nop
++0+4be0 <[^>]*> nop
++0+4be4 <[^>]*> nop
++0+4be8 <[^>]*> nop
++0+4bec <[^>]*> nop
++0+4bf0 <[^>]*> nop
++0+4bf4 <[^>]*> nop
++0+4bf8 <[^>]*> nop
++0+4bfc <[^>]*> nop
++0+4c00 <[^>]*> nop
++0+4c04 <[^>]*> nop
++0+4c08 <[^>]*> nop
++0+4c0c <[^>]*> nop
++0+4c10 <[^>]*> nop
++0+4c14 <[^>]*> nop
++0+4c18 <[^>]*> nop
++0+4c1c <[^>]*> nop
++0+4c20 <[^>]*> nop
++0+4c24 <[^>]*> nop
++0+4c28 <[^>]*> nop
++0+4c2c <[^>]*> nop
++0+4c30 <[^>]*> nop
++0+4c34 <[^>]*> nop
++0+4c38 <[^>]*> nop
++0+4c3c <[^>]*> nop
++0+4c40 <[^>]*> nop
++0+4c44 <[^>]*> nop
++0+4c48 <[^>]*> nop
++0+4c4c <[^>]*> nop
++0+4c50 <[^>]*> nop
++0+4c54 <[^>]*> nop
++0+4c58 <[^>]*> nop
++0+4c5c <[^>]*> nop
++0+4c60 <[^>]*> nop
++0+4c64 <[^>]*> nop
++0+4c68 <[^>]*> nop
++0+4c6c <[^>]*> nop
++0+4c70 <[^>]*> nop
++0+4c74 <[^>]*> nop
++0+4c78 <[^>]*> nop
++0+4c7c <[^>]*> nop
++0+4c80 <[^>]*> nop
++0+4c84 <[^>]*> nop
++0+4c88 <[^>]*> nop
++0+4c8c <[^>]*> nop
++0+4c90 <[^>]*> nop
++0+4c94 <[^>]*> nop
++0+4c98 <[^>]*> nop
++0+4c9c <[^>]*> nop
++0+4ca0 <[^>]*> nop
++0+4ca4 <[^>]*> nop
++0+4ca8 <[^>]*> nop
++0+4cac <[^>]*> nop
++0+4cb0 <[^>]*> nop
++0+4cb4 <[^>]*> nop
++0+4cb8 <[^>]*> nop
++0+4cbc <[^>]*> nop
++0+4cc0 <[^>]*> nop
++0+4cc4 <[^>]*> nop
++0+4cc8 <[^>]*> nop
++0+4ccc <[^>]*> nop
++0+4cd0 <[^>]*> nop
++0+4cd4 <[^>]*> nop
++0+4cd8 <[^>]*> nop
++0+4cdc <[^>]*> nop
++0+4ce0 <[^>]*> nop
++0+4ce4 <[^>]*> nop
++0+4ce8 <[^>]*> nop
++0+4cec <[^>]*> nop
++0+4cf0 <[^>]*> nop
++0+4cf4 <[^>]*> nop
++0+4cf8 <[^>]*> nop
++0+4cfc <[^>]*> nop
++0+4d00 <[^>]*> nop
++0+4d04 <[^>]*> nop
++0+4d08 <[^>]*> nop
++0+4d0c <[^>]*> nop
++0+4d10 <[^>]*> nop
++0+4d14 <[^>]*> nop
++0+4d18 <[^>]*> nop
++0+4d1c <[^>]*> nop
++0+4d20 <[^>]*> nop
++0+4d24 <[^>]*> nop
++0+4d28 <[^>]*> nop
++0+4d2c <[^>]*> nop
++0+4d30 <[^>]*> nop
++0+4d34 <[^>]*> nop
++0+4d38 <[^>]*> nop
++0+4d3c <[^>]*> nop
++0+4d40 <[^>]*> nop
++0+4d44 <[^>]*> nop
++0+4d48 <[^>]*> nop
++0+4d4c <[^>]*> nop
++0+4d50 <[^>]*> nop
++0+4d54 <[^>]*> nop
++0+4d58 <[^>]*> nop
++0+4d5c <[^>]*> nop
++0+4d60 <[^>]*> nop
++0+4d64 <[^>]*> nop
++0+4d68 <[^>]*> nop
++0+4d6c <[^>]*> nop
++0+4d70 <[^>]*> nop
++0+4d74 <[^>]*> nop
++0+4d78 <[^>]*> nop
++0+4d7c <[^>]*> nop
++0+4d80 <[^>]*> nop
++0+4d84 <[^>]*> nop
++0+4d88 <[^>]*> nop
++0+4d8c <[^>]*> nop
++0+4d90 <[^>]*> nop
++0+4d94 <[^>]*> nop
++0+4d98 <[^>]*> nop
++0+4d9c <[^>]*> nop
++0+4da0 <[^>]*> nop
++0+4da4 <[^>]*> nop
++0+4da8 <[^>]*> nop
++0+4dac <[^>]*> nop
++0+4db0 <[^>]*> nop
++0+4db4 <[^>]*> nop
++0+4db8 <[^>]*> nop
++0+4dbc <[^>]*> nop
++0+4dc0 <[^>]*> nop
++0+4dc4 <[^>]*> nop
++0+4dc8 <[^>]*> nop
++0+4dcc <[^>]*> nop
++0+4dd0 <[^>]*> nop
++0+4dd4 <[^>]*> nop
++0+4dd8 <[^>]*> nop
++0+4ddc <[^>]*> nop
++0+4de0 <[^>]*> nop
++0+4de4 <[^>]*> nop
++0+4de8 <[^>]*> nop
++0+4dec <[^>]*> nop
++0+4df0 <[^>]*> nop
++0+4df4 <[^>]*> nop
++0+4df8 <[^>]*> nop
++0+4dfc <[^>]*> nop
++0+4e00 <[^>]*> nop
++0+4e04 <[^>]*> nop
++0+4e08 <[^>]*> nop
++0+4e0c <[^>]*> nop
++0+4e10 <[^>]*> nop
++0+4e14 <[^>]*> nop
++0+4e18 <[^>]*> nop
++0+4e1c <[^>]*> nop
++0+4e20 <[^>]*> nop
++0+4e24 <[^>]*> nop
++0+4e28 <[^>]*> nop
++0+4e2c <[^>]*> nop
++0+4e30 <[^>]*> nop
++0+4e34 <[^>]*> nop
++0+4e38 <[^>]*> nop
++0+4e3c <[^>]*> nop
++0+4e40 <[^>]*> nop
++0+4e44 <[^>]*> nop
++0+4e48 <[^>]*> nop
++0+4e4c <[^>]*> nop
++0+4e50 <[^>]*> nop
++0+4e54 <[^>]*> nop
++0+4e58 <[^>]*> nop
++0+4e5c <[^>]*> nop
++0+4e60 <[^>]*> nop
++0+4e64 <[^>]*> nop
++0+4e68 <[^>]*> nop
++0+4e6c <[^>]*> nop
++0+4e70 <[^>]*> nop
++0+4e74 <[^>]*> nop
++0+4e78 <[^>]*> nop
++0+4e7c <[^>]*> nop
++0+4e80 <[^>]*> nop
++0+4e84 <[^>]*> nop
++0+4e88 <[^>]*> nop
++0+4e8c <[^>]*> nop
++0+4e90 <[^>]*> nop
++0+4e94 <[^>]*> nop
++0+4e98 <[^>]*> nop
++0+4e9c <[^>]*> nop
++0+4ea0 <[^>]*> nop
++0+4ea4 <[^>]*> nop
++0+4ea8 <[^>]*> nop
++0+4eac <[^>]*> nop
++0+4eb0 <[^>]*> nop
++0+4eb4 <[^>]*> nop
++0+4eb8 <[^>]*> nop
++0+4ebc <[^>]*> nop
++0+4ec0 <[^>]*> nop
++0+4ec4 <[^>]*> nop
++0+4ec8 <[^>]*> nop
++0+4ecc <[^>]*> nop
++0+4ed0 <[^>]*> nop
++0+4ed4 <[^>]*> nop
++0+4ed8 <[^>]*> nop
++0+4edc <[^>]*> nop
++0+4ee0 <[^>]*> nop
++0+4ee4 <[^>]*> nop
++0+4ee8 <[^>]*> nop
++0+4eec <[^>]*> nop
++0+4ef0 <[^>]*> nop
++0+4ef4 <[^>]*> nop
++0+4ef8 <[^>]*> nop
++0+4efc <[^>]*> nop
++0+4f00 <[^>]*> nop
++0+4f04 <[^>]*> nop
++0+4f08 <[^>]*> nop
++0+4f0c <[^>]*> nop
++0+4f10 <[^>]*> nop
++0+4f14 <[^>]*> nop
++0+4f18 <[^>]*> nop
++0+4f1c <[^>]*> nop
++0+4f20 <[^>]*> nop
++0+4f24 <[^>]*> nop
++0+4f28 <[^>]*> nop
++0+4f2c <[^>]*> nop
++0+4f30 <[^>]*> nop
++0+4f34 <[^>]*> nop
++0+4f38 <[^>]*> nop
++0+4f3c <[^>]*> nop
++0+4f40 <[^>]*> nop
++0+4f44 <[^>]*> nop
++0+4f48 <[^>]*> nop
++0+4f4c <[^>]*> nop
++0+4f50 <[^>]*> nop
++0+4f54 <[^>]*> nop
++0+4f58 <[^>]*> nop
++0+4f5c <[^>]*> nop
++0+4f60 <[^>]*> nop
++0+4f64 <[^>]*> nop
++0+4f68 <[^>]*> nop
++0+4f6c <[^>]*> nop
++0+4f70 <[^>]*> nop
++0+4f74 <[^>]*> nop
++0+4f78 <[^>]*> nop
++0+4f7c <[^>]*> nop
++0+4f80 <[^>]*> nop
++0+4f84 <[^>]*> nop
++0+4f88 <[^>]*> nop
++0+4f8c <[^>]*> nop
++0+4f90 <[^>]*> nop
++0+4f94 <[^>]*> nop
++0+4f98 <[^>]*> nop
++0+4f9c <[^>]*> nop
++0+4fa0 <[^>]*> nop
++0+4fa4 <[^>]*> nop
++0+4fa8 <[^>]*> nop
++0+4fac <[^>]*> nop
++0+4fb0 <[^>]*> nop
++0+4fb4 <[^>]*> nop
++0+4fb8 <[^>]*> nop
++0+4fbc <[^>]*> nop
++0+4fc0 <[^>]*> nop
++0+4fc4 <[^>]*> nop
++0+4fc8 <[^>]*> nop
++0+4fcc <[^>]*> nop
++0+4fd0 <[^>]*> nop
++0+4fd4 <[^>]*> nop
++0+4fd8 <[^>]*> nop
++0+4fdc <[^>]*> nop
++0+4fe0 <[^>]*> nop
++0+4fe4 <[^>]*> nop
++0+4fe8 <[^>]*> nop
++0+4fec <[^>]*> nop
++0+4ff0 <[^>]*> nop
++0+4ff4 <[^>]*> nop
++0+4ff8 <[^>]*> nop
++0+4ffc <[^>]*> nop
++0+5000 <[^>]*> nop
++0+5004 <[^>]*> nop
++0+5008 <[^>]*> nop
++0+500c <[^>]*> nop
++0+5010 <[^>]*> nop
++0+5014 <[^>]*> nop
++0+5018 <[^>]*> nop
++0+501c <[^>]*> nop
++0+5020 <[^>]*> nop
++0+5024 <[^>]*> nop
++0+5028 <[^>]*> nop
++0+502c <[^>]*> nop
++0+5030 <[^>]*> nop
++0+5034 <[^>]*> nop
++0+5038 <[^>]*> nop
++0+503c <[^>]*> nop
++0+5040 <[^>]*> nop
++0+5044 <[^>]*> nop
++0+5048 <[^>]*> nop
++0+504c <[^>]*> nop
++0+5050 <[^>]*> nop
++0+5054 <[^>]*> nop
++0+5058 <[^>]*> nop
++0+505c <[^>]*> nop
++0+5060 <[^>]*> nop
++0+5064 <[^>]*> nop
++0+5068 <[^>]*> nop
++0+506c <[^>]*> nop
++0+5070 <[^>]*> nop
++0+5074 <[^>]*> nop
++0+5078 <[^>]*> nop
++0+507c <[^>]*> nop
++0+5080 <[^>]*> nop
++0+5084 <[^>]*> nop
++0+5088 <[^>]*> nop
++0+508c <[^>]*> nop
++0+5090 <[^>]*> nop
++0+5094 <[^>]*> nop
++0+5098 <[^>]*> nop
++0+509c <[^>]*> nop
++0+50a0 <[^>]*> nop
++0+50a4 <[^>]*> nop
++0+50a8 <[^>]*> nop
++0+50ac <[^>]*> nop
++0+50b0 <[^>]*> nop
++0+50b4 <[^>]*> nop
++0+50b8 <[^>]*> nop
++0+50bc <[^>]*> nop
++0+50c0 <[^>]*> nop
++0+50c4 <[^>]*> nop
++0+50c8 <[^>]*> nop
++0+50cc <[^>]*> nop
++0+50d0 <[^>]*> nop
++0+50d4 <[^>]*> nop
++0+50d8 <[^>]*> nop
++0+50dc <[^>]*> nop
++0+50e0 <[^>]*> nop
++0+50e4 <[^>]*> nop
++0+50e8 <[^>]*> nop
++0+50ec <[^>]*> nop
++0+50f0 <[^>]*> nop
++0+50f4 <[^>]*> nop
++0+50f8 <[^>]*> nop
++0+50fc <[^>]*> nop
++0+5100 <[^>]*> nop
++0+5104 <[^>]*> nop
++0+5108 <[^>]*> nop
++0+510c <[^>]*> nop
++0+5110 <[^>]*> nop
++0+5114 <[^>]*> nop
++0+5118 <[^>]*> nop
++0+511c <[^>]*> nop
++0+5120 <[^>]*> nop
++0+5124 <[^>]*> nop
++0+5128 <[^>]*> nop
++0+512c <[^>]*> nop
++0+5130 <[^>]*> nop
++0+5134 <[^>]*> nop
++0+5138 <[^>]*> nop
++0+513c <[^>]*> nop
++0+5140 <[^>]*> nop
++0+5144 <[^>]*> nop
++0+5148 <[^>]*> nop
++0+514c <[^>]*> nop
++0+5150 <[^>]*> nop
++0+5154 <[^>]*> nop
++0+5158 <[^>]*> nop
++0+515c <[^>]*> nop
++0+5160 <[^>]*> nop
++0+5164 <[^>]*> nop
++0+5168 <[^>]*> nop
++0+516c <[^>]*> nop
++0+5170 <[^>]*> nop
++0+5174 <[^>]*> nop
++0+5178 <[^>]*> nop
++0+517c <[^>]*> nop
++0+5180 <[^>]*> nop
++0+5184 <[^>]*> nop
++0+5188 <[^>]*> nop
++0+518c <[^>]*> nop
++0+5190 <[^>]*> nop
++0+5194 <[^>]*> nop
++0+5198 <[^>]*> nop
++0+519c <[^>]*> nop
++0+51a0 <[^>]*> nop
++0+51a4 <[^>]*> nop
++0+51a8 <[^>]*> nop
++0+51ac <[^>]*> nop
++0+51b0 <[^>]*> nop
++0+51b4 <[^>]*> nop
++0+51b8 <[^>]*> nop
++0+51bc <[^>]*> nop
++0+51c0 <[^>]*> nop
++0+51c4 <[^>]*> nop
++0+51c8 <[^>]*> nop
++0+51cc <[^>]*> nop
++0+51d0 <[^>]*> nop
++0+51d4 <[^>]*> nop
++0+51d8 <[^>]*> nop
++0+51dc <[^>]*> nop
++0+51e0 <[^>]*> nop
++0+51e4 <[^>]*> nop
++0+51e8 <[^>]*> nop
++0+51ec <[^>]*> nop
++0+51f0 <[^>]*> nop
++0+51f4 <[^>]*> nop
++0+51f8 <[^>]*> nop
++0+51fc <[^>]*> nop
++0+5200 <[^>]*> nop
++0+5204 <[^>]*> nop
++0+5208 <[^>]*> nop
++0+520c <[^>]*> nop
++0+5210 <[^>]*> nop
++0+5214 <[^>]*> nop
++0+5218 <[^>]*> nop
++0+521c <[^>]*> nop
++0+5220 <[^>]*> nop
++0+5224 <[^>]*> nop
++0+5228 <[^>]*> nop
++0+522c <[^>]*> nop
++0+5230 <[^>]*> nop
++0+5234 <[^>]*> nop
++0+5238 <[^>]*> nop
++0+523c <[^>]*> nop
++0+5240 <[^>]*> nop
++0+5244 <[^>]*> nop
++0+5248 <[^>]*> nop
++0+524c <[^>]*> nop
++0+5250 <[^>]*> nop
++0+5254 <[^>]*> nop
++0+5258 <[^>]*> nop
++0+525c <[^>]*> nop
++0+5260 <[^>]*> nop
++0+5264 <[^>]*> nop
++0+5268 <[^>]*> nop
++0+526c <[^>]*> nop
++0+5270 <[^>]*> nop
++0+5274 <[^>]*> nop
++0+5278 <[^>]*> nop
++0+527c <[^>]*> nop
++0+5280 <[^>]*> nop
++0+5284 <[^>]*> nop
++0+5288 <[^>]*> nop
++0+528c <[^>]*> nop
++0+5290 <[^>]*> nop
++0+5294 <[^>]*> nop
++0+5298 <[^>]*> nop
++0+529c <[^>]*> nop
++0+52a0 <[^>]*> nop
++0+52a4 <[^>]*> nop
++0+52a8 <[^>]*> nop
++0+52ac <[^>]*> nop
++0+52b0 <[^>]*> nop
++0+52b4 <[^>]*> nop
++0+52b8 <[^>]*> nop
++0+52bc <[^>]*> nop
++0+52c0 <[^>]*> nop
++0+52c4 <[^>]*> nop
++0+52c8 <[^>]*> nop
++0+52cc <[^>]*> nop
++0+52d0 <[^>]*> nop
++0+52d4 <[^>]*> nop
++0+52d8 <[^>]*> nop
++0+52dc <[^>]*> nop
++0+52e0 <[^>]*> nop
++0+52e4 <[^>]*> nop
++0+52e8 <[^>]*> nop
++0+52ec <[^>]*> nop
++0+52f0 <[^>]*> nop
++0+52f4 <[^>]*> nop
++0+52f8 <[^>]*> nop
++0+52fc <[^>]*> nop
++0+5300 <[^>]*> nop
++0+5304 <[^>]*> nop
++0+5308 <[^>]*> nop
++0+530c <[^>]*> nop
++0+5310 <[^>]*> nop
++0+5314 <[^>]*> nop
++0+5318 <[^>]*> nop
++0+531c <[^>]*> nop
++0+5320 <[^>]*> nop
++0+5324 <[^>]*> nop
++0+5328 <[^>]*> nop
++0+532c <[^>]*> nop
++0+5330 <[^>]*> nop
++0+5334 <[^>]*> nop
++0+5338 <[^>]*> nop
++0+533c <[^>]*> nop
++0+5340 <[^>]*> nop
++0+5344 <[^>]*> nop
++0+5348 <[^>]*> nop
++0+534c <[^>]*> nop
++0+5350 <[^>]*> nop
++0+5354 <[^>]*> nop
++0+5358 <[^>]*> nop
++0+535c <[^>]*> nop
++0+5360 <[^>]*> nop
++0+5364 <[^>]*> nop
++0+5368 <[^>]*> nop
++0+536c <[^>]*> nop
++0+5370 <[^>]*> nop
++0+5374 <[^>]*> nop
++0+5378 <[^>]*> nop
++0+537c <[^>]*> nop
++0+5380 <[^>]*> nop
++0+5384 <[^>]*> nop
++0+5388 <[^>]*> nop
++0+538c <[^>]*> nop
++0+5390 <[^>]*> nop
++0+5394 <[^>]*> nop
++0+5398 <[^>]*> nop
++0+539c <[^>]*> nop
++0+53a0 <[^>]*> nop
++0+53a4 <[^>]*> nop
++0+53a8 <[^>]*> nop
++0+53ac <[^>]*> nop
++0+53b0 <[^>]*> nop
++0+53b4 <[^>]*> nop
++0+53b8 <[^>]*> nop
++0+53bc <[^>]*> nop
++0+53c0 <[^>]*> nop
++0+53c4 <[^>]*> nop
++0+53c8 <[^>]*> nop
++0+53cc <[^>]*> nop
++0+53d0 <[^>]*> nop
++0+53d4 <[^>]*> nop
++0+53d8 <[^>]*> nop
++0+53dc <[^>]*> nop
++0+53e0 <[^>]*> nop
++0+53e4 <[^>]*> nop
++0+53e8 <[^>]*> nop
++0+53ec <[^>]*> nop
++0+53f0 <[^>]*> nop
++0+53f4 <[^>]*> nop
++0+53f8 <[^>]*> nop
++0+53fc <[^>]*> nop
++0+5400 <[^>]*> nop
++0+5404 <[^>]*> nop
++0+5408 <[^>]*> nop
++0+540c <[^>]*> nop
++0+5410 <[^>]*> nop
++0+5414 <[^>]*> nop
++0+5418 <[^>]*> nop
++0+541c <[^>]*> nop
++0+5420 <[^>]*> nop
++0+5424 <[^>]*> nop
++0+5428 <[^>]*> nop
++0+542c <[^>]*> nop
++0+5430 <[^>]*> nop
++0+5434 <[^>]*> nop
++0+5438 <[^>]*> nop
++0+543c <[^>]*> nop
++0+5440 <[^>]*> nop
++0+5444 <[^>]*> nop
++0+5448 <[^>]*> nop
++0+544c <[^>]*> nop
++0+5450 <[^>]*> nop
++0+5454 <[^>]*> nop
++0+5458 <[^>]*> nop
++0+545c <[^>]*> nop
++0+5460 <[^>]*> nop
++0+5464 <[^>]*> nop
++0+5468 <[^>]*> nop
++0+546c <[^>]*> nop
++0+5470 <[^>]*> nop
++0+5474 <[^>]*> nop
++0+5478 <[^>]*> nop
++0+547c <[^>]*> nop
++0+5480 <[^>]*> nop
++0+5484 <[^>]*> nop
++0+5488 <[^>]*> nop
++0+548c <[^>]*> nop
++0+5490 <[^>]*> nop
++0+5494 <[^>]*> nop
++0+5498 <[^>]*> nop
++0+549c <[^>]*> nop
++0+54a0 <[^>]*> nop
++0+54a4 <[^>]*> nop
++0+54a8 <[^>]*> nop
++0+54ac <[^>]*> nop
++0+54b0 <[^>]*> nop
++0+54b4 <[^>]*> nop
++0+54b8 <[^>]*> nop
++0+54bc <[^>]*> nop
++0+54c0 <[^>]*> nop
++0+54c4 <[^>]*> nop
++0+54c8 <[^>]*> nop
++0+54cc <[^>]*> nop
++0+54d0 <[^>]*> nop
++0+54d4 <[^>]*> nop
++0+54d8 <[^>]*> nop
++0+54dc <[^>]*> nop
++0+54e0 <[^>]*> nop
++0+54e4 <[^>]*> nop
++0+54e8 <[^>]*> nop
++0+54ec <[^>]*> nop
++0+54f0 <[^>]*> nop
++0+54f4 <[^>]*> nop
++0+54f8 <[^>]*> nop
++0+54fc <[^>]*> nop
++0+5500 <[^>]*> nop
++0+5504 <[^>]*> nop
++0+5508 <[^>]*> nop
++0+550c <[^>]*> nop
++0+5510 <[^>]*> nop
++0+5514 <[^>]*> nop
++0+5518 <[^>]*> nop
++0+551c <[^>]*> nop
++0+5520 <[^>]*> nop
++0+5524 <[^>]*> nop
++0+5528 <[^>]*> nop
++0+552c <[^>]*> nop
++0+5530 <[^>]*> nop
++0+5534 <[^>]*> nop
++0+5538 <[^>]*> nop
++0+553c <[^>]*> nop
++0+5540 <[^>]*> nop
++0+5544 <[^>]*> nop
++0+5548 <[^>]*> nop
++0+554c <[^>]*> nop
++0+5550 <[^>]*> nop
++0+5554 <[^>]*> nop
++0+5558 <[^>]*> nop
++0+555c <[^>]*> nop
++0+5560 <[^>]*> nop
++0+5564 <[^>]*> nop
++0+5568 <[^>]*> nop
++0+556c <[^>]*> nop
++0+5570 <[^>]*> nop
++0+5574 <[^>]*> nop
++0+5578 <[^>]*> nop
++0+557c <[^>]*> nop
++0+5580 <[^>]*> nop
++0+5584 <[^>]*> nop
++0+5588 <[^>]*> nop
++0+558c <[^>]*> nop
++0+5590 <[^>]*> nop
++0+5594 <[^>]*> nop
++0+5598 <[^>]*> nop
++0+559c <[^>]*> nop
++0+55a0 <[^>]*> nop
++0+55a4 <[^>]*> nop
++0+55a8 <[^>]*> nop
++0+55ac <[^>]*> nop
++0+55b0 <[^>]*> nop
++0+55b4 <[^>]*> nop
++0+55b8 <[^>]*> nop
++0+55bc <[^>]*> nop
++0+55c0 <[^>]*> nop
++0+55c4 <[^>]*> nop
++0+55c8 <[^>]*> nop
++0+55cc <[^>]*> nop
++0+55d0 <[^>]*> nop
++0+55d4 <[^>]*> nop
++0+55d8 <[^>]*> nop
++0+55dc <[^>]*> nop
++0+55e0 <[^>]*> nop
++0+55e4 <[^>]*> nop
++0+55e8 <[^>]*> nop
++0+55ec <[^>]*> nop
++0+55f0 <[^>]*> nop
++0+55f4 <[^>]*> nop
++0+55f8 <[^>]*> nop
++0+55fc <[^>]*> nop
++0+5600 <[^>]*> nop
++0+5604 <[^>]*> nop
++0+5608 <[^>]*> nop
++0+560c <[^>]*> nop
++0+5610 <[^>]*> nop
++0+5614 <[^>]*> nop
++0+5618 <[^>]*> nop
++0+561c <[^>]*> nop
++0+5620 <[^>]*> nop
++0+5624 <[^>]*> nop
++0+5628 <[^>]*> nop
++0+562c <[^>]*> nop
++0+5630 <[^>]*> nop
++0+5634 <[^>]*> nop
++0+5638 <[^>]*> nop
++0+563c <[^>]*> nop
++0+5640 <[^>]*> nop
++0+5644 <[^>]*> nop
++0+5648 <[^>]*> nop
++0+564c <[^>]*> nop
++0+5650 <[^>]*> nop
++0+5654 <[^>]*> nop
++0+5658 <[^>]*> nop
++0+565c <[^>]*> nop
++0+5660 <[^>]*> nop
++0+5664 <[^>]*> nop
++0+5668 <[^>]*> nop
++0+566c <[^>]*> nop
++0+5670 <[^>]*> nop
++0+5674 <[^>]*> nop
++0+5678 <[^>]*> nop
++0+567c <[^>]*> nop
++0+5680 <[^>]*> nop
++0+5684 <[^>]*> nop
++0+5688 <[^>]*> nop
++0+568c <[^>]*> nop
++0+5690 <[^>]*> nop
++0+5694 <[^>]*> nop
++0+5698 <[^>]*> nop
++0+569c <[^>]*> nop
++0+56a0 <[^>]*> nop
++0+56a4 <[^>]*> nop
++0+56a8 <[^>]*> nop
++0+56ac <[^>]*> nop
++0+56b0 <[^>]*> nop
++0+56b4 <[^>]*> nop
++0+56b8 <[^>]*> nop
++0+56bc <[^>]*> nop
++0+56c0 <[^>]*> nop
++0+56c4 <[^>]*> nop
++0+56c8 <[^>]*> nop
++0+56cc <[^>]*> nop
++0+56d0 <[^>]*> nop
++0+56d4 <[^>]*> nop
++0+56d8 <[^>]*> nop
++0+56dc <[^>]*> nop
++0+56e0 <[^>]*> nop
++0+56e4 <[^>]*> nop
++0+56e8 <[^>]*> nop
++0+56ec <[^>]*> nop
++0+56f0 <[^>]*> nop
++0+56f4 <[^>]*> nop
++0+56f8 <[^>]*> nop
++0+56fc <[^>]*> nop
++0+5700 <[^>]*> nop
++0+5704 <[^>]*> nop
++0+5708 <[^>]*> nop
++0+570c <[^>]*> nop
++0+5710 <[^>]*> nop
++0+5714 <[^>]*> nop
++0+5718 <[^>]*> nop
++0+571c <[^>]*> nop
++0+5720 <[^>]*> nop
++0+5724 <[^>]*> nop
++0+5728 <[^>]*> nop
++0+572c <[^>]*> nop
++0+5730 <[^>]*> nop
++0+5734 <[^>]*> nop
++0+5738 <[^>]*> nop
++0+573c <[^>]*> nop
++0+5740 <[^>]*> nop
++0+5744 <[^>]*> nop
++0+5748 <[^>]*> nop
++0+574c <[^>]*> nop
++0+5750 <[^>]*> nop
++0+5754 <[^>]*> nop
++0+5758 <[^>]*> nop
++0+575c <[^>]*> nop
++0+5760 <[^>]*> nop
++0+5764 <[^>]*> nop
++0+5768 <[^>]*> nop
++0+576c <[^>]*> nop
++0+5770 <[^>]*> nop
++0+5774 <[^>]*> nop
++0+5778 <[^>]*> nop
++0+577c <[^>]*> nop
++0+5780 <[^>]*> nop
++0+5784 <[^>]*> nop
++0+5788 <[^>]*> nop
++0+578c <[^>]*> nop
++0+5790 <[^>]*> nop
++0+5794 <[^>]*> nop
++0+5798 <[^>]*> nop
++0+579c <[^>]*> nop
++0+57a0 <[^>]*> nop
++0+57a4 <[^>]*> nop
++0+57a8 <[^>]*> nop
++0+57ac <[^>]*> nop
++0+57b0 <[^>]*> nop
++0+57b4 <[^>]*> nop
++0+57b8 <[^>]*> nop
++0+57bc <[^>]*> nop
++0+57c0 <[^>]*> nop
++0+57c4 <[^>]*> nop
++0+57c8 <[^>]*> nop
++0+57cc <[^>]*> nop
++0+57d0 <[^>]*> nop
++0+57d4 <[^>]*> nop
++0+57d8 <[^>]*> nop
++0+57dc <[^>]*> nop
++0+57e0 <[^>]*> nop
++0+57e4 <[^>]*> nop
++0+57e8 <[^>]*> nop
++0+57ec <[^>]*> nop
++0+57f0 <[^>]*> nop
++0+57f4 <[^>]*> nop
++0+57f8 <[^>]*> nop
++0+57fc <[^>]*> nop
++0+5800 <[^>]*> nop
++0+5804 <[^>]*> nop
++0+5808 <[^>]*> nop
++0+580c <[^>]*> nop
++0+5810 <[^>]*> nop
++0+5814 <[^>]*> nop
++0+5818 <[^>]*> nop
++0+581c <[^>]*> nop
++0+5820 <[^>]*> nop
++0+5824 <[^>]*> nop
++0+5828 <[^>]*> nop
++0+582c <[^>]*> nop
++0+5830 <[^>]*> nop
++0+5834 <[^>]*> nop
++0+5838 <[^>]*> nop
++0+583c <[^>]*> nop
++0+5840 <[^>]*> nop
++0+5844 <[^>]*> nop
++0+5848 <[^>]*> nop
++0+584c <[^>]*> nop
++0+5850 <[^>]*> nop
++0+5854 <[^>]*> nop
++0+5858 <[^>]*> nop
++0+585c <[^>]*> nop
++0+5860 <[^>]*> nop
++0+5864 <[^>]*> nop
++0+5868 <[^>]*> nop
++0+586c <[^>]*> nop
++0+5870 <[^>]*> nop
++0+5874 <[^>]*> nop
++0+5878 <[^>]*> nop
++0+587c <[^>]*> nop
++0+5880 <[^>]*> nop
++0+5884 <[^>]*> nop
++0+5888 <[^>]*> nop
++0+588c <[^>]*> nop
++0+5890 <[^>]*> nop
++0+5894 <[^>]*> nop
++0+5898 <[^>]*> nop
++0+589c <[^>]*> nop
++0+58a0 <[^>]*> nop
++0+58a4 <[^>]*> nop
++0+58a8 <[^>]*> nop
++0+58ac <[^>]*> nop
++0+58b0 <[^>]*> nop
++0+58b4 <[^>]*> nop
++0+58b8 <[^>]*> nop
++0+58bc <[^>]*> nop
++0+58c0 <[^>]*> nop
++0+58c4 <[^>]*> nop
++0+58c8 <[^>]*> nop
++0+58cc <[^>]*> nop
++0+58d0 <[^>]*> nop
++0+58d4 <[^>]*> nop
++0+58d8 <[^>]*> nop
++0+58dc <[^>]*> nop
++0+58e0 <[^>]*> nop
++0+58e4 <[^>]*> nop
++0+58e8 <[^>]*> nop
++0+58ec <[^>]*> nop
++0+58f0 <[^>]*> nop
++0+58f4 <[^>]*> nop
++0+58f8 <[^>]*> nop
++0+58fc <[^>]*> nop
++0+5900 <[^>]*> nop
++0+5904 <[^>]*> nop
++0+5908 <[^>]*> nop
++0+590c <[^>]*> nop
++0+5910 <[^>]*> nop
++0+5914 <[^>]*> nop
++0+5918 <[^>]*> nop
++0+591c <[^>]*> nop
++0+5920 <[^>]*> nop
++0+5924 <[^>]*> nop
++0+5928 <[^>]*> nop
++0+592c <[^>]*> nop
++0+5930 <[^>]*> nop
++0+5934 <[^>]*> nop
++0+5938 <[^>]*> nop
++0+593c <[^>]*> nop
++0+5940 <[^>]*> nop
++0+5944 <[^>]*> nop
++0+5948 <[^>]*> nop
++0+594c <[^>]*> nop
++0+5950 <[^>]*> nop
++0+5954 <[^>]*> nop
++0+5958 <[^>]*> nop
++0+595c <[^>]*> nop
++0+5960 <[^>]*> nop
++0+5964 <[^>]*> nop
++0+5968 <[^>]*> nop
++0+596c <[^>]*> nop
++0+5970 <[^>]*> nop
++0+5974 <[^>]*> nop
++0+5978 <[^>]*> nop
++0+597c <[^>]*> nop
++0+5980 <[^>]*> nop
++0+5984 <[^>]*> nop
++0+5988 <[^>]*> nop
++0+598c <[^>]*> nop
++0+5990 <[^>]*> nop
++0+5994 <[^>]*> nop
++0+5998 <[^>]*> nop
++0+599c <[^>]*> nop
++0+59a0 <[^>]*> nop
++0+59a4 <[^>]*> nop
++0+59a8 <[^>]*> nop
++0+59ac <[^>]*> nop
++0+59b0 <[^>]*> nop
++0+59b4 <[^>]*> nop
++0+59b8 <[^>]*> nop
++0+59bc <[^>]*> nop
++0+59c0 <[^>]*> nop
++0+59c4 <[^>]*> nop
++0+59c8 <[^>]*> nop
++0+59cc <[^>]*> nop
++0+59d0 <[^>]*> nop
++0+59d4 <[^>]*> nop
++0+59d8 <[^>]*> nop
++0+59dc <[^>]*> nop
++0+59e0 <[^>]*> nop
++0+59e4 <[^>]*> nop
++0+59e8 <[^>]*> nop
++0+59ec <[^>]*> nop
++0+59f0 <[^>]*> nop
++0+59f4 <[^>]*> nop
++0+59f8 <[^>]*> nop
++0+59fc <[^>]*> nop
++0+5a00 <[^>]*> nop
++0+5a04 <[^>]*> nop
++0+5a08 <[^>]*> nop
++0+5a0c <[^>]*> nop
++0+5a10 <[^>]*> nop
++0+5a14 <[^>]*> nop
++0+5a18 <[^>]*> nop
++0+5a1c <[^>]*> nop
++0+5a20 <[^>]*> nop
++0+5a24 <[^>]*> nop
++0+5a28 <[^>]*> nop
++0+5a2c <[^>]*> nop
++0+5a30 <[^>]*> nop
++0+5a34 <[^>]*> nop
++0+5a38 <[^>]*> nop
++0+5a3c <[^>]*> nop
++0+5a40 <[^>]*> nop
++0+5a44 <[^>]*> nop
++0+5a48 <[^>]*> nop
++0+5a4c <[^>]*> nop
++0+5a50 <[^>]*> nop
++0+5a54 <[^>]*> nop
++0+5a58 <[^>]*> nop
++0+5a5c <[^>]*> nop
++0+5a60 <[^>]*> nop
++0+5a64 <[^>]*> nop
++0+5a68 <[^>]*> nop
++0+5a6c <[^>]*> nop
++0+5a70 <[^>]*> nop
++0+5a74 <[^>]*> nop
++0+5a78 <[^>]*> nop
++0+5a7c <[^>]*> nop
++0+5a80 <[^>]*> nop
++0+5a84 <[^>]*> nop
++0+5a88 <[^>]*> nop
++0+5a8c <[^>]*> nop
++0+5a90 <[^>]*> nop
++0+5a94 <[^>]*> nop
++0+5a98 <[^>]*> nop
++0+5a9c <[^>]*> nop
++0+5aa0 <[^>]*> nop
++0+5aa4 <[^>]*> nop
++0+5aa8 <[^>]*> nop
++0+5aac <[^>]*> nop
++0+5ab0 <[^>]*> nop
++0+5ab4 <[^>]*> nop
++0+5ab8 <[^>]*> nop
++0+5abc <[^>]*> nop
++0+5ac0 <[^>]*> nop
++0+5ac4 <[^>]*> nop
++0+5ac8 <[^>]*> nop
++0+5acc <[^>]*> nop
++0+5ad0 <[^>]*> nop
++0+5ad4 <[^>]*> nop
++0+5ad8 <[^>]*> nop
++0+5adc <[^>]*> nop
++0+5ae0 <[^>]*> nop
++0+5ae4 <[^>]*> nop
++0+5ae8 <[^>]*> nop
++0+5aec <[^>]*> nop
++0+5af0 <[^>]*> nop
++0+5af4 <[^>]*> nop
++0+5af8 <[^>]*> nop
++0+5afc <[^>]*> nop
++0+5b00 <[^>]*> nop
++0+5b04 <[^>]*> nop
++0+5b08 <[^>]*> nop
++0+5b0c <[^>]*> nop
++0+5b10 <[^>]*> nop
++0+5b14 <[^>]*> nop
++0+5b18 <[^>]*> nop
++0+5b1c <[^>]*> nop
++0+5b20 <[^>]*> nop
++0+5b24 <[^>]*> nop
++0+5b28 <[^>]*> nop
++0+5b2c <[^>]*> nop
++0+5b30 <[^>]*> nop
++0+5b34 <[^>]*> nop
++0+5b38 <[^>]*> nop
++0+5b3c <[^>]*> nop
++0+5b40 <[^>]*> nop
++0+5b44 <[^>]*> nop
++0+5b48 <[^>]*> nop
++0+5b4c <[^>]*> nop
++0+5b50 <[^>]*> nop
++0+5b54 <[^>]*> nop
++0+5b58 <[^>]*> nop
++0+5b5c <[^>]*> nop
++0+5b60 <[^>]*> nop
++0+5b64 <[^>]*> nop
++0+5b68 <[^>]*> nop
++0+5b6c <[^>]*> nop
++0+5b70 <[^>]*> nop
++0+5b74 <[^>]*> nop
++0+5b78 <[^>]*> nop
++0+5b7c <[^>]*> nop
++0+5b80 <[^>]*> nop
++0+5b84 <[^>]*> nop
++0+5b88 <[^>]*> nop
++0+5b8c <[^>]*> nop
++0+5b90 <[^>]*> nop
++0+5b94 <[^>]*> nop
++0+5b98 <[^>]*> nop
++0+5b9c <[^>]*> nop
++0+5ba0 <[^>]*> nop
++0+5ba4 <[^>]*> nop
++0+5ba8 <[^>]*> nop
++0+5bac <[^>]*> nop
++0+5bb0 <[^>]*> nop
++0+5bb4 <[^>]*> nop
++0+5bb8 <[^>]*> nop
++0+5bbc <[^>]*> nop
++0+5bc0 <[^>]*> nop
++0+5bc4 <[^>]*> nop
++0+5bc8 <[^>]*> nop
++0+5bcc <[^>]*> nop
++0+5bd0 <[^>]*> nop
++0+5bd4 <[^>]*> nop
++0+5bd8 <[^>]*> nop
++0+5bdc <[^>]*> nop
++0+5be0 <[^>]*> nop
++0+5be4 <[^>]*> nop
++0+5be8 <[^>]*> nop
++0+5bec <[^>]*> nop
++0+5bf0 <[^>]*> nop
++0+5bf4 <[^>]*> nop
++0+5bf8 <[^>]*> nop
++0+5bfc <[^>]*> nop
++0+5c00 <[^>]*> nop
++0+5c04 <[^>]*> nop
++0+5c08 <[^>]*> nop
++0+5c0c <[^>]*> nop
++0+5c10 <[^>]*> nop
++0+5c14 <[^>]*> nop
++0+5c18 <[^>]*> nop
++0+5c1c <[^>]*> nop
++0+5c20 <[^>]*> nop
++0+5c24 <[^>]*> nop
++0+5c28 <[^>]*> nop
++0+5c2c <[^>]*> nop
++0+5c30 <[^>]*> nop
++0+5c34 <[^>]*> nop
++0+5c38 <[^>]*> nop
++0+5c3c <[^>]*> nop
++0+5c40 <[^>]*> nop
++0+5c44 <[^>]*> nop
++0+5c48 <[^>]*> nop
++0+5c4c <[^>]*> nop
++0+5c50 <[^>]*> nop
++0+5c54 <[^>]*> nop
++0+5c58 <[^>]*> nop
++0+5c5c <[^>]*> nop
++0+5c60 <[^>]*> nop
++0+5c64 <[^>]*> nop
++0+5c68 <[^>]*> nop
++0+5c6c <[^>]*> nop
++0+5c70 <[^>]*> nop
++0+5c74 <[^>]*> nop
++0+5c78 <[^>]*> nop
++0+5c7c <[^>]*> nop
++0+5c80 <[^>]*> nop
++0+5c84 <[^>]*> nop
++0+5c88 <[^>]*> nop
++0+5c8c <[^>]*> nop
++0+5c90 <[^>]*> nop
++0+5c94 <[^>]*> nop
++0+5c98 <[^>]*> nop
++0+5c9c <[^>]*> nop
++0+5ca0 <[^>]*> nop
++0+5ca4 <[^>]*> nop
++0+5ca8 <[^>]*> nop
++0+5cac <[^>]*> nop
++0+5cb0 <[^>]*> nop
++0+5cb4 <[^>]*> nop
++0+5cb8 <[^>]*> nop
++0+5cbc <[^>]*> nop
++0+5cc0 <[^>]*> nop
++0+5cc4 <[^>]*> nop
++0+5cc8 <[^>]*> nop
++0+5ccc <[^>]*> nop
++0+5cd0 <[^>]*> nop
++0+5cd4 <[^>]*> nop
++0+5cd8 <[^>]*> nop
++0+5cdc <[^>]*> nop
++0+5ce0 <[^>]*> nop
++0+5ce4 <[^>]*> nop
++0+5ce8 <[^>]*> nop
++0+5cec <[^>]*> nop
++0+5cf0 <[^>]*> nop
++0+5cf4 <[^>]*> nop
++0+5cf8 <[^>]*> nop
++0+5cfc <[^>]*> nop
++0+5d00 <[^>]*> nop
++0+5d04 <[^>]*> nop
++0+5d08 <[^>]*> nop
++0+5d0c <[^>]*> nop
++0+5d10 <[^>]*> nop
++0+5d14 <[^>]*> nop
++0+5d18 <[^>]*> nop
++0+5d1c <[^>]*> nop
++0+5d20 <[^>]*> nop
++0+5d24 <[^>]*> nop
++0+5d28 <[^>]*> nop
++0+5d2c <[^>]*> nop
++0+5d30 <[^>]*> nop
++0+5d34 <[^>]*> nop
++0+5d38 <[^>]*> nop
++0+5d3c <[^>]*> nop
++0+5d40 <[^>]*> nop
++0+5d44 <[^>]*> nop
++0+5d48 <[^>]*> nop
++0+5d4c <[^>]*> nop
++0+5d50 <[^>]*> nop
++0+5d54 <[^>]*> nop
++0+5d58 <[^>]*> nop
++0+5d5c <[^>]*> nop
++0+5d60 <[^>]*> nop
++0+5d64 <[^>]*> nop
++0+5d68 <[^>]*> nop
++0+5d6c <[^>]*> nop
++0+5d70 <[^>]*> nop
++0+5d74 <[^>]*> nop
++0+5d78 <[^>]*> nop
++0+5d7c <[^>]*> nop
++0+5d80 <[^>]*> nop
++0+5d84 <[^>]*> nop
++0+5d88 <[^>]*> nop
++0+5d8c <[^>]*> nop
++0+5d90 <[^>]*> nop
++0+5d94 <[^>]*> nop
++0+5d98 <[^>]*> nop
++0+5d9c <[^>]*> nop
++0+5da0 <[^>]*> nop
++0+5da4 <[^>]*> nop
++0+5da8 <[^>]*> nop
++0+5dac <[^>]*> nop
++0+5db0 <[^>]*> nop
++0+5db4 <[^>]*> nop
++0+5db8 <[^>]*> nop
++0+5dbc <[^>]*> nop
++0+5dc0 <[^>]*> nop
++0+5dc4 <[^>]*> nop
++0+5dc8 <[^>]*> nop
++0+5dcc <[^>]*> nop
++0+5dd0 <[^>]*> nop
++0+5dd4 <[^>]*> nop
++0+5dd8 <[^>]*> nop
++0+5ddc <[^>]*> nop
++0+5de0 <[^>]*> nop
++0+5de4 <[^>]*> nop
++0+5de8 <[^>]*> nop
++0+5dec <[^>]*> nop
++0+5df0 <[^>]*> nop
++0+5df4 <[^>]*> nop
++0+5df8 <[^>]*> nop
++0+5dfc <[^>]*> nop
++0+5e00 <[^>]*> nop
++0+5e04 <[^>]*> nop
++0+5e08 <[^>]*> nop
++0+5e0c <[^>]*> nop
++0+5e10 <[^>]*> nop
++0+5e14 <[^>]*> nop
++0+5e18 <[^>]*> nop
++0+5e1c <[^>]*> nop
++0+5e20 <[^>]*> nop
++0+5e24 <[^>]*> nop
++0+5e28 <[^>]*> nop
++0+5e2c <[^>]*> nop
++0+5e30 <[^>]*> nop
++0+5e34 <[^>]*> nop
++0+5e38 <[^>]*> nop
++0+5e3c <[^>]*> nop
++0+5e40 <[^>]*> nop
++0+5e44 <[^>]*> nop
++0+5e48 <[^>]*> nop
++0+5e4c <[^>]*> nop
++0+5e50 <[^>]*> nop
++0+5e54 <[^>]*> nop
++0+5e58 <[^>]*> nop
++0+5e5c <[^>]*> nop
++0+5e60 <[^>]*> nop
++0+5e64 <[^>]*> nop
++0+5e68 <[^>]*> nop
++0+5e6c <[^>]*> nop
++0+5e70 <[^>]*> nop
++0+5e74 <[^>]*> nop
++0+5e78 <[^>]*> nop
++0+5e7c <[^>]*> nop
++0+5e80 <[^>]*> nop
++0+5e84 <[^>]*> nop
++0+5e88 <[^>]*> nop
++0+5e8c <[^>]*> nop
++0+5e90 <[^>]*> nop
++0+5e94 <[^>]*> nop
++0+5e98 <[^>]*> nop
++0+5e9c <[^>]*> nop
++0+5ea0 <[^>]*> nop
++0+5ea4 <[^>]*> nop
++0+5ea8 <[^>]*> nop
++0+5eac <[^>]*> nop
++0+5eb0 <[^>]*> nop
++0+5eb4 <[^>]*> nop
++0+5eb8 <[^>]*> nop
++0+5ebc <[^>]*> nop
++0+5ec0 <[^>]*> nop
++0+5ec4 <[^>]*> nop
++0+5ec8 <[^>]*> nop
++0+5ecc <[^>]*> nop
++0+5ed0 <[^>]*> nop
++0+5ed4 <[^>]*> nop
++0+5ed8 <[^>]*> nop
++0+5edc <[^>]*> nop
++0+5ee0 <[^>]*> nop
++0+5ee4 <[^>]*> nop
++0+5ee8 <[^>]*> nop
++0+5eec <[^>]*> nop
++0+5ef0 <[^>]*> nop
++0+5ef4 <[^>]*> nop
++0+5ef8 <[^>]*> nop
++0+5efc <[^>]*> nop
++0+5f00 <[^>]*> nop
++0+5f04 <[^>]*> nop
++0+5f08 <[^>]*> nop
++0+5f0c <[^>]*> nop
++0+5f10 <[^>]*> nop
++0+5f14 <[^>]*> nop
++0+5f18 <[^>]*> nop
++0+5f1c <[^>]*> nop
++0+5f20 <[^>]*> nop
++0+5f24 <[^>]*> nop
++0+5f28 <[^>]*> nop
++0+5f2c <[^>]*> nop
++0+5f30 <[^>]*> nop
++0+5f34 <[^>]*> nop
++0+5f38 <[^>]*> nop
++0+5f3c <[^>]*> nop
++0+5f40 <[^>]*> nop
++0+5f44 <[^>]*> nop
++0+5f48 <[^>]*> nop
++0+5f4c <[^>]*> nop
++0+5f50 <[^>]*> nop
++0+5f54 <[^>]*> nop
++0+5f58 <[^>]*> nop
++0+5f5c <[^>]*> nop
++0+5f60 <[^>]*> nop
++0+5f64 <[^>]*> nop
++0+5f68 <[^>]*> nop
++0+5f6c <[^>]*> nop
++0+5f70 <[^>]*> nop
++0+5f74 <[^>]*> nop
++0+5f78 <[^>]*> nop
++0+5f7c <[^>]*> nop
++0+5f80 <[^>]*> nop
++0+5f84 <[^>]*> nop
++0+5f88 <[^>]*> nop
++0+5f8c <[^>]*> nop
++0+5f90 <[^>]*> nop
++0+5f94 <[^>]*> nop
++0+5f98 <[^>]*> nop
++0+5f9c <[^>]*> nop
++0+5fa0 <[^>]*> nop
++0+5fa4 <[^>]*> nop
++0+5fa8 <[^>]*> nop
++0+5fac <[^>]*> nop
++0+5fb0 <[^>]*> nop
++0+5fb4 <[^>]*> nop
++0+5fb8 <[^>]*> nop
++0+5fbc <[^>]*> nop
++0+5fc0 <[^>]*> nop
++0+5fc4 <[^>]*> nop
++0+5fc8 <[^>]*> nop
++0+5fcc <[^>]*> nop
++0+5fd0 <[^>]*> nop
++0+5fd4 <[^>]*> nop
++0+5fd8 <[^>]*> nop
++0+5fdc <[^>]*> nop
++0+5fe0 <[^>]*> nop
++0+5fe4 <[^>]*> nop
++0+5fe8 <[^>]*> nop
++0+5fec <[^>]*> nop
++0+5ff0 <[^>]*> nop
++0+5ff4 <[^>]*> nop
++0+5ff8 <[^>]*> nop
++0+5ffc <[^>]*> nop
++0+6000 <[^>]*> nop
++0+6004 <[^>]*> nop
++0+6008 <[^>]*> nop
++0+600c <[^>]*> nop
++0+6010 <[^>]*> nop
++0+6014 <[^>]*> nop
++0+6018 <[^>]*> nop
++0+601c <[^>]*> nop
++0+6020 <[^>]*> nop
++0+6024 <[^>]*> nop
++0+6028 <[^>]*> nop
++0+602c <[^>]*> nop
++0+6030 <[^>]*> nop
++0+6034 <[^>]*> nop
++0+6038 <[^>]*> nop
++0+603c <[^>]*> nop
++0+6040 <[^>]*> nop
++0+6044 <[^>]*> nop
++0+6048 <[^>]*> nop
++0+604c <[^>]*> nop
++0+6050 <[^>]*> nop
++0+6054 <[^>]*> nop
++0+6058 <[^>]*> nop
++0+605c <[^>]*> nop
++0+6060 <[^>]*> nop
++0+6064 <[^>]*> nop
++0+6068 <[^>]*> nop
++0+606c <[^>]*> nop
++0+6070 <[^>]*> nop
++0+6074 <[^>]*> nop
++0+6078 <[^>]*> nop
++0+607c <[^>]*> nop
++0+6080 <[^>]*> nop
++0+6084 <[^>]*> nop
++0+6088 <[^>]*> nop
++0+608c <[^>]*> nop
++0+6090 <[^>]*> nop
++0+6094 <[^>]*> nop
++0+6098 <[^>]*> nop
++0+609c <[^>]*> nop
++0+60a0 <[^>]*> nop
++0+60a4 <[^>]*> nop
++0+60a8 <[^>]*> nop
++0+60ac <[^>]*> nop
++0+60b0 <[^>]*> nop
++0+60b4 <[^>]*> nop
++0+60b8 <[^>]*> nop
++0+60bc <[^>]*> nop
++0+60c0 <[^>]*> nop
++0+60c4 <[^>]*> nop
++0+60c8 <[^>]*> nop
++0+60cc <[^>]*> nop
++0+60d0 <[^>]*> nop
++0+60d4 <[^>]*> nop
++0+60d8 <[^>]*> nop
++0+60dc <[^>]*> nop
++0+60e0 <[^>]*> nop
++0+60e4 <[^>]*> nop
++0+60e8 <[^>]*> nop
++0+60ec <[^>]*> nop
++0+60f0 <[^>]*> nop
++0+60f4 <[^>]*> nop
++0+60f8 <[^>]*> nop
++0+60fc <[^>]*> nop
++0+6100 <[^>]*> nop
++0+6104 <[^>]*> nop
++0+6108 <[^>]*> nop
++0+610c <[^>]*> nop
++0+6110 <[^>]*> nop
++0+6114 <[^>]*> nop
++0+6118 <[^>]*> nop
++0+611c <[^>]*> nop
++0+6120 <[^>]*> nop
++0+6124 <[^>]*> nop
++0+6128 <[^>]*> nop
++0+612c <[^>]*> nop
++0+6130 <[^>]*> nop
++0+6134 <[^>]*> nop
++0+6138 <[^>]*> nop
++0+613c <[^>]*> nop
++0+6140 <[^>]*> nop
++0+6144 <[^>]*> nop
++0+6148 <[^>]*> nop
++0+614c <[^>]*> nop
++0+6150 <[^>]*> nop
++0+6154 <[^>]*> nop
++0+6158 <[^>]*> nop
++0+615c <[^>]*> nop
++0+6160 <[^>]*> nop
++0+6164 <[^>]*> nop
++0+6168 <[^>]*> nop
++0+616c <[^>]*> nop
++0+6170 <[^>]*> nop
++0+6174 <[^>]*> nop
++0+6178 <[^>]*> nop
++0+617c <[^>]*> nop
++0+6180 <[^>]*> nop
++0+6184 <[^>]*> nop
++0+6188 <[^>]*> nop
++0+618c <[^>]*> nop
++0+6190 <[^>]*> nop
++0+6194 <[^>]*> nop
++0+6198 <[^>]*> nop
++0+619c <[^>]*> nop
++0+61a0 <[^>]*> nop
++0+61a4 <[^>]*> nop
++0+61a8 <[^>]*> nop
++0+61ac <[^>]*> nop
++0+61b0 <[^>]*> nop
++0+61b4 <[^>]*> nop
++0+61b8 <[^>]*> nop
++0+61bc <[^>]*> nop
++0+61c0 <[^>]*> nop
++0+61c4 <[^>]*> nop
++0+61c8 <[^>]*> nop
++0+61cc <[^>]*> nop
++0+61d0 <[^>]*> nop
++0+61d4 <[^>]*> nop
++0+61d8 <[^>]*> nop
++0+61dc <[^>]*> nop
++0+61e0 <[^>]*> nop
++0+61e4 <[^>]*> nop
++0+61e8 <[^>]*> nop
++0+61ec <[^>]*> nop
++0+61f0 <[^>]*> nop
++0+61f4 <[^>]*> nop
++0+61f8 <[^>]*> nop
++0+61fc <[^>]*> nop
++0+6200 <[^>]*> nop
++0+6204 <[^>]*> nop
++0+6208 <[^>]*> nop
++0+620c <[^>]*> nop
++0+6210 <[^>]*> nop
++0+6214 <[^>]*> nop
++0+6218 <[^>]*> nop
++0+621c <[^>]*> nop
++0+6220 <[^>]*> nop
++0+6224 <[^>]*> nop
++0+6228 <[^>]*> nop
++0+622c <[^>]*> nop
++0+6230 <[^>]*> nop
++0+6234 <[^>]*> nop
++0+6238 <[^>]*> nop
++0+623c <[^>]*> nop
++0+6240 <[^>]*> nop
++0+6244 <[^>]*> nop
++0+6248 <[^>]*> nop
++0+624c <[^>]*> nop
++0+6250 <[^>]*> nop
++0+6254 <[^>]*> nop
++0+6258 <[^>]*> nop
++0+625c <[^>]*> nop
++0+6260 <[^>]*> nop
++0+6264 <[^>]*> nop
++0+6268 <[^>]*> nop
++0+626c <[^>]*> nop
++0+6270 <[^>]*> nop
++0+6274 <[^>]*> nop
++0+6278 <[^>]*> nop
++0+627c <[^>]*> nop
++0+6280 <[^>]*> nop
++0+6284 <[^>]*> nop
++0+6288 <[^>]*> nop
++0+628c <[^>]*> nop
++0+6290 <[^>]*> nop
++0+6294 <[^>]*> nop
++0+6298 <[^>]*> nop
++0+629c <[^>]*> nop
++0+62a0 <[^>]*> nop
++0+62a4 <[^>]*> nop
++0+62a8 <[^>]*> nop
++0+62ac <[^>]*> nop
++0+62b0 <[^>]*> nop
++0+62b4 <[^>]*> nop
++0+62b8 <[^>]*> nop
++0+62bc <[^>]*> nop
++0+62c0 <[^>]*> nop
++0+62c4 <[^>]*> nop
++0+62c8 <[^>]*> nop
++0+62cc <[^>]*> nop
++0+62d0 <[^>]*> nop
++0+62d4 <[^>]*> nop
++0+62d8 <[^>]*> nop
++0+62dc <[^>]*> nop
++0+62e0 <[^>]*> nop
++0+62e4 <[^>]*> nop
++0+62e8 <[^>]*> nop
++0+62ec <[^>]*> nop
++0+62f0 <[^>]*> nop
++0+62f4 <[^>]*> nop
++0+62f8 <[^>]*> nop
++0+62fc <[^>]*> nop
++0+6300 <[^>]*> nop
++0+6304 <[^>]*> nop
++0+6308 <[^>]*> nop
++0+630c <[^>]*> nop
++0+6310 <[^>]*> nop
++0+6314 <[^>]*> nop
++0+6318 <[^>]*> nop
++0+631c <[^>]*> nop
++0+6320 <[^>]*> nop
++0+6324 <[^>]*> nop
++0+6328 <[^>]*> nop
++0+632c <[^>]*> nop
++0+6330 <[^>]*> nop
++0+6334 <[^>]*> nop
++0+6338 <[^>]*> nop
++0+633c <[^>]*> nop
++0+6340 <[^>]*> nop
++0+6344 <[^>]*> nop
++0+6348 <[^>]*> nop
++0+634c <[^>]*> nop
++0+6350 <[^>]*> nop
++0+6354 <[^>]*> nop
++0+6358 <[^>]*> nop
++0+635c <[^>]*> nop
++0+6360 <[^>]*> nop
++0+6364 <[^>]*> nop
++0+6368 <[^>]*> nop
++0+636c <[^>]*> nop
++0+6370 <[^>]*> nop
++0+6374 <[^>]*> nop
++0+6378 <[^>]*> nop
++0+637c <[^>]*> nop
++0+6380 <[^>]*> nop
++0+6384 <[^>]*> nop
++0+6388 <[^>]*> nop
++0+638c <[^>]*> nop
++0+6390 <[^>]*> nop
++0+6394 <[^>]*> nop
++0+6398 <[^>]*> nop
++0+639c <[^>]*> nop
++0+63a0 <[^>]*> nop
++0+63a4 <[^>]*> nop
++0+63a8 <[^>]*> nop
++0+63ac <[^>]*> nop
++0+63b0 <[^>]*> nop
++0+63b4 <[^>]*> nop
++0+63b8 <[^>]*> nop
++0+63bc <[^>]*> nop
++0+63c0 <[^>]*> nop
++0+63c4 <[^>]*> nop
++0+63c8 <[^>]*> nop
++0+63cc <[^>]*> nop
++0+63d0 <[^>]*> nop
++0+63d4 <[^>]*> nop
++0+63d8 <[^>]*> nop
++0+63dc <[^>]*> nop
++0+63e0 <[^>]*> nop
++0+63e4 <[^>]*> nop
++0+63e8 <[^>]*> nop
++0+63ec <[^>]*> nop
++0+63f0 <[^>]*> nop
++0+63f4 <[^>]*> nop
++0+63f8 <[^>]*> nop
++0+63fc <[^>]*> nop
++0+6400 <[^>]*> nop
++0+6404 <[^>]*> nop
++0+6408 <[^>]*> nop
++0+640c <[^>]*> nop
++0+6410 <[^>]*> nop
++0+6414 <[^>]*> nop
++0+6418 <[^>]*> nop
++0+641c <[^>]*> nop
++0+6420 <[^>]*> nop
++0+6424 <[^>]*> nop
++0+6428 <[^>]*> nop
++0+642c <[^>]*> nop
++0+6430 <[^>]*> nop
++0+6434 <[^>]*> nop
++0+6438 <[^>]*> nop
++0+643c <[^>]*> nop
++0+6440 <[^>]*> nop
++0+6444 <[^>]*> nop
++0+6448 <[^>]*> nop
++0+644c <[^>]*> nop
++0+6450 <[^>]*> nop
++0+6454 <[^>]*> nop
++0+6458 <[^>]*> nop
++0+645c <[^>]*> nop
++0+6460 <[^>]*> nop
++0+6464 <[^>]*> nop
++0+6468 <[^>]*> nop
++0+646c <[^>]*> nop
++0+6470 <[^>]*> nop
++0+6474 <[^>]*> nop
++0+6478 <[^>]*> nop
++0+647c <[^>]*> nop
++0+6480 <[^>]*> nop
++0+6484 <[^>]*> nop
++0+6488 <[^>]*> nop
++0+648c <[^>]*> nop
++0+6490 <[^>]*> nop
++0+6494 <[^>]*> nop
++0+6498 <[^>]*> nop
++0+649c <[^>]*> nop
++0+64a0 <[^>]*> nop
++0+64a4 <[^>]*> nop
++0+64a8 <[^>]*> nop
++0+64ac <[^>]*> nop
++0+64b0 <[^>]*> nop
++0+64b4 <[^>]*> nop
++0+64b8 <[^>]*> nop
++0+64bc <[^>]*> nop
++0+64c0 <[^>]*> nop
++0+64c4 <[^>]*> nop
++0+64c8 <[^>]*> nop
++0+64cc <[^>]*> nop
++0+64d0 <[^>]*> nop
++0+64d4 <[^>]*> nop
++0+64d8 <[^>]*> nop
++0+64dc <[^>]*> nop
++0+64e0 <[^>]*> nop
++0+64e4 <[^>]*> nop
++0+64e8 <[^>]*> nop
++0+64ec <[^>]*> nop
++0+64f0 <[^>]*> nop
++0+64f4 <[^>]*> nop
++0+64f8 <[^>]*> nop
++0+64fc <[^>]*> nop
++0+6500 <[^>]*> nop
++0+6504 <[^>]*> nop
++0+6508 <[^>]*> nop
++0+650c <[^>]*> nop
++0+6510 <[^>]*> nop
++0+6514 <[^>]*> nop
++0+6518 <[^>]*> nop
++0+651c <[^>]*> nop
++0+6520 <[^>]*> nop
++0+6524 <[^>]*> nop
++0+6528 <[^>]*> nop
++0+652c <[^>]*> nop
++0+6530 <[^>]*> nop
++0+6534 <[^>]*> nop
++0+6538 <[^>]*> nop
++0+653c <[^>]*> nop
++0+6540 <[^>]*> nop
++0+6544 <[^>]*> nop
++0+6548 <[^>]*> nop
++0+654c <[^>]*> nop
++0+6550 <[^>]*> nop
++0+6554 <[^>]*> nop
++0+6558 <[^>]*> nop
++0+655c <[^>]*> nop
++0+6560 <[^>]*> nop
++0+6564 <[^>]*> nop
++0+6568 <[^>]*> nop
++0+656c <[^>]*> nop
++0+6570 <[^>]*> nop
++0+6574 <[^>]*> nop
++0+6578 <[^>]*> nop
++0+657c <[^>]*> nop
++0+6580 <[^>]*> nop
++0+6584 <[^>]*> nop
++0+6588 <[^>]*> nop
++0+658c <[^>]*> nop
++0+6590 <[^>]*> nop
++0+6594 <[^>]*> nop
++0+6598 <[^>]*> nop
++0+659c <[^>]*> nop
++0+65a0 <[^>]*> nop
++0+65a4 <[^>]*> nop
++0+65a8 <[^>]*> nop
++0+65ac <[^>]*> nop
++0+65b0 <[^>]*> nop
++0+65b4 <[^>]*> nop
++0+65b8 <[^>]*> nop
++0+65bc <[^>]*> nop
++0+65c0 <[^>]*> nop
++0+65c4 <[^>]*> nop
++0+65c8 <[^>]*> nop
++0+65cc <[^>]*> nop
++0+65d0 <[^>]*> nop
++0+65d4 <[^>]*> nop
++0+65d8 <[^>]*> nop
++0+65dc <[^>]*> nop
++0+65e0 <[^>]*> nop
++0+65e4 <[^>]*> nop
++0+65e8 <[^>]*> nop
++0+65ec <[^>]*> nop
++0+65f0 <[^>]*> nop
++0+65f4 <[^>]*> nop
++0+65f8 <[^>]*> nop
++0+65fc <[^>]*> nop
++0+6600 <[^>]*> nop
++0+6604 <[^>]*> nop
++0+6608 <[^>]*> nop
++0+660c <[^>]*> nop
++0+6610 <[^>]*> nop
++0+6614 <[^>]*> nop
++0+6618 <[^>]*> nop
++0+661c <[^>]*> nop
++0+6620 <[^>]*> nop
++0+6624 <[^>]*> nop
++0+6628 <[^>]*> nop
++0+662c <[^>]*> nop
++0+6630 <[^>]*> nop
++0+6634 <[^>]*> nop
++0+6638 <[^>]*> nop
++0+663c <[^>]*> nop
++0+6640 <[^>]*> nop
++0+6644 <[^>]*> nop
++0+6648 <[^>]*> nop
++0+664c <[^>]*> nop
++0+6650 <[^>]*> nop
++0+6654 <[^>]*> nop
++0+6658 <[^>]*> nop
++0+665c <[^>]*> nop
++0+6660 <[^>]*> nop
++0+6664 <[^>]*> nop
++0+6668 <[^>]*> nop
++0+666c <[^>]*> nop
++0+6670 <[^>]*> nop
++0+6674 <[^>]*> nop
++0+6678 <[^>]*> nop
++0+667c <[^>]*> nop
++0+6680 <[^>]*> nop
++0+6684 <[^>]*> nop
++0+6688 <[^>]*> nop
++0+668c <[^>]*> nop
++0+6690 <[^>]*> nop
++0+6694 <[^>]*> nop
++0+6698 <[^>]*> nop
++0+669c <[^>]*> nop
++0+66a0 <[^>]*> nop
++0+66a4 <[^>]*> nop
++0+66a8 <[^>]*> nop
++0+66ac <[^>]*> nop
++0+66b0 <[^>]*> nop
++0+66b4 <[^>]*> nop
++0+66b8 <[^>]*> nop
++0+66bc <[^>]*> nop
++0+66c0 <[^>]*> nop
++0+66c4 <[^>]*> nop
++0+66c8 <[^>]*> nop
++0+66cc <[^>]*> nop
++0+66d0 <[^>]*> nop
++0+66d4 <[^>]*> nop
++0+66d8 <[^>]*> nop
++0+66dc <[^>]*> nop
++0+66e0 <[^>]*> nop
++0+66e4 <[^>]*> nop
++0+66e8 <[^>]*> nop
++0+66ec <[^>]*> nop
++0+66f0 <[^>]*> nop
++0+66f4 <[^>]*> nop
++0+66f8 <[^>]*> nop
++0+66fc <[^>]*> nop
++0+6700 <[^>]*> nop
++0+6704 <[^>]*> nop
++0+6708 <[^>]*> nop
++0+670c <[^>]*> nop
++0+6710 <[^>]*> nop
++0+6714 <[^>]*> nop
++0+6718 <[^>]*> nop
++0+671c <[^>]*> nop
++0+6720 <[^>]*> nop
++0+6724 <[^>]*> nop
++0+6728 <[^>]*> nop
++0+672c <[^>]*> nop
++0+6730 <[^>]*> nop
++0+6734 <[^>]*> nop
++0+6738 <[^>]*> nop
++0+673c <[^>]*> nop
++0+6740 <[^>]*> nop
++0+6744 <[^>]*> nop
++0+6748 <[^>]*> nop
++0+674c <[^>]*> nop
++0+6750 <[^>]*> nop
++0+6754 <[^>]*> nop
++0+6758 <[^>]*> nop
++0+675c <[^>]*> nop
++0+6760 <[^>]*> nop
++0+6764 <[^>]*> nop
++0+6768 <[^>]*> nop
++0+676c <[^>]*> nop
++0+6770 <[^>]*> nop
++0+6774 <[^>]*> nop
++0+6778 <[^>]*> nop
++0+677c <[^>]*> nop
++0+6780 <[^>]*> nop
++0+6784 <[^>]*> nop
++0+6788 <[^>]*> nop
++0+678c <[^>]*> nop
++0+6790 <[^>]*> nop
++0+6794 <[^>]*> nop
++0+6798 <[^>]*> nop
++0+679c <[^>]*> nop
++0+67a0 <[^>]*> nop
++0+67a4 <[^>]*> nop
++0+67a8 <[^>]*> nop
++0+67ac <[^>]*> nop
++0+67b0 <[^>]*> nop
++0+67b4 <[^>]*> nop
++0+67b8 <[^>]*> nop
++0+67bc <[^>]*> nop
++0+67c0 <[^>]*> nop
++0+67c4 <[^>]*> nop
++0+67c8 <[^>]*> nop
++0+67cc <[^>]*> nop
++0+67d0 <[^>]*> nop
++0+67d4 <[^>]*> nop
++0+67d8 <[^>]*> nop
++0+67dc <[^>]*> nop
++0+67e0 <[^>]*> nop
++0+67e4 <[^>]*> nop
++0+67e8 <[^>]*> nop
++0+67ec <[^>]*> nop
++0+67f0 <[^>]*> nop
++0+67f4 <[^>]*> nop
++0+67f8 <[^>]*> nop
++0+67fc <[^>]*> nop
++0+6800 <[^>]*> nop
++0+6804 <[^>]*> nop
++0+6808 <[^>]*> nop
++0+680c <[^>]*> nop
++0+6810 <[^>]*> nop
++0+6814 <[^>]*> nop
++0+6818 <[^>]*> nop
++0+681c <[^>]*> nop
++0+6820 <[^>]*> nop
++0+6824 <[^>]*> nop
++0+6828 <[^>]*> nop
++0+682c <[^>]*> nop
++0+6830 <[^>]*> nop
++0+6834 <[^>]*> nop
++0+6838 <[^>]*> nop
++0+683c <[^>]*> nop
++0+6840 <[^>]*> nop
++0+6844 <[^>]*> nop
++0+6848 <[^>]*> nop
++0+684c <[^>]*> nop
++0+6850 <[^>]*> nop
++0+6854 <[^>]*> nop
++0+6858 <[^>]*> nop
++0+685c <[^>]*> nop
++0+6860 <[^>]*> nop
++0+6864 <[^>]*> nop
++0+6868 <[^>]*> nop
++0+686c <[^>]*> nop
++0+6870 <[^>]*> nop
++0+6874 <[^>]*> nop
++0+6878 <[^>]*> nop
++0+687c <[^>]*> nop
++0+6880 <[^>]*> nop
++0+6884 <[^>]*> nop
++0+6888 <[^>]*> nop
++0+688c <[^>]*> nop
++0+6890 <[^>]*> nop
++0+6894 <[^>]*> nop
++0+6898 <[^>]*> nop
++0+689c <[^>]*> nop
++0+68a0 <[^>]*> nop
++0+68a4 <[^>]*> nop
++0+68a8 <[^>]*> nop
++0+68ac <[^>]*> nop
++0+68b0 <[^>]*> nop
++0+68b4 <[^>]*> nop
++0+68b8 <[^>]*> nop
++0+68bc <[^>]*> nop
++0+68c0 <[^>]*> nop
++0+68c4 <[^>]*> nop
++0+68c8 <[^>]*> nop
++0+68cc <[^>]*> nop
++0+68d0 <[^>]*> nop
++0+68d4 <[^>]*> nop
++0+68d8 <[^>]*> nop
++0+68dc <[^>]*> nop
++0+68e0 <[^>]*> nop
++0+68e4 <[^>]*> nop
++0+68e8 <[^>]*> nop
++0+68ec <[^>]*> nop
++0+68f0 <[^>]*> nop
++0+68f4 <[^>]*> nop
++0+68f8 <[^>]*> nop
++0+68fc <[^>]*> nop
++0+6900 <[^>]*> nop
++0+6904 <[^>]*> nop
++0+6908 <[^>]*> nop
++0+690c <[^>]*> nop
++0+6910 <[^>]*> nop
++0+6914 <[^>]*> nop
++0+6918 <[^>]*> nop
++0+691c <[^>]*> nop
++0+6920 <[^>]*> nop
++0+6924 <[^>]*> nop
++0+6928 <[^>]*> nop
++0+692c <[^>]*> nop
++0+6930 <[^>]*> nop
++0+6934 <[^>]*> nop
++0+6938 <[^>]*> nop
++0+693c <[^>]*> nop
++0+6940 <[^>]*> nop
++0+6944 <[^>]*> nop
++0+6948 <[^>]*> nop
++0+694c <[^>]*> nop
++0+6950 <[^>]*> nop
++0+6954 <[^>]*> nop
++0+6958 <[^>]*> nop
++0+695c <[^>]*> nop
++0+6960 <[^>]*> nop
++0+6964 <[^>]*> nop
++0+6968 <[^>]*> nop
++0+696c <[^>]*> nop
++0+6970 <[^>]*> nop
++0+6974 <[^>]*> nop
++0+6978 <[^>]*> nop
++0+697c <[^>]*> nop
++0+6980 <[^>]*> nop
++0+6984 <[^>]*> nop
++0+6988 <[^>]*> nop
++0+698c <[^>]*> nop
++0+6990 <[^>]*> nop
++0+6994 <[^>]*> nop
++0+6998 <[^>]*> nop
++0+699c <[^>]*> nop
++0+69a0 <[^>]*> nop
++0+69a4 <[^>]*> nop
++0+69a8 <[^>]*> nop
++0+69ac <[^>]*> nop
++0+69b0 <[^>]*> nop
++0+69b4 <[^>]*> nop
++0+69b8 <[^>]*> nop
++0+69bc <[^>]*> nop
++0+69c0 <[^>]*> nop
++0+69c4 <[^>]*> nop
++0+69c8 <[^>]*> nop
++0+69cc <[^>]*> nop
++0+69d0 <[^>]*> nop
++0+69d4 <[^>]*> nop
++0+69d8 <[^>]*> nop
++0+69dc <[^>]*> nop
++0+69e0 <[^>]*> nop
++0+69e4 <[^>]*> nop
++0+69e8 <[^>]*> nop
++0+69ec <[^>]*> nop
++0+69f0 <[^>]*> nop
++0+69f4 <[^>]*> nop
++0+69f8 <[^>]*> nop
++0+69fc <[^>]*> nop
++0+6a00 <[^>]*> nop
++0+6a04 <[^>]*> nop
++0+6a08 <[^>]*> nop
++0+6a0c <[^>]*> nop
++0+6a10 <[^>]*> nop
++0+6a14 <[^>]*> nop
++0+6a18 <[^>]*> nop
++0+6a1c <[^>]*> nop
++0+6a20 <[^>]*> nop
++0+6a24 <[^>]*> nop
++0+6a28 <[^>]*> nop
++0+6a2c <[^>]*> nop
++0+6a30 <[^>]*> nop
++0+6a34 <[^>]*> nop
++0+6a38 <[^>]*> nop
++0+6a3c <[^>]*> nop
++0+6a40 <[^>]*> nop
++0+6a44 <[^>]*> nop
++0+6a48 <[^>]*> nop
++0+6a4c <[^>]*> nop
++0+6a50 <[^>]*> nop
++0+6a54 <[^>]*> nop
++0+6a58 <[^>]*> nop
++0+6a5c <[^>]*> nop
++0+6a60 <[^>]*> nop
++0+6a64 <[^>]*> nop
++0+6a68 <[^>]*> nop
++0+6a6c <[^>]*> nop
++0+6a70 <[^>]*> nop
++0+6a74 <[^>]*> nop
++0+6a78 <[^>]*> nop
++0+6a7c <[^>]*> nop
++0+6a80 <[^>]*> nop
++0+6a84 <[^>]*> nop
++0+6a88 <[^>]*> nop
++0+6a8c <[^>]*> nop
++0+6a90 <[^>]*> nop
++0+6a94 <[^>]*> nop
++0+6a98 <[^>]*> nop
++0+6a9c <[^>]*> nop
++0+6aa0 <[^>]*> nop
++0+6aa4 <[^>]*> nop
++0+6aa8 <[^>]*> nop
++0+6aac <[^>]*> nop
++0+6ab0 <[^>]*> nop
++0+6ab4 <[^>]*> nop
++0+6ab8 <[^>]*> nop
++0+6abc <[^>]*> nop
++0+6ac0 <[^>]*> nop
++0+6ac4 <[^>]*> nop
++0+6ac8 <[^>]*> nop
++0+6acc <[^>]*> nop
++0+6ad0 <[^>]*> nop
++0+6ad4 <[^>]*> nop
++0+6ad8 <[^>]*> nop
++0+6adc <[^>]*> nop
++0+6ae0 <[^>]*> nop
++0+6ae4 <[^>]*> nop
++0+6ae8 <[^>]*> nop
++0+6aec <[^>]*> nop
++0+6af0 <[^>]*> nop
++0+6af4 <[^>]*> nop
++0+6af8 <[^>]*> nop
++0+6afc <[^>]*> nop
++0+6b00 <[^>]*> nop
++0+6b04 <[^>]*> nop
++0+6b08 <[^>]*> nop
++0+6b0c <[^>]*> nop
++0+6b10 <[^>]*> nop
++0+6b14 <[^>]*> nop
++0+6b18 <[^>]*> nop
++0+6b1c <[^>]*> nop
++0+6b20 <[^>]*> nop
++0+6b24 <[^>]*> nop
++0+6b28 <[^>]*> nop
++0+6b2c <[^>]*> nop
++0+6b30 <[^>]*> nop
++0+6b34 <[^>]*> nop
++0+6b38 <[^>]*> nop
++0+6b3c <[^>]*> nop
++0+6b40 <[^>]*> nop
++0+6b44 <[^>]*> nop
++0+6b48 <[^>]*> nop
++0+6b4c <[^>]*> nop
++0+6b50 <[^>]*> nop
++0+6b54 <[^>]*> nop
++0+6b58 <[^>]*> nop
++0+6b5c <[^>]*> nop
++0+6b60 <[^>]*> nop
++0+6b64 <[^>]*> nop
++0+6b68 <[^>]*> nop
++0+6b6c <[^>]*> nop
++0+6b70 <[^>]*> nop
++0+6b74 <[^>]*> nop
++0+6b78 <[^>]*> nop
++0+6b7c <[^>]*> nop
++0+6b80 <[^>]*> nop
++0+6b84 <[^>]*> nop
++0+6b88 <[^>]*> nop
++0+6b8c <[^>]*> nop
++0+6b90 <[^>]*> nop
++0+6b94 <[^>]*> nop
++0+6b98 <[^>]*> nop
++0+6b9c <[^>]*> nop
++0+6ba0 <[^>]*> nop
++0+6ba4 <[^>]*> nop
++0+6ba8 <[^>]*> nop
++0+6bac <[^>]*> nop
++0+6bb0 <[^>]*> nop
++0+6bb4 <[^>]*> nop
++0+6bb8 <[^>]*> nop
++0+6bbc <[^>]*> nop
++0+6bc0 <[^>]*> nop
++0+6bc4 <[^>]*> nop
++0+6bc8 <[^>]*> nop
++0+6bcc <[^>]*> nop
++0+6bd0 <[^>]*> nop
++0+6bd4 <[^>]*> nop
++0+6bd8 <[^>]*> nop
++0+6bdc <[^>]*> nop
++0+6be0 <[^>]*> nop
++0+6be4 <[^>]*> nop
++0+6be8 <[^>]*> nop
++0+6bec <[^>]*> nop
++0+6bf0 <[^>]*> nop
++0+6bf4 <[^>]*> nop
++0+6bf8 <[^>]*> nop
++0+6bfc <[^>]*> nop
++0+6c00 <[^>]*> nop
++0+6c04 <[^>]*> nop
++0+6c08 <[^>]*> nop
++0+6c0c <[^>]*> nop
++0+6c10 <[^>]*> nop
++0+6c14 <[^>]*> nop
++0+6c18 <[^>]*> nop
++0+6c1c <[^>]*> nop
++0+6c20 <[^>]*> nop
++0+6c24 <[^>]*> nop
++0+6c28 <[^>]*> nop
++0+6c2c <[^>]*> nop
++0+6c30 <[^>]*> nop
++0+6c34 <[^>]*> nop
++0+6c38 <[^>]*> nop
++0+6c3c <[^>]*> nop
++0+6c40 <[^>]*> nop
++0+6c44 <[^>]*> nop
++0+6c48 <[^>]*> nop
++0+6c4c <[^>]*> nop
++0+6c50 <[^>]*> nop
++0+6c54 <[^>]*> nop
++0+6c58 <[^>]*> nop
++0+6c5c <[^>]*> nop
++0+6c60 <[^>]*> nop
++0+6c64 <[^>]*> nop
++0+6c68 <[^>]*> nop
++0+6c6c <[^>]*> nop
++0+6c70 <[^>]*> nop
++0+6c74 <[^>]*> nop
++0+6c78 <[^>]*> nop
++0+6c7c <[^>]*> nop
++0+6c80 <[^>]*> nop
++0+6c84 <[^>]*> nop
++0+6c88 <[^>]*> nop
++0+6c8c <[^>]*> nop
++0+6c90 <[^>]*> nop
++0+6c94 <[^>]*> nop
++0+6c98 <[^>]*> nop
++0+6c9c <[^>]*> nop
++0+6ca0 <[^>]*> nop
++0+6ca4 <[^>]*> nop
++0+6ca8 <[^>]*> nop
++0+6cac <[^>]*> nop
++0+6cb0 <[^>]*> nop
++0+6cb4 <[^>]*> nop
++0+6cb8 <[^>]*> nop
++0+6cbc <[^>]*> nop
++0+6cc0 <[^>]*> nop
++0+6cc4 <[^>]*> nop
++0+6cc8 <[^>]*> nop
++0+6ccc <[^>]*> nop
++0+6cd0 <[^>]*> nop
++0+6cd4 <[^>]*> nop
++0+6cd8 <[^>]*> nop
++0+6cdc <[^>]*> nop
++0+6ce0 <[^>]*> nop
++0+6ce4 <[^>]*> nop
++0+6ce8 <[^>]*> nop
++0+6cec <[^>]*> nop
++0+6cf0 <[^>]*> nop
++0+6cf4 <[^>]*> nop
++0+6cf8 <[^>]*> nop
++0+6cfc <[^>]*> nop
++0+6d00 <[^>]*> nop
++0+6d04 <[^>]*> nop
++0+6d08 <[^>]*> nop
++0+6d0c <[^>]*> nop
++0+6d10 <[^>]*> nop
++0+6d14 <[^>]*> nop
++0+6d18 <[^>]*> nop
++0+6d1c <[^>]*> nop
++0+6d20 <[^>]*> nop
++0+6d24 <[^>]*> nop
++0+6d28 <[^>]*> nop
++0+6d2c <[^>]*> nop
++0+6d30 <[^>]*> nop
++0+6d34 <[^>]*> nop
++0+6d38 <[^>]*> nop
++0+6d3c <[^>]*> nop
++0+6d40 <[^>]*> nop
++0+6d44 <[^>]*> nop
++0+6d48 <[^>]*> nop
++0+6d4c <[^>]*> nop
++0+6d50 <[^>]*> nop
++0+6d54 <[^>]*> nop
++0+6d58 <[^>]*> nop
++0+6d5c <[^>]*> nop
++0+6d60 <[^>]*> nop
++0+6d64 <[^>]*> nop
++0+6d68 <[^>]*> nop
++0+6d6c <[^>]*> nop
++0+6d70 <[^>]*> nop
++0+6d74 <[^>]*> nop
++0+6d78 <[^>]*> nop
++0+6d7c <[^>]*> nop
++0+6d80 <[^>]*> nop
++0+6d84 <[^>]*> nop
++0+6d88 <[^>]*> nop
++0+6d8c <[^>]*> nop
++0+6d90 <[^>]*> nop
++0+6d94 <[^>]*> nop
++0+6d98 <[^>]*> nop
++0+6d9c <[^>]*> nop
++0+6da0 <[^>]*> nop
++0+6da4 <[^>]*> nop
++0+6da8 <[^>]*> nop
++0+6dac <[^>]*> nop
++0+6db0 <[^>]*> nop
++0+6db4 <[^>]*> nop
++0+6db8 <[^>]*> nop
++0+6dbc <[^>]*> nop
++0+6dc0 <[^>]*> nop
++0+6dc4 <[^>]*> nop
++0+6dc8 <[^>]*> nop
++0+6dcc <[^>]*> nop
++0+6dd0 <[^>]*> nop
++0+6dd4 <[^>]*> nop
++0+6dd8 <[^>]*> nop
++0+6ddc <[^>]*> nop
++0+6de0 <[^>]*> nop
++0+6de4 <[^>]*> nop
++0+6de8 <[^>]*> nop
++0+6dec <[^>]*> nop
++0+6df0 <[^>]*> nop
++0+6df4 <[^>]*> nop
++0+6df8 <[^>]*> nop
++0+6dfc <[^>]*> nop
++0+6e00 <[^>]*> nop
++0+6e04 <[^>]*> nop
++0+6e08 <[^>]*> nop
++0+6e0c <[^>]*> nop
++0+6e10 <[^>]*> nop
++0+6e14 <[^>]*> nop
++0+6e18 <[^>]*> nop
++0+6e1c <[^>]*> nop
++0+6e20 <[^>]*> nop
++0+6e24 <[^>]*> nop
++0+6e28 <[^>]*> nop
++0+6e2c <[^>]*> nop
++0+6e30 <[^>]*> nop
++0+6e34 <[^>]*> nop
++0+6e38 <[^>]*> nop
++0+6e3c <[^>]*> nop
++0+6e40 <[^>]*> nop
++0+6e44 <[^>]*> nop
++0+6e48 <[^>]*> nop
++0+6e4c <[^>]*> nop
++0+6e50 <[^>]*> nop
++0+6e54 <[^>]*> nop
++0+6e58 <[^>]*> nop
++0+6e5c <[^>]*> nop
++0+6e60 <[^>]*> nop
++0+6e64 <[^>]*> nop
++0+6e68 <[^>]*> nop
++0+6e6c <[^>]*> nop
++0+6e70 <[^>]*> nop
++0+6e74 <[^>]*> nop
++0+6e78 <[^>]*> nop
++0+6e7c <[^>]*> nop
++0+6e80 <[^>]*> nop
++0+6e84 <[^>]*> nop
++0+6e88 <[^>]*> nop
++0+6e8c <[^>]*> nop
++0+6e90 <[^>]*> nop
++0+6e94 <[^>]*> nop
++0+6e98 <[^>]*> nop
++0+6e9c <[^>]*> nop
++0+6ea0 <[^>]*> nop
++0+6ea4 <[^>]*> nop
++0+6ea8 <[^>]*> nop
++0+6eac <[^>]*> nop
++0+6eb0 <[^>]*> nop
++0+6eb4 <[^>]*> nop
++0+6eb8 <[^>]*> nop
++0+6ebc <[^>]*> nop
++0+6ec0 <[^>]*> nop
++0+6ec4 <[^>]*> nop
++0+6ec8 <[^>]*> nop
++0+6ecc <[^>]*> nop
++0+6ed0 <[^>]*> nop
++0+6ed4 <[^>]*> nop
++0+6ed8 <[^>]*> nop
++0+6edc <[^>]*> nop
++0+6ee0 <[^>]*> nop
++0+6ee4 <[^>]*> nop
++0+6ee8 <[^>]*> nop
++0+6eec <[^>]*> nop
++0+6ef0 <[^>]*> nop
++0+6ef4 <[^>]*> nop
++0+6ef8 <[^>]*> nop
++0+6efc <[^>]*> nop
++0+6f00 <[^>]*> nop
++0+6f04 <[^>]*> nop
++0+6f08 <[^>]*> nop
++0+6f0c <[^>]*> nop
++0+6f10 <[^>]*> nop
++0+6f14 <[^>]*> nop
++0+6f18 <[^>]*> nop
++0+6f1c <[^>]*> nop
++0+6f20 <[^>]*> nop
++0+6f24 <[^>]*> nop
++0+6f28 <[^>]*> nop
++0+6f2c <[^>]*> nop
++0+6f30 <[^>]*> nop
++0+6f34 <[^>]*> nop
++0+6f38 <[^>]*> nop
++0+6f3c <[^>]*> nop
++0+6f40 <[^>]*> nop
++0+6f44 <[^>]*> nop
++0+6f48 <[^>]*> nop
++0+6f4c <[^>]*> nop
++0+6f50 <[^>]*> nop
++0+6f54 <[^>]*> nop
++0+6f58 <[^>]*> nop
++0+6f5c <[^>]*> nop
++0+6f60 <[^>]*> nop
++0+6f64 <[^>]*> nop
++0+6f68 <[^>]*> nop
++0+6f6c <[^>]*> nop
++0+6f70 <[^>]*> nop
++0+6f74 <[^>]*> nop
++0+6f78 <[^>]*> nop
++0+6f7c <[^>]*> nop
++0+6f80 <[^>]*> nop
++0+6f84 <[^>]*> nop
++0+6f88 <[^>]*> nop
++0+6f8c <[^>]*> nop
++0+6f90 <[^>]*> nop
++0+6f94 <[^>]*> nop
++0+6f98 <[^>]*> nop
++0+6f9c <[^>]*> nop
++0+6fa0 <[^>]*> nop
++0+6fa4 <[^>]*> nop
++0+6fa8 <[^>]*> nop
++0+6fac <[^>]*> nop
++0+6fb0 <[^>]*> nop
++0+6fb4 <[^>]*> nop
++0+6fb8 <[^>]*> nop
++0+6fbc <[^>]*> nop
++0+6fc0 <[^>]*> nop
++0+6fc4 <[^>]*> nop
++0+6fc8 <[^>]*> nop
++0+6fcc <[^>]*> nop
++0+6fd0 <[^>]*> nop
++0+6fd4 <[^>]*> nop
++0+6fd8 <[^>]*> nop
++0+6fdc <[^>]*> nop
++0+6fe0 <[^>]*> nop
++0+6fe4 <[^>]*> nop
++0+6fe8 <[^>]*> nop
++0+6fec <[^>]*> nop
++0+6ff0 <[^>]*> nop
++0+6ff4 <[^>]*> nop
++0+6ff8 <[^>]*> nop
++0+6ffc <[^>]*> nop
++0+7000 <[^>]*> nop
++0+7004 <[^>]*> nop
++0+7008 <[^>]*> nop
++0+700c <[^>]*> nop
++0+7010 <[^>]*> nop
++0+7014 <[^>]*> nop
++0+7018 <[^>]*> nop
++0+701c <[^>]*> nop
++0+7020 <[^>]*> nop
++0+7024 <[^>]*> nop
++0+7028 <[^>]*> nop
++0+702c <[^>]*> nop
++0+7030 <[^>]*> nop
++0+7034 <[^>]*> nop
++0+7038 <[^>]*> nop
++0+703c <[^>]*> nop
++0+7040 <[^>]*> nop
++0+7044 <[^>]*> nop
++0+7048 <[^>]*> nop
++0+704c <[^>]*> nop
++0+7050 <[^>]*> nop
++0+7054 <[^>]*> nop
++0+7058 <[^>]*> nop
++0+705c <[^>]*> nop
++0+7060 <[^>]*> nop
++0+7064 <[^>]*> nop
++0+7068 <[^>]*> nop
++0+706c <[^>]*> nop
++0+7070 <[^>]*> nop
++0+7074 <[^>]*> nop
++0+7078 <[^>]*> nop
++0+707c <[^>]*> nop
++0+7080 <[^>]*> nop
++0+7084 <[^>]*> nop
++0+7088 <[^>]*> nop
++0+708c <[^>]*> nop
++0+7090 <[^>]*> nop
++0+7094 <[^>]*> nop
++0+7098 <[^>]*> nop
++0+709c <[^>]*> nop
++0+70a0 <[^>]*> nop
++0+70a4 <[^>]*> nop
++0+70a8 <[^>]*> nop
++0+70ac <[^>]*> nop
++0+70b0 <[^>]*> nop
++0+70b4 <[^>]*> nop
++0+70b8 <[^>]*> nop
++0+70bc <[^>]*> nop
++0+70c0 <[^>]*> nop
++0+70c4 <[^>]*> nop
++0+70c8 <[^>]*> nop
++0+70cc <[^>]*> nop
++0+70d0 <[^>]*> nop
++0+70d4 <[^>]*> nop
++0+70d8 <[^>]*> nop
++0+70dc <[^>]*> nop
++0+70e0 <[^>]*> nop
++0+70e4 <[^>]*> nop
++0+70e8 <[^>]*> nop
++0+70ec <[^>]*> nop
++0+70f0 <[^>]*> nop
++0+70f4 <[^>]*> nop
++0+70f8 <[^>]*> nop
++0+70fc <[^>]*> nop
++0+7100 <[^>]*> nop
++0+7104 <[^>]*> nop
++0+7108 <[^>]*> nop
++0+710c <[^>]*> nop
++0+7110 <[^>]*> nop
++0+7114 <[^>]*> nop
++0+7118 <[^>]*> nop
++0+711c <[^>]*> nop
++0+7120 <[^>]*> nop
++0+7124 <[^>]*> nop
++0+7128 <[^>]*> nop
++0+712c <[^>]*> nop
++0+7130 <[^>]*> nop
++0+7134 <[^>]*> nop
++0+7138 <[^>]*> nop
++0+713c <[^>]*> nop
++0+7140 <[^>]*> nop
++0+7144 <[^>]*> nop
++0+7148 <[^>]*> nop
++0+714c <[^>]*> nop
++0+7150 <[^>]*> nop
++0+7154 <[^>]*> nop
++0+7158 <[^>]*> nop
++0+715c <[^>]*> nop
++0+7160 <[^>]*> nop
++0+7164 <[^>]*> nop
++0+7168 <[^>]*> nop
++0+716c <[^>]*> nop
++0+7170 <[^>]*> nop
++0+7174 <[^>]*> nop
++0+7178 <[^>]*> nop
++0+717c <[^>]*> nop
++0+7180 <[^>]*> nop
++0+7184 <[^>]*> nop
++0+7188 <[^>]*> nop
++0+718c <[^>]*> nop
++0+7190 <[^>]*> nop
++0+7194 <[^>]*> nop
++0+7198 <[^>]*> nop
++0+719c <[^>]*> nop
++0+71a0 <[^>]*> nop
++0+71a4 <[^>]*> nop
++0+71a8 <[^>]*> nop
++0+71ac <[^>]*> nop
++0+71b0 <[^>]*> nop
++0+71b4 <[^>]*> nop
++0+71b8 <[^>]*> nop
++0+71bc <[^>]*> nop
++0+71c0 <[^>]*> nop
++0+71c4 <[^>]*> nop
++0+71c8 <[^>]*> nop
++0+71cc <[^>]*> nop
++0+71d0 <[^>]*> nop
++0+71d4 <[^>]*> nop
++0+71d8 <[^>]*> nop
++0+71dc <[^>]*> nop
++0+71e0 <[^>]*> nop
++0+71e4 <[^>]*> nop
++0+71e8 <[^>]*> nop
++0+71ec <[^>]*> nop
++0+71f0 <[^>]*> nop
++0+71f4 <[^>]*> nop
++0+71f8 <[^>]*> nop
++0+71fc <[^>]*> nop
++0+7200 <[^>]*> nop
++0+7204 <[^>]*> nop
++0+7208 <[^>]*> nop
++0+720c <[^>]*> nop
++0+7210 <[^>]*> nop
++0+7214 <[^>]*> nop
++0+7218 <[^>]*> nop
++0+721c <[^>]*> nop
++0+7220 <[^>]*> nop
++0+7224 <[^>]*> nop
++0+7228 <[^>]*> nop
++0+722c <[^>]*> nop
++0+7230 <[^>]*> nop
++0+7234 <[^>]*> nop
++0+7238 <[^>]*> nop
++0+723c <[^>]*> nop
++0+7240 <[^>]*> nop
++0+7244 <[^>]*> nop
++0+7248 <[^>]*> nop
++0+724c <[^>]*> nop
++0+7250 <[^>]*> nop
++0+7254 <[^>]*> nop
++0+7258 <[^>]*> nop
++0+725c <[^>]*> nop
++0+7260 <[^>]*> nop
++0+7264 <[^>]*> nop
++0+7268 <[^>]*> nop
++0+726c <[^>]*> nop
++0+7270 <[^>]*> nop
++0+7274 <[^>]*> nop
++0+7278 <[^>]*> nop
++0+727c <[^>]*> nop
++0+7280 <[^>]*> nop
++0+7284 <[^>]*> nop
++0+7288 <[^>]*> nop
++0+728c <[^>]*> nop
++0+7290 <[^>]*> nop
++0+7294 <[^>]*> nop
++0+7298 <[^>]*> nop
++0+729c <[^>]*> nop
++0+72a0 <[^>]*> nop
++0+72a4 <[^>]*> nop
++0+72a8 <[^>]*> nop
++0+72ac <[^>]*> nop
++0+72b0 <[^>]*> nop
++0+72b4 <[^>]*> nop
++0+72b8 <[^>]*> nop
++0+72bc <[^>]*> nop
++0+72c0 <[^>]*> nop
++0+72c4 <[^>]*> nop
++0+72c8 <[^>]*> nop
++0+72cc <[^>]*> nop
++0+72d0 <[^>]*> nop
++0+72d4 <[^>]*> nop
++0+72d8 <[^>]*> nop
++0+72dc <[^>]*> nop
++0+72e0 <[^>]*> nop
++0+72e4 <[^>]*> nop
++0+72e8 <[^>]*> nop
++0+72ec <[^>]*> nop
++0+72f0 <[^>]*> nop
++0+72f4 <[^>]*> nop
++0+72f8 <[^>]*> nop
++0+72fc <[^>]*> nop
++0+7300 <[^>]*> nop
++0+7304 <[^>]*> nop
++0+7308 <[^>]*> nop
++0+730c <[^>]*> nop
++0+7310 <[^>]*> nop
++0+7314 <[^>]*> nop
++0+7318 <[^>]*> nop
++0+731c <[^>]*> nop
++0+7320 <[^>]*> nop
++0+7324 <[^>]*> nop
++0+7328 <[^>]*> nop
++0+732c <[^>]*> nop
++0+7330 <[^>]*> nop
++0+7334 <[^>]*> nop
++0+7338 <[^>]*> nop
++0+733c <[^>]*> nop
++0+7340 <[^>]*> nop
++0+7344 <[^>]*> nop
++0+7348 <[^>]*> nop
++0+734c <[^>]*> nop
++0+7350 <[^>]*> nop
++0+7354 <[^>]*> nop
++0+7358 <[^>]*> nop
++0+735c <[^>]*> nop
++0+7360 <[^>]*> nop
++0+7364 <[^>]*> nop
++0+7368 <[^>]*> nop
++0+736c <[^>]*> nop
++0+7370 <[^>]*> nop
++0+7374 <[^>]*> nop
++0+7378 <[^>]*> nop
++0+737c <[^>]*> nop
++0+7380 <[^>]*> nop
++0+7384 <[^>]*> nop
++0+7388 <[^>]*> nop
++0+738c <[^>]*> nop
++0+7390 <[^>]*> nop
++0+7394 <[^>]*> nop
++0+7398 <[^>]*> nop
++0+739c <[^>]*> nop
++0+73a0 <[^>]*> nop
++0+73a4 <[^>]*> nop
++0+73a8 <[^>]*> nop
++0+73ac <[^>]*> nop
++0+73b0 <[^>]*> nop
++0+73b4 <[^>]*> nop
++0+73b8 <[^>]*> nop
++0+73bc <[^>]*> nop
++0+73c0 <[^>]*> nop
++0+73c4 <[^>]*> nop
++0+73c8 <[^>]*> nop
++0+73cc <[^>]*> nop
++0+73d0 <[^>]*> nop
++0+73d4 <[^>]*> nop
++0+73d8 <[^>]*> nop
++0+73dc <[^>]*> nop
++0+73e0 <[^>]*> nop
++0+73e4 <[^>]*> nop
++0+73e8 <[^>]*> nop
++0+73ec <[^>]*> nop
++0+73f0 <[^>]*> nop
++0+73f4 <[^>]*> nop
++0+73f8 <[^>]*> nop
++0+73fc <[^>]*> nop
++0+7400 <[^>]*> nop
++0+7404 <[^>]*> nop
++0+7408 <[^>]*> nop
++0+740c <[^>]*> nop
++0+7410 <[^>]*> nop
++0+7414 <[^>]*> nop
++0+7418 <[^>]*> nop
++0+741c <[^>]*> nop
++0+7420 <[^>]*> nop
++0+7424 <[^>]*> nop
++0+7428 <[^>]*> nop
++0+742c <[^>]*> nop
++0+7430 <[^>]*> nop
++0+7434 <[^>]*> nop
++0+7438 <[^>]*> nop
++0+743c <[^>]*> nop
++0+7440 <[^>]*> nop
++0+7444 <[^>]*> nop
++0+7448 <[^>]*> nop
++0+744c <[^>]*> nop
++0+7450 <[^>]*> nop
++0+7454 <[^>]*> nop
++0+7458 <[^>]*> nop
++0+745c <[^>]*> nop
++0+7460 <[^>]*> nop
++0+7464 <[^>]*> nop
++0+7468 <[^>]*> nop
++0+746c <[^>]*> nop
++0+7470 <[^>]*> nop
++0+7474 <[^>]*> nop
++0+7478 <[^>]*> nop
++0+747c <[^>]*> nop
++0+7480 <[^>]*> nop
++0+7484 <[^>]*> nop
++0+7488 <[^>]*> nop
++0+748c <[^>]*> nop
++0+7490 <[^>]*> nop
++0+7494 <[^>]*> nop
++0+7498 <[^>]*> nop
++0+749c <[^>]*> nop
++0+74a0 <[^>]*> nop
++0+74a4 <[^>]*> nop
++0+74a8 <[^>]*> nop
++0+74ac <[^>]*> nop
++0+74b0 <[^>]*> nop
++0+74b4 <[^>]*> nop
++0+74b8 <[^>]*> nop
++0+74bc <[^>]*> nop
++0+74c0 <[^>]*> nop
++0+74c4 <[^>]*> nop
++0+74c8 <[^>]*> nop
++0+74cc <[^>]*> nop
++0+74d0 <[^>]*> nop
++0+74d4 <[^>]*> nop
++0+74d8 <[^>]*> nop
++0+74dc <[^>]*> nop
++0+74e0 <[^>]*> nop
++0+74e4 <[^>]*> nop
++0+74e8 <[^>]*> nop
++0+74ec <[^>]*> nop
++0+74f0 <[^>]*> nop
++0+74f4 <[^>]*> nop
++0+74f8 <[^>]*> nop
++0+74fc <[^>]*> nop
++0+7500 <[^>]*> nop
++0+7504 <[^>]*> nop
++0+7508 <[^>]*> nop
++0+750c <[^>]*> nop
++0+7510 <[^>]*> nop
++0+7514 <[^>]*> nop
++0+7518 <[^>]*> nop
++0+751c <[^>]*> nop
++0+7520 <[^>]*> nop
++0+7524 <[^>]*> nop
++0+7528 <[^>]*> nop
++0+752c <[^>]*> nop
++0+7530 <[^>]*> nop
++0+7534 <[^>]*> nop
++0+7538 <[^>]*> nop
++0+753c <[^>]*> nop
++0+7540 <[^>]*> nop
++0+7544 <[^>]*> nop
++0+7548 <[^>]*> nop
++0+754c <[^>]*> nop
++0+7550 <[^>]*> nop
++0+7554 <[^>]*> nop
++0+7558 <[^>]*> nop
++0+755c <[^>]*> nop
++0+7560 <[^>]*> nop
++0+7564 <[^>]*> nop
++0+7568 <[^>]*> nop
++0+756c <[^>]*> nop
++0+7570 <[^>]*> nop
++0+7574 <[^>]*> nop
++0+7578 <[^>]*> nop
++0+757c <[^>]*> nop
++0+7580 <[^>]*> nop
++0+7584 <[^>]*> nop
++0+7588 <[^>]*> nop
++0+758c <[^>]*> nop
++0+7590 <[^>]*> nop
++0+7594 <[^>]*> nop
++0+7598 <[^>]*> nop
++0+759c <[^>]*> nop
++0+75a0 <[^>]*> nop
++0+75a4 <[^>]*> nop
++0+75a8 <[^>]*> nop
++0+75ac <[^>]*> nop
++0+75b0 <[^>]*> nop
++0+75b4 <[^>]*> nop
++0+75b8 <[^>]*> nop
++0+75bc <[^>]*> nop
++0+75c0 <[^>]*> nop
++0+75c4 <[^>]*> nop
++0+75c8 <[^>]*> nop
++0+75cc <[^>]*> nop
++0+75d0 <[^>]*> nop
++0+75d4 <[^>]*> nop
++0+75d8 <[^>]*> nop
++0+75dc <[^>]*> nop
++0+75e0 <[^>]*> nop
++0+75e4 <[^>]*> nop
++0+75e8 <[^>]*> nop
++0+75ec <[^>]*> nop
++0+75f0 <[^>]*> nop
++0+75f4 <[^>]*> nop
++0+75f8 <[^>]*> nop
++0+75fc <[^>]*> nop
++0+7600 <[^>]*> nop
++0+7604 <[^>]*> nop
++0+7608 <[^>]*> nop
++0+760c <[^>]*> nop
++0+7610 <[^>]*> nop
++0+7614 <[^>]*> nop
++0+7618 <[^>]*> nop
++0+761c <[^>]*> nop
++0+7620 <[^>]*> nop
++0+7624 <[^>]*> nop
++0+7628 <[^>]*> nop
++0+762c <[^>]*> nop
++0+7630 <[^>]*> nop
++0+7634 <[^>]*> nop
++0+7638 <[^>]*> nop
++0+763c <[^>]*> nop
++0+7640 <[^>]*> nop
++0+7644 <[^>]*> nop
++0+7648 <[^>]*> nop
++0+764c <[^>]*> nop
++0+7650 <[^>]*> nop
++0+7654 <[^>]*> nop
++0+7658 <[^>]*> nop
++0+765c <[^>]*> nop
++0+7660 <[^>]*> nop
++0+7664 <[^>]*> nop
++0+7668 <[^>]*> nop
++0+766c <[^>]*> nop
++0+7670 <[^>]*> nop
++0+7674 <[^>]*> nop
++0+7678 <[^>]*> nop
++0+767c <[^>]*> nop
++0+7680 <[^>]*> nop
++0+7684 <[^>]*> nop
++0+7688 <[^>]*> nop
++0+768c <[^>]*> nop
++0+7690 <[^>]*> nop
++0+7694 <[^>]*> nop
++0+7698 <[^>]*> nop
++0+769c <[^>]*> nop
++0+76a0 <[^>]*> nop
++0+76a4 <[^>]*> nop
++0+76a8 <[^>]*> nop
++0+76ac <[^>]*> nop
++0+76b0 <[^>]*> nop
++0+76b4 <[^>]*> nop
++0+76b8 <[^>]*> nop
++0+76bc <[^>]*> nop
++0+76c0 <[^>]*> nop
++0+76c4 <[^>]*> nop
++0+76c8 <[^>]*> nop
++0+76cc <[^>]*> nop
++0+76d0 <[^>]*> nop
++0+76d4 <[^>]*> nop
++0+76d8 <[^>]*> nop
++0+76dc <[^>]*> nop
++0+76e0 <[^>]*> nop
++0+76e4 <[^>]*> nop
++0+76e8 <[^>]*> nop
++0+76ec <[^>]*> nop
++0+76f0 <[^>]*> nop
++0+76f4 <[^>]*> nop
++0+76f8 <[^>]*> nop
++0+76fc <[^>]*> nop
++0+7700 <[^>]*> nop
++0+7704 <[^>]*> nop
++0+7708 <[^>]*> nop
++0+770c <[^>]*> nop
++0+7710 <[^>]*> nop
++0+7714 <[^>]*> nop
++0+7718 <[^>]*> nop
++0+771c <[^>]*> nop
++0+7720 <[^>]*> nop
++0+7724 <[^>]*> nop
++0+7728 <[^>]*> nop
++0+772c <[^>]*> nop
++0+7730 <[^>]*> nop
++0+7734 <[^>]*> nop
++0+7738 <[^>]*> nop
++0+773c <[^>]*> nop
++0+7740 <[^>]*> nop
++0+7744 <[^>]*> nop
++0+7748 <[^>]*> nop
++0+774c <[^>]*> nop
++0+7750 <[^>]*> nop
++0+7754 <[^>]*> nop
++0+7758 <[^>]*> nop
++0+775c <[^>]*> nop
++0+7760 <[^>]*> nop
++0+7764 <[^>]*> nop
++0+7768 <[^>]*> nop
++0+776c <[^>]*> nop
++0+7770 <[^>]*> nop
++0+7774 <[^>]*> nop
++0+7778 <[^>]*> nop
++0+777c <[^>]*> nop
++0+7780 <[^>]*> nop
++0+7784 <[^>]*> nop
++0+7788 <[^>]*> nop
++0+778c <[^>]*> nop
++0+7790 <[^>]*> nop
++0+7794 <[^>]*> nop
++0+7798 <[^>]*> nop
++0+779c <[^>]*> nop
++0+77a0 <[^>]*> nop
++0+77a4 <[^>]*> nop
++0+77a8 <[^>]*> nop
++0+77ac <[^>]*> nop
++0+77b0 <[^>]*> nop
++0+77b4 <[^>]*> nop
++0+77b8 <[^>]*> nop
++0+77bc <[^>]*> nop
++0+77c0 <[^>]*> nop
++0+77c4 <[^>]*> nop
++0+77c8 <[^>]*> nop
++0+77cc <[^>]*> nop
++0+77d0 <[^>]*> nop
++0+77d4 <[^>]*> nop
++0+77d8 <[^>]*> nop
++0+77dc <[^>]*> nop
++0+77e0 <[^>]*> nop
++0+77e4 <[^>]*> nop
++0+77e8 <[^>]*> nop
++0+77ec <[^>]*> nop
++0+77f0 <[^>]*> nop
++0+77f4 <[^>]*> nop
++0+77f8 <[^>]*> nop
++0+77fc <[^>]*> nop
++0+7800 <[^>]*> nop
++0+7804 <[^>]*> nop
++0+7808 <[^>]*> nop
++0+780c <[^>]*> nop
++0+7810 <[^>]*> nop
++0+7814 <[^>]*> nop
++0+7818 <[^>]*> nop
++0+781c <[^>]*> nop
++0+7820 <[^>]*> nop
++0+7824 <[^>]*> nop
++0+7828 <[^>]*> nop
++0+782c <[^>]*> nop
++0+7830 <[^>]*> nop
++0+7834 <[^>]*> nop
++0+7838 <[^>]*> nop
++0+783c <[^>]*> nop
++0+7840 <[^>]*> nop
++0+7844 <[^>]*> nop
++0+7848 <[^>]*> nop
++0+784c <[^>]*> nop
++0+7850 <[^>]*> nop
++0+7854 <[^>]*> nop
++0+7858 <[^>]*> nop
++0+785c <[^>]*> nop
++0+7860 <[^>]*> nop
++0+7864 <[^>]*> nop
++0+7868 <[^>]*> nop
++0+786c <[^>]*> nop
++0+7870 <[^>]*> nop
++0+7874 <[^>]*> nop
++0+7878 <[^>]*> nop
++0+787c <[^>]*> nop
++0+7880 <[^>]*> nop
++0+7884 <[^>]*> nop
++0+7888 <[^>]*> nop
++0+788c <[^>]*> nop
++0+7890 <[^>]*> nop
++0+7894 <[^>]*> nop
++0+7898 <[^>]*> nop
++0+789c <[^>]*> nop
++0+78a0 <[^>]*> nop
++0+78a4 <[^>]*> nop
++0+78a8 <[^>]*> nop
++0+78ac <[^>]*> nop
++0+78b0 <[^>]*> nop
++0+78b4 <[^>]*> nop
++0+78b8 <[^>]*> nop
++0+78bc <[^>]*> nop
++0+78c0 <[^>]*> nop
++0+78c4 <[^>]*> nop
++0+78c8 <[^>]*> nop
++0+78cc <[^>]*> nop
++0+78d0 <[^>]*> nop
++0+78d4 <[^>]*> nop
++0+78d8 <[^>]*> nop
++0+78dc <[^>]*> nop
++0+78e0 <[^>]*> nop
++0+78e4 <[^>]*> nop
++0+78e8 <[^>]*> nop
++0+78ec <[^>]*> nop
++0+78f0 <[^>]*> nop
++0+78f4 <[^>]*> nop
++0+78f8 <[^>]*> nop
++0+78fc <[^>]*> nop
++0+7900 <[^>]*> nop
++0+7904 <[^>]*> nop
++0+7908 <[^>]*> nop
++0+790c <[^>]*> nop
++0+7910 <[^>]*> nop
++0+7914 <[^>]*> nop
++0+7918 <[^>]*> nop
++0+791c <[^>]*> nop
++0+7920 <[^>]*> nop
++0+7924 <[^>]*> nop
++0+7928 <[^>]*> nop
++0+792c <[^>]*> nop
++0+7930 <[^>]*> nop
++0+7934 <[^>]*> nop
++0+7938 <[^>]*> nop
++0+793c <[^>]*> nop
++0+7940 <[^>]*> nop
++0+7944 <[^>]*> nop
++0+7948 <[^>]*> nop
++0+794c <[^>]*> nop
++0+7950 <[^>]*> nop
++0+7954 <[^>]*> nop
++0+7958 <[^>]*> nop
++0+795c <[^>]*> nop
++0+7960 <[^>]*> nop
++0+7964 <[^>]*> nop
++0+7968 <[^>]*> nop
++0+796c <[^>]*> nop
++0+7970 <[^>]*> nop
++0+7974 <[^>]*> nop
++0+7978 <[^>]*> nop
++0+797c <[^>]*> nop
++0+7980 <[^>]*> nop
++0+7984 <[^>]*> nop
++0+7988 <[^>]*> nop
++0+798c <[^>]*> nop
++0+7990 <[^>]*> nop
++0+7994 <[^>]*> nop
++0+7998 <[^>]*> nop
++0+799c <[^>]*> nop
++0+79a0 <[^>]*> nop
++0+79a4 <[^>]*> nop
++0+79a8 <[^>]*> nop
++0+79ac <[^>]*> nop
++0+79b0 <[^>]*> nop
++0+79b4 <[^>]*> nop
++0+79b8 <[^>]*> nop
++0+79bc <[^>]*> nop
++0+79c0 <[^>]*> nop
++0+79c4 <[^>]*> nop
++0+79c8 <[^>]*> nop
++0+79cc <[^>]*> nop
++0+79d0 <[^>]*> nop
++0+79d4 <[^>]*> nop
++0+79d8 <[^>]*> nop
++0+79dc <[^>]*> nop
++0+79e0 <[^>]*> nop
++0+79e4 <[^>]*> nop
++0+79e8 <[^>]*> nop
++0+79ec <[^>]*> nop
++0+79f0 <[^>]*> nop
++0+79f4 <[^>]*> nop
++0+79f8 <[^>]*> nop
++0+79fc <[^>]*> nop
++0+7a00 <[^>]*> nop
++0+7a04 <[^>]*> nop
++0+7a08 <[^>]*> nop
++0+7a0c <[^>]*> nop
++0+7a10 <[^>]*> nop
++0+7a14 <[^>]*> nop
++0+7a18 <[^>]*> nop
++0+7a1c <[^>]*> nop
++0+7a20 <[^>]*> nop
++0+7a24 <[^>]*> nop
++0+7a28 <[^>]*> nop
++0+7a2c <[^>]*> nop
++0+7a30 <[^>]*> nop
++0+7a34 <[^>]*> nop
++0+7a38 <[^>]*> nop
++0+7a3c <[^>]*> nop
++0+7a40 <[^>]*> nop
++0+7a44 <[^>]*> nop
++0+7a48 <[^>]*> nop
++0+7a4c <[^>]*> nop
++0+7a50 <[^>]*> nop
++0+7a54 <[^>]*> nop
++0+7a58 <[^>]*> nop
++0+7a5c <[^>]*> nop
++0+7a60 <[^>]*> nop
++0+7a64 <[^>]*> nop
++0+7a68 <[^>]*> nop
++0+7a6c <[^>]*> nop
++0+7a70 <[^>]*> nop
++0+7a74 <[^>]*> nop
++0+7a78 <[^>]*> nop
++0+7a7c <[^>]*> nop
++0+7a80 <[^>]*> nop
++0+7a84 <[^>]*> nop
++0+7a88 <[^>]*> nop
++0+7a8c <[^>]*> nop
++0+7a90 <[^>]*> nop
++0+7a94 <[^>]*> nop
++0+7a98 <[^>]*> nop
++0+7a9c <[^>]*> nop
++0+7aa0 <[^>]*> nop
++0+7aa4 <[^>]*> nop
++0+7aa8 <[^>]*> nop
++0+7aac <[^>]*> nop
++0+7ab0 <[^>]*> nop
++0+7ab4 <[^>]*> nop
++0+7ab8 <[^>]*> nop
++0+7abc <[^>]*> nop
++0+7ac0 <[^>]*> nop
++0+7ac4 <[^>]*> nop
++0+7ac8 <[^>]*> nop
++0+7acc <[^>]*> nop
++0+7ad0 <[^>]*> nop
++0+7ad4 <[^>]*> nop
++0+7ad8 <[^>]*> nop
++0+7adc <[^>]*> nop
++0+7ae0 <[^>]*> nop
++0+7ae4 <[^>]*> nop
++0+7ae8 <[^>]*> nop
++0+7aec <[^>]*> nop
++0+7af0 <[^>]*> nop
++0+7af4 <[^>]*> nop
++0+7af8 <[^>]*> nop
++0+7afc <[^>]*> nop
++0+7b00 <[^>]*> nop
++0+7b04 <[^>]*> nop
++0+7b08 <[^>]*> nop
++0+7b0c <[^>]*> nop
++0+7b10 <[^>]*> nop
++0+7b14 <[^>]*> nop
++0+7b18 <[^>]*> nop
++0+7b1c <[^>]*> nop
++0+7b20 <[^>]*> nop
++0+7b24 <[^>]*> nop
++0+7b28 <[^>]*> nop
++0+7b2c <[^>]*> nop
++0+7b30 <[^>]*> nop
++0+7b34 <[^>]*> nop
++0+7b38 <[^>]*> nop
++0+7b3c <[^>]*> nop
++0+7b40 <[^>]*> nop
++0+7b44 <[^>]*> nop
++0+7b48 <[^>]*> nop
++0+7b4c <[^>]*> nop
++0+7b50 <[^>]*> nop
++0+7b54 <[^>]*> nop
++0+7b58 <[^>]*> nop
++0+7b5c <[^>]*> nop
++0+7b60 <[^>]*> nop
++0+7b64 <[^>]*> nop
++0+7b68 <[^>]*> nop
++0+7b6c <[^>]*> nop
++0+7b70 <[^>]*> nop
++0+7b74 <[^>]*> nop
++0+7b78 <[^>]*> nop
++0+7b7c <[^>]*> nop
++0+7b80 <[^>]*> nop
++0+7b84 <[^>]*> nop
++0+7b88 <[^>]*> nop
++0+7b8c <[^>]*> nop
++0+7b90 <[^>]*> nop
++0+7b94 <[^>]*> nop
++0+7b98 <[^>]*> nop
++0+7b9c <[^>]*> nop
++0+7ba0 <[^>]*> nop
++0+7ba4 <[^>]*> nop
++0+7ba8 <[^>]*> nop
++0+7bac <[^>]*> nop
++0+7bb0 <[^>]*> nop
++0+7bb4 <[^>]*> nop
++0+7bb8 <[^>]*> nop
++0+7bbc <[^>]*> nop
++0+7bc0 <[^>]*> nop
++0+7bc4 <[^>]*> nop
++0+7bc8 <[^>]*> nop
++0+7bcc <[^>]*> nop
++0+7bd0 <[^>]*> nop
++0+7bd4 <[^>]*> nop
++0+7bd8 <[^>]*> nop
++0+7bdc <[^>]*> nop
++0+7be0 <[^>]*> nop
++0+7be4 <[^>]*> nop
++0+7be8 <[^>]*> nop
++0+7bec <[^>]*> nop
++0+7bf0 <[^>]*> nop
++0+7bf4 <[^>]*> nop
++0+7bf8 <[^>]*> nop
++0+7bfc <[^>]*> nop
++0+7c00 <[^>]*> nop
++0+7c04 <[^>]*> nop
++0+7c08 <[^>]*> nop
++0+7c0c <[^>]*> nop
++0+7c10 <[^>]*> nop
++0+7c14 <[^>]*> nop
++0+7c18 <[^>]*> nop
++0+7c1c <[^>]*> nop
++0+7c20 <[^>]*> nop
++0+7c24 <[^>]*> nop
++0+7c28 <[^>]*> nop
++0+7c2c <[^>]*> nop
++0+7c30 <[^>]*> nop
++0+7c34 <[^>]*> nop
++0+7c38 <[^>]*> nop
++0+7c3c <[^>]*> nop
++0+7c40 <[^>]*> nop
++0+7c44 <[^>]*> nop
++0+7c48 <[^>]*> nop
++0+7c4c <[^>]*> nop
++0+7c50 <[^>]*> nop
++0+7c54 <[^>]*> nop
++0+7c58 <[^>]*> nop
++0+7c5c <[^>]*> nop
++0+7c60 <[^>]*> nop
++0+7c64 <[^>]*> nop
++0+7c68 <[^>]*> nop
++0+7c6c <[^>]*> nop
++0+7c70 <[^>]*> nop
++0+7c74 <[^>]*> nop
++0+7c78 <[^>]*> nop
++0+7c7c <[^>]*> nop
++0+7c80 <[^>]*> nop
++0+7c84 <[^>]*> nop
++0+7c88 <[^>]*> nop
++0+7c8c <[^>]*> nop
++0+7c90 <[^>]*> nop
++0+7c94 <[^>]*> nop
++0+7c98 <[^>]*> nop
++0+7c9c <[^>]*> nop
++0+7ca0 <[^>]*> nop
++0+7ca4 <[^>]*> nop
++0+7ca8 <[^>]*> nop
++0+7cac <[^>]*> nop
++0+7cb0 <[^>]*> nop
++0+7cb4 <[^>]*> nop
++0+7cb8 <[^>]*> nop
++0+7cbc <[^>]*> nop
++0+7cc0 <[^>]*> nop
++0+7cc4 <[^>]*> nop
++0+7cc8 <[^>]*> nop
++0+7ccc <[^>]*> nop
++0+7cd0 <[^>]*> nop
++0+7cd4 <[^>]*> nop
++0+7cd8 <[^>]*> nop
++0+7cdc <[^>]*> nop
++0+7ce0 <[^>]*> nop
++0+7ce4 <[^>]*> nop
++0+7ce8 <[^>]*> nop
++0+7cec <[^>]*> nop
++0+7cf0 <[^>]*> nop
++0+7cf4 <[^>]*> nop
++0+7cf8 <[^>]*> nop
++0+7cfc <[^>]*> nop
++0+7d00 <[^>]*> nop
++0+7d04 <[^>]*> nop
++0+7d08 <[^>]*> nop
++0+7d0c <[^>]*> nop
++0+7d10 <[^>]*> nop
++0+7d14 <[^>]*> nop
++0+7d18 <[^>]*> nop
++0+7d1c <[^>]*> nop
++0+7d20 <[^>]*> nop
++0+7d24 <[^>]*> nop
++0+7d28 <[^>]*> nop
++0+7d2c <[^>]*> nop
++0+7d30 <[^>]*> nop
++0+7d34 <[^>]*> nop
++0+7d38 <[^>]*> nop
++0+7d3c <[^>]*> nop
++0+7d40 <[^>]*> nop
++0+7d44 <[^>]*> nop
++0+7d48 <[^>]*> nop
++0+7d4c <[^>]*> nop
++0+7d50 <[^>]*> nop
++0+7d54 <[^>]*> nop
++0+7d58 <[^>]*> nop
++0+7d5c <[^>]*> nop
++0+7d60 <[^>]*> nop
++0+7d64 <[^>]*> nop
++0+7d68 <[^>]*> nop
++0+7d6c <[^>]*> nop
++0+7d70 <[^>]*> nop
++0+7d74 <[^>]*> nop
++0+7d78 <[^>]*> nop
++0+7d7c <[^>]*> nop
++0+7d80 <[^>]*> nop
++0+7d84 <[^>]*> nop
++0+7d88 <[^>]*> nop
++0+7d8c <[^>]*> nop
++0+7d90 <[^>]*> nop
++0+7d94 <[^>]*> nop
++0+7d98 <[^>]*> nop
++0+7d9c <[^>]*> nop
++0+7da0 <[^>]*> nop
++0+7da4 <[^>]*> nop
++0+7da8 <[^>]*> nop
++0+7dac <[^>]*> nop
++0+7db0 <[^>]*> nop
++0+7db4 <[^>]*> nop
++0+7db8 <[^>]*> nop
++0+7dbc <[^>]*> nop
++0+7dc0 <[^>]*> nop
++0+7dc4 <[^>]*> nop
++0+7dc8 <[^>]*> nop
++0+7dcc <[^>]*> nop
++0+7dd0 <[^>]*> nop
++0+7dd4 <[^>]*> nop
++0+7dd8 <[^>]*> nop
++0+7ddc <[^>]*> nop
++0+7de0 <[^>]*> nop
++0+7de4 <[^>]*> nop
++0+7de8 <[^>]*> nop
++0+7dec <[^>]*> nop
++0+7df0 <[^>]*> nop
++0+7df4 <[^>]*> nop
++0+7df8 <[^>]*> nop
++0+7dfc <[^>]*> nop
++0+7e00 <[^>]*> nop
++0+7e04 <[^>]*> nop
++0+7e08 <[^>]*> nop
++0+7e0c <[^>]*> nop
++0+7e10 <[^>]*> nop
++0+7e14 <[^>]*> nop
++0+7e18 <[^>]*> nop
++0+7e1c <[^>]*> nop
++0+7e20 <[^>]*> nop
++0+7e24 <[^>]*> nop
++0+7e28 <[^>]*> nop
++0+7e2c <[^>]*> nop
++0+7e30 <[^>]*> nop
++0+7e34 <[^>]*> nop
++0+7e38 <[^>]*> nop
++0+7e3c <[^>]*> nop
++0+7e40 <[^>]*> nop
++0+7e44 <[^>]*> nop
++0+7e48 <[^>]*> nop
++0+7e4c <[^>]*> nop
++0+7e50 <[^>]*> nop
++0+7e54 <[^>]*> nop
++0+7e58 <[^>]*> nop
++0+7e5c <[^>]*> nop
++0+7e60 <[^>]*> nop
++0+7e64 <[^>]*> nop
++0+7e68 <[^>]*> nop
++0+7e6c <[^>]*> nop
++0+7e70 <[^>]*> nop
++0+7e74 <[^>]*> nop
++0+7e78 <[^>]*> nop
++0+7e7c <[^>]*> nop
++0+7e80 <[^>]*> nop
++0+7e84 <[^>]*> nop
++0+7e88 <[^>]*> nop
++0+7e8c <[^>]*> nop
++0+7e90 <[^>]*> nop
++0+7e94 <[^>]*> nop
++0+7e98 <[^>]*> nop
++0+7e9c <[^>]*> nop
++0+7ea0 <[^>]*> nop
++0+7ea4 <[^>]*> nop
++0+7ea8 <[^>]*> nop
++0+7eac <[^>]*> nop
++0+7eb0 <[^>]*> nop
++0+7eb4 <[^>]*> nop
++0+7eb8 <[^>]*> nop
++0+7ebc <[^>]*> nop
++0+7ec0 <[^>]*> nop
++0+7ec4 <[^>]*> nop
++0+7ec8 <[^>]*> nop
++0+7ecc <[^>]*> nop
++0+7ed0 <[^>]*> nop
++0+7ed4 <[^>]*> nop
++0+7ed8 <[^>]*> nop
++0+7edc <[^>]*> nop
++0+7ee0 <[^>]*> nop
++0+7ee4 <[^>]*> nop
++0+7ee8 <[^>]*> nop
++0+7eec <[^>]*> nop
++0+7ef0 <[^>]*> nop
++0+7ef4 <[^>]*> nop
++0+7ef8 <[^>]*> nop
++0+7efc <[^>]*> nop
++0+7f00 <[^>]*> nop
++0+7f04 <[^>]*> nop
++0+7f08 <[^>]*> nop
++0+7f0c <[^>]*> nop
++0+7f10 <[^>]*> nop
++0+7f14 <[^>]*> nop
++0+7f18 <[^>]*> nop
++0+7f1c <[^>]*> nop
++0+7f20 <[^>]*> nop
++0+7f24 <[^>]*> nop
++0+7f28 <[^>]*> nop
++0+7f2c <[^>]*> nop
++0+7f30 <[^>]*> nop
++0+7f34 <[^>]*> nop
++0+7f38 <[^>]*> nop
++0+7f3c <[^>]*> nop
++0+7f40 <[^>]*> nop
++0+7f44 <[^>]*> nop
++0+7f48 <[^>]*> nop
++0+7f4c <[^>]*> nop
++0+7f50 <[^>]*> nop
++0+7f54 <[^>]*> nop
++0+7f58 <[^>]*> nop
++0+7f5c <[^>]*> nop
++0+7f60 <[^>]*> nop
++0+7f64 <[^>]*> nop
++0+7f68 <[^>]*> nop
++0+7f6c <[^>]*> nop
++0+7f70 <[^>]*> nop
++0+7f74 <[^>]*> nop
++0+7f78 <[^>]*> nop
++0+7f7c <[^>]*> nop
++0+7f80 <[^>]*> nop
++0+7f84 <[^>]*> nop
++0+7f88 <[^>]*> nop
++0+7f8c <[^>]*> nop
++0+7f90 <[^>]*> nop
++0+7f94 <[^>]*> nop
++0+7f98 <[^>]*> nop
++0+7f9c <[^>]*> nop
++0+7fa0 <[^>]*> nop
++0+7fa4 <[^>]*> nop
++0+7fa8 <[^>]*> nop
++0+7fac <[^>]*> nop
++0+7fb0 <[^>]*> nop
++0+7fb4 <[^>]*> nop
++0+7fb8 <[^>]*> nop
++0+7fbc <[^>]*> nop
++0+7fc0 <[^>]*> nop
++0+7fc4 <[^>]*> nop
++0+7fc8 <[^>]*> nop
++0+7fcc <[^>]*> nop
++0+7fd0 <[^>]*> nop
++0+7fd4 <[^>]*> nop
++0+7fd8 <[^>]*> nop
++0+7fdc <[^>]*> nop
++0+7fe0 <[^>]*> nop
++0+7fe4 <[^>]*> nop
++0+7fe8 <[^>]*> nop
++0+7fec <[^>]*> nop
++0+7ff0 <[^>]*> nop
++0+7ff4 <[^>]*> nop
++0+7ff8 <[^>]*> nop
++0+7ffc <[^>]*> nop
++0+8000 <[^>]*> movhi at,0
++0+8004 <[^>]*> ori at,at,0
++0+8008 <[^>]*> jmp at
++0+800c <out_of_range> nop
++ ...
++
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_section.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_section.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++ beq r2, r3, out_of_range
++ bne r2, r3, in_range
++ nop
++ nop
++in_range:
++ nop
++.align 15
++ br 0
++out_of_range:
++ nop
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_ujmp.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_ujmp.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8221 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 relax_ujmp
++
++# Test relaxation of unconditional jumps
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section text2:
++00000000 <[^>]*> br 00008000 <[^>]*>
++00000004 <[^>]*> nop
++00000008 <[^>]*> nop
++0000000c <[^>]*> movhi at,1
++00000010 <[^>]*> ori at,at,24
++00000014 <[^>]*> jmp at
++00000018 <[^>]*> br 0000002c <[^>]*>
++0000001c <[^>]*> nop
++00000020 <[^>]*> nop
++00000024 <[^>]*> nop
++00000028 <[^>]*> nop
++0000002c <[^>]*> nop
++Disassembly of section text1:
++00008000 <[^>]*> br 00010000 <[^>]*>
++00008004 <[^>]*> nop
++00008008 <[^>]*> nop
++0000800c <[^>]*> movhi at,1
++00008010 <[^>]*> ori at,at,24
++00008014 <[^>]*> jmp at
++00008018 <[^>]*> nop
++0000801c <[^>]*> nop
++00008020 <[^>]*> nop
++00008024 <[^>]*> nop
++00008028 <[^>]*> nop
++0000802c <[^>]*> nop
++00008030 <[^>]*> nop
++00008034 <[^>]*> nop
++00008038 <[^>]*> nop
++0000803c <[^>]*> nop
++00008040 <[^>]*> nop
++00008044 <[^>]*> nop
++00008048 <[^>]*> nop
++0000804c <[^>]*> nop
++00008050 <[^>]*> nop
++00008054 <[^>]*> nop
++00008058 <[^>]*> nop
++0000805c <[^>]*> nop
++00008060 <[^>]*> nop
++00008064 <[^>]*> nop
++00008068 <[^>]*> nop
++0000806c <[^>]*> nop
++00008070 <[^>]*> nop
++00008074 <[^>]*> nop
++00008078 <[^>]*> nop
++0000807c <[^>]*> nop
++00008080 <[^>]*> nop
++00008084 <[^>]*> nop
++00008088 <[^>]*> nop
++0000808c <[^>]*> nop
++00008090 <[^>]*> nop
++00008094 <[^>]*> nop
++00008098 <[^>]*> nop
++0000809c <[^>]*> nop
++000080a0 <[^>]*> nop
++000080a4 <[^>]*> nop
++000080a8 <[^>]*> nop
++000080ac <[^>]*> nop
++000080b0 <[^>]*> nop
++000080b4 <[^>]*> nop
++000080b8 <[^>]*> nop
++000080bc <[^>]*> nop
++000080c0 <[^>]*> nop
++000080c4 <[^>]*> nop
++000080c8 <[^>]*> nop
++000080cc <[^>]*> nop
++000080d0 <[^>]*> nop
++000080d4 <[^>]*> nop
++000080d8 <[^>]*> nop
++000080dc <[^>]*> nop
++000080e0 <[^>]*> nop
++000080e4 <[^>]*> nop
++000080e8 <[^>]*> nop
++000080ec <[^>]*> nop
++000080f0 <[^>]*> nop
++000080f4 <[^>]*> nop
++000080f8 <[^>]*> nop
++000080fc <[^>]*> nop
++00008100 <[^>]*> nop
++00008104 <[^>]*> nop
++00008108 <[^>]*> nop
++0000810c <[^>]*> nop
++00008110 <[^>]*> nop
++00008114 <[^>]*> nop
++00008118 <[^>]*> nop
++0000811c <[^>]*> nop
++00008120 <[^>]*> nop
++00008124 <[^>]*> nop
++00008128 <[^>]*> nop
++0000812c <[^>]*> nop
++00008130 <[^>]*> nop
++00008134 <[^>]*> nop
++00008138 <[^>]*> nop
++0000813c <[^>]*> nop
++00008140 <[^>]*> nop
++00008144 <[^>]*> nop
++00008148 <[^>]*> nop
++0000814c <[^>]*> nop
++00008150 <[^>]*> nop
++00008154 <[^>]*> nop
++00008158 <[^>]*> nop
++0000815c <[^>]*> nop
++00008160 <[^>]*> nop
++00008164 <[^>]*> nop
++00008168 <[^>]*> nop
++0000816c <[^>]*> nop
++00008170 <[^>]*> nop
++00008174 <[^>]*> nop
++00008178 <[^>]*> nop
++0000817c <[^>]*> nop
++00008180 <[^>]*> nop
++00008184 <[^>]*> nop
++00008188 <[^>]*> nop
++0000818c <[^>]*> nop
++00008190 <[^>]*> nop
++00008194 <[^>]*> nop
++00008198 <[^>]*> nop
++0000819c <[^>]*> nop
++000081a0 <[^>]*> nop
++000081a4 <[^>]*> nop
++000081a8 <[^>]*> nop
++000081ac <[^>]*> nop
++000081b0 <[^>]*> nop
++000081b4 <[^>]*> nop
++000081b8 <[^>]*> nop
++000081bc <[^>]*> nop
++000081c0 <[^>]*> nop
++000081c4 <[^>]*> nop
++000081c8 <[^>]*> nop
++000081cc <[^>]*> nop
++000081d0 <[^>]*> nop
++000081d4 <[^>]*> nop
++000081d8 <[^>]*> nop
++000081dc <[^>]*> nop
++000081e0 <[^>]*> nop
++000081e4 <[^>]*> nop
++000081e8 <[^>]*> nop
++000081ec <[^>]*> nop
++000081f0 <[^>]*> nop
++000081f4 <[^>]*> nop
++000081f8 <[^>]*> nop
++000081fc <[^>]*> nop
++00008200 <[^>]*> nop
++00008204 <[^>]*> nop
++00008208 <[^>]*> nop
++0000820c <[^>]*> nop
++00008210 <[^>]*> nop
++00008214 <[^>]*> nop
++00008218 <[^>]*> nop
++0000821c <[^>]*> nop
++00008220 <[^>]*> nop
++00008224 <[^>]*> nop
++00008228 <[^>]*> nop
++0000822c <[^>]*> nop
++00008230 <[^>]*> nop
++00008234 <[^>]*> nop
++00008238 <[^>]*> nop
++0000823c <[^>]*> nop
++00008240 <[^>]*> nop
++00008244 <[^>]*> nop
++00008248 <[^>]*> nop
++0000824c <[^>]*> nop
++00008250 <[^>]*> nop
++00008254 <[^>]*> nop
++00008258 <[^>]*> nop
++0000825c <[^>]*> nop
++00008260 <[^>]*> nop
++00008264 <[^>]*> nop
++00008268 <[^>]*> nop
++0000826c <[^>]*> nop
++00008270 <[^>]*> nop
++00008274 <[^>]*> nop
++00008278 <[^>]*> nop
++0000827c <[^>]*> nop
++00008280 <[^>]*> nop
++00008284 <[^>]*> nop
++00008288 <[^>]*> nop
++0000828c <[^>]*> nop
++00008290 <[^>]*> nop
++00008294 <[^>]*> nop
++00008298 <[^>]*> nop
++0000829c <[^>]*> nop
++000082a0 <[^>]*> nop
++000082a4 <[^>]*> nop
++000082a8 <[^>]*> nop
++000082ac <[^>]*> nop
++000082b0 <[^>]*> nop
++000082b4 <[^>]*> nop
++000082b8 <[^>]*> nop
++000082bc <[^>]*> nop
++000082c0 <[^>]*> nop
++000082c4 <[^>]*> nop
++000082c8 <[^>]*> nop
++000082cc <[^>]*> nop
++000082d0 <[^>]*> nop
++000082d4 <[^>]*> nop
++000082d8 <[^>]*> nop
++000082dc <[^>]*> nop
++000082e0 <[^>]*> nop
++000082e4 <[^>]*> nop
++000082e8 <[^>]*> nop
++000082ec <[^>]*> nop
++000082f0 <[^>]*> nop
++000082f4 <[^>]*> nop
++000082f8 <[^>]*> nop
++000082fc <[^>]*> nop
++00008300 <[^>]*> nop
++00008304 <[^>]*> nop
++00008308 <[^>]*> nop
++0000830c <[^>]*> nop
++00008310 <[^>]*> nop
++00008314 <[^>]*> nop
++00008318 <[^>]*> nop
++0000831c <[^>]*> nop
++00008320 <[^>]*> nop
++00008324 <[^>]*> nop
++00008328 <[^>]*> nop
++0000832c <[^>]*> nop
++00008330 <[^>]*> nop
++00008334 <[^>]*> nop
++00008338 <[^>]*> nop
++0000833c <[^>]*> nop
++00008340 <[^>]*> nop
++00008344 <[^>]*> nop
++00008348 <[^>]*> nop
++0000834c <[^>]*> nop
++00008350 <[^>]*> nop
++00008354 <[^>]*> nop
++00008358 <[^>]*> nop
++0000835c <[^>]*> nop
++00008360 <[^>]*> nop
++00008364 <[^>]*> nop
++00008368 <[^>]*> nop
++0000836c <[^>]*> nop
++00008370 <[^>]*> nop
++00008374 <[^>]*> nop
++00008378 <[^>]*> nop
++0000837c <[^>]*> nop
++00008380 <[^>]*> nop
++00008384 <[^>]*> nop
++00008388 <[^>]*> nop
++0000838c <[^>]*> nop
++00008390 <[^>]*> nop
++00008394 <[^>]*> nop
++00008398 <[^>]*> nop
++0000839c <[^>]*> nop
++000083a0 <[^>]*> nop
++000083a4 <[^>]*> nop
++000083a8 <[^>]*> nop
++000083ac <[^>]*> nop
++000083b0 <[^>]*> nop
++000083b4 <[^>]*> nop
++000083b8 <[^>]*> nop
++000083bc <[^>]*> nop
++000083c0 <[^>]*> nop
++000083c4 <[^>]*> nop
++000083c8 <[^>]*> nop
++000083cc <[^>]*> nop
++000083d0 <[^>]*> nop
++000083d4 <[^>]*> nop
++000083d8 <[^>]*> nop
++000083dc <[^>]*> nop
++000083e0 <[^>]*> nop
++000083e4 <[^>]*> nop
++000083e8 <[^>]*> nop
++000083ec <[^>]*> nop
++000083f0 <[^>]*> nop
++000083f4 <[^>]*> nop
++000083f8 <[^>]*> nop
++000083fc <[^>]*> nop
++00008400 <[^>]*> nop
++00008404 <[^>]*> nop
++00008408 <[^>]*> nop
++0000840c <[^>]*> nop
++00008410 <[^>]*> nop
++00008414 <[^>]*> nop
++00008418 <[^>]*> nop
++0000841c <[^>]*> nop
++00008420 <[^>]*> nop
++00008424 <[^>]*> nop
++00008428 <[^>]*> nop
++0000842c <[^>]*> nop
++00008430 <[^>]*> nop
++00008434 <[^>]*> nop
++00008438 <[^>]*> nop
++0000843c <[^>]*> nop
++00008440 <[^>]*> nop
++00008444 <[^>]*> nop
++00008448 <[^>]*> nop
++0000844c <[^>]*> nop
++00008450 <[^>]*> nop
++00008454 <[^>]*> nop
++00008458 <[^>]*> nop
++0000845c <[^>]*> nop
++00008460 <[^>]*> nop
++00008464 <[^>]*> nop
++00008468 <[^>]*> nop
++0000846c <[^>]*> nop
++00008470 <[^>]*> nop
++00008474 <[^>]*> nop
++00008478 <[^>]*> nop
++0000847c <[^>]*> nop
++00008480 <[^>]*> nop
++00008484 <[^>]*> nop
++00008488 <[^>]*> nop
++0000848c <[^>]*> nop
++00008490 <[^>]*> nop
++00008494 <[^>]*> nop
++00008498 <[^>]*> nop
++0000849c <[^>]*> nop
++000084a0 <[^>]*> nop
++000084a4 <[^>]*> nop
++000084a8 <[^>]*> nop
++000084ac <[^>]*> nop
++000084b0 <[^>]*> nop
++000084b4 <[^>]*> nop
++000084b8 <[^>]*> nop
++000084bc <[^>]*> nop
++000084c0 <[^>]*> nop
++000084c4 <[^>]*> nop
++000084c8 <[^>]*> nop
++000084cc <[^>]*> nop
++000084d0 <[^>]*> nop
++000084d4 <[^>]*> nop
++000084d8 <[^>]*> nop
++000084dc <[^>]*> nop
++000084e0 <[^>]*> nop
++000084e4 <[^>]*> nop
++000084e8 <[^>]*> nop
++000084ec <[^>]*> nop
++000084f0 <[^>]*> nop
++000084f4 <[^>]*> nop
++000084f8 <[^>]*> nop
++000084fc <[^>]*> nop
++00008500 <[^>]*> nop
++00008504 <[^>]*> nop
++00008508 <[^>]*> nop
++0000850c <[^>]*> nop
++00008510 <[^>]*> nop
++00008514 <[^>]*> nop
++00008518 <[^>]*> nop
++0000851c <[^>]*> nop
++00008520 <[^>]*> nop
++00008524 <[^>]*> nop
++00008528 <[^>]*> nop
++0000852c <[^>]*> nop
++00008530 <[^>]*> nop
++00008534 <[^>]*> nop
++00008538 <[^>]*> nop
++0000853c <[^>]*> nop
++00008540 <[^>]*> nop
++00008544 <[^>]*> nop
++00008548 <[^>]*> nop
++0000854c <[^>]*> nop
++00008550 <[^>]*> nop
++00008554 <[^>]*> nop
++00008558 <[^>]*> nop
++0000855c <[^>]*> nop
++00008560 <[^>]*> nop
++00008564 <[^>]*> nop
++00008568 <[^>]*> nop
++0000856c <[^>]*> nop
++00008570 <[^>]*> nop
++00008574 <[^>]*> nop
++00008578 <[^>]*> nop
++0000857c <[^>]*> nop
++00008580 <[^>]*> nop
++00008584 <[^>]*> nop
++00008588 <[^>]*> nop
++0000858c <[^>]*> nop
++00008590 <[^>]*> nop
++00008594 <[^>]*> nop
++00008598 <[^>]*> nop
++0000859c <[^>]*> nop
++000085a0 <[^>]*> nop
++000085a4 <[^>]*> nop
++000085a8 <[^>]*> nop
++000085ac <[^>]*> nop
++000085b0 <[^>]*> nop
++000085b4 <[^>]*> nop
++000085b8 <[^>]*> nop
++000085bc <[^>]*> nop
++000085c0 <[^>]*> nop
++000085c4 <[^>]*> nop
++000085c8 <[^>]*> nop
++000085cc <[^>]*> nop
++000085d0 <[^>]*> nop
++000085d4 <[^>]*> nop
++000085d8 <[^>]*> nop
++000085dc <[^>]*> nop
++000085e0 <[^>]*> nop
++000085e4 <[^>]*> nop
++000085e8 <[^>]*> nop
++000085ec <[^>]*> nop
++000085f0 <[^>]*> nop
++000085f4 <[^>]*> nop
++000085f8 <[^>]*> nop
++000085fc <[^>]*> nop
++00008600 <[^>]*> nop
++00008604 <[^>]*> nop
++00008608 <[^>]*> nop
++0000860c <[^>]*> nop
++00008610 <[^>]*> nop
++00008614 <[^>]*> nop
++00008618 <[^>]*> nop
++0000861c <[^>]*> nop
++00008620 <[^>]*> nop
++00008624 <[^>]*> nop
++00008628 <[^>]*> nop
++0000862c <[^>]*> nop
++00008630 <[^>]*> nop
++00008634 <[^>]*> nop
++00008638 <[^>]*> nop
++0000863c <[^>]*> nop
++00008640 <[^>]*> nop
++00008644 <[^>]*> nop
++00008648 <[^>]*> nop
++0000864c <[^>]*> nop
++00008650 <[^>]*> nop
++00008654 <[^>]*> nop
++00008658 <[^>]*> nop
++0000865c <[^>]*> nop
++00008660 <[^>]*> nop
++00008664 <[^>]*> nop
++00008668 <[^>]*> nop
++0000866c <[^>]*> nop
++00008670 <[^>]*> nop
++00008674 <[^>]*> nop
++00008678 <[^>]*> nop
++0000867c <[^>]*> nop
++00008680 <[^>]*> nop
++00008684 <[^>]*> nop
++00008688 <[^>]*> nop
++0000868c <[^>]*> nop
++00008690 <[^>]*> nop
++00008694 <[^>]*> nop
++00008698 <[^>]*> nop
++0000869c <[^>]*> nop
++000086a0 <[^>]*> nop
++000086a4 <[^>]*> nop
++000086a8 <[^>]*> nop
++000086ac <[^>]*> nop
++000086b0 <[^>]*> nop
++000086b4 <[^>]*> nop
++000086b8 <[^>]*> nop
++000086bc <[^>]*> nop
++000086c0 <[^>]*> nop
++000086c4 <[^>]*> nop
++000086c8 <[^>]*> nop
++000086cc <[^>]*> nop
++000086d0 <[^>]*> nop
++000086d4 <[^>]*> nop
++000086d8 <[^>]*> nop
++000086dc <[^>]*> nop
++000086e0 <[^>]*> nop
++000086e4 <[^>]*> nop
++000086e8 <[^>]*> nop
++000086ec <[^>]*> nop
++000086f0 <[^>]*> nop
++000086f4 <[^>]*> nop
++000086f8 <[^>]*> nop
++000086fc <[^>]*> nop
++00008700 <[^>]*> nop
++00008704 <[^>]*> nop
++00008708 <[^>]*> nop
++0000870c <[^>]*> nop
++00008710 <[^>]*> nop
++00008714 <[^>]*> nop
++00008718 <[^>]*> nop
++0000871c <[^>]*> nop
++00008720 <[^>]*> nop
++00008724 <[^>]*> nop
++00008728 <[^>]*> nop
++0000872c <[^>]*> nop
++00008730 <[^>]*> nop
++00008734 <[^>]*> nop
++00008738 <[^>]*> nop
++0000873c <[^>]*> nop
++00008740 <[^>]*> nop
++00008744 <[^>]*> nop
++00008748 <[^>]*> nop
++0000874c <[^>]*> nop
++00008750 <[^>]*> nop
++00008754 <[^>]*> nop
++00008758 <[^>]*> nop
++0000875c <[^>]*> nop
++00008760 <[^>]*> nop
++00008764 <[^>]*> nop
++00008768 <[^>]*> nop
++0000876c <[^>]*> nop
++00008770 <[^>]*> nop
++00008774 <[^>]*> nop
++00008778 <[^>]*> nop
++0000877c <[^>]*> nop
++00008780 <[^>]*> nop
++00008784 <[^>]*> nop
++00008788 <[^>]*> nop
++0000878c <[^>]*> nop
++00008790 <[^>]*> nop
++00008794 <[^>]*> nop
++00008798 <[^>]*> nop
++0000879c <[^>]*> nop
++000087a0 <[^>]*> nop
++000087a4 <[^>]*> nop
++000087a8 <[^>]*> nop
++000087ac <[^>]*> nop
++000087b0 <[^>]*> nop
++000087b4 <[^>]*> nop
++000087b8 <[^>]*> nop
++000087bc <[^>]*> nop
++000087c0 <[^>]*> nop
++000087c4 <[^>]*> nop
++000087c8 <[^>]*> nop
++000087cc <[^>]*> nop
++000087d0 <[^>]*> nop
++000087d4 <[^>]*> nop
++000087d8 <[^>]*> nop
++000087dc <[^>]*> nop
++000087e0 <[^>]*> nop
++000087e4 <[^>]*> nop
++000087e8 <[^>]*> nop
++000087ec <[^>]*> nop
++000087f0 <[^>]*> nop
++000087f4 <[^>]*> nop
++000087f8 <[^>]*> nop
++000087fc <[^>]*> nop
++00008800 <[^>]*> nop
++00008804 <[^>]*> nop
++00008808 <[^>]*> nop
++0000880c <[^>]*> nop
++00008810 <[^>]*> nop
++00008814 <[^>]*> nop
++00008818 <[^>]*> nop
++0000881c <[^>]*> nop
++00008820 <[^>]*> nop
++00008824 <[^>]*> nop
++00008828 <[^>]*> nop
++0000882c <[^>]*> nop
++00008830 <[^>]*> nop
++00008834 <[^>]*> nop
++00008838 <[^>]*> nop
++0000883c <[^>]*> nop
++00008840 <[^>]*> nop
++00008844 <[^>]*> nop
++00008848 <[^>]*> nop
++0000884c <[^>]*> nop
++00008850 <[^>]*> nop
++00008854 <[^>]*> nop
++00008858 <[^>]*> nop
++0000885c <[^>]*> nop
++00008860 <[^>]*> nop
++00008864 <[^>]*> nop
++00008868 <[^>]*> nop
++0000886c <[^>]*> nop
++00008870 <[^>]*> nop
++00008874 <[^>]*> nop
++00008878 <[^>]*> nop
++0000887c <[^>]*> nop
++00008880 <[^>]*> nop
++00008884 <[^>]*> nop
++00008888 <[^>]*> nop
++0000888c <[^>]*> nop
++00008890 <[^>]*> nop
++00008894 <[^>]*> nop
++00008898 <[^>]*> nop
++0000889c <[^>]*> nop
++000088a0 <[^>]*> nop
++000088a4 <[^>]*> nop
++000088a8 <[^>]*> nop
++000088ac <[^>]*> nop
++000088b0 <[^>]*> nop
++000088b4 <[^>]*> nop
++000088b8 <[^>]*> nop
++000088bc <[^>]*> nop
++000088c0 <[^>]*> nop
++000088c4 <[^>]*> nop
++000088c8 <[^>]*> nop
++000088cc <[^>]*> nop
++000088d0 <[^>]*> nop
++000088d4 <[^>]*> nop
++000088d8 <[^>]*> nop
++000088dc <[^>]*> nop
++000088e0 <[^>]*> nop
++000088e4 <[^>]*> nop
++000088e8 <[^>]*> nop
++000088ec <[^>]*> nop
++000088f0 <[^>]*> nop
++000088f4 <[^>]*> nop
++000088f8 <[^>]*> nop
++000088fc <[^>]*> nop
++00008900 <[^>]*> nop
++00008904 <[^>]*> nop
++00008908 <[^>]*> nop
++0000890c <[^>]*> nop
++00008910 <[^>]*> nop
++00008914 <[^>]*> nop
++00008918 <[^>]*> nop
++0000891c <[^>]*> nop
++00008920 <[^>]*> nop
++00008924 <[^>]*> nop
++00008928 <[^>]*> nop
++0000892c <[^>]*> nop
++00008930 <[^>]*> nop
++00008934 <[^>]*> nop
++00008938 <[^>]*> nop
++0000893c <[^>]*> nop
++00008940 <[^>]*> nop
++00008944 <[^>]*> nop
++00008948 <[^>]*> nop
++0000894c <[^>]*> nop
++00008950 <[^>]*> nop
++00008954 <[^>]*> nop
++00008958 <[^>]*> nop
++0000895c <[^>]*> nop
++00008960 <[^>]*> nop
++00008964 <[^>]*> nop
++00008968 <[^>]*> nop
++0000896c <[^>]*> nop
++00008970 <[^>]*> nop
++00008974 <[^>]*> nop
++00008978 <[^>]*> nop
++0000897c <[^>]*> nop
++00008980 <[^>]*> nop
++00008984 <[^>]*> nop
++00008988 <[^>]*> nop
++0000898c <[^>]*> nop
++00008990 <[^>]*> nop
++00008994 <[^>]*> nop
++00008998 <[^>]*> nop
++0000899c <[^>]*> nop
++000089a0 <[^>]*> nop
++000089a4 <[^>]*> nop
++000089a8 <[^>]*> nop
++000089ac <[^>]*> nop
++000089b0 <[^>]*> nop
++000089b4 <[^>]*> nop
++000089b8 <[^>]*> nop
++000089bc <[^>]*> nop
++000089c0 <[^>]*> nop
++000089c4 <[^>]*> nop
++000089c8 <[^>]*> nop
++000089cc <[^>]*> nop
++000089d0 <[^>]*> nop
++000089d4 <[^>]*> nop
++000089d8 <[^>]*> nop
++000089dc <[^>]*> nop
++000089e0 <[^>]*> nop
++000089e4 <[^>]*> nop
++000089e8 <[^>]*> nop
++000089ec <[^>]*> nop
++000089f0 <[^>]*> nop
++000089f4 <[^>]*> nop
++000089f8 <[^>]*> nop
++000089fc <[^>]*> nop
++00008a00 <[^>]*> nop
++00008a04 <[^>]*> nop
++00008a08 <[^>]*> nop
++00008a0c <[^>]*> nop
++00008a10 <[^>]*> nop
++00008a14 <[^>]*> nop
++00008a18 <[^>]*> nop
++00008a1c <[^>]*> nop
++00008a20 <[^>]*> nop
++00008a24 <[^>]*> nop
++00008a28 <[^>]*> nop
++00008a2c <[^>]*> nop
++00008a30 <[^>]*> nop
++00008a34 <[^>]*> nop
++00008a38 <[^>]*> nop
++00008a3c <[^>]*> nop
++00008a40 <[^>]*> nop
++00008a44 <[^>]*> nop
++00008a48 <[^>]*> nop
++00008a4c <[^>]*> nop
++00008a50 <[^>]*> nop
++00008a54 <[^>]*> nop
++00008a58 <[^>]*> nop
++00008a5c <[^>]*> nop
++00008a60 <[^>]*> nop
++00008a64 <[^>]*> nop
++00008a68 <[^>]*> nop
++00008a6c <[^>]*> nop
++00008a70 <[^>]*> nop
++00008a74 <[^>]*> nop
++00008a78 <[^>]*> nop
++00008a7c <[^>]*> nop
++00008a80 <[^>]*> nop
++00008a84 <[^>]*> nop
++00008a88 <[^>]*> nop
++00008a8c <[^>]*> nop
++00008a90 <[^>]*> nop
++00008a94 <[^>]*> nop
++00008a98 <[^>]*> nop
++00008a9c <[^>]*> nop
++00008aa0 <[^>]*> nop
++00008aa4 <[^>]*> nop
++00008aa8 <[^>]*> nop
++00008aac <[^>]*> nop
++00008ab0 <[^>]*> nop
++00008ab4 <[^>]*> nop
++00008ab8 <[^>]*> nop
++00008abc <[^>]*> nop
++00008ac0 <[^>]*> nop
++00008ac4 <[^>]*> nop
++00008ac8 <[^>]*> nop
++00008acc <[^>]*> nop
++00008ad0 <[^>]*> nop
++00008ad4 <[^>]*> nop
++00008ad8 <[^>]*> nop
++00008adc <[^>]*> nop
++00008ae0 <[^>]*> nop
++00008ae4 <[^>]*> nop
++00008ae8 <[^>]*> nop
++00008aec <[^>]*> nop
++00008af0 <[^>]*> nop
++00008af4 <[^>]*> nop
++00008af8 <[^>]*> nop
++00008afc <[^>]*> nop
++00008b00 <[^>]*> nop
++00008b04 <[^>]*> nop
++00008b08 <[^>]*> nop
++00008b0c <[^>]*> nop
++00008b10 <[^>]*> nop
++00008b14 <[^>]*> nop
++00008b18 <[^>]*> nop
++00008b1c <[^>]*> nop
++00008b20 <[^>]*> nop
++00008b24 <[^>]*> nop
++00008b28 <[^>]*> nop
++00008b2c <[^>]*> nop
++00008b30 <[^>]*> nop
++00008b34 <[^>]*> nop
++00008b38 <[^>]*> nop
++00008b3c <[^>]*> nop
++00008b40 <[^>]*> nop
++00008b44 <[^>]*> nop
++00008b48 <[^>]*> nop
++00008b4c <[^>]*> nop
++00008b50 <[^>]*> nop
++00008b54 <[^>]*> nop
++00008b58 <[^>]*> nop
++00008b5c <[^>]*> nop
++00008b60 <[^>]*> nop
++00008b64 <[^>]*> nop
++00008b68 <[^>]*> nop
++00008b6c <[^>]*> nop
++00008b70 <[^>]*> nop
++00008b74 <[^>]*> nop
++00008b78 <[^>]*> nop
++00008b7c <[^>]*> nop
++00008b80 <[^>]*> nop
++00008b84 <[^>]*> nop
++00008b88 <[^>]*> nop
++00008b8c <[^>]*> nop
++00008b90 <[^>]*> nop
++00008b94 <[^>]*> nop
++00008b98 <[^>]*> nop
++00008b9c <[^>]*> nop
++00008ba0 <[^>]*> nop
++00008ba4 <[^>]*> nop
++00008ba8 <[^>]*> nop
++00008bac <[^>]*> nop
++00008bb0 <[^>]*> nop
++00008bb4 <[^>]*> nop
++00008bb8 <[^>]*> nop
++00008bbc <[^>]*> nop
++00008bc0 <[^>]*> nop
++00008bc4 <[^>]*> nop
++00008bc8 <[^>]*> nop
++00008bcc <[^>]*> nop
++00008bd0 <[^>]*> nop
++00008bd4 <[^>]*> nop
++00008bd8 <[^>]*> nop
++00008bdc <[^>]*> nop
++00008be0 <[^>]*> nop
++00008be4 <[^>]*> nop
++00008be8 <[^>]*> nop
++00008bec <[^>]*> nop
++00008bf0 <[^>]*> nop
++00008bf4 <[^>]*> nop
++00008bf8 <[^>]*> nop
++00008bfc <[^>]*> nop
++00008c00 <[^>]*> nop
++00008c04 <[^>]*> nop
++00008c08 <[^>]*> nop
++00008c0c <[^>]*> nop
++00008c10 <[^>]*> nop
++00008c14 <[^>]*> nop
++00008c18 <[^>]*> nop
++00008c1c <[^>]*> nop
++00008c20 <[^>]*> nop
++00008c24 <[^>]*> nop
++00008c28 <[^>]*> nop
++00008c2c <[^>]*> nop
++00008c30 <[^>]*> nop
++00008c34 <[^>]*> nop
++00008c38 <[^>]*> nop
++00008c3c <[^>]*> nop
++00008c40 <[^>]*> nop
++00008c44 <[^>]*> nop
++00008c48 <[^>]*> nop
++00008c4c <[^>]*> nop
++00008c50 <[^>]*> nop
++00008c54 <[^>]*> nop
++00008c58 <[^>]*> nop
++00008c5c <[^>]*> nop
++00008c60 <[^>]*> nop
++00008c64 <[^>]*> nop
++00008c68 <[^>]*> nop
++00008c6c <[^>]*> nop
++00008c70 <[^>]*> nop
++00008c74 <[^>]*> nop
++00008c78 <[^>]*> nop
++00008c7c <[^>]*> nop
++00008c80 <[^>]*> nop
++00008c84 <[^>]*> nop
++00008c88 <[^>]*> nop
++00008c8c <[^>]*> nop
++00008c90 <[^>]*> nop
++00008c94 <[^>]*> nop
++00008c98 <[^>]*> nop
++00008c9c <[^>]*> nop
++00008ca0 <[^>]*> nop
++00008ca4 <[^>]*> nop
++00008ca8 <[^>]*> nop
++00008cac <[^>]*> nop
++00008cb0 <[^>]*> nop
++00008cb4 <[^>]*> nop
++00008cb8 <[^>]*> nop
++00008cbc <[^>]*> nop
++00008cc0 <[^>]*> nop
++00008cc4 <[^>]*> nop
++00008cc8 <[^>]*> nop
++00008ccc <[^>]*> nop
++00008cd0 <[^>]*> nop
++00008cd4 <[^>]*> nop
++00008cd8 <[^>]*> nop
++00008cdc <[^>]*> nop
++00008ce0 <[^>]*> nop
++00008ce4 <[^>]*> nop
++00008ce8 <[^>]*> nop
++00008cec <[^>]*> nop
++00008cf0 <[^>]*> nop
++00008cf4 <[^>]*> nop
++00008cf8 <[^>]*> nop
++00008cfc <[^>]*> nop
++00008d00 <[^>]*> nop
++00008d04 <[^>]*> nop
++00008d08 <[^>]*> nop
++00008d0c <[^>]*> nop
++00008d10 <[^>]*> nop
++00008d14 <[^>]*> nop
++00008d18 <[^>]*> nop
++00008d1c <[^>]*> nop
++00008d20 <[^>]*> nop
++00008d24 <[^>]*> nop
++00008d28 <[^>]*> nop
++00008d2c <[^>]*> nop
++00008d30 <[^>]*> nop
++00008d34 <[^>]*> nop
++00008d38 <[^>]*> nop
++00008d3c <[^>]*> nop
++00008d40 <[^>]*> nop
++00008d44 <[^>]*> nop
++00008d48 <[^>]*> nop
++00008d4c <[^>]*> nop
++00008d50 <[^>]*> nop
++00008d54 <[^>]*> nop
++00008d58 <[^>]*> nop
++00008d5c <[^>]*> nop
++00008d60 <[^>]*> nop
++00008d64 <[^>]*> nop
++00008d68 <[^>]*> nop
++00008d6c <[^>]*> nop
++00008d70 <[^>]*> nop
++00008d74 <[^>]*> nop
++00008d78 <[^>]*> nop
++00008d7c <[^>]*> nop
++00008d80 <[^>]*> nop
++00008d84 <[^>]*> nop
++00008d88 <[^>]*> nop
++00008d8c <[^>]*> nop
++00008d90 <[^>]*> nop
++00008d94 <[^>]*> nop
++00008d98 <[^>]*> nop
++00008d9c <[^>]*> nop
++00008da0 <[^>]*> nop
++00008da4 <[^>]*> nop
++00008da8 <[^>]*> nop
++00008dac <[^>]*> nop
++00008db0 <[^>]*> nop
++00008db4 <[^>]*> nop
++00008db8 <[^>]*> nop
++00008dbc <[^>]*> nop
++00008dc0 <[^>]*> nop
++00008dc4 <[^>]*> nop
++00008dc8 <[^>]*> nop
++00008dcc <[^>]*> nop
++00008dd0 <[^>]*> nop
++00008dd4 <[^>]*> nop
++00008dd8 <[^>]*> nop
++00008ddc <[^>]*> nop
++00008de0 <[^>]*> nop
++00008de4 <[^>]*> nop
++00008de8 <[^>]*> nop
++00008dec <[^>]*> nop
++00008df0 <[^>]*> nop
++00008df4 <[^>]*> nop
++00008df8 <[^>]*> nop
++00008dfc <[^>]*> nop
++00008e00 <[^>]*> nop
++00008e04 <[^>]*> nop
++00008e08 <[^>]*> nop
++00008e0c <[^>]*> nop
++00008e10 <[^>]*> nop
++00008e14 <[^>]*> nop
++00008e18 <[^>]*> nop
++00008e1c <[^>]*> nop
++00008e20 <[^>]*> nop
++00008e24 <[^>]*> nop
++00008e28 <[^>]*> nop
++00008e2c <[^>]*> nop
++00008e30 <[^>]*> nop
++00008e34 <[^>]*> nop
++00008e38 <[^>]*> nop
++00008e3c <[^>]*> nop
++00008e40 <[^>]*> nop
++00008e44 <[^>]*> nop
++00008e48 <[^>]*> nop
++00008e4c <[^>]*> nop
++00008e50 <[^>]*> nop
++00008e54 <[^>]*> nop
++00008e58 <[^>]*> nop
++00008e5c <[^>]*> nop
++00008e60 <[^>]*> nop
++00008e64 <[^>]*> nop
++00008e68 <[^>]*> nop
++00008e6c <[^>]*> nop
++00008e70 <[^>]*> nop
++00008e74 <[^>]*> nop
++00008e78 <[^>]*> nop
++00008e7c <[^>]*> nop
++00008e80 <[^>]*> nop
++00008e84 <[^>]*> nop
++00008e88 <[^>]*> nop
++00008e8c <[^>]*> nop
++00008e90 <[^>]*> nop
++00008e94 <[^>]*> nop
++00008e98 <[^>]*> nop
++00008e9c <[^>]*> nop
++00008ea0 <[^>]*> nop
++00008ea4 <[^>]*> nop
++00008ea8 <[^>]*> nop
++00008eac <[^>]*> nop
++00008eb0 <[^>]*> nop
++00008eb4 <[^>]*> nop
++00008eb8 <[^>]*> nop
++00008ebc <[^>]*> nop
++00008ec0 <[^>]*> nop
++00008ec4 <[^>]*> nop
++00008ec8 <[^>]*> nop
++00008ecc <[^>]*> nop
++00008ed0 <[^>]*> nop
++00008ed4 <[^>]*> nop
++00008ed8 <[^>]*> nop
++00008edc <[^>]*> nop
++00008ee0 <[^>]*> nop
++00008ee4 <[^>]*> nop
++00008ee8 <[^>]*> nop
++00008eec <[^>]*> nop
++00008ef0 <[^>]*> nop
++00008ef4 <[^>]*> nop
++00008ef8 <[^>]*> nop
++00008efc <[^>]*> nop
++00008f00 <[^>]*> nop
++00008f04 <[^>]*> nop
++00008f08 <[^>]*> nop
++00008f0c <[^>]*> nop
++00008f10 <[^>]*> nop
++00008f14 <[^>]*> nop
++00008f18 <[^>]*> nop
++00008f1c <[^>]*> nop
++00008f20 <[^>]*> nop
++00008f24 <[^>]*> nop
++00008f28 <[^>]*> nop
++00008f2c <[^>]*> nop
++00008f30 <[^>]*> nop
++00008f34 <[^>]*> nop
++00008f38 <[^>]*> nop
++00008f3c <[^>]*> nop
++00008f40 <[^>]*> nop
++00008f44 <[^>]*> nop
++00008f48 <[^>]*> nop
++00008f4c <[^>]*> nop
++00008f50 <[^>]*> nop
++00008f54 <[^>]*> nop
++00008f58 <[^>]*> nop
++00008f5c <[^>]*> nop
++00008f60 <[^>]*> nop
++00008f64 <[^>]*> nop
++00008f68 <[^>]*> nop
++00008f6c <[^>]*> nop
++00008f70 <[^>]*> nop
++00008f74 <[^>]*> nop
++00008f78 <[^>]*> nop
++00008f7c <[^>]*> nop
++00008f80 <[^>]*> nop
++00008f84 <[^>]*> nop
++00008f88 <[^>]*> nop
++00008f8c <[^>]*> nop
++00008f90 <[^>]*> nop
++00008f94 <[^>]*> nop
++00008f98 <[^>]*> nop
++00008f9c <[^>]*> nop
++00008fa0 <[^>]*> nop
++00008fa4 <[^>]*> nop
++00008fa8 <[^>]*> nop
++00008fac <[^>]*> nop
++00008fb0 <[^>]*> nop
++00008fb4 <[^>]*> nop
++00008fb8 <[^>]*> nop
++00008fbc <[^>]*> nop
++00008fc0 <[^>]*> nop
++00008fc4 <[^>]*> nop
++00008fc8 <[^>]*> nop
++00008fcc <[^>]*> nop
++00008fd0 <[^>]*> nop
++00008fd4 <[^>]*> nop
++00008fd8 <[^>]*> nop
++00008fdc <[^>]*> nop
++00008fe0 <[^>]*> nop
++00008fe4 <[^>]*> nop
++00008fe8 <[^>]*> nop
++00008fec <[^>]*> nop
++00008ff0 <[^>]*> nop
++00008ff4 <[^>]*> nop
++00008ff8 <[^>]*> nop
++00008ffc <[^>]*> nop
++00009000 <[^>]*> nop
++00009004 <[^>]*> nop
++00009008 <[^>]*> nop
++0000900c <[^>]*> nop
++00009010 <[^>]*> nop
++00009014 <[^>]*> nop
++00009018 <[^>]*> nop
++0000901c <[^>]*> nop
++00009020 <[^>]*> nop
++00009024 <[^>]*> nop
++00009028 <[^>]*> nop
++0000902c <[^>]*> nop
++00009030 <[^>]*> nop
++00009034 <[^>]*> nop
++00009038 <[^>]*> nop
++0000903c <[^>]*> nop
++00009040 <[^>]*> nop
++00009044 <[^>]*> nop
++00009048 <[^>]*> nop
++0000904c <[^>]*> nop
++00009050 <[^>]*> nop
++00009054 <[^>]*> nop
++00009058 <[^>]*> nop
++0000905c <[^>]*> nop
++00009060 <[^>]*> nop
++00009064 <[^>]*> nop
++00009068 <[^>]*> nop
++0000906c <[^>]*> nop
++00009070 <[^>]*> nop
++00009074 <[^>]*> nop
++00009078 <[^>]*> nop
++0000907c <[^>]*> nop
++00009080 <[^>]*> nop
++00009084 <[^>]*> nop
++00009088 <[^>]*> nop
++0000908c <[^>]*> nop
++00009090 <[^>]*> nop
++00009094 <[^>]*> nop
++00009098 <[^>]*> nop
++0000909c <[^>]*> nop
++000090a0 <[^>]*> nop
++000090a4 <[^>]*> nop
++000090a8 <[^>]*> nop
++000090ac <[^>]*> nop
++000090b0 <[^>]*> nop
++000090b4 <[^>]*> nop
++000090b8 <[^>]*> nop
++000090bc <[^>]*> nop
++000090c0 <[^>]*> nop
++000090c4 <[^>]*> nop
++000090c8 <[^>]*> nop
++000090cc <[^>]*> nop
++000090d0 <[^>]*> nop
++000090d4 <[^>]*> nop
++000090d8 <[^>]*> nop
++000090dc <[^>]*> nop
++000090e0 <[^>]*> nop
++000090e4 <[^>]*> nop
++000090e8 <[^>]*> nop
++000090ec <[^>]*> nop
++000090f0 <[^>]*> nop
++000090f4 <[^>]*> nop
++000090f8 <[^>]*> nop
++000090fc <[^>]*> nop
++00009100 <[^>]*> nop
++00009104 <[^>]*> nop
++00009108 <[^>]*> nop
++0000910c <[^>]*> nop
++00009110 <[^>]*> nop
++00009114 <[^>]*> nop
++00009118 <[^>]*> nop
++0000911c <[^>]*> nop
++00009120 <[^>]*> nop
++00009124 <[^>]*> nop
++00009128 <[^>]*> nop
++0000912c <[^>]*> nop
++00009130 <[^>]*> nop
++00009134 <[^>]*> nop
++00009138 <[^>]*> nop
++0000913c <[^>]*> nop
++00009140 <[^>]*> nop
++00009144 <[^>]*> nop
++00009148 <[^>]*> nop
++0000914c <[^>]*> nop
++00009150 <[^>]*> nop
++00009154 <[^>]*> nop
++00009158 <[^>]*> nop
++0000915c <[^>]*> nop
++00009160 <[^>]*> nop
++00009164 <[^>]*> nop
++00009168 <[^>]*> nop
++0000916c <[^>]*> nop
++00009170 <[^>]*> nop
++00009174 <[^>]*> nop
++00009178 <[^>]*> nop
++0000917c <[^>]*> nop
++00009180 <[^>]*> nop
++00009184 <[^>]*> nop
++00009188 <[^>]*> nop
++0000918c <[^>]*> nop
++00009190 <[^>]*> nop
++00009194 <[^>]*> nop
++00009198 <[^>]*> nop
++0000919c <[^>]*> nop
++000091a0 <[^>]*> nop
++000091a4 <[^>]*> nop
++000091a8 <[^>]*> nop
++000091ac <[^>]*> nop
++000091b0 <[^>]*> nop
++000091b4 <[^>]*> nop
++000091b8 <[^>]*> nop
++000091bc <[^>]*> nop
++000091c0 <[^>]*> nop
++000091c4 <[^>]*> nop
++000091c8 <[^>]*> nop
++000091cc <[^>]*> nop
++000091d0 <[^>]*> nop
++000091d4 <[^>]*> nop
++000091d8 <[^>]*> nop
++000091dc <[^>]*> nop
++000091e0 <[^>]*> nop
++000091e4 <[^>]*> nop
++000091e8 <[^>]*> nop
++000091ec <[^>]*> nop
++000091f0 <[^>]*> nop
++000091f4 <[^>]*> nop
++000091f8 <[^>]*> nop
++000091fc <[^>]*> nop
++00009200 <[^>]*> nop
++00009204 <[^>]*> nop
++00009208 <[^>]*> nop
++0000920c <[^>]*> nop
++00009210 <[^>]*> nop
++00009214 <[^>]*> nop
++00009218 <[^>]*> nop
++0000921c <[^>]*> nop
++00009220 <[^>]*> nop
++00009224 <[^>]*> nop
++00009228 <[^>]*> nop
++0000922c <[^>]*> nop
++00009230 <[^>]*> nop
++00009234 <[^>]*> nop
++00009238 <[^>]*> nop
++0000923c <[^>]*> nop
++00009240 <[^>]*> nop
++00009244 <[^>]*> nop
++00009248 <[^>]*> nop
++0000924c <[^>]*> nop
++00009250 <[^>]*> nop
++00009254 <[^>]*> nop
++00009258 <[^>]*> nop
++0000925c <[^>]*> nop
++00009260 <[^>]*> nop
++00009264 <[^>]*> nop
++00009268 <[^>]*> nop
++0000926c <[^>]*> nop
++00009270 <[^>]*> nop
++00009274 <[^>]*> nop
++00009278 <[^>]*> nop
++0000927c <[^>]*> nop
++00009280 <[^>]*> nop
++00009284 <[^>]*> nop
++00009288 <[^>]*> nop
++0000928c <[^>]*> nop
++00009290 <[^>]*> nop
++00009294 <[^>]*> nop
++00009298 <[^>]*> nop
++0000929c <[^>]*> nop
++000092a0 <[^>]*> nop
++000092a4 <[^>]*> nop
++000092a8 <[^>]*> nop
++000092ac <[^>]*> nop
++000092b0 <[^>]*> nop
++000092b4 <[^>]*> nop
++000092b8 <[^>]*> nop
++000092bc <[^>]*> nop
++000092c0 <[^>]*> nop
++000092c4 <[^>]*> nop
++000092c8 <[^>]*> nop
++000092cc <[^>]*> nop
++000092d0 <[^>]*> nop
++000092d4 <[^>]*> nop
++000092d8 <[^>]*> nop
++000092dc <[^>]*> nop
++000092e0 <[^>]*> nop
++000092e4 <[^>]*> nop
++000092e8 <[^>]*> nop
++000092ec <[^>]*> nop
++000092f0 <[^>]*> nop
++000092f4 <[^>]*> nop
++000092f8 <[^>]*> nop
++000092fc <[^>]*> nop
++00009300 <[^>]*> nop
++00009304 <[^>]*> nop
++00009308 <[^>]*> nop
++0000930c <[^>]*> nop
++00009310 <[^>]*> nop
++00009314 <[^>]*> nop
++00009318 <[^>]*> nop
++0000931c <[^>]*> nop
++00009320 <[^>]*> nop
++00009324 <[^>]*> nop
++00009328 <[^>]*> nop
++0000932c <[^>]*> nop
++00009330 <[^>]*> nop
++00009334 <[^>]*> nop
++00009338 <[^>]*> nop
++0000933c <[^>]*> nop
++00009340 <[^>]*> nop
++00009344 <[^>]*> nop
++00009348 <[^>]*> nop
++0000934c <[^>]*> nop
++00009350 <[^>]*> nop
++00009354 <[^>]*> nop
++00009358 <[^>]*> nop
++0000935c <[^>]*> nop
++00009360 <[^>]*> nop
++00009364 <[^>]*> nop
++00009368 <[^>]*> nop
++0000936c <[^>]*> nop
++00009370 <[^>]*> nop
++00009374 <[^>]*> nop
++00009378 <[^>]*> nop
++0000937c <[^>]*> nop
++00009380 <[^>]*> nop
++00009384 <[^>]*> nop
++00009388 <[^>]*> nop
++0000938c <[^>]*> nop
++00009390 <[^>]*> nop
++00009394 <[^>]*> nop
++00009398 <[^>]*> nop
++0000939c <[^>]*> nop
++000093a0 <[^>]*> nop
++000093a4 <[^>]*> nop
++000093a8 <[^>]*> nop
++000093ac <[^>]*> nop
++000093b0 <[^>]*> nop
++000093b4 <[^>]*> nop
++000093b8 <[^>]*> nop
++000093bc <[^>]*> nop
++000093c0 <[^>]*> nop
++000093c4 <[^>]*> nop
++000093c8 <[^>]*> nop
++000093cc <[^>]*> nop
++000093d0 <[^>]*> nop
++000093d4 <[^>]*> nop
++000093d8 <[^>]*> nop
++000093dc <[^>]*> nop
++000093e0 <[^>]*> nop
++000093e4 <[^>]*> nop
++000093e8 <[^>]*> nop
++000093ec <[^>]*> nop
++000093f0 <[^>]*> nop
++000093f4 <[^>]*> nop
++000093f8 <[^>]*> nop
++000093fc <[^>]*> nop
++00009400 <[^>]*> nop
++00009404 <[^>]*> nop
++00009408 <[^>]*> nop
++0000940c <[^>]*> nop
++00009410 <[^>]*> nop
++00009414 <[^>]*> nop
++00009418 <[^>]*> nop
++0000941c <[^>]*> nop
++00009420 <[^>]*> nop
++00009424 <[^>]*> nop
++00009428 <[^>]*> nop
++0000942c <[^>]*> nop
++00009430 <[^>]*> nop
++00009434 <[^>]*> nop
++00009438 <[^>]*> nop
++0000943c <[^>]*> nop
++00009440 <[^>]*> nop
++00009444 <[^>]*> nop
++00009448 <[^>]*> nop
++0000944c <[^>]*> nop
++00009450 <[^>]*> nop
++00009454 <[^>]*> nop
++00009458 <[^>]*> nop
++0000945c <[^>]*> nop
++00009460 <[^>]*> nop
++00009464 <[^>]*> nop
++00009468 <[^>]*> nop
++0000946c <[^>]*> nop
++00009470 <[^>]*> nop
++00009474 <[^>]*> nop
++00009478 <[^>]*> nop
++0000947c <[^>]*> nop
++00009480 <[^>]*> nop
++00009484 <[^>]*> nop
++00009488 <[^>]*> nop
++0000948c <[^>]*> nop
++00009490 <[^>]*> nop
++00009494 <[^>]*> nop
++00009498 <[^>]*> nop
++0000949c <[^>]*> nop
++000094a0 <[^>]*> nop
++000094a4 <[^>]*> nop
++000094a8 <[^>]*> nop
++000094ac <[^>]*> nop
++000094b0 <[^>]*> nop
++000094b4 <[^>]*> nop
++000094b8 <[^>]*> nop
++000094bc <[^>]*> nop
++000094c0 <[^>]*> nop
++000094c4 <[^>]*> nop
++000094c8 <[^>]*> nop
++000094cc <[^>]*> nop
++000094d0 <[^>]*> nop
++000094d4 <[^>]*> nop
++000094d8 <[^>]*> nop
++000094dc <[^>]*> nop
++000094e0 <[^>]*> nop
++000094e4 <[^>]*> nop
++000094e8 <[^>]*> nop
++000094ec <[^>]*> nop
++000094f0 <[^>]*> nop
++000094f4 <[^>]*> nop
++000094f8 <[^>]*> nop
++000094fc <[^>]*> nop
++00009500 <[^>]*> nop
++00009504 <[^>]*> nop
++00009508 <[^>]*> nop
++0000950c <[^>]*> nop
++00009510 <[^>]*> nop
++00009514 <[^>]*> nop
++00009518 <[^>]*> nop
++0000951c <[^>]*> nop
++00009520 <[^>]*> nop
++00009524 <[^>]*> nop
++00009528 <[^>]*> nop
++0000952c <[^>]*> nop
++00009530 <[^>]*> nop
++00009534 <[^>]*> nop
++00009538 <[^>]*> nop
++0000953c <[^>]*> nop
++00009540 <[^>]*> nop
++00009544 <[^>]*> nop
++00009548 <[^>]*> nop
++0000954c <[^>]*> nop
++00009550 <[^>]*> nop
++00009554 <[^>]*> nop
++00009558 <[^>]*> nop
++0000955c <[^>]*> nop
++00009560 <[^>]*> nop
++00009564 <[^>]*> nop
++00009568 <[^>]*> nop
++0000956c <[^>]*> nop
++00009570 <[^>]*> nop
++00009574 <[^>]*> nop
++00009578 <[^>]*> nop
++0000957c <[^>]*> nop
++00009580 <[^>]*> nop
++00009584 <[^>]*> nop
++00009588 <[^>]*> nop
++0000958c <[^>]*> nop
++00009590 <[^>]*> nop
++00009594 <[^>]*> nop
++00009598 <[^>]*> nop
++0000959c <[^>]*> nop
++000095a0 <[^>]*> nop
++000095a4 <[^>]*> nop
++000095a8 <[^>]*> nop
++000095ac <[^>]*> nop
++000095b0 <[^>]*> nop
++000095b4 <[^>]*> nop
++000095b8 <[^>]*> nop
++000095bc <[^>]*> nop
++000095c0 <[^>]*> nop
++000095c4 <[^>]*> nop
++000095c8 <[^>]*> nop
++000095cc <[^>]*> nop
++000095d0 <[^>]*> nop
++000095d4 <[^>]*> nop
++000095d8 <[^>]*> nop
++000095dc <[^>]*> nop
++000095e0 <[^>]*> nop
++000095e4 <[^>]*> nop
++000095e8 <[^>]*> nop
++000095ec <[^>]*> nop
++000095f0 <[^>]*> nop
++000095f4 <[^>]*> nop
++000095f8 <[^>]*> nop
++000095fc <[^>]*> nop
++00009600 <[^>]*> nop
++00009604 <[^>]*> nop
++00009608 <[^>]*> nop
++0000960c <[^>]*> nop
++00009610 <[^>]*> nop
++00009614 <[^>]*> nop
++00009618 <[^>]*> nop
++0000961c <[^>]*> nop
++00009620 <[^>]*> nop
++00009624 <[^>]*> nop
++00009628 <[^>]*> nop
++0000962c <[^>]*> nop
++00009630 <[^>]*> nop
++00009634 <[^>]*> nop
++00009638 <[^>]*> nop
++0000963c <[^>]*> nop
++00009640 <[^>]*> nop
++00009644 <[^>]*> nop
++00009648 <[^>]*> nop
++0000964c <[^>]*> nop
++00009650 <[^>]*> nop
++00009654 <[^>]*> nop
++00009658 <[^>]*> nop
++0000965c <[^>]*> nop
++00009660 <[^>]*> nop
++00009664 <[^>]*> nop
++00009668 <[^>]*> nop
++0000966c <[^>]*> nop
++00009670 <[^>]*> nop
++00009674 <[^>]*> nop
++00009678 <[^>]*> nop
++0000967c <[^>]*> nop
++00009680 <[^>]*> nop
++00009684 <[^>]*> nop
++00009688 <[^>]*> nop
++0000968c <[^>]*> nop
++00009690 <[^>]*> nop
++00009694 <[^>]*> nop
++00009698 <[^>]*> nop
++0000969c <[^>]*> nop
++000096a0 <[^>]*> nop
++000096a4 <[^>]*> nop
++000096a8 <[^>]*> nop
++000096ac <[^>]*> nop
++000096b0 <[^>]*> nop
++000096b4 <[^>]*> nop
++000096b8 <[^>]*> nop
++000096bc <[^>]*> nop
++000096c0 <[^>]*> nop
++000096c4 <[^>]*> nop
++000096c8 <[^>]*> nop
++000096cc <[^>]*> nop
++000096d0 <[^>]*> nop
++000096d4 <[^>]*> nop
++000096d8 <[^>]*> nop
++000096dc <[^>]*> nop
++000096e0 <[^>]*> nop
++000096e4 <[^>]*> nop
++000096e8 <[^>]*> nop
++000096ec <[^>]*> nop
++000096f0 <[^>]*> nop
++000096f4 <[^>]*> nop
++000096f8 <[^>]*> nop
++000096fc <[^>]*> nop
++00009700 <[^>]*> nop
++00009704 <[^>]*> nop
++00009708 <[^>]*> nop
++0000970c <[^>]*> nop
++00009710 <[^>]*> nop
++00009714 <[^>]*> nop
++00009718 <[^>]*> nop
++0000971c <[^>]*> nop
++00009720 <[^>]*> nop
++00009724 <[^>]*> nop
++00009728 <[^>]*> nop
++0000972c <[^>]*> nop
++00009730 <[^>]*> nop
++00009734 <[^>]*> nop
++00009738 <[^>]*> nop
++0000973c <[^>]*> nop
++00009740 <[^>]*> nop
++00009744 <[^>]*> nop
++00009748 <[^>]*> nop
++0000974c <[^>]*> nop
++00009750 <[^>]*> nop
++00009754 <[^>]*> nop
++00009758 <[^>]*> nop
++0000975c <[^>]*> nop
++00009760 <[^>]*> nop
++00009764 <[^>]*> nop
++00009768 <[^>]*> nop
++0000976c <[^>]*> nop
++00009770 <[^>]*> nop
++00009774 <[^>]*> nop
++00009778 <[^>]*> nop
++0000977c <[^>]*> nop
++00009780 <[^>]*> nop
++00009784 <[^>]*> nop
++00009788 <[^>]*> nop
++0000978c <[^>]*> nop
++00009790 <[^>]*> nop
++00009794 <[^>]*> nop
++00009798 <[^>]*> nop
++0000979c <[^>]*> nop
++000097a0 <[^>]*> nop
++000097a4 <[^>]*> nop
++000097a8 <[^>]*> nop
++000097ac <[^>]*> nop
++000097b0 <[^>]*> nop
++000097b4 <[^>]*> nop
++000097b8 <[^>]*> nop
++000097bc <[^>]*> nop
++000097c0 <[^>]*> nop
++000097c4 <[^>]*> nop
++000097c8 <[^>]*> nop
++000097cc <[^>]*> nop
++000097d0 <[^>]*> nop
++000097d4 <[^>]*> nop
++000097d8 <[^>]*> nop
++000097dc <[^>]*> nop
++000097e0 <[^>]*> nop
++000097e4 <[^>]*> nop
++000097e8 <[^>]*> nop
++000097ec <[^>]*> nop
++000097f0 <[^>]*> nop
++000097f4 <[^>]*> nop
++000097f8 <[^>]*> nop
++000097fc <[^>]*> nop
++00009800 <[^>]*> nop
++00009804 <[^>]*> nop
++00009808 <[^>]*> nop
++0000980c <[^>]*> nop
++00009810 <[^>]*> nop
++00009814 <[^>]*> nop
++00009818 <[^>]*> nop
++0000981c <[^>]*> nop
++00009820 <[^>]*> nop
++00009824 <[^>]*> nop
++00009828 <[^>]*> nop
++0000982c <[^>]*> nop
++00009830 <[^>]*> nop
++00009834 <[^>]*> nop
++00009838 <[^>]*> nop
++0000983c <[^>]*> nop
++00009840 <[^>]*> nop
++00009844 <[^>]*> nop
++00009848 <[^>]*> nop
++0000984c <[^>]*> nop
++00009850 <[^>]*> nop
++00009854 <[^>]*> nop
++00009858 <[^>]*> nop
++0000985c <[^>]*> nop
++00009860 <[^>]*> nop
++00009864 <[^>]*> nop
++00009868 <[^>]*> nop
++0000986c <[^>]*> nop
++00009870 <[^>]*> nop
++00009874 <[^>]*> nop
++00009878 <[^>]*> nop
++0000987c <[^>]*> nop
++00009880 <[^>]*> nop
++00009884 <[^>]*> nop
++00009888 <[^>]*> nop
++0000988c <[^>]*> nop
++00009890 <[^>]*> nop
++00009894 <[^>]*> nop
++00009898 <[^>]*> nop
++0000989c <[^>]*> nop
++000098a0 <[^>]*> nop
++000098a4 <[^>]*> nop
++000098a8 <[^>]*> nop
++000098ac <[^>]*> nop
++000098b0 <[^>]*> nop
++000098b4 <[^>]*> nop
++000098b8 <[^>]*> nop
++000098bc <[^>]*> nop
++000098c0 <[^>]*> nop
++000098c4 <[^>]*> nop
++000098c8 <[^>]*> nop
++000098cc <[^>]*> nop
++000098d0 <[^>]*> nop
++000098d4 <[^>]*> nop
++000098d8 <[^>]*> nop
++000098dc <[^>]*> nop
++000098e0 <[^>]*> nop
++000098e4 <[^>]*> nop
++000098e8 <[^>]*> nop
++000098ec <[^>]*> nop
++000098f0 <[^>]*> nop
++000098f4 <[^>]*> nop
++000098f8 <[^>]*> nop
++000098fc <[^>]*> nop
++00009900 <[^>]*> nop
++00009904 <[^>]*> nop
++00009908 <[^>]*> nop
++0000990c <[^>]*> nop
++00009910 <[^>]*> nop
++00009914 <[^>]*> nop
++00009918 <[^>]*> nop
++0000991c <[^>]*> nop
++00009920 <[^>]*> nop
++00009924 <[^>]*> nop
++00009928 <[^>]*> nop
++0000992c <[^>]*> nop
++00009930 <[^>]*> nop
++00009934 <[^>]*> nop
++00009938 <[^>]*> nop
++0000993c <[^>]*> nop
++00009940 <[^>]*> nop
++00009944 <[^>]*> nop
++00009948 <[^>]*> nop
++0000994c <[^>]*> nop
++00009950 <[^>]*> nop
++00009954 <[^>]*> nop
++00009958 <[^>]*> nop
++0000995c <[^>]*> nop
++00009960 <[^>]*> nop
++00009964 <[^>]*> nop
++00009968 <[^>]*> nop
++0000996c <[^>]*> nop
++00009970 <[^>]*> nop
++00009974 <[^>]*> nop
++00009978 <[^>]*> nop
++0000997c <[^>]*> nop
++00009980 <[^>]*> nop
++00009984 <[^>]*> nop
++00009988 <[^>]*> nop
++0000998c <[^>]*> nop
++00009990 <[^>]*> nop
++00009994 <[^>]*> nop
++00009998 <[^>]*> nop
++0000999c <[^>]*> nop
++000099a0 <[^>]*> nop
++000099a4 <[^>]*> nop
++000099a8 <[^>]*> nop
++000099ac <[^>]*> nop
++000099b0 <[^>]*> nop
++000099b4 <[^>]*> nop
++000099b8 <[^>]*> nop
++000099bc <[^>]*> nop
++000099c0 <[^>]*> nop
++000099c4 <[^>]*> nop
++000099c8 <[^>]*> nop
++000099cc <[^>]*> nop
++000099d0 <[^>]*> nop
++000099d4 <[^>]*> nop
++000099d8 <[^>]*> nop
++000099dc <[^>]*> nop
++000099e0 <[^>]*> nop
++000099e4 <[^>]*> nop
++000099e8 <[^>]*> nop
++000099ec <[^>]*> nop
++000099f0 <[^>]*> nop
++000099f4 <[^>]*> nop
++000099f8 <[^>]*> nop
++000099fc <[^>]*> nop
++00009a00 <[^>]*> nop
++00009a04 <[^>]*> nop
++00009a08 <[^>]*> nop
++00009a0c <[^>]*> nop
++00009a10 <[^>]*> nop
++00009a14 <[^>]*> nop
++00009a18 <[^>]*> nop
++00009a1c <[^>]*> nop
++00009a20 <[^>]*> nop
++00009a24 <[^>]*> nop
++00009a28 <[^>]*> nop
++00009a2c <[^>]*> nop
++00009a30 <[^>]*> nop
++00009a34 <[^>]*> nop
++00009a38 <[^>]*> nop
++00009a3c <[^>]*> nop
++00009a40 <[^>]*> nop
++00009a44 <[^>]*> nop
++00009a48 <[^>]*> nop
++00009a4c <[^>]*> nop
++00009a50 <[^>]*> nop
++00009a54 <[^>]*> nop
++00009a58 <[^>]*> nop
++00009a5c <[^>]*> nop
++00009a60 <[^>]*> nop
++00009a64 <[^>]*> nop
++00009a68 <[^>]*> nop
++00009a6c <[^>]*> nop
++00009a70 <[^>]*> nop
++00009a74 <[^>]*> nop
++00009a78 <[^>]*> nop
++00009a7c <[^>]*> nop
++00009a80 <[^>]*> nop
++00009a84 <[^>]*> nop
++00009a88 <[^>]*> nop
++00009a8c <[^>]*> nop
++00009a90 <[^>]*> nop
++00009a94 <[^>]*> nop
++00009a98 <[^>]*> nop
++00009a9c <[^>]*> nop
++00009aa0 <[^>]*> nop
++00009aa4 <[^>]*> nop
++00009aa8 <[^>]*> nop
++00009aac <[^>]*> nop
++00009ab0 <[^>]*> nop
++00009ab4 <[^>]*> nop
++00009ab8 <[^>]*> nop
++00009abc <[^>]*> nop
++00009ac0 <[^>]*> nop
++00009ac4 <[^>]*> nop
++00009ac8 <[^>]*> nop
++00009acc <[^>]*> nop
++00009ad0 <[^>]*> nop
++00009ad4 <[^>]*> nop
++00009ad8 <[^>]*> nop
++00009adc <[^>]*> nop
++00009ae0 <[^>]*> nop
++00009ae4 <[^>]*> nop
++00009ae8 <[^>]*> nop
++00009aec <[^>]*> nop
++00009af0 <[^>]*> nop
++00009af4 <[^>]*> nop
++00009af8 <[^>]*> nop
++00009afc <[^>]*> nop
++00009b00 <[^>]*> nop
++00009b04 <[^>]*> nop
++00009b08 <[^>]*> nop
++00009b0c <[^>]*> nop
++00009b10 <[^>]*> nop
++00009b14 <[^>]*> nop
++00009b18 <[^>]*> nop
++00009b1c <[^>]*> nop
++00009b20 <[^>]*> nop
++00009b24 <[^>]*> nop
++00009b28 <[^>]*> nop
++00009b2c <[^>]*> nop
++00009b30 <[^>]*> nop
++00009b34 <[^>]*> nop
++00009b38 <[^>]*> nop
++00009b3c <[^>]*> nop
++00009b40 <[^>]*> nop
++00009b44 <[^>]*> nop
++00009b48 <[^>]*> nop
++00009b4c <[^>]*> nop
++00009b50 <[^>]*> nop
++00009b54 <[^>]*> nop
++00009b58 <[^>]*> nop
++00009b5c <[^>]*> nop
++00009b60 <[^>]*> nop
++00009b64 <[^>]*> nop
++00009b68 <[^>]*> nop
++00009b6c <[^>]*> nop
++00009b70 <[^>]*> nop
++00009b74 <[^>]*> nop
++00009b78 <[^>]*> nop
++00009b7c <[^>]*> nop
++00009b80 <[^>]*> nop
++00009b84 <[^>]*> nop
++00009b88 <[^>]*> nop
++00009b8c <[^>]*> nop
++00009b90 <[^>]*> nop
++00009b94 <[^>]*> nop
++00009b98 <[^>]*> nop
++00009b9c <[^>]*> nop
++00009ba0 <[^>]*> nop
++00009ba4 <[^>]*> nop
++00009ba8 <[^>]*> nop
++00009bac <[^>]*> nop
++00009bb0 <[^>]*> nop
++00009bb4 <[^>]*> nop
++00009bb8 <[^>]*> nop
++00009bbc <[^>]*> nop
++00009bc0 <[^>]*> nop
++00009bc4 <[^>]*> nop
++00009bc8 <[^>]*> nop
++00009bcc <[^>]*> nop
++00009bd0 <[^>]*> nop
++00009bd4 <[^>]*> nop
++00009bd8 <[^>]*> nop
++00009bdc <[^>]*> nop
++00009be0 <[^>]*> nop
++00009be4 <[^>]*> nop
++00009be8 <[^>]*> nop
++00009bec <[^>]*> nop
++00009bf0 <[^>]*> nop
++00009bf4 <[^>]*> nop
++00009bf8 <[^>]*> nop
++00009bfc <[^>]*> nop
++00009c00 <[^>]*> nop
++00009c04 <[^>]*> nop
++00009c08 <[^>]*> nop
++00009c0c <[^>]*> nop
++00009c10 <[^>]*> nop
++00009c14 <[^>]*> nop
++00009c18 <[^>]*> nop
++00009c1c <[^>]*> nop
++00009c20 <[^>]*> nop
++00009c24 <[^>]*> nop
++00009c28 <[^>]*> nop
++00009c2c <[^>]*> nop
++00009c30 <[^>]*> nop
++00009c34 <[^>]*> nop
++00009c38 <[^>]*> nop
++00009c3c <[^>]*> nop
++00009c40 <[^>]*> nop
++00009c44 <[^>]*> nop
++00009c48 <[^>]*> nop
++00009c4c <[^>]*> nop
++00009c50 <[^>]*> nop
++00009c54 <[^>]*> nop
++00009c58 <[^>]*> nop
++00009c5c <[^>]*> nop
++00009c60 <[^>]*> nop
++00009c64 <[^>]*> nop
++00009c68 <[^>]*> nop
++00009c6c <[^>]*> nop
++00009c70 <[^>]*> nop
++00009c74 <[^>]*> nop
++00009c78 <[^>]*> nop
++00009c7c <[^>]*> nop
++00009c80 <[^>]*> nop
++00009c84 <[^>]*> nop
++00009c88 <[^>]*> nop
++00009c8c <[^>]*> nop
++00009c90 <[^>]*> nop
++00009c94 <[^>]*> nop
++00009c98 <[^>]*> nop
++00009c9c <[^>]*> nop
++00009ca0 <[^>]*> nop
++00009ca4 <[^>]*> nop
++00009ca8 <[^>]*> nop
++00009cac <[^>]*> nop
++00009cb0 <[^>]*> nop
++00009cb4 <[^>]*> nop
++00009cb8 <[^>]*> nop
++00009cbc <[^>]*> nop
++00009cc0 <[^>]*> nop
++00009cc4 <[^>]*> nop
++00009cc8 <[^>]*> nop
++00009ccc <[^>]*> nop
++00009cd0 <[^>]*> nop
++00009cd4 <[^>]*> nop
++00009cd8 <[^>]*> nop
++00009cdc <[^>]*> nop
++00009ce0 <[^>]*> nop
++00009ce4 <[^>]*> nop
++00009ce8 <[^>]*> nop
++00009cec <[^>]*> nop
++00009cf0 <[^>]*> nop
++00009cf4 <[^>]*> nop
++00009cf8 <[^>]*> nop
++00009cfc <[^>]*> nop
++00009d00 <[^>]*> nop
++00009d04 <[^>]*> nop
++00009d08 <[^>]*> nop
++00009d0c <[^>]*> nop
++00009d10 <[^>]*> nop
++00009d14 <[^>]*> nop
++00009d18 <[^>]*> nop
++00009d1c <[^>]*> nop
++00009d20 <[^>]*> nop
++00009d24 <[^>]*> nop
++00009d28 <[^>]*> nop
++00009d2c <[^>]*> nop
++00009d30 <[^>]*> nop
++00009d34 <[^>]*> nop
++00009d38 <[^>]*> nop
++00009d3c <[^>]*> nop
++00009d40 <[^>]*> nop
++00009d44 <[^>]*> nop
++00009d48 <[^>]*> nop
++00009d4c <[^>]*> nop
++00009d50 <[^>]*> nop
++00009d54 <[^>]*> nop
++00009d58 <[^>]*> nop
++00009d5c <[^>]*> nop
++00009d60 <[^>]*> nop
++00009d64 <[^>]*> nop
++00009d68 <[^>]*> nop
++00009d6c <[^>]*> nop
++00009d70 <[^>]*> nop
++00009d74 <[^>]*> nop
++00009d78 <[^>]*> nop
++00009d7c <[^>]*> nop
++00009d80 <[^>]*> nop
++00009d84 <[^>]*> nop
++00009d88 <[^>]*> nop
++00009d8c <[^>]*> nop
++00009d90 <[^>]*> nop
++00009d94 <[^>]*> nop
++00009d98 <[^>]*> nop
++00009d9c <[^>]*> nop
++00009da0 <[^>]*> nop
++00009da4 <[^>]*> nop
++00009da8 <[^>]*> nop
++00009dac <[^>]*> nop
++00009db0 <[^>]*> nop
++00009db4 <[^>]*> nop
++00009db8 <[^>]*> nop
++00009dbc <[^>]*> nop
++00009dc0 <[^>]*> nop
++00009dc4 <[^>]*> nop
++00009dc8 <[^>]*> nop
++00009dcc <[^>]*> nop
++00009dd0 <[^>]*> nop
++00009dd4 <[^>]*> nop
++00009dd8 <[^>]*> nop
++00009ddc <[^>]*> nop
++00009de0 <[^>]*> nop
++00009de4 <[^>]*> nop
++00009de8 <[^>]*> nop
++00009dec <[^>]*> nop
++00009df0 <[^>]*> nop
++00009df4 <[^>]*> nop
++00009df8 <[^>]*> nop
++00009dfc <[^>]*> nop
++00009e00 <[^>]*> nop
++00009e04 <[^>]*> nop
++00009e08 <[^>]*> nop
++00009e0c <[^>]*> nop
++00009e10 <[^>]*> nop
++00009e14 <[^>]*> nop
++00009e18 <[^>]*> nop
++00009e1c <[^>]*> nop
++00009e20 <[^>]*> nop
++00009e24 <[^>]*> nop
++00009e28 <[^>]*> nop
++00009e2c <[^>]*> nop
++00009e30 <[^>]*> nop
++00009e34 <[^>]*> nop
++00009e38 <[^>]*> nop
++00009e3c <[^>]*> nop
++00009e40 <[^>]*> nop
++00009e44 <[^>]*> nop
++00009e48 <[^>]*> nop
++00009e4c <[^>]*> nop
++00009e50 <[^>]*> nop
++00009e54 <[^>]*> nop
++00009e58 <[^>]*> nop
++00009e5c <[^>]*> nop
++00009e60 <[^>]*> nop
++00009e64 <[^>]*> nop
++00009e68 <[^>]*> nop
++00009e6c <[^>]*> nop
++00009e70 <[^>]*> nop
++00009e74 <[^>]*> nop
++00009e78 <[^>]*> nop
++00009e7c <[^>]*> nop
++00009e80 <[^>]*> nop
++00009e84 <[^>]*> nop
++00009e88 <[^>]*> nop
++00009e8c <[^>]*> nop
++00009e90 <[^>]*> nop
++00009e94 <[^>]*> nop
++00009e98 <[^>]*> nop
++00009e9c <[^>]*> nop
++00009ea0 <[^>]*> nop
++00009ea4 <[^>]*> nop
++00009ea8 <[^>]*> nop
++00009eac <[^>]*> nop
++00009eb0 <[^>]*> nop
++00009eb4 <[^>]*> nop
++00009eb8 <[^>]*> nop
++00009ebc <[^>]*> nop
++00009ec0 <[^>]*> nop
++00009ec4 <[^>]*> nop
++00009ec8 <[^>]*> nop
++00009ecc <[^>]*> nop
++00009ed0 <[^>]*> nop
++00009ed4 <[^>]*> nop
++00009ed8 <[^>]*> nop
++00009edc <[^>]*> nop
++00009ee0 <[^>]*> nop
++00009ee4 <[^>]*> nop
++00009ee8 <[^>]*> nop
++00009eec <[^>]*> nop
++00009ef0 <[^>]*> nop
++00009ef4 <[^>]*> nop
++00009ef8 <[^>]*> nop
++00009efc <[^>]*> nop
++00009f00 <[^>]*> nop
++00009f04 <[^>]*> nop
++00009f08 <[^>]*> nop
++00009f0c <[^>]*> nop
++00009f10 <[^>]*> nop
++00009f14 <[^>]*> nop
++00009f18 <[^>]*> nop
++00009f1c <[^>]*> nop
++00009f20 <[^>]*> nop
++00009f24 <[^>]*> nop
++00009f28 <[^>]*> nop
++00009f2c <[^>]*> nop
++00009f30 <[^>]*> nop
++00009f34 <[^>]*> nop
++00009f38 <[^>]*> nop
++00009f3c <[^>]*> nop
++00009f40 <[^>]*> nop
++00009f44 <[^>]*> nop
++00009f48 <[^>]*> nop
++00009f4c <[^>]*> nop
++00009f50 <[^>]*> nop
++00009f54 <[^>]*> nop
++00009f58 <[^>]*> nop
++00009f5c <[^>]*> nop
++00009f60 <[^>]*> nop
++00009f64 <[^>]*> nop
++00009f68 <[^>]*> nop
++00009f6c <[^>]*> nop
++00009f70 <[^>]*> nop
++00009f74 <[^>]*> nop
++00009f78 <[^>]*> nop
++00009f7c <[^>]*> nop
++00009f80 <[^>]*> nop
++00009f84 <[^>]*> nop
++00009f88 <[^>]*> nop
++00009f8c <[^>]*> nop
++00009f90 <[^>]*> nop
++00009f94 <[^>]*> nop
++00009f98 <[^>]*> nop
++00009f9c <[^>]*> nop
++00009fa0 <[^>]*> nop
++00009fa4 <[^>]*> nop
++00009fa8 <[^>]*> nop
++00009fac <[^>]*> nop
++00009fb0 <[^>]*> nop
++00009fb4 <[^>]*> nop
++00009fb8 <[^>]*> nop
++00009fbc <[^>]*> nop
++00009fc0 <[^>]*> nop
++00009fc4 <[^>]*> nop
++00009fc8 <[^>]*> nop
++00009fcc <[^>]*> nop
++00009fd0 <[^>]*> nop
++00009fd4 <[^>]*> nop
++00009fd8 <[^>]*> nop
++00009fdc <[^>]*> nop
++00009fe0 <[^>]*> nop
++00009fe4 <[^>]*> nop
++00009fe8 <[^>]*> nop
++00009fec <[^>]*> nop
++00009ff0 <[^>]*> nop
++00009ff4 <[^>]*> nop
++00009ff8 <[^>]*> nop
++00009ffc <[^>]*> nop
++0000a000 <[^>]*> nop
++0000a004 <[^>]*> nop
++0000a008 <[^>]*> nop
++0000a00c <[^>]*> nop
++0000a010 <[^>]*> nop
++0000a014 <[^>]*> nop
++0000a018 <[^>]*> nop
++0000a01c <[^>]*> nop
++0000a020 <[^>]*> nop
++0000a024 <[^>]*> nop
++0000a028 <[^>]*> nop
++0000a02c <[^>]*> nop
++0000a030 <[^>]*> nop
++0000a034 <[^>]*> nop
++0000a038 <[^>]*> nop
++0000a03c <[^>]*> nop
++0000a040 <[^>]*> nop
++0000a044 <[^>]*> nop
++0000a048 <[^>]*> nop
++0000a04c <[^>]*> nop
++0000a050 <[^>]*> nop
++0000a054 <[^>]*> nop
++0000a058 <[^>]*> nop
++0000a05c <[^>]*> nop
++0000a060 <[^>]*> nop
++0000a064 <[^>]*> nop
++0000a068 <[^>]*> nop
++0000a06c <[^>]*> nop
++0000a070 <[^>]*> nop
++0000a074 <[^>]*> nop
++0000a078 <[^>]*> nop
++0000a07c <[^>]*> nop
++0000a080 <[^>]*> nop
++0000a084 <[^>]*> nop
++0000a088 <[^>]*> nop
++0000a08c <[^>]*> nop
++0000a090 <[^>]*> nop
++0000a094 <[^>]*> nop
++0000a098 <[^>]*> nop
++0000a09c <[^>]*> nop
++0000a0a0 <[^>]*> nop
++0000a0a4 <[^>]*> nop
++0000a0a8 <[^>]*> nop
++0000a0ac <[^>]*> nop
++0000a0b0 <[^>]*> nop
++0000a0b4 <[^>]*> nop
++0000a0b8 <[^>]*> nop
++0000a0bc <[^>]*> nop
++0000a0c0 <[^>]*> nop
++0000a0c4 <[^>]*> nop
++0000a0c8 <[^>]*> nop
++0000a0cc <[^>]*> nop
++0000a0d0 <[^>]*> nop
++0000a0d4 <[^>]*> nop
++0000a0d8 <[^>]*> nop
++0000a0dc <[^>]*> nop
++0000a0e0 <[^>]*> nop
++0000a0e4 <[^>]*> nop
++0000a0e8 <[^>]*> nop
++0000a0ec <[^>]*> nop
++0000a0f0 <[^>]*> nop
++0000a0f4 <[^>]*> nop
++0000a0f8 <[^>]*> nop
++0000a0fc <[^>]*> nop
++0000a100 <[^>]*> nop
++0000a104 <[^>]*> nop
++0000a108 <[^>]*> nop
++0000a10c <[^>]*> nop
++0000a110 <[^>]*> nop
++0000a114 <[^>]*> nop
++0000a118 <[^>]*> nop
++0000a11c <[^>]*> nop
++0000a120 <[^>]*> nop
++0000a124 <[^>]*> nop
++0000a128 <[^>]*> nop
++0000a12c <[^>]*> nop
++0000a130 <[^>]*> nop
++0000a134 <[^>]*> nop
++0000a138 <[^>]*> nop
++0000a13c <[^>]*> nop
++0000a140 <[^>]*> nop
++0000a144 <[^>]*> nop
++0000a148 <[^>]*> nop
++0000a14c <[^>]*> nop
++0000a150 <[^>]*> nop
++0000a154 <[^>]*> nop
++0000a158 <[^>]*> nop
++0000a15c <[^>]*> nop
++0000a160 <[^>]*> nop
++0000a164 <[^>]*> nop
++0000a168 <[^>]*> nop
++0000a16c <[^>]*> nop
++0000a170 <[^>]*> nop
++0000a174 <[^>]*> nop
++0000a178 <[^>]*> nop
++0000a17c <[^>]*> nop
++0000a180 <[^>]*> nop
++0000a184 <[^>]*> nop
++0000a188 <[^>]*> nop
++0000a18c <[^>]*> nop
++0000a190 <[^>]*> nop
++0000a194 <[^>]*> nop
++0000a198 <[^>]*> nop
++0000a19c <[^>]*> nop
++0000a1a0 <[^>]*> nop
++0000a1a4 <[^>]*> nop
++0000a1a8 <[^>]*> nop
++0000a1ac <[^>]*> nop
++0000a1b0 <[^>]*> nop
++0000a1b4 <[^>]*> nop
++0000a1b8 <[^>]*> nop
++0000a1bc <[^>]*> nop
++0000a1c0 <[^>]*> nop
++0000a1c4 <[^>]*> nop
++0000a1c8 <[^>]*> nop
++0000a1cc <[^>]*> nop
++0000a1d0 <[^>]*> nop
++0000a1d4 <[^>]*> nop
++0000a1d8 <[^>]*> nop
++0000a1dc <[^>]*> nop
++0000a1e0 <[^>]*> nop
++0000a1e4 <[^>]*> nop
++0000a1e8 <[^>]*> nop
++0000a1ec <[^>]*> nop
++0000a1f0 <[^>]*> nop
++0000a1f4 <[^>]*> nop
++0000a1f8 <[^>]*> nop
++0000a1fc <[^>]*> nop
++0000a200 <[^>]*> nop
++0000a204 <[^>]*> nop
++0000a208 <[^>]*> nop
++0000a20c <[^>]*> nop
++0000a210 <[^>]*> nop
++0000a214 <[^>]*> nop
++0000a218 <[^>]*> nop
++0000a21c <[^>]*> nop
++0000a220 <[^>]*> nop
++0000a224 <[^>]*> nop
++0000a228 <[^>]*> nop
++0000a22c <[^>]*> nop
++0000a230 <[^>]*> nop
++0000a234 <[^>]*> nop
++0000a238 <[^>]*> nop
++0000a23c <[^>]*> nop
++0000a240 <[^>]*> nop
++0000a244 <[^>]*> nop
++0000a248 <[^>]*> nop
++0000a24c <[^>]*> nop
++0000a250 <[^>]*> nop
++0000a254 <[^>]*> nop
++0000a258 <[^>]*> nop
++0000a25c <[^>]*> nop
++0000a260 <[^>]*> nop
++0000a264 <[^>]*> nop
++0000a268 <[^>]*> nop
++0000a26c <[^>]*> nop
++0000a270 <[^>]*> nop
++0000a274 <[^>]*> nop
++0000a278 <[^>]*> nop
++0000a27c <[^>]*> nop
++0000a280 <[^>]*> nop
++0000a284 <[^>]*> nop
++0000a288 <[^>]*> nop
++0000a28c <[^>]*> nop
++0000a290 <[^>]*> nop
++0000a294 <[^>]*> nop
++0000a298 <[^>]*> nop
++0000a29c <[^>]*> nop
++0000a2a0 <[^>]*> nop
++0000a2a4 <[^>]*> nop
++0000a2a8 <[^>]*> nop
++0000a2ac <[^>]*> nop
++0000a2b0 <[^>]*> nop
++0000a2b4 <[^>]*> nop
++0000a2b8 <[^>]*> nop
++0000a2bc <[^>]*> nop
++0000a2c0 <[^>]*> nop
++0000a2c4 <[^>]*> nop
++0000a2c8 <[^>]*> nop
++0000a2cc <[^>]*> nop
++0000a2d0 <[^>]*> nop
++0000a2d4 <[^>]*> nop
++0000a2d8 <[^>]*> nop
++0000a2dc <[^>]*> nop
++0000a2e0 <[^>]*> nop
++0000a2e4 <[^>]*> nop
++0000a2e8 <[^>]*> nop
++0000a2ec <[^>]*> nop
++0000a2f0 <[^>]*> nop
++0000a2f4 <[^>]*> nop
++0000a2f8 <[^>]*> nop
++0000a2fc <[^>]*> nop
++0000a300 <[^>]*> nop
++0000a304 <[^>]*> nop
++0000a308 <[^>]*> nop
++0000a30c <[^>]*> nop
++0000a310 <[^>]*> nop
++0000a314 <[^>]*> nop
++0000a318 <[^>]*> nop
++0000a31c <[^>]*> nop
++0000a320 <[^>]*> nop
++0000a324 <[^>]*> nop
++0000a328 <[^>]*> nop
++0000a32c <[^>]*> nop
++0000a330 <[^>]*> nop
++0000a334 <[^>]*> nop
++0000a338 <[^>]*> nop
++0000a33c <[^>]*> nop
++0000a340 <[^>]*> nop
++0000a344 <[^>]*> nop
++0000a348 <[^>]*> nop
++0000a34c <[^>]*> nop
++0000a350 <[^>]*> nop
++0000a354 <[^>]*> nop
++0000a358 <[^>]*> nop
++0000a35c <[^>]*> nop
++0000a360 <[^>]*> nop
++0000a364 <[^>]*> nop
++0000a368 <[^>]*> nop
++0000a36c <[^>]*> nop
++0000a370 <[^>]*> nop
++0000a374 <[^>]*> nop
++0000a378 <[^>]*> nop
++0000a37c <[^>]*> nop
++0000a380 <[^>]*> nop
++0000a384 <[^>]*> nop
++0000a388 <[^>]*> nop
++0000a38c <[^>]*> nop
++0000a390 <[^>]*> nop
++0000a394 <[^>]*> nop
++0000a398 <[^>]*> nop
++0000a39c <[^>]*> nop
++0000a3a0 <[^>]*> nop
++0000a3a4 <[^>]*> nop
++0000a3a8 <[^>]*> nop
++0000a3ac <[^>]*> nop
++0000a3b0 <[^>]*> nop
++0000a3b4 <[^>]*> nop
++0000a3b8 <[^>]*> nop
++0000a3bc <[^>]*> nop
++0000a3c0 <[^>]*> nop
++0000a3c4 <[^>]*> nop
++0000a3c8 <[^>]*> nop
++0000a3cc <[^>]*> nop
++0000a3d0 <[^>]*> nop
++0000a3d4 <[^>]*> nop
++0000a3d8 <[^>]*> nop
++0000a3dc <[^>]*> nop
++0000a3e0 <[^>]*> nop
++0000a3e4 <[^>]*> nop
++0000a3e8 <[^>]*> nop
++0000a3ec <[^>]*> nop
++0000a3f0 <[^>]*> nop
++0000a3f4 <[^>]*> nop
++0000a3f8 <[^>]*> nop
++0000a3fc <[^>]*> nop
++0000a400 <[^>]*> nop
++0000a404 <[^>]*> nop
++0000a408 <[^>]*> nop
++0000a40c <[^>]*> nop
++0000a410 <[^>]*> nop
++0000a414 <[^>]*> nop
++0000a418 <[^>]*> nop
++0000a41c <[^>]*> nop
++0000a420 <[^>]*> nop
++0000a424 <[^>]*> nop
++0000a428 <[^>]*> nop
++0000a42c <[^>]*> nop
++0000a430 <[^>]*> nop
++0000a434 <[^>]*> nop
++0000a438 <[^>]*> nop
++0000a43c <[^>]*> nop
++0000a440 <[^>]*> nop
++0000a444 <[^>]*> nop
++0000a448 <[^>]*> nop
++0000a44c <[^>]*> nop
++0000a450 <[^>]*> nop
++0000a454 <[^>]*> nop
++0000a458 <[^>]*> nop
++0000a45c <[^>]*> nop
++0000a460 <[^>]*> nop
++0000a464 <[^>]*> nop
++0000a468 <[^>]*> nop
++0000a46c <[^>]*> nop
++0000a470 <[^>]*> nop
++0000a474 <[^>]*> nop
++0000a478 <[^>]*> nop
++0000a47c <[^>]*> nop
++0000a480 <[^>]*> nop
++0000a484 <[^>]*> nop
++0000a488 <[^>]*> nop
++0000a48c <[^>]*> nop
++0000a490 <[^>]*> nop
++0000a494 <[^>]*> nop
++0000a498 <[^>]*> nop
++0000a49c <[^>]*> nop
++0000a4a0 <[^>]*> nop
++0000a4a4 <[^>]*> nop
++0000a4a8 <[^>]*> nop
++0000a4ac <[^>]*> nop
++0000a4b0 <[^>]*> nop
++0000a4b4 <[^>]*> nop
++0000a4b8 <[^>]*> nop
++0000a4bc <[^>]*> nop
++0000a4c0 <[^>]*> nop
++0000a4c4 <[^>]*> nop
++0000a4c8 <[^>]*> nop
++0000a4cc <[^>]*> nop
++0000a4d0 <[^>]*> nop
++0000a4d4 <[^>]*> nop
++0000a4d8 <[^>]*> nop
++0000a4dc <[^>]*> nop
++0000a4e0 <[^>]*> nop
++0000a4e4 <[^>]*> nop
++0000a4e8 <[^>]*> nop
++0000a4ec <[^>]*> nop
++0000a4f0 <[^>]*> nop
++0000a4f4 <[^>]*> nop
++0000a4f8 <[^>]*> nop
++0000a4fc <[^>]*> nop
++0000a500 <[^>]*> nop
++0000a504 <[^>]*> nop
++0000a508 <[^>]*> nop
++0000a50c <[^>]*> nop
++0000a510 <[^>]*> nop
++0000a514 <[^>]*> nop
++0000a518 <[^>]*> nop
++0000a51c <[^>]*> nop
++0000a520 <[^>]*> nop
++0000a524 <[^>]*> nop
++0000a528 <[^>]*> nop
++0000a52c <[^>]*> nop
++0000a530 <[^>]*> nop
++0000a534 <[^>]*> nop
++0000a538 <[^>]*> nop
++0000a53c <[^>]*> nop
++0000a540 <[^>]*> nop
++0000a544 <[^>]*> nop
++0000a548 <[^>]*> nop
++0000a54c <[^>]*> nop
++0000a550 <[^>]*> nop
++0000a554 <[^>]*> nop
++0000a558 <[^>]*> nop
++0000a55c <[^>]*> nop
++0000a560 <[^>]*> nop
++0000a564 <[^>]*> nop
++0000a568 <[^>]*> nop
++0000a56c <[^>]*> nop
++0000a570 <[^>]*> nop
++0000a574 <[^>]*> nop
++0000a578 <[^>]*> nop
++0000a57c <[^>]*> nop
++0000a580 <[^>]*> nop
++0000a584 <[^>]*> nop
++0000a588 <[^>]*> nop
++0000a58c <[^>]*> nop
++0000a590 <[^>]*> nop
++0000a594 <[^>]*> nop
++0000a598 <[^>]*> nop
++0000a59c <[^>]*> nop
++0000a5a0 <[^>]*> nop
++0000a5a4 <[^>]*> nop
++0000a5a8 <[^>]*> nop
++0000a5ac <[^>]*> nop
++0000a5b0 <[^>]*> nop
++0000a5b4 <[^>]*> nop
++0000a5b8 <[^>]*> nop
++0000a5bc <[^>]*> nop
++0000a5c0 <[^>]*> nop
++0000a5c4 <[^>]*> nop
++0000a5c8 <[^>]*> nop
++0000a5cc <[^>]*> nop
++0000a5d0 <[^>]*> nop
++0000a5d4 <[^>]*> nop
++0000a5d8 <[^>]*> nop
++0000a5dc <[^>]*> nop
++0000a5e0 <[^>]*> nop
++0000a5e4 <[^>]*> nop
++0000a5e8 <[^>]*> nop
++0000a5ec <[^>]*> nop
++0000a5f0 <[^>]*> nop
++0000a5f4 <[^>]*> nop
++0000a5f8 <[^>]*> nop
++0000a5fc <[^>]*> nop
++0000a600 <[^>]*> nop
++0000a604 <[^>]*> nop
++0000a608 <[^>]*> nop
++0000a60c <[^>]*> nop
++0000a610 <[^>]*> nop
++0000a614 <[^>]*> nop
++0000a618 <[^>]*> nop
++0000a61c <[^>]*> nop
++0000a620 <[^>]*> nop
++0000a624 <[^>]*> nop
++0000a628 <[^>]*> nop
++0000a62c <[^>]*> nop
++0000a630 <[^>]*> nop
++0000a634 <[^>]*> nop
++0000a638 <[^>]*> nop
++0000a63c <[^>]*> nop
++0000a640 <[^>]*> nop
++0000a644 <[^>]*> nop
++0000a648 <[^>]*> nop
++0000a64c <[^>]*> nop
++0000a650 <[^>]*> nop
++0000a654 <[^>]*> nop
++0000a658 <[^>]*> nop
++0000a65c <[^>]*> nop
++0000a660 <[^>]*> nop
++0000a664 <[^>]*> nop
++0000a668 <[^>]*> nop
++0000a66c <[^>]*> nop
++0000a670 <[^>]*> nop
++0000a674 <[^>]*> nop
++0000a678 <[^>]*> nop
++0000a67c <[^>]*> nop
++0000a680 <[^>]*> nop
++0000a684 <[^>]*> nop
++0000a688 <[^>]*> nop
++0000a68c <[^>]*> nop
++0000a690 <[^>]*> nop
++0000a694 <[^>]*> nop
++0000a698 <[^>]*> nop
++0000a69c <[^>]*> nop
++0000a6a0 <[^>]*> nop
++0000a6a4 <[^>]*> nop
++0000a6a8 <[^>]*> nop
++0000a6ac <[^>]*> nop
++0000a6b0 <[^>]*> nop
++0000a6b4 <[^>]*> nop
++0000a6b8 <[^>]*> nop
++0000a6bc <[^>]*> nop
++0000a6c0 <[^>]*> nop
++0000a6c4 <[^>]*> nop
++0000a6c8 <[^>]*> nop
++0000a6cc <[^>]*> nop
++0000a6d0 <[^>]*> nop
++0000a6d4 <[^>]*> nop
++0000a6d8 <[^>]*> nop
++0000a6dc <[^>]*> nop
++0000a6e0 <[^>]*> nop
++0000a6e4 <[^>]*> nop
++0000a6e8 <[^>]*> nop
++0000a6ec <[^>]*> nop
++0000a6f0 <[^>]*> nop
++0000a6f4 <[^>]*> nop
++0000a6f8 <[^>]*> nop
++0000a6fc <[^>]*> nop
++0000a700 <[^>]*> nop
++0000a704 <[^>]*> nop
++0000a708 <[^>]*> nop
++0000a70c <[^>]*> nop
++0000a710 <[^>]*> nop
++0000a714 <[^>]*> nop
++0000a718 <[^>]*> nop
++0000a71c <[^>]*> nop
++0000a720 <[^>]*> nop
++0000a724 <[^>]*> nop
++0000a728 <[^>]*> nop
++0000a72c <[^>]*> nop
++0000a730 <[^>]*> nop
++0000a734 <[^>]*> nop
++0000a738 <[^>]*> nop
++0000a73c <[^>]*> nop
++0000a740 <[^>]*> nop
++0000a744 <[^>]*> nop
++0000a748 <[^>]*> nop
++0000a74c <[^>]*> nop
++0000a750 <[^>]*> nop
++0000a754 <[^>]*> nop
++0000a758 <[^>]*> nop
++0000a75c <[^>]*> nop
++0000a760 <[^>]*> nop
++0000a764 <[^>]*> nop
++0000a768 <[^>]*> nop
++0000a76c <[^>]*> nop
++0000a770 <[^>]*> nop
++0000a774 <[^>]*> nop
++0000a778 <[^>]*> nop
++0000a77c <[^>]*> nop
++0000a780 <[^>]*> nop
++0000a784 <[^>]*> nop
++0000a788 <[^>]*> nop
++0000a78c <[^>]*> nop
++0000a790 <[^>]*> nop
++0000a794 <[^>]*> nop
++0000a798 <[^>]*> nop
++0000a79c <[^>]*> nop
++0000a7a0 <[^>]*> nop
++0000a7a4 <[^>]*> nop
++0000a7a8 <[^>]*> nop
++0000a7ac <[^>]*> nop
++0000a7b0 <[^>]*> nop
++0000a7b4 <[^>]*> nop
++0000a7b8 <[^>]*> nop
++0000a7bc <[^>]*> nop
++0000a7c0 <[^>]*> nop
++0000a7c4 <[^>]*> nop
++0000a7c8 <[^>]*> nop
++0000a7cc <[^>]*> nop
++0000a7d0 <[^>]*> nop
++0000a7d4 <[^>]*> nop
++0000a7d8 <[^>]*> nop
++0000a7dc <[^>]*> nop
++0000a7e0 <[^>]*> nop
++0000a7e4 <[^>]*> nop
++0000a7e8 <[^>]*> nop
++0000a7ec <[^>]*> nop
++0000a7f0 <[^>]*> nop
++0000a7f4 <[^>]*> nop
++0000a7f8 <[^>]*> nop
++0000a7fc <[^>]*> nop
++0000a800 <[^>]*> nop
++0000a804 <[^>]*> nop
++0000a808 <[^>]*> nop
++0000a80c <[^>]*> nop
++0000a810 <[^>]*> nop
++0000a814 <[^>]*> nop
++0000a818 <[^>]*> nop
++0000a81c <[^>]*> nop
++0000a820 <[^>]*> nop
++0000a824 <[^>]*> nop
++0000a828 <[^>]*> nop
++0000a82c <[^>]*> nop
++0000a830 <[^>]*> nop
++0000a834 <[^>]*> nop
++0000a838 <[^>]*> nop
++0000a83c <[^>]*> nop
++0000a840 <[^>]*> nop
++0000a844 <[^>]*> nop
++0000a848 <[^>]*> nop
++0000a84c <[^>]*> nop
++0000a850 <[^>]*> nop
++0000a854 <[^>]*> nop
++0000a858 <[^>]*> nop
++0000a85c <[^>]*> nop
++0000a860 <[^>]*> nop
++0000a864 <[^>]*> nop
++0000a868 <[^>]*> nop
++0000a86c <[^>]*> nop
++0000a870 <[^>]*> nop
++0000a874 <[^>]*> nop
++0000a878 <[^>]*> nop
++0000a87c <[^>]*> nop
++0000a880 <[^>]*> nop
++0000a884 <[^>]*> nop
++0000a888 <[^>]*> nop
++0000a88c <[^>]*> nop
++0000a890 <[^>]*> nop
++0000a894 <[^>]*> nop
++0000a898 <[^>]*> nop
++0000a89c <[^>]*> nop
++0000a8a0 <[^>]*> nop
++0000a8a4 <[^>]*> nop
++0000a8a8 <[^>]*> nop
++0000a8ac <[^>]*> nop
++0000a8b0 <[^>]*> nop
++0000a8b4 <[^>]*> nop
++0000a8b8 <[^>]*> nop
++0000a8bc <[^>]*> nop
++0000a8c0 <[^>]*> nop
++0000a8c4 <[^>]*> nop
++0000a8c8 <[^>]*> nop
++0000a8cc <[^>]*> nop
++0000a8d0 <[^>]*> nop
++0000a8d4 <[^>]*> nop
++0000a8d8 <[^>]*> nop
++0000a8dc <[^>]*> nop
++0000a8e0 <[^>]*> nop
++0000a8e4 <[^>]*> nop
++0000a8e8 <[^>]*> nop
++0000a8ec <[^>]*> nop
++0000a8f0 <[^>]*> nop
++0000a8f4 <[^>]*> nop
++0000a8f8 <[^>]*> nop
++0000a8fc <[^>]*> nop
++0000a900 <[^>]*> nop
++0000a904 <[^>]*> nop
++0000a908 <[^>]*> nop
++0000a90c <[^>]*> nop
++0000a910 <[^>]*> nop
++0000a914 <[^>]*> nop
++0000a918 <[^>]*> nop
++0000a91c <[^>]*> nop
++0000a920 <[^>]*> nop
++0000a924 <[^>]*> nop
++0000a928 <[^>]*> nop
++0000a92c <[^>]*> nop
++0000a930 <[^>]*> nop
++0000a934 <[^>]*> nop
++0000a938 <[^>]*> nop
++0000a93c <[^>]*> nop
++0000a940 <[^>]*> nop
++0000a944 <[^>]*> nop
++0000a948 <[^>]*> nop
++0000a94c <[^>]*> nop
++0000a950 <[^>]*> nop
++0000a954 <[^>]*> nop
++0000a958 <[^>]*> nop
++0000a95c <[^>]*> nop
++0000a960 <[^>]*> nop
++0000a964 <[^>]*> nop
++0000a968 <[^>]*> nop
++0000a96c <[^>]*> nop
++0000a970 <[^>]*> nop
++0000a974 <[^>]*> nop
++0000a978 <[^>]*> nop
++0000a97c <[^>]*> nop
++0000a980 <[^>]*> nop
++0000a984 <[^>]*> nop
++0000a988 <[^>]*> nop
++0000a98c <[^>]*> nop
++0000a990 <[^>]*> nop
++0000a994 <[^>]*> nop
++0000a998 <[^>]*> nop
++0000a99c <[^>]*> nop
++0000a9a0 <[^>]*> nop
++0000a9a4 <[^>]*> nop
++0000a9a8 <[^>]*> nop
++0000a9ac <[^>]*> nop
++0000a9b0 <[^>]*> nop
++0000a9b4 <[^>]*> nop
++0000a9b8 <[^>]*> nop
++0000a9bc <[^>]*> nop
++0000a9c0 <[^>]*> nop
++0000a9c4 <[^>]*> nop
++0000a9c8 <[^>]*> nop
++0000a9cc <[^>]*> nop
++0000a9d0 <[^>]*> nop
++0000a9d4 <[^>]*> nop
++0000a9d8 <[^>]*> nop
++0000a9dc <[^>]*> nop
++0000a9e0 <[^>]*> nop
++0000a9e4 <[^>]*> nop
++0000a9e8 <[^>]*> nop
++0000a9ec <[^>]*> nop
++0000a9f0 <[^>]*> nop
++0000a9f4 <[^>]*> nop
++0000a9f8 <[^>]*> nop
++0000a9fc <[^>]*> nop
++0000aa00 <[^>]*> nop
++0000aa04 <[^>]*> nop
++0000aa08 <[^>]*> nop
++0000aa0c <[^>]*> nop
++0000aa10 <[^>]*> nop
++0000aa14 <[^>]*> nop
++0000aa18 <[^>]*> nop
++0000aa1c <[^>]*> nop
++0000aa20 <[^>]*> nop
++0000aa24 <[^>]*> nop
++0000aa28 <[^>]*> nop
++0000aa2c <[^>]*> nop
++0000aa30 <[^>]*> nop
++0000aa34 <[^>]*> nop
++0000aa38 <[^>]*> nop
++0000aa3c <[^>]*> nop
++0000aa40 <[^>]*> nop
++0000aa44 <[^>]*> nop
++0000aa48 <[^>]*> nop
++0000aa4c <[^>]*> nop
++0000aa50 <[^>]*> nop
++0000aa54 <[^>]*> nop
++0000aa58 <[^>]*> nop
++0000aa5c <[^>]*> nop
++0000aa60 <[^>]*> nop
++0000aa64 <[^>]*> nop
++0000aa68 <[^>]*> nop
++0000aa6c <[^>]*> nop
++0000aa70 <[^>]*> nop
++0000aa74 <[^>]*> nop
++0000aa78 <[^>]*> nop
++0000aa7c <[^>]*> nop
++0000aa80 <[^>]*> nop
++0000aa84 <[^>]*> nop
++0000aa88 <[^>]*> nop
++0000aa8c <[^>]*> nop
++0000aa90 <[^>]*> nop
++0000aa94 <[^>]*> nop
++0000aa98 <[^>]*> nop
++0000aa9c <[^>]*> nop
++0000aaa0 <[^>]*> nop
++0000aaa4 <[^>]*> nop
++0000aaa8 <[^>]*> nop
++0000aaac <[^>]*> nop
++0000aab0 <[^>]*> nop
++0000aab4 <[^>]*> nop
++0000aab8 <[^>]*> nop
++0000aabc <[^>]*> nop
++0000aac0 <[^>]*> nop
++0000aac4 <[^>]*> nop
++0000aac8 <[^>]*> nop
++0000aacc <[^>]*> nop
++0000aad0 <[^>]*> nop
++0000aad4 <[^>]*> nop
++0000aad8 <[^>]*> nop
++0000aadc <[^>]*> nop
++0000aae0 <[^>]*> nop
++0000aae4 <[^>]*> nop
++0000aae8 <[^>]*> nop
++0000aaec <[^>]*> nop
++0000aaf0 <[^>]*> nop
++0000aaf4 <[^>]*> nop
++0000aaf8 <[^>]*> nop
++0000aafc <[^>]*> nop
++0000ab00 <[^>]*> nop
++0000ab04 <[^>]*> nop
++0000ab08 <[^>]*> nop
++0000ab0c <[^>]*> nop
++0000ab10 <[^>]*> nop
++0000ab14 <[^>]*> nop
++0000ab18 <[^>]*> nop
++0000ab1c <[^>]*> nop
++0000ab20 <[^>]*> nop
++0000ab24 <[^>]*> nop
++0000ab28 <[^>]*> nop
++0000ab2c <[^>]*> nop
++0000ab30 <[^>]*> nop
++0000ab34 <[^>]*> nop
++0000ab38 <[^>]*> nop
++0000ab3c <[^>]*> nop
++0000ab40 <[^>]*> nop
++0000ab44 <[^>]*> nop
++0000ab48 <[^>]*> nop
++0000ab4c <[^>]*> nop
++0000ab50 <[^>]*> nop
++0000ab54 <[^>]*> nop
++0000ab58 <[^>]*> nop
++0000ab5c <[^>]*> nop
++0000ab60 <[^>]*> nop
++0000ab64 <[^>]*> nop
++0000ab68 <[^>]*> nop
++0000ab6c <[^>]*> nop
++0000ab70 <[^>]*> nop
++0000ab74 <[^>]*> nop
++0000ab78 <[^>]*> nop
++0000ab7c <[^>]*> nop
++0000ab80 <[^>]*> nop
++0000ab84 <[^>]*> nop
++0000ab88 <[^>]*> nop
++0000ab8c <[^>]*> nop
++0000ab90 <[^>]*> nop
++0000ab94 <[^>]*> nop
++0000ab98 <[^>]*> nop
++0000ab9c <[^>]*> nop
++0000aba0 <[^>]*> nop
++0000aba4 <[^>]*> nop
++0000aba8 <[^>]*> nop
++0000abac <[^>]*> nop
++0000abb0 <[^>]*> nop
++0000abb4 <[^>]*> nop
++0000abb8 <[^>]*> nop
++0000abbc <[^>]*> nop
++0000abc0 <[^>]*> nop
++0000abc4 <[^>]*> nop
++0000abc8 <[^>]*> nop
++0000abcc <[^>]*> nop
++0000abd0 <[^>]*> nop
++0000abd4 <[^>]*> nop
++0000abd8 <[^>]*> nop
++0000abdc <[^>]*> nop
++0000abe0 <[^>]*> nop
++0000abe4 <[^>]*> nop
++0000abe8 <[^>]*> nop
++0000abec <[^>]*> nop
++0000abf0 <[^>]*> nop
++0000abf4 <[^>]*> nop
++0000abf8 <[^>]*> nop
++0000abfc <[^>]*> nop
++0000ac00 <[^>]*> nop
++0000ac04 <[^>]*> nop
++0000ac08 <[^>]*> nop
++0000ac0c <[^>]*> nop
++0000ac10 <[^>]*> nop
++0000ac14 <[^>]*> nop
++0000ac18 <[^>]*> nop
++0000ac1c <[^>]*> nop
++0000ac20 <[^>]*> nop
++0000ac24 <[^>]*> nop
++0000ac28 <[^>]*> nop
++0000ac2c <[^>]*> nop
++0000ac30 <[^>]*> nop
++0000ac34 <[^>]*> nop
++0000ac38 <[^>]*> nop
++0000ac3c <[^>]*> nop
++0000ac40 <[^>]*> nop
++0000ac44 <[^>]*> nop
++0000ac48 <[^>]*> nop
++0000ac4c <[^>]*> nop
++0000ac50 <[^>]*> nop
++0000ac54 <[^>]*> nop
++0000ac58 <[^>]*> nop
++0000ac5c <[^>]*> nop
++0000ac60 <[^>]*> nop
++0000ac64 <[^>]*> nop
++0000ac68 <[^>]*> nop
++0000ac6c <[^>]*> nop
++0000ac70 <[^>]*> nop
++0000ac74 <[^>]*> nop
++0000ac78 <[^>]*> nop
++0000ac7c <[^>]*> nop
++0000ac80 <[^>]*> nop
++0000ac84 <[^>]*> nop
++0000ac88 <[^>]*> nop
++0000ac8c <[^>]*> nop
++0000ac90 <[^>]*> nop
++0000ac94 <[^>]*> nop
++0000ac98 <[^>]*> nop
++0000ac9c <[^>]*> nop
++0000aca0 <[^>]*> nop
++0000aca4 <[^>]*> nop
++0000aca8 <[^>]*> nop
++0000acac <[^>]*> nop
++0000acb0 <[^>]*> nop
++0000acb4 <[^>]*> nop
++0000acb8 <[^>]*> nop
++0000acbc <[^>]*> nop
++0000acc0 <[^>]*> nop
++0000acc4 <[^>]*> nop
++0000acc8 <[^>]*> nop
++0000accc <[^>]*> nop
++0000acd0 <[^>]*> nop
++0000acd4 <[^>]*> nop
++0000acd8 <[^>]*> nop
++0000acdc <[^>]*> nop
++0000ace0 <[^>]*> nop
++0000ace4 <[^>]*> nop
++0000ace8 <[^>]*> nop
++0000acec <[^>]*> nop
++0000acf0 <[^>]*> nop
++0000acf4 <[^>]*> nop
++0000acf8 <[^>]*> nop
++0000acfc <[^>]*> nop
++0000ad00 <[^>]*> nop
++0000ad04 <[^>]*> nop
++0000ad08 <[^>]*> nop
++0000ad0c <[^>]*> nop
++0000ad10 <[^>]*> nop
++0000ad14 <[^>]*> nop
++0000ad18 <[^>]*> nop
++0000ad1c <[^>]*> nop
++0000ad20 <[^>]*> nop
++0000ad24 <[^>]*> nop
++0000ad28 <[^>]*> nop
++0000ad2c <[^>]*> nop
++0000ad30 <[^>]*> nop
++0000ad34 <[^>]*> nop
++0000ad38 <[^>]*> nop
++0000ad3c <[^>]*> nop
++0000ad40 <[^>]*> nop
++0000ad44 <[^>]*> nop
++0000ad48 <[^>]*> nop
++0000ad4c <[^>]*> nop
++0000ad50 <[^>]*> nop
++0000ad54 <[^>]*> nop
++0000ad58 <[^>]*> nop
++0000ad5c <[^>]*> nop
++0000ad60 <[^>]*> nop
++0000ad64 <[^>]*> nop
++0000ad68 <[^>]*> nop
++0000ad6c <[^>]*> nop
++0000ad70 <[^>]*> nop
++0000ad74 <[^>]*> nop
++0000ad78 <[^>]*> nop
++0000ad7c <[^>]*> nop
++0000ad80 <[^>]*> nop
++0000ad84 <[^>]*> nop
++0000ad88 <[^>]*> nop
++0000ad8c <[^>]*> nop
++0000ad90 <[^>]*> nop
++0000ad94 <[^>]*> nop
++0000ad98 <[^>]*> nop
++0000ad9c <[^>]*> nop
++0000ada0 <[^>]*> nop
++0000ada4 <[^>]*> nop
++0000ada8 <[^>]*> nop
++0000adac <[^>]*> nop
++0000adb0 <[^>]*> nop
++0000adb4 <[^>]*> nop
++0000adb8 <[^>]*> nop
++0000adbc <[^>]*> nop
++0000adc0 <[^>]*> nop
++0000adc4 <[^>]*> nop
++0000adc8 <[^>]*> nop
++0000adcc <[^>]*> nop
++0000add0 <[^>]*> nop
++0000add4 <[^>]*> nop
++0000add8 <[^>]*> nop
++0000addc <[^>]*> nop
++0000ade0 <[^>]*> nop
++0000ade4 <[^>]*> nop
++0000ade8 <[^>]*> nop
++0000adec <[^>]*> nop
++0000adf0 <[^>]*> nop
++0000adf4 <[^>]*> nop
++0000adf8 <[^>]*> nop
++0000adfc <[^>]*> nop
++0000ae00 <[^>]*> nop
++0000ae04 <[^>]*> nop
++0000ae08 <[^>]*> nop
++0000ae0c <[^>]*> nop
++0000ae10 <[^>]*> nop
++0000ae14 <[^>]*> nop
++0000ae18 <[^>]*> nop
++0000ae1c <[^>]*> nop
++0000ae20 <[^>]*> nop
++0000ae24 <[^>]*> nop
++0000ae28 <[^>]*> nop
++0000ae2c <[^>]*> nop
++0000ae30 <[^>]*> nop
++0000ae34 <[^>]*> nop
++0000ae38 <[^>]*> nop
++0000ae3c <[^>]*> nop
++0000ae40 <[^>]*> nop
++0000ae44 <[^>]*> nop
++0000ae48 <[^>]*> nop
++0000ae4c <[^>]*> nop
++0000ae50 <[^>]*> nop
++0000ae54 <[^>]*> nop
++0000ae58 <[^>]*> nop
++0000ae5c <[^>]*> nop
++0000ae60 <[^>]*> nop
++0000ae64 <[^>]*> nop
++0000ae68 <[^>]*> nop
++0000ae6c <[^>]*> nop
++0000ae70 <[^>]*> nop
++0000ae74 <[^>]*> nop
++0000ae78 <[^>]*> nop
++0000ae7c <[^>]*> nop
++0000ae80 <[^>]*> nop
++0000ae84 <[^>]*> nop
++0000ae88 <[^>]*> nop
++0000ae8c <[^>]*> nop
++0000ae90 <[^>]*> nop
++0000ae94 <[^>]*> nop
++0000ae98 <[^>]*> nop
++0000ae9c <[^>]*> nop
++0000aea0 <[^>]*> nop
++0000aea4 <[^>]*> nop
++0000aea8 <[^>]*> nop
++0000aeac <[^>]*> nop
++0000aeb0 <[^>]*> nop
++0000aeb4 <[^>]*> nop
++0000aeb8 <[^>]*> nop
++0000aebc <[^>]*> nop
++0000aec0 <[^>]*> nop
++0000aec4 <[^>]*> nop
++0000aec8 <[^>]*> nop
++0000aecc <[^>]*> nop
++0000aed0 <[^>]*> nop
++0000aed4 <[^>]*> nop
++0000aed8 <[^>]*> nop
++0000aedc <[^>]*> nop
++0000aee0 <[^>]*> nop
++0000aee4 <[^>]*> nop
++0000aee8 <[^>]*> nop
++0000aeec <[^>]*> nop
++0000aef0 <[^>]*> nop
++0000aef4 <[^>]*> nop
++0000aef8 <[^>]*> nop
++0000aefc <[^>]*> nop
++0000af00 <[^>]*> nop
++0000af04 <[^>]*> nop
++0000af08 <[^>]*> nop
++0000af0c <[^>]*> nop
++0000af10 <[^>]*> nop
++0000af14 <[^>]*> nop
++0000af18 <[^>]*> nop
++0000af1c <[^>]*> nop
++0000af20 <[^>]*> nop
++0000af24 <[^>]*> nop
++0000af28 <[^>]*> nop
++0000af2c <[^>]*> nop
++0000af30 <[^>]*> nop
++0000af34 <[^>]*> nop
++0000af38 <[^>]*> nop
++0000af3c <[^>]*> nop
++0000af40 <[^>]*> nop
++0000af44 <[^>]*> nop
++0000af48 <[^>]*> nop
++0000af4c <[^>]*> nop
++0000af50 <[^>]*> nop
++0000af54 <[^>]*> nop
++0000af58 <[^>]*> nop
++0000af5c <[^>]*> nop
++0000af60 <[^>]*> nop
++0000af64 <[^>]*> nop
++0000af68 <[^>]*> nop
++0000af6c <[^>]*> nop
++0000af70 <[^>]*> nop
++0000af74 <[^>]*> nop
++0000af78 <[^>]*> nop
++0000af7c <[^>]*> nop
++0000af80 <[^>]*> nop
++0000af84 <[^>]*> nop
++0000af88 <[^>]*> nop
++0000af8c <[^>]*> nop
++0000af90 <[^>]*> nop
++0000af94 <[^>]*> nop
++0000af98 <[^>]*> nop
++0000af9c <[^>]*> nop
++0000afa0 <[^>]*> nop
++0000afa4 <[^>]*> nop
++0000afa8 <[^>]*> nop
++0000afac <[^>]*> nop
++0000afb0 <[^>]*> nop
++0000afb4 <[^>]*> nop
++0000afb8 <[^>]*> nop
++0000afbc <[^>]*> nop
++0000afc0 <[^>]*> nop
++0000afc4 <[^>]*> nop
++0000afc8 <[^>]*> nop
++0000afcc <[^>]*> nop
++0000afd0 <[^>]*> nop
++0000afd4 <[^>]*> nop
++0000afd8 <[^>]*> nop
++0000afdc <[^>]*> nop
++0000afe0 <[^>]*> nop
++0000afe4 <[^>]*> nop
++0000afe8 <[^>]*> nop
++0000afec <[^>]*> nop
++0000aff0 <[^>]*> nop
++0000aff4 <[^>]*> nop
++0000aff8 <[^>]*> nop
++0000affc <[^>]*> nop
++0000b000 <[^>]*> nop
++0000b004 <[^>]*> nop
++0000b008 <[^>]*> nop
++0000b00c <[^>]*> nop
++0000b010 <[^>]*> nop
++0000b014 <[^>]*> nop
++0000b018 <[^>]*> nop
++0000b01c <[^>]*> nop
++0000b020 <[^>]*> nop
++0000b024 <[^>]*> nop
++0000b028 <[^>]*> nop
++0000b02c <[^>]*> nop
++0000b030 <[^>]*> nop
++0000b034 <[^>]*> nop
++0000b038 <[^>]*> nop
++0000b03c <[^>]*> nop
++0000b040 <[^>]*> nop
++0000b044 <[^>]*> nop
++0000b048 <[^>]*> nop
++0000b04c <[^>]*> nop
++0000b050 <[^>]*> nop
++0000b054 <[^>]*> nop
++0000b058 <[^>]*> nop
++0000b05c <[^>]*> nop
++0000b060 <[^>]*> nop
++0000b064 <[^>]*> nop
++0000b068 <[^>]*> nop
++0000b06c <[^>]*> nop
++0000b070 <[^>]*> nop
++0000b074 <[^>]*> nop
++0000b078 <[^>]*> nop
++0000b07c <[^>]*> nop
++0000b080 <[^>]*> nop
++0000b084 <[^>]*> nop
++0000b088 <[^>]*> nop
++0000b08c <[^>]*> nop
++0000b090 <[^>]*> nop
++0000b094 <[^>]*> nop
++0000b098 <[^>]*> nop
++0000b09c <[^>]*> nop
++0000b0a0 <[^>]*> nop
++0000b0a4 <[^>]*> nop
++0000b0a8 <[^>]*> nop
++0000b0ac <[^>]*> nop
++0000b0b0 <[^>]*> nop
++0000b0b4 <[^>]*> nop
++0000b0b8 <[^>]*> nop
++0000b0bc <[^>]*> nop
++0000b0c0 <[^>]*> nop
++0000b0c4 <[^>]*> nop
++0000b0c8 <[^>]*> nop
++0000b0cc <[^>]*> nop
++0000b0d0 <[^>]*> nop
++0000b0d4 <[^>]*> nop
++0000b0d8 <[^>]*> nop
++0000b0dc <[^>]*> nop
++0000b0e0 <[^>]*> nop
++0000b0e4 <[^>]*> nop
++0000b0e8 <[^>]*> nop
++0000b0ec <[^>]*> nop
++0000b0f0 <[^>]*> nop
++0000b0f4 <[^>]*> nop
++0000b0f8 <[^>]*> nop
++0000b0fc <[^>]*> nop
++0000b100 <[^>]*> nop
++0000b104 <[^>]*> nop
++0000b108 <[^>]*> nop
++0000b10c <[^>]*> nop
++0000b110 <[^>]*> nop
++0000b114 <[^>]*> nop
++0000b118 <[^>]*> nop
++0000b11c <[^>]*> nop
++0000b120 <[^>]*> nop
++0000b124 <[^>]*> nop
++0000b128 <[^>]*> nop
++0000b12c <[^>]*> nop
++0000b130 <[^>]*> nop
++0000b134 <[^>]*> nop
++0000b138 <[^>]*> nop
++0000b13c <[^>]*> nop
++0000b140 <[^>]*> nop
++0000b144 <[^>]*> nop
++0000b148 <[^>]*> nop
++0000b14c <[^>]*> nop
++0000b150 <[^>]*> nop
++0000b154 <[^>]*> nop
++0000b158 <[^>]*> nop
++0000b15c <[^>]*> nop
++0000b160 <[^>]*> nop
++0000b164 <[^>]*> nop
++0000b168 <[^>]*> nop
++0000b16c <[^>]*> nop
++0000b170 <[^>]*> nop
++0000b174 <[^>]*> nop
++0000b178 <[^>]*> nop
++0000b17c <[^>]*> nop
++0000b180 <[^>]*> nop
++0000b184 <[^>]*> nop
++0000b188 <[^>]*> nop
++0000b18c <[^>]*> nop
++0000b190 <[^>]*> nop
++0000b194 <[^>]*> nop
++0000b198 <[^>]*> nop
++0000b19c <[^>]*> nop
++0000b1a0 <[^>]*> nop
++0000b1a4 <[^>]*> nop
++0000b1a8 <[^>]*> nop
++0000b1ac <[^>]*> nop
++0000b1b0 <[^>]*> nop
++0000b1b4 <[^>]*> nop
++0000b1b8 <[^>]*> nop
++0000b1bc <[^>]*> nop
++0000b1c0 <[^>]*> nop
++0000b1c4 <[^>]*> nop
++0000b1c8 <[^>]*> nop
++0000b1cc <[^>]*> nop
++0000b1d0 <[^>]*> nop
++0000b1d4 <[^>]*> nop
++0000b1d8 <[^>]*> nop
++0000b1dc <[^>]*> nop
++0000b1e0 <[^>]*> nop
++0000b1e4 <[^>]*> nop
++0000b1e8 <[^>]*> nop
++0000b1ec <[^>]*> nop
++0000b1f0 <[^>]*> nop
++0000b1f4 <[^>]*> nop
++0000b1f8 <[^>]*> nop
++0000b1fc <[^>]*> nop
++0000b200 <[^>]*> nop
++0000b204 <[^>]*> nop
++0000b208 <[^>]*> nop
++0000b20c <[^>]*> nop
++0000b210 <[^>]*> nop
++0000b214 <[^>]*> nop
++0000b218 <[^>]*> nop
++0000b21c <[^>]*> nop
++0000b220 <[^>]*> nop
++0000b224 <[^>]*> nop
++0000b228 <[^>]*> nop
++0000b22c <[^>]*> nop
++0000b230 <[^>]*> nop
++0000b234 <[^>]*> nop
++0000b238 <[^>]*> nop
++0000b23c <[^>]*> nop
++0000b240 <[^>]*> nop
++0000b244 <[^>]*> nop
++0000b248 <[^>]*> nop
++0000b24c <[^>]*> nop
++0000b250 <[^>]*> nop
++0000b254 <[^>]*> nop
++0000b258 <[^>]*> nop
++0000b25c <[^>]*> nop
++0000b260 <[^>]*> nop
++0000b264 <[^>]*> nop
++0000b268 <[^>]*> nop
++0000b26c <[^>]*> nop
++0000b270 <[^>]*> nop
++0000b274 <[^>]*> nop
++0000b278 <[^>]*> nop
++0000b27c <[^>]*> nop
++0000b280 <[^>]*> nop
++0000b284 <[^>]*> nop
++0000b288 <[^>]*> nop
++0000b28c <[^>]*> nop
++0000b290 <[^>]*> nop
++0000b294 <[^>]*> nop
++0000b298 <[^>]*> nop
++0000b29c <[^>]*> nop
++0000b2a0 <[^>]*> nop
++0000b2a4 <[^>]*> nop
++0000b2a8 <[^>]*> nop
++0000b2ac <[^>]*> nop
++0000b2b0 <[^>]*> nop
++0000b2b4 <[^>]*> nop
++0000b2b8 <[^>]*> nop
++0000b2bc <[^>]*> nop
++0000b2c0 <[^>]*> nop
++0000b2c4 <[^>]*> nop
++0000b2c8 <[^>]*> nop
++0000b2cc <[^>]*> nop
++0000b2d0 <[^>]*> nop
++0000b2d4 <[^>]*> nop
++0000b2d8 <[^>]*> nop
++0000b2dc <[^>]*> nop
++0000b2e0 <[^>]*> nop
++0000b2e4 <[^>]*> nop
++0000b2e8 <[^>]*> nop
++0000b2ec <[^>]*> nop
++0000b2f0 <[^>]*> nop
++0000b2f4 <[^>]*> nop
++0000b2f8 <[^>]*> nop
++0000b2fc <[^>]*> nop
++0000b300 <[^>]*> nop
++0000b304 <[^>]*> nop
++0000b308 <[^>]*> nop
++0000b30c <[^>]*> nop
++0000b310 <[^>]*> nop
++0000b314 <[^>]*> nop
++0000b318 <[^>]*> nop
++0000b31c <[^>]*> nop
++0000b320 <[^>]*> nop
++0000b324 <[^>]*> nop
++0000b328 <[^>]*> nop
++0000b32c <[^>]*> nop
++0000b330 <[^>]*> nop
++0000b334 <[^>]*> nop
++0000b338 <[^>]*> nop
++0000b33c <[^>]*> nop
++0000b340 <[^>]*> nop
++0000b344 <[^>]*> nop
++0000b348 <[^>]*> nop
++0000b34c <[^>]*> nop
++0000b350 <[^>]*> nop
++0000b354 <[^>]*> nop
++0000b358 <[^>]*> nop
++0000b35c <[^>]*> nop
++0000b360 <[^>]*> nop
++0000b364 <[^>]*> nop
++0000b368 <[^>]*> nop
++0000b36c <[^>]*> nop
++0000b370 <[^>]*> nop
++0000b374 <[^>]*> nop
++0000b378 <[^>]*> nop
++0000b37c <[^>]*> nop
++0000b380 <[^>]*> nop
++0000b384 <[^>]*> nop
++0000b388 <[^>]*> nop
++0000b38c <[^>]*> nop
++0000b390 <[^>]*> nop
++0000b394 <[^>]*> nop
++0000b398 <[^>]*> nop
++0000b39c <[^>]*> nop
++0000b3a0 <[^>]*> nop
++0000b3a4 <[^>]*> nop
++0000b3a8 <[^>]*> nop
++0000b3ac <[^>]*> nop
++0000b3b0 <[^>]*> nop
++0000b3b4 <[^>]*> nop
++0000b3b8 <[^>]*> nop
++0000b3bc <[^>]*> nop
++0000b3c0 <[^>]*> nop
++0000b3c4 <[^>]*> nop
++0000b3c8 <[^>]*> nop
++0000b3cc <[^>]*> nop
++0000b3d0 <[^>]*> nop
++0000b3d4 <[^>]*> nop
++0000b3d8 <[^>]*> nop
++0000b3dc <[^>]*> nop
++0000b3e0 <[^>]*> nop
++0000b3e4 <[^>]*> nop
++0000b3e8 <[^>]*> nop
++0000b3ec <[^>]*> nop
++0000b3f0 <[^>]*> nop
++0000b3f4 <[^>]*> nop
++0000b3f8 <[^>]*> nop
++0000b3fc <[^>]*> nop
++0000b400 <[^>]*> nop
++0000b404 <[^>]*> nop
++0000b408 <[^>]*> nop
++0000b40c <[^>]*> nop
++0000b410 <[^>]*> nop
++0000b414 <[^>]*> nop
++0000b418 <[^>]*> nop
++0000b41c <[^>]*> nop
++0000b420 <[^>]*> nop
++0000b424 <[^>]*> nop
++0000b428 <[^>]*> nop
++0000b42c <[^>]*> nop
++0000b430 <[^>]*> nop
++0000b434 <[^>]*> nop
++0000b438 <[^>]*> nop
++0000b43c <[^>]*> nop
++0000b440 <[^>]*> nop
++0000b444 <[^>]*> nop
++0000b448 <[^>]*> nop
++0000b44c <[^>]*> nop
++0000b450 <[^>]*> nop
++0000b454 <[^>]*> nop
++0000b458 <[^>]*> nop
++0000b45c <[^>]*> nop
++0000b460 <[^>]*> nop
++0000b464 <[^>]*> nop
++0000b468 <[^>]*> nop
++0000b46c <[^>]*> nop
++0000b470 <[^>]*> nop
++0000b474 <[^>]*> nop
++0000b478 <[^>]*> nop
++0000b47c <[^>]*> nop
++0000b480 <[^>]*> nop
++0000b484 <[^>]*> nop
++0000b488 <[^>]*> nop
++0000b48c <[^>]*> nop
++0000b490 <[^>]*> nop
++0000b494 <[^>]*> nop
++0000b498 <[^>]*> nop
++0000b49c <[^>]*> nop
++0000b4a0 <[^>]*> nop
++0000b4a4 <[^>]*> nop
++0000b4a8 <[^>]*> nop
++0000b4ac <[^>]*> nop
++0000b4b0 <[^>]*> nop
++0000b4b4 <[^>]*> nop
++0000b4b8 <[^>]*> nop
++0000b4bc <[^>]*> nop
++0000b4c0 <[^>]*> nop
++0000b4c4 <[^>]*> nop
++0000b4c8 <[^>]*> nop
++0000b4cc <[^>]*> nop
++0000b4d0 <[^>]*> nop
++0000b4d4 <[^>]*> nop
++0000b4d8 <[^>]*> nop
++0000b4dc <[^>]*> nop
++0000b4e0 <[^>]*> nop
++0000b4e4 <[^>]*> nop
++0000b4e8 <[^>]*> nop
++0000b4ec <[^>]*> nop
++0000b4f0 <[^>]*> nop
++0000b4f4 <[^>]*> nop
++0000b4f8 <[^>]*> nop
++0000b4fc <[^>]*> nop
++0000b500 <[^>]*> nop
++0000b504 <[^>]*> nop
++0000b508 <[^>]*> nop
++0000b50c <[^>]*> nop
++0000b510 <[^>]*> nop
++0000b514 <[^>]*> nop
++0000b518 <[^>]*> nop
++0000b51c <[^>]*> nop
++0000b520 <[^>]*> nop
++0000b524 <[^>]*> nop
++0000b528 <[^>]*> nop
++0000b52c <[^>]*> nop
++0000b530 <[^>]*> nop
++0000b534 <[^>]*> nop
++0000b538 <[^>]*> nop
++0000b53c <[^>]*> nop
++0000b540 <[^>]*> nop
++0000b544 <[^>]*> nop
++0000b548 <[^>]*> nop
++0000b54c <[^>]*> nop
++0000b550 <[^>]*> nop
++0000b554 <[^>]*> nop
++0000b558 <[^>]*> nop
++0000b55c <[^>]*> nop
++0000b560 <[^>]*> nop
++0000b564 <[^>]*> nop
++0000b568 <[^>]*> nop
++0000b56c <[^>]*> nop
++0000b570 <[^>]*> nop
++0000b574 <[^>]*> nop
++0000b578 <[^>]*> nop
++0000b57c <[^>]*> nop
++0000b580 <[^>]*> nop
++0000b584 <[^>]*> nop
++0000b588 <[^>]*> nop
++0000b58c <[^>]*> nop
++0000b590 <[^>]*> nop
++0000b594 <[^>]*> nop
++0000b598 <[^>]*> nop
++0000b59c <[^>]*> nop
++0000b5a0 <[^>]*> nop
++0000b5a4 <[^>]*> nop
++0000b5a8 <[^>]*> nop
++0000b5ac <[^>]*> nop
++0000b5b0 <[^>]*> nop
++0000b5b4 <[^>]*> nop
++0000b5b8 <[^>]*> nop
++0000b5bc <[^>]*> nop
++0000b5c0 <[^>]*> nop
++0000b5c4 <[^>]*> nop
++0000b5c8 <[^>]*> nop
++0000b5cc <[^>]*> nop
++0000b5d0 <[^>]*> nop
++0000b5d4 <[^>]*> nop
++0000b5d8 <[^>]*> nop
++0000b5dc <[^>]*> nop
++0000b5e0 <[^>]*> nop
++0000b5e4 <[^>]*> nop
++0000b5e8 <[^>]*> nop
++0000b5ec <[^>]*> nop
++0000b5f0 <[^>]*> nop
++0000b5f4 <[^>]*> nop
++0000b5f8 <[^>]*> nop
++0000b5fc <[^>]*> nop
++0000b600 <[^>]*> nop
++0000b604 <[^>]*> nop
++0000b608 <[^>]*> nop
++0000b60c <[^>]*> nop
++0000b610 <[^>]*> nop
++0000b614 <[^>]*> nop
++0000b618 <[^>]*> nop
++0000b61c <[^>]*> nop
++0000b620 <[^>]*> nop
++0000b624 <[^>]*> nop
++0000b628 <[^>]*> nop
++0000b62c <[^>]*> nop
++0000b630 <[^>]*> nop
++0000b634 <[^>]*> nop
++0000b638 <[^>]*> nop
++0000b63c <[^>]*> nop
++0000b640 <[^>]*> nop
++0000b644 <[^>]*> nop
++0000b648 <[^>]*> nop
++0000b64c <[^>]*> nop
++0000b650 <[^>]*> nop
++0000b654 <[^>]*> nop
++0000b658 <[^>]*> nop
++0000b65c <[^>]*> nop
++0000b660 <[^>]*> nop
++0000b664 <[^>]*> nop
++0000b668 <[^>]*> nop
++0000b66c <[^>]*> nop
++0000b670 <[^>]*> nop
++0000b674 <[^>]*> nop
++0000b678 <[^>]*> nop
++0000b67c <[^>]*> nop
++0000b680 <[^>]*> nop
++0000b684 <[^>]*> nop
++0000b688 <[^>]*> nop
++0000b68c <[^>]*> nop
++0000b690 <[^>]*> nop
++0000b694 <[^>]*> nop
++0000b698 <[^>]*> nop
++0000b69c <[^>]*> nop
++0000b6a0 <[^>]*> nop
++0000b6a4 <[^>]*> nop
++0000b6a8 <[^>]*> nop
++0000b6ac <[^>]*> nop
++0000b6b0 <[^>]*> nop
++0000b6b4 <[^>]*> nop
++0000b6b8 <[^>]*> nop
++0000b6bc <[^>]*> nop
++0000b6c0 <[^>]*> nop
++0000b6c4 <[^>]*> nop
++0000b6c8 <[^>]*> nop
++0000b6cc <[^>]*> nop
++0000b6d0 <[^>]*> nop
++0000b6d4 <[^>]*> nop
++0000b6d8 <[^>]*> nop
++0000b6dc <[^>]*> nop
++0000b6e0 <[^>]*> nop
++0000b6e4 <[^>]*> nop
++0000b6e8 <[^>]*> nop
++0000b6ec <[^>]*> nop
++0000b6f0 <[^>]*> nop
++0000b6f4 <[^>]*> nop
++0000b6f8 <[^>]*> nop
++0000b6fc <[^>]*> nop
++0000b700 <[^>]*> nop
++0000b704 <[^>]*> nop
++0000b708 <[^>]*> nop
++0000b70c <[^>]*> nop
++0000b710 <[^>]*> nop
++0000b714 <[^>]*> nop
++0000b718 <[^>]*> nop
++0000b71c <[^>]*> nop
++0000b720 <[^>]*> nop
++0000b724 <[^>]*> nop
++0000b728 <[^>]*> nop
++0000b72c <[^>]*> nop
++0000b730 <[^>]*> nop
++0000b734 <[^>]*> nop
++0000b738 <[^>]*> nop
++0000b73c <[^>]*> nop
++0000b740 <[^>]*> nop
++0000b744 <[^>]*> nop
++0000b748 <[^>]*> nop
++0000b74c <[^>]*> nop
++0000b750 <[^>]*> nop
++0000b754 <[^>]*> nop
++0000b758 <[^>]*> nop
++0000b75c <[^>]*> nop
++0000b760 <[^>]*> nop
++0000b764 <[^>]*> nop
++0000b768 <[^>]*> nop
++0000b76c <[^>]*> nop
++0000b770 <[^>]*> nop
++0000b774 <[^>]*> nop
++0000b778 <[^>]*> nop
++0000b77c <[^>]*> nop
++0000b780 <[^>]*> nop
++0000b784 <[^>]*> nop
++0000b788 <[^>]*> nop
++0000b78c <[^>]*> nop
++0000b790 <[^>]*> nop
++0000b794 <[^>]*> nop
++0000b798 <[^>]*> nop
++0000b79c <[^>]*> nop
++0000b7a0 <[^>]*> nop
++0000b7a4 <[^>]*> nop
++0000b7a8 <[^>]*> nop
++0000b7ac <[^>]*> nop
++0000b7b0 <[^>]*> nop
++0000b7b4 <[^>]*> nop
++0000b7b8 <[^>]*> nop
++0000b7bc <[^>]*> nop
++0000b7c0 <[^>]*> nop
++0000b7c4 <[^>]*> nop
++0000b7c8 <[^>]*> nop
++0000b7cc <[^>]*> nop
++0000b7d0 <[^>]*> nop
++0000b7d4 <[^>]*> nop
++0000b7d8 <[^>]*> nop
++0000b7dc <[^>]*> nop
++0000b7e0 <[^>]*> nop
++0000b7e4 <[^>]*> nop
++0000b7e8 <[^>]*> nop
++0000b7ec <[^>]*> nop
++0000b7f0 <[^>]*> nop
++0000b7f4 <[^>]*> nop
++0000b7f8 <[^>]*> nop
++0000b7fc <[^>]*> nop
++0000b800 <[^>]*> nop
++0000b804 <[^>]*> nop
++0000b808 <[^>]*> nop
++0000b80c <[^>]*> nop
++0000b810 <[^>]*> nop
++0000b814 <[^>]*> nop
++0000b818 <[^>]*> nop
++0000b81c <[^>]*> nop
++0000b820 <[^>]*> nop
++0000b824 <[^>]*> nop
++0000b828 <[^>]*> nop
++0000b82c <[^>]*> nop
++0000b830 <[^>]*> nop
++0000b834 <[^>]*> nop
++0000b838 <[^>]*> nop
++0000b83c <[^>]*> nop
++0000b840 <[^>]*> nop
++0000b844 <[^>]*> nop
++0000b848 <[^>]*> nop
++0000b84c <[^>]*> nop
++0000b850 <[^>]*> nop
++0000b854 <[^>]*> nop
++0000b858 <[^>]*> nop
++0000b85c <[^>]*> nop
++0000b860 <[^>]*> nop
++0000b864 <[^>]*> nop
++0000b868 <[^>]*> nop
++0000b86c <[^>]*> nop
++0000b870 <[^>]*> nop
++0000b874 <[^>]*> nop
++0000b878 <[^>]*> nop
++0000b87c <[^>]*> nop
++0000b880 <[^>]*> nop
++0000b884 <[^>]*> nop
++0000b888 <[^>]*> nop
++0000b88c <[^>]*> nop
++0000b890 <[^>]*> nop
++0000b894 <[^>]*> nop
++0000b898 <[^>]*> nop
++0000b89c <[^>]*> nop
++0000b8a0 <[^>]*> nop
++0000b8a4 <[^>]*> nop
++0000b8a8 <[^>]*> nop
++0000b8ac <[^>]*> nop
++0000b8b0 <[^>]*> nop
++0000b8b4 <[^>]*> nop
++0000b8b8 <[^>]*> nop
++0000b8bc <[^>]*> nop
++0000b8c0 <[^>]*> nop
++0000b8c4 <[^>]*> nop
++0000b8c8 <[^>]*> nop
++0000b8cc <[^>]*> nop
++0000b8d0 <[^>]*> nop
++0000b8d4 <[^>]*> nop
++0000b8d8 <[^>]*> nop
++0000b8dc <[^>]*> nop
++0000b8e0 <[^>]*> nop
++0000b8e4 <[^>]*> nop
++0000b8e8 <[^>]*> nop
++0000b8ec <[^>]*> nop
++0000b8f0 <[^>]*> nop
++0000b8f4 <[^>]*> nop
++0000b8f8 <[^>]*> nop
++0000b8fc <[^>]*> nop
++0000b900 <[^>]*> nop
++0000b904 <[^>]*> nop
++0000b908 <[^>]*> nop
++0000b90c <[^>]*> nop
++0000b910 <[^>]*> nop
++0000b914 <[^>]*> nop
++0000b918 <[^>]*> nop
++0000b91c <[^>]*> nop
++0000b920 <[^>]*> nop
++0000b924 <[^>]*> nop
++0000b928 <[^>]*> nop
++0000b92c <[^>]*> nop
++0000b930 <[^>]*> nop
++0000b934 <[^>]*> nop
++0000b938 <[^>]*> nop
++0000b93c <[^>]*> nop
++0000b940 <[^>]*> nop
++0000b944 <[^>]*> nop
++0000b948 <[^>]*> nop
++0000b94c <[^>]*> nop
++0000b950 <[^>]*> nop
++0000b954 <[^>]*> nop
++0000b958 <[^>]*> nop
++0000b95c <[^>]*> nop
++0000b960 <[^>]*> nop
++0000b964 <[^>]*> nop
++0000b968 <[^>]*> nop
++0000b96c <[^>]*> nop
++0000b970 <[^>]*> nop
++0000b974 <[^>]*> nop
++0000b978 <[^>]*> nop
++0000b97c <[^>]*> nop
++0000b980 <[^>]*> nop
++0000b984 <[^>]*> nop
++0000b988 <[^>]*> nop
++0000b98c <[^>]*> nop
++0000b990 <[^>]*> nop
++0000b994 <[^>]*> nop
++0000b998 <[^>]*> nop
++0000b99c <[^>]*> nop
++0000b9a0 <[^>]*> nop
++0000b9a4 <[^>]*> nop
++0000b9a8 <[^>]*> nop
++0000b9ac <[^>]*> nop
++0000b9b0 <[^>]*> nop
++0000b9b4 <[^>]*> nop
++0000b9b8 <[^>]*> nop
++0000b9bc <[^>]*> nop
++0000b9c0 <[^>]*> nop
++0000b9c4 <[^>]*> nop
++0000b9c8 <[^>]*> nop
++0000b9cc <[^>]*> nop
++0000b9d0 <[^>]*> nop
++0000b9d4 <[^>]*> nop
++0000b9d8 <[^>]*> nop
++0000b9dc <[^>]*> nop
++0000b9e0 <[^>]*> nop
++0000b9e4 <[^>]*> nop
++0000b9e8 <[^>]*> nop
++0000b9ec <[^>]*> nop
++0000b9f0 <[^>]*> nop
++0000b9f4 <[^>]*> nop
++0000b9f8 <[^>]*> nop
++0000b9fc <[^>]*> nop
++0000ba00 <[^>]*> nop
++0000ba04 <[^>]*> nop
++0000ba08 <[^>]*> nop
++0000ba0c <[^>]*> nop
++0000ba10 <[^>]*> nop
++0000ba14 <[^>]*> nop
++0000ba18 <[^>]*> nop
++0000ba1c <[^>]*> nop
++0000ba20 <[^>]*> nop
++0000ba24 <[^>]*> nop
++0000ba28 <[^>]*> nop
++0000ba2c <[^>]*> nop
++0000ba30 <[^>]*> nop
++0000ba34 <[^>]*> nop
++0000ba38 <[^>]*> nop
++0000ba3c <[^>]*> nop
++0000ba40 <[^>]*> nop
++0000ba44 <[^>]*> nop
++0000ba48 <[^>]*> nop
++0000ba4c <[^>]*> nop
++0000ba50 <[^>]*> nop
++0000ba54 <[^>]*> nop
++0000ba58 <[^>]*> nop
++0000ba5c <[^>]*> nop
++0000ba60 <[^>]*> nop
++0000ba64 <[^>]*> nop
++0000ba68 <[^>]*> nop
++0000ba6c <[^>]*> nop
++0000ba70 <[^>]*> nop
++0000ba74 <[^>]*> nop
++0000ba78 <[^>]*> nop
++0000ba7c <[^>]*> nop
++0000ba80 <[^>]*> nop
++0000ba84 <[^>]*> nop
++0000ba88 <[^>]*> nop
++0000ba8c <[^>]*> nop
++0000ba90 <[^>]*> nop
++0000ba94 <[^>]*> nop
++0000ba98 <[^>]*> nop
++0000ba9c <[^>]*> nop
++0000baa0 <[^>]*> nop
++0000baa4 <[^>]*> nop
++0000baa8 <[^>]*> nop
++0000baac <[^>]*> nop
++0000bab0 <[^>]*> nop
++0000bab4 <[^>]*> nop
++0000bab8 <[^>]*> nop
++0000babc <[^>]*> nop
++0000bac0 <[^>]*> nop
++0000bac4 <[^>]*> nop
++0000bac8 <[^>]*> nop
++0000bacc <[^>]*> nop
++0000bad0 <[^>]*> nop
++0000bad4 <[^>]*> nop
++0000bad8 <[^>]*> nop
++0000badc <[^>]*> nop
++0000bae0 <[^>]*> nop
++0000bae4 <[^>]*> nop
++0000bae8 <[^>]*> nop
++0000baec <[^>]*> nop
++0000baf0 <[^>]*> nop
++0000baf4 <[^>]*> nop
++0000baf8 <[^>]*> nop
++0000bafc <[^>]*> nop
++0000bb00 <[^>]*> nop
++0000bb04 <[^>]*> nop
++0000bb08 <[^>]*> nop
++0000bb0c <[^>]*> nop
++0000bb10 <[^>]*> nop
++0000bb14 <[^>]*> nop
++0000bb18 <[^>]*> nop
++0000bb1c <[^>]*> nop
++0000bb20 <[^>]*> nop
++0000bb24 <[^>]*> nop
++0000bb28 <[^>]*> nop
++0000bb2c <[^>]*> nop
++0000bb30 <[^>]*> nop
++0000bb34 <[^>]*> nop
++0000bb38 <[^>]*> nop
++0000bb3c <[^>]*> nop
++0000bb40 <[^>]*> nop
++0000bb44 <[^>]*> nop
++0000bb48 <[^>]*> nop
++0000bb4c <[^>]*> nop
++0000bb50 <[^>]*> nop
++0000bb54 <[^>]*> nop
++0000bb58 <[^>]*> nop
++0000bb5c <[^>]*> nop
++0000bb60 <[^>]*> nop
++0000bb64 <[^>]*> nop
++0000bb68 <[^>]*> nop
++0000bb6c <[^>]*> nop
++0000bb70 <[^>]*> nop
++0000bb74 <[^>]*> nop
++0000bb78 <[^>]*> nop
++0000bb7c <[^>]*> nop
++0000bb80 <[^>]*> nop
++0000bb84 <[^>]*> nop
++0000bb88 <[^>]*> nop
++0000bb8c <[^>]*> nop
++0000bb90 <[^>]*> nop
++0000bb94 <[^>]*> nop
++0000bb98 <[^>]*> nop
++0000bb9c <[^>]*> nop
++0000bba0 <[^>]*> nop
++0000bba4 <[^>]*> nop
++0000bba8 <[^>]*> nop
++0000bbac <[^>]*> nop
++0000bbb0 <[^>]*> nop
++0000bbb4 <[^>]*> nop
++0000bbb8 <[^>]*> nop
++0000bbbc <[^>]*> nop
++0000bbc0 <[^>]*> nop
++0000bbc4 <[^>]*> nop
++0000bbc8 <[^>]*> nop
++0000bbcc <[^>]*> nop
++0000bbd0 <[^>]*> nop
++0000bbd4 <[^>]*> nop
++0000bbd8 <[^>]*> nop
++0000bbdc <[^>]*> nop
++0000bbe0 <[^>]*> nop
++0000bbe4 <[^>]*> nop
++0000bbe8 <[^>]*> nop
++0000bbec <[^>]*> nop
++0000bbf0 <[^>]*> nop
++0000bbf4 <[^>]*> nop
++0000bbf8 <[^>]*> nop
++0000bbfc <[^>]*> nop
++0000bc00 <[^>]*> nop
++0000bc04 <[^>]*> nop
++0000bc08 <[^>]*> nop
++0000bc0c <[^>]*> nop
++0000bc10 <[^>]*> nop
++0000bc14 <[^>]*> nop
++0000bc18 <[^>]*> nop
++0000bc1c <[^>]*> nop
++0000bc20 <[^>]*> nop
++0000bc24 <[^>]*> nop
++0000bc28 <[^>]*> nop
++0000bc2c <[^>]*> nop
++0000bc30 <[^>]*> nop
++0000bc34 <[^>]*> nop
++0000bc38 <[^>]*> nop
++0000bc3c <[^>]*> nop
++0000bc40 <[^>]*> nop
++0000bc44 <[^>]*> nop
++0000bc48 <[^>]*> nop
++0000bc4c <[^>]*> nop
++0000bc50 <[^>]*> nop
++0000bc54 <[^>]*> nop
++0000bc58 <[^>]*> nop
++0000bc5c <[^>]*> nop
++0000bc60 <[^>]*> nop
++0000bc64 <[^>]*> nop
++0000bc68 <[^>]*> nop
++0000bc6c <[^>]*> nop
++0000bc70 <[^>]*> nop
++0000bc74 <[^>]*> nop
++0000bc78 <[^>]*> nop
++0000bc7c <[^>]*> nop
++0000bc80 <[^>]*> nop
++0000bc84 <[^>]*> nop
++0000bc88 <[^>]*> nop
++0000bc8c <[^>]*> nop
++0000bc90 <[^>]*> nop
++0000bc94 <[^>]*> nop
++0000bc98 <[^>]*> nop
++0000bc9c <[^>]*> nop
++0000bca0 <[^>]*> nop
++0000bca4 <[^>]*> nop
++0000bca8 <[^>]*> nop
++0000bcac <[^>]*> nop
++0000bcb0 <[^>]*> nop
++0000bcb4 <[^>]*> nop
++0000bcb8 <[^>]*> nop
++0000bcbc <[^>]*> nop
++0000bcc0 <[^>]*> nop
++0000bcc4 <[^>]*> nop
++0000bcc8 <[^>]*> nop
++0000bccc <[^>]*> nop
++0000bcd0 <[^>]*> nop
++0000bcd4 <[^>]*> nop
++0000bcd8 <[^>]*> nop
++0000bcdc <[^>]*> nop
++0000bce0 <[^>]*> nop
++0000bce4 <[^>]*> nop
++0000bce8 <[^>]*> nop
++0000bcec <[^>]*> nop
++0000bcf0 <[^>]*> nop
++0000bcf4 <[^>]*> nop
++0000bcf8 <[^>]*> nop
++0000bcfc <[^>]*> nop
++0000bd00 <[^>]*> nop
++0000bd04 <[^>]*> nop
++0000bd08 <[^>]*> nop
++0000bd0c <[^>]*> nop
++0000bd10 <[^>]*> nop
++0000bd14 <[^>]*> nop
++0000bd18 <[^>]*> nop
++0000bd1c <[^>]*> nop
++0000bd20 <[^>]*> nop
++0000bd24 <[^>]*> nop
++0000bd28 <[^>]*> nop
++0000bd2c <[^>]*> nop
++0000bd30 <[^>]*> nop
++0000bd34 <[^>]*> nop
++0000bd38 <[^>]*> nop
++0000bd3c <[^>]*> nop
++0000bd40 <[^>]*> nop
++0000bd44 <[^>]*> nop
++0000bd48 <[^>]*> nop
++0000bd4c <[^>]*> nop
++0000bd50 <[^>]*> nop
++0000bd54 <[^>]*> nop
++0000bd58 <[^>]*> nop
++0000bd5c <[^>]*> nop
++0000bd60 <[^>]*> nop
++0000bd64 <[^>]*> nop
++0000bd68 <[^>]*> nop
++0000bd6c <[^>]*> nop
++0000bd70 <[^>]*> nop
++0000bd74 <[^>]*> nop
++0000bd78 <[^>]*> nop
++0000bd7c <[^>]*> nop
++0000bd80 <[^>]*> nop
++0000bd84 <[^>]*> nop
++0000bd88 <[^>]*> nop
++0000bd8c <[^>]*> nop
++0000bd90 <[^>]*> nop
++0000bd94 <[^>]*> nop
++0000bd98 <[^>]*> nop
++0000bd9c <[^>]*> nop
++0000bda0 <[^>]*> nop
++0000bda4 <[^>]*> nop
++0000bda8 <[^>]*> nop
++0000bdac <[^>]*> nop
++0000bdb0 <[^>]*> nop
++0000bdb4 <[^>]*> nop
++0000bdb8 <[^>]*> nop
++0000bdbc <[^>]*> nop
++0000bdc0 <[^>]*> nop
++0000bdc4 <[^>]*> nop
++0000bdc8 <[^>]*> nop
++0000bdcc <[^>]*> nop
++0000bdd0 <[^>]*> nop
++0000bdd4 <[^>]*> nop
++0000bdd8 <[^>]*> nop
++0000bddc <[^>]*> nop
++0000bde0 <[^>]*> nop
++0000bde4 <[^>]*> nop
++0000bde8 <[^>]*> nop
++0000bdec <[^>]*> nop
++0000bdf0 <[^>]*> nop
++0000bdf4 <[^>]*> nop
++0000bdf8 <[^>]*> nop
++0000bdfc <[^>]*> nop
++0000be00 <[^>]*> nop
++0000be04 <[^>]*> nop
++0000be08 <[^>]*> nop
++0000be0c <[^>]*> nop
++0000be10 <[^>]*> nop
++0000be14 <[^>]*> nop
++0000be18 <[^>]*> nop
++0000be1c <[^>]*> nop
++0000be20 <[^>]*> nop
++0000be24 <[^>]*> nop
++0000be28 <[^>]*> nop
++0000be2c <[^>]*> nop
++0000be30 <[^>]*> nop
++0000be34 <[^>]*> nop
++0000be38 <[^>]*> nop
++0000be3c <[^>]*> nop
++0000be40 <[^>]*> nop
++0000be44 <[^>]*> nop
++0000be48 <[^>]*> nop
++0000be4c <[^>]*> nop
++0000be50 <[^>]*> nop
++0000be54 <[^>]*> nop
++0000be58 <[^>]*> nop
++0000be5c <[^>]*> nop
++0000be60 <[^>]*> nop
++0000be64 <[^>]*> nop
++0000be68 <[^>]*> nop
++0000be6c <[^>]*> nop
++0000be70 <[^>]*> nop
++0000be74 <[^>]*> nop
++0000be78 <[^>]*> nop
++0000be7c <[^>]*> nop
++0000be80 <[^>]*> nop
++0000be84 <[^>]*> nop
++0000be88 <[^>]*> nop
++0000be8c <[^>]*> nop
++0000be90 <[^>]*> nop
++0000be94 <[^>]*> nop
++0000be98 <[^>]*> nop
++0000be9c <[^>]*> nop
++0000bea0 <[^>]*> nop
++0000bea4 <[^>]*> nop
++0000bea8 <[^>]*> nop
++0000beac <[^>]*> nop
++0000beb0 <[^>]*> nop
++0000beb4 <[^>]*> nop
++0000beb8 <[^>]*> nop
++0000bebc <[^>]*> nop
++0000bec0 <[^>]*> nop
++0000bec4 <[^>]*> nop
++0000bec8 <[^>]*> nop
++0000becc <[^>]*> nop
++0000bed0 <[^>]*> nop
++0000bed4 <[^>]*> nop
++0000bed8 <[^>]*> nop
++0000bedc <[^>]*> nop
++0000bee0 <[^>]*> nop
++0000bee4 <[^>]*> nop
++0000bee8 <[^>]*> nop
++0000beec <[^>]*> nop
++0000bef0 <[^>]*> nop
++0000bef4 <[^>]*> nop
++0000bef8 <[^>]*> nop
++0000befc <[^>]*> nop
++0000bf00 <[^>]*> nop
++0000bf04 <[^>]*> nop
++0000bf08 <[^>]*> nop
++0000bf0c <[^>]*> nop
++0000bf10 <[^>]*> nop
++0000bf14 <[^>]*> nop
++0000bf18 <[^>]*> nop
++0000bf1c <[^>]*> nop
++0000bf20 <[^>]*> nop
++0000bf24 <[^>]*> nop
++0000bf28 <[^>]*> nop
++0000bf2c <[^>]*> nop
++0000bf30 <[^>]*> nop
++0000bf34 <[^>]*> nop
++0000bf38 <[^>]*> nop
++0000bf3c <[^>]*> nop
++0000bf40 <[^>]*> nop
++0000bf44 <[^>]*> nop
++0000bf48 <[^>]*> nop
++0000bf4c <[^>]*> nop
++0000bf50 <[^>]*> nop
++0000bf54 <[^>]*> nop
++0000bf58 <[^>]*> nop
++0000bf5c <[^>]*> nop
++0000bf60 <[^>]*> nop
++0000bf64 <[^>]*> nop
++0000bf68 <[^>]*> nop
++0000bf6c <[^>]*> nop
++0000bf70 <[^>]*> nop
++0000bf74 <[^>]*> nop
++0000bf78 <[^>]*> nop
++0000bf7c <[^>]*> nop
++0000bf80 <[^>]*> nop
++0000bf84 <[^>]*> nop
++0000bf88 <[^>]*> nop
++0000bf8c <[^>]*> nop
++0000bf90 <[^>]*> nop
++0000bf94 <[^>]*> nop
++0000bf98 <[^>]*> nop
++0000bf9c <[^>]*> nop
++0000bfa0 <[^>]*> nop
++0000bfa4 <[^>]*> nop
++0000bfa8 <[^>]*> nop
++0000bfac <[^>]*> nop
++0000bfb0 <[^>]*> nop
++0000bfb4 <[^>]*> nop
++0000bfb8 <[^>]*> nop
++0000bfbc <[^>]*> nop
++0000bfc0 <[^>]*> nop
++0000bfc4 <[^>]*> nop
++0000bfc8 <[^>]*> nop
++0000bfcc <[^>]*> nop
++0000bfd0 <[^>]*> nop
++0000bfd4 <[^>]*> nop
++0000bfd8 <[^>]*> nop
++0000bfdc <[^>]*> nop
++0000bfe0 <[^>]*> nop
++0000bfe4 <[^>]*> nop
++0000bfe8 <[^>]*> nop
++0000bfec <[^>]*> nop
++0000bff0 <[^>]*> nop
++0000bff4 <[^>]*> nop
++0000bff8 <[^>]*> nop
++0000bffc <[^>]*> nop
++0000c000 <[^>]*> nop
++0000c004 <[^>]*> nop
++0000c008 <[^>]*> nop
++0000c00c <[^>]*> nop
++0000c010 <[^>]*> nop
++0000c014 <[^>]*> nop
++0000c018 <[^>]*> nop
++0000c01c <[^>]*> nop
++0000c020 <[^>]*> nop
++0000c024 <[^>]*> nop
++0000c028 <[^>]*> nop
++0000c02c <[^>]*> nop
++0000c030 <[^>]*> nop
++0000c034 <[^>]*> nop
++0000c038 <[^>]*> nop
++0000c03c <[^>]*> nop
++0000c040 <[^>]*> nop
++0000c044 <[^>]*> nop
++0000c048 <[^>]*> nop
++0000c04c <[^>]*> nop
++0000c050 <[^>]*> nop
++0000c054 <[^>]*> nop
++0000c058 <[^>]*> nop
++0000c05c <[^>]*> nop
++0000c060 <[^>]*> nop
++0000c064 <[^>]*> nop
++0000c068 <[^>]*> nop
++0000c06c <[^>]*> nop
++0000c070 <[^>]*> nop
++0000c074 <[^>]*> nop
++0000c078 <[^>]*> nop
++0000c07c <[^>]*> nop
++0000c080 <[^>]*> nop
++0000c084 <[^>]*> nop
++0000c088 <[^>]*> nop
++0000c08c <[^>]*> nop
++0000c090 <[^>]*> nop
++0000c094 <[^>]*> nop
++0000c098 <[^>]*> nop
++0000c09c <[^>]*> nop
++0000c0a0 <[^>]*> nop
++0000c0a4 <[^>]*> nop
++0000c0a8 <[^>]*> nop
++0000c0ac <[^>]*> nop
++0000c0b0 <[^>]*> nop
++0000c0b4 <[^>]*> nop
++0000c0b8 <[^>]*> nop
++0000c0bc <[^>]*> nop
++0000c0c0 <[^>]*> nop
++0000c0c4 <[^>]*> nop
++0000c0c8 <[^>]*> nop
++0000c0cc <[^>]*> nop
++0000c0d0 <[^>]*> nop
++0000c0d4 <[^>]*> nop
++0000c0d8 <[^>]*> nop
++0000c0dc <[^>]*> nop
++0000c0e0 <[^>]*> nop
++0000c0e4 <[^>]*> nop
++0000c0e8 <[^>]*> nop
++0000c0ec <[^>]*> nop
++0000c0f0 <[^>]*> nop
++0000c0f4 <[^>]*> nop
++0000c0f8 <[^>]*> nop
++0000c0fc <[^>]*> nop
++0000c100 <[^>]*> nop
++0000c104 <[^>]*> nop
++0000c108 <[^>]*> nop
++0000c10c <[^>]*> nop
++0000c110 <[^>]*> nop
++0000c114 <[^>]*> nop
++0000c118 <[^>]*> nop
++0000c11c <[^>]*> nop
++0000c120 <[^>]*> nop
++0000c124 <[^>]*> nop
++0000c128 <[^>]*> nop
++0000c12c <[^>]*> nop
++0000c130 <[^>]*> nop
++0000c134 <[^>]*> nop
++0000c138 <[^>]*> nop
++0000c13c <[^>]*> nop
++0000c140 <[^>]*> nop
++0000c144 <[^>]*> nop
++0000c148 <[^>]*> nop
++0000c14c <[^>]*> nop
++0000c150 <[^>]*> nop
++0000c154 <[^>]*> nop
++0000c158 <[^>]*> nop
++0000c15c <[^>]*> nop
++0000c160 <[^>]*> nop
++0000c164 <[^>]*> nop
++0000c168 <[^>]*> nop
++0000c16c <[^>]*> nop
++0000c170 <[^>]*> nop
++0000c174 <[^>]*> nop
++0000c178 <[^>]*> nop
++0000c17c <[^>]*> nop
++0000c180 <[^>]*> nop
++0000c184 <[^>]*> nop
++0000c188 <[^>]*> nop
++0000c18c <[^>]*> nop
++0000c190 <[^>]*> nop
++0000c194 <[^>]*> nop
++0000c198 <[^>]*> nop
++0000c19c <[^>]*> nop
++0000c1a0 <[^>]*> nop
++0000c1a4 <[^>]*> nop
++0000c1a8 <[^>]*> nop
++0000c1ac <[^>]*> nop
++0000c1b0 <[^>]*> nop
++0000c1b4 <[^>]*> nop
++0000c1b8 <[^>]*> nop
++0000c1bc <[^>]*> nop
++0000c1c0 <[^>]*> nop
++0000c1c4 <[^>]*> nop
++0000c1c8 <[^>]*> nop
++0000c1cc <[^>]*> nop
++0000c1d0 <[^>]*> nop
++0000c1d4 <[^>]*> nop
++0000c1d8 <[^>]*> nop
++0000c1dc <[^>]*> nop
++0000c1e0 <[^>]*> nop
++0000c1e4 <[^>]*> nop
++0000c1e8 <[^>]*> nop
++0000c1ec <[^>]*> nop
++0000c1f0 <[^>]*> nop
++0000c1f4 <[^>]*> nop
++0000c1f8 <[^>]*> nop
++0000c1fc <[^>]*> nop
++0000c200 <[^>]*> nop
++0000c204 <[^>]*> nop
++0000c208 <[^>]*> nop
++0000c20c <[^>]*> nop
++0000c210 <[^>]*> nop
++0000c214 <[^>]*> nop
++0000c218 <[^>]*> nop
++0000c21c <[^>]*> nop
++0000c220 <[^>]*> nop
++0000c224 <[^>]*> nop
++0000c228 <[^>]*> nop
++0000c22c <[^>]*> nop
++0000c230 <[^>]*> nop
++0000c234 <[^>]*> nop
++0000c238 <[^>]*> nop
++0000c23c <[^>]*> nop
++0000c240 <[^>]*> nop
++0000c244 <[^>]*> nop
++0000c248 <[^>]*> nop
++0000c24c <[^>]*> nop
++0000c250 <[^>]*> nop
++0000c254 <[^>]*> nop
++0000c258 <[^>]*> nop
++0000c25c <[^>]*> nop
++0000c260 <[^>]*> nop
++0000c264 <[^>]*> nop
++0000c268 <[^>]*> nop
++0000c26c <[^>]*> nop
++0000c270 <[^>]*> nop
++0000c274 <[^>]*> nop
++0000c278 <[^>]*> nop
++0000c27c <[^>]*> nop
++0000c280 <[^>]*> nop
++0000c284 <[^>]*> nop
++0000c288 <[^>]*> nop
++0000c28c <[^>]*> nop
++0000c290 <[^>]*> nop
++0000c294 <[^>]*> nop
++0000c298 <[^>]*> nop
++0000c29c <[^>]*> nop
++0000c2a0 <[^>]*> nop
++0000c2a4 <[^>]*> nop
++0000c2a8 <[^>]*> nop
++0000c2ac <[^>]*> nop
++0000c2b0 <[^>]*> nop
++0000c2b4 <[^>]*> nop
++0000c2b8 <[^>]*> nop
++0000c2bc <[^>]*> nop
++0000c2c0 <[^>]*> nop
++0000c2c4 <[^>]*> nop
++0000c2c8 <[^>]*> nop
++0000c2cc <[^>]*> nop
++0000c2d0 <[^>]*> nop
++0000c2d4 <[^>]*> nop
++0000c2d8 <[^>]*> nop
++0000c2dc <[^>]*> nop
++0000c2e0 <[^>]*> nop
++0000c2e4 <[^>]*> nop
++0000c2e8 <[^>]*> nop
++0000c2ec <[^>]*> nop
++0000c2f0 <[^>]*> nop
++0000c2f4 <[^>]*> nop
++0000c2f8 <[^>]*> nop
++0000c2fc <[^>]*> nop
++0000c300 <[^>]*> nop
++0000c304 <[^>]*> nop
++0000c308 <[^>]*> nop
++0000c30c <[^>]*> nop
++0000c310 <[^>]*> nop
++0000c314 <[^>]*> nop
++0000c318 <[^>]*> nop
++0000c31c <[^>]*> nop
++0000c320 <[^>]*> nop
++0000c324 <[^>]*> nop
++0000c328 <[^>]*> nop
++0000c32c <[^>]*> nop
++0000c330 <[^>]*> nop
++0000c334 <[^>]*> nop
++0000c338 <[^>]*> nop
++0000c33c <[^>]*> nop
++0000c340 <[^>]*> nop
++0000c344 <[^>]*> nop
++0000c348 <[^>]*> nop
++0000c34c <[^>]*> nop
++0000c350 <[^>]*> nop
++0000c354 <[^>]*> nop
++0000c358 <[^>]*> nop
++0000c35c <[^>]*> nop
++0000c360 <[^>]*> nop
++0000c364 <[^>]*> nop
++0000c368 <[^>]*> nop
++0000c36c <[^>]*> nop
++0000c370 <[^>]*> nop
++0000c374 <[^>]*> nop
++0000c378 <[^>]*> nop
++0000c37c <[^>]*> nop
++0000c380 <[^>]*> nop
++0000c384 <[^>]*> nop
++0000c388 <[^>]*> nop
++0000c38c <[^>]*> nop
++0000c390 <[^>]*> nop
++0000c394 <[^>]*> nop
++0000c398 <[^>]*> nop
++0000c39c <[^>]*> nop
++0000c3a0 <[^>]*> nop
++0000c3a4 <[^>]*> nop
++0000c3a8 <[^>]*> nop
++0000c3ac <[^>]*> nop
++0000c3b0 <[^>]*> nop
++0000c3b4 <[^>]*> nop
++0000c3b8 <[^>]*> nop
++0000c3bc <[^>]*> nop
++0000c3c0 <[^>]*> nop
++0000c3c4 <[^>]*> nop
++0000c3c8 <[^>]*> nop
++0000c3cc <[^>]*> nop
++0000c3d0 <[^>]*> nop
++0000c3d4 <[^>]*> nop
++0000c3d8 <[^>]*> nop
++0000c3dc <[^>]*> nop
++0000c3e0 <[^>]*> nop
++0000c3e4 <[^>]*> nop
++0000c3e8 <[^>]*> nop
++0000c3ec <[^>]*> nop
++0000c3f0 <[^>]*> nop
++0000c3f4 <[^>]*> nop
++0000c3f8 <[^>]*> nop
++0000c3fc <[^>]*> nop
++0000c400 <[^>]*> nop
++0000c404 <[^>]*> nop
++0000c408 <[^>]*> nop
++0000c40c <[^>]*> nop
++0000c410 <[^>]*> nop
++0000c414 <[^>]*> nop
++0000c418 <[^>]*> nop
++0000c41c <[^>]*> nop
++0000c420 <[^>]*> nop
++0000c424 <[^>]*> nop
++0000c428 <[^>]*> nop
++0000c42c <[^>]*> nop
++0000c430 <[^>]*> nop
++0000c434 <[^>]*> nop
++0000c438 <[^>]*> nop
++0000c43c <[^>]*> nop
++0000c440 <[^>]*> nop
++0000c444 <[^>]*> nop
++0000c448 <[^>]*> nop
++0000c44c <[^>]*> nop
++0000c450 <[^>]*> nop
++0000c454 <[^>]*> nop
++0000c458 <[^>]*> nop
++0000c45c <[^>]*> nop
++0000c460 <[^>]*> nop
++0000c464 <[^>]*> nop
++0000c468 <[^>]*> nop
++0000c46c <[^>]*> nop
++0000c470 <[^>]*> nop
++0000c474 <[^>]*> nop
++0000c478 <[^>]*> nop
++0000c47c <[^>]*> nop
++0000c480 <[^>]*> nop
++0000c484 <[^>]*> nop
++0000c488 <[^>]*> nop
++0000c48c <[^>]*> nop
++0000c490 <[^>]*> nop
++0000c494 <[^>]*> nop
++0000c498 <[^>]*> nop
++0000c49c <[^>]*> nop
++0000c4a0 <[^>]*> nop
++0000c4a4 <[^>]*> nop
++0000c4a8 <[^>]*> nop
++0000c4ac <[^>]*> nop
++0000c4b0 <[^>]*> nop
++0000c4b4 <[^>]*> nop
++0000c4b8 <[^>]*> nop
++0000c4bc <[^>]*> nop
++0000c4c0 <[^>]*> nop
++0000c4c4 <[^>]*> nop
++0000c4c8 <[^>]*> nop
++0000c4cc <[^>]*> nop
++0000c4d0 <[^>]*> nop
++0000c4d4 <[^>]*> nop
++0000c4d8 <[^>]*> nop
++0000c4dc <[^>]*> nop
++0000c4e0 <[^>]*> nop
++0000c4e4 <[^>]*> nop
++0000c4e8 <[^>]*> nop
++0000c4ec <[^>]*> nop
++0000c4f0 <[^>]*> nop
++0000c4f4 <[^>]*> nop
++0000c4f8 <[^>]*> nop
++0000c4fc <[^>]*> nop
++0000c500 <[^>]*> nop
++0000c504 <[^>]*> nop
++0000c508 <[^>]*> nop
++0000c50c <[^>]*> nop
++0000c510 <[^>]*> nop
++0000c514 <[^>]*> nop
++0000c518 <[^>]*> nop
++0000c51c <[^>]*> nop
++0000c520 <[^>]*> nop
++0000c524 <[^>]*> nop
++0000c528 <[^>]*> nop
++0000c52c <[^>]*> nop
++0000c530 <[^>]*> nop
++0000c534 <[^>]*> nop
++0000c538 <[^>]*> nop
++0000c53c <[^>]*> nop
++0000c540 <[^>]*> nop
++0000c544 <[^>]*> nop
++0000c548 <[^>]*> nop
++0000c54c <[^>]*> nop
++0000c550 <[^>]*> nop
++0000c554 <[^>]*> nop
++0000c558 <[^>]*> nop
++0000c55c <[^>]*> nop
++0000c560 <[^>]*> nop
++0000c564 <[^>]*> nop
++0000c568 <[^>]*> nop
++0000c56c <[^>]*> nop
++0000c570 <[^>]*> nop
++0000c574 <[^>]*> nop
++0000c578 <[^>]*> nop
++0000c57c <[^>]*> nop
++0000c580 <[^>]*> nop
++0000c584 <[^>]*> nop
++0000c588 <[^>]*> nop
++0000c58c <[^>]*> nop
++0000c590 <[^>]*> nop
++0000c594 <[^>]*> nop
++0000c598 <[^>]*> nop
++0000c59c <[^>]*> nop
++0000c5a0 <[^>]*> nop
++0000c5a4 <[^>]*> nop
++0000c5a8 <[^>]*> nop
++0000c5ac <[^>]*> nop
++0000c5b0 <[^>]*> nop
++0000c5b4 <[^>]*> nop
++0000c5b8 <[^>]*> nop
++0000c5bc <[^>]*> nop
++0000c5c0 <[^>]*> nop
++0000c5c4 <[^>]*> nop
++0000c5c8 <[^>]*> nop
++0000c5cc <[^>]*> nop
++0000c5d0 <[^>]*> nop
++0000c5d4 <[^>]*> nop
++0000c5d8 <[^>]*> nop
++0000c5dc <[^>]*> nop
++0000c5e0 <[^>]*> nop
++0000c5e4 <[^>]*> nop
++0000c5e8 <[^>]*> nop
++0000c5ec <[^>]*> nop
++0000c5f0 <[^>]*> nop
++0000c5f4 <[^>]*> nop
++0000c5f8 <[^>]*> nop
++0000c5fc <[^>]*> nop
++0000c600 <[^>]*> nop
++0000c604 <[^>]*> nop
++0000c608 <[^>]*> nop
++0000c60c <[^>]*> nop
++0000c610 <[^>]*> nop
++0000c614 <[^>]*> nop
++0000c618 <[^>]*> nop
++0000c61c <[^>]*> nop
++0000c620 <[^>]*> nop
++0000c624 <[^>]*> nop
++0000c628 <[^>]*> nop
++0000c62c <[^>]*> nop
++0000c630 <[^>]*> nop
++0000c634 <[^>]*> nop
++0000c638 <[^>]*> nop
++0000c63c <[^>]*> nop
++0000c640 <[^>]*> nop
++0000c644 <[^>]*> nop
++0000c648 <[^>]*> nop
++0000c64c <[^>]*> nop
++0000c650 <[^>]*> nop
++0000c654 <[^>]*> nop
++0000c658 <[^>]*> nop
++0000c65c <[^>]*> nop
++0000c660 <[^>]*> nop
++0000c664 <[^>]*> nop
++0000c668 <[^>]*> nop
++0000c66c <[^>]*> nop
++0000c670 <[^>]*> nop
++0000c674 <[^>]*> nop
++0000c678 <[^>]*> nop
++0000c67c <[^>]*> nop
++0000c680 <[^>]*> nop
++0000c684 <[^>]*> nop
++0000c688 <[^>]*> nop
++0000c68c <[^>]*> nop
++0000c690 <[^>]*> nop
++0000c694 <[^>]*> nop
++0000c698 <[^>]*> nop
++0000c69c <[^>]*> nop
++0000c6a0 <[^>]*> nop
++0000c6a4 <[^>]*> nop
++0000c6a8 <[^>]*> nop
++0000c6ac <[^>]*> nop
++0000c6b0 <[^>]*> nop
++0000c6b4 <[^>]*> nop
++0000c6b8 <[^>]*> nop
++0000c6bc <[^>]*> nop
++0000c6c0 <[^>]*> nop
++0000c6c4 <[^>]*> nop
++0000c6c8 <[^>]*> nop
++0000c6cc <[^>]*> nop
++0000c6d0 <[^>]*> nop
++0000c6d4 <[^>]*> nop
++0000c6d8 <[^>]*> nop
++0000c6dc <[^>]*> nop
++0000c6e0 <[^>]*> nop
++0000c6e4 <[^>]*> nop
++0000c6e8 <[^>]*> nop
++0000c6ec <[^>]*> nop
++0000c6f0 <[^>]*> nop
++0000c6f4 <[^>]*> nop
++0000c6f8 <[^>]*> nop
++0000c6fc <[^>]*> nop
++0000c700 <[^>]*> nop
++0000c704 <[^>]*> nop
++0000c708 <[^>]*> nop
++0000c70c <[^>]*> nop
++0000c710 <[^>]*> nop
++0000c714 <[^>]*> nop
++0000c718 <[^>]*> nop
++0000c71c <[^>]*> nop
++0000c720 <[^>]*> nop
++0000c724 <[^>]*> nop
++0000c728 <[^>]*> nop
++0000c72c <[^>]*> nop
++0000c730 <[^>]*> nop
++0000c734 <[^>]*> nop
++0000c738 <[^>]*> nop
++0000c73c <[^>]*> nop
++0000c740 <[^>]*> nop
++0000c744 <[^>]*> nop
++0000c748 <[^>]*> nop
++0000c74c <[^>]*> nop
++0000c750 <[^>]*> nop
++0000c754 <[^>]*> nop
++0000c758 <[^>]*> nop
++0000c75c <[^>]*> nop
++0000c760 <[^>]*> nop
++0000c764 <[^>]*> nop
++0000c768 <[^>]*> nop
++0000c76c <[^>]*> nop
++0000c770 <[^>]*> nop
++0000c774 <[^>]*> nop
++0000c778 <[^>]*> nop
++0000c77c <[^>]*> nop
++0000c780 <[^>]*> nop
++0000c784 <[^>]*> nop
++0000c788 <[^>]*> nop
++0000c78c <[^>]*> nop
++0000c790 <[^>]*> nop
++0000c794 <[^>]*> nop
++0000c798 <[^>]*> nop
++0000c79c <[^>]*> nop
++0000c7a0 <[^>]*> nop
++0000c7a4 <[^>]*> nop
++0000c7a8 <[^>]*> nop
++0000c7ac <[^>]*> nop
++0000c7b0 <[^>]*> nop
++0000c7b4 <[^>]*> nop
++0000c7b8 <[^>]*> nop
++0000c7bc <[^>]*> nop
++0000c7c0 <[^>]*> nop
++0000c7c4 <[^>]*> nop
++0000c7c8 <[^>]*> nop
++0000c7cc <[^>]*> nop
++0000c7d0 <[^>]*> nop
++0000c7d4 <[^>]*> nop
++0000c7d8 <[^>]*> nop
++0000c7dc <[^>]*> nop
++0000c7e0 <[^>]*> nop
++0000c7e4 <[^>]*> nop
++0000c7e8 <[^>]*> nop
++0000c7ec <[^>]*> nop
++0000c7f0 <[^>]*> nop
++0000c7f4 <[^>]*> nop
++0000c7f8 <[^>]*> nop
++0000c7fc <[^>]*> nop
++0000c800 <[^>]*> nop
++0000c804 <[^>]*> nop
++0000c808 <[^>]*> nop
++0000c80c <[^>]*> nop
++0000c810 <[^>]*> nop
++0000c814 <[^>]*> nop
++0000c818 <[^>]*> nop
++0000c81c <[^>]*> nop
++0000c820 <[^>]*> nop
++0000c824 <[^>]*> nop
++0000c828 <[^>]*> nop
++0000c82c <[^>]*> nop
++0000c830 <[^>]*> nop
++0000c834 <[^>]*> nop
++0000c838 <[^>]*> nop
++0000c83c <[^>]*> nop
++0000c840 <[^>]*> nop
++0000c844 <[^>]*> nop
++0000c848 <[^>]*> nop
++0000c84c <[^>]*> nop
++0000c850 <[^>]*> nop
++0000c854 <[^>]*> nop
++0000c858 <[^>]*> nop
++0000c85c <[^>]*> nop
++0000c860 <[^>]*> nop
++0000c864 <[^>]*> nop
++0000c868 <[^>]*> nop
++0000c86c <[^>]*> nop
++0000c870 <[^>]*> nop
++0000c874 <[^>]*> nop
++0000c878 <[^>]*> nop
++0000c87c <[^>]*> nop
++0000c880 <[^>]*> nop
++0000c884 <[^>]*> nop
++0000c888 <[^>]*> nop
++0000c88c <[^>]*> nop
++0000c890 <[^>]*> nop
++0000c894 <[^>]*> nop
++0000c898 <[^>]*> nop
++0000c89c <[^>]*> nop
++0000c8a0 <[^>]*> nop
++0000c8a4 <[^>]*> nop
++0000c8a8 <[^>]*> nop
++0000c8ac <[^>]*> nop
++0000c8b0 <[^>]*> nop
++0000c8b4 <[^>]*> nop
++0000c8b8 <[^>]*> nop
++0000c8bc <[^>]*> nop
++0000c8c0 <[^>]*> nop
++0000c8c4 <[^>]*> nop
++0000c8c8 <[^>]*> nop
++0000c8cc <[^>]*> nop
++0000c8d0 <[^>]*> nop
++0000c8d4 <[^>]*> nop
++0000c8d8 <[^>]*> nop
++0000c8dc <[^>]*> nop
++0000c8e0 <[^>]*> nop
++0000c8e4 <[^>]*> nop
++0000c8e8 <[^>]*> nop
++0000c8ec <[^>]*> nop
++0000c8f0 <[^>]*> nop
++0000c8f4 <[^>]*> nop
++0000c8f8 <[^>]*> nop
++0000c8fc <[^>]*> nop
++0000c900 <[^>]*> nop
++0000c904 <[^>]*> nop
++0000c908 <[^>]*> nop
++0000c90c <[^>]*> nop
++0000c910 <[^>]*> nop
++0000c914 <[^>]*> nop
++0000c918 <[^>]*> nop
++0000c91c <[^>]*> nop
++0000c920 <[^>]*> nop
++0000c924 <[^>]*> nop
++0000c928 <[^>]*> nop
++0000c92c <[^>]*> nop
++0000c930 <[^>]*> nop
++0000c934 <[^>]*> nop
++0000c938 <[^>]*> nop
++0000c93c <[^>]*> nop
++0000c940 <[^>]*> nop
++0000c944 <[^>]*> nop
++0000c948 <[^>]*> nop
++0000c94c <[^>]*> nop
++0000c950 <[^>]*> nop
++0000c954 <[^>]*> nop
++0000c958 <[^>]*> nop
++0000c95c <[^>]*> nop
++0000c960 <[^>]*> nop
++0000c964 <[^>]*> nop
++0000c968 <[^>]*> nop
++0000c96c <[^>]*> nop
++0000c970 <[^>]*> nop
++0000c974 <[^>]*> nop
++0000c978 <[^>]*> nop
++0000c97c <[^>]*> nop
++0000c980 <[^>]*> nop
++0000c984 <[^>]*> nop
++0000c988 <[^>]*> nop
++0000c98c <[^>]*> nop
++0000c990 <[^>]*> nop
++0000c994 <[^>]*> nop
++0000c998 <[^>]*> nop
++0000c99c <[^>]*> nop
++0000c9a0 <[^>]*> nop
++0000c9a4 <[^>]*> nop
++0000c9a8 <[^>]*> nop
++0000c9ac <[^>]*> nop
++0000c9b0 <[^>]*> nop
++0000c9b4 <[^>]*> nop
++0000c9b8 <[^>]*> nop
++0000c9bc <[^>]*> nop
++0000c9c0 <[^>]*> nop
++0000c9c4 <[^>]*> nop
++0000c9c8 <[^>]*> nop
++0000c9cc <[^>]*> nop
++0000c9d0 <[^>]*> nop
++0000c9d4 <[^>]*> nop
++0000c9d8 <[^>]*> nop
++0000c9dc <[^>]*> nop
++0000c9e0 <[^>]*> nop
++0000c9e4 <[^>]*> nop
++0000c9e8 <[^>]*> nop
++0000c9ec <[^>]*> nop
++0000c9f0 <[^>]*> nop
++0000c9f4 <[^>]*> nop
++0000c9f8 <[^>]*> nop
++0000c9fc <[^>]*> nop
++0000ca00 <[^>]*> nop
++0000ca04 <[^>]*> nop
++0000ca08 <[^>]*> nop
++0000ca0c <[^>]*> nop
++0000ca10 <[^>]*> nop
++0000ca14 <[^>]*> nop
++0000ca18 <[^>]*> nop
++0000ca1c <[^>]*> nop
++0000ca20 <[^>]*> nop
++0000ca24 <[^>]*> nop
++0000ca28 <[^>]*> nop
++0000ca2c <[^>]*> nop
++0000ca30 <[^>]*> nop
++0000ca34 <[^>]*> nop
++0000ca38 <[^>]*> nop
++0000ca3c <[^>]*> nop
++0000ca40 <[^>]*> nop
++0000ca44 <[^>]*> nop
++0000ca48 <[^>]*> nop
++0000ca4c <[^>]*> nop
++0000ca50 <[^>]*> nop
++0000ca54 <[^>]*> nop
++0000ca58 <[^>]*> nop
++0000ca5c <[^>]*> nop
++0000ca60 <[^>]*> nop
++0000ca64 <[^>]*> nop
++0000ca68 <[^>]*> nop
++0000ca6c <[^>]*> nop
++0000ca70 <[^>]*> nop
++0000ca74 <[^>]*> nop
++0000ca78 <[^>]*> nop
++0000ca7c <[^>]*> nop
++0000ca80 <[^>]*> nop
++0000ca84 <[^>]*> nop
++0000ca88 <[^>]*> nop
++0000ca8c <[^>]*> nop
++0000ca90 <[^>]*> nop
++0000ca94 <[^>]*> nop
++0000ca98 <[^>]*> nop
++0000ca9c <[^>]*> nop
++0000caa0 <[^>]*> nop
++0000caa4 <[^>]*> nop
++0000caa8 <[^>]*> nop
++0000caac <[^>]*> nop
++0000cab0 <[^>]*> nop
++0000cab4 <[^>]*> nop
++0000cab8 <[^>]*> nop
++0000cabc <[^>]*> nop
++0000cac0 <[^>]*> nop
++0000cac4 <[^>]*> nop
++0000cac8 <[^>]*> nop
++0000cacc <[^>]*> nop
++0000cad0 <[^>]*> nop
++0000cad4 <[^>]*> nop
++0000cad8 <[^>]*> nop
++0000cadc <[^>]*> nop
++0000cae0 <[^>]*> nop
++0000cae4 <[^>]*> nop
++0000cae8 <[^>]*> nop
++0000caec <[^>]*> nop
++0000caf0 <[^>]*> nop
++0000caf4 <[^>]*> nop
++0000caf8 <[^>]*> nop
++0000cafc <[^>]*> nop
++0000cb00 <[^>]*> nop
++0000cb04 <[^>]*> nop
++0000cb08 <[^>]*> nop
++0000cb0c <[^>]*> nop
++0000cb10 <[^>]*> nop
++0000cb14 <[^>]*> nop
++0000cb18 <[^>]*> nop
++0000cb1c <[^>]*> nop
++0000cb20 <[^>]*> nop
++0000cb24 <[^>]*> nop
++0000cb28 <[^>]*> nop
++0000cb2c <[^>]*> nop
++0000cb30 <[^>]*> nop
++0000cb34 <[^>]*> nop
++0000cb38 <[^>]*> nop
++0000cb3c <[^>]*> nop
++0000cb40 <[^>]*> nop
++0000cb44 <[^>]*> nop
++0000cb48 <[^>]*> nop
++0000cb4c <[^>]*> nop
++0000cb50 <[^>]*> nop
++0000cb54 <[^>]*> nop
++0000cb58 <[^>]*> nop
++0000cb5c <[^>]*> nop
++0000cb60 <[^>]*> nop
++0000cb64 <[^>]*> nop
++0000cb68 <[^>]*> nop
++0000cb6c <[^>]*> nop
++0000cb70 <[^>]*> nop
++0000cb74 <[^>]*> nop
++0000cb78 <[^>]*> nop
++0000cb7c <[^>]*> nop
++0000cb80 <[^>]*> nop
++0000cb84 <[^>]*> nop
++0000cb88 <[^>]*> nop
++0000cb8c <[^>]*> nop
++0000cb90 <[^>]*> nop
++0000cb94 <[^>]*> nop
++0000cb98 <[^>]*> nop
++0000cb9c <[^>]*> nop
++0000cba0 <[^>]*> nop
++0000cba4 <[^>]*> nop
++0000cba8 <[^>]*> nop
++0000cbac <[^>]*> nop
++0000cbb0 <[^>]*> nop
++0000cbb4 <[^>]*> nop
++0000cbb8 <[^>]*> nop
++0000cbbc <[^>]*> nop
++0000cbc0 <[^>]*> nop
++0000cbc4 <[^>]*> nop
++0000cbc8 <[^>]*> nop
++0000cbcc <[^>]*> nop
++0000cbd0 <[^>]*> nop
++0000cbd4 <[^>]*> nop
++0000cbd8 <[^>]*> nop
++0000cbdc <[^>]*> nop
++0000cbe0 <[^>]*> nop
++0000cbe4 <[^>]*> nop
++0000cbe8 <[^>]*> nop
++0000cbec <[^>]*> nop
++0000cbf0 <[^>]*> nop
++0000cbf4 <[^>]*> nop
++0000cbf8 <[^>]*> nop
++0000cbfc <[^>]*> nop
++0000cc00 <[^>]*> nop
++0000cc04 <[^>]*> nop
++0000cc08 <[^>]*> nop
++0000cc0c <[^>]*> nop
++0000cc10 <[^>]*> nop
++0000cc14 <[^>]*> nop
++0000cc18 <[^>]*> nop
++0000cc1c <[^>]*> nop
++0000cc20 <[^>]*> nop
++0000cc24 <[^>]*> nop
++0000cc28 <[^>]*> nop
++0000cc2c <[^>]*> nop
++0000cc30 <[^>]*> nop
++0000cc34 <[^>]*> nop
++0000cc38 <[^>]*> nop
++0000cc3c <[^>]*> nop
++0000cc40 <[^>]*> nop
++0000cc44 <[^>]*> nop
++0000cc48 <[^>]*> nop
++0000cc4c <[^>]*> nop
++0000cc50 <[^>]*> nop
++0000cc54 <[^>]*> nop
++0000cc58 <[^>]*> nop
++0000cc5c <[^>]*> nop
++0000cc60 <[^>]*> nop
++0000cc64 <[^>]*> nop
++0000cc68 <[^>]*> nop
++0000cc6c <[^>]*> nop
++0000cc70 <[^>]*> nop
++0000cc74 <[^>]*> nop
++0000cc78 <[^>]*> nop
++0000cc7c <[^>]*> nop
++0000cc80 <[^>]*> nop
++0000cc84 <[^>]*> nop
++0000cc88 <[^>]*> nop
++0000cc8c <[^>]*> nop
++0000cc90 <[^>]*> nop
++0000cc94 <[^>]*> nop
++0000cc98 <[^>]*> nop
++0000cc9c <[^>]*> nop
++0000cca0 <[^>]*> nop
++0000cca4 <[^>]*> nop
++0000cca8 <[^>]*> nop
++0000ccac <[^>]*> nop
++0000ccb0 <[^>]*> nop
++0000ccb4 <[^>]*> nop
++0000ccb8 <[^>]*> nop
++0000ccbc <[^>]*> nop
++0000ccc0 <[^>]*> nop
++0000ccc4 <[^>]*> nop
++0000ccc8 <[^>]*> nop
++0000cccc <[^>]*> nop
++0000ccd0 <[^>]*> nop
++0000ccd4 <[^>]*> nop
++0000ccd8 <[^>]*> nop
++0000ccdc <[^>]*> nop
++0000cce0 <[^>]*> nop
++0000cce4 <[^>]*> nop
++0000cce8 <[^>]*> nop
++0000ccec <[^>]*> nop
++0000ccf0 <[^>]*> nop
++0000ccf4 <[^>]*> nop
++0000ccf8 <[^>]*> nop
++0000ccfc <[^>]*> nop
++0000cd00 <[^>]*> nop
++0000cd04 <[^>]*> nop
++0000cd08 <[^>]*> nop
++0000cd0c <[^>]*> nop
++0000cd10 <[^>]*> nop
++0000cd14 <[^>]*> nop
++0000cd18 <[^>]*> nop
++0000cd1c <[^>]*> nop
++0000cd20 <[^>]*> nop
++0000cd24 <[^>]*> nop
++0000cd28 <[^>]*> nop
++0000cd2c <[^>]*> nop
++0000cd30 <[^>]*> nop
++0000cd34 <[^>]*> nop
++0000cd38 <[^>]*> nop
++0000cd3c <[^>]*> nop
++0000cd40 <[^>]*> nop
++0000cd44 <[^>]*> nop
++0000cd48 <[^>]*> nop
++0000cd4c <[^>]*> nop
++0000cd50 <[^>]*> nop
++0000cd54 <[^>]*> nop
++0000cd58 <[^>]*> nop
++0000cd5c <[^>]*> nop
++0000cd60 <[^>]*> nop
++0000cd64 <[^>]*> nop
++0000cd68 <[^>]*> nop
++0000cd6c <[^>]*> nop
++0000cd70 <[^>]*> nop
++0000cd74 <[^>]*> nop
++0000cd78 <[^>]*> nop
++0000cd7c <[^>]*> nop
++0000cd80 <[^>]*> nop
++0000cd84 <[^>]*> nop
++0000cd88 <[^>]*> nop
++0000cd8c <[^>]*> nop
++0000cd90 <[^>]*> nop
++0000cd94 <[^>]*> nop
++0000cd98 <[^>]*> nop
++0000cd9c <[^>]*> nop
++0000cda0 <[^>]*> nop
++0000cda4 <[^>]*> nop
++0000cda8 <[^>]*> nop
++0000cdac <[^>]*> nop
++0000cdb0 <[^>]*> nop
++0000cdb4 <[^>]*> nop
++0000cdb8 <[^>]*> nop
++0000cdbc <[^>]*> nop
++0000cdc0 <[^>]*> nop
++0000cdc4 <[^>]*> nop
++0000cdc8 <[^>]*> nop
++0000cdcc <[^>]*> nop
++0000cdd0 <[^>]*> nop
++0000cdd4 <[^>]*> nop
++0000cdd8 <[^>]*> nop
++0000cddc <[^>]*> nop
++0000cde0 <[^>]*> nop
++0000cde4 <[^>]*> nop
++0000cde8 <[^>]*> nop
++0000cdec <[^>]*> nop
++0000cdf0 <[^>]*> nop
++0000cdf4 <[^>]*> nop
++0000cdf8 <[^>]*> nop
++0000cdfc <[^>]*> nop
++0000ce00 <[^>]*> nop
++0000ce04 <[^>]*> nop
++0000ce08 <[^>]*> nop
++0000ce0c <[^>]*> nop
++0000ce10 <[^>]*> nop
++0000ce14 <[^>]*> nop
++0000ce18 <[^>]*> nop
++0000ce1c <[^>]*> nop
++0000ce20 <[^>]*> nop
++0000ce24 <[^>]*> nop
++0000ce28 <[^>]*> nop
++0000ce2c <[^>]*> nop
++0000ce30 <[^>]*> nop
++0000ce34 <[^>]*> nop
++0000ce38 <[^>]*> nop
++0000ce3c <[^>]*> nop
++0000ce40 <[^>]*> nop
++0000ce44 <[^>]*> nop
++0000ce48 <[^>]*> nop
++0000ce4c <[^>]*> nop
++0000ce50 <[^>]*> nop
++0000ce54 <[^>]*> nop
++0000ce58 <[^>]*> nop
++0000ce5c <[^>]*> nop
++0000ce60 <[^>]*> nop
++0000ce64 <[^>]*> nop
++0000ce68 <[^>]*> nop
++0000ce6c <[^>]*> nop
++0000ce70 <[^>]*> nop
++0000ce74 <[^>]*> nop
++0000ce78 <[^>]*> nop
++0000ce7c <[^>]*> nop
++0000ce80 <[^>]*> nop
++0000ce84 <[^>]*> nop
++0000ce88 <[^>]*> nop
++0000ce8c <[^>]*> nop
++0000ce90 <[^>]*> nop
++0000ce94 <[^>]*> nop
++0000ce98 <[^>]*> nop
++0000ce9c <[^>]*> nop
++0000cea0 <[^>]*> nop
++0000cea4 <[^>]*> nop
++0000cea8 <[^>]*> nop
++0000ceac <[^>]*> nop
++0000ceb0 <[^>]*> nop
++0000ceb4 <[^>]*> nop
++0000ceb8 <[^>]*> nop
++0000cebc <[^>]*> nop
++0000cec0 <[^>]*> nop
++0000cec4 <[^>]*> nop
++0000cec8 <[^>]*> nop
++0000cecc <[^>]*> nop
++0000ced0 <[^>]*> nop
++0000ced4 <[^>]*> nop
++0000ced8 <[^>]*> nop
++0000cedc <[^>]*> nop
++0000cee0 <[^>]*> nop
++0000cee4 <[^>]*> nop
++0000cee8 <[^>]*> nop
++0000ceec <[^>]*> nop
++0000cef0 <[^>]*> nop
++0000cef4 <[^>]*> nop
++0000cef8 <[^>]*> nop
++0000cefc <[^>]*> nop
++0000cf00 <[^>]*> nop
++0000cf04 <[^>]*> nop
++0000cf08 <[^>]*> nop
++0000cf0c <[^>]*> nop
++0000cf10 <[^>]*> nop
++0000cf14 <[^>]*> nop
++0000cf18 <[^>]*> nop
++0000cf1c <[^>]*> nop
++0000cf20 <[^>]*> nop
++0000cf24 <[^>]*> nop
++0000cf28 <[^>]*> nop
++0000cf2c <[^>]*> nop
++0000cf30 <[^>]*> nop
++0000cf34 <[^>]*> nop
++0000cf38 <[^>]*> nop
++0000cf3c <[^>]*> nop
++0000cf40 <[^>]*> nop
++0000cf44 <[^>]*> nop
++0000cf48 <[^>]*> nop
++0000cf4c <[^>]*> nop
++0000cf50 <[^>]*> nop
++0000cf54 <[^>]*> nop
++0000cf58 <[^>]*> nop
++0000cf5c <[^>]*> nop
++0000cf60 <[^>]*> nop
++0000cf64 <[^>]*> nop
++0000cf68 <[^>]*> nop
++0000cf6c <[^>]*> nop
++0000cf70 <[^>]*> nop
++0000cf74 <[^>]*> nop
++0000cf78 <[^>]*> nop
++0000cf7c <[^>]*> nop
++0000cf80 <[^>]*> nop
++0000cf84 <[^>]*> nop
++0000cf88 <[^>]*> nop
++0000cf8c <[^>]*> nop
++0000cf90 <[^>]*> nop
++0000cf94 <[^>]*> nop
++0000cf98 <[^>]*> nop
++0000cf9c <[^>]*> nop
++0000cfa0 <[^>]*> nop
++0000cfa4 <[^>]*> nop
++0000cfa8 <[^>]*> nop
++0000cfac <[^>]*> nop
++0000cfb0 <[^>]*> nop
++0000cfb4 <[^>]*> nop
++0000cfb8 <[^>]*> nop
++0000cfbc <[^>]*> nop
++0000cfc0 <[^>]*> nop
++0000cfc4 <[^>]*> nop
++0000cfc8 <[^>]*> nop
++0000cfcc <[^>]*> nop
++0000cfd0 <[^>]*> nop
++0000cfd4 <[^>]*> nop
++0000cfd8 <[^>]*> nop
++0000cfdc <[^>]*> nop
++0000cfe0 <[^>]*> nop
++0000cfe4 <[^>]*> nop
++0000cfe8 <[^>]*> nop
++0000cfec <[^>]*> nop
++0000cff0 <[^>]*> nop
++0000cff4 <[^>]*> nop
++0000cff8 <[^>]*> nop
++0000cffc <[^>]*> nop
++0000d000 <[^>]*> nop
++0000d004 <[^>]*> nop
++0000d008 <[^>]*> nop
++0000d00c <[^>]*> nop
++0000d010 <[^>]*> nop
++0000d014 <[^>]*> nop
++0000d018 <[^>]*> nop
++0000d01c <[^>]*> nop
++0000d020 <[^>]*> nop
++0000d024 <[^>]*> nop
++0000d028 <[^>]*> nop
++0000d02c <[^>]*> nop
++0000d030 <[^>]*> nop
++0000d034 <[^>]*> nop
++0000d038 <[^>]*> nop
++0000d03c <[^>]*> nop
++0000d040 <[^>]*> nop
++0000d044 <[^>]*> nop
++0000d048 <[^>]*> nop
++0000d04c <[^>]*> nop
++0000d050 <[^>]*> nop
++0000d054 <[^>]*> nop
++0000d058 <[^>]*> nop
++0000d05c <[^>]*> nop
++0000d060 <[^>]*> nop
++0000d064 <[^>]*> nop
++0000d068 <[^>]*> nop
++0000d06c <[^>]*> nop
++0000d070 <[^>]*> nop
++0000d074 <[^>]*> nop
++0000d078 <[^>]*> nop
++0000d07c <[^>]*> nop
++0000d080 <[^>]*> nop
++0000d084 <[^>]*> nop
++0000d088 <[^>]*> nop
++0000d08c <[^>]*> nop
++0000d090 <[^>]*> nop
++0000d094 <[^>]*> nop
++0000d098 <[^>]*> nop
++0000d09c <[^>]*> nop
++0000d0a0 <[^>]*> nop
++0000d0a4 <[^>]*> nop
++0000d0a8 <[^>]*> nop
++0000d0ac <[^>]*> nop
++0000d0b0 <[^>]*> nop
++0000d0b4 <[^>]*> nop
++0000d0b8 <[^>]*> nop
++0000d0bc <[^>]*> nop
++0000d0c0 <[^>]*> nop
++0000d0c4 <[^>]*> nop
++0000d0c8 <[^>]*> nop
++0000d0cc <[^>]*> nop
++0000d0d0 <[^>]*> nop
++0000d0d4 <[^>]*> nop
++0000d0d8 <[^>]*> nop
++0000d0dc <[^>]*> nop
++0000d0e0 <[^>]*> nop
++0000d0e4 <[^>]*> nop
++0000d0e8 <[^>]*> nop
++0000d0ec <[^>]*> nop
++0000d0f0 <[^>]*> nop
++0000d0f4 <[^>]*> nop
++0000d0f8 <[^>]*> nop
++0000d0fc <[^>]*> nop
++0000d100 <[^>]*> nop
++0000d104 <[^>]*> nop
++0000d108 <[^>]*> nop
++0000d10c <[^>]*> nop
++0000d110 <[^>]*> nop
++0000d114 <[^>]*> nop
++0000d118 <[^>]*> nop
++0000d11c <[^>]*> nop
++0000d120 <[^>]*> nop
++0000d124 <[^>]*> nop
++0000d128 <[^>]*> nop
++0000d12c <[^>]*> nop
++0000d130 <[^>]*> nop
++0000d134 <[^>]*> nop
++0000d138 <[^>]*> nop
++0000d13c <[^>]*> nop
++0000d140 <[^>]*> nop
++0000d144 <[^>]*> nop
++0000d148 <[^>]*> nop
++0000d14c <[^>]*> nop
++0000d150 <[^>]*> nop
++0000d154 <[^>]*> nop
++0000d158 <[^>]*> nop
++0000d15c <[^>]*> nop
++0000d160 <[^>]*> nop
++0000d164 <[^>]*> nop
++0000d168 <[^>]*> nop
++0000d16c <[^>]*> nop
++0000d170 <[^>]*> nop
++0000d174 <[^>]*> nop
++0000d178 <[^>]*> nop
++0000d17c <[^>]*> nop
++0000d180 <[^>]*> nop
++0000d184 <[^>]*> nop
++0000d188 <[^>]*> nop
++0000d18c <[^>]*> nop
++0000d190 <[^>]*> nop
++0000d194 <[^>]*> nop
++0000d198 <[^>]*> nop
++0000d19c <[^>]*> nop
++0000d1a0 <[^>]*> nop
++0000d1a4 <[^>]*> nop
++0000d1a8 <[^>]*> nop
++0000d1ac <[^>]*> nop
++0000d1b0 <[^>]*> nop
++0000d1b4 <[^>]*> nop
++0000d1b8 <[^>]*> nop
++0000d1bc <[^>]*> nop
++0000d1c0 <[^>]*> nop
++0000d1c4 <[^>]*> nop
++0000d1c8 <[^>]*> nop
++0000d1cc <[^>]*> nop
++0000d1d0 <[^>]*> nop
++0000d1d4 <[^>]*> nop
++0000d1d8 <[^>]*> nop
++0000d1dc <[^>]*> nop
++0000d1e0 <[^>]*> nop
++0000d1e4 <[^>]*> nop
++0000d1e8 <[^>]*> nop
++0000d1ec <[^>]*> nop
++0000d1f0 <[^>]*> nop
++0000d1f4 <[^>]*> nop
++0000d1f8 <[^>]*> nop
++0000d1fc <[^>]*> nop
++0000d200 <[^>]*> nop
++0000d204 <[^>]*> nop
++0000d208 <[^>]*> nop
++0000d20c <[^>]*> nop
++0000d210 <[^>]*> nop
++0000d214 <[^>]*> nop
++0000d218 <[^>]*> nop
++0000d21c <[^>]*> nop
++0000d220 <[^>]*> nop
++0000d224 <[^>]*> nop
++0000d228 <[^>]*> nop
++0000d22c <[^>]*> nop
++0000d230 <[^>]*> nop
++0000d234 <[^>]*> nop
++0000d238 <[^>]*> nop
++0000d23c <[^>]*> nop
++0000d240 <[^>]*> nop
++0000d244 <[^>]*> nop
++0000d248 <[^>]*> nop
++0000d24c <[^>]*> nop
++0000d250 <[^>]*> nop
++0000d254 <[^>]*> nop
++0000d258 <[^>]*> nop
++0000d25c <[^>]*> nop
++0000d260 <[^>]*> nop
++0000d264 <[^>]*> nop
++0000d268 <[^>]*> nop
++0000d26c <[^>]*> nop
++0000d270 <[^>]*> nop
++0000d274 <[^>]*> nop
++0000d278 <[^>]*> nop
++0000d27c <[^>]*> nop
++0000d280 <[^>]*> nop
++0000d284 <[^>]*> nop
++0000d288 <[^>]*> nop
++0000d28c <[^>]*> nop
++0000d290 <[^>]*> nop
++0000d294 <[^>]*> nop
++0000d298 <[^>]*> nop
++0000d29c <[^>]*> nop
++0000d2a0 <[^>]*> nop
++0000d2a4 <[^>]*> nop
++0000d2a8 <[^>]*> nop
++0000d2ac <[^>]*> nop
++0000d2b0 <[^>]*> nop
++0000d2b4 <[^>]*> nop
++0000d2b8 <[^>]*> nop
++0000d2bc <[^>]*> nop
++0000d2c0 <[^>]*> nop
++0000d2c4 <[^>]*> nop
++0000d2c8 <[^>]*> nop
++0000d2cc <[^>]*> nop
++0000d2d0 <[^>]*> nop
++0000d2d4 <[^>]*> nop
++0000d2d8 <[^>]*> nop
++0000d2dc <[^>]*> nop
++0000d2e0 <[^>]*> nop
++0000d2e4 <[^>]*> nop
++0000d2e8 <[^>]*> nop
++0000d2ec <[^>]*> nop
++0000d2f0 <[^>]*> nop
++0000d2f4 <[^>]*> nop
++0000d2f8 <[^>]*> nop
++0000d2fc <[^>]*> nop
++0000d300 <[^>]*> nop
++0000d304 <[^>]*> nop
++0000d308 <[^>]*> nop
++0000d30c <[^>]*> nop
++0000d310 <[^>]*> nop
++0000d314 <[^>]*> nop
++0000d318 <[^>]*> nop
++0000d31c <[^>]*> nop
++0000d320 <[^>]*> nop
++0000d324 <[^>]*> nop
++0000d328 <[^>]*> nop
++0000d32c <[^>]*> nop
++0000d330 <[^>]*> nop
++0000d334 <[^>]*> nop
++0000d338 <[^>]*> nop
++0000d33c <[^>]*> nop
++0000d340 <[^>]*> nop
++0000d344 <[^>]*> nop
++0000d348 <[^>]*> nop
++0000d34c <[^>]*> nop
++0000d350 <[^>]*> nop
++0000d354 <[^>]*> nop
++0000d358 <[^>]*> nop
++0000d35c <[^>]*> nop
++0000d360 <[^>]*> nop
++0000d364 <[^>]*> nop
++0000d368 <[^>]*> nop
++0000d36c <[^>]*> nop
++0000d370 <[^>]*> nop
++0000d374 <[^>]*> nop
++0000d378 <[^>]*> nop
++0000d37c <[^>]*> nop
++0000d380 <[^>]*> nop
++0000d384 <[^>]*> nop
++0000d388 <[^>]*> nop
++0000d38c <[^>]*> nop
++0000d390 <[^>]*> nop
++0000d394 <[^>]*> nop
++0000d398 <[^>]*> nop
++0000d39c <[^>]*> nop
++0000d3a0 <[^>]*> nop
++0000d3a4 <[^>]*> nop
++0000d3a8 <[^>]*> nop
++0000d3ac <[^>]*> nop
++0000d3b0 <[^>]*> nop
++0000d3b4 <[^>]*> nop
++0000d3b8 <[^>]*> nop
++0000d3bc <[^>]*> nop
++0000d3c0 <[^>]*> nop
++0000d3c4 <[^>]*> nop
++0000d3c8 <[^>]*> nop
++0000d3cc <[^>]*> nop
++0000d3d0 <[^>]*> nop
++0000d3d4 <[^>]*> nop
++0000d3d8 <[^>]*> nop
++0000d3dc <[^>]*> nop
++0000d3e0 <[^>]*> nop
++0000d3e4 <[^>]*> nop
++0000d3e8 <[^>]*> nop
++0000d3ec <[^>]*> nop
++0000d3f0 <[^>]*> nop
++0000d3f4 <[^>]*> nop
++0000d3f8 <[^>]*> nop
++0000d3fc <[^>]*> nop
++0000d400 <[^>]*> nop
++0000d404 <[^>]*> nop
++0000d408 <[^>]*> nop
++0000d40c <[^>]*> nop
++0000d410 <[^>]*> nop
++0000d414 <[^>]*> nop
++0000d418 <[^>]*> nop
++0000d41c <[^>]*> nop
++0000d420 <[^>]*> nop
++0000d424 <[^>]*> nop
++0000d428 <[^>]*> nop
++0000d42c <[^>]*> nop
++0000d430 <[^>]*> nop
++0000d434 <[^>]*> nop
++0000d438 <[^>]*> nop
++0000d43c <[^>]*> nop
++0000d440 <[^>]*> nop
++0000d444 <[^>]*> nop
++0000d448 <[^>]*> nop
++0000d44c <[^>]*> nop
++0000d450 <[^>]*> nop
++0000d454 <[^>]*> nop
++0000d458 <[^>]*> nop
++0000d45c <[^>]*> nop
++0000d460 <[^>]*> nop
++0000d464 <[^>]*> nop
++0000d468 <[^>]*> nop
++0000d46c <[^>]*> nop
++0000d470 <[^>]*> nop
++0000d474 <[^>]*> nop
++0000d478 <[^>]*> nop
++0000d47c <[^>]*> nop
++0000d480 <[^>]*> nop
++0000d484 <[^>]*> nop
++0000d488 <[^>]*> nop
++0000d48c <[^>]*> nop
++0000d490 <[^>]*> nop
++0000d494 <[^>]*> nop
++0000d498 <[^>]*> nop
++0000d49c <[^>]*> nop
++0000d4a0 <[^>]*> nop
++0000d4a4 <[^>]*> nop
++0000d4a8 <[^>]*> nop
++0000d4ac <[^>]*> nop
++0000d4b0 <[^>]*> nop
++0000d4b4 <[^>]*> nop
++0000d4b8 <[^>]*> nop
++0000d4bc <[^>]*> nop
++0000d4c0 <[^>]*> nop
++0000d4c4 <[^>]*> nop
++0000d4c8 <[^>]*> nop
++0000d4cc <[^>]*> nop
++0000d4d0 <[^>]*> nop
++0000d4d4 <[^>]*> nop
++0000d4d8 <[^>]*> nop
++0000d4dc <[^>]*> nop
++0000d4e0 <[^>]*> nop
++0000d4e4 <[^>]*> nop
++0000d4e8 <[^>]*> nop
++0000d4ec <[^>]*> nop
++0000d4f0 <[^>]*> nop
++0000d4f4 <[^>]*> nop
++0000d4f8 <[^>]*> nop
++0000d4fc <[^>]*> nop
++0000d500 <[^>]*> nop
++0000d504 <[^>]*> nop
++0000d508 <[^>]*> nop
++0000d50c <[^>]*> nop
++0000d510 <[^>]*> nop
++0000d514 <[^>]*> nop
++0000d518 <[^>]*> nop
++0000d51c <[^>]*> nop
++0000d520 <[^>]*> nop
++0000d524 <[^>]*> nop
++0000d528 <[^>]*> nop
++0000d52c <[^>]*> nop
++0000d530 <[^>]*> nop
++0000d534 <[^>]*> nop
++0000d538 <[^>]*> nop
++0000d53c <[^>]*> nop
++0000d540 <[^>]*> nop
++0000d544 <[^>]*> nop
++0000d548 <[^>]*> nop
++0000d54c <[^>]*> nop
++0000d550 <[^>]*> nop
++0000d554 <[^>]*> nop
++0000d558 <[^>]*> nop
++0000d55c <[^>]*> nop
++0000d560 <[^>]*> nop
++0000d564 <[^>]*> nop
++0000d568 <[^>]*> nop
++0000d56c <[^>]*> nop
++0000d570 <[^>]*> nop
++0000d574 <[^>]*> nop
++0000d578 <[^>]*> nop
++0000d57c <[^>]*> nop
++0000d580 <[^>]*> nop
++0000d584 <[^>]*> nop
++0000d588 <[^>]*> nop
++0000d58c <[^>]*> nop
++0000d590 <[^>]*> nop
++0000d594 <[^>]*> nop
++0000d598 <[^>]*> nop
++0000d59c <[^>]*> nop
++0000d5a0 <[^>]*> nop
++0000d5a4 <[^>]*> nop
++0000d5a8 <[^>]*> nop
++0000d5ac <[^>]*> nop
++0000d5b0 <[^>]*> nop
++0000d5b4 <[^>]*> nop
++0000d5b8 <[^>]*> nop
++0000d5bc <[^>]*> nop
++0000d5c0 <[^>]*> nop
++0000d5c4 <[^>]*> nop
++0000d5c8 <[^>]*> nop
++0000d5cc <[^>]*> nop
++0000d5d0 <[^>]*> nop
++0000d5d4 <[^>]*> nop
++0000d5d8 <[^>]*> nop
++0000d5dc <[^>]*> nop
++0000d5e0 <[^>]*> nop
++0000d5e4 <[^>]*> nop
++0000d5e8 <[^>]*> nop
++0000d5ec <[^>]*> nop
++0000d5f0 <[^>]*> nop
++0000d5f4 <[^>]*> nop
++0000d5f8 <[^>]*> nop
++0000d5fc <[^>]*> nop
++0000d600 <[^>]*> nop
++0000d604 <[^>]*> nop
++0000d608 <[^>]*> nop
++0000d60c <[^>]*> nop
++0000d610 <[^>]*> nop
++0000d614 <[^>]*> nop
++0000d618 <[^>]*> nop
++0000d61c <[^>]*> nop
++0000d620 <[^>]*> nop
++0000d624 <[^>]*> nop
++0000d628 <[^>]*> nop
++0000d62c <[^>]*> nop
++0000d630 <[^>]*> nop
++0000d634 <[^>]*> nop
++0000d638 <[^>]*> nop
++0000d63c <[^>]*> nop
++0000d640 <[^>]*> nop
++0000d644 <[^>]*> nop
++0000d648 <[^>]*> nop
++0000d64c <[^>]*> nop
++0000d650 <[^>]*> nop
++0000d654 <[^>]*> nop
++0000d658 <[^>]*> nop
++0000d65c <[^>]*> nop
++0000d660 <[^>]*> nop
++0000d664 <[^>]*> nop
++0000d668 <[^>]*> nop
++0000d66c <[^>]*> nop
++0000d670 <[^>]*> nop
++0000d674 <[^>]*> nop
++0000d678 <[^>]*> nop
++0000d67c <[^>]*> nop
++0000d680 <[^>]*> nop
++0000d684 <[^>]*> nop
++0000d688 <[^>]*> nop
++0000d68c <[^>]*> nop
++0000d690 <[^>]*> nop
++0000d694 <[^>]*> nop
++0000d698 <[^>]*> nop
++0000d69c <[^>]*> nop
++0000d6a0 <[^>]*> nop
++0000d6a4 <[^>]*> nop
++0000d6a8 <[^>]*> nop
++0000d6ac <[^>]*> nop
++0000d6b0 <[^>]*> nop
++0000d6b4 <[^>]*> nop
++0000d6b8 <[^>]*> nop
++0000d6bc <[^>]*> nop
++0000d6c0 <[^>]*> nop
++0000d6c4 <[^>]*> nop
++0000d6c8 <[^>]*> nop
++0000d6cc <[^>]*> nop
++0000d6d0 <[^>]*> nop
++0000d6d4 <[^>]*> nop
++0000d6d8 <[^>]*> nop
++0000d6dc <[^>]*> nop
++0000d6e0 <[^>]*> nop
++0000d6e4 <[^>]*> nop
++0000d6e8 <[^>]*> nop
++0000d6ec <[^>]*> nop
++0000d6f0 <[^>]*> nop
++0000d6f4 <[^>]*> nop
++0000d6f8 <[^>]*> nop
++0000d6fc <[^>]*> nop
++0000d700 <[^>]*> nop
++0000d704 <[^>]*> nop
++0000d708 <[^>]*> nop
++0000d70c <[^>]*> nop
++0000d710 <[^>]*> nop
++0000d714 <[^>]*> nop
++0000d718 <[^>]*> nop
++0000d71c <[^>]*> nop
++0000d720 <[^>]*> nop
++0000d724 <[^>]*> nop
++0000d728 <[^>]*> nop
++0000d72c <[^>]*> nop
++0000d730 <[^>]*> nop
++0000d734 <[^>]*> nop
++0000d738 <[^>]*> nop
++0000d73c <[^>]*> nop
++0000d740 <[^>]*> nop
++0000d744 <[^>]*> nop
++0000d748 <[^>]*> nop
++0000d74c <[^>]*> nop
++0000d750 <[^>]*> nop
++0000d754 <[^>]*> nop
++0000d758 <[^>]*> nop
++0000d75c <[^>]*> nop
++0000d760 <[^>]*> nop
++0000d764 <[^>]*> nop
++0000d768 <[^>]*> nop
++0000d76c <[^>]*> nop
++0000d770 <[^>]*> nop
++0000d774 <[^>]*> nop
++0000d778 <[^>]*> nop
++0000d77c <[^>]*> nop
++0000d780 <[^>]*> nop
++0000d784 <[^>]*> nop
++0000d788 <[^>]*> nop
++0000d78c <[^>]*> nop
++0000d790 <[^>]*> nop
++0000d794 <[^>]*> nop
++0000d798 <[^>]*> nop
++0000d79c <[^>]*> nop
++0000d7a0 <[^>]*> nop
++0000d7a4 <[^>]*> nop
++0000d7a8 <[^>]*> nop
++0000d7ac <[^>]*> nop
++0000d7b0 <[^>]*> nop
++0000d7b4 <[^>]*> nop
++0000d7b8 <[^>]*> nop
++0000d7bc <[^>]*> nop
++0000d7c0 <[^>]*> nop
++0000d7c4 <[^>]*> nop
++0000d7c8 <[^>]*> nop
++0000d7cc <[^>]*> nop
++0000d7d0 <[^>]*> nop
++0000d7d4 <[^>]*> nop
++0000d7d8 <[^>]*> nop
++0000d7dc <[^>]*> nop
++0000d7e0 <[^>]*> nop
++0000d7e4 <[^>]*> nop
++0000d7e8 <[^>]*> nop
++0000d7ec <[^>]*> nop
++0000d7f0 <[^>]*> nop
++0000d7f4 <[^>]*> nop
++0000d7f8 <[^>]*> nop
++0000d7fc <[^>]*> nop
++0000d800 <[^>]*> nop
++0000d804 <[^>]*> nop
++0000d808 <[^>]*> nop
++0000d80c <[^>]*> nop
++0000d810 <[^>]*> nop
++0000d814 <[^>]*> nop
++0000d818 <[^>]*> nop
++0000d81c <[^>]*> nop
++0000d820 <[^>]*> nop
++0000d824 <[^>]*> nop
++0000d828 <[^>]*> nop
++0000d82c <[^>]*> nop
++0000d830 <[^>]*> nop
++0000d834 <[^>]*> nop
++0000d838 <[^>]*> nop
++0000d83c <[^>]*> nop
++0000d840 <[^>]*> nop
++0000d844 <[^>]*> nop
++0000d848 <[^>]*> nop
++0000d84c <[^>]*> nop
++0000d850 <[^>]*> nop
++0000d854 <[^>]*> nop
++0000d858 <[^>]*> nop
++0000d85c <[^>]*> nop
++0000d860 <[^>]*> nop
++0000d864 <[^>]*> nop
++0000d868 <[^>]*> nop
++0000d86c <[^>]*> nop
++0000d870 <[^>]*> nop
++0000d874 <[^>]*> nop
++0000d878 <[^>]*> nop
++0000d87c <[^>]*> nop
++0000d880 <[^>]*> nop
++0000d884 <[^>]*> nop
++0000d888 <[^>]*> nop
++0000d88c <[^>]*> nop
++0000d890 <[^>]*> nop
++0000d894 <[^>]*> nop
++0000d898 <[^>]*> nop
++0000d89c <[^>]*> nop
++0000d8a0 <[^>]*> nop
++0000d8a4 <[^>]*> nop
++0000d8a8 <[^>]*> nop
++0000d8ac <[^>]*> nop
++0000d8b0 <[^>]*> nop
++0000d8b4 <[^>]*> nop
++0000d8b8 <[^>]*> nop
++0000d8bc <[^>]*> nop
++0000d8c0 <[^>]*> nop
++0000d8c4 <[^>]*> nop
++0000d8c8 <[^>]*> nop
++0000d8cc <[^>]*> nop
++0000d8d0 <[^>]*> nop
++0000d8d4 <[^>]*> nop
++0000d8d8 <[^>]*> nop
++0000d8dc <[^>]*> nop
++0000d8e0 <[^>]*> nop
++0000d8e4 <[^>]*> nop
++0000d8e8 <[^>]*> nop
++0000d8ec <[^>]*> nop
++0000d8f0 <[^>]*> nop
++0000d8f4 <[^>]*> nop
++0000d8f8 <[^>]*> nop
++0000d8fc <[^>]*> nop
++0000d900 <[^>]*> nop
++0000d904 <[^>]*> nop
++0000d908 <[^>]*> nop
++0000d90c <[^>]*> nop
++0000d910 <[^>]*> nop
++0000d914 <[^>]*> nop
++0000d918 <[^>]*> nop
++0000d91c <[^>]*> nop
++0000d920 <[^>]*> nop
++0000d924 <[^>]*> nop
++0000d928 <[^>]*> nop
++0000d92c <[^>]*> nop
++0000d930 <[^>]*> nop
++0000d934 <[^>]*> nop
++0000d938 <[^>]*> nop
++0000d93c <[^>]*> nop
++0000d940 <[^>]*> nop
++0000d944 <[^>]*> nop
++0000d948 <[^>]*> nop
++0000d94c <[^>]*> nop
++0000d950 <[^>]*> nop
++0000d954 <[^>]*> nop
++0000d958 <[^>]*> nop
++0000d95c <[^>]*> nop
++0000d960 <[^>]*> nop
++0000d964 <[^>]*> nop
++0000d968 <[^>]*> nop
++0000d96c <[^>]*> nop
++0000d970 <[^>]*> nop
++0000d974 <[^>]*> nop
++0000d978 <[^>]*> nop
++0000d97c <[^>]*> nop
++0000d980 <[^>]*> nop
++0000d984 <[^>]*> nop
++0000d988 <[^>]*> nop
++0000d98c <[^>]*> nop
++0000d990 <[^>]*> nop
++0000d994 <[^>]*> nop
++0000d998 <[^>]*> nop
++0000d99c <[^>]*> nop
++0000d9a0 <[^>]*> nop
++0000d9a4 <[^>]*> nop
++0000d9a8 <[^>]*> nop
++0000d9ac <[^>]*> nop
++0000d9b0 <[^>]*> nop
++0000d9b4 <[^>]*> nop
++0000d9b8 <[^>]*> nop
++0000d9bc <[^>]*> nop
++0000d9c0 <[^>]*> nop
++0000d9c4 <[^>]*> nop
++0000d9c8 <[^>]*> nop
++0000d9cc <[^>]*> nop
++0000d9d0 <[^>]*> nop
++0000d9d4 <[^>]*> nop
++0000d9d8 <[^>]*> nop
++0000d9dc <[^>]*> nop
++0000d9e0 <[^>]*> nop
++0000d9e4 <[^>]*> nop
++0000d9e8 <[^>]*> nop
++0000d9ec <[^>]*> nop
++0000d9f0 <[^>]*> nop
++0000d9f4 <[^>]*> nop
++0000d9f8 <[^>]*> nop
++0000d9fc <[^>]*> nop
++0000da00 <[^>]*> nop
++0000da04 <[^>]*> nop
++0000da08 <[^>]*> nop
++0000da0c <[^>]*> nop
++0000da10 <[^>]*> nop
++0000da14 <[^>]*> nop
++0000da18 <[^>]*> nop
++0000da1c <[^>]*> nop
++0000da20 <[^>]*> nop
++0000da24 <[^>]*> nop
++0000da28 <[^>]*> nop
++0000da2c <[^>]*> nop
++0000da30 <[^>]*> nop
++0000da34 <[^>]*> nop
++0000da38 <[^>]*> nop
++0000da3c <[^>]*> nop
++0000da40 <[^>]*> nop
++0000da44 <[^>]*> nop
++0000da48 <[^>]*> nop
++0000da4c <[^>]*> nop
++0000da50 <[^>]*> nop
++0000da54 <[^>]*> nop
++0000da58 <[^>]*> nop
++0000da5c <[^>]*> nop
++0000da60 <[^>]*> nop
++0000da64 <[^>]*> nop
++0000da68 <[^>]*> nop
++0000da6c <[^>]*> nop
++0000da70 <[^>]*> nop
++0000da74 <[^>]*> nop
++0000da78 <[^>]*> nop
++0000da7c <[^>]*> nop
++0000da80 <[^>]*> nop
++0000da84 <[^>]*> nop
++0000da88 <[^>]*> nop
++0000da8c <[^>]*> nop
++0000da90 <[^>]*> nop
++0000da94 <[^>]*> nop
++0000da98 <[^>]*> nop
++0000da9c <[^>]*> nop
++0000daa0 <[^>]*> nop
++0000daa4 <[^>]*> nop
++0000daa8 <[^>]*> nop
++0000daac <[^>]*> nop
++0000dab0 <[^>]*> nop
++0000dab4 <[^>]*> nop
++0000dab8 <[^>]*> nop
++0000dabc <[^>]*> nop
++0000dac0 <[^>]*> nop
++0000dac4 <[^>]*> nop
++0000dac8 <[^>]*> nop
++0000dacc <[^>]*> nop
++0000dad0 <[^>]*> nop
++0000dad4 <[^>]*> nop
++0000dad8 <[^>]*> nop
++0000dadc <[^>]*> nop
++0000dae0 <[^>]*> nop
++0000dae4 <[^>]*> nop
++0000dae8 <[^>]*> nop
++0000daec <[^>]*> nop
++0000daf0 <[^>]*> nop
++0000daf4 <[^>]*> nop
++0000daf8 <[^>]*> nop
++0000dafc <[^>]*> nop
++0000db00 <[^>]*> nop
++0000db04 <[^>]*> nop
++0000db08 <[^>]*> nop
++0000db0c <[^>]*> nop
++0000db10 <[^>]*> nop
++0000db14 <[^>]*> nop
++0000db18 <[^>]*> nop
++0000db1c <[^>]*> nop
++0000db20 <[^>]*> nop
++0000db24 <[^>]*> nop
++0000db28 <[^>]*> nop
++0000db2c <[^>]*> nop
++0000db30 <[^>]*> nop
++0000db34 <[^>]*> nop
++0000db38 <[^>]*> nop
++0000db3c <[^>]*> nop
++0000db40 <[^>]*> nop
++0000db44 <[^>]*> nop
++0000db48 <[^>]*> nop
++0000db4c <[^>]*> nop
++0000db50 <[^>]*> nop
++0000db54 <[^>]*> nop
++0000db58 <[^>]*> nop
++0000db5c <[^>]*> nop
++0000db60 <[^>]*> nop
++0000db64 <[^>]*> nop
++0000db68 <[^>]*> nop
++0000db6c <[^>]*> nop
++0000db70 <[^>]*> nop
++0000db74 <[^>]*> nop
++0000db78 <[^>]*> nop
++0000db7c <[^>]*> nop
++0000db80 <[^>]*> nop
++0000db84 <[^>]*> nop
++0000db88 <[^>]*> nop
++0000db8c <[^>]*> nop
++0000db90 <[^>]*> nop
++0000db94 <[^>]*> nop
++0000db98 <[^>]*> nop
++0000db9c <[^>]*> nop
++0000dba0 <[^>]*> nop
++0000dba4 <[^>]*> nop
++0000dba8 <[^>]*> nop
++0000dbac <[^>]*> nop
++0000dbb0 <[^>]*> nop
++0000dbb4 <[^>]*> nop
++0000dbb8 <[^>]*> nop
++0000dbbc <[^>]*> nop
++0000dbc0 <[^>]*> nop
++0000dbc4 <[^>]*> nop
++0000dbc8 <[^>]*> nop
++0000dbcc <[^>]*> nop
++0000dbd0 <[^>]*> nop
++0000dbd4 <[^>]*> nop
++0000dbd8 <[^>]*> nop
++0000dbdc <[^>]*> nop
++0000dbe0 <[^>]*> nop
++0000dbe4 <[^>]*> nop
++0000dbe8 <[^>]*> nop
++0000dbec <[^>]*> nop
++0000dbf0 <[^>]*> nop
++0000dbf4 <[^>]*> nop
++0000dbf8 <[^>]*> nop
++0000dbfc <[^>]*> nop
++0000dc00 <[^>]*> nop
++0000dc04 <[^>]*> nop
++0000dc08 <[^>]*> nop
++0000dc0c <[^>]*> nop
++0000dc10 <[^>]*> nop
++0000dc14 <[^>]*> nop
++0000dc18 <[^>]*> nop
++0000dc1c <[^>]*> nop
++0000dc20 <[^>]*> nop
++0000dc24 <[^>]*> nop
++0000dc28 <[^>]*> nop
++0000dc2c <[^>]*> nop
++0000dc30 <[^>]*> nop
++0000dc34 <[^>]*> nop
++0000dc38 <[^>]*> nop
++0000dc3c <[^>]*> nop
++0000dc40 <[^>]*> nop
++0000dc44 <[^>]*> nop
++0000dc48 <[^>]*> nop
++0000dc4c <[^>]*> nop
++0000dc50 <[^>]*> nop
++0000dc54 <[^>]*> nop
++0000dc58 <[^>]*> nop
++0000dc5c <[^>]*> nop
++0000dc60 <[^>]*> nop
++0000dc64 <[^>]*> nop
++0000dc68 <[^>]*> nop
++0000dc6c <[^>]*> nop
++0000dc70 <[^>]*> nop
++0000dc74 <[^>]*> nop
++0000dc78 <[^>]*> nop
++0000dc7c <[^>]*> nop
++0000dc80 <[^>]*> nop
++0000dc84 <[^>]*> nop
++0000dc88 <[^>]*> nop
++0000dc8c <[^>]*> nop
++0000dc90 <[^>]*> nop
++0000dc94 <[^>]*> nop
++0000dc98 <[^>]*> nop
++0000dc9c <[^>]*> nop
++0000dca0 <[^>]*> nop
++0000dca4 <[^>]*> nop
++0000dca8 <[^>]*> nop
++0000dcac <[^>]*> nop
++0000dcb0 <[^>]*> nop
++0000dcb4 <[^>]*> nop
++0000dcb8 <[^>]*> nop
++0000dcbc <[^>]*> nop
++0000dcc0 <[^>]*> nop
++0000dcc4 <[^>]*> nop
++0000dcc8 <[^>]*> nop
++0000dccc <[^>]*> nop
++0000dcd0 <[^>]*> nop
++0000dcd4 <[^>]*> nop
++0000dcd8 <[^>]*> nop
++0000dcdc <[^>]*> nop
++0000dce0 <[^>]*> nop
++0000dce4 <[^>]*> nop
++0000dce8 <[^>]*> nop
++0000dcec <[^>]*> nop
++0000dcf0 <[^>]*> nop
++0000dcf4 <[^>]*> nop
++0000dcf8 <[^>]*> nop
++0000dcfc <[^>]*> nop
++0000dd00 <[^>]*> nop
++0000dd04 <[^>]*> nop
++0000dd08 <[^>]*> nop
++0000dd0c <[^>]*> nop
++0000dd10 <[^>]*> nop
++0000dd14 <[^>]*> nop
++0000dd18 <[^>]*> nop
++0000dd1c <[^>]*> nop
++0000dd20 <[^>]*> nop
++0000dd24 <[^>]*> nop
++0000dd28 <[^>]*> nop
++0000dd2c <[^>]*> nop
++0000dd30 <[^>]*> nop
++0000dd34 <[^>]*> nop
++0000dd38 <[^>]*> nop
++0000dd3c <[^>]*> nop
++0000dd40 <[^>]*> nop
++0000dd44 <[^>]*> nop
++0000dd48 <[^>]*> nop
++0000dd4c <[^>]*> nop
++0000dd50 <[^>]*> nop
++0000dd54 <[^>]*> nop
++0000dd58 <[^>]*> nop
++0000dd5c <[^>]*> nop
++0000dd60 <[^>]*> nop
++0000dd64 <[^>]*> nop
++0000dd68 <[^>]*> nop
++0000dd6c <[^>]*> nop
++0000dd70 <[^>]*> nop
++0000dd74 <[^>]*> nop
++0000dd78 <[^>]*> nop
++0000dd7c <[^>]*> nop
++0000dd80 <[^>]*> nop
++0000dd84 <[^>]*> nop
++0000dd88 <[^>]*> nop
++0000dd8c <[^>]*> nop
++0000dd90 <[^>]*> nop
++0000dd94 <[^>]*> nop
++0000dd98 <[^>]*> nop
++0000dd9c <[^>]*> nop
++0000dda0 <[^>]*> nop
++0000dda4 <[^>]*> nop
++0000dda8 <[^>]*> nop
++0000ddac <[^>]*> nop
++0000ddb0 <[^>]*> nop
++0000ddb4 <[^>]*> nop
++0000ddb8 <[^>]*> nop
++0000ddbc <[^>]*> nop
++0000ddc0 <[^>]*> nop
++0000ddc4 <[^>]*> nop
++0000ddc8 <[^>]*> nop
++0000ddcc <[^>]*> nop
++0000ddd0 <[^>]*> nop
++0000ddd4 <[^>]*> nop
++0000ddd8 <[^>]*> nop
++0000dddc <[^>]*> nop
++0000dde0 <[^>]*> nop
++0000dde4 <[^>]*> nop
++0000dde8 <[^>]*> nop
++0000ddec <[^>]*> nop
++0000ddf0 <[^>]*> nop
++0000ddf4 <[^>]*> nop
++0000ddf8 <[^>]*> nop
++0000ddfc <[^>]*> nop
++0000de00 <[^>]*> nop
++0000de04 <[^>]*> nop
++0000de08 <[^>]*> nop
++0000de0c <[^>]*> nop
++0000de10 <[^>]*> nop
++0000de14 <[^>]*> nop
++0000de18 <[^>]*> nop
++0000de1c <[^>]*> nop
++0000de20 <[^>]*> nop
++0000de24 <[^>]*> nop
++0000de28 <[^>]*> nop
++0000de2c <[^>]*> nop
++0000de30 <[^>]*> nop
++0000de34 <[^>]*> nop
++0000de38 <[^>]*> nop
++0000de3c <[^>]*> nop
++0000de40 <[^>]*> nop
++0000de44 <[^>]*> nop
++0000de48 <[^>]*> nop
++0000de4c <[^>]*> nop
++0000de50 <[^>]*> nop
++0000de54 <[^>]*> nop
++0000de58 <[^>]*> nop
++0000de5c <[^>]*> nop
++0000de60 <[^>]*> nop
++0000de64 <[^>]*> nop
++0000de68 <[^>]*> nop
++0000de6c <[^>]*> nop
++0000de70 <[^>]*> nop
++0000de74 <[^>]*> nop
++0000de78 <[^>]*> nop
++0000de7c <[^>]*> nop
++0000de80 <[^>]*> nop
++0000de84 <[^>]*> nop
++0000de88 <[^>]*> nop
++0000de8c <[^>]*> nop
++0000de90 <[^>]*> nop
++0000de94 <[^>]*> nop
++0000de98 <[^>]*> nop
++0000de9c <[^>]*> nop
++0000dea0 <[^>]*> nop
++0000dea4 <[^>]*> nop
++0000dea8 <[^>]*> nop
++0000deac <[^>]*> nop
++0000deb0 <[^>]*> nop
++0000deb4 <[^>]*> nop
++0000deb8 <[^>]*> nop
++0000debc <[^>]*> nop
++0000dec0 <[^>]*> nop
++0000dec4 <[^>]*> nop
++0000dec8 <[^>]*> nop
++0000decc <[^>]*> nop
++0000ded0 <[^>]*> nop
++0000ded4 <[^>]*> nop
++0000ded8 <[^>]*> nop
++0000dedc <[^>]*> nop
++0000dee0 <[^>]*> nop
++0000dee4 <[^>]*> nop
++0000dee8 <[^>]*> nop
++0000deec <[^>]*> nop
++0000def0 <[^>]*> nop
++0000def4 <[^>]*> nop
++0000def8 <[^>]*> nop
++0000defc <[^>]*> nop
++0000df00 <[^>]*> nop
++0000df04 <[^>]*> nop
++0000df08 <[^>]*> nop
++0000df0c <[^>]*> nop
++0000df10 <[^>]*> nop
++0000df14 <[^>]*> nop
++0000df18 <[^>]*> nop
++0000df1c <[^>]*> nop
++0000df20 <[^>]*> nop
++0000df24 <[^>]*> nop
++0000df28 <[^>]*> nop
++0000df2c <[^>]*> nop
++0000df30 <[^>]*> nop
++0000df34 <[^>]*> nop
++0000df38 <[^>]*> nop
++0000df3c <[^>]*> nop
++0000df40 <[^>]*> nop
++0000df44 <[^>]*> nop
++0000df48 <[^>]*> nop
++0000df4c <[^>]*> nop
++0000df50 <[^>]*> nop
++0000df54 <[^>]*> nop
++0000df58 <[^>]*> nop
++0000df5c <[^>]*> nop
++0000df60 <[^>]*> nop
++0000df64 <[^>]*> nop
++0000df68 <[^>]*> nop
++0000df6c <[^>]*> nop
++0000df70 <[^>]*> nop
++0000df74 <[^>]*> nop
++0000df78 <[^>]*> nop
++0000df7c <[^>]*> nop
++0000df80 <[^>]*> nop
++0000df84 <[^>]*> nop
++0000df88 <[^>]*> nop
++0000df8c <[^>]*> nop
++0000df90 <[^>]*> nop
++0000df94 <[^>]*> nop
++0000df98 <[^>]*> nop
++0000df9c <[^>]*> nop
++0000dfa0 <[^>]*> nop
++0000dfa4 <[^>]*> nop
++0000dfa8 <[^>]*> nop
++0000dfac <[^>]*> nop
++0000dfb0 <[^>]*> nop
++0000dfb4 <[^>]*> nop
++0000dfb8 <[^>]*> nop
++0000dfbc <[^>]*> nop
++0000dfc0 <[^>]*> nop
++0000dfc4 <[^>]*> nop
++0000dfc8 <[^>]*> nop
++0000dfcc <[^>]*> nop
++0000dfd0 <[^>]*> nop
++0000dfd4 <[^>]*> nop
++0000dfd8 <[^>]*> nop
++0000dfdc <[^>]*> nop
++0000dfe0 <[^>]*> nop
++0000dfe4 <[^>]*> nop
++0000dfe8 <[^>]*> nop
++0000dfec <[^>]*> nop
++0000dff0 <[^>]*> nop
++0000dff4 <[^>]*> nop
++0000dff8 <[^>]*> nop
++0000dffc <[^>]*> nop
++0000e000 <[^>]*> nop
++0000e004 <[^>]*> nop
++0000e008 <[^>]*> nop
++0000e00c <[^>]*> nop
++0000e010 <[^>]*> nop
++0000e014 <[^>]*> nop
++0000e018 <[^>]*> nop
++0000e01c <[^>]*> nop
++0000e020 <[^>]*> nop
++0000e024 <[^>]*> nop
++0000e028 <[^>]*> nop
++0000e02c <[^>]*> nop
++0000e030 <[^>]*> nop
++0000e034 <[^>]*> nop
++0000e038 <[^>]*> nop
++0000e03c <[^>]*> nop
++0000e040 <[^>]*> nop
++0000e044 <[^>]*> nop
++0000e048 <[^>]*> nop
++0000e04c <[^>]*> nop
++0000e050 <[^>]*> nop
++0000e054 <[^>]*> nop
++0000e058 <[^>]*> nop
++0000e05c <[^>]*> nop
++0000e060 <[^>]*> nop
++0000e064 <[^>]*> nop
++0000e068 <[^>]*> nop
++0000e06c <[^>]*> nop
++0000e070 <[^>]*> nop
++0000e074 <[^>]*> nop
++0000e078 <[^>]*> nop
++0000e07c <[^>]*> nop
++0000e080 <[^>]*> nop
++0000e084 <[^>]*> nop
++0000e088 <[^>]*> nop
++0000e08c <[^>]*> nop
++0000e090 <[^>]*> nop
++0000e094 <[^>]*> nop
++0000e098 <[^>]*> nop
++0000e09c <[^>]*> nop
++0000e0a0 <[^>]*> nop
++0000e0a4 <[^>]*> nop
++0000e0a8 <[^>]*> nop
++0000e0ac <[^>]*> nop
++0000e0b0 <[^>]*> nop
++0000e0b4 <[^>]*> nop
++0000e0b8 <[^>]*> nop
++0000e0bc <[^>]*> nop
++0000e0c0 <[^>]*> nop
++0000e0c4 <[^>]*> nop
++0000e0c8 <[^>]*> nop
++0000e0cc <[^>]*> nop
++0000e0d0 <[^>]*> nop
++0000e0d4 <[^>]*> nop
++0000e0d8 <[^>]*> nop
++0000e0dc <[^>]*> nop
++0000e0e0 <[^>]*> nop
++0000e0e4 <[^>]*> nop
++0000e0e8 <[^>]*> nop
++0000e0ec <[^>]*> nop
++0000e0f0 <[^>]*> nop
++0000e0f4 <[^>]*> nop
++0000e0f8 <[^>]*> nop
++0000e0fc <[^>]*> nop
++0000e100 <[^>]*> nop
++0000e104 <[^>]*> nop
++0000e108 <[^>]*> nop
++0000e10c <[^>]*> nop
++0000e110 <[^>]*> nop
++0000e114 <[^>]*> nop
++0000e118 <[^>]*> nop
++0000e11c <[^>]*> nop
++0000e120 <[^>]*> nop
++0000e124 <[^>]*> nop
++0000e128 <[^>]*> nop
++0000e12c <[^>]*> nop
++0000e130 <[^>]*> nop
++0000e134 <[^>]*> nop
++0000e138 <[^>]*> nop
++0000e13c <[^>]*> nop
++0000e140 <[^>]*> nop
++0000e144 <[^>]*> nop
++0000e148 <[^>]*> nop
++0000e14c <[^>]*> nop
++0000e150 <[^>]*> nop
++0000e154 <[^>]*> nop
++0000e158 <[^>]*> nop
++0000e15c <[^>]*> nop
++0000e160 <[^>]*> nop
++0000e164 <[^>]*> nop
++0000e168 <[^>]*> nop
++0000e16c <[^>]*> nop
++0000e170 <[^>]*> nop
++0000e174 <[^>]*> nop
++0000e178 <[^>]*> nop
++0000e17c <[^>]*> nop
++0000e180 <[^>]*> nop
++0000e184 <[^>]*> nop
++0000e188 <[^>]*> nop
++0000e18c <[^>]*> nop
++0000e190 <[^>]*> nop
++0000e194 <[^>]*> nop
++0000e198 <[^>]*> nop
++0000e19c <[^>]*> nop
++0000e1a0 <[^>]*> nop
++0000e1a4 <[^>]*> nop
++0000e1a8 <[^>]*> nop
++0000e1ac <[^>]*> nop
++0000e1b0 <[^>]*> nop
++0000e1b4 <[^>]*> nop
++0000e1b8 <[^>]*> nop
++0000e1bc <[^>]*> nop
++0000e1c0 <[^>]*> nop
++0000e1c4 <[^>]*> nop
++0000e1c8 <[^>]*> nop
++0000e1cc <[^>]*> nop
++0000e1d0 <[^>]*> nop
++0000e1d4 <[^>]*> nop
++0000e1d8 <[^>]*> nop
++0000e1dc <[^>]*> nop
++0000e1e0 <[^>]*> nop
++0000e1e4 <[^>]*> nop
++0000e1e8 <[^>]*> nop
++0000e1ec <[^>]*> nop
++0000e1f0 <[^>]*> nop
++0000e1f4 <[^>]*> nop
++0000e1f8 <[^>]*> nop
++0000e1fc <[^>]*> nop
++0000e200 <[^>]*> nop
++0000e204 <[^>]*> nop
++0000e208 <[^>]*> nop
++0000e20c <[^>]*> nop
++0000e210 <[^>]*> nop
++0000e214 <[^>]*> nop
++0000e218 <[^>]*> nop
++0000e21c <[^>]*> nop
++0000e220 <[^>]*> nop
++0000e224 <[^>]*> nop
++0000e228 <[^>]*> nop
++0000e22c <[^>]*> nop
++0000e230 <[^>]*> nop
++0000e234 <[^>]*> nop
++0000e238 <[^>]*> nop
++0000e23c <[^>]*> nop
++0000e240 <[^>]*> nop
++0000e244 <[^>]*> nop
++0000e248 <[^>]*> nop
++0000e24c <[^>]*> nop
++0000e250 <[^>]*> nop
++0000e254 <[^>]*> nop
++0000e258 <[^>]*> nop
++0000e25c <[^>]*> nop
++0000e260 <[^>]*> nop
++0000e264 <[^>]*> nop
++0000e268 <[^>]*> nop
++0000e26c <[^>]*> nop
++0000e270 <[^>]*> nop
++0000e274 <[^>]*> nop
++0000e278 <[^>]*> nop
++0000e27c <[^>]*> nop
++0000e280 <[^>]*> nop
++0000e284 <[^>]*> nop
++0000e288 <[^>]*> nop
++0000e28c <[^>]*> nop
++0000e290 <[^>]*> nop
++0000e294 <[^>]*> nop
++0000e298 <[^>]*> nop
++0000e29c <[^>]*> nop
++0000e2a0 <[^>]*> nop
++0000e2a4 <[^>]*> nop
++0000e2a8 <[^>]*> nop
++0000e2ac <[^>]*> nop
++0000e2b0 <[^>]*> nop
++0000e2b4 <[^>]*> nop
++0000e2b8 <[^>]*> nop
++0000e2bc <[^>]*> nop
++0000e2c0 <[^>]*> nop
++0000e2c4 <[^>]*> nop
++0000e2c8 <[^>]*> nop
++0000e2cc <[^>]*> nop
++0000e2d0 <[^>]*> nop
++0000e2d4 <[^>]*> nop
++0000e2d8 <[^>]*> nop
++0000e2dc <[^>]*> nop
++0000e2e0 <[^>]*> nop
++0000e2e4 <[^>]*> nop
++0000e2e8 <[^>]*> nop
++0000e2ec <[^>]*> nop
++0000e2f0 <[^>]*> nop
++0000e2f4 <[^>]*> nop
++0000e2f8 <[^>]*> nop
++0000e2fc <[^>]*> nop
++0000e300 <[^>]*> nop
++0000e304 <[^>]*> nop
++0000e308 <[^>]*> nop
++0000e30c <[^>]*> nop
++0000e310 <[^>]*> nop
++0000e314 <[^>]*> nop
++0000e318 <[^>]*> nop
++0000e31c <[^>]*> nop
++0000e320 <[^>]*> nop
++0000e324 <[^>]*> nop
++0000e328 <[^>]*> nop
++0000e32c <[^>]*> nop
++0000e330 <[^>]*> nop
++0000e334 <[^>]*> nop
++0000e338 <[^>]*> nop
++0000e33c <[^>]*> nop
++0000e340 <[^>]*> nop
++0000e344 <[^>]*> nop
++0000e348 <[^>]*> nop
++0000e34c <[^>]*> nop
++0000e350 <[^>]*> nop
++0000e354 <[^>]*> nop
++0000e358 <[^>]*> nop
++0000e35c <[^>]*> nop
++0000e360 <[^>]*> nop
++0000e364 <[^>]*> nop
++0000e368 <[^>]*> nop
++0000e36c <[^>]*> nop
++0000e370 <[^>]*> nop
++0000e374 <[^>]*> nop
++0000e378 <[^>]*> nop
++0000e37c <[^>]*> nop
++0000e380 <[^>]*> nop
++0000e384 <[^>]*> nop
++0000e388 <[^>]*> nop
++0000e38c <[^>]*> nop
++0000e390 <[^>]*> nop
++0000e394 <[^>]*> nop
++0000e398 <[^>]*> nop
++0000e39c <[^>]*> nop
++0000e3a0 <[^>]*> nop
++0000e3a4 <[^>]*> nop
++0000e3a8 <[^>]*> nop
++0000e3ac <[^>]*> nop
++0000e3b0 <[^>]*> nop
++0000e3b4 <[^>]*> nop
++0000e3b8 <[^>]*> nop
++0000e3bc <[^>]*> nop
++0000e3c0 <[^>]*> nop
++0000e3c4 <[^>]*> nop
++0000e3c8 <[^>]*> nop
++0000e3cc <[^>]*> nop
++0000e3d0 <[^>]*> nop
++0000e3d4 <[^>]*> nop
++0000e3d8 <[^>]*> nop
++0000e3dc <[^>]*> nop
++0000e3e0 <[^>]*> nop
++0000e3e4 <[^>]*> nop
++0000e3e8 <[^>]*> nop
++0000e3ec <[^>]*> nop
++0000e3f0 <[^>]*> nop
++0000e3f4 <[^>]*> nop
++0000e3f8 <[^>]*> nop
++0000e3fc <[^>]*> nop
++0000e400 <[^>]*> nop
++0000e404 <[^>]*> nop
++0000e408 <[^>]*> nop
++0000e40c <[^>]*> nop
++0000e410 <[^>]*> nop
++0000e414 <[^>]*> nop
++0000e418 <[^>]*> nop
++0000e41c <[^>]*> nop
++0000e420 <[^>]*> nop
++0000e424 <[^>]*> nop
++0000e428 <[^>]*> nop
++0000e42c <[^>]*> nop
++0000e430 <[^>]*> nop
++0000e434 <[^>]*> nop
++0000e438 <[^>]*> nop
++0000e43c <[^>]*> nop
++0000e440 <[^>]*> nop
++0000e444 <[^>]*> nop
++0000e448 <[^>]*> nop
++0000e44c <[^>]*> nop
++0000e450 <[^>]*> nop
++0000e454 <[^>]*> nop
++0000e458 <[^>]*> nop
++0000e45c <[^>]*> nop
++0000e460 <[^>]*> nop
++0000e464 <[^>]*> nop
++0000e468 <[^>]*> nop
++0000e46c <[^>]*> nop
++0000e470 <[^>]*> nop
++0000e474 <[^>]*> nop
++0000e478 <[^>]*> nop
++0000e47c <[^>]*> nop
++0000e480 <[^>]*> nop
++0000e484 <[^>]*> nop
++0000e488 <[^>]*> nop
++0000e48c <[^>]*> nop
++0000e490 <[^>]*> nop
++0000e494 <[^>]*> nop
++0000e498 <[^>]*> nop
++0000e49c <[^>]*> nop
++0000e4a0 <[^>]*> nop
++0000e4a4 <[^>]*> nop
++0000e4a8 <[^>]*> nop
++0000e4ac <[^>]*> nop
++0000e4b0 <[^>]*> nop
++0000e4b4 <[^>]*> nop
++0000e4b8 <[^>]*> nop
++0000e4bc <[^>]*> nop
++0000e4c0 <[^>]*> nop
++0000e4c4 <[^>]*> nop
++0000e4c8 <[^>]*> nop
++0000e4cc <[^>]*> nop
++0000e4d0 <[^>]*> nop
++0000e4d4 <[^>]*> nop
++0000e4d8 <[^>]*> nop
++0000e4dc <[^>]*> nop
++0000e4e0 <[^>]*> nop
++0000e4e4 <[^>]*> nop
++0000e4e8 <[^>]*> nop
++0000e4ec <[^>]*> nop
++0000e4f0 <[^>]*> nop
++0000e4f4 <[^>]*> nop
++0000e4f8 <[^>]*> nop
++0000e4fc <[^>]*> nop
++0000e500 <[^>]*> nop
++0000e504 <[^>]*> nop
++0000e508 <[^>]*> nop
++0000e50c <[^>]*> nop
++0000e510 <[^>]*> nop
++0000e514 <[^>]*> nop
++0000e518 <[^>]*> nop
++0000e51c <[^>]*> nop
++0000e520 <[^>]*> nop
++0000e524 <[^>]*> nop
++0000e528 <[^>]*> nop
++0000e52c <[^>]*> nop
++0000e530 <[^>]*> nop
++0000e534 <[^>]*> nop
++0000e538 <[^>]*> nop
++0000e53c <[^>]*> nop
++0000e540 <[^>]*> nop
++0000e544 <[^>]*> nop
++0000e548 <[^>]*> nop
++0000e54c <[^>]*> nop
++0000e550 <[^>]*> nop
++0000e554 <[^>]*> nop
++0000e558 <[^>]*> nop
++0000e55c <[^>]*> nop
++0000e560 <[^>]*> nop
++0000e564 <[^>]*> nop
++0000e568 <[^>]*> nop
++0000e56c <[^>]*> nop
++0000e570 <[^>]*> nop
++0000e574 <[^>]*> nop
++0000e578 <[^>]*> nop
++0000e57c <[^>]*> nop
++0000e580 <[^>]*> nop
++0000e584 <[^>]*> nop
++0000e588 <[^>]*> nop
++0000e58c <[^>]*> nop
++0000e590 <[^>]*> nop
++0000e594 <[^>]*> nop
++0000e598 <[^>]*> nop
++0000e59c <[^>]*> nop
++0000e5a0 <[^>]*> nop
++0000e5a4 <[^>]*> nop
++0000e5a8 <[^>]*> nop
++0000e5ac <[^>]*> nop
++0000e5b0 <[^>]*> nop
++0000e5b4 <[^>]*> nop
++0000e5b8 <[^>]*> nop
++0000e5bc <[^>]*> nop
++0000e5c0 <[^>]*> nop
++0000e5c4 <[^>]*> nop
++0000e5c8 <[^>]*> nop
++0000e5cc <[^>]*> nop
++0000e5d0 <[^>]*> nop
++0000e5d4 <[^>]*> nop
++0000e5d8 <[^>]*> nop
++0000e5dc <[^>]*> nop
++0000e5e0 <[^>]*> nop
++0000e5e4 <[^>]*> nop
++0000e5e8 <[^>]*> nop
++0000e5ec <[^>]*> nop
++0000e5f0 <[^>]*> nop
++0000e5f4 <[^>]*> nop
++0000e5f8 <[^>]*> nop
++0000e5fc <[^>]*> nop
++0000e600 <[^>]*> nop
++0000e604 <[^>]*> nop
++0000e608 <[^>]*> nop
++0000e60c <[^>]*> nop
++0000e610 <[^>]*> nop
++0000e614 <[^>]*> nop
++0000e618 <[^>]*> nop
++0000e61c <[^>]*> nop
++0000e620 <[^>]*> nop
++0000e624 <[^>]*> nop
++0000e628 <[^>]*> nop
++0000e62c <[^>]*> nop
++0000e630 <[^>]*> nop
++0000e634 <[^>]*> nop
++0000e638 <[^>]*> nop
++0000e63c <[^>]*> nop
++0000e640 <[^>]*> nop
++0000e644 <[^>]*> nop
++0000e648 <[^>]*> nop
++0000e64c <[^>]*> nop
++0000e650 <[^>]*> nop
++0000e654 <[^>]*> nop
++0000e658 <[^>]*> nop
++0000e65c <[^>]*> nop
++0000e660 <[^>]*> nop
++0000e664 <[^>]*> nop
++0000e668 <[^>]*> nop
++0000e66c <[^>]*> nop
++0000e670 <[^>]*> nop
++0000e674 <[^>]*> nop
++0000e678 <[^>]*> nop
++0000e67c <[^>]*> nop
++0000e680 <[^>]*> nop
++0000e684 <[^>]*> nop
++0000e688 <[^>]*> nop
++0000e68c <[^>]*> nop
++0000e690 <[^>]*> nop
++0000e694 <[^>]*> nop
++0000e698 <[^>]*> nop
++0000e69c <[^>]*> nop
++0000e6a0 <[^>]*> nop
++0000e6a4 <[^>]*> nop
++0000e6a8 <[^>]*> nop
++0000e6ac <[^>]*> nop
++0000e6b0 <[^>]*> nop
++0000e6b4 <[^>]*> nop
++0000e6b8 <[^>]*> nop
++0000e6bc <[^>]*> nop
++0000e6c0 <[^>]*> nop
++0000e6c4 <[^>]*> nop
++0000e6c8 <[^>]*> nop
++0000e6cc <[^>]*> nop
++0000e6d0 <[^>]*> nop
++0000e6d4 <[^>]*> nop
++0000e6d8 <[^>]*> nop
++0000e6dc <[^>]*> nop
++0000e6e0 <[^>]*> nop
++0000e6e4 <[^>]*> nop
++0000e6e8 <[^>]*> nop
++0000e6ec <[^>]*> nop
++0000e6f0 <[^>]*> nop
++0000e6f4 <[^>]*> nop
++0000e6f8 <[^>]*> nop
++0000e6fc <[^>]*> nop
++0000e700 <[^>]*> nop
++0000e704 <[^>]*> nop
++0000e708 <[^>]*> nop
++0000e70c <[^>]*> nop
++0000e710 <[^>]*> nop
++0000e714 <[^>]*> nop
++0000e718 <[^>]*> nop
++0000e71c <[^>]*> nop
++0000e720 <[^>]*> nop
++0000e724 <[^>]*> nop
++0000e728 <[^>]*> nop
++0000e72c <[^>]*> nop
++0000e730 <[^>]*> nop
++0000e734 <[^>]*> nop
++0000e738 <[^>]*> nop
++0000e73c <[^>]*> nop
++0000e740 <[^>]*> nop
++0000e744 <[^>]*> nop
++0000e748 <[^>]*> nop
++0000e74c <[^>]*> nop
++0000e750 <[^>]*> nop
++0000e754 <[^>]*> nop
++0000e758 <[^>]*> nop
++0000e75c <[^>]*> nop
++0000e760 <[^>]*> nop
++0000e764 <[^>]*> nop
++0000e768 <[^>]*> nop
++0000e76c <[^>]*> nop
++0000e770 <[^>]*> nop
++0000e774 <[^>]*> nop
++0000e778 <[^>]*> nop
++0000e77c <[^>]*> nop
++0000e780 <[^>]*> nop
++0000e784 <[^>]*> nop
++0000e788 <[^>]*> nop
++0000e78c <[^>]*> nop
++0000e790 <[^>]*> nop
++0000e794 <[^>]*> nop
++0000e798 <[^>]*> nop
++0000e79c <[^>]*> nop
++0000e7a0 <[^>]*> nop
++0000e7a4 <[^>]*> nop
++0000e7a8 <[^>]*> nop
++0000e7ac <[^>]*> nop
++0000e7b0 <[^>]*> nop
++0000e7b4 <[^>]*> nop
++0000e7b8 <[^>]*> nop
++0000e7bc <[^>]*> nop
++0000e7c0 <[^>]*> nop
++0000e7c4 <[^>]*> nop
++0000e7c8 <[^>]*> nop
++0000e7cc <[^>]*> nop
++0000e7d0 <[^>]*> nop
++0000e7d4 <[^>]*> nop
++0000e7d8 <[^>]*> nop
++0000e7dc <[^>]*> nop
++0000e7e0 <[^>]*> nop
++0000e7e4 <[^>]*> nop
++0000e7e8 <[^>]*> nop
++0000e7ec <[^>]*> nop
++0000e7f0 <[^>]*> nop
++0000e7f4 <[^>]*> nop
++0000e7f8 <[^>]*> nop
++0000e7fc <[^>]*> nop
++0000e800 <[^>]*> nop
++0000e804 <[^>]*> nop
++0000e808 <[^>]*> nop
++0000e80c <[^>]*> nop
++0000e810 <[^>]*> nop
++0000e814 <[^>]*> nop
++0000e818 <[^>]*> nop
++0000e81c <[^>]*> nop
++0000e820 <[^>]*> nop
++0000e824 <[^>]*> nop
++0000e828 <[^>]*> nop
++0000e82c <[^>]*> nop
++0000e830 <[^>]*> nop
++0000e834 <[^>]*> nop
++0000e838 <[^>]*> nop
++0000e83c <[^>]*> nop
++0000e840 <[^>]*> nop
++0000e844 <[^>]*> nop
++0000e848 <[^>]*> nop
++0000e84c <[^>]*> nop
++0000e850 <[^>]*> nop
++0000e854 <[^>]*> nop
++0000e858 <[^>]*> nop
++0000e85c <[^>]*> nop
++0000e860 <[^>]*> nop
++0000e864 <[^>]*> nop
++0000e868 <[^>]*> nop
++0000e86c <[^>]*> nop
++0000e870 <[^>]*> nop
++0000e874 <[^>]*> nop
++0000e878 <[^>]*> nop
++0000e87c <[^>]*> nop
++0000e880 <[^>]*> nop
++0000e884 <[^>]*> nop
++0000e888 <[^>]*> nop
++0000e88c <[^>]*> nop
++0000e890 <[^>]*> nop
++0000e894 <[^>]*> nop
++0000e898 <[^>]*> nop
++0000e89c <[^>]*> nop
++0000e8a0 <[^>]*> nop
++0000e8a4 <[^>]*> nop
++0000e8a8 <[^>]*> nop
++0000e8ac <[^>]*> nop
++0000e8b0 <[^>]*> nop
++0000e8b4 <[^>]*> nop
++0000e8b8 <[^>]*> nop
++0000e8bc <[^>]*> nop
++0000e8c0 <[^>]*> nop
++0000e8c4 <[^>]*> nop
++0000e8c8 <[^>]*> nop
++0000e8cc <[^>]*> nop
++0000e8d0 <[^>]*> nop
++0000e8d4 <[^>]*> nop
++0000e8d8 <[^>]*> nop
++0000e8dc <[^>]*> nop
++0000e8e0 <[^>]*> nop
++0000e8e4 <[^>]*> nop
++0000e8e8 <[^>]*> nop
++0000e8ec <[^>]*> nop
++0000e8f0 <[^>]*> nop
++0000e8f4 <[^>]*> nop
++0000e8f8 <[^>]*> nop
++0000e8fc <[^>]*> nop
++0000e900 <[^>]*> nop
++0000e904 <[^>]*> nop
++0000e908 <[^>]*> nop
++0000e90c <[^>]*> nop
++0000e910 <[^>]*> nop
++0000e914 <[^>]*> nop
++0000e918 <[^>]*> nop
++0000e91c <[^>]*> nop
++0000e920 <[^>]*> nop
++0000e924 <[^>]*> nop
++0000e928 <[^>]*> nop
++0000e92c <[^>]*> nop
++0000e930 <[^>]*> nop
++0000e934 <[^>]*> nop
++0000e938 <[^>]*> nop
++0000e93c <[^>]*> nop
++0000e940 <[^>]*> nop
++0000e944 <[^>]*> nop
++0000e948 <[^>]*> nop
++0000e94c <[^>]*> nop
++0000e950 <[^>]*> nop
++0000e954 <[^>]*> nop
++0000e958 <[^>]*> nop
++0000e95c <[^>]*> nop
++0000e960 <[^>]*> nop
++0000e964 <[^>]*> nop
++0000e968 <[^>]*> nop
++0000e96c <[^>]*> nop
++0000e970 <[^>]*> nop
++0000e974 <[^>]*> nop
++0000e978 <[^>]*> nop
++0000e97c <[^>]*> nop
++0000e980 <[^>]*> nop
++0000e984 <[^>]*> nop
++0000e988 <[^>]*> nop
++0000e98c <[^>]*> nop
++0000e990 <[^>]*> nop
++0000e994 <[^>]*> nop
++0000e998 <[^>]*> nop
++0000e99c <[^>]*> nop
++0000e9a0 <[^>]*> nop
++0000e9a4 <[^>]*> nop
++0000e9a8 <[^>]*> nop
++0000e9ac <[^>]*> nop
++0000e9b0 <[^>]*> nop
++0000e9b4 <[^>]*> nop
++0000e9b8 <[^>]*> nop
++0000e9bc <[^>]*> nop
++0000e9c0 <[^>]*> nop
++0000e9c4 <[^>]*> nop
++0000e9c8 <[^>]*> nop
++0000e9cc <[^>]*> nop
++0000e9d0 <[^>]*> nop
++0000e9d4 <[^>]*> nop
++0000e9d8 <[^>]*> nop
++0000e9dc <[^>]*> nop
++0000e9e0 <[^>]*> nop
++0000e9e4 <[^>]*> nop
++0000e9e8 <[^>]*> nop
++0000e9ec <[^>]*> nop
++0000e9f0 <[^>]*> nop
++0000e9f4 <[^>]*> nop
++0000e9f8 <[^>]*> nop
++0000e9fc <[^>]*> nop
++0000ea00 <[^>]*> nop
++0000ea04 <[^>]*> nop
++0000ea08 <[^>]*> nop
++0000ea0c <[^>]*> nop
++0000ea10 <[^>]*> nop
++0000ea14 <[^>]*> nop
++0000ea18 <[^>]*> nop
++0000ea1c <[^>]*> nop
++0000ea20 <[^>]*> nop
++0000ea24 <[^>]*> nop
++0000ea28 <[^>]*> nop
++0000ea2c <[^>]*> nop
++0000ea30 <[^>]*> nop
++0000ea34 <[^>]*> nop
++0000ea38 <[^>]*> nop
++0000ea3c <[^>]*> nop
++0000ea40 <[^>]*> nop
++0000ea44 <[^>]*> nop
++0000ea48 <[^>]*> nop
++0000ea4c <[^>]*> nop
++0000ea50 <[^>]*> nop
++0000ea54 <[^>]*> nop
++0000ea58 <[^>]*> nop
++0000ea5c <[^>]*> nop
++0000ea60 <[^>]*> nop
++0000ea64 <[^>]*> nop
++0000ea68 <[^>]*> nop
++0000ea6c <[^>]*> nop
++0000ea70 <[^>]*> nop
++0000ea74 <[^>]*> nop
++0000ea78 <[^>]*> nop
++0000ea7c <[^>]*> nop
++0000ea80 <[^>]*> nop
++0000ea84 <[^>]*> nop
++0000ea88 <[^>]*> nop
++0000ea8c <[^>]*> nop
++0000ea90 <[^>]*> nop
++0000ea94 <[^>]*> nop
++0000ea98 <[^>]*> nop
++0000ea9c <[^>]*> nop
++0000eaa0 <[^>]*> nop
++0000eaa4 <[^>]*> nop
++0000eaa8 <[^>]*> nop
++0000eaac <[^>]*> nop
++0000eab0 <[^>]*> nop
++0000eab4 <[^>]*> nop
++0000eab8 <[^>]*> nop
++0000eabc <[^>]*> nop
++0000eac0 <[^>]*> nop
++0000eac4 <[^>]*> nop
++0000eac8 <[^>]*> nop
++0000eacc <[^>]*> nop
++0000ead0 <[^>]*> nop
++0000ead4 <[^>]*> nop
++0000ead8 <[^>]*> nop
++0000eadc <[^>]*> nop
++0000eae0 <[^>]*> nop
++0000eae4 <[^>]*> nop
++0000eae8 <[^>]*> nop
++0000eaec <[^>]*> nop
++0000eaf0 <[^>]*> nop
++0000eaf4 <[^>]*> nop
++0000eaf8 <[^>]*> nop
++0000eafc <[^>]*> nop
++0000eb00 <[^>]*> nop
++0000eb04 <[^>]*> nop
++0000eb08 <[^>]*> nop
++0000eb0c <[^>]*> nop
++0000eb10 <[^>]*> nop
++0000eb14 <[^>]*> nop
++0000eb18 <[^>]*> nop
++0000eb1c <[^>]*> nop
++0000eb20 <[^>]*> nop
++0000eb24 <[^>]*> nop
++0000eb28 <[^>]*> nop
++0000eb2c <[^>]*> nop
++0000eb30 <[^>]*> nop
++0000eb34 <[^>]*> nop
++0000eb38 <[^>]*> nop
++0000eb3c <[^>]*> nop
++0000eb40 <[^>]*> nop
++0000eb44 <[^>]*> nop
++0000eb48 <[^>]*> nop
++0000eb4c <[^>]*> nop
++0000eb50 <[^>]*> nop
++0000eb54 <[^>]*> nop
++0000eb58 <[^>]*> nop
++0000eb5c <[^>]*> nop
++0000eb60 <[^>]*> nop
++0000eb64 <[^>]*> nop
++0000eb68 <[^>]*> nop
++0000eb6c <[^>]*> nop
++0000eb70 <[^>]*> nop
++0000eb74 <[^>]*> nop
++0000eb78 <[^>]*> nop
++0000eb7c <[^>]*> nop
++0000eb80 <[^>]*> nop
++0000eb84 <[^>]*> nop
++0000eb88 <[^>]*> nop
++0000eb8c <[^>]*> nop
++0000eb90 <[^>]*> nop
++0000eb94 <[^>]*> nop
++0000eb98 <[^>]*> nop
++0000eb9c <[^>]*> nop
++0000eba0 <[^>]*> nop
++0000eba4 <[^>]*> nop
++0000eba8 <[^>]*> nop
++0000ebac <[^>]*> nop
++0000ebb0 <[^>]*> nop
++0000ebb4 <[^>]*> nop
++0000ebb8 <[^>]*> nop
++0000ebbc <[^>]*> nop
++0000ebc0 <[^>]*> nop
++0000ebc4 <[^>]*> nop
++0000ebc8 <[^>]*> nop
++0000ebcc <[^>]*> nop
++0000ebd0 <[^>]*> nop
++0000ebd4 <[^>]*> nop
++0000ebd8 <[^>]*> nop
++0000ebdc <[^>]*> nop
++0000ebe0 <[^>]*> nop
++0000ebe4 <[^>]*> nop
++0000ebe8 <[^>]*> nop
++0000ebec <[^>]*> nop
++0000ebf0 <[^>]*> nop
++0000ebf4 <[^>]*> nop
++0000ebf8 <[^>]*> nop
++0000ebfc <[^>]*> nop
++0000ec00 <[^>]*> nop
++0000ec04 <[^>]*> nop
++0000ec08 <[^>]*> nop
++0000ec0c <[^>]*> nop
++0000ec10 <[^>]*> nop
++0000ec14 <[^>]*> nop
++0000ec18 <[^>]*> nop
++0000ec1c <[^>]*> nop
++0000ec20 <[^>]*> nop
++0000ec24 <[^>]*> nop
++0000ec28 <[^>]*> nop
++0000ec2c <[^>]*> nop
++0000ec30 <[^>]*> nop
++0000ec34 <[^>]*> nop
++0000ec38 <[^>]*> nop
++0000ec3c <[^>]*> nop
++0000ec40 <[^>]*> nop
++0000ec44 <[^>]*> nop
++0000ec48 <[^>]*> nop
++0000ec4c <[^>]*> nop
++0000ec50 <[^>]*> nop
++0000ec54 <[^>]*> nop
++0000ec58 <[^>]*> nop
++0000ec5c <[^>]*> nop
++0000ec60 <[^>]*> nop
++0000ec64 <[^>]*> nop
++0000ec68 <[^>]*> nop
++0000ec6c <[^>]*> nop
++0000ec70 <[^>]*> nop
++0000ec74 <[^>]*> nop
++0000ec78 <[^>]*> nop
++0000ec7c <[^>]*> nop
++0000ec80 <[^>]*> nop
++0000ec84 <[^>]*> nop
++0000ec88 <[^>]*> nop
++0000ec8c <[^>]*> nop
++0000ec90 <[^>]*> nop
++0000ec94 <[^>]*> nop
++0000ec98 <[^>]*> nop
++0000ec9c <[^>]*> nop
++0000eca0 <[^>]*> nop
++0000eca4 <[^>]*> nop
++0000eca8 <[^>]*> nop
++0000ecac <[^>]*> nop
++0000ecb0 <[^>]*> nop
++0000ecb4 <[^>]*> nop
++0000ecb8 <[^>]*> nop
++0000ecbc <[^>]*> nop
++0000ecc0 <[^>]*> nop
++0000ecc4 <[^>]*> nop
++0000ecc8 <[^>]*> nop
++0000eccc <[^>]*> nop
++0000ecd0 <[^>]*> nop
++0000ecd4 <[^>]*> nop
++0000ecd8 <[^>]*> nop
++0000ecdc <[^>]*> nop
++0000ece0 <[^>]*> nop
++0000ece4 <[^>]*> nop
++0000ece8 <[^>]*> nop
++0000ecec <[^>]*> nop
++0000ecf0 <[^>]*> nop
++0000ecf4 <[^>]*> nop
++0000ecf8 <[^>]*> nop
++0000ecfc <[^>]*> nop
++0000ed00 <[^>]*> nop
++0000ed04 <[^>]*> nop
++0000ed08 <[^>]*> nop
++0000ed0c <[^>]*> nop
++0000ed10 <[^>]*> nop
++0000ed14 <[^>]*> nop
++0000ed18 <[^>]*> nop
++0000ed1c <[^>]*> nop
++0000ed20 <[^>]*> nop
++0000ed24 <[^>]*> nop
++0000ed28 <[^>]*> nop
++0000ed2c <[^>]*> nop
++0000ed30 <[^>]*> nop
++0000ed34 <[^>]*> nop
++0000ed38 <[^>]*> nop
++0000ed3c <[^>]*> nop
++0000ed40 <[^>]*> nop
++0000ed44 <[^>]*> nop
++0000ed48 <[^>]*> nop
++0000ed4c <[^>]*> nop
++0000ed50 <[^>]*> nop
++0000ed54 <[^>]*> nop
++0000ed58 <[^>]*> nop
++0000ed5c <[^>]*> nop
++0000ed60 <[^>]*> nop
++0000ed64 <[^>]*> nop
++0000ed68 <[^>]*> nop
++0000ed6c <[^>]*> nop
++0000ed70 <[^>]*> nop
++0000ed74 <[^>]*> nop
++0000ed78 <[^>]*> nop
++0000ed7c <[^>]*> nop
++0000ed80 <[^>]*> nop
++0000ed84 <[^>]*> nop
++0000ed88 <[^>]*> nop
++0000ed8c <[^>]*> nop
++0000ed90 <[^>]*> nop
++0000ed94 <[^>]*> nop
++0000ed98 <[^>]*> nop
++0000ed9c <[^>]*> nop
++0000eda0 <[^>]*> nop
++0000eda4 <[^>]*> nop
++0000eda8 <[^>]*> nop
++0000edac <[^>]*> nop
++0000edb0 <[^>]*> nop
++0000edb4 <[^>]*> nop
++0000edb8 <[^>]*> nop
++0000edbc <[^>]*> nop
++0000edc0 <[^>]*> nop
++0000edc4 <[^>]*> nop
++0000edc8 <[^>]*> nop
++0000edcc <[^>]*> nop
++0000edd0 <[^>]*> nop
++0000edd4 <[^>]*> nop
++0000edd8 <[^>]*> nop
++0000eddc <[^>]*> nop
++0000ede0 <[^>]*> nop
++0000ede4 <[^>]*> nop
++0000ede8 <[^>]*> nop
++0000edec <[^>]*> nop
++0000edf0 <[^>]*> nop
++0000edf4 <[^>]*> nop
++0000edf8 <[^>]*> nop
++0000edfc <[^>]*> nop
++0000ee00 <[^>]*> nop
++0000ee04 <[^>]*> nop
++0000ee08 <[^>]*> nop
++0000ee0c <[^>]*> nop
++0000ee10 <[^>]*> nop
++0000ee14 <[^>]*> nop
++0000ee18 <[^>]*> nop
++0000ee1c <[^>]*> nop
++0000ee20 <[^>]*> nop
++0000ee24 <[^>]*> nop
++0000ee28 <[^>]*> nop
++0000ee2c <[^>]*> nop
++0000ee30 <[^>]*> nop
++0000ee34 <[^>]*> nop
++0000ee38 <[^>]*> nop
++0000ee3c <[^>]*> nop
++0000ee40 <[^>]*> nop
++0000ee44 <[^>]*> nop
++0000ee48 <[^>]*> nop
++0000ee4c <[^>]*> nop
++0000ee50 <[^>]*> nop
++0000ee54 <[^>]*> nop
++0000ee58 <[^>]*> nop
++0000ee5c <[^>]*> nop
++0000ee60 <[^>]*> nop
++0000ee64 <[^>]*> nop
++0000ee68 <[^>]*> nop
++0000ee6c <[^>]*> nop
++0000ee70 <[^>]*> nop
++0000ee74 <[^>]*> nop
++0000ee78 <[^>]*> nop
++0000ee7c <[^>]*> nop
++0000ee80 <[^>]*> nop
++0000ee84 <[^>]*> nop
++0000ee88 <[^>]*> nop
++0000ee8c <[^>]*> nop
++0000ee90 <[^>]*> nop
++0000ee94 <[^>]*> nop
++0000ee98 <[^>]*> nop
++0000ee9c <[^>]*> nop
++0000eea0 <[^>]*> nop
++0000eea4 <[^>]*> nop
++0000eea8 <[^>]*> nop
++0000eeac <[^>]*> nop
++0000eeb0 <[^>]*> nop
++0000eeb4 <[^>]*> nop
++0000eeb8 <[^>]*> nop
++0000eebc <[^>]*> nop
++0000eec0 <[^>]*> nop
++0000eec4 <[^>]*> nop
++0000eec8 <[^>]*> nop
++0000eecc <[^>]*> nop
++0000eed0 <[^>]*> nop
++0000eed4 <[^>]*> nop
++0000eed8 <[^>]*> nop
++0000eedc <[^>]*> nop
++0000eee0 <[^>]*> nop
++0000eee4 <[^>]*> nop
++0000eee8 <[^>]*> nop
++0000eeec <[^>]*> nop
++0000eef0 <[^>]*> nop
++0000eef4 <[^>]*> nop
++0000eef8 <[^>]*> nop
++0000eefc <[^>]*> nop
++0000ef00 <[^>]*> nop
++0000ef04 <[^>]*> nop
++0000ef08 <[^>]*> nop
++0000ef0c <[^>]*> nop
++0000ef10 <[^>]*> nop
++0000ef14 <[^>]*> nop
++0000ef18 <[^>]*> nop
++0000ef1c <[^>]*> nop
++0000ef20 <[^>]*> nop
++0000ef24 <[^>]*> nop
++0000ef28 <[^>]*> nop
++0000ef2c <[^>]*> nop
++0000ef30 <[^>]*> nop
++0000ef34 <[^>]*> nop
++0000ef38 <[^>]*> nop
++0000ef3c <[^>]*> nop
++0000ef40 <[^>]*> nop
++0000ef44 <[^>]*> nop
++0000ef48 <[^>]*> nop
++0000ef4c <[^>]*> nop
++0000ef50 <[^>]*> nop
++0000ef54 <[^>]*> nop
++0000ef58 <[^>]*> nop
++0000ef5c <[^>]*> nop
++0000ef60 <[^>]*> nop
++0000ef64 <[^>]*> nop
++0000ef68 <[^>]*> nop
++0000ef6c <[^>]*> nop
++0000ef70 <[^>]*> nop
++0000ef74 <[^>]*> nop
++0000ef78 <[^>]*> nop
++0000ef7c <[^>]*> nop
++0000ef80 <[^>]*> nop
++0000ef84 <[^>]*> nop
++0000ef88 <[^>]*> nop
++0000ef8c <[^>]*> nop
++0000ef90 <[^>]*> nop
++0000ef94 <[^>]*> nop
++0000ef98 <[^>]*> nop
++0000ef9c <[^>]*> nop
++0000efa0 <[^>]*> nop
++0000efa4 <[^>]*> nop
++0000efa8 <[^>]*> nop
++0000efac <[^>]*> nop
++0000efb0 <[^>]*> nop
++0000efb4 <[^>]*> nop
++0000efb8 <[^>]*> nop
++0000efbc <[^>]*> nop
++0000efc0 <[^>]*> nop
++0000efc4 <[^>]*> nop
++0000efc8 <[^>]*> nop
++0000efcc <[^>]*> nop
++0000efd0 <[^>]*> nop
++0000efd4 <[^>]*> nop
++0000efd8 <[^>]*> nop
++0000efdc <[^>]*> nop
++0000efe0 <[^>]*> nop
++0000efe4 <[^>]*> nop
++0000efe8 <[^>]*> nop
++0000efec <[^>]*> nop
++0000eff0 <[^>]*> nop
++0000eff4 <[^>]*> nop
++0000eff8 <[^>]*> nop
++0000effc <[^>]*> nop
++0000f000 <[^>]*> nop
++0000f004 <[^>]*> nop
++0000f008 <[^>]*> nop
++0000f00c <[^>]*> nop
++0000f010 <[^>]*> nop
++0000f014 <[^>]*> nop
++0000f018 <[^>]*> nop
++0000f01c <[^>]*> nop
++0000f020 <[^>]*> nop
++0000f024 <[^>]*> nop
++0000f028 <[^>]*> nop
++0000f02c <[^>]*> nop
++0000f030 <[^>]*> nop
++0000f034 <[^>]*> nop
++0000f038 <[^>]*> nop
++0000f03c <[^>]*> nop
++0000f040 <[^>]*> nop
++0000f044 <[^>]*> nop
++0000f048 <[^>]*> nop
++0000f04c <[^>]*> nop
++0000f050 <[^>]*> nop
++0000f054 <[^>]*> nop
++0000f058 <[^>]*> nop
++0000f05c <[^>]*> nop
++0000f060 <[^>]*> nop
++0000f064 <[^>]*> nop
++0000f068 <[^>]*> nop
++0000f06c <[^>]*> nop
++0000f070 <[^>]*> nop
++0000f074 <[^>]*> nop
++0000f078 <[^>]*> nop
++0000f07c <[^>]*> nop
++0000f080 <[^>]*> nop
++0000f084 <[^>]*> nop
++0000f088 <[^>]*> nop
++0000f08c <[^>]*> nop
++0000f090 <[^>]*> nop
++0000f094 <[^>]*> nop
++0000f098 <[^>]*> nop
++0000f09c <[^>]*> nop
++0000f0a0 <[^>]*> nop
++0000f0a4 <[^>]*> nop
++0000f0a8 <[^>]*> nop
++0000f0ac <[^>]*> nop
++0000f0b0 <[^>]*> nop
++0000f0b4 <[^>]*> nop
++0000f0b8 <[^>]*> nop
++0000f0bc <[^>]*> nop
++0000f0c0 <[^>]*> nop
++0000f0c4 <[^>]*> nop
++0000f0c8 <[^>]*> nop
++0000f0cc <[^>]*> nop
++0000f0d0 <[^>]*> nop
++0000f0d4 <[^>]*> nop
++0000f0d8 <[^>]*> nop
++0000f0dc <[^>]*> nop
++0000f0e0 <[^>]*> nop
++0000f0e4 <[^>]*> nop
++0000f0e8 <[^>]*> nop
++0000f0ec <[^>]*> nop
++0000f0f0 <[^>]*> nop
++0000f0f4 <[^>]*> nop
++0000f0f8 <[^>]*> nop
++0000f0fc <[^>]*> nop
++0000f100 <[^>]*> nop
++0000f104 <[^>]*> nop
++0000f108 <[^>]*> nop
++0000f10c <[^>]*> nop
++0000f110 <[^>]*> nop
++0000f114 <[^>]*> nop
++0000f118 <[^>]*> nop
++0000f11c <[^>]*> nop
++0000f120 <[^>]*> nop
++0000f124 <[^>]*> nop
++0000f128 <[^>]*> nop
++0000f12c <[^>]*> nop
++0000f130 <[^>]*> nop
++0000f134 <[^>]*> nop
++0000f138 <[^>]*> nop
++0000f13c <[^>]*> nop
++0000f140 <[^>]*> nop
++0000f144 <[^>]*> nop
++0000f148 <[^>]*> nop
++0000f14c <[^>]*> nop
++0000f150 <[^>]*> nop
++0000f154 <[^>]*> nop
++0000f158 <[^>]*> nop
++0000f15c <[^>]*> nop
++0000f160 <[^>]*> nop
++0000f164 <[^>]*> nop
++0000f168 <[^>]*> nop
++0000f16c <[^>]*> nop
++0000f170 <[^>]*> nop
++0000f174 <[^>]*> nop
++0000f178 <[^>]*> nop
++0000f17c <[^>]*> nop
++0000f180 <[^>]*> nop
++0000f184 <[^>]*> nop
++0000f188 <[^>]*> nop
++0000f18c <[^>]*> nop
++0000f190 <[^>]*> nop
++0000f194 <[^>]*> nop
++0000f198 <[^>]*> nop
++0000f19c <[^>]*> nop
++0000f1a0 <[^>]*> nop
++0000f1a4 <[^>]*> nop
++0000f1a8 <[^>]*> nop
++0000f1ac <[^>]*> nop
++0000f1b0 <[^>]*> nop
++0000f1b4 <[^>]*> nop
++0000f1b8 <[^>]*> nop
++0000f1bc <[^>]*> nop
++0000f1c0 <[^>]*> nop
++0000f1c4 <[^>]*> nop
++0000f1c8 <[^>]*> nop
++0000f1cc <[^>]*> nop
++0000f1d0 <[^>]*> nop
++0000f1d4 <[^>]*> nop
++0000f1d8 <[^>]*> nop
++0000f1dc <[^>]*> nop
++0000f1e0 <[^>]*> nop
++0000f1e4 <[^>]*> nop
++0000f1e8 <[^>]*> nop
++0000f1ec <[^>]*> nop
++0000f1f0 <[^>]*> nop
++0000f1f4 <[^>]*> nop
++0000f1f8 <[^>]*> nop
++0000f1fc <[^>]*> nop
++0000f200 <[^>]*> nop
++0000f204 <[^>]*> nop
++0000f208 <[^>]*> nop
++0000f20c <[^>]*> nop
++0000f210 <[^>]*> nop
++0000f214 <[^>]*> nop
++0000f218 <[^>]*> nop
++0000f21c <[^>]*> nop
++0000f220 <[^>]*> nop
++0000f224 <[^>]*> nop
++0000f228 <[^>]*> nop
++0000f22c <[^>]*> nop
++0000f230 <[^>]*> nop
++0000f234 <[^>]*> nop
++0000f238 <[^>]*> nop
++0000f23c <[^>]*> nop
++0000f240 <[^>]*> nop
++0000f244 <[^>]*> nop
++0000f248 <[^>]*> nop
++0000f24c <[^>]*> nop
++0000f250 <[^>]*> nop
++0000f254 <[^>]*> nop
++0000f258 <[^>]*> nop
++0000f25c <[^>]*> nop
++0000f260 <[^>]*> nop
++0000f264 <[^>]*> nop
++0000f268 <[^>]*> nop
++0000f26c <[^>]*> nop
++0000f270 <[^>]*> nop
++0000f274 <[^>]*> nop
++0000f278 <[^>]*> nop
++0000f27c <[^>]*> nop
++0000f280 <[^>]*> nop
++0000f284 <[^>]*> nop
++0000f288 <[^>]*> nop
++0000f28c <[^>]*> nop
++0000f290 <[^>]*> nop
++0000f294 <[^>]*> nop
++0000f298 <[^>]*> nop
++0000f29c <[^>]*> nop
++0000f2a0 <[^>]*> nop
++0000f2a4 <[^>]*> nop
++0000f2a8 <[^>]*> nop
++0000f2ac <[^>]*> nop
++0000f2b0 <[^>]*> nop
++0000f2b4 <[^>]*> nop
++0000f2b8 <[^>]*> nop
++0000f2bc <[^>]*> nop
++0000f2c0 <[^>]*> nop
++0000f2c4 <[^>]*> nop
++0000f2c8 <[^>]*> nop
++0000f2cc <[^>]*> nop
++0000f2d0 <[^>]*> nop
++0000f2d4 <[^>]*> nop
++0000f2d8 <[^>]*> nop
++0000f2dc <[^>]*> nop
++0000f2e0 <[^>]*> nop
++0000f2e4 <[^>]*> nop
++0000f2e8 <[^>]*> nop
++0000f2ec <[^>]*> nop
++0000f2f0 <[^>]*> nop
++0000f2f4 <[^>]*> nop
++0000f2f8 <[^>]*> nop
++0000f2fc <[^>]*> nop
++0000f300 <[^>]*> nop
++0000f304 <[^>]*> nop
++0000f308 <[^>]*> nop
++0000f30c <[^>]*> nop
++0000f310 <[^>]*> nop
++0000f314 <[^>]*> nop
++0000f318 <[^>]*> nop
++0000f31c <[^>]*> nop
++0000f320 <[^>]*> nop
++0000f324 <[^>]*> nop
++0000f328 <[^>]*> nop
++0000f32c <[^>]*> nop
++0000f330 <[^>]*> nop
++0000f334 <[^>]*> nop
++0000f338 <[^>]*> nop
++0000f33c <[^>]*> nop
++0000f340 <[^>]*> nop
++0000f344 <[^>]*> nop
++0000f348 <[^>]*> nop
++0000f34c <[^>]*> nop
++0000f350 <[^>]*> nop
++0000f354 <[^>]*> nop
++0000f358 <[^>]*> nop
++0000f35c <[^>]*> nop
++0000f360 <[^>]*> nop
++0000f364 <[^>]*> nop
++0000f368 <[^>]*> nop
++0000f36c <[^>]*> nop
++0000f370 <[^>]*> nop
++0000f374 <[^>]*> nop
++0000f378 <[^>]*> nop
++0000f37c <[^>]*> nop
++0000f380 <[^>]*> nop
++0000f384 <[^>]*> nop
++0000f388 <[^>]*> nop
++0000f38c <[^>]*> nop
++0000f390 <[^>]*> nop
++0000f394 <[^>]*> nop
++0000f398 <[^>]*> nop
++0000f39c <[^>]*> nop
++0000f3a0 <[^>]*> nop
++0000f3a4 <[^>]*> nop
++0000f3a8 <[^>]*> nop
++0000f3ac <[^>]*> nop
++0000f3b0 <[^>]*> nop
++0000f3b4 <[^>]*> nop
++0000f3b8 <[^>]*> nop
++0000f3bc <[^>]*> nop
++0000f3c0 <[^>]*> nop
++0000f3c4 <[^>]*> nop
++0000f3c8 <[^>]*> nop
++0000f3cc <[^>]*> nop
++0000f3d0 <[^>]*> nop
++0000f3d4 <[^>]*> nop
++0000f3d8 <[^>]*> nop
++0000f3dc <[^>]*> nop
++0000f3e0 <[^>]*> nop
++0000f3e4 <[^>]*> nop
++0000f3e8 <[^>]*> nop
++0000f3ec <[^>]*> nop
++0000f3f0 <[^>]*> nop
++0000f3f4 <[^>]*> nop
++0000f3f8 <[^>]*> nop
++0000f3fc <[^>]*> nop
++0000f400 <[^>]*> nop
++0000f404 <[^>]*> nop
++0000f408 <[^>]*> nop
++0000f40c <[^>]*> nop
++0000f410 <[^>]*> nop
++0000f414 <[^>]*> nop
++0000f418 <[^>]*> nop
++0000f41c <[^>]*> nop
++0000f420 <[^>]*> nop
++0000f424 <[^>]*> nop
++0000f428 <[^>]*> nop
++0000f42c <[^>]*> nop
++0000f430 <[^>]*> nop
++0000f434 <[^>]*> nop
++0000f438 <[^>]*> nop
++0000f43c <[^>]*> nop
++0000f440 <[^>]*> nop
++0000f444 <[^>]*> nop
++0000f448 <[^>]*> nop
++0000f44c <[^>]*> nop
++0000f450 <[^>]*> nop
++0000f454 <[^>]*> nop
++0000f458 <[^>]*> nop
++0000f45c <[^>]*> nop
++0000f460 <[^>]*> nop
++0000f464 <[^>]*> nop
++0000f468 <[^>]*> nop
++0000f46c <[^>]*> nop
++0000f470 <[^>]*> nop
++0000f474 <[^>]*> nop
++0000f478 <[^>]*> nop
++0000f47c <[^>]*> nop
++0000f480 <[^>]*> nop
++0000f484 <[^>]*> nop
++0000f488 <[^>]*> nop
++0000f48c <[^>]*> nop
++0000f490 <[^>]*> nop
++0000f494 <[^>]*> nop
++0000f498 <[^>]*> nop
++0000f49c <[^>]*> nop
++0000f4a0 <[^>]*> nop
++0000f4a4 <[^>]*> nop
++0000f4a8 <[^>]*> nop
++0000f4ac <[^>]*> nop
++0000f4b0 <[^>]*> nop
++0000f4b4 <[^>]*> nop
++0000f4b8 <[^>]*> nop
++0000f4bc <[^>]*> nop
++0000f4c0 <[^>]*> nop
++0000f4c4 <[^>]*> nop
++0000f4c8 <[^>]*> nop
++0000f4cc <[^>]*> nop
++0000f4d0 <[^>]*> nop
++0000f4d4 <[^>]*> nop
++0000f4d8 <[^>]*> nop
++0000f4dc <[^>]*> nop
++0000f4e0 <[^>]*> nop
++0000f4e4 <[^>]*> nop
++0000f4e8 <[^>]*> nop
++0000f4ec <[^>]*> nop
++0000f4f0 <[^>]*> nop
++0000f4f4 <[^>]*> nop
++0000f4f8 <[^>]*> nop
++0000f4fc <[^>]*> nop
++0000f500 <[^>]*> nop
++0000f504 <[^>]*> nop
++0000f508 <[^>]*> nop
++0000f50c <[^>]*> nop
++0000f510 <[^>]*> nop
++0000f514 <[^>]*> nop
++0000f518 <[^>]*> nop
++0000f51c <[^>]*> nop
++0000f520 <[^>]*> nop
++0000f524 <[^>]*> nop
++0000f528 <[^>]*> nop
++0000f52c <[^>]*> nop
++0000f530 <[^>]*> nop
++0000f534 <[^>]*> nop
++0000f538 <[^>]*> nop
++0000f53c <[^>]*> nop
++0000f540 <[^>]*> nop
++0000f544 <[^>]*> nop
++0000f548 <[^>]*> nop
++0000f54c <[^>]*> nop
++0000f550 <[^>]*> nop
++0000f554 <[^>]*> nop
++0000f558 <[^>]*> nop
++0000f55c <[^>]*> nop
++0000f560 <[^>]*> nop
++0000f564 <[^>]*> nop
++0000f568 <[^>]*> nop
++0000f56c <[^>]*> nop
++0000f570 <[^>]*> nop
++0000f574 <[^>]*> nop
++0000f578 <[^>]*> nop
++0000f57c <[^>]*> nop
++0000f580 <[^>]*> nop
++0000f584 <[^>]*> nop
++0000f588 <[^>]*> nop
++0000f58c <[^>]*> nop
++0000f590 <[^>]*> nop
++0000f594 <[^>]*> nop
++0000f598 <[^>]*> nop
++0000f59c <[^>]*> nop
++0000f5a0 <[^>]*> nop
++0000f5a4 <[^>]*> nop
++0000f5a8 <[^>]*> nop
++0000f5ac <[^>]*> nop
++0000f5b0 <[^>]*> nop
++0000f5b4 <[^>]*> nop
++0000f5b8 <[^>]*> nop
++0000f5bc <[^>]*> nop
++0000f5c0 <[^>]*> nop
++0000f5c4 <[^>]*> nop
++0000f5c8 <[^>]*> nop
++0000f5cc <[^>]*> nop
++0000f5d0 <[^>]*> nop
++0000f5d4 <[^>]*> nop
++0000f5d8 <[^>]*> nop
++0000f5dc <[^>]*> nop
++0000f5e0 <[^>]*> nop
++0000f5e4 <[^>]*> nop
++0000f5e8 <[^>]*> nop
++0000f5ec <[^>]*> nop
++0000f5f0 <[^>]*> nop
++0000f5f4 <[^>]*> nop
++0000f5f8 <[^>]*> nop
++0000f5fc <[^>]*> nop
++0000f600 <[^>]*> nop
++0000f604 <[^>]*> nop
++0000f608 <[^>]*> nop
++0000f60c <[^>]*> nop
++0000f610 <[^>]*> nop
++0000f614 <[^>]*> nop
++0000f618 <[^>]*> nop
++0000f61c <[^>]*> nop
++0000f620 <[^>]*> nop
++0000f624 <[^>]*> nop
++0000f628 <[^>]*> nop
++0000f62c <[^>]*> nop
++0000f630 <[^>]*> nop
++0000f634 <[^>]*> nop
++0000f638 <[^>]*> nop
++0000f63c <[^>]*> nop
++0000f640 <[^>]*> nop
++0000f644 <[^>]*> nop
++0000f648 <[^>]*> nop
++0000f64c <[^>]*> nop
++0000f650 <[^>]*> nop
++0000f654 <[^>]*> nop
++0000f658 <[^>]*> nop
++0000f65c <[^>]*> nop
++0000f660 <[^>]*> nop
++0000f664 <[^>]*> nop
++0000f668 <[^>]*> nop
++0000f66c <[^>]*> nop
++0000f670 <[^>]*> nop
++0000f674 <[^>]*> nop
++0000f678 <[^>]*> nop
++0000f67c <[^>]*> nop
++0000f680 <[^>]*> nop
++0000f684 <[^>]*> nop
++0000f688 <[^>]*> nop
++0000f68c <[^>]*> nop
++0000f690 <[^>]*> nop
++0000f694 <[^>]*> nop
++0000f698 <[^>]*> nop
++0000f69c <[^>]*> nop
++0000f6a0 <[^>]*> nop
++0000f6a4 <[^>]*> nop
++0000f6a8 <[^>]*> nop
++0000f6ac <[^>]*> nop
++0000f6b0 <[^>]*> nop
++0000f6b4 <[^>]*> nop
++0000f6b8 <[^>]*> nop
++0000f6bc <[^>]*> nop
++0000f6c0 <[^>]*> nop
++0000f6c4 <[^>]*> nop
++0000f6c8 <[^>]*> nop
++0000f6cc <[^>]*> nop
++0000f6d0 <[^>]*> nop
++0000f6d4 <[^>]*> nop
++0000f6d8 <[^>]*> nop
++0000f6dc <[^>]*> nop
++0000f6e0 <[^>]*> nop
++0000f6e4 <[^>]*> nop
++0000f6e8 <[^>]*> nop
++0000f6ec <[^>]*> nop
++0000f6f0 <[^>]*> nop
++0000f6f4 <[^>]*> nop
++0000f6f8 <[^>]*> nop
++0000f6fc <[^>]*> nop
++0000f700 <[^>]*> nop
++0000f704 <[^>]*> nop
++0000f708 <[^>]*> nop
++0000f70c <[^>]*> nop
++0000f710 <[^>]*> nop
++0000f714 <[^>]*> nop
++0000f718 <[^>]*> nop
++0000f71c <[^>]*> nop
++0000f720 <[^>]*> nop
++0000f724 <[^>]*> nop
++0000f728 <[^>]*> nop
++0000f72c <[^>]*> nop
++0000f730 <[^>]*> nop
++0000f734 <[^>]*> nop
++0000f738 <[^>]*> nop
++0000f73c <[^>]*> nop
++0000f740 <[^>]*> nop
++0000f744 <[^>]*> nop
++0000f748 <[^>]*> nop
++0000f74c <[^>]*> nop
++0000f750 <[^>]*> nop
++0000f754 <[^>]*> nop
++0000f758 <[^>]*> nop
++0000f75c <[^>]*> nop
++0000f760 <[^>]*> nop
++0000f764 <[^>]*> nop
++0000f768 <[^>]*> nop
++0000f76c <[^>]*> nop
++0000f770 <[^>]*> nop
++0000f774 <[^>]*> nop
++0000f778 <[^>]*> nop
++0000f77c <[^>]*> nop
++0000f780 <[^>]*> nop
++0000f784 <[^>]*> nop
++0000f788 <[^>]*> nop
++0000f78c <[^>]*> nop
++0000f790 <[^>]*> nop
++0000f794 <[^>]*> nop
++0000f798 <[^>]*> nop
++0000f79c <[^>]*> nop
++0000f7a0 <[^>]*> nop
++0000f7a4 <[^>]*> nop
++0000f7a8 <[^>]*> nop
++0000f7ac <[^>]*> nop
++0000f7b0 <[^>]*> nop
++0000f7b4 <[^>]*> nop
++0000f7b8 <[^>]*> nop
++0000f7bc <[^>]*> nop
++0000f7c0 <[^>]*> nop
++0000f7c4 <[^>]*> nop
++0000f7c8 <[^>]*> nop
++0000f7cc <[^>]*> nop
++0000f7d0 <[^>]*> nop
++0000f7d4 <[^>]*> nop
++0000f7d8 <[^>]*> nop
++0000f7dc <[^>]*> nop
++0000f7e0 <[^>]*> nop
++0000f7e4 <[^>]*> nop
++0000f7e8 <[^>]*> nop
++0000f7ec <[^>]*> nop
++0000f7f0 <[^>]*> nop
++0000f7f4 <[^>]*> nop
++0000f7f8 <[^>]*> nop
++0000f7fc <[^>]*> nop
++0000f800 <[^>]*> nop
++0000f804 <[^>]*> nop
++0000f808 <[^>]*> nop
++0000f80c <[^>]*> nop
++0000f810 <[^>]*> nop
++0000f814 <[^>]*> nop
++0000f818 <[^>]*> nop
++0000f81c <[^>]*> nop
++0000f820 <[^>]*> nop
++0000f824 <[^>]*> nop
++0000f828 <[^>]*> nop
++0000f82c <[^>]*> nop
++0000f830 <[^>]*> nop
++0000f834 <[^>]*> nop
++0000f838 <[^>]*> nop
++0000f83c <[^>]*> nop
++0000f840 <[^>]*> nop
++0000f844 <[^>]*> nop
++0000f848 <[^>]*> nop
++0000f84c <[^>]*> nop
++0000f850 <[^>]*> nop
++0000f854 <[^>]*> nop
++0000f858 <[^>]*> nop
++0000f85c <[^>]*> nop
++0000f860 <[^>]*> nop
++0000f864 <[^>]*> nop
++0000f868 <[^>]*> nop
++0000f86c <[^>]*> nop
++0000f870 <[^>]*> nop
++0000f874 <[^>]*> nop
++0000f878 <[^>]*> nop
++0000f87c <[^>]*> nop
++0000f880 <[^>]*> nop
++0000f884 <[^>]*> nop
++0000f888 <[^>]*> nop
++0000f88c <[^>]*> nop
++0000f890 <[^>]*> nop
++0000f894 <[^>]*> nop
++0000f898 <[^>]*> nop
++0000f89c <[^>]*> nop
++0000f8a0 <[^>]*> nop
++0000f8a4 <[^>]*> nop
++0000f8a8 <[^>]*> nop
++0000f8ac <[^>]*> nop
++0000f8b0 <[^>]*> nop
++0000f8b4 <[^>]*> nop
++0000f8b8 <[^>]*> nop
++0000f8bc <[^>]*> nop
++0000f8c0 <[^>]*> nop
++0000f8c4 <[^>]*> nop
++0000f8c8 <[^>]*> nop
++0000f8cc <[^>]*> nop
++0000f8d0 <[^>]*> nop
++0000f8d4 <[^>]*> nop
++0000f8d8 <[^>]*> nop
++0000f8dc <[^>]*> nop
++0000f8e0 <[^>]*> nop
++0000f8e4 <[^>]*> nop
++0000f8e8 <[^>]*> nop
++0000f8ec <[^>]*> nop
++0000f8f0 <[^>]*> nop
++0000f8f4 <[^>]*> nop
++0000f8f8 <[^>]*> nop
++0000f8fc <[^>]*> nop
++0000f900 <[^>]*> nop
++0000f904 <[^>]*> nop
++0000f908 <[^>]*> nop
++0000f90c <[^>]*> nop
++0000f910 <[^>]*> nop
++0000f914 <[^>]*> nop
++0000f918 <[^>]*> nop
++0000f91c <[^>]*> nop
++0000f920 <[^>]*> nop
++0000f924 <[^>]*> nop
++0000f928 <[^>]*> nop
++0000f92c <[^>]*> nop
++0000f930 <[^>]*> nop
++0000f934 <[^>]*> nop
++0000f938 <[^>]*> nop
++0000f93c <[^>]*> nop
++0000f940 <[^>]*> nop
++0000f944 <[^>]*> nop
++0000f948 <[^>]*> nop
++0000f94c <[^>]*> nop
++0000f950 <[^>]*> nop
++0000f954 <[^>]*> nop
++0000f958 <[^>]*> nop
++0000f95c <[^>]*> nop
++0000f960 <[^>]*> nop
++0000f964 <[^>]*> nop
++0000f968 <[^>]*> nop
++0000f96c <[^>]*> nop
++0000f970 <[^>]*> nop
++0000f974 <[^>]*> nop
++0000f978 <[^>]*> nop
++0000f97c <[^>]*> nop
++0000f980 <[^>]*> nop
++0000f984 <[^>]*> nop
++0000f988 <[^>]*> nop
++0000f98c <[^>]*> nop
++0000f990 <[^>]*> nop
++0000f994 <[^>]*> nop
++0000f998 <[^>]*> nop
++0000f99c <[^>]*> nop
++0000f9a0 <[^>]*> nop
++0000f9a4 <[^>]*> nop
++0000f9a8 <[^>]*> nop
++0000f9ac <[^>]*> nop
++0000f9b0 <[^>]*> nop
++0000f9b4 <[^>]*> nop
++0000f9b8 <[^>]*> nop
++0000f9bc <[^>]*> nop
++0000f9c0 <[^>]*> nop
++0000f9c4 <[^>]*> nop
++0000f9c8 <[^>]*> nop
++0000f9cc <[^>]*> nop
++0000f9d0 <[^>]*> nop
++0000f9d4 <[^>]*> nop
++0000f9d8 <[^>]*> nop
++0000f9dc <[^>]*> nop
++0000f9e0 <[^>]*> nop
++0000f9e4 <[^>]*> nop
++0000f9e8 <[^>]*> nop
++0000f9ec <[^>]*> nop
++0000f9f0 <[^>]*> nop
++0000f9f4 <[^>]*> nop
++0000f9f8 <[^>]*> nop
++0000f9fc <[^>]*> nop
++0000fa00 <[^>]*> nop
++0000fa04 <[^>]*> nop
++0000fa08 <[^>]*> nop
++0000fa0c <[^>]*> nop
++0000fa10 <[^>]*> nop
++0000fa14 <[^>]*> nop
++0000fa18 <[^>]*> nop
++0000fa1c <[^>]*> nop
++0000fa20 <[^>]*> nop
++0000fa24 <[^>]*> nop
++0000fa28 <[^>]*> nop
++0000fa2c <[^>]*> nop
++0000fa30 <[^>]*> nop
++0000fa34 <[^>]*> nop
++0000fa38 <[^>]*> nop
++0000fa3c <[^>]*> nop
++0000fa40 <[^>]*> nop
++0000fa44 <[^>]*> nop
++0000fa48 <[^>]*> nop
++0000fa4c <[^>]*> nop
++0000fa50 <[^>]*> nop
++0000fa54 <[^>]*> nop
++0000fa58 <[^>]*> nop
++0000fa5c <[^>]*> nop
++0000fa60 <[^>]*> nop
++0000fa64 <[^>]*> nop
++0000fa68 <[^>]*> nop
++0000fa6c <[^>]*> nop
++0000fa70 <[^>]*> nop
++0000fa74 <[^>]*> nop
++0000fa78 <[^>]*> nop
++0000fa7c <[^>]*> nop
++0000fa80 <[^>]*> nop
++0000fa84 <[^>]*> nop
++0000fa88 <[^>]*> nop
++0000fa8c <[^>]*> nop
++0000fa90 <[^>]*> nop
++0000fa94 <[^>]*> nop
++0000fa98 <[^>]*> nop
++0000fa9c <[^>]*> nop
++0000faa0 <[^>]*> nop
++0000faa4 <[^>]*> nop
++0000faa8 <[^>]*> nop
++0000faac <[^>]*> nop
++0000fab0 <[^>]*> nop
++0000fab4 <[^>]*> nop
++0000fab8 <[^>]*> nop
++0000fabc <[^>]*> nop
++0000fac0 <[^>]*> nop
++0000fac4 <[^>]*> nop
++0000fac8 <[^>]*> nop
++0000facc <[^>]*> nop
++0000fad0 <[^>]*> nop
++0000fad4 <[^>]*> nop
++0000fad8 <[^>]*> nop
++0000fadc <[^>]*> nop
++0000fae0 <[^>]*> nop
++0000fae4 <[^>]*> nop
++0000fae8 <[^>]*> nop
++0000faec <[^>]*> nop
++0000faf0 <[^>]*> nop
++0000faf4 <[^>]*> nop
++0000faf8 <[^>]*> nop
++0000fafc <[^>]*> nop
++0000fb00 <[^>]*> nop
++0000fb04 <[^>]*> nop
++0000fb08 <[^>]*> nop
++0000fb0c <[^>]*> nop
++0000fb10 <[^>]*> nop
++0000fb14 <[^>]*> nop
++0000fb18 <[^>]*> nop
++0000fb1c <[^>]*> nop
++0000fb20 <[^>]*> nop
++0000fb24 <[^>]*> nop
++0000fb28 <[^>]*> nop
++0000fb2c <[^>]*> nop
++0000fb30 <[^>]*> nop
++0000fb34 <[^>]*> nop
++0000fb38 <[^>]*> nop
++0000fb3c <[^>]*> nop
++0000fb40 <[^>]*> nop
++0000fb44 <[^>]*> nop
++0000fb48 <[^>]*> nop
++0000fb4c <[^>]*> nop
++0000fb50 <[^>]*> nop
++0000fb54 <[^>]*> nop
++0000fb58 <[^>]*> nop
++0000fb5c <[^>]*> nop
++0000fb60 <[^>]*> nop
++0000fb64 <[^>]*> nop
++0000fb68 <[^>]*> nop
++0000fb6c <[^>]*> nop
++0000fb70 <[^>]*> nop
++0000fb74 <[^>]*> nop
++0000fb78 <[^>]*> nop
++0000fb7c <[^>]*> nop
++0000fb80 <[^>]*> nop
++0000fb84 <[^>]*> nop
++0000fb88 <[^>]*> nop
++0000fb8c <[^>]*> nop
++0000fb90 <[^>]*> nop
++0000fb94 <[^>]*> nop
++0000fb98 <[^>]*> nop
++0000fb9c <[^>]*> nop
++0000fba0 <[^>]*> nop
++0000fba4 <[^>]*> nop
++0000fba8 <[^>]*> nop
++0000fbac <[^>]*> nop
++0000fbb0 <[^>]*> nop
++0000fbb4 <[^>]*> nop
++0000fbb8 <[^>]*> nop
++0000fbbc <[^>]*> nop
++0000fbc0 <[^>]*> nop
++0000fbc4 <[^>]*> nop
++0000fbc8 <[^>]*> nop
++0000fbcc <[^>]*> nop
++0000fbd0 <[^>]*> nop
++0000fbd4 <[^>]*> nop
++0000fbd8 <[^>]*> nop
++0000fbdc <[^>]*> nop
++0000fbe0 <[^>]*> nop
++0000fbe4 <[^>]*> nop
++0000fbe8 <[^>]*> nop
++0000fbec <[^>]*> nop
++0000fbf0 <[^>]*> nop
++0000fbf4 <[^>]*> nop
++0000fbf8 <[^>]*> nop
++0000fbfc <[^>]*> nop
++0000fc00 <[^>]*> nop
++0000fc04 <[^>]*> nop
++0000fc08 <[^>]*> nop
++0000fc0c <[^>]*> nop
++0000fc10 <[^>]*> nop
++0000fc14 <[^>]*> nop
++0000fc18 <[^>]*> nop
++0000fc1c <[^>]*> nop
++0000fc20 <[^>]*> nop
++0000fc24 <[^>]*> nop
++0000fc28 <[^>]*> nop
++0000fc2c <[^>]*> nop
++0000fc30 <[^>]*> nop
++0000fc34 <[^>]*> nop
++0000fc38 <[^>]*> nop
++0000fc3c <[^>]*> nop
++0000fc40 <[^>]*> nop
++0000fc44 <[^>]*> nop
++0000fc48 <[^>]*> nop
++0000fc4c <[^>]*> nop
++0000fc50 <[^>]*> nop
++0000fc54 <[^>]*> nop
++0000fc58 <[^>]*> nop
++0000fc5c <[^>]*> nop
++0000fc60 <[^>]*> nop
++0000fc64 <[^>]*> nop
++0000fc68 <[^>]*> nop
++0000fc6c <[^>]*> nop
++0000fc70 <[^>]*> nop
++0000fc74 <[^>]*> nop
++0000fc78 <[^>]*> nop
++0000fc7c <[^>]*> nop
++0000fc80 <[^>]*> nop
++0000fc84 <[^>]*> nop
++0000fc88 <[^>]*> nop
++0000fc8c <[^>]*> nop
++0000fc90 <[^>]*> nop
++0000fc94 <[^>]*> nop
++0000fc98 <[^>]*> nop
++0000fc9c <[^>]*> nop
++0000fca0 <[^>]*> nop
++0000fca4 <[^>]*> nop
++0000fca8 <[^>]*> nop
++0000fcac <[^>]*> nop
++0000fcb0 <[^>]*> nop
++0000fcb4 <[^>]*> nop
++0000fcb8 <[^>]*> nop
++0000fcbc <[^>]*> nop
++0000fcc0 <[^>]*> nop
++0000fcc4 <[^>]*> nop
++0000fcc8 <[^>]*> nop
++0000fccc <[^>]*> nop
++0000fcd0 <[^>]*> nop
++0000fcd4 <[^>]*> nop
++0000fcd8 <[^>]*> nop
++0000fcdc <[^>]*> nop
++0000fce0 <[^>]*> nop
++0000fce4 <[^>]*> nop
++0000fce8 <[^>]*> nop
++0000fcec <[^>]*> nop
++0000fcf0 <[^>]*> nop
++0000fcf4 <[^>]*> nop
++0000fcf8 <[^>]*> nop
++0000fcfc <[^>]*> nop
++0000fd00 <[^>]*> nop
++0000fd04 <[^>]*> nop
++0000fd08 <[^>]*> nop
++0000fd0c <[^>]*> nop
++0000fd10 <[^>]*> nop
++0000fd14 <[^>]*> nop
++0000fd18 <[^>]*> nop
++0000fd1c <[^>]*> nop
++0000fd20 <[^>]*> nop
++0000fd24 <[^>]*> nop
++0000fd28 <[^>]*> nop
++0000fd2c <[^>]*> nop
++0000fd30 <[^>]*> nop
++0000fd34 <[^>]*> nop
++0000fd38 <[^>]*> nop
++0000fd3c <[^>]*> nop
++0000fd40 <[^>]*> nop
++0000fd44 <[^>]*> nop
++0000fd48 <[^>]*> nop
++0000fd4c <[^>]*> nop
++0000fd50 <[^>]*> nop
++0000fd54 <[^>]*> nop
++0000fd58 <[^>]*> nop
++0000fd5c <[^>]*> nop
++0000fd60 <[^>]*> nop
++0000fd64 <[^>]*> nop
++0000fd68 <[^>]*> nop
++0000fd6c <[^>]*> nop
++0000fd70 <[^>]*> nop
++0000fd74 <[^>]*> nop
++0000fd78 <[^>]*> nop
++0000fd7c <[^>]*> nop
++0000fd80 <[^>]*> nop
++0000fd84 <[^>]*> nop
++0000fd88 <[^>]*> nop
++0000fd8c <[^>]*> nop
++0000fd90 <[^>]*> nop
++0000fd94 <[^>]*> nop
++0000fd98 <[^>]*> nop
++0000fd9c <[^>]*> nop
++0000fda0 <[^>]*> nop
++0000fda4 <[^>]*> nop
++0000fda8 <[^>]*> nop
++0000fdac <[^>]*> nop
++0000fdb0 <[^>]*> nop
++0000fdb4 <[^>]*> nop
++0000fdb8 <[^>]*> nop
++0000fdbc <[^>]*> nop
++0000fdc0 <[^>]*> nop
++0000fdc4 <[^>]*> nop
++0000fdc8 <[^>]*> nop
++0000fdcc <[^>]*> nop
++0000fdd0 <[^>]*> nop
++0000fdd4 <[^>]*> nop
++0000fdd8 <[^>]*> nop
++0000fddc <[^>]*> nop
++0000fde0 <[^>]*> nop
++0000fde4 <[^>]*> nop
++0000fde8 <[^>]*> nop
++0000fdec <[^>]*> nop
++0000fdf0 <[^>]*> nop
++0000fdf4 <[^>]*> nop
++0000fdf8 <[^>]*> nop
++0000fdfc <[^>]*> nop
++0000fe00 <[^>]*> nop
++0000fe04 <[^>]*> nop
++0000fe08 <[^>]*> nop
++0000fe0c <[^>]*> nop
++0000fe10 <[^>]*> nop
++0000fe14 <[^>]*> nop
++0000fe18 <[^>]*> nop
++0000fe1c <[^>]*> nop
++0000fe20 <[^>]*> nop
++0000fe24 <[^>]*> nop
++0000fe28 <[^>]*> nop
++0000fe2c <[^>]*> nop
++0000fe30 <[^>]*> nop
++0000fe34 <[^>]*> nop
++0000fe38 <[^>]*> nop
++0000fe3c <[^>]*> nop
++0000fe40 <[^>]*> nop
++0000fe44 <[^>]*> nop
++0000fe48 <[^>]*> nop
++0000fe4c <[^>]*> nop
++0000fe50 <[^>]*> nop
++0000fe54 <[^>]*> nop
++0000fe58 <[^>]*> nop
++0000fe5c <[^>]*> nop
++0000fe60 <[^>]*> nop
++0000fe64 <[^>]*> nop
++0000fe68 <[^>]*> nop
++0000fe6c <[^>]*> nop
++0000fe70 <[^>]*> nop
++0000fe74 <[^>]*> nop
++0000fe78 <[^>]*> nop
++0000fe7c <[^>]*> nop
++0000fe80 <[^>]*> nop
++0000fe84 <[^>]*> nop
++0000fe88 <[^>]*> nop
++0000fe8c <[^>]*> nop
++0000fe90 <[^>]*> nop
++0000fe94 <[^>]*> nop
++0000fe98 <[^>]*> nop
++0000fe9c <[^>]*> nop
++0000fea0 <[^>]*> nop
++0000fea4 <[^>]*> nop
++0000fea8 <[^>]*> nop
++0000feac <[^>]*> nop
++0000feb0 <[^>]*> nop
++0000feb4 <[^>]*> nop
++0000feb8 <[^>]*> nop
++0000febc <[^>]*> nop
++0000fec0 <[^>]*> nop
++0000fec4 <[^>]*> nop
++0000fec8 <[^>]*> nop
++0000fecc <[^>]*> nop
++0000fed0 <[^>]*> nop
++0000fed4 <[^>]*> nop
++0000fed8 <[^>]*> nop
++0000fedc <[^>]*> nop
++0000fee0 <[^>]*> nop
++0000fee4 <[^>]*> nop
++0000fee8 <[^>]*> nop
++0000feec <[^>]*> nop
++0000fef0 <[^>]*> nop
++0000fef4 <[^>]*> nop
++0000fef8 <[^>]*> nop
++0000fefc <[^>]*> nop
++0000ff00 <[^>]*> nop
++0000ff04 <[^>]*> nop
++0000ff08 <[^>]*> nop
++0000ff0c <[^>]*> nop
++0000ff10 <[^>]*> nop
++0000ff14 <[^>]*> nop
++0000ff18 <[^>]*> nop
++0000ff1c <[^>]*> nop
++0000ff20 <[^>]*> nop
++0000ff24 <[^>]*> nop
++0000ff28 <[^>]*> nop
++0000ff2c <[^>]*> nop
++0000ff30 <[^>]*> nop
++0000ff34 <[^>]*> nop
++0000ff38 <[^>]*> nop
++0000ff3c <[^>]*> nop
++0000ff40 <[^>]*> nop
++0000ff44 <[^>]*> nop
++0000ff48 <[^>]*> nop
++0000ff4c <[^>]*> nop
++0000ff50 <[^>]*> nop
++0000ff54 <[^>]*> nop
++0000ff58 <[^>]*> nop
++0000ff5c <[^>]*> nop
++0000ff60 <[^>]*> nop
++0000ff64 <[^>]*> nop
++0000ff68 <[^>]*> nop
++0000ff6c <[^>]*> nop
++0000ff70 <[^>]*> nop
++0000ff74 <[^>]*> nop
++0000ff78 <[^>]*> nop
++0000ff7c <[^>]*> nop
++0000ff80 <[^>]*> nop
++0000ff84 <[^>]*> nop
++0000ff88 <[^>]*> nop
++0000ff8c <[^>]*> nop
++0000ff90 <[^>]*> nop
++0000ff94 <[^>]*> nop
++0000ff98 <[^>]*> nop
++0000ff9c <[^>]*> nop
++0000ffa0 <[^>]*> nop
++0000ffa4 <[^>]*> nop
++0000ffa8 <[^>]*> nop
++0000ffac <[^>]*> nop
++0000ffb0 <[^>]*> nop
++0000ffb4 <[^>]*> nop
++0000ffb8 <[^>]*> nop
++0000ffbc <[^>]*> nop
++0000ffc0 <[^>]*> nop
++0000ffc4 <[^>]*> nop
++0000ffc8 <[^>]*> nop
++0000ffcc <[^>]*> nop
++0000ffd0 <[^>]*> nop
++0000ffd4 <[^>]*> nop
++0000ffd8 <[^>]*> nop
++0000ffdc <[^>]*> nop
++0000ffe0 <[^>]*> nop
++0000ffe4 <[^>]*> nop
++0000ffe8 <[^>]*> nop
++0000ffec <[^>]*> nop
++0000fff0 <[^>]*> nop
++0000fff4 <[^>]*> nop
++0000fff8 <[^>]*> nop
++0000fffc <[^>]*> nop
++00010000 <[^>]*> br 00010018 <[^>]*>
++00010004 <[^>]*> nop
++00010008 <[^>]*> nop
++0001000c <[^>]*> nop
++00010010 <[^>]*> nop
++00010014 <[^>]*> nop
++00010018 <[^>]*> nop
++ ...
+--- binutils-2.15/gas/testsuite/gas/nios2/relax_ujmp.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/relax_ujmp.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,37 @@
++# relaxing unconditional jumps
++
++.globl text1
++.section text1, "ax", @progbits
++
++ br on_border
++ br out_of_range
++ nop
++ nop
++
++
++.align 15
++# nop
++# nop
++on_border:
++ br in_range
++ nop
++ nop
++ nop
++out_of_range:
++in_range:
++ nop
++
++.globl text2
++.section text2, "ax", @progbits
++
++ br text1
++ br out_of_range
++ br sym
++ nop
++ nop
++sym:
++ nop
++
++
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/reloc_symbols.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/reloc_symbols.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,21 @@
++.text
++# byte aligned
++.align 0
++.byte byte_sym
++
++# short aligned
++.align 1
++.short short_sym
++
++# word aligned
++.align 2
++.long long_sym
++
++# now lets try some unaligned words and halfwords
++.byte byte_sym
++.2byte short_sym
++.4byte long_sym
++
++#.align 2
++#nop
++
+--- binutils-2.15/gas/testsuite/gas/nios2/ret.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ret.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 ret
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> ret
++
+--- binutils-2.15/gas/testsuite/gas/nios2/ret.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/ret.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++# Source file used to test the ret instructions
++foo:
++ ret
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/rol.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rol.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,40 @@
++#objdump: -dr --prefix-addresses -mmips:3000
++#as: -march=r3000 -mtune=r3000
++#name: MIPS R3000 rol
++
++# Test the rol and ror macros.
++
++.*: +file format .*mips.*
++
++Disassembly of section .text:
++0+0000 <[^>]*> negu at,a1
++0+0004 <[^>]*> srlv at,a0,at
++0+0008 <[^>]*> sllv a0,a0,a1
++0+000c <[^>]*> or a0,a0,at
++0+0010 <[^>]*> negu at,a2
++0+0014 <[^>]*> srlv at,a1,at
++0+0018 <[^>]*> sllv a0,a1,a2
++0+001c <[^>]*> or a0,a0,at
++0+0020 <[^>]*> sll at,a0,0x1
++0+0024 <[^>]*> srl a0,a0,0x1f
++0+0028 <[^>]*> or a0,a0,at
++0+002c <[^>]*> sll at,a1,0x1
++0+0030 <[^>]*> srl a0,a1,0x1f
++0+0034 <[^>]*> or a0,a0,at
++0+0038 <[^>]*> srl a0,a1,0x0
++0+003c <[^>]*> negu at,a1
++0+0040 <[^>]*> sllv at,a0,at
++0+0044 <[^>]*> srlv a0,a0,a1
++0+0048 <[^>]*> or a0,a0,at
++0+004c <[^>]*> negu at,a2
++0+0050 <[^>]*> sllv at,a1,at
++0+0054 <[^>]*> srlv a0,a1,a2
++0+0058 <[^>]*> or a0,a0,at
++0+005c <[^>]*> srl at,a0,0x1
++0+0060 <[^>]*> sll a0,a0,0x1f
++0+0064 <[^>]*> or a0,a0,at
++0+0068 <[^>]*> srl at,a1,0x1
++0+006c <[^>]*> sll a0,a1,0x1f
++0+0070 <[^>]*> or a0,a0,at
++0+0074 <[^>]*> srl a0,a1,0x0
++ ...
+--- binutils-2.15/gas/testsuite/gas/nios2/rol.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rol.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,15 @@
++# Source file used to test the rol and ror macros.
++
++foo:
++ rol $4,$5
++ rol $4,$5,$6
++ rol $4,1
++ rol $4,$5,1
++ rol $4,$5,0
++
++ ror $4,$5
++ ror $4,$5,$6
++ ror $4,1
++ ror $4,$5,1
++ ror $4,$5,0
++ .space 8
+--- binutils-2.15/gas/testsuite/gas/nios2/rotate.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rotate.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,17 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 rotate
++
++# Test the and macro.
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> rol r4,r4,r4
++0+0004 <[^>]*> roli r4,r4,31
++0+0008 <[^>]*> ror r4,r4,r4
++0+000c <[^>]*> sll r4,r4,r4
++0+0010 <[^>]*> slli r4,r4,24
++0+0014 <[^>]*> sra r4,r4,r4
++0+0018 <[^>]*> srai r4,r4,10
++0+001c <[^>]*> srl r4,r4,r4
++0+0020 <[^>]*> srli r4,r4,5
+--- binutils-2.15/gas/testsuite/gas/nios2/rotate.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/rotate.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,13 @@
++# test New Jersey rotate instructions
++
++.text
++foo:
++ rol r4,r4,r4
++ roli r4,r4,31
++ ror r4,r4,r4
++ sll r4,r4,r4
++ slli r4,r4,24
++ sra r4,r4,r4
++ srai r4,r4,10
++ srl r4,r4,r4
++ srli r4,r4,5
+--- binutils-2.15/gas/testsuite/gas/nios2/s16_symbol.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/s16_symbol.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++.global some_sym
++.global some_other_sym
++.global min
++.global max
++
++.set max, 0x7fff
++.set min, -0x8000
++.set some_sym, 0x1000
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/stb.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stb.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,196 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 stb
++
++# Test the ld instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> stb r4,0\(zero\)
++0+0004 <[^>]*> stb r4,4\(zero\)
++0+0008 <[^>]*> stb r4,32764\(zero\)
++0+000c <[^>]*> stb r4,-32768\(zero\)
++0+0010 <[^>]*> stb r4,0\(r5\)
++0+0014 <[^>]*> stb r4,4\(r5\)
++0+0018 <[^>]*> stb r4,32764\(r5\)
++0+001c <[^>]*> stb r4,-32768\(r5\)
++0+0020 <[^>]*> stb r4,0\(zero\)
++[ ]*20: R_NIOS2_S16 .data
++0+0024 <[^>]*> stb r4,0\(zero\)
++[ ]*24: R_NIOS2_S16 big_external_data_label
++0+0028 <[^>]*> stb r4,0\(zero\)
++[ ]*28: R_NIOS2_S16 small_external_data_label
++0+002c <[^>]*> stb r4,0\(zero\)
++[ ]*2c: R_NIOS2_S16 big_external_common
++0+0030 <[^>]*> stb r4,0\(zero\)
++[ ]*30: R_NIOS2_S16 small_external_common
++0+0034 <[^>]*> stb r4,0\(zero\)
++[ ]*34: R_NIOS2_S16 .bss
++0+0038 <[^>]*> stb r4,0\(zero\)
++[ ]*38: R_NIOS2_S16 .bss\+0x4000
++0+003c <[^>]*> stb r4,0\(zero\)
++[ ]*3c: R_NIOS2_S16 .data\+0x4
++0+0040 <[^>]*> stb r4,0\(zero\)
++[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
++0+0044 <[^>]*> stb r4,0\(zero\)
++[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
++0+0048 <[^>]*> stb r4,0\(zero\)
++[ ]*48: R_NIOS2_S16 big_external_common\+0x4
++0+004c <[^>]*> stb r4,0\(zero\)
++[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
++0+0050 <[^>]*> stb r4,0\(zero\)
++[ ]*50: R_NIOS2_S16 .bss\+0x4
++0+0054 <[^>]*> stb r4,0\(zero\)
++[ ]*54: R_NIOS2_S16 .bss\+0x4004
++0+0058 <[^>]*> stb r4,0\(zero\)
++[ ]*58: R_NIOS2_S16 .data\+0xffff8000
++0+005c <[^>]*> stb r4,0\(zero\)
++[ ]*5c: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0060 <[^>]*> stb r4,0\(zero\)
++[ ]*60: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0064 <[^>]*> stb r4,0\(zero\)
++[ ]*64: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0068 <[^>]*> stb r4,0\(zero\)
++[ ]*68: R_NIOS2_S16 small_external_common\+0xffff8000
++0+006c <[^>]*> stb r4,0\(zero\)
++[ ]*6c: R_NIOS2_S16 .bss\+0xffff8000
++0+0070 <[^>]*> stb r4,0\(zero\)
++[ ]*70: R_NIOS2_S16 .bss\+0xffffc000
++0+0074 <[^>]*> stb r4,0\(zero\)
++[ ]*74: R_NIOS2_S16 .data\+0x10000
++0+0078 <[^>]*> stb r4,0\(r5\)
++[ ]*78: R_NIOS2_S16 .data
++0+007c <[^>]*> stb r4,0\(r5\)
++[ ]*7c: R_NIOS2_S16 big_external_data_label
++0+0080 <[^>]*> stb r4,0\(r5\)
++[ ]*80: R_NIOS2_S16 small_external_data_label
++0+0084 <[^>]*> stb r4,0\(r5\)
++[ ]*84: R_NIOS2_S16 big_external_common
++0+0088 <[^>]*> stb r4,0\(r5\)
++[ ]*88: R_NIOS2_S16 small_external_common
++0+008c <[^>]*> stb r4,0\(r5\)
++[ ]*8c: R_NIOS2_S16 .bss
++0+0090 <[^>]*> stb r4,0\(r5\)
++[ ]*90: R_NIOS2_S16 .bss\+0x4000
++0+0094 <[^>]*> stb r4,0\(r5\)
++[ ]*94: R_NIOS2_S16 .data\+0x4
++0+0098 <[^>]*> stb r4,0\(r5\)
++[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
++0+009c <[^>]*> stb r4,0\(r5\)
++[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
++0+00a0 <[^>]*> stb r4,0\(r5\)
++[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
++0+00a4 <[^>]*> stb r4,0\(r5\)
++[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
++0+00a8 <[^>]*> stb r4,0\(r5\)
++[ ]*a8: R_NIOS2_S16 .bss\+0x4
++0+00ac <[^>]*> stb r4,0\(r5\)
++[ ]*ac: R_NIOS2_S16 .bss\+0x4004
++0+00b0 <[^>]*> stb r4,0\(r5\)
++[ ]*b0: R_NIOS2_S16 .data\+0xffff8000
++0+00b4 <[^>]*> stb r4,0\(r5\)
++[ ]*b4: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+00b8 <[^>]*> stb r4,0\(r5\)
++[ ]*b8: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+00bc <[^>]*> stb r4,0\(r5\)
++[ ]*bc: R_NIOS2_S16 big_external_common\+0xffff8000
++0+00c0 <[^>]*> stb r4,0\(r5\)
++[ ]*c0: R_NIOS2_S16 small_external_common\+0xffff8000
++0+00c4 <[^>]*> stb r4,0\(r5\)
++[ ]*c4: R_NIOS2_S16 .bss\+0xffff8000
++0+00c8 <[^>]*> stb r4,0\(r5\)
++[ ]*c8: R_NIOS2_S16 .bss\+0xffffc000
++0+00cc <[^>]*> stbio r4,0\(zero\)
++0+00d0 <[^>]*> stbio r4,4\(zero\)
++0+00d4 <[^>]*> stbio r4,32764\(zero\)
++0+00d8 <[^>]*> stbio r4,-32768\(zero\)
++0+00dc <[^>]*> stbio r4,0\(r5\)
++0+00e0 <[^>]*> stbio r4,4\(r5\)
++0+00e4 <[^>]*> stbio r4,32764\(r5\)
++0+00e8 <[^>]*> stbio r4,-32768\(r5\)
++0+00ec <[^>]*> stbio r4,0\(zero\)
++[ ]*ec: R_NIOS2_S16 .data
++0+00f0 <[^>]*> stbio r4,0\(zero\)
++[ ]*f0: R_NIOS2_S16 big_external_data_label
++0+00f4 <[^>]*> stbio r4,0\(zero\)
++[ ]*f4: R_NIOS2_S16 small_external_data_label
++0+00f8 <[^>]*> stbio r4,0\(zero\)
++[ ]*f8: R_NIOS2_S16 big_external_common
++0+00fc <[^>]*> stbio r4,0\(zero\)
++[ ]*fc: R_NIOS2_S16 small_external_common
++0+0100 <[^>]*> stbio r4,0\(zero\)
++[ ]*100: R_NIOS2_S16 .bss
++0+0104 <[^>]*> stbio r4,0\(zero\)
++[ ]*104: R_NIOS2_S16 .bss\+0x4000
++0+0108 <[^>]*> stbio r4,0\(zero\)
++[ ]*108: R_NIOS2_S16 .data\+0x4
++0+010c <[^>]*> stbio r4,0\(zero\)
++[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
++0+0110 <[^>]*> stbio r4,0\(zero\)
++[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
++0+0114 <[^>]*> stbio r4,0\(zero\)
++[ ]*114: R_NIOS2_S16 big_external_common\+0x4
++0+0118 <[^>]*> stbio r4,0\(zero\)
++[ ]*118: R_NIOS2_S16 small_external_common\+0x4
++0+011c <[^>]*> stbio r4,0\(zero\)
++[ ]*11c: R_NIOS2_S16 .bss\+0x4
++0+0120 <[^>]*> stbio r4,0\(zero\)
++[ ]*120: R_NIOS2_S16 .bss\+0x4004
++0+0124 <[^>]*> stbio r4,0\(zero\)
++[ ]*124: R_NIOS2_S16 .data\+0xffff8000
++0+0128 <[^>]*> stbio r4,0\(zero\)
++[ ]*128: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+012c <[^>]*> stbio r4,0\(zero\)
++[ ]*12c: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0130 <[^>]*> stbio r4,0\(zero\)
++[ ]*130: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0134 <[^>]*> stbio r4,0\(zero\)
++[ ]*134: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0138 <[^>]*> stbio r4,0\(zero\)
++[ ]*138: R_NIOS2_S16 .bss\+0xffff8000
++0+013c <[^>]*> stbio r4,0\(zero\)
++[ ]*13c: R_NIOS2_S16 .bss\+0xffffc000
++0+0140 <[^>]*> stbio r4,0\(zero\)
++[ ]*140: R_NIOS2_S16 .data\+0x10000
++0+0144 <[^>]*> stbio r4,0\(r5\)
++[ ]*144: R_NIOS2_S16 .data
++0+0148 <[^>]*> stbio r4,0\(r5\)
++[ ]*148: R_NIOS2_S16 big_external_data_label
++0+014c <[^>]*> stbio r4,0\(r5\)
++[ ]*14c: R_NIOS2_S16 small_external_data_label
++0+0150 <[^>]*> stbio r4,0\(r5\)
++[ ]*150: R_NIOS2_S16 big_external_common
++0+0154 <[^>]*> stbio r4,0\(r5\)
++[ ]*154: R_NIOS2_S16 small_external_common
++0+0158 <[^>]*> stbio r4,0\(r5\)
++[ ]*158: R_NIOS2_S16 .bss
++0+015c <[^>]*> stbio r4,0\(r5\)
++[ ]*15c: R_NIOS2_S16 .bss\+0x4000
++0+0160 <[^>]*> stbio r4,0\(r5\)
++[ ]*160: R_NIOS2_S16 .data\+0x4
++0+0164 <[^>]*> stbio r4,0\(r5\)
++[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
++0+0168 <[^>]*> stbio r4,0\(r5\)
++[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
++0+016c <[^>]*> stbio r4,0\(r5\)
++[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
++0+0170 <[^>]*> stbio r4,0\(r5\)
++[ ]*170: R_NIOS2_S16 small_external_common\+0x4
++0+0174 <[^>]*> stbio r4,0\(r5\)
++[ ]*174: R_NIOS2_S16 .bss\+0x4
++0+0178 <[^>]*> stbio r4,0\(r5\)
++[ ]*178: R_NIOS2_S16 .bss\+0x4004
++0+017c <[^>]*> stbio r4,0\(r5\)
++[ ]*17c: R_NIOS2_S16 .data\+0xffff8000
++0+0180 <[^>]*> stbio r4,0\(r5\)
++[ ]*180: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0184 <[^>]*> stbio r4,0\(r5\)
++[ ]*184: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0188 <[^>]*> stbio r4,0\(r5\)
++[ ]*188: R_NIOS2_S16 big_external_common\+0xffff8000
++0+018c <[^>]*> stbio r4,0\(r5\)
++[ ]*18c: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0190 <[^>]*> stbio r4,0\(r5\)
++[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
++0+0194 <[^>]*> stbio r4,0\(r5\)
++[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
+--- binutils-2.15/gas/testsuite/gas/nios2/stb.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stb.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,117 @@
++ .data
++data_label:
++ .extern big_external_data_label,0x4000
++ .extern small_external_data_label,4
++ .comm big_external_common,0x4000
++ .comm small_external_common,4
++ .lcomm big_local_common,0x4000
++ .lcomm small_local_common,4
++
++# the small symbols should have space allocated in the sbss section
++# but this is not yet supported in the assembler, so space is allocated
++# in the .bss section and the relocations are not gp-relative. this will
++# be updated when gp-relative relocations are added
++ .text
++ stb r4,0(r0)
++ stb r4,4(r0)
++ stb r4,0x7ffc(r0)
++ stb r4,-0x8000(r0)
++ stb r4,0(r5)
++ stb r4,4(r5)
++ stb r4,0x7ffc(r5)
++ stb r4,-0x8000(r5)
++ stb r4,data_label(r0)
++ stb r4,big_external_data_label(r0)
++ stb r4,small_external_data_label(r0)
++ stb r4,big_external_common(r0)
++ stb r4,small_external_common(r0)
++ stb r4,big_local_common(r0)
++ stb r4,small_local_common(r0)
++ stb r4,data_label+4(r0)
++ stb r4,big_external_data_label+4(r0)
++ stb r4,small_external_data_label+4(r0)
++ stb r4,big_external_common+4(r0)
++ stb r4,small_external_common+4(r0)
++ stb r4,big_local_common+4(r0)
++ stb r4,small_local_common+4(r0)
++ stb r4,data_label-0x8000(r0)
++ stb r4,big_external_data_label-0x8000(r0)
++ stb r4,small_external_data_label-0x8000(r0)
++ stb r4,big_external_common-0x8000(r0)
++ stb r4,small_external_common-0x8000(r0)
++ stb r4,big_local_common-0x8000(r0)
++ stb r4,small_local_common-0x8000(r0)
++ stb r4,data_label+0x10000(r0)
++ stb r4,data_label(r5)
++ stb r4,big_external_data_label(r5)
++ stb r4,small_external_data_label(r5)
++ stb r4,big_external_common(r5)
++ stb r4,small_external_common(r5)
++ stb r4,big_local_common(r5)
++ stb r4,small_local_common(r5)
++ stb r4,data_label+4(r5)
++ stb r4,big_external_data_label+4(r5)
++ stb r4,small_external_data_label+4(r5)
++ stb r4,big_external_common+4(r5)
++ stb r4,small_external_common+4(r5)
++ stb r4,big_local_common+4(r5)
++ stb r4,small_local_common+4(r5)
++ stb r4,data_label-0x8000(r5)
++ stb r4,big_external_data_label-0x8000(r5)
++ stb r4,small_external_data_label-0x8000(r5)
++ stb r4,big_external_common-0x8000(r5)
++ stb r4,small_external_common-0x8000(r5)
++ stb r4,big_local_common-0x8000(r5)
++ stb r4,small_local_common-0x8000(r5)
++
++ stbio r4,0(r0)
++ stbio r4,4(r0)
++ stbio r4,0x7ffc(r0)
++ stbio r4,-0x8000(r0)
++ stbio r4,0(r5)
++ stbio r4,4(r5)
++ stbio r4,0x7ffc(r5)
++ stbio r4,-0x8000(r5)
++ stbio r4,data_label(r0)
++ stbio r4,big_external_data_label(r0)
++ stbio r4,small_external_data_label(r0)
++ stbio r4,big_external_common(r0)
++ stbio r4,small_external_common(r0)
++ stbio r4,big_local_common(r0)
++ stbio r4,small_local_common(r0)
++ stbio r4,data_label+4(r0)
++ stbio r4,big_external_data_label+4(r0)
++ stbio r4,small_external_data_label+4(r0)
++ stbio r4,big_external_common+4(r0)
++ stbio r4,small_external_common+4(r0)
++ stbio r4,big_local_common+4(r0)
++ stbio r4,small_local_common+4(r0)
++ stbio r4,data_label-0x8000(r0)
++ stbio r4,big_external_data_label-0x8000(r0)
++ stbio r4,small_external_data_label-0x8000(r0)
++ stbio r4,big_external_common-0x8000(r0)
++ stbio r4,small_external_common-0x8000(r0)
++ stbio r4,big_local_common-0x8000(r0)
++ stbio r4,small_local_common-0x8000(r0)
++ stbio r4,data_label+0x10000(r0)
++ stbio r4,data_label(r5)
++ stbio r4,big_external_data_label(r5)
++ stbio r4,small_external_data_label(r5)
++ stbio r4,big_external_common(r5)
++ stbio r4,small_external_common(r5)
++ stbio r4,big_local_common(r5)
++ stbio r4,small_local_common(r5)
++ stbio r4,data_label+4(r5)
++ stbio r4,big_external_data_label+4(r5)
++ stbio r4,small_external_data_label+4(r5)
++ stbio r4,big_external_common+4(r5)
++ stbio r4,small_external_common+4(r5)
++ stbio r4,big_local_common+4(r5)
++ stbio r4,small_local_common+4(r5)
++ stbio r4,data_label-0x8000(r5)
++ stbio r4,big_external_data_label-0x8000(r5)
++ stbio r4,small_external_data_label-0x8000(r5)
++ stbio r4,big_external_common-0x8000(r5)
++ stbio r4,small_external_common-0x8000(r5)
++ stbio r4,big_local_common-0x8000(r5)
++ stbio r4,small_local_common-0x8000(r5)
+--- binutils-2.15/gas/testsuite/gas/nios2/sth.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sth.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,196 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 sth
++
++# Test the ld instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> sth r4,0\(zero\)
++0+0004 <[^>]*> sth r4,4\(zero\)
++0+0008 <[^>]*> sth r4,32764\(zero\)
++0+000c <[^>]*> sth r4,-32768\(zero\)
++0+0010 <[^>]*> sth r4,0\(r5\)
++0+0014 <[^>]*> sth r4,4\(r5\)
++0+0018 <[^>]*> sth r4,32764\(r5\)
++0+001c <[^>]*> sth r4,-32768\(r5\)
++0+0020 <[^>]*> sth r4,0\(zero\)
++[ ]*20: R_NIOS2_S16 .data
++0+0024 <[^>]*> sth r4,0\(zero\)
++[ ]*24: R_NIOS2_S16 big_external_data_label
++0+0028 <[^>]*> sth r4,0\(zero\)
++[ ]*28: R_NIOS2_S16 small_external_data_label
++0+002c <[^>]*> sth r4,0\(zero\)
++[ ]*2c: R_NIOS2_S16 big_external_common
++0+0030 <[^>]*> sth r4,0\(zero\)
++[ ]*30: R_NIOS2_S16 small_external_common
++0+0034 <[^>]*> sth r4,0\(zero\)
++[ ]*34: R_NIOS2_S16 .bss
++0+0038 <[^>]*> sth r4,0\(zero\)
++[ ]*38: R_NIOS2_S16 .bss\+0x4000
++0+003c <[^>]*> sth r4,0\(zero\)
++[ ]*3c: R_NIOS2_S16 .data\+0x4
++0+0040 <[^>]*> sth r4,0\(zero\)
++[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
++0+0044 <[^>]*> sth r4,0\(zero\)
++[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
++0+0048 <[^>]*> sth r4,0\(zero\)
++[ ]*48: R_NIOS2_S16 big_external_common\+0x4
++0+004c <[^>]*> sth r4,0\(zero\)
++[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
++0+0050 <[^>]*> sth r4,0\(zero\)
++[ ]*50: R_NIOS2_S16 .bss\+0x4
++0+0054 <[^>]*> sth r4,0\(zero\)
++[ ]*54: R_NIOS2_S16 .bss\+0x4004
++0+0058 <[^>]*> sth r4,0\(zero\)
++[ ]*58: R_NIOS2_S16 .data\+0xffff8000
++0+005c <[^>]*> sth r4,0\(zero\)
++[ ]*5c: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0060 <[^>]*> sth r4,0\(zero\)
++[ ]*60: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0064 <[^>]*> sth r4,0\(zero\)
++[ ]*64: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0068 <[^>]*> sth r4,0\(zero\)
++[ ]*68: R_NIOS2_S16 small_external_common\+0xffff8000
++0+006c <[^>]*> sth r4,0\(zero\)
++[ ]*6c: R_NIOS2_S16 .bss\+0xffff8000
++0+0070 <[^>]*> sth r4,0\(zero\)
++[ ]*70: R_NIOS2_S16 .bss\+0xffffc000
++0+0074 <[^>]*> sth r4,0\(zero\)
++[ ]*74: R_NIOS2_S16 .data\+0x10000
++0+0078 <[^>]*> sth r4,0\(r5\)
++[ ]*78: R_NIOS2_S16 .data
++0+007c <[^>]*> sth r4,0\(r5\)
++[ ]*7c: R_NIOS2_S16 big_external_data_label
++0+0080 <[^>]*> sth r4,0\(r5\)
++[ ]*80: R_NIOS2_S16 small_external_data_label
++0+0084 <[^>]*> sth r4,0\(r5\)
++[ ]*84: R_NIOS2_S16 big_external_common
++0+0088 <[^>]*> sth r4,0\(r5\)
++[ ]*88: R_NIOS2_S16 small_external_common
++0+008c <[^>]*> sth r4,0\(r5\)
++[ ]*8c: R_NIOS2_S16 .bss
++0+0090 <[^>]*> sth r4,0\(r5\)
++[ ]*90: R_NIOS2_S16 .bss\+0x4000
++0+0094 <[^>]*> sth r4,0\(r5\)
++[ ]*94: R_NIOS2_S16 .data\+0x4
++0+0098 <[^>]*> sth r4,0\(r5\)
++[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
++0+009c <[^>]*> sth r4,0\(r5\)
++[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
++0+00a0 <[^>]*> sth r4,0\(r5\)
++[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
++0+00a4 <[^>]*> sth r4,0\(r5\)
++[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
++0+00a8 <[^>]*> sth r4,0\(r5\)
++[ ]*a8: R_NIOS2_S16 .bss\+0x4
++0+00ac <[^>]*> sth r4,0\(r5\)
++[ ]*ac: R_NIOS2_S16 .bss\+0x4004
++0+00b0 <[^>]*> sth r4,0\(r5\)
++[ ]*b0: R_NIOS2_S16 .data\+0xffff8000
++0+00b4 <[^>]*> sth r4,0\(r5\)
++[ ]*b4: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+00b8 <[^>]*> sth r4,0\(r5\)
++[ ]*b8: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+00bc <[^>]*> sth r4,0\(r5\)
++[ ]*bc: R_NIOS2_S16 big_external_common\+0xffff8000
++0+00c0 <[^>]*> sth r4,0\(r5\)
++[ ]*c0: R_NIOS2_S16 small_external_common\+0xffff8000
++0+00c4 <[^>]*> sth r4,0\(r5\)
++[ ]*c4: R_NIOS2_S16 .bss\+0xffff8000
++0+00c8 <[^>]*> sth r4,0\(r5\)
++[ ]*c8: R_NIOS2_S16 .bss\+0xffffc000
++0+00cc <[^>]*> sthio r4,0\(zero\)
++0+00d0 <[^>]*> sthio r4,4\(zero\)
++0+00d4 <[^>]*> sthio r4,32764\(zero\)
++0+00d8 <[^>]*> sthio r4,-32768\(zero\)
++0+00dc <[^>]*> sthio r4,0\(r5\)
++0+00e0 <[^>]*> sthio r4,4\(r5\)
++0+00e4 <[^>]*> sthio r4,32764\(r5\)
++0+00e8 <[^>]*> sthio r4,-32768\(r5\)
++0+00ec <[^>]*> sthio r4,0\(zero\)
++[ ]*ec: R_NIOS2_S16 .data
++0+00f0 <[^>]*> sthio r4,0\(zero\)
++[ ]*f0: R_NIOS2_S16 big_external_data_label
++0+00f4 <[^>]*> sthio r4,0\(zero\)
++[ ]*f4: R_NIOS2_S16 small_external_data_label
++0+00f8 <[^>]*> sthio r4,0\(zero\)
++[ ]*f8: R_NIOS2_S16 big_external_common
++0+00fc <[^>]*> sthio r4,0\(zero\)
++[ ]*fc: R_NIOS2_S16 small_external_common
++0+0100 <[^>]*> sthio r4,0\(zero\)
++[ ]*100: R_NIOS2_S16 .bss
++0+0104 <[^>]*> sthio r4,0\(zero\)
++[ ]*104: R_NIOS2_S16 .bss\+0x4000
++0+0108 <[^>]*> sthio r4,0\(zero\)
++[ ]*108: R_NIOS2_S16 .data\+0x4
++0+010c <[^>]*> sthio r4,0\(zero\)
++[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
++0+0110 <[^>]*> sthio r4,0\(zero\)
++[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
++0+0114 <[^>]*> sthio r4,0\(zero\)
++[ ]*114: R_NIOS2_S16 big_external_common\+0x4
++0+0118 <[^>]*> sthio r4,0\(zero\)
++[ ]*118: R_NIOS2_S16 small_external_common\+0x4
++0+011c <[^>]*> sthio r4,0\(zero\)
++[ ]*11c: R_NIOS2_S16 .bss\+0x4
++0+0120 <[^>]*> sthio r4,0\(zero\)
++[ ]*120: R_NIOS2_S16 .bss\+0x4004
++0+0124 <[^>]*> sthio r4,0\(zero\)
++[ ]*124: R_NIOS2_S16 .data\+0xffff8000
++0+0128 <[^>]*> sthio r4,0\(zero\)
++[ ]*128: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+012c <[^>]*> sthio r4,0\(zero\)
++[ ]*12c: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0130 <[^>]*> sthio r4,0\(zero\)
++[ ]*130: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0134 <[^>]*> sthio r4,0\(zero\)
++[ ]*134: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0138 <[^>]*> sthio r4,0\(zero\)
++[ ]*138: R_NIOS2_S16 .bss\+0xffff8000
++0+013c <[^>]*> sthio r4,0\(zero\)
++[ ]*13c: R_NIOS2_S16 .bss\+0xffffc000
++0+0140 <[^>]*> sthio r4,0\(zero\)
++[ ]*140: R_NIOS2_S16 .data\+0x10000
++0+0144 <[^>]*> sthio r4,0\(r5\)
++[ ]*144: R_NIOS2_S16 .data
++0+0148 <[^>]*> sthio r4,0\(r5\)
++[ ]*148: R_NIOS2_S16 big_external_data_label
++0+014c <[^>]*> sthio r4,0\(r5\)
++[ ]*14c: R_NIOS2_S16 small_external_data_label
++0+0150 <[^>]*> sthio r4,0\(r5\)
++[ ]*150: R_NIOS2_S16 big_external_common
++0+0154 <[^>]*> sthio r4,0\(r5\)
++[ ]*154: R_NIOS2_S16 small_external_common
++0+0158 <[^>]*> sthio r4,0\(r5\)
++[ ]*158: R_NIOS2_S16 .bss
++0+015c <[^>]*> sthio r4,0\(r5\)
++[ ]*15c: R_NIOS2_S16 .bss\+0x4000
++0+0160 <[^>]*> sthio r4,0\(r5\)
++[ ]*160: R_NIOS2_S16 .data\+0x4
++0+0164 <[^>]*> sthio r4,0\(r5\)
++[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
++0+0168 <[^>]*> sthio r4,0\(r5\)
++[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
++0+016c <[^>]*> sthio r4,0\(r5\)
++[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
++0+0170 <[^>]*> sthio r4,0\(r5\)
++[ ]*170: R_NIOS2_S16 small_external_common\+0x4
++0+0174 <[^>]*> sthio r4,0\(r5\)
++[ ]*174: R_NIOS2_S16 .bss\+0x4
++0+0178 <[^>]*> sthio r4,0\(r5\)
++[ ]*178: R_NIOS2_S16 .bss\+0x4004
++0+017c <[^>]*> sthio r4,0\(r5\)
++[ ]*17c: R_NIOS2_S16 .data\+0xffff8000
++0+0180 <[^>]*> sthio r4,0\(r5\)
++[ ]*180: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0184 <[^>]*> sthio r4,0\(r5\)
++[ ]*184: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0188 <[^>]*> sthio r4,0\(r5\)
++[ ]*188: R_NIOS2_S16 big_external_common\+0xffff8000
++0+018c <[^>]*> sthio r4,0\(r5\)
++[ ]*18c: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0190 <[^>]*> sthio r4,0\(r5\)
++[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
++0+0194 <[^>]*> sthio r4,0\(r5\)
++[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
+--- binutils-2.15/gas/testsuite/gas/nios2/sth.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sth.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,117 @@
++ .data
++data_label:
++ .extern big_external_data_label,0x4000
++ .extern small_external_data_label,4
++ .comm big_external_common,0x4000
++ .comm small_external_common,4
++ .lcomm big_local_common,0x4000
++ .lcomm small_local_common,4
++
++# the small symbols should have space allocated in the sbss section
++# but this is not yet supported in the assembler, so space is allocated
++# in the .bss section and the relocations are not gp-relative. this will
++# be updated when gp-relative relocations are added
++ .text
++ sth r4,0(r0)
++ sth r4,4(r0)
++ sth r4,0x7ffc(r0)
++ sth r4,-0x8000(r0)
++ sth r4,0(r5)
++ sth r4,4(r5)
++ sth r4,0x7ffc(r5)
++ sth r4,-0x8000(r5)
++ sth r4,data_label(r0)
++ sth r4,big_external_data_label(r0)
++ sth r4,small_external_data_label(r0)
++ sth r4,big_external_common(r0)
++ sth r4,small_external_common(r0)
++ sth r4,big_local_common(r0)
++ sth r4,small_local_common(r0)
++ sth r4,data_label+4(r0)
++ sth r4,big_external_data_label+4(r0)
++ sth r4,small_external_data_label+4(r0)
++ sth r4,big_external_common+4(r0)
++ sth r4,small_external_common+4(r0)
++ sth r4,big_local_common+4(r0)
++ sth r4,small_local_common+4(r0)
++ sth r4,data_label-0x8000(r0)
++ sth r4,big_external_data_label-0x8000(r0)
++ sth r4,small_external_data_label-0x8000(r0)
++ sth r4,big_external_common-0x8000(r0)
++ sth r4,small_external_common-0x8000(r0)
++ sth r4,big_local_common-0x8000(r0)
++ sth r4,small_local_common-0x8000(r0)
++ sth r4,data_label+0x10000(r0)
++ sth r4,data_label(r5)
++ sth r4,big_external_data_label(r5)
++ sth r4,small_external_data_label(r5)
++ sth r4,big_external_common(r5)
++ sth r4,small_external_common(r5)
++ sth r4,big_local_common(r5)
++ sth r4,small_local_common(r5)
++ sth r4,data_label+4(r5)
++ sth r4,big_external_data_label+4(r5)
++ sth r4,small_external_data_label+4(r5)
++ sth r4,big_external_common+4(r5)
++ sth r4,small_external_common+4(r5)
++ sth r4,big_local_common+4(r5)
++ sth r4,small_local_common+4(r5)
++ sth r4,data_label-0x8000(r5)
++ sth r4,big_external_data_label-0x8000(r5)
++ sth r4,small_external_data_label-0x8000(r5)
++ sth r4,big_external_common-0x8000(r5)
++ sth r4,small_external_common-0x8000(r5)
++ sth r4,big_local_common-0x8000(r5)
++ sth r4,small_local_common-0x8000(r5)
++
++ sthio r4,0(r0)
++ sthio r4,4(r0)
++ sthio r4,0x7ffc(r0)
++ sthio r4,-0x8000(r0)
++ sthio r4,0(r5)
++ sthio r4,4(r5)
++ sthio r4,0x7ffc(r5)
++ sthio r4,-0x8000(r5)
++ sthio r4,data_label(r0)
++ sthio r4,big_external_data_label(r0)
++ sthio r4,small_external_data_label(r0)
++ sthio r4,big_external_common(r0)
++ sthio r4,small_external_common(r0)
++ sthio r4,big_local_common(r0)
++ sthio r4,small_local_common(r0)
++ sthio r4,data_label+4(r0)
++ sthio r4,big_external_data_label+4(r0)
++ sthio r4,small_external_data_label+4(r0)
++ sthio r4,big_external_common+4(r0)
++ sthio r4,small_external_common+4(r0)
++ sthio r4,big_local_common+4(r0)
++ sthio r4,small_local_common+4(r0)
++ sthio r4,data_label-0x8000(r0)
++ sthio r4,big_external_data_label-0x8000(r0)
++ sthio r4,small_external_data_label-0x8000(r0)
++ sthio r4,big_external_common-0x8000(r0)
++ sthio r4,small_external_common-0x8000(r0)
++ sthio r4,big_local_common-0x8000(r0)
++ sthio r4,small_local_common-0x8000(r0)
++ sthio r4,data_label+0x10000(r0)
++ sthio r4,data_label(r5)
++ sthio r4,big_external_data_label(r5)
++ sthio r4,small_external_data_label(r5)
++ sthio r4,big_external_common(r5)
++ sthio r4,small_external_common(r5)
++ sthio r4,big_local_common(r5)
++ sthio r4,small_local_common(r5)
++ sthio r4,data_label+4(r5)
++ sthio r4,big_external_data_label+4(r5)
++ sthio r4,small_external_data_label+4(r5)
++ sthio r4,big_external_common+4(r5)
++ sthio r4,small_external_common+4(r5)
++ sthio r4,big_local_common+4(r5)
++ sthio r4,small_local_common+4(r5)
++ sthio r4,data_label-0x8000(r5)
++ sthio r4,big_external_data_label-0x8000(r5)
++ sthio r4,small_external_data_label-0x8000(r5)
++ sthio r4,big_external_common-0x8000(r5)
++ sthio r4,small_external_common-0x8000(r5)
++ sthio r4,big_local_common-0x8000(r5)
++ sthio r4,small_local_common-0x8000(r5)
+--- binutils-2.15/gas/testsuite/gas/nios2/str2.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/str2.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,21 @@
++ .section .rodata.str1.1,"aMS",@progbits,1
++.LC0:
++ .string "DHRYSTONE PROGRAM, 3'RD STRING"
++.LC1:
++ .string "COMMON"
++.LC2:
++ .string "DHRYSTONE PROGRAM, 4'TH STRING"
++
++ .section .text
++ .align 3
++ .global func2
++ .type func2, @function
++func2:
++ #movhi r2, %hiadj(.LC0)
++ addi r2, r2, .LC0
++ #movhi r3, %hiadj(.LC1)
++ addi r3, r3, .LC1
++ #movhi r4, %hiadj(.LC2)
++ addi r4, r4, .LC2
++ .size func2, .-func2
++
+--- binutils-2.15/gas/testsuite/gas/nios2/stw.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stw.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,196 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 stw
++
++# Test the ld instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> stw r4,0\(zero\)
++0+0004 <[^>]*> stw r4,4\(zero\)
++0+0008 <[^>]*> stw r4,32764\(zero\)
++0+000c <[^>]*> stw r4,-32768\(zero\)
++0+0010 <[^>]*> stw r4,0\(r5\)
++0+0014 <[^>]*> stw r4,4\(r5\)
++0+0018 <[^>]*> stw r4,32764\(r5\)
++0+001c <[^>]*> stw r4,-32768\(r5\)
++0+0020 <[^>]*> stw r4,0\(zero\)
++[ ]*20: R_NIOS2_S16 .data
++0+0024 <[^>]*> stw r4,0\(zero\)
++[ ]*24: R_NIOS2_S16 big_external_data_label
++0+0028 <[^>]*> stw r4,0\(zero\)
++[ ]*28: R_NIOS2_S16 small_external_data_label
++0+002c <[^>]*> stw r4,0\(zero\)
++[ ]*2c: R_NIOS2_S16 big_external_common
++0+0030 <[^>]*> stw r4,0\(zero\)
++[ ]*30: R_NIOS2_S16 small_external_common
++0+0034 <[^>]*> stw r4,0\(zero\)
++[ ]*34: R_NIOS2_S16 .bss
++0+0038 <[^>]*> stw r4,0\(zero\)
++[ ]*38: R_NIOS2_S16 .bss\+0x4000
++0+003c <[^>]*> stw r4,0\(zero\)
++[ ]*3c: R_NIOS2_S16 .data\+0x4
++0+0040 <[^>]*> stw r4,0\(zero\)
++[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
++0+0044 <[^>]*> stw r4,0\(zero\)
++[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
++0+0048 <[^>]*> stw r4,0\(zero\)
++[ ]*48: R_NIOS2_S16 big_external_common\+0x4
++0+004c <[^>]*> stw r4,0\(zero\)
++[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
++0+0050 <[^>]*> stw r4,0\(zero\)
++[ ]*50: R_NIOS2_S16 .bss\+0x4
++0+0054 <[^>]*> stw r4,0\(zero\)
++[ ]*54: R_NIOS2_S16 .bss\+0x4004
++0+0058 <[^>]*> stw r4,0\(zero\)
++[ ]*58: R_NIOS2_S16 .data\+0xffff8000
++0+005c <[^>]*> stw r4,0\(zero\)
++[ ]*5c: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0060 <[^>]*> stw r4,0\(zero\)
++[ ]*60: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0064 <[^>]*> stw r4,0\(zero\)
++[ ]*64: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0068 <[^>]*> stw r4,0\(zero\)
++[ ]*68: R_NIOS2_S16 small_external_common\+0xffff8000
++0+006c <[^>]*> stw r4,0\(zero\)
++[ ]*6c: R_NIOS2_S16 .bss\+0xffff8000
++0+0070 <[^>]*> stw r4,0\(zero\)
++[ ]*70: R_NIOS2_S16 .bss\+0xffffc000
++0+0074 <[^>]*> stw r4,0\(zero\)
++[ ]*74: R_NIOS2_S16 .data\+0x10000
++0+0078 <[^>]*> stw r4,0\(r5\)
++[ ]*78: R_NIOS2_S16 .data
++0+007c <[^>]*> stw r4,0\(r5\)
++[ ]*7c: R_NIOS2_S16 big_external_data_label
++0+0080 <[^>]*> stw r4,0\(r5\)
++[ ]*80: R_NIOS2_S16 small_external_data_label
++0+0084 <[^>]*> stw r4,0\(r5\)
++[ ]*84: R_NIOS2_S16 big_external_common
++0+0088 <[^>]*> stw r4,0\(r5\)
++[ ]*88: R_NIOS2_S16 small_external_common
++0+008c <[^>]*> stw r4,0\(r5\)
++[ ]*8c: R_NIOS2_S16 .bss
++0+0090 <[^>]*> stw r4,0\(r5\)
++[ ]*90: R_NIOS2_S16 .bss\+0x4000
++0+0094 <[^>]*> stw r4,0\(r5\)
++[ ]*94: R_NIOS2_S16 .data\+0x4
++0+0098 <[^>]*> stw r4,0\(r5\)
++[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
++0+009c <[^>]*> stw r4,0\(r5\)
++[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
++0+00a0 <[^>]*> stw r4,0\(r5\)
++[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
++0+00a4 <[^>]*> stw r4,0\(r5\)
++[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
++0+00a8 <[^>]*> stw r4,0\(r5\)
++[ ]*a8: R_NIOS2_S16 .bss\+0x4
++0+00ac <[^>]*> stw r4,0\(r5\)
++[ ]*ac: R_NIOS2_S16 .bss\+0x4004
++0+00b0 <[^>]*> stw r4,0\(r5\)
++[ ]*b0: R_NIOS2_S16 .data\+0xffff8000
++0+00b4 <[^>]*> stw r4,0\(r5\)
++[ ]*b4: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+00b8 <[^>]*> stw r4,0\(r5\)
++[ ]*b8: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+00bc <[^>]*> stw r4,0\(r5\)
++[ ]*bc: R_NIOS2_S16 big_external_common\+0xffff8000
++0+00c0 <[^>]*> stw r4,0\(r5\)
++[ ]*c0: R_NIOS2_S16 small_external_common\+0xffff8000
++0+00c4 <[^>]*> stw r4,0\(r5\)
++[ ]*c4: R_NIOS2_S16 .bss\+0xffff8000
++0+00c8 <[^>]*> stw r4,0\(r5\)
++[ ]*c8: R_NIOS2_S16 .bss\+0xffffc000
++0+00cc <[^>]*> stwio r4,0\(zero\)
++0+00d0 <[^>]*> stwio r4,4\(zero\)
++0+00d4 <[^>]*> stwio r4,32764\(zero\)
++0+00d8 <[^>]*> stwio r4,-32768\(zero\)
++0+00dc <[^>]*> stwio r4,0\(r5\)
++0+00e0 <[^>]*> stwio r4,4\(r5\)
++0+00e4 <[^>]*> stwio r4,32764\(r5\)
++0+00e8 <[^>]*> stwio r4,-32768\(r5\)
++0+00ec <[^>]*> stwio r4,0\(zero\)
++[ ]*ec: R_NIOS2_S16 .data
++0+00f0 <[^>]*> stwio r4,0\(zero\)
++[ ]*f0: R_NIOS2_S16 big_external_data_label
++0+00f4 <[^>]*> stwio r4,0\(zero\)
++[ ]*f4: R_NIOS2_S16 small_external_data_label
++0+00f8 <[^>]*> stwio r4,0\(zero\)
++[ ]*f8: R_NIOS2_S16 big_external_common
++0+00fc <[^>]*> stwio r4,0\(zero\)
++[ ]*fc: R_NIOS2_S16 small_external_common
++0+0100 <[^>]*> stwio r4,0\(zero\)
++[ ]*100: R_NIOS2_S16 .bss
++0+0104 <[^>]*> stwio r4,0\(zero\)
++[ ]*104: R_NIOS2_S16 .bss\+0x4000
++0+0108 <[^>]*> stwio r4,0\(zero\)
++[ ]*108: R_NIOS2_S16 .data\+0x4
++0+010c <[^>]*> stwio r4,0\(zero\)
++[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
++0+0110 <[^>]*> stwio r4,0\(zero\)
++[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
++0+0114 <[^>]*> stwio r4,0\(zero\)
++[ ]*114: R_NIOS2_S16 big_external_common\+0x4
++0+0118 <[^>]*> stwio r4,0\(zero\)
++[ ]*118: R_NIOS2_S16 small_external_common\+0x4
++0+011c <[^>]*> stwio r4,0\(zero\)
++[ ]*11c: R_NIOS2_S16 .bss\+0x4
++0+0120 <[^>]*> stwio r4,0\(zero\)
++[ ]*120: R_NIOS2_S16 .bss\+0x4004
++0+0124 <[^>]*> stwio r4,0\(zero\)
++[ ]*124: R_NIOS2_S16 .data\+0xffff8000
++0+0128 <[^>]*> stwio r4,0\(zero\)
++[ ]*128: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+012c <[^>]*> stwio r4,0\(zero\)
++[ ]*12c: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0130 <[^>]*> stwio r4,0\(zero\)
++[ ]*130: R_NIOS2_S16 big_external_common\+0xffff8000
++0+0134 <[^>]*> stwio r4,0\(zero\)
++[ ]*134: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0138 <[^>]*> stwio r4,0\(zero\)
++[ ]*138: R_NIOS2_S16 .bss\+0xffff8000
++0+013c <[^>]*> stwio r4,0\(zero\)
++[ ]*13c: R_NIOS2_S16 .bss\+0xffffc000
++0+0140 <[^>]*> stwio r4,0\(zero\)
++[ ]*140: R_NIOS2_S16 .data\+0x10000
++0+0144 <[^>]*> stwio r4,0\(r5\)
++[ ]*144: R_NIOS2_S16 .data
++0+0148 <[^>]*> stwio r4,0\(r5\)
++[ ]*148: R_NIOS2_S16 big_external_data_label
++0+014c <[^>]*> stwio r4,0\(r5\)
++[ ]*14c: R_NIOS2_S16 small_external_data_label
++0+0150 <[^>]*> stwio r4,0\(r5\)
++[ ]*150: R_NIOS2_S16 big_external_common
++0+0154 <[^>]*> stwio r4,0\(r5\)
++[ ]*154: R_NIOS2_S16 small_external_common
++0+0158 <[^>]*> stwio r4,0\(r5\)
++[ ]*158: R_NIOS2_S16 .bss
++0+015c <[^>]*> stwio r4,0\(r5\)
++[ ]*15c: R_NIOS2_S16 .bss\+0x4000
++0+0160 <[^>]*> stwio r4,0\(r5\)
++[ ]*160: R_NIOS2_S16 .data\+0x4
++0+0164 <[^>]*> stwio r4,0\(r5\)
++[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
++0+0168 <[^>]*> stwio r4,0\(r5\)
++[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
++0+016c <[^>]*> stwio r4,0\(r5\)
++[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
++0+0170 <[^>]*> stwio r4,0\(r5\)
++[ ]*170: R_NIOS2_S16 small_external_common\+0x4
++0+0174 <[^>]*> stwio r4,0\(r5\)
++[ ]*174: R_NIOS2_S16 .bss\+0x4
++0+0178 <[^>]*> stwio r4,0\(r5\)
++[ ]*178: R_NIOS2_S16 .bss\+0x4004
++0+017c <[^>]*> stwio r4,0\(r5\)
++[ ]*17c: R_NIOS2_S16 .data\+0xffff8000
++0+0180 <[^>]*> stwio r4,0\(r5\)
++[ ]*180: R_NIOS2_S16 big_external_data_label\+0xffff8000
++0+0184 <[^>]*> stwio r4,0\(r5\)
++[ ]*184: R_NIOS2_S16 small_external_data_label\+0xffff8000
++0+0188 <[^>]*> stwio r4,0\(r5\)
++[ ]*188: R_NIOS2_S16 big_external_common\+0xffff8000
++0+018c <[^>]*> stwio r4,0\(r5\)
++[ ]*18c: R_NIOS2_S16 small_external_common\+0xffff8000
++0+0190 <[^>]*> stwio r4,0\(r5\)
++[ ]*190: R_NIOS2_S16 .bss\+0xffff8000
++0+0194 <[^>]*> stwio r4,0\(r5\)
++[ ]*194: R_NIOS2_S16 .bss\+0xffffc000
+--- binutils-2.15/gas/testsuite/gas/nios2/stw.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/stw.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,117 @@
++ .data
++data_label:
++ .extern big_external_data_label,0x4000
++ .extern small_external_data_label,4
++ .comm big_external_common,0x4000
++ .comm small_external_common,4
++ .lcomm big_local_common,0x4000
++ .lcomm small_local_common,4
++
++# the small symbols should have space allocated in the sbss section
++# but this is not yet supported in the assembler, so space is allocated
++# in the .bss section and the relocations are not gp-relative. this will
++# be updated when gp-relative relocations are added
++ .text
++ stw r4,0(r0)
++ stw r4,4(r0)
++ stw r4,0x7ffc(r0)
++ stw r4,-0x8000(r0)
++ stw r4,0(r5)
++ stw r4,4(r5)
++ stw r4,0x7ffc(r5)
++ stw r4,-0x8000(r5)
++ stw r4,data_label(r0)
++ stw r4,big_external_data_label(r0)
++ stw r4,small_external_data_label(r0)
++ stw r4,big_external_common(r0)
++ stw r4,small_external_common(r0)
++ stw r4,big_local_common(r0)
++ stw r4,small_local_common(r0)
++ stw r4,data_label+4(r0)
++ stw r4,big_external_data_label+4(r0)
++ stw r4,small_external_data_label+4(r0)
++ stw r4,big_external_common+4(r0)
++ stw r4,small_external_common+4(r0)
++ stw r4,big_local_common+4(r0)
++ stw r4,small_local_common+4(r0)
++ stw r4,data_label-0x8000(r0)
++ stw r4,big_external_data_label-0x8000(r0)
++ stw r4,small_external_data_label-0x8000(r0)
++ stw r4,big_external_common-0x8000(r0)
++ stw r4,small_external_common-0x8000(r0)
++ stw r4,big_local_common-0x8000(r0)
++ stw r4,small_local_common-0x8000(r0)
++ stw r4,data_label+0x10000(r0)
++ stw r4,data_label(r5)
++ stw r4,big_external_data_label(r5)
++ stw r4,small_external_data_label(r5)
++ stw r4,big_external_common(r5)
++ stw r4,small_external_common(r5)
++ stw r4,big_local_common(r5)
++ stw r4,small_local_common(r5)
++ stw r4,data_label+4(r5)
++ stw r4,big_external_data_label+4(r5)
++ stw r4,small_external_data_label+4(r5)
++ stw r4,big_external_common+4(r5)
++ stw r4,small_external_common+4(r5)
++ stw r4,big_local_common+4(r5)
++ stw r4,small_local_common+4(r5)
++ stw r4,data_label-0x8000(r5)
++ stw r4,big_external_data_label-0x8000(r5)
++ stw r4,small_external_data_label-0x8000(r5)
++ stw r4,big_external_common-0x8000(r5)
++ stw r4,small_external_common-0x8000(r5)
++ stw r4,big_local_common-0x8000(r5)
++ stw r4,small_local_common-0x8000(r5)
++
++ stwio r4,0(r0)
++ stwio r4,4(r0)
++ stwio r4,0x7ffc(r0)
++ stwio r4,-0x8000(r0)
++ stwio r4,0(r5)
++ stwio r4,4(r5)
++ stwio r4,0x7ffc(r5)
++ stwio r4,-0x8000(r5)
++ stwio r4,data_label(r0)
++ stwio r4,big_external_data_label(r0)
++ stwio r4,small_external_data_label(r0)
++ stwio r4,big_external_common(r0)
++ stwio r4,small_external_common(r0)
++ stwio r4,big_local_common(r0)
++ stwio r4,small_local_common(r0)
++ stwio r4,data_label+4(r0)
++ stwio r4,big_external_data_label+4(r0)
++ stwio r4,small_external_data_label+4(r0)
++ stwio r4,big_external_common+4(r0)
++ stwio r4,small_external_common+4(r0)
++ stwio r4,big_local_common+4(r0)
++ stwio r4,small_local_common+4(r0)
++ stwio r4,data_label-0x8000(r0)
++ stwio r4,big_external_data_label-0x8000(r0)
++ stwio r4,small_external_data_label-0x8000(r0)
++ stwio r4,big_external_common-0x8000(r0)
++ stwio r4,small_external_common-0x8000(r0)
++ stwio r4,big_local_common-0x8000(r0)
++ stwio r4,small_local_common-0x8000(r0)
++ stwio r4,data_label+0x10000(r0)
++ stwio r4,data_label(r5)
++ stwio r4,big_external_data_label(r5)
++ stwio r4,small_external_data_label(r5)
++ stwio r4,big_external_common(r5)
++ stwio r4,small_external_common(r5)
++ stwio r4,big_local_common(r5)
++ stwio r4,small_local_common(r5)
++ stwio r4,data_label+4(r5)
++ stwio r4,big_external_data_label+4(r5)
++ stwio r4,small_external_data_label+4(r5)
++ stwio r4,big_external_common+4(r5)
++ stwio r4,small_external_common+4(r5)
++ stwio r4,big_local_common+4(r5)
++ stwio r4,small_local_common+4(r5)
++ stwio r4,data_label-0x8000(r5)
++ stwio r4,big_external_data_label-0x8000(r5)
++ stwio r4,small_external_data_label-0x8000(r5)
++ stwio r4,big_external_common-0x8000(r5)
++ stwio r4,small_external_common-0x8000(r5)
++ stwio r4,big_local_common-0x8000(r5)
++ stwio r4,small_local_common-0x8000(r5)
+--- binutils-2.15/gas/testsuite/gas/nios2/sub.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sub.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,10 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 sub
++
++# Test the add instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> sub r4,r4,r4
++
+--- binutils-2.15/gas/testsuite/gas/nios2/sub.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sub.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,4 @@
++# Source file used to test the add and addi instructions.
++
++foo:
++ sub r4,r4,r4
+--- binutils-2.15/gas/testsuite/gas/nios2/sync.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sync.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 sync
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section \.text:
++0+0000 <foo> sync
++
+--- binutils-2.15/gas/testsuite/gas/nios2/sync.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/sync.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++# Source file used to test the sync instructions
++foo:
++ sync
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/trap.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/trap.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,7 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 trap
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> trap
+--- binutils-2.15/gas/testsuite/gas/nios2/trap.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/trap.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,3 @@
++# Source file used to test the ret instructions
++foo:
++ trap
+--- binutils-2.15/gas/testsuite/gas/nios2/tret.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/tret.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 tret
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> eret
++
+--- binutils-2.15/gas/testsuite/gas/nios2/tret.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/tret.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++# Source file used to test the ret instructions
++foo:
++ eret
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/u16_symbol.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/u16_symbol.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,9 @@
++.global some_sym
++.global min
++.global max
++
++.set max, 0xffff
++.set min, 0
++.set some_sym, 0x1000
++
++
+--- binutils-2.15/gas/testsuite/gas/nios2/warn_noat.l 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_noat.l 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,5 @@
++.*warn_noat.s: Assembler messages:
++.*warn_noat.s:2: Warning: Register at \(r1\) can sometimes be corrupted by assembler optimizations.
++Use .set noat to turn off those optimizations \(and this warning\).
++.*warn_noat.s:8: Warning: Register at \(r1\) can sometimes be corrupted by assembler optimizations.
++Use .set noat to turn off those optimizations \(and this warning\).
+--- binutils-2.15/gas/testsuite/gas/nios2/warn_noat.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_noat.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,8 @@
++.set noat, 2 # This should not cause warning for at to be turned off
++add at, r2, r2
++.set noat # this should turn the warnings off
++add at, r2, r2
++.set at, 3 # this should not turn the warnings on
++add at, r2, r2
++.set at # this should turn the warnings on
++add at, r2, r2
+--- binutils-2.15/gas/testsuite/gas/nios2/warn_nobreak.l 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_nobreak.l 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,9 @@
++.*warn_nobreak.s: Assembler messages:
++.*warn_nobreak.s:2: Warning: The debugger will corrupt ba \(r30\). If you don't need to debug this
++code then use .set nobreak to turn off this warning.
++.*warn_nobreak.s:3: Warning: The debugger will corrupt bt \(r25\). If you don't need to debug this
++code then use .set nobreak to turn off this warning.
++.*warn_nobreak.s:11: Warning: The debugger will corrupt ba \(r30\). If you don't need to debug this
++code then use .set nobreak to turn off this warning.
++.*warn_nobreak.s:12: Warning: The debugger will corrupt bt \(r25\). If you don't need to debug this
++code then use .set nobreak to turn off this warning.
+--- binutils-2.15/gas/testsuite/gas/nios2/warn_nobreak.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/warn_nobreak.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,12 @@
++.set nobreak , 2 # This should not cause warning for ba, bt to be turned off
++add ba, r2, r2
++add bt, r2, r2
++.set nobreak # this should turn the warnings off
++add ba, r3, r4
++add bt, r3, r4
++.set break, 3 # this should not turn the warnings on
++add ba, r3, r4
++add bt, r3, r4
++.set break # this should turn the warnings on
++add ba, r3, r4
++add bt, r3, r4
+--- binutils-2.15/gas/testsuite/gas/nios2/xor.d 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/xor.d 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,11 @@
++#objdump: -dr --prefix-addresses
++#name: NIOS2 xor
++
++# Test the nor instruction
++
++.*: +file format elf32-littlenios2
++
++Disassembly of section .text:
++0+0000 <[^>]*> xor r6,r8,r10
++0+0004 <[^>]*> xorhi r6,r7,65535
++0+0008 <[^>]*> xori r6,r7,65535
+--- binutils-2.15/gas/testsuite/gas/nios2/xor.s 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/gas/nios2/xor.s 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,7 @@
++# Source file used to test the nor instruction
++
++foo:
++ xor r6,r8,r10
++ xorhi r6,r7,0xffff
++ xori r6,r7,0xffff
++
+--- binutils-2.15/gas/testsuite/nios2_as_xfail.lst 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/gas/testsuite/nios2_as_xfail.lst 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,4 @@
++FAIL: vtable inherit0
++FAIL: vtable entry1
++
++
+--- binutils-2.15/include/bfdlink.h 2004-05-17 21:36:06.000000000 +0200
++++ binutils-2.15-nios2/include/bfdlink.h 2005-05-17 12:20:14.000000000 +0200
+@@ -688,4 +688,14 @@ struct bfd_elf_version_tree
+ struct bfd_elf_version_expr *prev, const char *sym);
+ };
+
++/* NG - There seems to be no way of getting link_info from the linker into
++ * bfd so that functions which aren't passed it can use it, and I need
++ * it so that gprel relocations work properly when generating srecs. This isn't
++ * right, but it works, and for the amount of work...*/
++#define bfd_set_link_info _bfd_set_link_info
++extern void _bfd_set_link_info (struct bfd_link_info *info);
++
++#define bfd_set_force_make_executable _bfd_set_force_make_executable
++extern void _bfd_set_force_make_executable (bfd_boolean force);
++
+ #endif
+--- binutils-2.15/include/dis-asm.h 2003-11-14 16:12:43.000000000 +0100
++++ binutils-2.15-nios2/include/dis-asm.h 2005-05-17 12:20:14.000000000 +0200
+@@ -247,6 +247,7 @@ extern int print_insn_sh64 (bfd_vma, di
+ extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
+ extern int print_insn_frv (bfd_vma, disassemble_info *);
+ extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
++extern int print_insn_nios2 (bfd_vma, disassemble_info *);
+
+ extern disassembler_ftype arc_get_disassembler (void *);
+ extern disassembler_ftype cris_get_disassembler (bfd *);
+--- binutils-2.15/include/elf/common.h 2004-01-29 03:41:18.000000000 +0100
++++ binutils-2.15-nios2/include/elf/common.h 2005-05-17 12:20:14.000000000 +0200
+@@ -182,6 +182,8 @@
+ #define EM_IP2K 101 /* Ubicom IP2022 micro controller */
+ #define EM_MSP430 105 /* TI msp430 micro controller */
+
++#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
++
+ /* If it is necessary to assign new unofficial EM_* values, please pick large
+ random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
+ with official or non-GNU unofficial values.
+--- binutils-2.15/include/elf/nios2.h 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/include/elf/nios2.h 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,65 @@
++/* Altera New Jersey ELF support for BFD
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++This file is part of BFD, the Binary File Descriptor library.
++
++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 2 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, write to the Free Software
++Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++/* This file holds definitions specific to the Altera New Jersey ELF ABI. Note
++ that most of this is not actually implemented by BFD. */
++
++#ifndef _ELF_NIOS2_H
++#define _ELF_NIOS2_H
++
++#include "elf/reloc-macros.h"
++
++/* the order of these numbers must match the order in
++ the elf_nios2_howto_table_rel table for the lookup
++ function to work properly */
++
++START_RELOC_NUMBERS (elf_nios2_reloc_type)
++ RELOC_NUMBER (R_NIOS2_NONE, 0)
++ RELOC_NUMBER (R_NIOS2_S16, 1)
++ RELOC_NUMBER (R_NIOS2_U16, 2)
++ RELOC_NUMBER (R_NIOS2_PCREL16, 3)
++ RELOC_NUMBER (R_NIOS2_CALL26, 4)
++ RELOC_NUMBER (R_NIOS2_IMM5, 5)
++ RELOC_NUMBER (R_NIOS2_CACHE_OPX, 6)
++ RELOC_NUMBER (R_NIOS2_IMM6, 7)
++ RELOC_NUMBER (R_NIOS2_IMM8, 8)
++ RELOC_NUMBER (R_NIOS2_HI16, 9)
++ RELOC_NUMBER (R_NIOS2_LO16, 10)
++ RELOC_NUMBER (R_NIOS2_HIADJ16, 11)
++ RELOC_NUMBER (R_NIOS2_BFD_RELOC_32, 12)
++ RELOC_NUMBER (R_NIOS2_BFD_RELOC_16, 13)
++ RELOC_NUMBER (R_NIOS2_BFD_RELOC_8, 14)
++ RELOC_NUMBER (R_NIOS2_GPREL, 15)
++ RELOC_NUMBER (R_NIOS2_GNU_VTINHERIT, 16)
++ RELOC_NUMBER (R_NIOS2_GNU_VTENTRY, 17)
++ RELOC_NUMBER (R_NIOS2_UJMP, 18)
++ RELOC_NUMBER (R_NIOS2_CJMP, 19)
++ RELOC_NUMBER (R_NIOS2_CALLR, 20)
++ RELOC_NUMBER (R_NIOS2_ALIGN, 21)
++ RELOC_NUMBER (R_NIOS2_ILLEGAL, 22)
++END_RELOC_NUMBERS (R_NIOS2_maxext)
++
++/* Processor specific section flags */
++
++/* This is used to mark gp-relative sections */
++#define SHF_NIOS2_GPREL 0x10000000
++
++#endif //_ELF_NIOS2_H
+--- binutils-2.15/include/opcode/nios2-isa.h 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/include/opcode/nios2-isa.h 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,1453 @@
++/* This file is automatically generated by gen_isa.pl - do not edit */
++
++#ifndef _NIOS2_ISA_H_
++#define _NIOS2_ISA_H_
++
++/* OP instruction opcode values (index is OP field) */
++#define NUM_OP_INSTS 64
++extern const char* op_names[NUM_OP_INSTS];
++
++/* OPX instruction opcode values (index is OPX field) */
++#define NUM_OPX_INSTS 64
++extern const char* opx_names[NUM_OPX_INSTS];
++
++/* Constants for instruction fields and ISA */
++#define BRETADDR_REGNUM 30
++#define BSTATUS_REG_LSB 2
++#define BSTATUS_REG_MMU_LSB 0
++#define BSTATUS_REG_MMU_MSB 2
++#define BSTATUS_REG_MMU_SZ 3
++#define BSTATUS_REG_MMU_MASK 0x7
++#define BSTATUS_REG_NO_MMU_LSB 0
++#define BSTATUS_REG_NO_MMU_MSB 0
++#define BSTATUS_REG_NO_MMU_SZ 1
++#define BSTATUS_REG_NO_MMU_MASK 0x1
++#define BSTATUS_REG_REGNUM 2
++#define BSTATUS_REG_SZ 3
++#define BSTATUS_REG_MASK 0x7
++#define COMPARE_OP_EQ 0x0
++#define COMPARE_OP_GE 0x1
++#define COMPARE_OP_LSB 3
++#define COMPARE_OP_LT 0x2
++#define COMPARE_OP_MSB 4
++#define COMPARE_OP_NE 0x3
++#define COMPARE_OP_SZ 2
++#define COMPARE_OP_MASK 0x3
++#define CPUID_REG_LSB 0
++#define CPUID_REG_MSB 31
++#define CPUID_REG_REGNUM 5
++#define CPUID_REG_SZ 32
++#define CPUID_REG_MASK 0xffffffff
++#define DATAPATH_LOG2_SZ 5
++#define DATAPATH_LOG2_MASK 0x1f
++#define DATAPATH_LSB 0
++#define DATAPATH_MSB 31
++#define DATAPATH_SZ 32
++#define DATAPATH_MASK 0xffffffff
++#define EMPTY_HBREAK_IW 4040762
++#define EMPTY_INTR_IW 3926074
++#define EMPTY_NOP_IW 100410
++#define EMPTY_RET_IW 4160759866
++#define ERETADDR_REGNUM 29
++#define ESTATUS_REG_LSB 0
++#define ESTATUS_REG_MMU_LSB 0
++#define ESTATUS_REG_MMU_MSB 2
++#define ESTATUS_REG_MMU_SZ 3
++#define ESTATUS_REG_MMU_MASK 0x7
++#define ESTATUS_REG_MSB 2
++#define ESTATUS_REG_NO_MMU_LSB 0
++#define ESTATUS_REG_NO_MMU_MSB 0
++#define ESTATUS_REG_NO_MMU_SZ 1
++#define ESTATUS_REG_NO_MMU_MASK 0x1
++#define ESTATUS_REG_REGNUM 1
++#define ESTATUS_REG_SZ 3
++#define ESTATUS_REG_MASK 0x7
++#define FP_REGNUM 28
++#define GP_REGNUM 26
++#define IENABLE_REG_LSB 0
++#define IENABLE_REG_MSB 31
++#define IENABLE_REG_REGNUM 3
++#define IENABLE_REG_SZ 32
++#define IENABLE_REG_MASK 0xffffffff
++#define IPENDING_REG_LSB 0
++#define IPENDING_REG_MSB 31
++#define IPENDING_REG_REGNUM 4
++#define IPENDING_REG_SZ 32
++#define IPENDING_REG_MASK 0xffffffff
++#define IW_A_LSB 27
++#define IW_A_MSB 31
++#define IW_A_SZ 5
++#define IW_A_MASK 0x1f
++#define IW_B_LSB 22
++#define IW_B_MSB 26
++#define IW_B_SZ 5
++#define IW_B_MASK 0x1f
++#define IW_C_LSB 17
++#define IW_C_MSB 21
++#define IW_C_SZ 5
++#define IW_C_MASK 0x1f
++#define IW_CONTROL_REGNUM_BASE 0
++#define IW_CONTROL_REGNUM_LSB 6
++#define IW_CONTROL_REGNUM_MSB 9
++#define IW_CONTROL_REGNUM_SZ 4
++#define IW_CONTROL_REGNUM_MASK 0xf
++#define IW_CUSTOM_N_LSB 6
++#define IW_CUSTOM_N_MSB 13
++#define IW_CUSTOM_N_SZ 8
++#define IW_CUSTOM_N_MASK 0xff
++#define IW_CUSTOM_READRA_LSB 16
++#define IW_CUSTOM_READRA_MSB 16
++#define IW_CUSTOM_READRA_SZ 1
++#define IW_CUSTOM_READRA_MASK 0x1
++#define IW_CUSTOM_READRB_LSB 15
++#define IW_CUSTOM_READRB_MSB 15
++#define IW_CUSTOM_READRB_SZ 1
++#define IW_CUSTOM_READRB_MASK 0x1
++#define IW_CUSTOM_WRITERC_LSB 14
++#define IW_CUSTOM_WRITERC_MSB 14
++#define IW_CUSTOM_WRITERC_SZ 1
++#define IW_CUSTOM_WRITERC_MASK 0x1
++#define IW_IMM16_LSB 6
++#define IW_IMM16_MSB 21
++#define IW_IMM16_SZ 16
++#define IW_IMM16_MASK 0xffff
++#define IW_IMM26_LSB 6
++#define IW_IMM26_MSB 31
++#define IW_IMM26_SZ 26
++#define IW_IMM26_MASK 0x3ffffff
++#define IW_MEMSZ_BYTE 0x0
++#define IW_MEMSZ_HWORD 0x1
++#define IW_MEMSZ_LSB 3
++#define IW_MEMSZ_MSB 4
++#define IW_MEMSZ_SZ 2
++#define IW_MEMSZ_MASK 0x3
++#define IW_MEMSZ_WORD 0x2
++#define IW_MEMSZ_WORD_MSB 0x1
++#define IW_OP_LSB 0
++#define IW_OP_MSB 5
++#define IW_OP_SZ 6
++#define IW_OP_MASK 0x3f
++#define IW_OPX_LSB 11
++#define IW_OPX_MSB 16
++#define IW_OPX_SZ 6
++#define IW_OPX_MASK 0x3f
++#define IW_SHIFT_IMM5_LSB 6
++#define IW_SHIFT_IMM5_MSB 10
++#define IW_SHIFT_IMM5_SZ 5
++#define IW_SHIFT_IMM5_MASK 0x1f
++#define IW_SZ 32
++#define IW_MASK 0xffffffff
++#define IW_TRAP_BREAK_IMM5_LSB 6
++#define IW_TRAP_BREAK_IMM5_MSB 10
++#define IW_TRAP_BREAK_IMM5_SZ 5
++#define IW_TRAP_BREAK_IMM5_MASK 0x1f
++#define JMP_CALLR_VS_RET_IS_RET 0
++#define JMP_CALLR_VS_RET_OPX_BIT 3
++#define LOGIC_OP_AND 0x1
++#define LOGIC_OP_LSB 3
++#define LOGIC_OP_MSB 4
++#define LOGIC_OP_NOR 0x0
++#define LOGIC_OP_OR 0x2
++#define LOGIC_OP_SZ 2
++#define LOGIC_OP_MASK 0x3
++#define LOGIC_OP_XOR 0x3
++#define MMU_ADDR_BYPASS_TLB 0x3
++#define MMU_ADDR_BYPASS_TLB_CACHEABLE 0x0
++#define MMU_ADDR_BYPASS_TLB_CACHEABLE_LSB 29
++#define MMU_ADDR_BYPASS_TLB_CACHEABLE_MSB 29
++#define MMU_ADDR_BYPASS_TLB_CACHEABLE_SZ 1
++#define MMU_ADDR_BYPASS_TLB_CACHEABLE_MASK 0x1
++#define MMU_ADDR_BYPASS_TLB_LSB 30
++#define MMU_ADDR_BYPASS_TLB_MSB 31
++#define MMU_ADDR_BYPASS_TLB_PADDR_LSB 0
++#define MMU_ADDR_BYPASS_TLB_PADDR_MSB 28
++#define MMU_ADDR_BYPASS_TLB_PADDR_SZ 29
++#define MMU_ADDR_BYPASS_TLB_PADDR_MASK 0x1fffffff
++#define MMU_ADDR_BYPASS_TLB_SZ 2
++#define MMU_ADDR_BYPASS_TLB_MASK 0x3
++#define MMU_ADDR_IO_REGION 0x7
++#define MMU_ADDR_IO_REGION_LSB 29
++#define MMU_ADDR_IO_REGION_MSB 31
++#define MMU_ADDR_IO_REGION_SZ 3
++#define MMU_ADDR_IO_REGION_MASK 0x7
++#define MMU_ADDR_KERNEL_MMU_REGION 0x2
++#define MMU_ADDR_KERNEL_MMU_REGION_LSB 30
++#define MMU_ADDR_KERNEL_MMU_REGION_MSB 31
++#define MMU_ADDR_KERNEL_MMU_REGION_SZ 2
++#define MMU_ADDR_KERNEL_MMU_REGION_MASK 0x3
++#define MMU_ADDR_KERNEL_REGION 0x6
++#define MMU_ADDR_KERNEL_REGION_LSB 29
++#define MMU_ADDR_KERNEL_REGION_MSB 31
++#define MMU_ADDR_KERNEL_REGION_SZ 3
++#define MMU_ADDR_KERNEL_REGION_MASK 0x7
++#define MMU_ADDR_PAGE_OFFSET_LSB 0
++#define MMU_ADDR_PAGE_OFFSET_MSB 11
++#define MMU_ADDR_PAGE_OFFSET_SZ 12
++#define MMU_ADDR_PAGE_OFFSET_MASK 0xfff
++#define MMU_ADDR_PFN_LSB 12
++#define MMU_ADDR_PFN_MSB 31
++#define MMU_ADDR_PFN_SZ 20
++#define MMU_ADDR_PFN_MASK 0xfffff
++#define MMU_ADDR_USER_REGION 0x0
++#define MMU_ADDR_USER_REGION_LSB 31
++#define MMU_ADDR_USER_REGION_MSB 31
++#define MMU_ADDR_USER_REGION_SZ 1
++#define MMU_ADDR_USER_REGION_MASK 0x1
++#define MMU_ADDR_VPN_LSB 12
++#define MMU_ADDR_VPN_MSB 31
++#define MMU_ADDR_VPN_SZ 20
++#define MMU_ADDR_VPN_MASK 0xfffff
++#define PERF_CNT_REG_CLR_LSB 1
++#define PERF_CNT_REG_CLR_MSB 1
++#define PERF_CNT_REG_CLR_SZ 1
++#define PERF_CNT_REG_CLR_MASK 0x1
++#define PERF_CNT_REG_EN_LSB 0
++#define PERF_CNT_REG_EN_MSB 0
++#define PERF_CNT_REG_EN_SZ 1
++#define PERF_CNT_REG_EN_MASK 0x1
++#define PERF_CNT_REG_LSB 0
++#define PERF_CNT_REG_MSB 1
++#define PERF_CNT_REG_REGNUM 7
++#define PERF_CNT_REG_SZ 2
++#define PERF_CNT_REG_MASK 0x3
++#define PTEADDR_REG_LSB 0
++#define PTEADDR_REG_MSB 31
++#define PTEADDR_REG_PTBASE_LSB 22
++#define PTEADDR_REG_PTBASE_MSB 31
++#define PTEADDR_REG_PTBASE_SZ 10
++#define PTEADDR_REG_PTBASE_MASK 0x3ff
++#define PTEADDR_REG_REGNUM 8
++#define PTEADDR_REG_RSV_LSB 0
++#define PTEADDR_REG_RSV_MSB 1
++#define PTEADDR_REG_RSV_SZ 2
++#define PTEADDR_REG_RSV_MASK 0x3
++#define PTEADDR_REG_SZ 32
++#define PTEADDR_REG_MASK 0xffffffff
++#define PTEADDR_REG_VPN_LSB 2
++#define PTEADDR_REG_VPN_MSB 21
++#define PTEADDR_REG_VPN_SZ 20
++#define PTEADDR_REG_VPN_MASK 0xfffff
++#define REGNUM_SZ 5
++#define REGNUM_MASK 0x1f
++#define RETADDR_REGNUM 31
++#define RF_ADDR_SZ 5
++#define RF_ADDR_MASK 0x1f
++#define RF_NUM_REG 32
++#define SIM_REG_LSB 0
++#define SIM_REG_MSB 3
++#define SIM_REG_REGNUM 6
++#define SIM_REG_SHOW_DTLB_LSB 2
++#define SIM_REG_SHOW_DTLB_MSB 2
++#define SIM_REG_SHOW_DTLB_SZ 1
++#define SIM_REG_SHOW_DTLB_MASK 0x1
++#define SIM_REG_SHOW_ITLB_LSB 1
++#define SIM_REG_SHOW_ITLB_MSB 1
++#define SIM_REG_SHOW_ITLB_SZ 1
++#define SIM_REG_SHOW_ITLB_MASK 0x1
++#define SIM_REG_SHOW_MMU_REGS_LSB 3
++#define SIM_REG_SHOW_MMU_REGS_MSB 3
++#define SIM_REG_SHOW_MMU_REGS_SZ 1
++#define SIM_REG_SHOW_MMU_REGS_MASK 0x1
++#define SIM_REG_STOP_LSB 0
++#define SIM_REG_STOP_MSB 0
++#define SIM_REG_STOP_SZ 1
++#define SIM_REG_STOP_MASK 0x1
++#define SIM_REG_SZ 4
++#define SIM_REG_MASK 0xf
++#define SP_REGNUM 27
++#define STATUS_REG_EH_LSB 2
++#define STATUS_REG_EH_MSB 2
++#define STATUS_REG_EH_SZ 1
++#define STATUS_REG_EH_MASK 0x1
++#define STATUS_REG_LSB 0
++#define STATUS_REG_MMU_LSB 0
++#define STATUS_REG_MMU_MSB 2
++#define STATUS_REG_MMU_SZ 3
++#define STATUS_REG_MMU_MASK 0x7
++#define STATUS_REG_MSB 2
++#define STATUS_REG_NO_MMU_LSB 0
++#define STATUS_REG_NO_MMU_MSB 0
++#define STATUS_REG_NO_MMU_SZ 1
++#define STATUS_REG_NO_MMU_MASK 0x1
++#define STATUS_REG_PIE_LSB 0
++#define STATUS_REG_PIE_MSB 0
++#define STATUS_REG_PIE_SZ 1
++#define STATUS_REG_PIE_MASK 0x1
++#define STATUS_REG_REGNUM 0
++#define STATUS_REG_SZ 3
++#define STATUS_REG_MASK 0x7
++#define STATUS_REG_U_LSB 1
++#define STATUS_REG_U_MSB 1
++#define STATUS_REG_U_SZ 1
++#define STATUS_REG_U_MASK 0x1
++#define TLB_MAX_ENTRIES 1024
++#define TLB_MAX_LINES 512
++#define TLB_MAX_PID_SZ 14
++#define TLB_MAX_PID_MASK 0x3fff
++#define TLB_MAX_PTR_SZ 10
++#define TLB_MAX_PTR_MASK 0x3ff
++#define TLB_MAX_WAYS 8
++#define TLB_MIN_PID_SZ 1
++#define TLB_MIN_PID_MASK 0x1
++#define TLB_MIN_PTR_SZ 7
++#define TLB_MIN_PTR_MASK 0x7f
++#define TLB_MIN_WAYS 2
++#define TLBACC_REG_C_LSB 24
++#define TLBACC_REG_C_MSB 24
++#define TLBACC_REG_C_SZ 1
++#define TLBACC_REG_C_MASK 0x1
++#define TLBACC_REG_G_LSB 20
++#define TLBACC_REG_G_MSB 20
++#define TLBACC_REG_G_SZ 1
++#define TLBACC_REG_G_MASK 0x1
++#define TLBACC_REG_LSB 0
++#define TLBACC_REG_MSB 24
++#define TLBACC_REG_PFN_LSB 0
++#define TLBACC_REG_PFN_MSB 19
++#define TLBACC_REG_PFN_SZ 20
++#define TLBACC_REG_PFN_MASK 0xfffff
++#define TLBACC_REG_R_LSB 23
++#define TLBACC_REG_R_MSB 23
++#define TLBACC_REG_R_SZ 1
++#define TLBACC_REG_R_MASK 0x1
++#define TLBACC_REG_REGNUM 9
++#define TLBACC_REG_SZ 25
++#define TLBACC_REG_MASK 0x1ffffff
++#define TLBACC_REG_W_LSB 22
++#define TLBACC_REG_W_MSB 22
++#define TLBACC_REG_W_SZ 1
++#define TLBACC_REG_W_MASK 0x1
++#define TLBACC_REG_X_LSB 21
++#define TLBACC_REG_X_MSB 21
++#define TLBACC_REG_X_SZ 1
++#define TLBACC_REG_X_MASK 0x1
++#define TLBMISC_REG_BAD_LSB 2
++#define TLBMISC_REG_BAD_MSB 2
++#define TLBMISC_REG_BAD_SZ 1
++#define TLBMISC_REG_BAD_MASK 0x1
++#define TLBMISC_REG_D_LSB 0
++#define TLBMISC_REG_D_MSB 0
++#define TLBMISC_REG_D_SZ 1
++#define TLBMISC_REG_D_MASK 0x1
++#define TLBMISC_REG_DBL_LSB 3
++#define TLBMISC_REG_DBL_MSB 3
++#define TLBMISC_REG_DBL_SZ 1
++#define TLBMISC_REG_DBL_MASK 0x1
++#define TLBMISC_REG_LSB 0
++#define TLBMISC_REG_MSB 22
++#define TLBMISC_REG_PERM_LSB 1
++#define TLBMISC_REG_PERM_MSB 1
++#define TLBMISC_REG_PERM_SZ 1
++#define TLBMISC_REG_PERM_MASK 0x1
++#define TLBMISC_REG_PID_LSB 4
++#define TLBMISC_REG_PID_MSB 17
++#define TLBMISC_REG_PID_SZ 14
++#define TLBMISC_REG_PID_MASK 0x3fff
++#define TLBMISC_REG_RD_LSB 23
++#define TLBMISC_REG_RD_MSB 23
++#define TLBMISC_REG_RD_SZ 1
++#define TLBMISC_REG_RD_MASK 0x1
++#define TLBMISC_REG_REGNUM 10
++#define TLBMISC_REG_RSV_LSB 18
++#define TLBMISC_REG_RSV_MSB 19
++#define TLBMISC_REG_RSV_SZ 2
++#define TLBMISC_REG_RSV_MASK 0x3
++#define TLBMISC_REG_SZ 23
++#define TLBMISC_REG_MASK 0x7fffff
++#define TLBMISC_REG_WAY_LSB 20
++#define TLBMISC_REG_WAY_MSB 22
++#define TLBMISC_REG_WAY_SZ 3
++#define TLBMISC_REG_WAY_MASK 0x7
++
++/* Macros to extract instruction fields */
++#define GET_IW_A(Iw) \
++ (((Iw) >> IW_A_LSB) & IW_A_MASK)
++#define SET_IW_A(Iw, Val) \
++ Iw = (((Iw) & (~(IW_A_MASK << IW_A_LSB))) | \
++ (((Val) & IW_A_MASK) << IW_A_LSB))
++#define GET_IW_B(Iw) \
++ (((Iw) >> IW_B_LSB) & IW_B_MASK)
++#define SET_IW_B(Iw, Val) \
++ Iw = (((Iw) & (~(IW_B_MASK << IW_B_LSB))) | \
++ (((Val) & IW_B_MASK) << IW_B_LSB))
++#define GET_IW_C(Iw) \
++ (((Iw) >> IW_C_LSB) & IW_C_MASK)
++#define SET_IW_C(Iw, Val) \
++ Iw = (((Iw) & (~(IW_C_MASK << IW_C_LSB))) | \
++ (((Val) & IW_C_MASK) << IW_C_LSB))
++#define GET_IW_CONTROL_REGNUM(Iw) \
++ (((Iw) >> IW_CONTROL_REGNUM_LSB) & IW_CONTROL_REGNUM_MASK)
++#define SET_IW_CONTROL_REGNUM(Iw, Val) \
++ Iw = (((Iw) & (~(IW_CONTROL_REGNUM_MASK << IW_CONTROL_REGNUM_LSB))) | \
++ (((Val) & IW_CONTROL_REGNUM_MASK) << IW_CONTROL_REGNUM_LSB))
++#define GET_IW_CUSTOM_N(Iw) \
++ (((Iw) >> IW_CUSTOM_N_LSB) & IW_CUSTOM_N_MASK)
++#define SET_IW_CUSTOM_N(Iw, Val) \
++ Iw = (((Iw) & (~(IW_CUSTOM_N_MASK << IW_CUSTOM_N_LSB))) | \
++ (((Val) & IW_CUSTOM_N_MASK) << IW_CUSTOM_N_LSB))
++#define GET_IW_CUSTOM_READRA(Iw) \
++ (((Iw) >> IW_CUSTOM_READRA_LSB) & IW_CUSTOM_READRA_MASK)
++#define SET_IW_CUSTOM_READRA(Iw, Val) \
++ Iw = (((Iw) & (~(IW_CUSTOM_READRA_MASK << IW_CUSTOM_READRA_LSB))) | \
++ (((Val) & IW_CUSTOM_READRA_MASK) << IW_CUSTOM_READRA_LSB))
++#define GET_IW_CUSTOM_READRB(Iw) \
++ (((Iw) >> IW_CUSTOM_READRB_LSB) & IW_CUSTOM_READRB_MASK)
++#define SET_IW_CUSTOM_READRB(Iw, Val) \
++ Iw = (((Iw) & (~(IW_CUSTOM_READRB_MASK << IW_CUSTOM_READRB_LSB))) | \
++ (((Val) & IW_CUSTOM_READRB_MASK) << IW_CUSTOM_READRB_LSB))
++#define GET_IW_CUSTOM_WRITERC(Iw) \
++ (((Iw) >> IW_CUSTOM_WRITERC_LSB) & IW_CUSTOM_WRITERC_MASK)
++#define SET_IW_CUSTOM_WRITERC(Iw, Val) \
++ Iw = (((Iw) & (~(IW_CUSTOM_WRITERC_MASK << IW_CUSTOM_WRITERC_LSB))) | \
++ (((Val) & IW_CUSTOM_WRITERC_MASK) << IW_CUSTOM_WRITERC_LSB))
++#define GET_IW_IMM16(Iw) \
++ (((Iw) >> IW_IMM16_LSB) & IW_IMM16_MASK)
++#define SET_IW_IMM16(Iw, Val) \
++ Iw = (((Iw) & (~(IW_IMM16_MASK << IW_IMM16_LSB))) | \
++ (((Val) & IW_IMM16_MASK) << IW_IMM16_LSB))
++#define GET_IW_IMM26(Iw) \
++ (((Iw) >> IW_IMM26_LSB) & IW_IMM26_MASK)
++#define SET_IW_IMM26(Iw, Val) \
++ Iw = (((Iw) & (~(IW_IMM26_MASK << IW_IMM26_LSB))) | \
++ (((Val) & IW_IMM26_MASK) << IW_IMM26_LSB))
++#define GET_IW_MEMSZ(Iw) \
++ (((Iw) >> IW_MEMSZ_LSB) & IW_MEMSZ_MASK)
++#define SET_IW_MEMSZ(Iw, Val) \
++ Iw = (((Iw) & (~(IW_MEMSZ_MASK << IW_MEMSZ_LSB))) | \
++ (((Val) & IW_MEMSZ_MASK) << IW_MEMSZ_LSB))
++#define GET_IW_OP(Iw) \
++ (((Iw) >> IW_OP_LSB) & IW_OP_MASK)
++#define SET_IW_OP(Iw, Val) \
++ Iw = (((Iw) & (~(IW_OP_MASK << IW_OP_LSB))) | \
++ (((Val) & IW_OP_MASK) << IW_OP_LSB))
++#define GET_IW_OPX(Iw) \
++ (((Iw) >> IW_OPX_LSB) & IW_OPX_MASK)
++#define SET_IW_OPX(Iw, Val) \
++ Iw = (((Iw) & (~(IW_OPX_MASK << IW_OPX_LSB))) | \
++ (((Val) & IW_OPX_MASK) << IW_OPX_LSB))
++#define GET_IW_SHIFT_IMM5(Iw) \
++ (((Iw) >> IW_SHIFT_IMM5_LSB) & IW_SHIFT_IMM5_MASK)
++#define SET_IW_SHIFT_IMM5(Iw, Val) \
++ Iw = (((Iw) & (~(IW_SHIFT_IMM5_MASK << IW_SHIFT_IMM5_LSB))) | \
++ (((Val) & IW_SHIFT_IMM5_MASK) << IW_SHIFT_IMM5_LSB))
++#define GET_IW_TRAP_BREAK_IMM5(Iw) \
++ (((Iw) >> IW_TRAP_BREAK_IMM5_LSB) & IW_TRAP_BREAK_IMM5_MASK)
++#define SET_IW_TRAP_BREAK_IMM5(Iw, Val) \
++ Iw = (((Iw) & (~(IW_TRAP_BREAK_IMM5_MASK << IW_TRAP_BREAK_IMM5_LSB))) | \
++ (((Val) & IW_TRAP_BREAK_IMM5_MASK) << IW_TRAP_BREAK_IMM5_LSB))
++
++/* Macros to extract control register fields */
++#define GET_BSTATUS_REG_MMU(Reg) \
++ (((Reg) >> BSTATUS_REG_MMU_LSB) & BSTATUS_REG_MMU_MASK)
++#define SET_BSTATUS_REG_MMU(Reg, Val) \
++ Reg = (((Reg) & (~(BSTATUS_REG_MMU_MASK << BSTATUS_REG_MMU_LSB))) | \
++ (((Val) & BSTATUS_REG_MMU_MASK) << BSTATUS_REG_MMU_LSB))
++#define GET_BSTATUS_REG_NO_MMU(Reg) \
++ (((Reg) >> BSTATUS_REG_NO_MMU_LSB) & BSTATUS_REG_NO_MMU_MASK)
++#define SET_BSTATUS_REG_NO_MMU(Reg, Val) \
++ Reg = (((Reg) & (~(BSTATUS_REG_NO_MMU_MASK << BSTATUS_REG_NO_MMU_LSB))) | \
++ (((Val) & BSTATUS_REG_NO_MMU_MASK) << BSTATUS_REG_NO_MMU_LSB))
++#define GET_ESTATUS_REG_MMU(Reg) \
++ (((Reg) >> ESTATUS_REG_MMU_LSB) & ESTATUS_REG_MMU_MASK)
++#define SET_ESTATUS_REG_MMU(Reg, Val) \
++ Reg = (((Reg) & (~(ESTATUS_REG_MMU_MASK << ESTATUS_REG_MMU_LSB))) | \
++ (((Val) & ESTATUS_REG_MMU_MASK) << ESTATUS_REG_MMU_LSB))
++#define GET_ESTATUS_REG_NO_MMU(Reg) \
++ (((Reg) >> ESTATUS_REG_NO_MMU_LSB) & ESTATUS_REG_NO_MMU_MASK)
++#define SET_ESTATUS_REG_NO_MMU(Reg, Val) \
++ Reg = (((Reg) & (~(ESTATUS_REG_NO_MMU_MASK << ESTATUS_REG_NO_MMU_LSB))) | \
++ (((Val) & ESTATUS_REG_NO_MMU_MASK) << ESTATUS_REG_NO_MMU_LSB))
++#define GET_PERF_CNT_REG_CLR(Reg) \
++ (((Reg) >> PERF_CNT_REG_CLR_LSB) & PERF_CNT_REG_CLR_MASK)
++#define SET_PERF_CNT_REG_CLR(Reg, Val) \
++ Reg = (((Reg) & (~(PERF_CNT_REG_CLR_MASK << PERF_CNT_REG_CLR_LSB))) | \
++ (((Val) & PERF_CNT_REG_CLR_MASK) << PERF_CNT_REG_CLR_LSB))
++#define GET_PERF_CNT_REG_EN(Reg) \
++ (((Reg) >> PERF_CNT_REG_EN_LSB) & PERF_CNT_REG_EN_MASK)
++#define SET_PERF_CNT_REG_EN(Reg, Val) \
++ Reg = (((Reg) & (~(PERF_CNT_REG_EN_MASK << PERF_CNT_REG_EN_LSB))) | \
++ (((Val) & PERF_CNT_REG_EN_MASK) << PERF_CNT_REG_EN_LSB))
++#define GET_PTEADDR_REG_PTBASE(Reg) \
++ (((Reg) >> PTEADDR_REG_PTBASE_LSB) & PTEADDR_REG_PTBASE_MASK)
++#define SET_PTEADDR_REG_PTBASE(Reg, Val) \
++ Reg = (((Reg) & (~(PTEADDR_REG_PTBASE_MASK << PTEADDR_REG_PTBASE_LSB))) | \
++ (((Val) & PTEADDR_REG_PTBASE_MASK) << PTEADDR_REG_PTBASE_LSB))
++#define GET_PTEADDR_REG_RSV(Reg) \
++ (((Reg) >> PTEADDR_REG_RSV_LSB) & PTEADDR_REG_RSV_MASK)
++#define SET_PTEADDR_REG_RSV(Reg, Val) \
++ Reg = (((Reg) & (~(PTEADDR_REG_RSV_MASK << PTEADDR_REG_RSV_LSB))) | \
++ (((Val) & PTEADDR_REG_RSV_MASK) << PTEADDR_REG_RSV_LSB))
++#define GET_PTEADDR_REG_VPN(Reg) \
++ (((Reg) >> PTEADDR_REG_VPN_LSB) & PTEADDR_REG_VPN_MASK)
++#define SET_PTEADDR_REG_VPN(Reg, Val) \
++ Reg = (((Reg) & (~(PTEADDR_REG_VPN_MASK << PTEADDR_REG_VPN_LSB))) | \
++ (((Val) & PTEADDR_REG_VPN_MASK) << PTEADDR_REG_VPN_LSB))
++#define GET_SIM_REG_SHOW_DTLB(Reg) \
++ (((Reg) >> SIM_REG_SHOW_DTLB_LSB) & SIM_REG_SHOW_DTLB_MASK)
++#define SET_SIM_REG_SHOW_DTLB(Reg, Val) \
++ Reg = (((Reg) & (~(SIM_REG_SHOW_DTLB_MASK << SIM_REG_SHOW_DTLB_LSB))) | \
++ (((Val) & SIM_REG_SHOW_DTLB_MASK) << SIM_REG_SHOW_DTLB_LSB))
++#define GET_SIM_REG_SHOW_ITLB(Reg) \
++ (((Reg) >> SIM_REG_SHOW_ITLB_LSB) & SIM_REG_SHOW_ITLB_MASK)
++#define SET_SIM_REG_SHOW_ITLB(Reg, Val) \
++ Reg = (((Reg) & (~(SIM_REG_SHOW_ITLB_MASK << SIM_REG_SHOW_ITLB_LSB))) | \
++ (((Val) & SIM_REG_SHOW_ITLB_MASK) << SIM_REG_SHOW_ITLB_LSB))
++#define GET_SIM_REG_SHOW_MMU_REGS(Reg) \
++ (((Reg) >> SIM_REG_SHOW_MMU_REGS_LSB) & SIM_REG_SHOW_MMU_REGS_MASK)
++#define SET_SIM_REG_SHOW_MMU_REGS(Reg, Val) \
++ Reg = (((Reg) & (~(SIM_REG_SHOW_MMU_REGS_MASK << SIM_REG_SHOW_MMU_REGS_LSB))) | \
++ (((Val) & SIM_REG_SHOW_MMU_REGS_MASK) << SIM_REG_SHOW_MMU_REGS_LSB))
++#define GET_SIM_REG_STOP(Reg) \
++ (((Reg) >> SIM_REG_STOP_LSB) & SIM_REG_STOP_MASK)
++#define SET_SIM_REG_STOP(Reg, Val) \
++ Reg = (((Reg) & (~(SIM_REG_STOP_MASK << SIM_REG_STOP_LSB))) | \
++ (((Val) & SIM_REG_STOP_MASK) << SIM_REG_STOP_LSB))
++#define GET_STATUS_REG_EH(Reg) \
++ (((Reg) >> STATUS_REG_EH_LSB) & STATUS_REG_EH_MASK)
++#define SET_STATUS_REG_EH(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_EH_MASK << STATUS_REG_EH_LSB))) | \
++ (((Val) & STATUS_REG_EH_MASK) << STATUS_REG_EH_LSB))
++#define GET_STATUS_REG_MMU(Reg) \
++ (((Reg) >> STATUS_REG_MMU_LSB) & STATUS_REG_MMU_MASK)
++#define SET_STATUS_REG_MMU(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_MMU_MASK << STATUS_REG_MMU_LSB))) | \
++ (((Val) & STATUS_REG_MMU_MASK) << STATUS_REG_MMU_LSB))
++#define GET_STATUS_REG_NO_MMU(Reg) \
++ (((Reg) >> STATUS_REG_NO_MMU_LSB) & STATUS_REG_NO_MMU_MASK)
++#define SET_STATUS_REG_NO_MMU(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_NO_MMU_MASK << STATUS_REG_NO_MMU_LSB))) | \
++ (((Val) & STATUS_REG_NO_MMU_MASK) << STATUS_REG_NO_MMU_LSB))
++#define GET_STATUS_REG_PIE(Reg) \
++ (((Reg) >> STATUS_REG_PIE_LSB) & STATUS_REG_PIE_MASK)
++#define SET_STATUS_REG_PIE(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_PIE_MASK << STATUS_REG_PIE_LSB))) | \
++ (((Val) & STATUS_REG_PIE_MASK) << STATUS_REG_PIE_LSB))
++#define GET_STATUS_REG_U(Reg) \
++ (((Reg) >> STATUS_REG_U_LSB) & STATUS_REG_U_MASK)
++#define SET_STATUS_REG_U(Reg, Val) \
++ Reg = (((Reg) & (~(STATUS_REG_U_MASK << STATUS_REG_U_LSB))) | \
++ (((Val) & STATUS_REG_U_MASK) << STATUS_REG_U_LSB))
++#define GET_TLBACC_REG_C(Reg) \
++ (((Reg) >> TLBACC_REG_C_LSB) & TLBACC_REG_C_MASK)
++#define SET_TLBACC_REG_C(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_C_MASK << TLBACC_REG_C_LSB))) | \
++ (((Val) & TLBACC_REG_C_MASK) << TLBACC_REG_C_LSB))
++#define GET_TLBACC_REG_G(Reg) \
++ (((Reg) >> TLBACC_REG_G_LSB) & TLBACC_REG_G_MASK)
++#define SET_TLBACC_REG_G(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_G_MASK << TLBACC_REG_G_LSB))) | \
++ (((Val) & TLBACC_REG_G_MASK) << TLBACC_REG_G_LSB))
++#define GET_TLBACC_REG_PFN(Reg) \
++ (((Reg) >> TLBACC_REG_PFN_LSB) & TLBACC_REG_PFN_MASK)
++#define SET_TLBACC_REG_PFN(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_PFN_MASK << TLBACC_REG_PFN_LSB))) | \
++ (((Val) & TLBACC_REG_PFN_MASK) << TLBACC_REG_PFN_LSB))
++#define GET_TLBACC_REG_R(Reg) \
++ (((Reg) >> TLBACC_REG_R_LSB) & TLBACC_REG_R_MASK)
++#define SET_TLBACC_REG_R(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_R_MASK << TLBACC_REG_R_LSB))) | \
++ (((Val) & TLBACC_REG_R_MASK) << TLBACC_REG_R_LSB))
++#define GET_TLBACC_REG_W(Reg) \
++ (((Reg) >> TLBACC_REG_W_LSB) & TLBACC_REG_W_MASK)
++#define SET_TLBACC_REG_W(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_W_MASK << TLBACC_REG_W_LSB))) | \
++ (((Val) & TLBACC_REG_W_MASK) << TLBACC_REG_W_LSB))
++#define GET_TLBACC_REG_X(Reg) \
++ (((Reg) >> TLBACC_REG_X_LSB) & TLBACC_REG_X_MASK)
++#define SET_TLBACC_REG_X(Reg, Val) \
++ Reg = (((Reg) & (~(TLBACC_REG_X_MASK << TLBACC_REG_X_LSB))) | \
++ (((Val) & TLBACC_REG_X_MASK) << TLBACC_REG_X_LSB))
++#define GET_TLBMISC_REG_BAD(Reg) \
++ (((Reg) >> TLBMISC_REG_BAD_LSB) & TLBMISC_REG_BAD_MASK)
++#define SET_TLBMISC_REG_BAD(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_BAD_MASK << TLBMISC_REG_BAD_LSB))) | \
++ (((Val) & TLBMISC_REG_BAD_MASK) << TLBMISC_REG_BAD_LSB))
++#define GET_TLBMISC_REG_D(Reg) \
++ (((Reg) >> TLBMISC_REG_D_LSB) & TLBMISC_REG_D_MASK)
++#define SET_TLBMISC_REG_D(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_D_MASK << TLBMISC_REG_D_LSB))) | \
++ (((Val) & TLBMISC_REG_D_MASK) << TLBMISC_REG_D_LSB))
++#define GET_TLBMISC_REG_DBL(Reg) \
++ (((Reg) >> TLBMISC_REG_DBL_LSB) & TLBMISC_REG_DBL_MASK)
++#define SET_TLBMISC_REG_DBL(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_DBL_MASK << TLBMISC_REG_DBL_LSB))) | \
++ (((Val) & TLBMISC_REG_DBL_MASK) << TLBMISC_REG_DBL_LSB))
++#define GET_TLBMISC_REG_PERM(Reg) \
++ (((Reg) >> TLBMISC_REG_PERM_LSB) & TLBMISC_REG_PERM_MASK)
++#define SET_TLBMISC_REG_PERM(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_PERM_MASK << TLBMISC_REG_PERM_LSB))) | \
++ (((Val) & TLBMISC_REG_PERM_MASK) << TLBMISC_REG_PERM_LSB))
++#define GET_TLBMISC_REG_PID(Reg) \
++ (((Reg) >> TLBMISC_REG_PID_LSB) & TLBMISC_REG_PID_MASK)
++#define SET_TLBMISC_REG_PID(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_PID_MASK << TLBMISC_REG_PID_LSB))) | \
++ (((Val) & TLBMISC_REG_PID_MASK) << TLBMISC_REG_PID_LSB))
++#define GET_TLBMISC_REG_RD(Reg) \
++ (((Reg) >> TLBMISC_REG_RD_LSB) & TLBMISC_REG_RD_MASK)
++#define SET_TLBMISC_REG_RD(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_RD_MASK << TLBMISC_REG_RD_LSB))) | \
++ (((Val) & TLBMISC_REG_RD_MASK) << TLBMISC_REG_RD_LSB))
++#define GET_TLBMISC_REG_RSV(Reg) \
++ (((Reg) >> TLBMISC_REG_RSV_LSB) & TLBMISC_REG_RSV_MASK)
++#define SET_TLBMISC_REG_RSV(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_RSV_MASK << TLBMISC_REG_RSV_LSB))) | \
++ (((Val) & TLBMISC_REG_RSV_MASK) << TLBMISC_REG_RSV_LSB))
++#define GET_TLBMISC_REG_WAY(Reg) \
++ (((Reg) >> TLBMISC_REG_WAY_LSB) & TLBMISC_REG_WAY_MASK)
++#define SET_TLBMISC_REG_WAY(Reg, Val) \
++ Reg = (((Reg) & (~(TLBMISC_REG_WAY_MASK << TLBMISC_REG_WAY_LSB))) | \
++ (((Val) & TLBMISC_REG_WAY_MASK) << TLBMISC_REG_WAY_LSB))
++
++/* Macros to extract MMU fields */
++#define GET_MMU_ADDR_BYPASS_TLB_CACHEABLE(Addr) \
++ (((Addr) >> MMU_ADDR_BYPASS_TLB_CACHEABLE_LSB) & MMU_ADDR_BYPASS_TLB_CACHEABLE_MASK)
++#define SET_MMU_ADDR_BYPASS_TLB_CACHEABLE(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_BYPASS_TLB_CACHEABLE_MASK << MMU_ADDR_BYPASS_TLB_CACHEABLE_LSB))) | \
++ (((Val) & MMU_ADDR_BYPASS_TLB_CACHEABLE_MASK) << MMU_ADDR_BYPASS_TLB_CACHEABLE_LSB))
++#define GET_MMU_ADDR_BYPASS_TLB(Addr) \
++ (((Addr) >> MMU_ADDR_BYPASS_TLB_LSB) & MMU_ADDR_BYPASS_TLB_MASK)
++#define SET_MMU_ADDR_BYPASS_TLB(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_BYPASS_TLB_MASK << MMU_ADDR_BYPASS_TLB_LSB))) | \
++ (((Val) & MMU_ADDR_BYPASS_TLB_MASK) << MMU_ADDR_BYPASS_TLB_LSB))
++#define GET_MMU_ADDR_BYPASS_TLB_PADDR(Addr) \
++ (((Addr) >> MMU_ADDR_BYPASS_TLB_PADDR_LSB) & MMU_ADDR_BYPASS_TLB_PADDR_MASK)
++#define SET_MMU_ADDR_BYPASS_TLB_PADDR(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_BYPASS_TLB_PADDR_MASK << MMU_ADDR_BYPASS_TLB_PADDR_LSB))) | \
++ (((Val) & MMU_ADDR_BYPASS_TLB_PADDR_MASK) << MMU_ADDR_BYPASS_TLB_PADDR_LSB))
++#define GET_MMU_ADDR_IO_REGION(Addr) \
++ (((Addr) >> MMU_ADDR_IO_REGION_LSB) & MMU_ADDR_IO_REGION_MASK)
++#define SET_MMU_ADDR_IO_REGION(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_IO_REGION_MASK << MMU_ADDR_IO_REGION_LSB))) | \
++ (((Val) & MMU_ADDR_IO_REGION_MASK) << MMU_ADDR_IO_REGION_LSB))
++#define GET_MMU_ADDR_KERNEL_MMU_REGION(Addr) \
++ (((Addr) >> MMU_ADDR_KERNEL_MMU_REGION_LSB) & MMU_ADDR_KERNEL_MMU_REGION_MASK)
++#define SET_MMU_ADDR_KERNEL_MMU_REGION(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_KERNEL_MMU_REGION_MASK << MMU_ADDR_KERNEL_MMU_REGION_LSB))) | \
++ (((Val) & MMU_ADDR_KERNEL_MMU_REGION_MASK) << MMU_ADDR_KERNEL_MMU_REGION_LSB))
++#define GET_MMU_ADDR_KERNEL_REGION(Addr) \
++ (((Addr) >> MMU_ADDR_KERNEL_REGION_LSB) & MMU_ADDR_KERNEL_REGION_MASK)
++#define SET_MMU_ADDR_KERNEL_REGION(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_KERNEL_REGION_MASK << MMU_ADDR_KERNEL_REGION_LSB))) | \
++ (((Val) & MMU_ADDR_KERNEL_REGION_MASK) << MMU_ADDR_KERNEL_REGION_LSB))
++#define GET_MMU_ADDR_PAGE_OFFSET(Addr) \
++ (((Addr) >> MMU_ADDR_PAGE_OFFSET_LSB) & MMU_ADDR_PAGE_OFFSET_MASK)
++#define SET_MMU_ADDR_PAGE_OFFSET(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_PAGE_OFFSET_MASK << MMU_ADDR_PAGE_OFFSET_LSB))) | \
++ (((Val) & MMU_ADDR_PAGE_OFFSET_MASK) << MMU_ADDR_PAGE_OFFSET_LSB))
++#define GET_MMU_ADDR_PFN(Addr) \
++ (((Addr) >> MMU_ADDR_PFN_LSB) & MMU_ADDR_PFN_MASK)
++#define SET_MMU_ADDR_PFN(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_PFN_MASK << MMU_ADDR_PFN_LSB))) | \
++ (((Val) & MMU_ADDR_PFN_MASK) << MMU_ADDR_PFN_LSB))
++#define GET_MMU_ADDR_USER_REGION(Addr) \
++ (((Addr) >> MMU_ADDR_USER_REGION_LSB) & MMU_ADDR_USER_REGION_MASK)
++#define SET_MMU_ADDR_USER_REGION(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_USER_REGION_MASK << MMU_ADDR_USER_REGION_LSB))) | \
++ (((Val) & MMU_ADDR_USER_REGION_MASK) << MMU_ADDR_USER_REGION_LSB))
++#define GET_MMU_ADDR_VPN(Addr) \
++ (((Addr) >> MMU_ADDR_VPN_LSB) & MMU_ADDR_VPN_MASK)
++#define SET_MMU_ADDR_VPN(Addr, Val) \
++ Addr = (((Addr) & (~(MMU_ADDR_VPN_MASK << MMU_ADDR_VPN_LSB))) | \
++ (((Val) & MMU_ADDR_VPN_MASK) << MMU_ADDR_VPN_LSB))
++
++/* OP instruction values */
++#define OP_ADDI 4
++#define OP_ANDHI 44
++#define OP_ANDI 12
++#define OP_BEQ 38
++#define OP_BGE 14
++#define OP_BGEU 46
++#define OP_BLT 22
++#define OP_BLTU 54
++#define OP_BNE 30
++#define OP_BR 6
++#define OP_CALL 0
++#define OP_CMPEQI 32
++#define OP_CMPGEI 8
++#define OP_CMPGEUI 40
++#define OP_CMPLTI 16
++#define OP_CMPLTUI 48
++#define OP_CMPNEI 24
++#define OP_CUSTOM 50
++#define OP_FLUSHD 59
++#define OP_INITD 51
++#define OP_LDB 7
++#define OP_LDBIO 39
++#define OP_LDBU 3
++#define OP_LDBUIO 35
++#define OP_LDH 15
++#define OP_LDHIO 47
++#define OP_LDHU 11
++#define OP_LDHUIO 43
++#define OP_LDW 23
++#define OP_LDWIO 55
++#define OP_MULI 36
++#define OP_OPX 58
++#define OP_ORHI 52
++#define OP_ORI 20
++#define OP_STB 5
++#define OP_STBIO 37
++#define OP_STH 13
++#define OP_STHIO 45
++#define OP_STW 21
++#define OP_STWIO 53
++#define OP_XORHI 60
++#define OP_XORI 28
++
++/* OPX instruction values */
++#define OPX_ADD 49
++#define OPX_AND 14
++#define OPX_BREAK 52
++#define OPX_BRET 9
++#define OPX_CALLR 29
++#define OPX_CMPEQ 32
++#define OPX_CMPGE 8
++#define OPX_CMPGEU 40
++#define OPX_CMPLT 16
++#define OPX_CMPLTU 48
++#define OPX_CMPNE 24
++#define OPX_DIV 37
++#define OPX_DIVU 36
++#define OPX_ERET 1
++#define OPX_FLUSHI 12
++#define OPX_FLUSHP 4
++#define OPX_HBREAK 53
++#define OPX_INITI 41
++#define OPX_INTR 61
++#define OPX_JMP 13
++#define OPX_MUL 39
++#define OPX_MULXSS 31
++#define OPX_MULXSU 23
++#define OPX_MULXUU 7
++#define OPX_NEXTPC 28
++#define OPX_NOR 6
++#define OPX_OR 22
++#define OPX_RDCTL 38
++#define OPX_RET 5
++#define OPX_ROL 3
++#define OPX_ROLI 2
++#define OPX_ROR 11
++#define OPX_SLL 19
++#define OPX_SLLI 18
++#define OPX_SRA 59
++#define OPX_SRAI 58
++#define OPX_SRL 27
++#define OPX_SRLI 26
++#define OPX_SUB 57
++#define OPX_SYNC 54
++#define OPX_TRAP 45
++#define OPX_WRCTL 46
++#define OPX_XOR 30
++
++/* Macros to detect sub-opcode instructions */
++#define IS_OPX_INST(Iw) (GET_IW_OP(Iw) == OP_OPX)
++#define IS_CUSTOM_INST(Iw) (GET_IW_OP(Iw) == OP_CUSTOM)
++
++/* Instruction property macros */
++#define IW_PROP_RESERVED_OP(Iw) (0)
++
++#define IW_PROP_RESERVED_OPX(Iw) (0)
++
++#define IW_PROP_RESERVED(Iw) (0)
++
++#define IW_PROP_FLUSH_PIPE(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_FLUSHP) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_BRET) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_JMP_INDIRECT_NON_TRAP(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_jmp_indirect_non_trap[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_jmp_indirect_non_trap[64];
++
++#define IW_PROP_JMP_INDIRECT(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_jmp_indirect[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_jmp_indirect[64];
++
++#define IW_PROP_JMP_DIRECT(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_CALL)) \
++ ) \
++ \
++)
++
++#define IW_PROP_MUL_LSW(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_MULI)) || \
++ ((GET_IW_OPX((Iw)) == OPX_MUL) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_MULX(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_mulx[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_mulx[64];
++
++#define IW_PROP_MUL(Iw) ( \
++ (op_prop_mul[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_mul[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_mul[64];
++extern unsigned char opx_prop_mul[64];
++
++#define IW_PROP_DIV_UNSIGNED(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_DIVU) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_DIV_SIGNED(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_DIV) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_DIV(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_DIVU) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_DIV) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_UNIMPLEMENTED(Iw) (0)
++
++#define IW_PROP_IMPLICIT_DST_RETADDR(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_CALL)) \
++ ) \
++ \
++)
++
++#define IW_PROP_IMPLICIT_DST_ERETADDR(Iw) (0)
++
++#define IW_PROP_EXCEPTION(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_TRAP) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_INTR) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_BREAK(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_BREAK) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_HBREAK) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_WR_CTL_REG(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_wr_ctl_reg[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_wr_ctl_reg[64];
++
++#define IW_PROP_UNCOND_CTI_NON_BR(Iw) ( \
++ (op_prop_uncond_cti_non_br[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_uncond_cti_non_br[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_uncond_cti_non_br[64];
++extern unsigned char opx_prop_uncond_cti_non_br[64];
++
++#define IW_PROP_RETADDR(Iw) ( \
++ (op_prop_retaddr[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_retaddr[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_retaddr[64];
++extern unsigned char opx_prop_retaddr[64];
++
++#define IW_PROP_SHIFT_LEFT(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_SLLI) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_SLL) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_SHIFT_LOGICAL(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_shift_logical[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_shift_logical[64];
++
++#define IW_PROP_ROT_LEFT(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_ROLI) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_ROL) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_SHIFT_ROT_LEFT(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_shift_rot_left[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_shift_rot_left[64];
++
++#define IW_PROP_SHIFT_RIGHT_LOGICAL(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_SRLI) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_SRL) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_SHIFT_RIGHT_ARITH(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_SRAI) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_SRA) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_SHIFT_RIGHT(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_shift_right[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_shift_right[64];
++
++#define IW_PROP_ROT_RIGHT(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_ROR) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_SHIFT_ROT_RIGHT(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_shift_rot_right[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_shift_rot_right[64];
++
++#define IW_PROP_SHIFT_ROT(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_shift_rot[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_shift_rot[64];
++
++#define IW_PROP_SHIFT_ROT_IMM(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_shift_rot_imm[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_shift_rot_imm[64];
++
++#define IW_PROP_ROTATE(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_rotate[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_rotate[64];
++
++#define IW_PROP_LOGIC_REG(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_logic_reg[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_logic_reg[64];
++
++#define IW_PROP_LOGIC_HI_IMM16(Iw) ( \
++ (op_prop_logic_hi_imm16[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_logic_hi_imm16[64];
++
++#define IW_PROP_LOGIC_LO_IMM16(Iw) ( \
++ (op_prop_logic_lo_imm16[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_logic_lo_imm16[64];
++
++#define IW_PROP_LOGIC_IMM16(Iw) ( \
++ (op_prop_logic_imm16[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_logic_imm16[64];
++
++#define IW_PROP_LOGIC(Iw) ( \
++ (op_prop_logic[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_logic[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_logic[64];
++extern unsigned char opx_prop_logic[64];
++
++#define IW_PROP_UNSIGNED_LO_IMM16(Iw) ( \
++ (op_prop_unsigned_lo_imm16[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_unsigned_lo_imm16[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_unsigned_lo_imm16[64];
++extern unsigned char opx_prop_unsigned_lo_imm16[64];
++
++#define IW_PROP_ARITH_IMM16(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_ADDI)) || \
++ ((GET_IW_OP((Iw)) == OP_MULI)) \
++ ) \
++ \
++)
++
++#define IW_PROP_CMP_IMM16_NO_CALL(Iw) ( \
++ (op_prop_cmp_imm16_no_call[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_cmp_imm16_no_call[64];
++
++#define IW_PROP_CMP_IMM16_WITH_CALL(Iw) ( \
++ (op_prop_cmp_imm16_with_call[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_cmp_imm16_with_call[64];
++
++#define IW_PROP_CMP_REG(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_cmp_reg[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_cmp_reg[64];
++
++#define IW_PROP_SRC_IMM16(Iw) ( \
++ (op_prop_src_imm16[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_src_imm16[64];
++
++#define IW_PROP_SRC_IMM5(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_src_imm5[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_src_imm5[64];
++
++#define IW_PROP_CMP_WITH_LT(Iw) ( \
++ (op_prop_cmp_with_lt[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_cmp_with_lt[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_cmp_with_lt[64];
++extern unsigned char opx_prop_cmp_with_lt[64];
++
++#define IW_PROP_CMP_WITH_EQ(Iw) ( \
++ (op_prop_cmp_with_eq[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_cmp_with_eq[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_cmp_with_eq[64];
++extern unsigned char opx_prop_cmp_with_eq[64];
++
++#define IW_PROP_CMP_WITH_GE(Iw) ( \
++ (op_prop_cmp_with_ge[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_cmp_with_ge[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_cmp_with_ge[64];
++extern unsigned char opx_prop_cmp_with_ge[64];
++
++#define IW_PROP_CMP_WITH_NE(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_CMPNEI)) || \
++ ((GET_IW_OPX((Iw)) == OPX_CMPNE) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_CMP_ALU_SIGNED(Iw) ( \
++ (op_prop_cmp_alu_signed[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_cmp_alu_signed[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_cmp_alu_signed[64];
++extern unsigned char opx_prop_cmp_alu_signed[64];
++
++#define IW_PROP_CMP(Iw) ( \
++ (op_prop_cmp[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_cmp[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_cmp[64];
++extern unsigned char opx_prop_cmp[64];
++
++#define IW_PROP_BR_WITH_LT(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_BLT)) || \
++ ((GET_IW_OP((Iw)) == OP_BLTU)) \
++ ) \
++ \
++)
++
++#define IW_PROP_BR_WITH_GE(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_BGE)) || \
++ ((GET_IW_OP((Iw)) == OP_BGEU)) \
++ ) \
++ \
++)
++
++#define IW_PROP_BR_WITH_EQ(Iw) ( \
++ (op_prop_br_with_eq[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_br_with_eq[64];
++
++#define IW_PROP_BR_WITH_NE(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_BNE)) \
++ ) \
++ \
++)
++
++#define IW_PROP_BR_ALU_SIGNED(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_BGE)) || \
++ ((GET_IW_OP((Iw)) == OP_BLT)) \
++ ) \
++ \
++)
++
++#define IW_PROP_BR_COND(Iw) ( \
++ (op_prop_br_cond[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_br_cond[64];
++
++#define IW_PROP_BR_UNCOND(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_BR)) \
++ ) \
++ \
++)
++
++#define IW_PROP_BR(Iw) ( \
++ (op_prop_br[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_br[64];
++
++#define IW_PROP_ALU_SUB(Iw) ( \
++ (op_prop_alu_sub[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_alu_sub[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_alu_sub[64];
++extern unsigned char opx_prop_alu_sub[64];
++
++#define IW_PROP_FORCE_XOR(Iw) ( \
++ (op_prop_force_xor[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_force_xor[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_force_xor[64];
++extern unsigned char opx_prop_force_xor[64];
++
++#define IW_PROP_LOAD8(Iw) ( \
++ (op_prop_load8[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load8[64];
++
++#define IW_PROP_LOAD16(Iw) ( \
++ (op_prop_load16[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load16[64];
++
++#define IW_PROP_LOAD32(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_LDW)) || \
++ ((GET_IW_OP((Iw)) == OP_LDWIO)) \
++ ) \
++ \
++)
++
++#define IW_PROP_LOAD_SIGNED(Iw) ( \
++ (op_prop_load_signed[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load_signed[64];
++
++#define IW_PROP_LOAD_UNSIGNED(Iw) ( \
++ (op_prop_load_unsigned[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load_unsigned[64];
++
++#define IW_PROP_LOAD(Iw) ( \
++ (op_prop_load[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load[64];
++
++#define IW_PROP_LOAD_INITD_FLUSHD(Iw) ( \
++ (op_prop_load_initd_flushd[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load_initd_flushd[64];
++
++#define IW_PROP_LOAD_NON_IO(Iw) ( \
++ (op_prop_load_non_io[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load_non_io[64];
++
++#define IW_PROP_STORE8(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_STB)) || \
++ ((GET_IW_OP((Iw)) == OP_STBIO)) \
++ ) \
++ \
++)
++
++#define IW_PROP_STORE16(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_STH)) || \
++ ((GET_IW_OP((Iw)) == OP_STHIO)) \
++ ) \
++ \
++)
++
++#define IW_PROP_STORE32(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_STW)) || \
++ ((GET_IW_OP((Iw)) == OP_STWIO)) \
++ ) \
++ \
++)
++
++#define IW_PROP_STORE(Iw) ( \
++ (op_prop_store[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_store[64];
++
++#define IW_PROP_STORE_NON_IO(Iw) ( \
++ (op_prop_store_non_io[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_store_non_io[64];
++
++#define IW_PROP_MEM(Iw) ( \
++ (op_prop_mem[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_mem[64];
++
++#define IW_PROP_INITD(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_INITD)) \
++ ) \
++ \
++)
++
++#define IW_PROP_FLUSHD(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_FLUSHD)) \
++ ) \
++ \
++)
++
++#define IW_PROP_INITD_FLUSHD(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_INITD)) || \
++ ((GET_IW_OP((Iw)) == OP_FLUSHD)) \
++ ) \
++ \
++)
++
++#define IW_PROP_INITI_FLUSHI(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_INITI) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_FLUSHI) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_LOAD_IO(Iw) ( \
++ (op_prop_load_io[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_load_io[64];
++
++#define IW_PROP_STORE_IO(Iw) ( \
++ (op_prop_store_io[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_store_io[64];
++
++#define IW_PROP_MEM_IO(Iw) ( \
++ (op_prop_mem_io[GET_IW_OP(Iw)]))
++extern unsigned char op_prop_mem_io[64];
++
++#define IW_PROP_ARITH(Iw) ( \
++ (op_prop_arith[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_arith[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_arith[64];
++extern unsigned char opx_prop_arith[64];
++
++#define IW_PROP_A_NOT_SRC(Iw) ( \
++ ( \
++ ((GET_IW_OP((Iw)) == OP_CALL)) \
++ ) \
++ || (IS_CUSTOM_INST(Iw) && !GET_IW_CUSTOM_READRA(Iw)) \
++)
++
++#define IW_PROP_B_NOT_SRC(Iw) ( \
++ (op_prop_b_not_src[GET_IW_OP(Iw)]) \
++ || (IS_CUSTOM_INST(Iw) && !GET_IW_CUSTOM_READRB(Iw)))
++extern unsigned char op_prop_b_not_src[64];
++
++#define IW_PROP_IGNORE_DST(Iw) ( \
++ (op_prop_ignore_dst[GET_IW_OP(Iw)]) \
++ || (IS_CUSTOM_INST(Iw) && !GET_IW_CUSTOM_WRITERC(Iw)))
++extern unsigned char op_prop_ignore_dst[64];
++
++#define IW_PROP_SRC2_IS_IMM(Iw) ( \
++ (op_prop_src2_is_imm[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_src2_is_imm[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_src2_is_imm[64];
++extern unsigned char opx_prop_src2_is_imm[64];
++
++#define IW_PROP_WRCTL_INST(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_WRCTL) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_RDCTL_INST(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_RDCTL) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_MUL_SRC1_SIGNED(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_MULXSS) && IS_OPX_INST(Iw)) || \
++ ((GET_IW_OPX((Iw)) == OPX_MULXSU) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_MUL_SRC2_SIGNED(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_MULXSS) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_MUL_SHIFT_SRC1_SIGNED(Iw) ( \
++ (IS_OPX_INST(Iw) && opx_prop_mul_shift_src1_signed[GET_IW_OPX(Iw)]))
++extern unsigned char opx_prop_mul_shift_src1_signed[64];
++
++#define IW_PROP_MUL_SHIFT_SRC2_SIGNED(Iw) ( \
++ ( \
++ ((GET_IW_OPX((Iw)) == OPX_MULXSS) && IS_OPX_INST(Iw)) \
++ ) \
++ \
++)
++
++#define IW_PROP_DONT_DISPLAY_DST_REG(Iw) ( \
++ (op_prop_dont_display_dst_reg[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_dont_display_dst_reg[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_dont_display_dst_reg[64];
++extern unsigned char opx_prop_dont_display_dst_reg[64];
++
++#define IW_PROP_DONT_DISPLAY_SRC1_REG(Iw) ( \
++ (op_prop_dont_display_src1_reg[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_dont_display_src1_reg[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_dont_display_src1_reg[64];
++extern unsigned char opx_prop_dont_display_src1_reg[64];
++
++#define IW_PROP_DONT_DISPLAY_SRC2_REG(Iw) ( \
++ (op_prop_dont_display_src2_reg[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_dont_display_src2_reg[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_dont_display_src2_reg[64];
++extern unsigned char opx_prop_dont_display_src2_reg[64];
++
++#define IW_PROP_SRC1_NO_X(Iw) ( \
++ (op_prop_src1_no_x[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_src1_no_x[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_src1_no_x[64];
++extern unsigned char opx_prop_src1_no_x[64];
++
++#define IW_PROP_SRC2_NO_X(Iw) ( \
++ (op_prop_src2_no_x[GET_IW_OP(Iw)] || \
++ (IS_OPX_INST(Iw) && opx_prop_src2_no_x[GET_IW_OPX(Iw)])))
++extern unsigned char op_prop_src2_no_x[64];
++extern unsigned char opx_prop_src2_no_x[64];
++
++/* Instruction information entry */
++typedef struct {
++ const char* name; /* Assembly-language instruction name */
++ int instType; /* INST_TYPE_OP or INST_TYPE_OPX */
++ unsigned opcode; /* Value of instruction word OP/OPX field */
++} Nios2InstInfo;
++
++/* Instruction types */
++#define INST_TYPE_OP 0
++#define INST_TYPE_OPX 1
++
++/* Canonical instruction codes independent of encoding */
++#define CALL_INST_CODE 0
++#define LDBU_INST_CODE 1
++#define ADDI_INST_CODE 2
++#define STB_INST_CODE 3
++#define BR_INST_CODE 4
++#define LDB_INST_CODE 5
++#define CMPGEI_INST_CODE 6
++#define LDHU_INST_CODE 7
++#define ANDI_INST_CODE 8
++#define STH_INST_CODE 9
++#define BGE_INST_CODE 10
++#define LDH_INST_CODE 11
++#define CMPLTI_INST_CODE 12
++#define ORI_INST_CODE 13
++#define STW_INST_CODE 14
++#define BLT_INST_CODE 15
++#define LDW_INST_CODE 16
++#define CMPNEI_INST_CODE 17
++#define XORI_INST_CODE 18
++#define BNE_INST_CODE 19
++#define CMPEQI_INST_CODE 20
++#define LDBUIO_INST_CODE 21
++#define MULI_INST_CODE 22
++#define STBIO_INST_CODE 23
++#define BEQ_INST_CODE 24
++#define LDBIO_INST_CODE 25
++#define CMPGEUI_INST_CODE 26
++#define LDHUIO_INST_CODE 27
++#define ANDHI_INST_CODE 28
++#define STHIO_INST_CODE 29
++#define BGEU_INST_CODE 30
++#define LDHIO_INST_CODE 31
++#define CMPLTUI_INST_CODE 32
++#define CUSTOM_INST_CODE 33
++#define INITD_INST_CODE 34
++#define ORHI_INST_CODE 35
++#define STWIO_INST_CODE 36
++#define BLTU_INST_CODE 37
++#define LDWIO_INST_CODE 38
++#define FLUSHD_INST_CODE 39
++#define XORHI_INST_CODE 40
++#define ERET_INST_CODE 41
++#define ROLI_INST_CODE 42
++#define ROL_INST_CODE 43
++#define FLUSHP_INST_CODE 44
++#define RET_INST_CODE 45
++#define NOR_INST_CODE 46
++#define MULXUU_INST_CODE 47
++#define CMPGE_INST_CODE 48
++#define BRET_INST_CODE 49
++#define ROR_INST_CODE 50
++#define FLUSHI_INST_CODE 51
++#define JMP_INST_CODE 52
++#define AND_INST_CODE 53
++#define CMPLT_INST_CODE 54
++#define SLLI_INST_CODE 55
++#define SLL_INST_CODE 56
++#define OR_INST_CODE 57
++#define MULXSU_INST_CODE 58
++#define CMPNE_INST_CODE 59
++#define SRLI_INST_CODE 60
++#define SRL_INST_CODE 61
++#define NEXTPC_INST_CODE 62
++#define CALLR_INST_CODE 63
++#define XOR_INST_CODE 64
++#define MULXSS_INST_CODE 65
++#define CMPEQ_INST_CODE 66
++#define DIVU_INST_CODE 67
++#define DIV_INST_CODE 68
++#define RDCTL_INST_CODE 69
++#define MUL_INST_CODE 70
++#define CMPGEU_INST_CODE 71
++#define INITI_INST_CODE 72
++#define TRAP_INST_CODE 73
++#define WRCTL_INST_CODE 74
++#define CMPLTU_INST_CODE 75
++#define ADD_INST_CODE 76
++#define BREAK_INST_CODE 77
++#define HBREAK_INST_CODE 78
++#define SYNC_INST_CODE 79
++#define SUB_INST_CODE 80
++#define SRAI_INST_CODE 81
++#define SRA_INST_CODE 82
++#define INTR_INST_CODE 83
++#define RSV_INST_CODE 84
++#define NUM_NIOS2_INST_CODES 85
++
++extern Nios2InstInfo nios2InstInfo[NUM_NIOS2_INST_CODES];
++
++/* Returns the instruction code given the 32-bit instruction word */
++#define GET_INST_CODE(Iw) \
++ (IS_OPX_INST(Iw) ? opxToInstCode[GET_IW_OPX(Iw)] : opToInstCode[GET_IW_OP(Iw)])
++extern int opToInstCode[64];
++extern int opxToInstCode[64];
++
++//
++// MMU Memory Region Macros
++//
++#define isMmuUserRegion(Vaddr) \
++ (GET_MMU_ADDR_USER_REGION(Vaddr) == MMU_ADDR_USER_REGION)
++#define isMmuKernelMmuRegion(Vaddr) \
++ (GET_MMU_ADDR_KERNEL_MMU_REGION(Vaddr) == MMU_ADDR_KERNEL_MMU_REGION)
++#define isMmuKernelRegion(Vaddr) \
++ (GET_MMU_ADDR_KERNEL_REGION(Vaddr) == MMU_ADDR_KERNEL_REGION)
++#define isMmuIORegion(Vaddr) \
++ (GET_MMU_ADDR_IO_REGION(Vaddr) == MMU_ADDR_IO_REGION)
++
++// Does this virtual address bypass the TLB?
++#define vaddrBypassTlb(Vaddr) \
++ (GET_MMU_ADDR_BYPASS_TLB(Vaddr) == MMU_ADDR_BYPASS_TLB)
++
++// If TLB is bypassed, is the address cacheable or uncachable.
++#define vaddrBypassTlbCacheable(Vaddr) \
++ (GET_MMU_ADDR_BYPASS_TLB_CACHEABLE(Vaddr) == MMU_ADDR_BYPASS_TLB_CACHEABLE)
++
++// Compute physical address for regions that bypass the TLB.
++// Just need to clear some top bits.
++#define bypassTlbVaddrToPaddr(Vaddr) \
++ ((Vaddr) & (MMU_ADDR_BYPASS_TLB_PADDR_MASK << MMU_ADDR_BYPASS_TLB_PADDR_LSB))
++
++// Will the physical address fit in the Kernel/IO region virtual address space?
++#define fitsInKernelRegion(Paddr) \
++ (GET_MMU_ADDR_KERNEL_REGION(Paddr) == 0)
++#define fitsInIORegion(Paddr) \
++ (GET_MMU_ADDR_IO_REGION(Paddr) == 0)
++
++// Convert a physical address to a Kernel/IO region virtual address.
++#define paddrToKernelRegionVaddr(Paddr) \
++ ((Paddr) | (MMU_ADDR_KERNEL_REGION << MMU_ADDR_KERNEL_REGION_LSB))
++#define paddrToIORegionVaddr(Paddr) \
++ ((Paddr) | (MMU_ADDR_IO_REGION << MMU_ADDR_IO_REGION_LSB))
++
++// Convert a virtual address to a Kernel/IO region virtual address.
++// Uses bypassTlbVaddrToPaddr to clear top bits.
++#define vaddrToKernelRegionVaddr(Vaddr) \
++ paddrToKernelRegionVaddr(bypassTlbVaddrToPaddr(Vaddr))
++#define vaddrToIORegionVaddr(Vaddr) \
++ paddrToIORegionVaddr(bypassTlbVaddrToPaddr(Vaddr))
++
++// Convert between VPN/PFN and virtual/physical addresses.
++#define vpnToVaddr(Vpn) ((Vpn) << MMU_ADDR_VPN_LSB)
++#define pfnToPaddr(Pfn) ((Pfn) << MMU_ADDR_PFN_LSB)
++#define vaddrToVpn(Vaddr) GET_MMU_ADDR_VPN(Vaddr)
++#define paddrToPfn(Paddr) GET_MMU_ADDR_PFN(Paddr)
++
++
++#endif /* _NIOS2_ISA_H_ */
+--- binutils-2.15/include/opcode/nios2.h 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/include/opcode/nios2.h 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,357 @@
++/* nios2.h. Altera New Jersey opcode list for GAS, the GNU assembler.
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++This file is part of GDB, GAS, and the GNU binutils.
++
++GDB, GAS, and the GNU binutils are free software; you can redistribute
++them and/or modify them under the terms of the GNU General Public
++License as published by the Free Software Foundation; either version
++1, or (at your option) any later version.
++
++GDB, GAS, and the GNU binutils are distributed in the hope that they
++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 file; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#ifndef _NIOS2_H_
++#define _NIOS2_H_
++
++
++/****************************************************************************
++ * This file contains structures, bit masks and shift counts used
++ * by the GNU toolchain to define the New Jersey instruction set and
++ * access various opcode fields.
++ ****************************************************************************/
++
++enum overflow_type
++{
++ call_target_overflow = 0,
++ branch_target_overflow,
++ address_offset_overflow,
++ signed_immed16_overflow,
++ unsigned_immed16_overflow,
++ unsigned_immed5_overflow,
++ custom_opcode_overflow,
++ no_overflow
++};
++
++/*---------------------------------------------------------------------------
++ This structure holds information for a particular instruction
++ ---------------------------------------------------------------------------*/
++
++/* match When assembling, this
++ opcode is modified by the arguments to produce the actual opcode
++ that is used. If pinfo is INSN_MACRO, then this is 0. */
++
++/* mask If pinfo is not INSN_MACRO, then this is a bit mask for the
++ relevant portions of the opcode when disassembling. If the
++ actual opcode anded with the match field equals the opcode field,
++ then we have found the correct instruction. If pinfo is
++ INSN_MACRO, then this field is the macro identifier. */
++
++/* For a macro, this is INSN_MACRO. Otherwise, it is a collection
++ of bits describing the instruction, notably any relevant hazard
++ information. */
++
++struct nios2_opcode
++{
++ const char *name; /* The name of the instruction. */
++ const char *args; /* A string describing the arguments for this instruction. */
++ const char *args_test; /* Like args, but with an extra argument for the expected opcode */
++ unsigned long num_args; /* the number of arguments the instruction takes */
++ unsigned long match; /* The basic opcode for the instruction. */
++ unsigned long mask; /* mask for the opcode field of the instruction */
++ unsigned long pinfo; /* is this a real instruction or instruction macro */
++ enum overflow_type overflow_msg; /* msg template used to generate informative message when fixup overflows */
++};
++
++/* This value is used in the nios2_opcode.pinfo field to indicate that the instruction
++ is a macro or pseudo-op. This requires special treatment by the assembler, and is
++ used by the disassembler to determine whether to check for a nop */
++#define NIOS2_INSN_MACRO 0x80000000
++#define NIOS2_INSN_MACRO_MOV 0x80000001
++#define NIOS2_INSN_MACRO_MOVI 0x80000002
++#define NIOS2_INSN_MACRO_MOVIA 0x80000004
++
++#define NIOS2_INSN_RELAXABLE 0x40000000
++#define NIOS2_INSN_UBRANCH 0x00000010
++#define NIOS2_INSN_CBRANCH 0x00000020
++#define NIOS2_INSN_CALL 0x00000040
++
++#define NIOS2_INSN_ADDI 0x00000080
++#define NIOS2_INSN_ANDI 0x00000100
++#define NIOS2_INSN_ORI 0x00000200
++#define NIOS2_INSN_XORI 0x00000400
++
++
++
++/* Associates a register name ($6) with a 5-bit index (eg 6) */
++struct nios2_reg
++{
++ const char *name;
++ const int index;
++};
++
++
++/* -------------------------------------------------------------------------
++ Bitfield masks for New Jersey instructions
++ -------------------------------------------------------------------------*/
++
++/* These are bit masks and shift counts to use to access the various
++ fields of an instruction. */
++
++/* Macros for getting and setting an instruction field */
++#define GET_INSN_FIELD(X, i) ((i) & OP_MASK_##X) >> OP_SH_##X
++#define SET_INSN_FIELD(X, i, j) (i) = ((i) &~ (OP_MASK_##X)) | ((j) << OP_SH_##X)
++
++
++/*
++ We include the auto-generated file nios2-isa.h and define the mask
++ and shifts below in terms of those in nios2-isa.h. This ensures
++ that the binutils and hardware are always in sync
++*/
++
++#include "nios2-isa.h"
++
++#define OP_MASK_OP (IW_OP_MASK << IW_OP_LSB)
++#define OP_SH_OP IW_OP_LSB
++
++
++/* Masks and shifts for I-type instructions */
++
++#define OP_MASK_IOP (IW_OP_MASK << IW_OP_LSB)
++#define OP_SH_IOP IW_OP_LSB
++
++#define OP_MASK_IMM16 (IW_IMM16_MASK << IW_IMM16_LSB)
++#define OP_SH_IMM16 IW_IMM16_LSB
++
++#define OP_MASK_IRD (IW_B_MASK << IW_B_LSB) // the same as T for I-type
++#define OP_SH_IRD IW_B_LSB
++
++#define OP_MASK_IRT (IW_B_MASK << IW_B_LSB)
++#define OP_SH_IRT IW_B_LSB
++
++#define OP_MASK_IRS (IW_A_MASK << IW_A_LSB)
++#define OP_SH_IRS IW_A_LSB
++
++/* Masks and shifts for R-type instructions */
++
++#define OP_MASK_ROP (IW_OP_MASK << IW_OP_LSB)
++#define OP_SH_ROP IW_OP_LSB
++
++#define OP_MASK_ROPX (IW_OPX_MASK << IW_OPX_LSB)
++#define OP_SH_ROPX IW_OPX_LSB
++
++#define OP_MASK_RRD (IW_C_MASK << IW_C_LSB)
++#define OP_SH_RRD IW_C_LSB
++
++#define OP_MASK_RRT (IW_B_MASK << IW_B_LSB)
++#define OP_SH_RRT IW_B_LSB
++
++#define OP_MASK_RRS (IW_A_MASK << IW_A_LSB)
++#define OP_SH_RRS IW_A_LSB
++
++/* Masks and shifts for J-type instructions */
++
++#define OP_MASK_JOP (IW_OP_MASK << IW_OP_LSB)
++#define OP_SH_JOP IW_OP_LSB
++
++#define OP_MASK_IMM26 (IW_IMM26_MASK << IW_IMM26_LSB)
++#define OP_SH_IMM26 IW_IMM26_LSB
++
++/* Masks and shifts for CTL instructions */
++
++#define OP_MASK_RCTL 0x000007c0
++#define OP_SH_RCTL 6
++
++/* break instruction imm5 field */
++#define OP_MASK_TRAP_IMM5 0x000007c0
++#define OP_SH_TRAP_IMM5 6
++
++/* instruction imm5 field */
++#define OP_MASK_IMM5 (IW_SHIFT_IMM5_MASK << IW_SHIFT_IMM5_LSB)
++#define OP_SH_IMM5 IW_SHIFT_IMM5_LSB
++
++/* cache operation fields (type j,i(s)) */
++#define OP_MASK_CACHE_OPX (IW_B_MASK << IW_B_LSB)
++#define OP_SH_CACHE_OPX IW_B_LSB
++#define OP_MASK_CACHE_RRS (IW_A_MASK << IW_A_LSB)
++#define OP_SH_CACHE_RRS IW_A_LSB
++
++/* custom instruction masks */
++#define OP_MASK_CUSTOM_A 0x00010000
++#define OP_SH_CUSTOM_A 16
++
++#define OP_MASK_CUSTOM_B 0x00008000
++#define OP_SH_CUSTOM_B 15
++
++#define OP_MASK_CUSTOM_C 0x00004000
++#define OP_SH_CUSTOM_C 14
++
++#define OP_MASK_CUSTOM_N 0x00003fc0
++#define OP_SH_CUSTOM_N 6
++#define OP_MAX_CUSTOM_N 255
++
++/*
++ The following macros define the opcode matches for each
++ instruction
++ code & OP_MASK_INST == OP_MATCH_INST
++ */
++
++/* OP instruction matches */
++#define OP_MATCH_ADDI OP_ADDI
++#define OP_MATCH_ANDHI OP_ANDHI
++#define OP_MATCH_ANDI OP_ANDI
++#define OP_MATCH_BEQ OP_BEQ
++#define OP_MATCH_BGE OP_BGE
++#define OP_MATCH_BGEU OP_BGEU
++#define OP_MATCH_BLT OP_BLT
++#define OP_MATCH_BLTU OP_BLTU
++#define OP_MATCH_BNE OP_BNE
++#define OP_MATCH_BR OP_BR
++#define OP_MATCH_FLUSHD OP_FLUSHD
++#define OP_MATCH_INITD OP_INITD
++#define OP_MATCH_CALL OP_CALL
++#define OP_MATCH_CMPEQI OP_CMPEQI
++#define OP_MATCH_CMPGEI OP_CMPGEI
++#define OP_MATCH_CMPGEUI OP_CMPGEUI
++#define OP_MATCH_CMPLTI OP_CMPLTI
++#define OP_MATCH_CMPLTUI OP_CMPLTUI
++#define OP_MATCH_CMPNEI OP_CMPNEI
++#define OP_MATCH_LDB OP_LDB
++#define OP_MATCH_LDBIO OP_LDBIO
++#define OP_MATCH_LDBU OP_LDBU
++#define OP_MATCH_LDBUIO OP_LDBUIO
++#define OP_MATCH_LDH OP_LDH
++#define OP_MATCH_LDHIO OP_LDHIO
++#define OP_MATCH_LDHU OP_LDHU
++#define OP_MATCH_LDHUIO OP_LDHUIO
++#define OP_MATCH_LDW OP_LDW
++#define OP_MATCH_LDWIO OP_LDWIO
++#define OP_MATCH_MULI OP_MULI
++#define OP_MATCH_OPX OP_OPX
++#define OP_MATCH_ORHI OP_ORHI
++#define OP_MATCH_ORI OP_ORI
++#define OP_MATCH_STB OP_STB
++#define OP_MATCH_STBIO OP_STBIO
++#define OP_MATCH_STH OP_STH
++#define OP_MATCH_STHIO OP_STHIO
++#define OP_MATCH_STW OP_STW
++#define OP_MATCH_STWIO OP_STWIO
++#define OP_MATCH_CUSTOM OP_CUSTOM
++#define OP_MATCH_XORHI OP_XORHI
++#define OP_MATCH_XORI OP_XORI
++#define OP_MATCH_OPX OP_OPX
++
++/* OPX instruction values */
++#define OP_MATCH_ADD ((OPX_ADD << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_AND ((OPX_AND << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_BREAK ((0x1e << 17) | (OPX_BREAK << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_BRET ((0xf0000000) | (OPX_BRET << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CALLR ((0x1f << 17) | (OPX_CALLR << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CMPEQ ((OPX_CMPEQ << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CMPGE ((OPX_CMPGE << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CMPGEU ((OPX_CMPGEU << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CMPLT ((OPX_CMPLT << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CMPLTU ((OPX_CMPLTU << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_CMPNE ((OPX_CMPNE << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_DIV ((OPX_DIV << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_DIVU ((OPX_DIVU << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_JMP ((OPX_JMP << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_MUL ((OPX_MUL << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_MULXSS ((OPX_MULXSS << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_MULXSU ((OPX_MULXSU << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_MULXUU ((OPX_MULXUU << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_NEXTPC ((OPX_NEXTPC << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_NOR ((OPX_NOR << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_OR ((OPX_OR << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_RDCTL ((OPX_RDCTL << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_RET ((0xf8000000) | (OPX_RET << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_ROL ((OPX_ROL << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_ROLI ((OPX_ROLI << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_ROR ((OPX_ROR << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SLL ((OPX_SLL << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SLLI ((OPX_SLLI << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SRA ((OPX_SRA << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SRAI ((OPX_SRAI << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SRL ((OPX_SRL << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SRLI ((OPX_SRLI << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SUB ((OPX_SUB << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_SYNC ((OPX_SYNC << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_TRAP ((0x1d << 17) | (OPX_TRAP << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_ERET ((0xe8000000) | (OPX_ERET << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_WRCTL ((OPX_WRCTL << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_XOR ((OPX_XOR << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_FLUSHI ((OPX_FLUSHI << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_FLUSHP ((OPX_FLUSHP << IW_OPX_LSB) | (OP_OPX))
++#define OP_MATCH_INITI ((OPX_INITI << IW_OPX_LSB) | (OP_OPX))
++
++/*
++ Some unusual op masks
++*/
++#define OP_MASK_BREAK ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP) & 0xfffff03f)
++#define OP_MASK_CALLR ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_JMP ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_SYNC ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_TRAP ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP) & 0xfffff83f)
++#define OP_MASK_WRCTL ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP)) /*& 0xfffff83f */
++#define OP_MASK_NEXTPC ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_FLUSHI ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_INITI ((OP_MASK_RRT | OP_MASK_RRD | OP_MASK_ROPX | OP_MASK_OP))
++
++#define OP_MASK_ROLI ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_SLLI ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_SRAI ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_SRLI ((OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP))
++#define OP_MASK_RDCTL ((OP_MASK_RRS | OP_MASK_RRT | OP_MASK_ROPX | OP_MASK_OP)) /*& 0xfffff83f */
++
++#ifndef OP_MASK
++#define OP_MASK 0xffffffff
++#endif
++
++/* These are the data structures we use to hold the instruction information */
++
++extern const struct nios2_opcode nios2_builtin_opcodes[];
++extern const int bfd_nios2_num_builtin_opcodes;
++extern struct nios2_opcode *nios2_opcodes;
++extern int bfd_nios2_num_opcodes;
++
++/* These are the data structures used to hold the operand parsing information */
++//extern const struct nios2_arg_parser nios2_arg_parsers[];
++//extern struct nios2_arg_parser* nios2_arg_parsers;
++//extern const int nios2_num_builtin_arg_parsers;
++//extern int nios2_num_arg_parsers;
++
++/* These are the data structures used to hold the register information */
++extern const struct nios2_reg nios2_builtin_regs[];
++extern struct nios2_reg *nios2_regs;
++extern const int nios2_num_builtin_regs;
++extern int nios2_num_regs;
++
++/* Machine-independent macro for number of opcodes */
++
++#define NUMOPCODES bfd_nios2_num_opcodes
++#define NUMREGISTERS nios2_num_regs;
++
++/* these are used in disassembly to get the correct register names */
++#define NUMREGNAMES 32
++#define NUMCTLREGNAMES 32
++#define CTLREGBASE 42
++#define COPROCREGBASE 83
++#define NUMCOPROCREGNAMES 32
++
++
++/* this is made extern so that the assembler can use it to find out
++ what instruction caused an error */
++extern const struct nios2_opcode *nios2_find_opcode_hash (unsigned long);
++
++/* overflow message strings used in the assembler */
++extern char *overflow_msgs[];
++
++#endif // _NIOS2_H
+--- binutils-2.15/include/opcode/s-nios2-isa 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/include/opcode/s-nios2-isa 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1 @@
++timestamp
+--- binutils-2.15/ld/Makefile.am 2004-05-17 21:36:15.000000000 +0200
++++ binutils-2.15-nios2/ld/Makefile.am 2005-05-17 12:20:14.000000000 +0200
+@@ -1440,6 +1440,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf3
+ $(srcdir)/emulparams/elf32frv.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
++enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} nios2elf "$(tdir_nios2)"
+
+ # We need this for automake to use YLWRAP.
+ EXTRA_ld_new_SOURCES = deffilep.y
+--- binutils-2.15/ld/Makefile.in 2004-05-17 21:36:15.000000000 +0200
++++ binutils-2.15-nios2/ld/Makefile.in 2005-05-17 12:20:14.000000000 +0200
+@@ -2166,6 +2166,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf3
+ $(srcdir)/emulparams/elf32frv.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
++enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} nios2elf "$(tdir_nios2)"
+
+ # The generated emulation files mostly have the same dependencies.
+ $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
+--- binutils-2.15/ld/configure.tgt 2004-05-17 21:36:15.000000000 +0200
++++ binutils-2.15-nios2/ld/configure.tgt 2005-05-17 12:20:14.000000000 +0200
+@@ -450,6 +450,7 @@ mn10200-*-*) targ_emul=mn10200 ;;
+ mn10300-*-*) targ_emul=mn10300 ;;
+ msp430-*-*) targ_emul=msp430x110
+ targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449" ;;
++nios2-*-*|nios2-*-*) targ_emul=nios2elf ;;
+ alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+ targ_emul=elf64alpha_fbsd
+ targ_extra_emuls="elf64alpha alpha"
+--- binutils-2.15/ld/emulparams/nios2elf.sh 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/ld/emulparams/nios2elf.sh 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,15 @@
++SCRIPT_NAME=elf
++OUTPUT_FORMAT="elf32-littlenios2"
++TEXT_START_ADDR=0x0
++OTHER_GOT_SYMBOLS='
++ _gp = ALIGN(16) + 0x7ff0;
++ PROVIDE(gp = _gp);
++'
++ARCH=nios2
++MACHINE=
++MAXPAGESIZE=256
++ENTRY=_start
++EMBEDDED=yes
++DATA_ADDR=.
++NOP=0x0001883a
++
+--- binutils-2.15/ld/ldmain.c 2004-05-17 21:36:16.000000000 +0200
++++ binutils-2.15-nios2/ld/ldmain.c 2005-05-17 12:20:14.000000000 +0200
+@@ -397,6 +397,14 @@ main (int argc, char **argv)
+ yyparse ();
+ lex_string = NULL;
+ }
++/* NG horrible hack, but it works and I haven't the time to do this properly */
++#ifdef bfd_set_link_info
++ bfd_set_link_info(&link_info);
++#endif
++#ifdef bfd_set_force_make_executable
++ bfd_set_force_make_executable(force_make_executable);
++#endif
++
+
+ if (trace_file_tries)
+ {
+--- binutils-2.15/ld/nios2_ld_xfail.lst 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/ld/nios2_ld_xfail.lst 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,3 @@
++
++
++
+--- binutils-2.15/ld/testsuite/ld-elf/merge.d 2003-05-07 07:08:02.000000000 +0200
++++ binutils-2.15-nios2/ld/testsuite/ld-elf/merge.d 2005-05-17 12:20:14.000000000 +0200
+@@ -5,6 +5,7 @@
+ #xfail: "hppa*-*-*" "h8300-*-*" "i960-*-*" "ip2k-*-*" "m32r-*-*" "mcore-*-*"
+ #xfail: "mn10*-*-*" "mips64*-*-linux*" "openrisc-*-*" "pj-*-*" "sparc*-*-*"
+ #xfail: "xtensa-*-*"
++#xfail: "nios2-*-*"
+
+ .*: file format .*elf.*
+
+--- binutils-2.15/ld/testsuite/ld-elfcomm/elfcomm.exp 2003-06-18 05:38:05.000000000 +0200
++++ binutils-2.15-nios2/ld/testsuite/ld-elfcomm/elfcomm.exp 2005-05-17 12:20:14.000000000 +0200
+@@ -56,6 +56,10 @@ proc dump_common1 { testname } {
+ return 1
+ }
+
++if [istarget nios2-*-*] {
++ set CFLAGS "$CFLAGS -G0"
++}
++
+ if { ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
+ || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
+ unresolved $test1
+--- binutils-2.15/ld/testsuite/ld-scripts/cross2.t 2001-08-27 12:49:55.000000000 +0200
++++ binutils-2.15-nios2/ld/testsuite/ld-scripts/cross2.t 2005-05-17 12:20:14.000000000 +0200
+@@ -2,5 +2,9 @@ NOCROSSREFS ( .text .data )
+ SECTIONS
+ {
+ .text : { *(.text) *(.text.*) *(.pr) }
+- .data : { *(.data) *(.data.*) *(.sdata) *(.rw) *(.tc0) *(.tc) *(.toc) }
++ .data :
++ { *(.data) *(.data.*)
++ _gp = ABSOLUTE(. + 0x7ff0);
++ *(.sdata) *(.rw) *(.tc0) *(.tc) *(.toc)
++ }
+ }
+--- binutils-2.15/opcodes/Makefile.am 2004-01-07 19:39:40.000000000 +0100
++++ binutils-2.15-nios2/opcodes/Makefile.am 2005-05-17 12:20:14.000000000 +0200
+@@ -125,6 +125,8 @@ CFILES = \
+ mmix-dis.c \
+ mmix-opc.c \
+ ns32k-dis.c \
++ nios2-opc.c \
++ nios2-dis.c \
+ openrisc-asm.c \
+ openrisc-desc.c \
+ openrisc-dis.c \
+@@ -237,6 +239,8 @@ ALL_MACHINES = \
+ mmix-opc.lo \
+ msp430-dis.lo \
+ ns32k-dis.lo \
++ nios2-opc.lo \
++ nios2-dis.lo \
+ openrisc-asm.lo \
+ openrisc-desc.lo \
+ openrisc-dis.lo \
+@@ -739,6 +743,13 @@ mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode
+ ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/opcode/ns32k.h opintl.h
++nios2-opc.lo: nios2-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/opcode/nios2.h
++nios2-dis.lo: nios2-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/nios2.h \
++ opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
++ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
++ $(INCDIR)/elf/nios2.h $(INCDIR)/elf/reloc-macros.h
+ openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+--- binutils-2.15/opcodes/Makefile.in 2004-01-07 19:39:40.000000000 +0100
++++ binutils-2.15-nios2/opcodes/Makefile.in 2005-05-17 12:20:14.000000000 +0200
+@@ -236,6 +236,8 @@ CFILES = \
+ mmix-dis.c \
+ mmix-opc.c \
+ ns32k-dis.c \
++ nios2-opc.c \
++ nios2-dis.c \
+ openrisc-asm.c \
+ openrisc-desc.c \
+ openrisc-dis.c \
+@@ -348,6 +350,8 @@ ALL_MACHINES = \
+ mmix-dis.lo \
+ mmix-opc.lo \
+ msp430-dis.lo \
++ nios2-opc.lo \
++ nios2-dis.lo \
+ ns32k-dis.lo \
+ openrisc-asm.lo \
+ openrisc-desc.lo \
+@@ -1232,6 +1236,13 @@ mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ opintl.h
+ mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
++nios2-opc.lo: nios2-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/opcode/nios2.h
++nios2-dis.lo: nios2-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
++ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/nios2.h \
++ opintl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
++ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
++ $(INCDIR)/elf/nios2.h $(INCDIR)/elf/reloc-macros.h
+ ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/opcode/ns32k.h opintl.h
+--- binutils-2.15/opcodes/configure 2003-08-05 11:39:31.000000000 +0200
++++ binutils-2.15-nios2/opcodes/configure 2005-05-17 12:20:14.000000000 +0200
+@@ -4661,6 +4661,7 @@ if test x${all_targets} = xfalse ; then
+ bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
+ bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
+ bfd_msp430_arch) ta="$ta msp430-dis.lo" ;;
++ bfd_nios2_arch) ta="$ta nios2-dis.lo nios2-opc.lo" ;;
+ bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
+ bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
+ bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
+--- binutils-2.15/opcodes/configure.in 2003-08-05 11:39:31.000000000 +0200
++++ binutils-2.15-nios2/opcodes/configure.in 2005-05-17 12:20:14.000000000 +0200
+@@ -202,6 +202,7 @@ if test x${all_targets} = xfalse ; then
+ bfd_mn10200_arch) ta="$ta m10200-dis.lo m10200-opc.lo" ;;
+ bfd_mn10300_arch) ta="$ta m10300-dis.lo m10300-opc.lo" ;;
+ bfd_msp430_arch) ta="$ta msp430-dis.lo" ;;
++ bfd_nios2_arch) ta="$ta nios2-dis.lo nios2-opc.lo" ;;
+ bfd_ns32k_arch) ta="$ta ns32k-dis.lo" ;;
+ bfd_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
+ bfd_or32_arch) ta="$ta or32-dis.lo or32-opc.lo" using_cgen=yes ;;
+--- binutils-2.15/opcodes/disassemble.c 2003-11-14 16:12:44.000000000 +0100
++++ binutils-2.15-nios2/opcodes/disassemble.c 2005-05-17 12:20:14.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* Select disassembly routine for specified architecture.
+- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
++ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+@@ -72,6 +72,7 @@ Foundation, Inc., 59 Temple Place - Suit
+ #define ARCH_z8k
+ #define ARCH_frv
+ #define ARCH_iq2000
++#define ARCH_nios2
+ #define INCLUDE_SHMEDIA
+ #endif
+
+@@ -375,6 +376,11 @@ disassembler (abfd)
+ disassemble = print_insn_iq2000;
+ break;
+ #endif
++#ifdef ARCH_nios2
++ case bfd_arch_nios2:
++ disassemble = print_insn_nios2;
++ break;
++#endif
+ default:
+ return 0;
+ }
+--- binutils-2.15/opcodes/nios2-dis.c 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/opcodes/nios2-dis.c 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,445 @@
++/* nios2-dis.c -- Altera New Jersey disassemble routines.
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++This file is part of GDB, GAS, and the GNU binutils.
++
++GDB, GAS, and the GNU binutils are free software; you can redistribute
++them and/or modify them under the terms of the GNU General Public
++License as published by the Free Software Foundation; either version
++1, or (at your option) any later version.
++
++GDB, GAS, and the GNU binutils are distributed in the hope that they
++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 file; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#include <stdlib.h>
++#include <assert.h>
++#include <string.h>
++#include "dis-asm.h"
++#include "opcode/nios2.h"
++
++/* No symbol table is available when this code runs out in an embedded
++ system as when it is used for disassembler support in a monitor. */
++
++#if !defined(EMBEDDED_ENV)
++#define SYMTAB_AVAILABLE 1
++#include "elf-bfd.h"
++#include "elf/nios2.h"
++#endif
++
++/* length of New Jersey instruction in bytes */
++#define INSNLEN 4
++
++/* helper function prototypes */
++static int nios2_disassemble (bfd_vma, unsigned long, disassemble_info *);
++static void nios2_init_opcode_hash (void);
++
++
++static int nios2_print_insn_arg (const char *argptr, unsigned long opcode,
++ bfd_vma address, disassemble_info * info);
++
++
++/* print_insn_nios2 is the main disassemble function for New Jersey.
++ The function diassembler(abfd) (source in disassemble.c)
++ returns a pointer to this function when the bfd machine type is
++ New Jersey. print_insn_nios2 reads the instruction word at the
++ address given, and prints the disassembled instruction on the
++ stream info->stream using info->fprintf_func. */
++
++int
++print_insn_nios2 (bfd_vma address, disassemble_info * info)
++{
++ /* buffer into which the instruction bytes are written */
++ bfd_byte buffer[INSNLEN];
++ /* used to indicate return status from function calls */
++ int status;
++
++ assert (info != NULL);
++
++ status = (*info->read_memory_func) (address, buffer, INSNLEN, info);
++ if (status == 0)
++ {
++ status =
++ nios2_disassemble (address, (unsigned long) bfd_getl32 (buffer),
++ info);
++ }
++ else
++ {
++ (*info->memory_error_func) (status, address, info);
++ status = -1;
++ }
++ return status;
++}
++
++/* Data structures used by the opcode hash table */
++
++typedef struct _nios2_opcode_hash
++{
++ const struct nios2_opcode *opcode;
++ struct _nios2_opcode_hash *next;
++} nios2_opcode_hash;
++
++static bfd_boolean nios2_hash_init = 0;
++static nios2_opcode_hash *nios2_hash[(OP_MASK_OP) + 1];
++
++/* separate hash table for pseudo-ops */
++static nios2_opcode_hash *nios2_ps_hash[(OP_MASK_OP) + 1];
++
++/* Function to initialize the opcode hash table */
++
++void
++nios2_init_opcode_hash ()
++{
++ unsigned int i;
++ register const struct nios2_opcode *op;
++ nios2_opcode_hash *tmp_hash;
++
++ for (i = 0; i <= OP_MASK_OP; ++i)
++ {
++ nios2_hash[0] = NULL;
++ }
++ for (i = 0; i <= OP_MASK_OP; i++)
++ {
++ for (op = nios2_opcodes; op < &nios2_opcodes[NUMOPCODES]; op++)
++ {
++ if ((op->pinfo & NIOS2_INSN_MACRO) == NIOS2_INSN_MACRO)
++ {
++ if (i == ((op->match >> OP_SH_OP) & OP_MASK_OP) &&
++ (op->
++ pinfo & (NIOS2_INSN_MACRO_MOV | NIOS2_INSN_MACRO_MOVI) &
++ 0x7fffffff) != 0)
++ {
++ tmp_hash = nios2_ps_hash[i];
++ if (tmp_hash == NULL)
++ {
++ tmp_hash =
++ (nios2_opcode_hash *)
++ malloc (sizeof (nios2_opcode_hash));
++ nios2_ps_hash[i] = tmp_hash;
++ }
++ else
++ {
++ while (tmp_hash->next != NULL)
++ tmp_hash = tmp_hash->next;
++ tmp_hash->next =
++ (nios2_opcode_hash *)
++ malloc (sizeof (nios2_opcode_hash));
++ tmp_hash = tmp_hash->next;
++ }
++ if (tmp_hash == NULL)
++ {
++ fprintf (stderr,
++ "error allocating memory...broken disassembler\n");
++ abort ();
++ }
++ tmp_hash->opcode = op;
++ tmp_hash->next = NULL;
++ }
++ }
++ else if (i == ((op->match >> OP_SH_OP) & OP_MASK_OP))
++ {
++ tmp_hash = nios2_hash[i];
++ if (tmp_hash == NULL)
++ {
++ tmp_hash =
++ (nios2_opcode_hash *) malloc (sizeof (nios2_opcode_hash));
++ nios2_hash[i] = tmp_hash;
++ }
++ else
++ {
++ while (tmp_hash->next != NULL)
++ tmp_hash = tmp_hash->next;
++ tmp_hash->next =
++ (nios2_opcode_hash *) malloc (sizeof (nios2_opcode_hash));
++ tmp_hash = tmp_hash->next;
++ }
++ if (tmp_hash == NULL)
++ {
++ fprintf (stderr,
++ "error allocating memory...broken disassembler\n");
++ abort ();
++ }
++ tmp_hash->opcode = op;
++ tmp_hash->next = NULL;
++ }
++ }
++ }
++ nios2_hash_init = 1;
++#ifdef DEBUG_HASHTABLE
++ for (i = 0; i <= OP_MASK_OP; ++i)
++ {
++ printf ("index: 0x%02X ops: ", i);
++ tmp_hash = nios2_hash[i];
++ if (tmp_hash != NULL)
++ {
++ while (tmp_hash != NULL)
++ {
++ printf ("%s ", tmp_hash->opcode->name);
++ tmp_hash = tmp_hash->next;
++ }
++ }
++ printf ("\n");
++ }
++
++ for (i = 0; i <= OP_MASK_OP; ++i)
++ {
++ printf ("index: 0x%02X ops: ", i);
++ tmp_hash = nios2_ps_hash[i];
++ if (tmp_hash != NULL)
++ {
++ while (tmp_hash != NULL)
++ {
++ printf ("%s ", tmp_hash->opcode->name);
++ tmp_hash = tmp_hash->next;
++ }
++ }
++ printf ("\n");
++ }
++#endif
++}
++
++/* Function which returns a pointer to an nios2_opcode struct for
++ a given instruction opcode, or NULL if there is an error */
++
++const struct nios2_opcode *
++nios2_find_opcode_hash (unsigned long opcode)
++{
++ nios2_opcode_hash *entry;
++
++ /* Build a hash table to shorten the search time. */
++ if (!nios2_hash_init)
++ {
++ nios2_init_opcode_hash ();
++ }
++
++ /* first look in the pseudo-op hashtable */
++ entry = nios2_ps_hash[(opcode >> OP_SH_OP) & OP_MASK_OP];
++
++ /* look for a match and if we get one, this is the instruction we decode */
++ while (entry != NULL)
++ {
++ if ((entry->opcode->match) == (opcode & entry->opcode->mask))
++ return entry->opcode;
++ else
++ entry = entry->next;
++ }
++
++ /* if we haven't yet returned, then we need to look in the main
++ hashtable */
++ entry = nios2_hash[(opcode >> OP_SH_OP) & OP_MASK_OP];
++
++ if (entry == NULL)
++ return NULL;
++
++
++ while (entry != NULL)
++ {
++ if ((entry->opcode->match) == (opcode & entry->opcode->mask))
++ return entry->opcode;
++ else
++ entry = entry->next;
++ }
++
++ return NULL;
++}
++
++/* nios2_disassemble does all the work of disassembling a New Jersey
++ instruction opcode */
++
++int
++nios2_disassemble (bfd_vma address, unsigned long opcode,
++ disassemble_info * info)
++{
++ const struct nios2_opcode *op;
++ const char *argstr;
++
++ info->bytes_per_line = INSNLEN;
++ info->bytes_per_chunk = INSNLEN;
++ info->display_endian = info->endian;
++ info->insn_info_valid = 1;
++ info->branch_delay_insns = 0;
++ info->data_size = 0;
++ info->insn_type = dis_nonbranch;
++ info->target = 0;
++ info->target2 = 0;
++
++ /* Find the major opcode and use this to disassemble
++ the instruction and its arguments */
++ op = nios2_find_opcode_hash (opcode);
++
++ if (op != NULL)
++ {
++ bfd_boolean is_nop = FALSE;
++ if (op->pinfo == NIOS2_INSN_MACRO_MOV)
++ {
++ /* check for mov r0, r0 and if it is
++ change to nop */
++ int dst, src;
++ dst = GET_INSN_FIELD (RRD, opcode);
++ src = GET_INSN_FIELD (RRS, opcode);
++ if (dst == 0 && src == 0)
++ {
++ (*info->fprintf_func) (info->stream, "nop");
++ is_nop = TRUE;
++ }
++ else
++ {
++ (*info->fprintf_func) (info->stream, "%s", op->name);
++ }
++ }
++ else
++ {
++ (*info->fprintf_func) (info->stream, "%s", op->name);
++ }
++
++ if (!is_nop)
++ {
++ argstr = op->args;
++ if (argstr != NULL && *argstr != '\0')
++ {
++ (*info->fprintf_func) (info->stream, "\t");
++ while (*argstr != '\0')
++ {
++ nios2_print_insn_arg (argstr, opcode, address, info);
++ ++argstr;
++ }
++ }
++ }
++ }
++ else
++ {
++ /* Handle undefined instructions. */
++ info->insn_type = dis_noninsn;
++ (*info->fprintf_func) (info->stream, "0x%x", opcode);
++ }
++ // this tells the caller how far to advance the program counter
++ return INSNLEN;
++}
++
++/* The function nios2_print_insn_arg uses the character pointed
++ to by argptr to determine how it print the next token or separator
++ character in the arguments to an instruction */
++int
++nios2_print_insn_arg (const char *argptr,
++ unsigned long opcode, bfd_vma address,
++ disassemble_info * info)
++{
++ unsigned long i = 0;
++ unsigned long reg_base;
++
++ assert (argptr != NULL);
++ assert (info != NULL);
++
++ switch (*argptr)
++ {
++ case ',':
++ case '(':
++ case ')':
++ (*info->fprintf_func) (info->stream, "%c", *argptr);
++ break;
++ case 'd':
++ i = GET_INSN_FIELD (RRD, opcode);
++
++ if (GET_INSN_FIELD (OP, opcode) == OP_MATCH_CUSTOM
++ && GET_INSN_FIELD (CUSTOM_C, opcode) == 0)
++ reg_base = COPROCREGBASE;
++ else
++ reg_base = 0;
++
++ if (i < NUMREGNAMES)
++ (*info->fprintf_func) (info->stream, "%s",
++ nios2_regs[i + reg_base].name);
++ else
++ (*info->fprintf_func) (info->stream, "unknown");
++ break;
++ case 's':
++ i = GET_INSN_FIELD (RRS, opcode);
++
++ if (GET_INSN_FIELD (OP, opcode) == OP_MATCH_CUSTOM
++ && GET_INSN_FIELD (CUSTOM_A, opcode) == 0)
++ reg_base = COPROCREGBASE;
++ else
++ reg_base = 0;
++
++ if (i < NUMREGNAMES)
++ (*info->fprintf_func) (info->stream, "%s",
++ nios2_regs[i + reg_base].name);
++ else
++ (*info->fprintf_func) (info->stream, "unknown");
++ break;
++ case 't':
++ i = GET_INSN_FIELD (RRT, opcode);
++
++ if (GET_INSN_FIELD (OP, opcode) == OP_MATCH_CUSTOM
++ && GET_INSN_FIELD (CUSTOM_B, opcode) == 0)
++ reg_base = COPROCREGBASE;
++ else
++ reg_base = 0;
++
++ if (i < NUMREGNAMES)
++ (*info->fprintf_func) (info->stream, "%s",
++ nios2_regs[i + reg_base].name);
++ else
++ (*info->fprintf_func) (info->stream, "unknown");
++ break;
++ case 'i':
++ /* 16-bit signed immediate */
++ i = (signed) (GET_INSN_FIELD (IMM16, opcode) << 16) >> 16;
++ (*info->fprintf_func) (info->stream, "%d", i);
++ break;
++ case 'u':
++ /* 16-bit unsigned immediate */
++ i = GET_INSN_FIELD (IMM16, opcode);
++ (*info->fprintf_func) (info->stream, "%d", i);
++ break;
++ case 'o':
++ /* 16-bit signed immediate address offset */
++ i = (signed) (GET_INSN_FIELD (IMM16, opcode) << 16) >> 16;
++ address = address + 4 + i; /* NG changed to byte offset 1/9/03 */
++ (*info->print_address_func) (address, info);
++ break;
++ case 'p':
++ /* 5-bit unsigned immediate */
++ i = GET_INSN_FIELD (CACHE_OPX, opcode);
++ (*info->fprintf_func) (info->stream, "%d", i);
++ break;
++ case 'j':
++ /* 5-bit unsigned immediate */
++ i = GET_INSN_FIELD (IMM5, opcode);
++ (*info->fprintf_func) (info->stream, "%d", i);
++ break;
++ case 'l':
++ /* 8-bit unsigned immediate */
++ /* FIXME - not yet implemented */
++ i = GET_INSN_FIELD (CUSTOM_N, opcode);
++ (*info->fprintf_func) (info->stream, "%u", i);
++ break;
++ case 'm':
++ /* 26-bit unsigned immediate */
++ i = GET_INSN_FIELD (IMM26, opcode);
++ /* this translates to an address because its only used in call instructions */
++ address = (address & 0xf0000000) | (i << 2);
++ (*info->print_address_func) (address, info);
++ break;
++ case 'c':
++ i = GET_INSN_FIELD (IMM5, opcode); /* ctrl register index */
++ (*info->fprintf_func) (info->stream, "%s",
++ nios2_regs[CTLREGBASE + i].name);
++ break;
++ case 'b':
++ i = GET_INSN_FIELD (IMM5, opcode);
++ (*info->fprintf_func) (info->stream, "%d", i);
++ break;
++ default:
++ (*info->fprintf_func) (info->stream, "unknown");
++ break;
++ }
++ return 0;
++}
+--- binutils-2.15/opcodes/nios2-opc.c 1970-01-01 01:00:00.000000000 +0100
++++ binutils-2.15-nios2/opcodes/nios2-opc.c 2005-05-17 12:20:14.000000000 +0200
+@@ -0,0 +1,315 @@
++/* nios2-opc.c -- Altera New Jersey opcode list.
++
++ Copyright (C) 2003
++ by Nigel Gray (ngray@altera.com).
++
++This file is part of GDB, GAS, and the GNU binutils.
++
++GDB, GAS, and the GNU binutils are free software; you can redistribute
++them and/or modify them under the terms of the GNU General Public
++License as published by the Free Software Foundation; either version
++1, or (at your option) any later version.
++
++GDB, GAS, and the GNU binutils are distributed in the hope that they
++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 file; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
++
++#include <stdio.h>
++#include "opcode/nios2.h"
++
++/* Register string table */
++
++const struct nios2_reg nios2_builtin_regs[] = {
++ {"zero", 0},
++ {"at", 1}, // assembler temporary
++ {"r2", 2},
++ {"r3", 3},
++ {"r4", 4},
++ {"r5", 5},
++ {"r6", 6},
++ {"r7", 7},
++ {"r8", 8},
++ {"r9", 9},
++ {"r10", 10},
++ {"r11", 11},
++ {"r12", 12},
++ {"r13", 13},
++ {"r14", 14},
++ {"r15", 15},
++ {"r16", 16},
++ {"r17", 17},
++ {"r18", 18},
++ {"r19", 19},
++ {"r20", 20},
++ {"r21", 21},
++ {"r22", 22},
++ {"r23", 23},
++ {"et", 24},
++ {"bt", 25},
++ {"gp", 26}, /* global pointer */
++ {"sp", 27}, /* stack pointer */
++ {"fp", 28}, /* frame pointer */
++ {"ea", 29}, /* exception return address */
++ {"ba", 30}, /* breakpoint return address */
++ {"ra", 31}, /* return address */
++
++ /* alternative names for special registers */
++ {"r0", 0},
++ {"r1", 1},
++ {"r24", 24},
++ {"r25", 25},
++ {"r26", 26},
++ {"r27", 27},
++ {"r28", 28},
++ {"r29", 29},
++ {"r30", 30},
++ {"r31", 31},
++
++ /* control register names */
++ {"status", 0},
++ {"estatus", 1},
++ {"bstatus", 2},
++ {"ienable", 3},
++ {"ipending", 4},
++ {"cpuid", 5},
++ {"ctl6", 6},
++ {"ctl7", 7},
++ {"pteaddr", 8},
++ {"tlbacc", 9},
++ {"tlbmisc", 10},
++ {"ctl11", 11},
++ {"ctl12", 12},
++ {"ctl13", 13},
++ {"ctl14", 14},
++ {"ctl15", 15},
++ {"ctl16", 16},
++ {"ctl17", 17},
++ {"ctl18", 18},
++ {"ctl19", 19},
++ {"ctl20", 20},
++ {"ctl21", 21},
++ {"ctl22", 22},
++ {"ctl23", 23},
++ {"ctl24", 24},
++ {"ctl25", 25},
++ {"ctl26", 26},
++ {"ctl27", 27},
++ {"ctl28", 28},
++ {"ctl29", 29},
++ {"ctl30", 30},
++ {"ctl31", 31},
++ {"ctl0", 0},
++ {"ctl1", 1},
++ {"ctl2", 2},
++ {"ctl3", 3},
++ {"ctl4", 4},
++ {"ctl5", 5},
++ {"ctl8", 8},
++ {"ctl9", 9},
++ {"ctl10", 10},
++
++ /* coprocessor register names */
++ {"c0", 0},
++ {"c1", 1},
++ {"c2", 2},
++ {"c3", 3},
++ {"c4", 4},
++ {"c5", 5},
++ {"c6", 6},
++ {"c7", 7},
++ {"c8", 8},
++ {"c9", 9},
++ {"c10", 10},
++ {"c11", 11},
++ {"c12", 12},
++ {"c13", 13},
++ {"c14", 14},
++ {"c15", 15},
++ {"c16", 16},
++ {"c17", 17},
++ {"c18", 18},
++ {"c19", 19},
++ {"c20", 20},
++ {"c21", 21},
++ {"c22", 22},
++ {"c23", 23},
++ {"c24", 24},
++ {"c25", 25},
++ {"c26", 26},
++ {"c27", 27},
++ {"c28", 28},
++ {"c29", 29},
++ {"c30", 30},
++ {"c31", 31},
++};
++
++#define NIOS2_NUM_REGS \
++ ((sizeof nios2_builtin_regs) / (sizeof (nios2_builtin_regs[0])))
++const int nios2_num_builtin_regs = NIOS2_NUM_REGS;
++
++/* const removed from the following to allow for dynamic extensions to the
++ * built-in instruction set. */
++struct nios2_reg *nios2_regs = (struct nios2_reg *) nios2_builtin_regs;
++int nios2_num_regs = NIOS2_NUM_REGS;
++#undef NIOS2_NUM_REGS
++
++/* overflow message string templates */
++
++char *overflow_msgs[] = {
++ "call target address 0x%08x out of range 0x%08x to 0x%08x",
++ "branch offset %d out of range %d to %d",
++ "%s offset %d out of range %d to %d",
++ "immediate value %d out of range %d to %d",
++ "immediate value %u out of range %u to %u",
++ "immediate value %u out of range %u to %u",
++ "custom instruction opcode %u out of range %u to %u",
++};
++
++
++
++/*--------------------------------------------------------------------------------
++ This is the opcode table used by the New Jersey GNU as, disassembler and GDB
++ --------------------------------------------------------------------------------*/
++
++/*
++ The following letters can appear in the args field of the nios2_opcode
++ structure:
++
++ c - a 5-bit control register index or break opcode
++ d - a 5-bit destination register index
++ s - a 5-bit left source register index
++ t - a 5-bit right source register index
++ i - a 16-bit signed immediate
++ u - a 16-bit unsigned immediate
++
++ j - a 5-bit unsigned immediate
++ k - a 6-bit unsigned immediate
++ l - an 8-bit unsigned immediate
++ m - a 26-bit unsigned immediate
++*/
++
++/* *INDENT-OFF* */
++/* FIXME: Re-format for GNU standards */
++const struct nios2_opcode nios2_builtin_opcodes[] =
++{
++ /* name, args, args_test num_args, match, mask, pinfo */
++ {"add", "d,s,t", "d,s,t,E", 3, OP_MATCH_ADD, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"addi", "t,s,i", "t,s,i,E", 3, OP_MATCH_ADDI, OP_MASK_IOP, NIOS2_INSN_ADDI, signed_immed16_overflow },
++ {"subi", "t,s,i", "t,s,i,E", 3, OP_MATCH_ADDI, OP_MASK_IOP, NIOS2_INSN_MACRO, signed_immed16_overflow },
++ {"and", "d,s,t", "d,s,t,E", 3, OP_MATCH_AND, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"andhi", "t,s,u", "t,s,u,E", 3, OP_MATCH_ANDHI, OP_MASK_IOP, 0, unsigned_immed16_overflow },
++ {"andi", "t,s,u", "t,s,u,E", 3, OP_MATCH_ANDI, OP_MASK_IOP, NIOS2_INSN_ANDI, unsigned_immed16_overflow },
++ {"beq", "s,t,o", "s,t,o,E", 3, OP_MATCH_BEQ, OP_MASK_IOP, NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bge", "s,t,o", "s,t,o,E", 3, OP_MATCH_BGE, OP_MASK_IOP, NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bgeu", "s,t,o", "s,t,o,E", 3, OP_MATCH_BGEU, OP_MASK_IOP, NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bgt", "s,t,o", "s,t,o,E", 3, OP_MATCH_BLT, OP_MASK_IOP, NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bgtu", "s,t,o", "s,t,o,E", 3, OP_MATCH_BLTU, OP_MASK_IOP, NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"ble", "s,t,o", "s,t,o,E", 3, OP_MATCH_BGE, OP_MASK_IOP, NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bleu", "s,t,o", "s,t,o,E", 3, OP_MATCH_BGEU, OP_MASK_IOP, NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"blt", "s,t,o", "s,t,o,E", 3, OP_MATCH_BLT, OP_MASK_IOP, NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bltu", "s,t,o", "s,t,o,E", 3, OP_MATCH_BLTU, OP_MASK_IOP, NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"bne", "s,t,o", "s,t,o,E", 3, OP_MATCH_BNE, OP_MASK_IOP, NIOS2_INSN_CBRANCH, branch_target_overflow },
++ {"br", "o", "o,E", 1, OP_MATCH_BR, OP_MASK_IOP, NIOS2_INSN_UBRANCH, branch_target_overflow },
++ {"break", "b", "b,E", 1, OP_MATCH_BREAK, OP_MASK_BREAK, 0, no_overflow },
++ {"bret", "", "E", 0, OP_MATCH_BRET, OP_MASK, 0, no_overflow },
++ {"flushd", "i(s)", "i(s)E", 2, OP_MATCH_FLUSHD, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"flushi", "s", "s,E", 1, OP_MATCH_FLUSHI, OP_MASK_FLUSHI, 0, no_overflow },
++ {"flushp", "", "E", 0, OP_MATCH_FLUSHP, OP_MASK, 0, no_overflow },
++ {"initd", "i(s)", "i(s)E", 2, OP_MATCH_INITD, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"initi", "s", "s,E", 1, OP_MATCH_INITI, OP_MASK_INITI, 0, no_overflow },
++ {"call", "m", "m,E", 1, OP_MATCH_CALL, OP_MASK_IOP, NIOS2_INSN_CALL, call_target_overflow },
++ {"callr", "s", "s,E", 1, OP_MATCH_CALLR, OP_MASK_CALLR, 0, no_overflow },
++ {"cmpeq", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPEQ, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"cmpeqi", "t,s,i", "t,s,i,E", 3, OP_MATCH_CMPEQI, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"cmpge", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPGE, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"cmpgei", "t,s,i", "t,s,i,E", 3, OP_MATCH_CMPGEI, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"cmpgeu", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPGEU, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"cmpgeui", "t,s,u", "t,s,u,E", 3, OP_MATCH_CMPGEUI, OP_MASK_IOP, 0, unsigned_immed16_overflow },
++ {"cmpgt", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPLT, OP_MASK_ROPX | OP_MASK_ROP, NIOS2_INSN_MACRO, no_overflow },
++ {"cmpgti", "t,s,i", "t,s,i,E", 3, OP_MATCH_CMPGEI, OP_MASK_IOP, NIOS2_INSN_MACRO, signed_immed16_overflow },
++ {"cmpgtu", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPLTU, OP_MASK_ROPX | OP_MASK_ROP, NIOS2_INSN_MACRO, no_overflow },
++ {"cmpgtui", "t,s,u", "t,s,u,E", 3, OP_MATCH_CMPGEUI, OP_MASK_IOP, NIOS2_INSN_MACRO, unsigned_immed16_overflow },
++ {"cmple", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPGE, OP_MASK_ROPX | OP_MASK_ROP, NIOS2_INSN_MACRO, no_overflow },
++ {"cmplei", "t,s,i", "t,s,i,E", 3, OP_MATCH_CMPLTI, OP_MASK_IOP, NIOS2_INSN_MACRO, signed_immed16_overflow },
++ {"cmpleu", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPGEU, OP_MASK_ROPX | OP_MASK_ROP, NIOS2_INSN_MACRO, no_overflow },
++ {"cmpleui", "t,s,u", "t,s,u,E", 3, OP_MATCH_CMPLTUI, OP_MASK_IOP, NIOS2_INSN_MACRO, unsigned_immed16_overflow },
++ {"cmplt", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPLT, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"cmplti", "t,s,i", "t,s,i,E", 3, OP_MATCH_CMPLTI, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"cmpltu", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPLTU, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"cmpltui", "t,s,u", "t,s,u,E", 3, OP_MATCH_CMPLTUI, OP_MASK_IOP, 0, unsigned_immed16_overflow },
++ {"cmpne", "d,s,t", "d,s,t,E", 3, OP_MATCH_CMPNE, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"cmpnei", "t,s,i", "t,s,i,E", 3, OP_MATCH_CMPNEI, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"div", "d,s,t", "d,s,t,E", 3, OP_MATCH_DIV, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"divu", "d,s,t", "d,s,t,E", 3, OP_MATCH_DIVU, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"jmp", "s", "s,E", 1, OP_MATCH_JMP, OP_MASK_JMP, 0, no_overflow },
++ {"ldb", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDB, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldbio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDBIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldbu", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDBU, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldbuio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDBUIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldh", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDH, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldhio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDHIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldhu", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDHU, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldhuio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDHUIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldw", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDW, OP_MASK_IOP, 0, address_offset_overflow },
++ {"ldwio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_LDWIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"mov", "d,s", "d,s,E", 2, OP_MATCH_ADD, OP_MASK_RRT|OP_MASK_ROPX|OP_MASK_ROP, NIOS2_INSN_MACRO_MOV, no_overflow },
++ {"movhi", "t,u", "t,u,E", 2, OP_MATCH_ORHI, OP_MASK_IRS|OP_MASK_IOP, NIOS2_INSN_MACRO_MOVI, unsigned_immed16_overflow },
++ {"movui", "t,u", "t,u,E", 2, OP_MATCH_ORI, OP_MASK_IRS|OP_MASK_IOP, NIOS2_INSN_MACRO_MOVI, unsigned_immed16_overflow },
++ {"movi", "t,i", "t,i,E", 2, OP_MATCH_ADDI, OP_MASK_IRS|OP_MASK_IOP, NIOS2_INSN_MACRO_MOVI, signed_immed16_overflow },
++ /* movia expands to two instructions so there is no mask or match */
++ {"movia", "t,o", "t,o,E", 2, OP_MATCH_ORHI, OP_MASK_IOP, NIOS2_INSN_MACRO_MOVIA, no_overflow },
++ {"mul", "d,s,t", "d,s,t,E", 3, OP_MATCH_MUL, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"muli", "t,s,i", "t,s,i,E", 3, OP_MATCH_MULI, OP_MASK_IOP, 0, signed_immed16_overflow },
++ {"mulxss", "d,s,t", "d,s,t,E", 3, OP_MATCH_MULXSS, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"mulxsu", "d,s,t", "d,s,t,E", 3, OP_MATCH_MULXSU, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"mulxuu", "d,s,t", "d,s,t,E", 3, OP_MATCH_MULXUU, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"nextpc", "d", "d,E", 1, OP_MATCH_NEXTPC, OP_MASK_NEXTPC, 0, no_overflow },
++ {"nop", "", "E", 0, OP_MATCH_ADD, OP_MASK, NIOS2_INSN_MACRO_MOV, no_overflow },
++ {"nor", "d,s,t", "d,s,t,E", 3, OP_MATCH_NOR, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"or", "d,s,t", "d,s,t,E", 3, OP_MATCH_OR, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"orhi", "t,s,u", "t,s,u,E", 3, OP_MATCH_ORHI, OP_MASK_IOP, 0, unsigned_immed16_overflow },
++ {"ori", "t,s,u", "t,s,u,E", 3, OP_MATCH_ORI, OP_MASK_IOP, NIOS2_INSN_ORI, unsigned_immed16_overflow },
++ {"rdctl", "d,c", "d,c,E", 2, OP_MATCH_RDCTL, OP_MASK_RDCTL, 0, no_overflow },
++ {"ret", "", "E", 0, OP_MATCH_RET, OP_MASK, 0, no_overflow },
++ {"rol", "d,s,t", "d,s,t,E", 3, OP_MATCH_ROL, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"roli", "d,s,j", "d,s,j,E", 3, OP_MATCH_ROLI, OP_MASK_ROLI, 0, unsigned_immed5_overflow },
++ {"ror", "d,s,t", "d,s,t,E", 3, OP_MATCH_ROR, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"sll", "d,s,t", "d,s,t,E", 3, OP_MATCH_SLL, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"slli", "d,s,j", "d,s,j,E", 3, OP_MATCH_SLLI, OP_MASK_SLLI, 0, unsigned_immed5_overflow },
++ {"sra", "d,s,t", "d,s,t,E", 3, OP_MATCH_SRA, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"srai", "d,s,j", "d,s,j,E", 3, OP_MATCH_SRAI, OP_MASK_SRAI, 0, unsigned_immed5_overflow },
++ {"srl", "d,s,t", "d,s,t,E", 3, OP_MATCH_SRL, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"srli", "d,s,j", "d,s,j,E", 3, OP_MATCH_SRLI, OP_MASK_SRLI, 0, unsigned_immed5_overflow },
++ {"stb", "t,i(s)", "t,i(s)E", 3, OP_MATCH_STB, OP_MASK_IOP, 0, address_offset_overflow },
++ {"stbio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_STBIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"sth", "t,i(s)", "t,i(s)E", 3, OP_MATCH_STH, OP_MASK_IOP, 0, address_offset_overflow },
++ {"sthio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_STHIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"stw", "t,i(s)", "t,i(s)E", 3, OP_MATCH_STW, OP_MASK_IOP, 0, address_offset_overflow },
++ {"stwio", "t,i(s)", "t,i(s)E", 3, OP_MATCH_STWIO, OP_MASK_IOP, 0, address_offset_overflow },
++ {"sub", "d,s,t", "d,s,t,E", 3, OP_MATCH_SUB, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"sync", "", "E", 0, OP_MATCH_SYNC, OP_MASK_SYNC, 0, no_overflow },
++ {"trap", "", "E", 0, OP_MATCH_TRAP, OP_MASK_TRAP, 0, no_overflow },
++ {"eret", "", "E", 0, OP_MATCH_ERET, OP_MASK, 0, no_overflow },
++ {"custom", "l,d,s,t", "l,d,s,t,E", 4, OP_MATCH_CUSTOM, OP_MASK_ROP, 0, custom_opcode_overflow },
++ {"wrctl", "c,s", "c,s,E", 2, OP_MATCH_WRCTL, OP_MASK_WRCTL, 0, no_overflow },
++ {"xor", "d,s,t", "d,s,t,E", 3, OP_MATCH_XOR, OP_MASK_ROPX | OP_MASK_ROP, 0, no_overflow },
++ {"xorhi", "t,s,u", "t,s,u,E", 3, OP_MATCH_XORHI, OP_MASK_IOP, 0, unsigned_immed16_overflow },
++ {"xori", "t,s,u", "t,s,u,E", 3, OP_MATCH_XORI, OP_MASK_IOP, NIOS2_INSN_XORI, unsigned_immed16_overflow }
++};
++/* *INDENT-ON* */
++
++#define NIOS2_NUM_OPCODES \
++ ((sizeof nios2_builtin_opcodes) / (sizeof (nios2_builtin_opcodes[0])))
++const int bfd_nios2_num_builtin_opcodes = NIOS2_NUM_OPCODES;
++
++/* const removed from the following to allow for dynamic extensions to the
++ * built-in instruction set. */
++struct nios2_opcode *nios2_opcodes =
++ (struct nios2_opcode *) nios2_builtin_opcodes;
++int bfd_nios2_num_opcodes = NIOS2_NUM_OPCODES;
++#undef NIOS2_NUM_OPCODES
diff --git a/misc/buildroot/toolchain/binutils/2.16.1/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.16.1/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..b25d5b7e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.1/300-001_ld_makefile_patch.patch
@@ -0,0 +1,52 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100
++++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100
+@@ -19,7 +19,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100
++++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100
+@@ -128,7 +128,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/misc/buildroot/toolchain/binutils/2.16.1/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.16.1/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.1/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.16.1/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.16.1/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.1/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.16.1/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.16.1/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.1/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.16.1/sh-flags-off-by-one.patch b/misc/buildroot/toolchain/binutils/2.16.1/sh-flags-off-by-one.patch
new file mode 100644
index 000000000..19a2f54ca
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.1/sh-flags-off-by-one.patch
@@ -0,0 +1,21 @@
+2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
+
+Index: bfd/elf32-sh.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-sh.c,v
+retrieving revision 1.128
+retrieving revision 1.129
+diff -u -p -r1.128 -r1.129
+--- binutils/bfd/elf32-sh.c 25 Aug 2005 02:32:10 -0000 1.128
++++ binutils/bfd/elf32-sh.c 25 Aug 2005 05:10:22 -0000 1.129
+@@ -6655,7 +6655,7 @@ sh_elf_set_mach_from_flags (bfd *abfd)
+ int
+ sh_elf_get_flags_from_mach (unsigned long mach)
+ {
+- int i = ARRAY_SIZE (sh_ef_bfd_table);
++ int i = ARRAY_SIZE (sh_ef_bfd_table) - 1;
+
+ for (; i>0; i--)
+ if (sh_ef_bfd_table[i] == mach)
diff --git a/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..b25d5b7e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-001_ld_makefile_patch.patch
@@ -0,0 +1,52 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100
++++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100
+@@ -19,7 +19,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100
++++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100
+@@ -128,7 +128,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.90.0.3/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.16.90.0.3/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.16.90.0.3/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.90.0.3/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.16.90.0.3/sh-flags-off-by-one.patch b/misc/buildroot/toolchain/binutils/2.16.90.0.3/sh-flags-off-by-one.patch
new file mode 100644
index 000000000..19a2f54ca
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.90.0.3/sh-flags-off-by-one.patch
@@ -0,0 +1,21 @@
+2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
+
+Index: bfd/elf32-sh.c
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-sh.c,v
+retrieving revision 1.128
+retrieving revision 1.129
+diff -u -p -r1.128 -r1.129
+--- binutils/bfd/elf32-sh.c 25 Aug 2005 02:32:10 -0000 1.128
++++ binutils/bfd/elf32-sh.c 25 Aug 2005 05:10:22 -0000 1.129
+@@ -6655,7 +6655,7 @@ sh_elf_set_mach_from_flags (bfd *abfd)
+ int
+ sh_elf_get_flags_from_mach (unsigned long mach)
+ {
+- int i = ARRAY_SIZE (sh_ef_bfd_table);
++ int i = ARRAY_SIZE (sh_ef_bfd_table) - 1;
+
+ for (; i>0; i--)
+ if (sh_ef_bfd_table[i] == mach)
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.5/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.5/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.5/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.5/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.6/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.6/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.6/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.6/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.7/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.7/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.16.91.0.7/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.16.91.0.7/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.16.91.0.7/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.10/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.10/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.10/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.2/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.2/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.2/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.2/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.2/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.2/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.2/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.3/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.3/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.3/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.3/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.4/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.4/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.4/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.4/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.5/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.5/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.5/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.5/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.6/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.6/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.6/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.6/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.7/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.7/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.7/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.7/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.7/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.7/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.7/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.7/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.7/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.8/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.8/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.8/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.8/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.8/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.8/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.8/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.8/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.8/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.9/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.9/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.9/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.9/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.9/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.9/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17.50.0.9/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17.50.0.9/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17.50.0.9/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17/110-arm-eabi-conf.patch b/misc/buildroot/toolchain/binutils/2.17/110-arm-eabi-conf.patch
new file mode 100644
index 000000000..be85ceb10
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
+diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
+--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
+@@ -1299,7 +1299,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
+diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
+--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
++++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
+@@ -497,7 +497,7 @@
+ arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
diff --git a/misc/buildroot/toolchain/binutils/2.17/300-001_ld_makefile_patch.patch b/misc/buildroot/toolchain/binutils/2.17/300-001_ld_makefile_patch.patch
new file mode 100644
index 000000000..04a7e61e2
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17/300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
+#!/bin/sh -e
+## 001_ld_makefile_patch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: correct where ld scripts are installed
+## DP: Author: Chris Chimelis <chris@debian.org>
+## DP: Upstream status: N/A
+## DP: Date: ??
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils-2.16.91.0.1/ld/Makefile.am
++++ binutils-2.16.91.0.1/ld/Makefile.am
+@@ -20,7 +20,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- binutils-2.16.91.0.1/ld/Makefile.in
++++ binutils-2.16.91.0.1/ld/Makefile.in
+@@ -268,7 +268,7 @@
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/misc/buildroot/toolchain/binutils/2.17/300-006_better_file_error.patch b/misc/buildroot/toolchain/binutils/2.17/300-006_better_file_error.patch
new file mode 100644
index 000000000..f337611ed
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17/300-006_better_file_error.patch
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Specify which filename is causing an error if the filename is a
+## DP: directory. (#45832)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
+--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
+@@ -150,6 +150,13 @@
+ {
+ bfd *nbfd;
+ const bfd_target *target_vec;
++ struct stat s;
++
++ if (stat (filename, &s) == 0)
++ if (S_ISDIR(s.st_mode)) {
++ bfd_set_error (bfd_error_file_not_recognized);
++ return NULL;
++ }
+
+ nbfd = _bfd_new_bfd ();
+ if (nbfd == NULL)
diff --git a/misc/buildroot/toolchain/binutils/2.17/300-012_check_ldrunpath_length.patch b/misc/buildroot/toolchain/binutils/2.17/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000000000..498651a90
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
+## DP: cases where -rpath isn't specified. (#151024)
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
diff --git a/misc/buildroot/toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch b/misc/buildroot/toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch
new file mode 100644
index 000000000..5959c718d
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch
@@ -0,0 +1,26 @@
+--- binutils/bfd/elf32-mips.c~
++++ binutils/bfd/elf32-mips.c
+@@ -1613,7 +1613,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
+--- binutils/bfd/elfn32-mips.c~
++++ binutils/bfd/elfn32-mips.c
+@@ -2399,7 +2399,9 @@
+
+ /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
+ page sizes of up to that limit, so we need to respect it. */
+-#define ELF_MAXPAGESIZE 0x10000
++/*#define ELF_MAXPAGESIZE 0x10000*/
++/* Use 4K to shrink the elf header. NOT for general use! */
++#define ELF_MAXPAGESIZE 0x1000
+ #define elf32_bed elf32_tradbed
+
+ /* Include the target file again for this target. */
diff --git a/misc/buildroot/toolchain/binutils/Config.in b/misc/buildroot/toolchain/binutils/Config.in
new file mode 100644
index 000000000..efcc0ed86
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/Config.in
@@ -0,0 +1,110 @@
+# Choose binutils version.
+
+comment "Binutils Options"
+
+choice
+ prompt "Binutils Version"
+ default BR2_BINUTILS_VERSION_2_16_91_0_7
+ help
+ Select the version of binutils you wish to use.
+
+ config BR2_BINUTILS_VERSION_2_14_90_0_8
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.14.90.0.8"
+
+ config BR2_BINUTILS_VERSION_2_15
+ depends BR2_DEPRECATED
+ bool "binutils 2.15"
+
+ config BR2_BINUTILS_VERSION_2_15_94_0_2_2
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.15.94.0.2.2"
+
+ config BR2_BINUTILS_VERSION_2_16_1
+ depends !BR2_nios2
+ bool "binutils 2.16.1"
+
+ config BR2_BINUTILS_VERSION_2_16_90_0_3
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.16.90.0.3"
+
+ config BR2_BINUTILS_VERSION_2_16_91_0_5
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.16.91.0.5"
+
+ config BR2_BINUTILS_VERSION_2_16_91_0_6
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.16.91.0.6"
+
+ config BR2_BINUTILS_VERSION_2_16_91_0_7
+ depends !BR2_nios2
+ bool "binutils 2.16.91.0.7"
+
+ config BR2_BINUTILS_VERSION_2_17
+ depends !BR2_nios2
+ bool "binutils 2.17"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_2
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.2"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_3
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.3"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_4
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.4"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_5
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.5"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_6
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.6"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_7
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.7"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_8
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.8"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_9
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "binutils 2.17.50.0.9"
+
+ config BR2_BINUTILS_VERSION_2_17_50_0_10
+ depends !BR2_nios2
+ bool "binutils 2.17.50.0.10"
+
+endchoice
+
+config BR2_BINUTILS_VERSION
+ string
+ default "2.14.90.0.8" if BR2_BINUTILS_VERSION_2_14_90_0_8
+ default "2.15" if BR2_BINUTILS_VERSION_2_15
+ default "2.15.94.0.2.2" if BR2_BINUTILS_VERSION_2_15_94_0_2_2
+ default "2.16.1" if BR2_BINUTILS_VERSION_2_16_1
+ default "2.16.90.0.3" if BR2_BINUTILS_VERSION_2_16_90_0_3
+ default "2.16.91.0.5" if BR2_BINUTILS_VERSION_2_16_91_0_5
+ default "2.16.91.0.6" if BR2_BINUTILS_VERSION_2_16_91_0_6
+ default "2.16.91.0.7" if BR2_BINUTILS_VERSION_2_16_91_0_7
+ default "2.17" if BR2_BINUTILS_VERSION_2_17
+ default "2.17.50.0.2" if BR2_BINUTILS_VERSION_2_17_50_0_2
+ default "2.17.50.0.3" if BR2_BINUTILS_VERSION_2_17_50_0_3
+ default "2.17.50.0.4" if BR2_BINUTILS_VERSION_2_17_50_0_4
+ default "2.17.50.0.5" if BR2_BINUTILS_VERSION_2_17_50_0_5
+ default "2.17.50.0.6" if BR2_BINUTILS_VERSION_2_17_50_0_6
+ default "2.17.50.0.7" if BR2_BINUTILS_VERSION_2_17_50_0_7
+ default "2.17.50.0.8" if BR2_BINUTILS_VERSION_2_17_50_0_8
+ default "2.17.50.0.9" if BR2_BINUTILS_VERSION_2_17_50_0_9
+ default "2.17.50.0.10" if BR2_BINUTILS_VERSION_2_17_50_0_10
+
+config BR2_EXTRA_BINUTILS_CONFIG_OPTIONS
+ string "Additional binutils options"
+ default ""
+ help
+ Any additional binutils options you may want to include ...
diff --git a/misc/buildroot/toolchain/binutils/binutils.mk b/misc/buildroot/toolchain/binutils/binutils.mk
new file mode 100644
index 000000000..ff3ba338b
--- /dev/null
+++ b/misc/buildroot/toolchain/binutils/binutils.mk
@@ -0,0 +1,175 @@
+#############################################################
+#
+# build binutils for use on the host system
+#
+#############################################################
+BINUTILS_VERSION:=$(strip $(subst ",, $(BR2_BINUTILS_VERSION)))
+#"))
+
+EXTRA_BINUTILS_CONFIG_OPTIONS=$(strip $(subst ",, $(BR2_EXTRA_BINUTILS_CONFIG_OPTIONS)))
+#"))
+BINUTILS_SITE:=ftp://ftp.kernel.org/pub/linux/devel/binutils
+ifeq ($(BINUTILS_VERSION),2.17)
+BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
+endif
+ifeq ($(BINUTILS_VERSION),2.16)
+BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
+BINUTILS_NO_MPFR:=y
+endif
+ifeq ($(BINUTILS_VERSION),2.16.1)
+BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
+BINUTILS_NO_MPFR:=y
+endif
+ifeq ($(BINUTILS_VERSION),2.15)
+BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
+BINUTILS_NO_MPFR:=y
+endif
+ifeq ($(BINUTILS_VERSION),2.14)
+BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
+BINUTILS_NO_MPFR:=y
+endif
+ifeq ($(BINUTILS_VERSION),2.13)
+BINUTILS_SITE:=ftp://ftp.gnu.org/gnu/binutils/
+BINUTILS_NO_MPFR:=y
+endif
+ifeq ($(BINUTILS_VERSION),2.15.97)
+BINUTILS_SITE:=ftp://sources.redhat.com/pub/binutils/snapshots/
+BINUTILS_NO_MPFR:=y
+endif
+
+# We do not rely on the host's gmp/mpfr but use a known working one
+BINUTILS_HOST_PREREQ:=
+BINUTILS_TARGET_PREREQ:=
+
+ifeq ($(findstring 3.,$(GCC_VERSION)),3.)
+BINUTILS_NO_MPFR:=y
+endif
+ifeq ($(findstring 4.0,$(GCC_VERSION)),4.0)
+BINUTILS_NO_MPFR:=y
+endif
+
+ifndef BINUTILS_NO_MPFR
+BINUTILS_HOST_PREREQ:=$(TOOL_BUILD_DIR)/gmp/lib/libgmp.so \
+ $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr.so
+
+BINUTILS_TARGET_PREREQ:=$(TARGET_DIR)/lib/libgmp.so \
+ $(TARGET_DIR)/lib/libmpfr.so
+EXTRA_BINUTILS_CONFIG_OPTIONS+=--with-gmp="$(GMP_HOST_DIR)"
+EXTRA_BINUTILS_CONFIG_OPTIONS+=--with-mpfr="$(MPFR_HOST_DIR)"
+
+BINUTILS_TARGET_CONFIG_OPTIONS=--with-gmp="$(GMP_TARGET_DIR)"
+BINUTILS_TARGET_CONFIG_OPTIONS+=--with-mpfr="$(MPFR_TARGET_DIR)"
+endif
+
+BINUTILS_SOURCE:=binutils-$(BINUTILS_VERSION).tar.bz2
+BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION)
+BINUTILS_CAT:=$(BZCAT)
+
+BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION)-build
+
+$(DL_DIR)/$(BINUTILS_SOURCE):
+ mkdir -p $(DL_DIR)
+ $(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE)
+
+binutils-unpacked: $(BINUTILS_DIR)/.unpacked
+$(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE)
+ mkdir -p $(TOOL_BUILD_DIR)
+ $(BINUTILS_CAT) $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ $(CONFIG_UPDATE) $(BINUTILS_DIR)
+ touch $@
+
+$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
+ # Apply appropriate binutils patches.
+ toolchain/patch-kernel.sh $(BINUTILS_DIR) toolchain/binutils/$(BINUTILS_VERSION) \*.patch
+ touch $@
+
+$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
+ mkdir -p $(BINUTILS_DIR1)
+ (cd $(BINUTILS_DIR1); \
+ CC="$(HOSTCC)" \
+ $(BINUTILS_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --with-build-sysroot="$(TOOL_BUILD_DIR)/nuttx_dev/" \
+ --with-sysroot="$(TOOL_BUILD_DIR)/nuttx_dev/" \
+ $(DISABLE_NLS) \
+ $(MULTILIB) \
+ --disable-werror \
+ $(SOFT_FLOAT_CONFIG_OPTION) \
+ $(EXTRA_BINUTILS_CONFIG_OPTIONS));
+ touch $@
+
+$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
+ $(MAKE) -C $(BINUTILS_DIR1) all
+
+# Make install will put gettext data in staging_dir/share/locale.
+# Unfortunatey, it isn't configureable.
+$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
+ $(MAKE) -C $(BINUTILS_DIR1) install
+
+binutils: dependencies uclibc-configured $(BINUTILS_HOST_PREREQ) $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld
+
+binutils-source: $(DL_DIR)/$(BINUTILS_SOURCE)
+
+binutils-clean:
+ rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
+ -$(MAKE) -C $(BINUTILS_DIR1) clean
+
+binutils-dirclean:
+ rm -rf $(BINUTILS_DIR1)
+
+
+
+#############################################################
+#
+# build binutils for use on the target system
+#
+#############################################################
+BINUTILS_DIR2:=$(BUILD_DIR)/binutils-$(BINUTILS_VERSION)-target
+$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
+ mkdir -p $(BINUTILS_DIR2)
+ (cd $(BINUTILS_DIR2); \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ PATH=$(TARGET_PATH) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CFLAGS_FOR_BUILD="-O2 -g" \
+ $(BINUTILS_DIR)/configure \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(REAL_GNU_TARGET_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ $(DISABLE_NLS) \
+ $(MULTILIB) \
+ $(BINUTILS_TARGET_CONFIG_OPTIONS) \
+ --disable-werror \
+ $(SOFT_FLOAT_CONFIG_OPTION) );
+ touch $@
+
+$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
+ PATH=$(TARGET_PATH) \
+ $(MAKE) -C $(BINUTILS_DIR2) all
+
+$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
+ PATH=$(TARGET_PATH) \
+ $(MAKE) DESTDIR=$(TARGET_DIR) \
+ tooldir=/usr build_tooldir=/usr \
+ -C $(BINUTILS_DIR2) install
+ #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+ -$(STRIP) $(TARGET_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/* > /dev/null 2>&1
+ -$(STRIP) $(TARGET_DIR)/usr/bin/* > /dev/null 2>&1
+
+binutils_target: $(BINUTILS_TARGET_PREREQ) $(TARGET_DIR)/usr/bin/ld
+
+binutils_target-clean:
+ (cd $(TARGET_DIR)/usr/bin; \
+ rm -f addr2line ar as gprof ld nm objcopy \
+ objdump ranlib readelf size strings strip)
+ rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
+ -$(MAKE) -C $(BINUTILS_DIR2) clean
+
+binutils_target-dirclean:
+ rm -rf $(BINUTILS_DIR2)
diff --git a/misc/buildroot/toolchain/dependencies/dependencies.mk b/misc/buildroot/toolchain/dependencies/dependencies.mk
new file mode 100644
index 000000000..507132c70
--- /dev/null
+++ b/misc/buildroot/toolchain/dependencies/dependencies.mk
@@ -0,0 +1,25 @@
+######################################################################
+#
+# Check buildroot dependencies and bail out if the user's
+# system is judged to be lacking....
+#
+######################################################################
+
+dependencies:
+ @HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" $(TOPDIR)/toolchain/dependencies/dependencies.sh
+
+dependencies-source:
+
+dependencies-clean:
+ rm -f $(SSTRIP_TARGET)
+
+dependencies-dirclean:
+ true
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+.PHONY: dependencies
+
diff --git a/misc/buildroot/toolchain/dependencies/dependencies.sh b/misc/buildroot/toolchain/dependencies/dependencies.sh
new file mode 100755
index 000000000..6f42a8746
--- /dev/null
+++ b/misc/buildroot/toolchain/dependencies/dependencies.sh
@@ -0,0 +1,267 @@
+#!/bin/sh
+# vi: set sw=4 ts=4:
+#set -x
+
+echo ""
+echo "Checking build system dependencies:"
+
+
+#############################################################
+#
+# check build system 'environment'
+#
+#############################################################
+if test -n "$CC" ; then
+ echo "CC clean: FALSE"
+ /bin/echo -e "\n\nYou must run 'unset CC' so buildroot can run with";
+ /bin/echo -e "a clean environment on your build machine\n";
+ exit 1;
+fi;
+echo "CC clean: Ok"
+
+
+if test -n "$CXX" ; then
+ echo "CXX clean: FALSE"
+ /bin/echo -e "\n\nYou must run 'unset CXX' so buildroot can run with";
+ /bin/echo -e "a clean environment on your build machine\n";
+ exit 1;
+fi;
+echo "CXX clean: Ok"
+
+
+if test -n "$CPP" ; then
+ echo "CPP clean: FALSE"
+ /bin/echo -e "\n\nYou must run 'unset CPP' so buildroot can run with";
+ /bin/echo -e "a clean environment on your build machine\n";
+ exit 1;
+fi;
+echo "CPP clean: Ok"
+
+
+if test -n "$CFLAGS" ; then
+ echo "CFLAGS clean: FALSE"
+ /bin/echo -e "\n\nYou must run 'unset CFLAGS' so buildroot can run with";
+ /bin/echo -e "a clean environment on your build machine\n";
+ exit 1;
+fi;
+echo "CFLAGS clean: Ok"
+
+if test -n "$INCLUDES" ; then
+ echo "INCLUDES clean: FALSE"
+ /bin/echo -e "WARNING: INCLUDES contains:\n\t'$INCLUDES'"
+else
+ echo "INCLUDES clean: Ok"
+fi
+
+if test -n "$CXXFLAGS" ; then
+ echo "CXXFLAGS clean: FALSE"
+ /bin/echo -e "\n\nYou must run 'unset CXXFLAGS' so buildroot can run with";
+ /bin/echo -e "a clean environment on your build machine\n";
+ exit 1;
+fi;
+echo "CXXFLAGS clean: Ok"
+
+echo "WORKS" | grep "WORKS" >/dev/null 2>&1
+if test $? != 0 ; then
+ echo "grep works: FALSE"
+ exit 1
+fi
+
+# sanity check for CWD in LD_LIBRARY_PATH
+# try not to rely on egrep..
+if test -n "$LD_LIBRARY_PATH" ; then
+ /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep ':.:' >/dev/null 2>&1 ||
+ /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep 'TRiGGER_start:' >/dev/null 2>&1 ||
+ /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep ':TRiGGER_end' >/dev/null 2>&1 ||
+ /bin/echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | /bin/grep '::' >/dev/null 2>&1
+ if test $? = 0; then
+ echo "LD_LIBRARY_PATH sane: FALSE"
+ echo "You seem to have the current working directory in your"
+ echo "LD_LIBRARY_PATH environment variable. This doesn't work."
+ exit 1;
+ else
+ echo "LD_LIBRARY_PATH sane: Ok"
+ fi
+fi;
+
+
+
+#############################################################
+#
+# check build system 'sed'
+#
+#############################################################
+if test -x /usr/bin/sed ; then
+ SED="/usr/bin/sed"
+else
+ if test -x /bin/sed ; then
+ SED="/bin/sed"
+ else
+ SED="sed"
+ fi
+fi
+echo "HELLO" > .sedtest
+$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
+if test $? != 0 ; then
+ echo "sed works: No, using buildroot version instead"
+else
+ echo "sed works: Ok"
+fi
+rm -f .sedtest
+XSED=$HOST_SED_DIR/bin/sed
+
+#############################################################
+#
+# check build system 'which'
+#
+#############################################################
+if ! which which > /dev/null ; then
+ echo "which installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'which' on your build machine\n";
+ exit 1;
+fi;
+echo "which installed: Ok"
+
+
+#############################################################
+#
+# check build system 'make'
+#
+#############################################################
+MAKE=$(which make)
+if [ -z "$MAKE" ] ; then
+ echo "make installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'make' on your build machine\n";
+ exit 1;
+fi;
+MAKE_VERSION=$($MAKE --version 2>&1 | head -n1 | $XSED -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g')
+if [ -z "$MAKE_VERSION" ] ; then
+ echo "make installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'make' on your build machine\n";
+ exit 1;
+fi;
+MAKE_MAJOR=$(echo $MAKE_VERSION | $XSED -e "s/\..*//g")
+MAKE_MINOR=$(echo $MAKE_VERSION | $XSED -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g")
+if [ $MAKE_MAJOR -lt 3 -o $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 8 ] ; then
+ echo "You have make '$MAKE_VERSION' installed. GNU make >=3.80 is required"
+ exit 1;
+fi;
+echo "GNU make version '$MAKE_VERSION': Ok"
+
+
+
+#############################################################
+#
+# check build system 'gcc'
+#
+#############################################################
+COMPILER=$(which $HOSTCC)
+if [ -z "$COMPILER" ] ; then
+ COMPILER=$(which cc)
+fi;
+if [ -z "$COMPILER" ] ; then
+ echo "C Compiler installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'gcc' on your build machine\n";
+ exit 1;
+fi;
+
+COMPILER_VERSION=$($COMPILER --version 2>&1 | head -n1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g")
+if [ -z "$COMPILER_VERSION" ] ; then
+ echo "gcc installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'gcc' on your build machine\n";
+ exit 1;
+fi;
+COMPILER_MAJOR=$(echo $COMPILER_VERSION | $XSED -e "s/\..*//g")
+COMPILER_MINOR=$(echo $COMPILER_VERSION | $XSED -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g")
+if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then
+ echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required"
+ exit 1;
+fi;
+echo "C compiler '$COMPILER'"
+echo "C compiler version '$COMPILER_VERSION': Ok"
+
+
+# check for host CXX
+CXXCOMPILER=$(which $HOSTCXX)
+if [ -z "$CXXCOMPILER" ] ; then
+ CXXCOMPILER=$(which c++)
+fi
+if [ -z "$CXXCOMPILER" ] ; then
+ echo "C++ Compiler installed: FALSE"
+ /bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
+ #exit 1
+fi
+if [ ! -z "$CXXCOMPILER" ] ; then
+ CXXCOMPILER_VERSION=$($CXXCOMPILER --version 2>&1 | head -n1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g")
+ if [ -z "$CXXCOMPILER_VERSION" ] ; then
+ echo "c++ installed: FALSE"
+ /bin/echo -e "\nYou may have to install 'g++' on your build machine\n"
+ #exit 1
+ fi
+
+ CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | $XSED -e "s/\..*//g")
+ CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | $XSED -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g")
+ if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then
+ echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required"
+ exit 1
+ fi
+ echo "C++ compiler '$CXXCOMPILER'"
+ echo "C++ compiler version '$CXXCOMPILER_VERSION': Ok"
+fi
+
+#############################################################
+#
+# check build system 'bison'
+#
+#############################################################
+if ! which bison > /dev/null ; then
+ echo "bison installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'bison' on your build machine\n";
+ exit 1;
+fi;
+echo "bison installed: Ok"
+
+
+#############################################################
+#
+# check build system 'flex'
+#
+#############################################################
+if ! which flex > /dev/null ; then
+ echo "flex installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'flex' on your build machine\n";
+ exit 1;
+fi;
+echo "flex installed: Ok"
+
+
+#############################################################
+#
+# check build system 'gettext'
+#
+#############################################################
+if ! which msgfmt > /dev/null ; then \
+ echo "gettext installed: FALSE"
+ /bin/echo -e "\n\nYou must install 'gettext' on your build machine\n"; \
+ exit 1; \
+fi;
+echo "gettext installed: Ok"
+
+
+if ! which makeinfo > /dev/null ; then \
+ echo "makeinfo installed: FALSE"
+ /bin/echo -e "\n\nMost likely some packages will fail to build their documentation"
+ /bin/echo -e "Either install 'makeinfo' on your host or fix the respective packages"
+else
+ echo "makeinfo installed: Ok"
+fi
+
+
+#############################################################
+#
+# All done
+#
+#############################################################
+echo "Build system dependencies: Ok"
+echo ""
+
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/120-softfloat.patch b/misc/buildroot/toolchain/gcc/3.3.5/120-softfloat.patch
new file mode 100644
index 000000000..f2431896c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/120-softfloat.patch
@@ -0,0 +1,14 @@
+--- gcc-3.3.2-old/configure.in 2003-08-09 01:57:21.000000000 -0500
++++ gcc-3.3.2/configure.in 2004-01-15 12:46:29.000000000 -0600
+@@ -1418,6 +1418,11 @@
+ fi
+
+ FLAGS_FOR_TARGET=
++case " $targargs " in
++ *" --nfp "* | *" --without-float "*)
++ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -msoft-float'
++ ;;
++esac
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $targargs " in
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/500-loop.patch b/misc/buildroot/toolchain/gcc/3.3.5/500-loop.patch
new file mode 100644
index 000000000..476f84b37
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/500-loop.patch
@@ -0,0 +1,10 @@
+--- gcc/gcc/loop.c 14 Feb 2004 14:46:03 -0000 1.488.2.3
++++ gcc/gcc/loop.c 28 Apr 2004 22:02:53 -0000
+@@ -929,6 +929,7 @@
+ || (! (GET_CODE (SET_SRC (set)) == REG
+ && (REGNO (SET_SRC (set))
+ < FIRST_PSEUDO_REGISTER))))
++ && regno >= FIRST_PSEUDO_REGISTER
+ /* This test is not redundant; SET_SRC (set) might be
+ a call-clobbered register and the life of REGNO
+ might span a call. */
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.3.5/800-arm-bigendian.patch
new file mode 100644
index 000000000..79140ddf0
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.3.5-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.3.5/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -100,7 +117,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.3.5-dist/gcc/config.gcc
++++ gcc-3.3.5/gcc/config.gcc
+@@ -710,6 +710,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/820-no-mips-empic-relocs.patch b/misc/buildroot/toolchain/gcc/3.3.5/820-no-mips-empic-relocs.patch
new file mode 100644
index 000000000..d5c4c9cb5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/820-no-mips-empic-relocs.patch
@@ -0,0 +1,59 @@
+From: cgd at broadcom dot com
+To: gcc-patches at gcc dot gnu dot org
+Cc: mark at codesourcery dot com
+Date: 13 Jun 2004 22:51:30 -0700
+Subject: [trunk + 3.4-branch RFA] don't use empic relocs for mips-linuxeh
+
+This patch changes mips-linux to avoid using embedded-pic relocs for
+its eh data. (Support for generating these for new code is removed in
+current binutils srcs.)
+
+Relating to this, previously, mips-linux and mips64-linux would use
+different representations for their EH data (even for mips64-linux o32
+abi), due to the mips64-linux n32/64 BFDs not supporting the
+embedded-pic relocs. This was a bug.
+
+For more explanation, see the thread of the URL quoted in the comment
+in linux.h.
+
+
+Tested the same w/ sources of about a week ago for c/c++ for
+mips-linux (native) before/after. Also verified .o compatibility
+before/after just to be sure.
+
+I'd like this approved for the branch as well, so 3.4.1 will work
+nicely w/ the next major binutils release.
+
+
+thanks,
+
+chris
+
+2004-06-13 Chris Demetriou <cgd@broadcom.com>
+
+ * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Redefine
+ to return DW_EH_PE_absptr.
+
+Index: config/mips/linux.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/linux.h,v
+retrieving revision 1.77
+diff -u -p -r1.77 linux.h
+--- gcc/gcc/config/mips/linux.h 19 Feb 2004 22:07:51 -0000 1.77
++++ gcc/gcc/config/mips/linux.h 14 Jun 2004 05:49:51 -0000
+@@ -170,10 +170,11 @@ Boston, MA 02111-1307, USA. */
+ #undef FUNCTION_NAME_ALREADY_DECLARED
+ #define FUNCTION_NAME_ALREADY_DECLARED 1
+
+-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
+- (flag_pic \
+- ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
+- : DW_EH_PE_absptr)
++/* If possible, we should attempt to use GP-relative relocs for this
++ (see <a href="http://sources.redhat.com/ml/binutils/2004-05/msg00227.html">http://sources.redhat.com/ml/binutils/2004-05/msg00227.html</a>).
++ However, until that is implement, this just uses standard, absolute
++ references. */
++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
+
+ /* The glibc _mcount stub will save $v0 for us. Don't mess with saving
+ it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/3.3.5/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/999-cvs-updates.patch b/misc/buildroot/toolchain/gcc/3.3.5/999-cvs-updates.patch
new file mode 100644
index 000000000..5d3e8c68a
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/999-cvs-updates.patch
@@ -0,0 +1,4522 @@
+Index: ChangeLog
+===================================================================
+RCS file: /cvs/gcc/gcc/ChangeLog,v
+retrieving revision 1.621.2.52
+retrieving revision 1.621.2.53
+diff -u -r1.621.2.52 -r1.621.2.53
+--- gcc/ChangeLog 30 Sep 2004 16:47:59 -0000 1.621.2.52
++++ gcc/ChangeLog 6 Oct 2004 12:00:52 -0000 1.621.2.53
+@@ -1,3 +1,7 @@
++2004-10-06 Josef Zlomek <josef.zlomek@email.cz>
++
++ * MAINTAINERS: Update my e-mail address.
++
+ 2004-09-30 Release Manager
+
+ * GCC 3.3.5 Released.
+Index: MAINTAINERS
+===================================================================
+RCS file: /cvs/gcc/gcc/MAINTAINERS,v
+retrieving revision 1.253.2.18
+retrieving revision 1.253.2.19
+diff -u -r1.253.2.18 -r1.253.2.19
+--- gcc/MAINTAINERS 16 Jan 2004 23:33:12 -0000 1.253.2.18
++++ gcc/MAINTAINERS 6 Oct 2004 12:00:53 -0000 1.253.2.19
+@@ -258,7 +258,7 @@
+ John Wehle john@feith.com
+ Florian Weimer fw@deneb.enyo.de
+ Mark Wielaard mark@gcc.gnu.org
+-Josef Zlomek zlomekj@suse.cz
++Josef Zlomek josef.zlomek@email.cz
+
+ GNATS only accounts
+
+Index: gcc/ChangeLog
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
+retrieving revision 1.16114.2.1019
+retrieving revision 1.16114.2.1059
+diff -u -r1.16114.2.1019 -r1.16114.2.1059
+--- gcc/gcc/ChangeLog 30 Sep 2004 16:45:01 -0000 1.16114.2.1019
++++ gcc/gcc/ChangeLog 29 Jan 2005 11:53:57 -0000 1.16114.2.1059
+@@ -1,3 +1,314 @@
++2005-01-29 Alan Modra <amodra@bigpond.net.au>
++
++ * unwind-dw2.c (execute_stack_op): Add missing cases for
++ DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_xor.
++
++2005-01-28 Stephane Carrez <stcarrez@nerim.fr>
++
++ PR target/15384
++ * config/m68hc11/t-m68hc11-gas (dp-bit.c): Fix typo causing a
++ configuration part of dp-bit.c to be lost.
++
++2005-01-27 Ulrich Weigand <uweigand@de.ibm.com>
++
++ PR target/17771
++ Backport from mainline:
++ * config/s390/s390.md ("reload_outti"): Remove predicate for
++ output operand. Abort if operand is not a MEM.
++ ("reload_outdi", "reload_outdf"): Likewise.
++
++2005-01-22 Roger Sayle <roger@eyesopen.com>
++
++ PR target/18402
++ Backport from mainline
++ 2003-02-05 Jakub Jelinek <jakub@redhat.com>
++
++ PR optimization/8555
++ * config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
++ instead of aborting.
++
++2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
++
++ * gccbug.in: Update optimization -> tree-optimization/rtl-optimization.
++
++2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
++
++ PR c++/17115
++ * tree-inline.c (expand_call_inline): Do not warn for functions
++ marked with attribute noinline.
++
++2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ PR rtl-optimization/19296
++ * combine.c (simplify_comparison): Rewrite the condition under
++ which a non-paradoxical SUBREG of a PLUS can be lifted when
++ compared against a constant.
++
++2004-01-14 David Mosberger <davidm@hpl.hp.com>
++ James E Wilson <wilson@specifixinc.com>
++
++ PR target/18987
++ * config/ia64/ia64.c (process_set): For alloc insn, only call
++ process_epilogue is !frame_pointer_needed.
++
++ PR target/13158
++ * config/ia64/ia64.c (ia64_expand_epilogue): Set RTX_FRAME_RELATED_P on
++ sibcall alloc instruction.
++ (process_set): Handle sibcall alloc instruction.
++
++2005-01-13 David O'Brien <obrien@FreeBSD.org>
++
++ Backport from mainline:
++ * config/freebsd-spec.h: Use KSE pthread lib for -pthread.
++
++2005-01-08 Sergey M. Samoylov <ssamoylov@dev.rtsoft.ru>
++
++ Backport:
++ 2004-02-12 Richard Sandiford <rsandifo@redhat.com>
++ PR bootstrap/13617
++ * config/mips/mips-protos.h (mips_output_aligned_decl_common): Declare.
++ (mips_declare_object): Make variadic.
++ * config/mips/mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use
++ mips_output_aligned_decl_common.
++ * config/mips/mips.c (mips_output_aligned_decl_common): New function.
++ (mips_declare_object): Make variadic.
++
++2005-01-08 Richard Sandiford <rsandifo@redhat.com>
++
++ PR target/17565
++ * config/mips/mips.md (define_asm_attributes): Set can_delay to no.
++
++2004-12-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ * vax.c (vax_address_cost, vax_rtx_cost): Correct casts.
++ (vax_rtx_cost): Handle small offsets for both PLUS and MINUS.
++
++2004-12-27 Steven Bosscher <stevenb@suse.de>
++ John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ rtl-optimization/12863
++ * config/vax/vax.h (CASE_DROPS_THROUGH): Don't define.
++ * config/vax/vax.md (casesi): Emit a test-and-branch to make sure
++ that the case is in range, to make sure the casesi insn is always
++ in range and never falls through.
++ (casesi1): Add comment to explain why casesi never falls through.
++ Remove the unnamed special case casesi pattern.
++
++2004-12-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ PR target/17643
++ * config/pa/pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Return false when
++ TARGET_PORTABLE_RUNTIME is true.
++
++2004-12-25 Alan Modra <amodra@bigpond.net.au>
++
++ PR target/19147
++ * config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete.
++
++2004-12-21 Joseph S. Myers <jsm@polyomino.org.uk>
++
++ PR c/14765
++ * c-parse.in (compstmt_primary_start): Set last_expr_type to
++ NULL_TREE.
++
++2004-12-19 Roger Sayle <roger@eyesopen.com>
++
++ PR middle-end/19068
++ * expr.c (expand_expr_real_1) <MAX_EXPR>: Ensure that target, op0
++ and op1 are all registers (or constants) before expanding the RTL
++ comparison sequence [to avoid reg_overlap_mentioned (target, op1)].
++
++2004-12-16 Eric Botcazou <ebotcazou@adacore.com>
++
++ PR middle-end/18882
++ * function.c (assign_stack_local_1): Use BITS_PER_UNIT alignment
++ when passed -2 as 'align'.
++ (put_var_into_stack): Adjust calls to put_reg_into_stack.
++ When passed a CONCAT, instruct put_reg_into_stack to use
++ a consecutive stack slot for the second part.
++ (put_reg_into_stack): Remove 'promoted_mode' parameter, add
++ 'consecutive_p' parameter. Retrieve the register mode from 'reg'.
++ When consecutive_p is true, instruct assign_stack_local_1 to use
++ BITS_PER_UNIT alignment.
++ (put_addressof_into_stack): Adjust call to put_reg_into_stack.
++
++2004-12-16 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ PR middle-end/18590
++ * function.c (fixup_var_refs_insns_with_hash): Do not invoke
++ fixup_var_refs_insn on insns marked as deleted.
++
++2004-12-15 Richard Henderson <rth@redhat.com>
++
++ PR target/19005
++ * config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with
++ optimize_size.
++ (swapqi_1): Rename from swapqi. Enable only for no partial reg
++ stall and optimize_size.
++ (swapqi_2): New.
++ (swaphi_1, swaphi_2, swapqi_1): Add athlon_decode.
++ (swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override.
++
++2004-12-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ PR middle-end/18730
++ * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn): When
++ the first/last insn is a sequence, return the first/last insn of the
++ sequence.
++
++2004-12-12 Richard Henderson <rth@redhat.com>
++
++ PR target/18932
++ * config/i386/i386.md (all splits and peepholes): Use flags_reg_operand
++ and compare_operator to propagate the input CC mode to the output.
++ * config/i386/i386.c (flags_reg_operand, compare_operator): New.
++ * config/i386/i386.h (PREDICATE_CODES): Add them.
++ * config/i386/i386-protos.h: Update.
++
++2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
++
++ PR rtl-optimization/16536
++ Backport from mainline:
++ 2004-06-25 Mark Mitchell <mark@codesourcery.com>
++ * alias.c (get_alias_set): Adjust setting of
++ DECL_POINTER_ALIAS_SET for pointers to aggregates.
++
++2004-12-09 Richard Henderson <rth@redhat.com>
++
++ PR target/17025
++ * config/i386/i386.md (testqi_1_maybe_si, andqi_2_maybe_si): New.
++ (test_qi_1, andqi_2): Do not promote to simode.
++
++2004-12-07 David Mosberger <davidm@hpl.hp.com>
++
++ PR target/18443
++ * config/ia64/ia64.c (ia64_assemble_integer): Add support for
++ emitting unaligned pointer-sized integers.
++
++2004-12-05 Richard Henderson <rth@redhat.com>
++
++ PR target/18841
++ * config/alpha/alpha.md (UNSPECV_SETJMPR_ER): New.
++ (builtin_setjmp_receiver_er_sl_1): Use it.
++ (builtin_setjmp_receiver_er_1): Likewise.
++ (builtin_setjmp_receiver_er, exception_receiver_er): Remove.
++ (builtin_setjmp_receiver): Don't split for explicit relocs until
++ after reload.
++ (exception_receiver): Likewise.
++
++2004-12-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ 2003-10-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++ Backport from mainline
++ * aclocal.m4 (gcc_AC_FUNC_MMAP_BLACKLIST): Blacklist ultrix*.
++ * configure: Rebuilt.
++
++2004-12-03 Richard Henderson <rth@redhat.com>
++
++ 2004-09-24 Richard Henderson <rth@redhat.com>
++ PR rtl-opt/17503
++ * regclass.c (subregs_of_mode): Turn into an htab. Make static.
++ (som_hash, som_eq): New.
++ (init_subregs_of_mode, record_subregs_of_mode): New.
++ (cannot_change_mode_set_regs): Rewrite for htab implementation.
++ (invalid_mode_change_p): Likewise.
++ * combine.c (gen_lowpart_for_combine): Use record_subregs_of_mode.
++ * flow.c (mark_used_regs): Likewise.
++ (life_analysis): Use init_subregs_of_mode.
++ * regs.h (subregs_of_mode): Remove.
++ * rtl.h (init_subregs_of_mode, record_subregs_of_mode): Declare.
++
++2004-12-03 Roger Sayle <roger@eyesopen.com>
++
++ PR target/9908
++ * config/i386/i386.md (*call_value_1): Correct Intel assembler
++ syntax by using %A1 instead of %*%1.
++
++2004-12-01 Alan Modra <amodra@bigpond.net.au>
++
++ PR target/12817
++ * config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave.
++
++2004-11-29 Roger Sayle <roger@eyesopen.com>
++
++ PR rtl-optimization/9771
++ * regclass.c (CALL_REALLY_USED_REGNO_P): New macro to eliminate
++ conditional compilation in init_reg_sets_1.
++ (init_reg_sets_1): Let global_regs[i] take priority over the frame
++ (but not stack) pointer exceptions to regs_invalidated_by_call.
++ (globalize_reg): Globalizing a fixed register may need to update
++ regs_invalidated_by_call.
++
++2004-11-27 Falk Hueffner <falk@debian.org>
++ Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ PR optimization/18577
++ * unroll.c (unroll_loop): Test both REGNO_LAST_UID and
++ REGNO_LAST_NOTE_UID to decide whether a pseudo is local
++ to the loop.
++
++2004-11-27 Alan Modra <amodra@bigpond.net.au>
++
++ PR target/12769
++ * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie
++ from rs6000_default_long_calls for libcalls.
++
++2004-11-25 Richard Henderson <rth@redhat.com>
++
++ PR c++/6764
++ * reload1.c (set_initial_eh_label_offset): New.
++ (set_initial_label_offsets): Use it.
++
++2004-11-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
++
++ PR rtl-optimization/14838
++ * emit-rtl.c (get_first_nonnote_insn): Don't assume first insn is a
++ note.
++ (get_last_nonnote_insn): Don't assume last insn is a note.
++
++2004-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
++
++ * doc/install.texi (*-*-solaris2*): Update with info about kernel
++ patches to solve spurious testsuite failures.
++
++2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ PR target/14454
++ * config/sparc/sparc.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Set to
++ sparc_can_output_mi_thunk.
++ (sparc_output_mi_thunk): Simplify handling of delta offset. Add
++ handling of vcall offset.
++ (sparc_can_output_mi_thunk): New predicate.
++ * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Document VCALL_OFFSET.
++ (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Delete.
++ (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New target hook.
++
++ * config/sparc/sparc.md (movdi): Remove redundant test.
++
++2004-10-07 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ * doc/install.texi (*-*-solaris2*): Fix marker for URL.
++
++2004-10-06 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ PR target/16007
++ * doc/install.texi (*-*-solaris2*): Mention potential problem
++ with Sun assembler + GNU linker and C++ programs.
++ Document status of binutils 2.15 release.
++
++2004-09-30 Richard Henderson <rth@redhat.com>
++
++ * config/alpha/qrnnd.asm: Mark for noexecstack.
++
++2004-09-30 Richard Henderson <rth@redhat.com>
++
++ * unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG.
++ * doc/tm.texi (DWARF_ZERO_REG): New.
++
++ * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue,
++ alpha_expand_epilogue): Revert 2003-09-30 change to store zero.
++ * config/alpha/alpha.h (DWARF_ZERO_REG): New.
++
+ 2004-09-30 Release Manager
+
+ * GCC 3.3.5 Released.
+@@ -19,12 +330,12 @@
+
+ 2004-09-13 Richard Henderson <rth@redhat.com>
+
+- PR inline-asm/6806
+- * cselib.c (cselib_invalidate_rtx): Export. Remove unused args.
+- (cselib_invalidate_rtx_note_stores): New.
+- (cselib_record_sets, cselib_process_insn): Update to match.
+- * cselib.h (cselib_invalidate_rtx): Declare.
+- * reload1.c (reload_cse_simplify): Invalidate asm clobbers.
++ PR inline-asm/6806
++ * cselib.c (cselib_invalidate_rtx): Export. Remove unused args.
++ (cselib_invalidate_rtx_note_stores): New.
++ (cselib_record_sets, cselib_process_insn): Update to match.
++ * cselib.h (cselib_invalidate_rtx): Declare.
++ * reload1.c (reload_cse_simplify): Invalidate asm clobbers.
+
+ 2004-08-29 Jonathan Wakely <redi@gcc.gnu.org>
+
+@@ -83,7 +394,7 @@
+ 2004-07-25 Andreas Jaeger <aj@suse.de>
+
+ Backport from mainline:
+- * libgcc-std.ver: Add __unorddf2 and __unordsf2 with version 3.3.4.
++ * libgcc-std.ver: Add __unorddf2 and __unordsf2 with version 3.3.4.
+
+ 2004-07-25 Kaz Kojima <kkojima@gcc.gnu.org>
+
+@@ -155,14 +466,14 @@
+ side-effect of having a length greater or equal to 3.
+
+ 2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
+- Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
++ Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
+
+ PR target/15186
+ * config/sparc/sol2-bi.h (LINK_ARCH64_SPEC_BASE): Pass
+ /usr/ucblib/sparcv9 as -R path when -compat-bsd is specified.
+
+ 2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
+- Martin Sebor <sebor@roguewave.com>
++ Martin Sebor <sebor@roguewave.com>
+
+ PR target/12602
+ * doc/invoke.texi (SPARC options): Document -threads
+@@ -252,18 +563,18 @@
+
+ Backport from mainline:
+ 2004-01-19 Richard Henderson <rth@redhat.com>
+- * alpha.md (UNSPEC_NT_LDA): Renumber.
+- (UNSPEC_CVTLQ, cvtlq): New.
+- (extendsidi2_1): Rename from extendsidi2_nofix; remove f/f.
+- (extendsidi2_fix): Remove.
+- (extendsidi2 splitter): Use cvtlq.
+- (extendsidi2 fp peepholes): Remove.
+- (cvtql): Use SFmode instead of SImode.
+- (fix_trunc?fsi): Update to match.
+- (floatsisf2_ieee, floatsisf2, floatsidf2_ieee, floatsidf2): New.
+- (movsi): Rename from movsi_nofix, remove f alternatives.
+- (movsi_nt_vms): Similarly.
+- (movsi_fix, movsi_nt_vms_fix): Remove.
++ * alpha.md (UNSPEC_NT_LDA): Renumber.
++ (UNSPEC_CVTLQ, cvtlq): New.
++ (extendsidi2_1): Rename from extendsidi2_nofix; remove f/f.
++ (extendsidi2_fix): Remove.
++ (extendsidi2 splitter): Use cvtlq.
++ (extendsidi2 fp peepholes): Remove.
++ (cvtql): Use SFmode instead of SImode.
++ (fix_trunc?fsi): Update to match.
++ (floatsisf2_ieee, floatsisf2, floatsidf2_ieee, floatsidf2): New.
++ (movsi): Rename from movsi_nofix, remove f alternatives.
++ (movsi_nt_vms): Similarly.
++ (movsi_fix, movsi_nt_vms_fix): Remove.
+
+ 2004-05-26 Hans-Peter Nilsson <hp@axis.com>
+
+Index: gcc/aclocal.m4
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
+retrieving revision 1.61.2.4
+retrieving revision 1.61.2.5
+diff -u -r1.61.2.4 -r1.61.2.5
+--- gcc/gcc/aclocal.m4 1 Oct 2003 21:56:34 -0000 1.61.2.4
++++ gcc/gcc/aclocal.m4 4 Dec 2004 01:51:47 -0000 1.61.2.5
+@@ -413,7 +413,7 @@
+ # read() to the same fd. The only system known to have a problem here
+ # is VMS, where text files have record structure.
+ case "$host_os" in
+- vms*)
++ vms* | ultrix*)
+ gcc_cv_func_mmap_file=no ;;
+ *)
+ gcc_cv_func_mmap_file=yes;;
+Index: gcc/alias.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/alias.c,v
+retrieving revision 1.181.2.6
+retrieving revision 1.181.2.7
+diff -u -r1.181.2.6 -r1.181.2.7
+--- gcc/gcc/alias.c 28 May 2004 17:27:27 -0000 1.181.2.6
++++ gcc/gcc/alias.c 10 Dec 2004 17:25:00 -0000 1.181.2.7
+@@ -508,6 +508,8 @@
+ /* If we haven't computed the actual alias set, do it now. */
+ if (DECL_POINTER_ALIAS_SET (decl) == -2)
+ {
++ tree pointed_to_type = TREE_TYPE (TREE_TYPE (decl));
++
+ /* No two restricted pointers can point at the same thing.
+ However, a restricted pointer can point at the same thing
+ as an unrestricted pointer, if that unrestricted pointer
+@@ -516,11 +518,22 @@
+ alias set for the type pointed to by the type of the
+ decl. */
+ HOST_WIDE_INT pointed_to_alias_set
+- = get_alias_set (TREE_TYPE (TREE_TYPE (decl)));
++ = get_alias_set (pointed_to_type);
+
+ if (pointed_to_alias_set == 0)
+ /* It's not legal to make a subset of alias set zero. */
+- ;
++ DECL_POINTER_ALIAS_SET (decl) = 0;
++ else if (AGGREGATE_TYPE_P (pointed_to_type))
++ /* For an aggregate, we must treat the restricted
++ pointer the same as an ordinary pointer. If we
++ were to make the type pointed to by the
++ restricted pointer a subset of the pointed-to
++ type, then we would believe that other subsets
++ of the pointed-to type (such as fields of that
++ type) do not conflict with the type pointed to
++ by the restricted pointer. */
++ DECL_POINTER_ALIAS_SET (decl)
++ = pointed_to_alias_set;
+ else
+ {
+ DECL_POINTER_ALIAS_SET (decl) = new_alias_set ();
+Index: gcc/c-parse.in
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/c-parse.in,v
+retrieving revision 1.152.14.1
+retrieving revision 1.152.14.2
+diff -u -r1.152.14.1 -r1.152.14.2
+--- gcc/gcc/c-parse.in 28 Jan 2003 01:54:03 -0000 1.152.14.1
++++ gcc/gcc/c-parse.in 21 Dec 2004 21:51:26 -0000 1.152.14.2
+@@ -2177,6 +2177,7 @@
+ push_label_level ();
+ compstmt_count++;
+ $$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree));
++ last_expr_type = NULL_TREE;
+ }
+ ;
+
+Index: gcc/combine.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/combine.c,v
+retrieving revision 1.325.2.17
+retrieving revision 1.325.2.19
+diff -u -r1.325.2.17 -r1.325.2.19
+--- gcc/gcc/combine.c 25 Jul 2004 18:49:54 -0000 1.325.2.17
++++ gcc/gcc/combine.c 18 Jan 2005 08:39:05 -0000 1.325.2.19
+@@ -10138,13 +10138,8 @@
+
+ result = gen_lowpart_common (mode, x);
+ #ifdef CANNOT_CHANGE_MODE_CLASS
+- if (result != 0
+- && GET_CODE (result) == SUBREG
+- && GET_CODE (SUBREG_REG (result)) == REG
+- && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER)
+- bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (result))
+- * MAX_MACHINE_MODE
+- + GET_MODE (result));
++ if (result != 0 && GET_CODE (result) == SUBREG)
++ record_subregs_of_mode (result);
+ #endif
+
+ if (result)
+@@ -10818,34 +10813,61 @@
+ break;
+
+ case SUBREG:
+- /* Check for the case where we are comparing A - C1 with C2,
+- both constants are smaller than 1/2 the maximum positive
+- value in MODE, and the comparison is equality or unsigned.
+- In that case, if A is either zero-extended to MODE or has
+- sufficient sign bits so that the high-order bit in MODE
+- is a copy of the sign in the inner mode, we can prove that it is
+- safe to do the operation in the wider mode. This simplifies
+- many range checks. */
++ /* Check for the case where we are comparing A - C1 with C2, that is
++
++ (subreg:MODE (plus (A) (-C1))) op (C2)
++
++ with C1 a constant, and try to lift the SUBREG, i.e. to do the
++ comparison in the wider mode. One of the following two conditions
++ must be true in order for this to be valid:
++
++ 1. The mode extension results in the same bit pattern being added
++ on both sides and the comparison is equality or unsigned. As
++ C2 has been truncated to fit in MODE, the pattern can only be
++ all 0s or all 1s.
++
++ 2. The mode extension results in the sign bit being copied on
++ each side.
++
++ The difficulty here is that we have predicates for A but not for
++ (A - C1) so we need to check that C1 is within proper bounds so
++ as to perturbate A as little as possible. */
+
+ if (mode_width <= HOST_BITS_PER_WIDE_INT
+ && subreg_lowpart_p (op0)
++ && GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) > mode_width
+ && GET_CODE (SUBREG_REG (op0)) == PLUS
+- && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT
+- && INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0
+- && (-INTVAL (XEXP (SUBREG_REG (op0), 1))
+- < (HOST_WIDE_INT) (GET_MODE_MASK (mode) / 2))
+- && (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2
+- && (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0),
+- GET_MODE (SUBREG_REG (op0)))
+- & ~GET_MODE_MASK (mode))
+- || (num_sign_bit_copies (XEXP (SUBREG_REG (op0), 0),
+- GET_MODE (SUBREG_REG (op0)))
+- > (unsigned int)
+- (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
+- - GET_MODE_BITSIZE (mode)))))
++ && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT)
+ {
+- op0 = SUBREG_REG (op0);
+- continue;
++ enum machine_mode inner_mode = GET_MODE (SUBREG_REG (op0));
++ rtx a = XEXP (SUBREG_REG (op0), 0);
++ HOST_WIDE_INT c1 = -INTVAL (XEXP (SUBREG_REG (op0), 1));
++
++ if ((c1 > 0
++ && (unsigned HOST_WIDE_INT) c1
++ < (unsigned HOST_WIDE_INT) 1 << (mode_width - 1)
++ && (equality_comparison_p || unsigned_comparison_p)
++ /* (A - C1) zero-extends if it is positive and sign-extends
++ if it is negative, C2 both zero- and sign-extends. */
++ && ((0 == (nonzero_bits (a, inner_mode)
++ & ~GET_MODE_MASK (mode))
++ && const_op >= 0)
++ /* (A - C1) sign-extends if it is positive and 1-extends
++ if it is negative, C2 both sign- and 1-extends. */
++ || (num_sign_bit_copies (a, inner_mode)
++ > (unsigned int) (GET_MODE_BITSIZE (inner_mode)
++ - mode_width)
++ && const_op < 0)))
++ || ((unsigned HOST_WIDE_INT) c1
++ < (unsigned HOST_WIDE_INT) 1 << (mode_width - 2)
++ /* (A - C1) always sign-extends, like C2. */
++ && num_sign_bit_copies (a, inner_mode)
++ > (unsigned int) (GET_MODE_BITSIZE (inner_mode)
++ - mode_width - 1)))
++ {
++ op0 = SUBREG_REG (op0);
++ continue;
++ }
+ }
+
+ /* If the inner mode is narrower and we are extracting the low part,
+Index: gcc/configure
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/configure,v
+retrieving revision 1.641.2.23
+retrieving revision 1.641.2.24
+diff -u -r1.641.2.23 -r1.641.2.24
+--- gcc/gcc/configure 1 Apr 2004 16:55:23 -0000 1.641.2.23
++++ gcc/gcc/configure 4 Dec 2004 01:51:43 -0000 1.641.2.24
+@@ -2399,7 +2399,7 @@
+ fi
+
+ # Find some useful tools
+-for ac_prog in gawk mawk nawk awk
++for ac_prog in mawk gawk 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
+@@ -3947,7 +3947,7 @@
+ # read() to the same fd. The only system known to have a problem here
+ # is VMS, where text files have record structure.
+ case "$host_os" in
+- vms*)
++ vms* | ultrix*)
+ gcc_cv_func_mmap_file=no ;;
+ *)
+ gcc_cv_func_mmap_file=yes;;
+@@ -8120,7 +8120,7 @@
+ echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
+
+ echo $ac_n "checking linker --as-needed support""... $ac_c" 1>&6
+-echo "configure:8250: checking linker --as-needed support" >&5
++echo "configure:8124: checking linker --as-needed support" >&5
+ gcc_cv_ld_as_needed=no
+ if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
+@@ -8144,7 +8144,7 @@
+ case "$target" in
+ mips*-*-*)
+ echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
+-echo "configure:8127: checking whether libgloss uses STARTUP directives consistently" >&5
++echo "configure:8148: checking whether libgloss uses STARTUP directives consistently" >&5
+ gcc_cv_mips_libgloss_startup=no
+ gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
+ if test "x$exec_prefix" = xNONE; then
+@@ -8349,7 +8349,7 @@
+
+
+ echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+-echo "configure:8332: checking whether to enable maintainer-specific portions of Makefiles" >&5
++echo "configure:8353: checking whether to enable maintainer-specific portions of Makefiles" >&5
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+ if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+Index: gcc/emit-rtl.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
+retrieving revision 1.303.2.5
+retrieving revision 1.303.2.7
+diff -u -r1.303.2.5 -r1.303.2.7
+--- gcc/gcc/emit-rtl.c 18 Jun 2004 17:08:48 -0000 1.303.2.5
++++ gcc/gcc/emit-rtl.c 14 Dec 2004 04:06:08 -0000 1.303.2.7
+@@ -2890,11 +2890,19 @@
+ {
+ rtx insn = first_insn;
+
+- while (insn)
++ if (insn)
+ {
+- insn = next_insn (insn);
+- if (insn == 0 || GET_CODE (insn) != NOTE)
+- break;
++ if (NOTE_P (insn))
++ for (insn = next_insn (insn);
++ insn && NOTE_P (insn);
++ insn = next_insn (insn))
++ continue;
++ else
++ {
++ if (GET_CODE (insn) == INSN
++ && GET_CODE (PATTERN (insn)) == SEQUENCE)
++ insn = XVECEXP (PATTERN (insn), 0, 0);
++ }
+ }
+
+ return insn;
+@@ -2908,11 +2916,20 @@
+ {
+ rtx insn = last_insn;
+
+- while (insn)
++ if (insn)
+ {
+- insn = previous_insn (insn);
+- if (insn == 0 || GET_CODE (insn) != NOTE)
+- break;
++ if (NOTE_P (insn))
++ for (insn = previous_insn (insn);
++ insn && NOTE_P (insn);
++ insn = previous_insn (insn))
++ continue;
++ else
++ {
++ if (GET_CODE (insn) == INSN
++ && GET_CODE (PATTERN (insn)) == SEQUENCE)
++ insn = XVECEXP (PATTERN (insn), 0,
++ XVECLEN (PATTERN (insn), 0) - 1);
++ }
+ }
+
+ return insn;
+Index: gcc/expr.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/expr.c,v
+retrieving revision 1.498.2.31
+retrieving revision 1.498.2.32
+diff -u -r1.498.2.31 -r1.498.2.32
+--- gcc/gcc/expr.c 16 May 2004 20:27:15 -0000 1.498.2.31
++++ gcc/gcc/expr.c 20 Dec 2004 02:43:00 -0000 1.498.2.32
+@@ -8462,9 +8462,14 @@
+ /* At this point, a MEM target is no longer useful; we will get better
+ code without it. */
+
+- if (GET_CODE (target) == MEM)
++ if (! REG_P (target))
+ target = gen_reg_rtx (mode);
+
++ /* We generate better code and avoid problems with op1 mentioning
++ target by forcing op1 into a pseudo if it isn't a constant. */
++ if (! CONSTANT_P (op1))
++ op1 = force_reg (mode, op1);
++
+ if (target != op0)
+ emit_move_insn (target, op0);
+
+Index: gcc/flow.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/flow.c,v
+retrieving revision 1.541.2.6
+retrieving revision 1.541.2.7
+diff -u -r1.541.2.6 -r1.541.2.7
+--- gcc/gcc/flow.c 5 Mar 2004 17:55:50 -0000 1.541.2.6
++++ gcc/gcc/flow.c 4 Dec 2004 00:36:35 -0000 1.541.2.7
+@@ -431,9 +431,8 @@
+ SET_HARD_REG_BIT (elim_reg_set, FRAME_POINTER_REGNUM);
+ #endif
+
+-
+ #ifdef CANNOT_CHANGE_MODE_CLASS
+- bitmap_initialize (&subregs_of_mode, 1);
++ init_subregs_of_mode ();
+ #endif
+
+ if (! optimize)
+@@ -3851,11 +3850,7 @@
+
+ case SUBREG:
+ #ifdef CANNOT_CHANGE_MODE_CLASS
+- if (GET_CODE (SUBREG_REG (x)) == REG
+- && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)
+- bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x))
+- * MAX_MACHINE_MODE
+- + GET_MODE (x));
++ record_subregs_of_mode (x);
+ #endif
+
+ /* While we're here, optimize this case. */
+@@ -3900,12 +3895,8 @@
+ || GET_CODE (testreg) == SUBREG)
+ {
+ #ifdef CANNOT_CHANGE_MODE_CLASS
+- if (GET_CODE (testreg) == SUBREG
+- && GET_CODE (SUBREG_REG (testreg)) == REG
+- && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER)
+- bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg))
+- * MAX_MACHINE_MODE
+- + GET_MODE (testreg));
++ if (GET_CODE (testreg) == SUBREG)
++ record_subregs_of_mode (testreg);
+ #endif
+
+ /* Modifying a single register in an alternate mode
+Index: gcc/function.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/function.c,v
+retrieving revision 1.389.2.16
+retrieving revision 1.389.2.18
+diff -u -r1.389.2.16 -r1.389.2.18
+--- gcc/gcc/function.c 16 May 2004 20:27:16 -0000 1.389.2.16
++++ gcc/gcc/function.c 16 Dec 2004 14:04:34 -0000 1.389.2.18
+@@ -226,9 +226,8 @@
+ int, struct function *));
+ static struct temp_slot *find_temp_slot_from_address PARAMS ((rtx));
+ static void put_reg_into_stack PARAMS ((struct function *, rtx, tree,
+- enum machine_mode, enum machine_mode,
+- int, unsigned int, int,
+- htab_t));
++ enum machine_mode, unsigned int,
++ int, int, int, htab_t));
+ static void schedule_fixup_var_refs PARAMS ((struct function *, rtx, tree,
+ enum machine_mode,
+ htab_t));
+@@ -508,6 +507,7 @@
+ ALIGN controls the amount of alignment for the address of the slot:
+ 0 means according to MODE,
+ -1 means use BIGGEST_ALIGNMENT and round size to multiple of that,
++ -2 means use BITS_PER_UNIT,
+ positive specifies alignment boundary in bits.
+
+ We do not round to stack_boundary here.
+@@ -548,6 +548,8 @@
+ alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
+ size = CEIL_ROUND (size, alignment);
+ }
++ else if (align == -2)
++ alignment = 1; /* BITS_PER_UNIT / BITS_PER_UNIT */
+ else
+ alignment = align / BITS_PER_UNIT;
+
+@@ -1342,9 +1344,9 @@
+ enum machine_mode promoted_mode, decl_mode;
+ struct function *function = 0;
+ tree context;
+- int can_use_addressof;
+- int volatilep = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);
+- int usedp = (TREE_USED (decl)
++ int can_use_addressof_p;
++ int volatile_p = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);
++ int used_p = (TREE_USED (decl)
+ || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0));
+
+ context = decl_function_context (decl);
+@@ -1391,7 +1393,7 @@
+ /* If this variable lives in the current function and we don't need to put it
+ in the stack for the sake of setjmp or the non-locality, try to keep it in
+ a register until we know we actually need the address. */
+- can_use_addressof
++ can_use_addressof_p
+ = (function == 0
+ && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl))
+ && optimize > 0
+@@ -1404,7 +1406,8 @@
+
+ /* If we can't use ADDRESSOF, make sure we see through one we already
+ generated. */
+- if (! can_use_addressof && GET_CODE (reg) == MEM
++ if (! can_use_addressof_p
++ && GET_CODE (reg) == MEM
+ && GET_CODE (XEXP (reg, 0)) == ADDRESSOF)
+ reg = XEXP (XEXP (reg, 0), 0);
+
+@@ -1412,11 +1415,11 @@
+
+ if (GET_CODE (reg) == REG)
+ {
+- if (can_use_addressof)
++ if (can_use_addressof_p)
+ gen_mem_addressof (reg, decl, rescan);
+ else
+- put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode,
+- decl_mode, volatilep, 0, usedp, 0);
++ put_reg_into_stack (function, reg, TREE_TYPE (decl), decl_mode,
++ 0, volatile_p, used_p, 0, 0);
+ }
+ else if (GET_CODE (reg) == CONCAT)
+ {
+@@ -1432,14 +1435,14 @@
+ #ifdef FRAME_GROWS_DOWNWARD
+ /* Since part 0 should have a lower address, do it second. */
+ put_reg_into_stack (function, hipart, part_type, part_mode,
+- part_mode, volatilep, 0, 0, 0);
++ 0, volatile_p, 0, 0, 0);
+ put_reg_into_stack (function, lopart, part_type, part_mode,
+- part_mode, volatilep, 0, 0, 0);
++ 0, volatile_p, 0, 1, 0);
+ #else
+ put_reg_into_stack (function, lopart, part_type, part_mode,
+- part_mode, volatilep, 0, 0, 0);
++ 0, volatile_p, 0, 0, 0);
+ put_reg_into_stack (function, hipart, part_type, part_mode,
+- part_mode, volatilep, 0, 0, 0);
++ 0, volatile_p, 0, 1, 0);
+ #endif
+
+ /* Change the CONCAT into a combined MEM for both parts. */
+@@ -1460,7 +1463,7 @@
+ /* Prevent sharing of rtl that might lose. */
+ if (GET_CODE (XEXP (reg, 0)) == PLUS)
+ XEXP (reg, 0) = copy_rtx (XEXP (reg, 0));
+- if (usedp && rescan)
++ if (used_p && rescan)
+ {
+ schedule_fixup_var_refs (function, reg, TREE_TYPE (decl),
+ promoted_mode, 0);
+@@ -1474,26 +1477,29 @@
+
+ /* Subroutine of put_var_into_stack. This puts a single pseudo reg REG
+ into the stack frame of FUNCTION (0 means the current function).
++ TYPE is the user-level data type of the value hold in the register.
+ DECL_MODE is the machine mode of the user-level data type.
+- PROMOTED_MODE is the machine mode of the register.
+- VOLATILE_P is nonzero if this is for a "volatile" decl.
+- USED_P is nonzero if this reg might have already been used in an insn. */
++ ORIGINAL_REGNO must be set if the real regno is not visible in REG.
++ VOLATILE_P is true if this is for a "volatile" decl.
++ USED_P is true if this reg might have already been used in an insn.
++ CONSECUTIVE_P is true if the stack slot assigned to reg must be
++ consecutive with the previous stack slot. */
+
+ static void
+-put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
+- original_regno, used_p, ht)
++put_reg_into_stack (function, reg, type, decl_mode, original_regno,
++ volatile_p, used_p, consecutive_p, ht)
+ struct function *function;
+ rtx reg;
+ tree type;
+- enum machine_mode promoted_mode, decl_mode;
+- int volatile_p;
++ enum machine_mode decl_mode;
+ unsigned int original_regno;
+- int used_p;
++ int volatile_p, used_p, consecutive_p;
+ htab_t ht;
+ {
+ struct function *func = function ? function : cfun;
+- rtx new = 0;
++ enum machine_mode mode = GET_MODE (reg);
+ unsigned int regno = original_regno;
++ rtx new = 0;
+
+ if (regno == 0)
+ regno = REGNO (reg);
+@@ -1506,7 +1512,8 @@
+ }
+
+ if (new == 0)
+- new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);
++ new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode),
++ consecutive_p ? -2 : 0, func);
+
+ PUT_CODE (reg, MEM);
+ PUT_MODE (reg, decl_mode);
+@@ -1528,7 +1535,7 @@
+ }
+
+ if (used_p)
+- schedule_fixup_var_refs (function, reg, type, promoted_mode, ht);
++ schedule_fixup_var_refs (function, reg, type, mode, ht);
+ }
+
+ /* Make sure that all refs to the variable, previously made
+@@ -1716,7 +1723,7 @@
+ tmp.key = var;
+ ime = (struct insns_for_mem_entry *) htab_find (ht, &tmp);
+ for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1))
+- if (INSN_P (XEXP (insn_list, 0)))
++ if (INSN_P (XEXP (insn_list, 0)) && !INSN_DELETED_P (XEXP (insn_list, 0)))
+ fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode,
+ unsignedp, 1, may_share);
+ }
+@@ -3025,8 +3032,8 @@
+ used_p = 1;
+ }
+
+- put_reg_into_stack (0, reg, type, GET_MODE (reg), GET_MODE (reg),
+- volatile_p, ADDRESSOF_REGNO (r), used_p, ht);
++ put_reg_into_stack (0, reg, type, GET_MODE (reg), ADDRESSOF_REGNO (r),
++ volatile_p, used_p, 0, ht);
+ }
+
+ /* List of replacements made below in purge_addressof_1 when creating
+Index: gcc/gccbug.in
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gccbug.in,v
+retrieving revision 1.15.34.1
+retrieving revision 1.15.34.2
+diff -u -r1.15.34.1 -r1.15.34.2
+--- gcc/gcc/gccbug.in 2 Jan 2003 05:22:37 -0000 1.15.34.1
++++ gcc/gcc/gccbug.in 21 Jan 2005 10:08:47 -0000 1.15.34.2
+@@ -198,7 +198,7 @@
+ done
+
+ # spam does not need to be listed here
+-CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc optimization other preprocessor target web"
++CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc other preprocessor rtl-optimization target tree-optimization web"
+
+ case "$FORMAT" in
+ lisp) echo "$CATEGORIES" | \
+Index: gcc/regclass.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
+retrieving revision 1.160.4.5
+retrieving revision 1.160.4.8
+diff -u -r1.160.4.5 -r1.160.4.8
+--- gcc/gcc/regclass.c 3 Mar 2003 11:00:15 -0000 1.160.4.5
++++ gcc/gcc/regclass.c 4 Dec 2004 00:36:37 -0000 1.160.4.8
+@@ -41,6 +41,7 @@
+ #include "toplev.h"
+ #include "output.h"
+ #include "ggc.h"
++#include "hashtab.h"
+
+ #ifndef REGISTER_MOVE_COST
+ #define REGISTER_MOVE_COST(m, x, y) 2
+@@ -105,6 +106,13 @@
+ char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
+ #endif
+
++#ifdef CALL_REALLY_USED_REGISTERS
++#define CALL_REALLY_USED_REGNO_P(X) call_really_used_regs[X]
++#else
++#define CALL_REALLY_USED_REGNO_P(X) call_used_regs[X]
++#endif
++
++
+ /* Indexed by hard register number, contains 1 for registers that are
+ fixed use or call used registers that cannot hold quantities across
+ calls even if we are willing to save and restore them. call fixed
+@@ -228,12 +236,6 @@
+
+ #endif /* FORBIDDEN_INC_DEC_CLASSES */
+
+-#ifdef CANNOT_CHANGE_MODE_CLASS
+-/* All registers that have been subreged. Indexed by regno * MAX_MACHINE_MODE
+- + mode. */
+-bitmap_head subregs_of_mode;
+-#endif
+-
+ /* Sample MEM values for use by memory_move_secondary_cost. */
+
+ static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE];
+@@ -447,7 +449,11 @@
+ If we are generating PIC code, the PIC offset table register is
+ preserved across calls, though the target can override that. */
+
+- if (i == STACK_POINTER_REGNUM || i == FRAME_POINTER_REGNUM)
++ if (i == STACK_POINTER_REGNUM)
++ ;
++ else if (global_regs[i])
++ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
++ else if (i == FRAME_POINTER_REGNUM)
+ ;
+ #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
+ else if (i == HARD_FRAME_POINTER_REGNUM)
+@@ -461,13 +467,7 @@
+ else if (i == PIC_OFFSET_TABLE_REGNUM && fixed_regs[i])
+ ;
+ #endif
+- else if (0
+-#ifdef CALL_REALLY_USED_REGISTERS
+- || call_really_used_regs[i]
+-#else
+- || call_used_regs[i]
+-#endif
+- || global_regs[i])
++ else if (CALL_REALLY_USED_REGNO_P (i))
+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ }
+
+@@ -792,6 +792,12 @@
+
+ global_regs[i] = 1;
+
++ /* If we're globalizing the frame pointer, we need to set the
++ appropriate regs_invalidated_by_call bit, even if it's already
++ set in fixed_regs. */
++ if (i != STACK_POINTER_REGNUM)
++ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
++
+ /* If already fixed, nothing else to do. */
+ if (fixed_regs[i])
+ return;
+@@ -802,7 +808,6 @@
+ SET_HARD_REG_BIT (fixed_reg_set, i);
+ SET_HARD_REG_BIT (call_used_reg_set, i);
+ SET_HARD_REG_BIT (call_fixed_reg_set, i);
+- SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ }
+
+ /* Now the data and code for the `regclass' pass, which happens
+@@ -2415,9 +2420,15 @@
+
+ if (regno >= min_regno)
+ {
++ /* While the following 3 lines means that the inequality
++ REGNO_LAST_UID (regno) <= REGNO_LAST_NOTE_UID (regno)
++ is true at the end of the scanning, it may be subsequently
++ invalidated (e.g. in load_mems) so it should not be relied
++ upon. */
+ REGNO_LAST_NOTE_UID (regno) = INSN_UID (insn);
+ if (!note_flag)
+ REGNO_LAST_UID (regno) = INSN_UID (insn);
++
+ if (REGNO_FIRST_UID (regno) == 0)
+ REGNO_FIRST_UID (regno) = INSN_UID (insn);
+ /* If we are called by reg_scan_update() (indicated by min_regno
+@@ -2614,6 +2625,77 @@
+ }
+
+ #ifdef CANNOT_CHANGE_MODE_CLASS
++
++struct subregs_of_mode_node
++{
++ unsigned int block;
++ unsigned char modes[MAX_MACHINE_MODE];
++};
++
++static htab_t subregs_of_mode;
++
++static hashval_t som_hash PARAMS ((const void *));
++static int som_eq PARAMS ((const void *, const void *));
++
++static hashval_t
++som_hash (x)
++ const void *x;
++{
++ const struct subregs_of_mode_node *a = x;
++ return a->block;
++}
++
++static int
++som_eq (x, y)
++ const void *x;
++ const void *y;
++{
++ const struct subregs_of_mode_node *a = x;
++ const struct subregs_of_mode_node *b = y;
++ return a->block == b->block;
++}
++
++void
++init_subregs_of_mode ()
++{
++ if (subregs_of_mode)
++ htab_empty (subregs_of_mode);
++ else
++ subregs_of_mode = htab_create (100, som_hash, som_eq, free);
++}
++
++void
++record_subregs_of_mode (subreg)
++ rtx subreg;
++{
++ struct subregs_of_mode_node dummy, *node;
++ enum machine_mode mode;
++ unsigned int regno;
++ void **slot;
++
++ if (!REG_P (SUBREG_REG (subreg)))
++ return;
++
++ regno = REGNO (SUBREG_REG (subreg));
++ mode = GET_MODE (subreg);
++
++ if (regno < FIRST_PSEUDO_REGISTER)
++ return;
++
++ dummy.block = regno & -8;
++ slot = htab_find_slot_with_hash (subregs_of_mode, &dummy,
++ dummy.block, INSERT);
++ node = *slot;
++ if (node == NULL)
++ {
++ node = xcalloc (1, sizeof (*node));
++ node->block = regno & -8;
++ *slot = node;
++ }
++
++ node->modes[mode] |= 1 << (regno & 7);
++}
++
+ /* Set bits in *USED which correspond to registers which can't change
+ their mode from FROM to any mode in which REGNO was encountered. */
+
+@@ -2623,42 +2705,50 @@
+ enum machine_mode from;
+ unsigned int regno;
+ {
++ struct subregs_of_mode_node dummy, *node;
+ enum machine_mode to;
+- int n, i;
+- int start = regno * MAX_MACHINE_MODE;
++ unsigned char mask;
++ unsigned int i;
+
+- EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,
+- if (n >= MAX_MACHINE_MODE + start)
+- return;
+- to = n - start;
+- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+- if (! TEST_HARD_REG_BIT (*used, i)
+- && REG_CANNOT_CHANGE_MODE_P (i, from, to))
+- SET_HARD_REG_BIT (*used, i);
+- );
++ dummy.block = regno & -8;
++ node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
++ if (node == NULL)
++ return;
++
++ mask = 1 << (regno & 7);
++ for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
++ if (node->modes[to] & mask)
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ if (!TEST_HARD_REG_BIT (*used, i)
++ && REG_CANNOT_CHANGE_MODE_P (i, from, to))
++ SET_HARD_REG_BIT (*used, i);
+ }
+
+ /* Return 1 if REGNO has had an invalid mode change in CLASS from FROM
+ mode. */
+
+ bool
+-invalid_mode_change_p (regno, class, from_mode)
++invalid_mode_change_p (regno, class, from)
+ unsigned int regno;
+- enum reg_class class;
+- enum machine_mode from_mode;
++ enum reg_class class;
++ enum machine_mode from;
+ {
+- enum machine_mode to_mode;
+- int n;
+- int start = regno * MAX_MACHINE_MODE;
+-
+- EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,
+- if (n >= MAX_MACHINE_MODE + start)
+- return 0;
+- to_mode = n - start;
+- if (CANNOT_CHANGE_MODE_CLASS (from_mode, to_mode, class))
+- return 1;
+- );
+- return 0;
++ struct subregs_of_mode_node dummy, *node;
++ enum machine_mode to;
++ unsigned char mask;
++
++ dummy.block = regno & -8;
++ node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
++ if (node == NULL)
++ return false;
++
++ mask = 1 << (regno & 7);
++ for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
++ if (node->modes[to] & mask)
++ if (CANNOT_CHANGE_MODE_CLASS (from, to, class))
++ return true;
++
++ return false;
+ }
+ #endif /* CANNOT_CHANGE_MODE_CLASS */
+
+Index: gcc/regs.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/regs.h,v
+retrieving revision 1.26.4.1
+retrieving revision 1.26.4.3
+diff -u -r1.26.4.1 -r1.26.4.3
+--- gcc/gcc/regs.h 3 Mar 2003 11:00:15 -0000 1.26.4.1
++++ gcc/gcc/regs.h 4 Dec 2004 00:36:38 -0000 1.26.4.3
+@@ -49,6 +49,9 @@
+ int first_uid; /* UID of first insn to use (REG n) */
+ int last_uid; /* UID of last insn to use (REG n) */
+ int last_note_uid; /* UID of last note to use (REG n) */
++ /* See the comment in reg_scan_mark_refs on
++ the relationship between last_uid and
++ last_note_uid. */
+
+ /* fields set by reg_scan & flow_analysis */
+ int sets; /* # of times (REG n) is set */
+@@ -66,8 +69,6 @@
+
+ extern varray_type reg_n_info;
+
+-extern bitmap_head subregs_of_mode;
+-
+ /* Indexed by n, gives number of times (REG n) is used or set. */
+
+ #define REG_N_REFS(N) (VARRAY_REG (reg_n_info, N)->refs)
+Index: gcc/reload1.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
+retrieving revision 1.366.2.11
+retrieving revision 1.366.2.12
+diff -u -r1.366.2.11 -r1.366.2.12
+--- gcc/gcc/reload1.c 13 Sep 2004 08:54:35 -0000 1.366.2.11
++++ gcc/gcc/reload1.c 26 Nov 2004 05:08:45 -0000 1.366.2.12
+@@ -3389,6 +3389,16 @@
+ num_not_at_initial_offset = 0;
+ }
+
++/* Subroutine of set_initial_label_offsets called via for_each_eh_label. */
++
++static void set_initial_eh_label_offset PARAMS ((rtx));
++static void
++set_initial_eh_label_offset (label)
++ rtx label;
++{
++ set_label_offsets (label, NULL_RTX, 1);
++}
++
+ /* Initialize the known label offsets.
+ Set a known offset for each forced label to be at the initial offset
+ of each elimination. We do this because we assume that all
+@@ -3405,6 +3415,8 @@
+ for (x = forced_labels; x; x = XEXP (x, 1))
+ if (XEXP (x, 0))
+ set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
++
++ for_each_eh_label (set_initial_eh_label_offset);
+ }
+
+ /* Set all elimination offsets to the known values for the code label given
+Index: gcc/rtl.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
+retrieving revision 1.375.2.8
+retrieving revision 1.375.2.9
+diff -u -r1.375.2.8 -r1.375.2.9
+--- gcc/gcc/rtl.h 24 Apr 2004 19:40:45 -0000 1.375.2.8
++++ gcc/gcc/rtl.h 4 Dec 2004 00:36:38 -0000 1.375.2.9
+@@ -2120,6 +2120,8 @@
+ extern void reg_scan PARAMS ((rtx, unsigned int, int));
+ extern void reg_scan_update PARAMS ((rtx, rtx, unsigned int));
+ extern void fix_register PARAMS ((const char *, int, int));
++extern void init_subregs_of_mode PARAMS ((void));
++extern void record_subregs_of_mode PARAMS ((rtx));
+ #ifdef HARD_CONST
+ extern void cannot_change_mode_set_regs PARAMS ((HARD_REG_SET *,
+ enum machine_mode,
+Index: gcc/tree-inline.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
+retrieving revision 1.38.2.12
+retrieving revision 1.38.2.13
+diff -u -r1.38.2.12 -r1.38.2.13
+--- gcc/gcc/tree-inline.c 12 Mar 2004 22:43:29 -0000 1.38.2.12
++++ gcc/gcc/tree-inline.c 21 Jan 2005 10:02:12 -0000 1.38.2.13
+@@ -1173,7 +1173,8 @@
+ if (!inlinable_function_p (fn, id))
+ {
+ if (warn_inline && DECL_INLINE (fn) && !DID_INLINE_FUNC (fn)
+- && !DECL_IN_SYSTEM_HEADER (fn))
++ && !DECL_IN_SYSTEM_HEADER (fn)
++ && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn)))
+ {
+ warning_with_decl (fn, "inlining failed in call to `%s'");
+ warning ("called from here");
+Index: gcc/unroll.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/Attic/unroll.c,v
+retrieving revision 1.184.2.9
+retrieving revision 1.184.2.10
+diff -u -r1.184.2.9 -r1.184.2.10
+--- gcc/gcc/unroll.c 17 May 2004 21:05:48 -0000 1.184.2.9
++++ gcc/gcc/unroll.c 27 Nov 2004 16:59:15 -0000 1.184.2.10
+@@ -794,6 +794,10 @@
+ for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
+ if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
+ && REGNO_FIRST_LUID (r) >= copy_start_luid
++ /* See the comment in reg_scan_mark_refs on the relationship between
++ last_uid and last_note_uid. */
++ && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
++ && REGNO_LAST_LUID (r) <= copy_end_luid
+ && REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) < max_uid_for_loop
+ && REGNO_LAST_NOTE_LUID (r) <= copy_end_luid)
+ {
+Index: gcc/unwind-dw2.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,v
+retrieving revision 1.22.2.9
+retrieving revision 1.22.2.11
+diff -u -r1.22.2.9 -r1.22.2.11
+--- gcc/gcc/unwind-dw2.c 8 May 2004 21:52:42 -0000 1.22.2.9
++++ gcc/gcc/unwind-dw2.c 29 Jan 2005 11:54:24 -0000 1.22.2.11
+@@ -1,5 +1,5 @@
+ /* DWARF2 exception handling and frame unwind runtime interface routines.
+- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
++ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
+ This file is part of GCC.
+@@ -165,6 +165,11 @@
+ inline _Unwind_Word
+ _Unwind_GetGR (struct _Unwind_Context *context, int index)
+ {
++#ifdef DWARF_ZERO_REG
++ if (index == DWARF_ZERO_REG)
++ return 0;
++#endif
++
+ /* This will segfault if the register hasn't been saved. */
+ return * (_Unwind_Word *) context->reg[index];
+ }
+@@ -604,6 +609,10 @@
+ case DW_OP_mul:
+ case DW_OP_or:
+ case DW_OP_plus:
++ case DW_OP_shl:
++ case DW_OP_shr:
++ case DW_OP_shra:
++ case DW_OP_xor:
+ case DW_OP_le:
+ case DW_OP_ge:
+ case DW_OP_eq:
+Index: gcc/config/freebsd-spec.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/freebsd-spec.h,v
+retrieving revision 1.2.4.1
+retrieving revision 1.2.4.2
+diff -u -r1.2.4.1 -r1.2.4.2
+--- gcc/gcc/config/freebsd-spec.h 12 Mar 2003 02:38:01 -0000 1.2.4.1
++++ gcc/gcc/config/freebsd-spec.h 14 Jan 2005 02:06:26 -0000 1.2.4.2
+@@ -130,13 +130,7 @@
+ %{pg: -lc_p} \
+ }"
+ #else
+-#if FBSD_MAJOR >= 5
+-#define FBSD_LIB_SPEC " \
+- %{!shared: \
+- %{!pg: %{pthread:-lc_r} -lc} \
+- %{pg: %{pthread:-lc_r_p} -lc_p} \
+- }"
+-#else
++#if FBSD_MAJOR < 5
+ #define FBSD_LIB_SPEC " \
+ %{!shared: \
+ %{!pg: \
+@@ -146,5 +140,11 @@
+ %{!pthread:-lc_p} \
+ %{pthread:-lc_r_p}} \
+ }"
++#else
++#define FBSD_LIB_SPEC " \
++ %{!shared: \
++ %{!pg: %{pthread:-lpthread} -lc} \
++ %{pg: %{pthread:-lpthread_p} -lc_p} \
++ }"
+ #endif
+ #endif
+Index: gcc/config/alpha/alpha.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
+retrieving revision 1.282.4.11
+retrieving revision 1.282.4.12
+diff -u -r1.282.4.11 -r1.282.4.12
+--- gcc/gcc/config/alpha/alpha.c 8 Mar 2004 03:21:46 -0000 1.282.4.11
++++ gcc/gcc/config/alpha/alpha.c 30 Sep 2004 19:36:26 -0000 1.282.4.12
+@@ -6766,11 +6766,6 @@
+ break;
+ imask |= 1L << regno;
+ }
+-
+- /* Glibc likes to use $31 as an unwind stopper for crt0. To
+- avoid hackery in unwind-dw2.c, we need to actively store a
+- zero in the prologue of _Unwind_RaiseException et al. */
+- imask |= 1UL << 31;
+ }
+
+ /* If any register spilled, then spill the return address also. */
+@@ -7236,24 +7231,6 @@
+ reg_offset += 8;
+ }
+
+- /* Store a zero if requested for unwinding. */
+- if (imask & (1UL << 31))
+- {
+- rtx insn, t;
+-
+- mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
+- set_mem_alias_set (mem, alpha_sr_alias_set);
+- insn = emit_move_insn (mem, const0_rtx);
+-
+- RTX_FRAME_RELATED_P (insn) = 1;
+- t = gen_rtx_REG (Pmode, 31);
+- t = gen_rtx_SET (VOIDmode, mem, t);
+- t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn));
+- REG_NOTES (insn) = t;
+-
+- reg_offset += 8;
+- }
+-
+ for (i = 0; i < 31; i++)
+ if (fmask & (1L << i))
+ {
+@@ -7674,9 +7651,6 @@
+ reg_offset += 8;
+ }
+
+- if (imask & (1UL << 31))
+- reg_offset += 8;
+-
+ for (i = 0; i < 31; ++i)
+ if (fmask & (1L << i))
+ {
+Index: gcc/config/alpha/alpha.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
+retrieving revision 1.185.4.6
+retrieving revision 1.185.4.7
+diff -u -r1.185.4.6 -r1.185.4.7
+--- gcc/gcc/config/alpha/alpha.h 27 Aug 2004 00:01:15 -0000 1.185.4.6
++++ gcc/gcc/config/alpha/alpha.h 30 Sep 2004 19:36:28 -0000 1.185.4.7
+@@ -1299,6 +1299,7 @@
+ #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 26)
+ #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26)
+ #define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64)
++#define DWARF_ZERO_REG 31
+
+ /* Describe how we implement __builtin_eh_return. */
+ #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 16 : INVALID_REGNUM)
+Index: gcc/config/alpha/alpha.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
+retrieving revision 1.199.4.6
+retrieving revision 1.199.4.7
+diff -u -r1.199.4.6 -r1.199.4.7
+--- gcc/gcc/config/alpha/alpha.md 28 May 2004 00:02:03 -0000 1.199.4.6
++++ gcc/gcc/config/alpha/alpha.md 5 Dec 2004 19:58:42 -0000 1.199.4.7
+@@ -80,6 +80,7 @@
+ (UNSPECV_PLDGP2 11) ; prologue ldgp
+ (UNSPECV_SET_TP 12)
+ (UNSPECV_RPCC 13)
++ (UNSPECV_SETJMPR_ER 14) ; builtin_setjmp_receiver fragment
+ ])
+
+ ;; Where necessary, the suffixes _le and _be are used to distinguish between
+@@ -6764,70 +6765,44 @@
+ "jmp $31,(%0),0"
+ [(set_attr "type" "ibr")])
+
+-(define_insn "*builtin_setjmp_receiver_er_sl_1"
+- [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
+- "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && TARGET_AS_CAN_SUBTRACT_LABELS"
+- "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:")
+-
+-(define_insn "*builtin_setjmp_receiver_er_1"
+- [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
+- "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF"
+- "br $27,$LSJ%=\n$LSJ%=:"
+- [(set_attr "type" "ibr")])
+-
+-(define_split
+- [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
+- "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF
+- && prev_nonnote_insn (insn) == operands[0]"
+- [(const_int 0)]
+- "
+-{
+- emit_note (NULL, NOTE_INSN_DELETED);
+- DONE;
+-}")
+-
+-(define_insn "*builtin_setjmp_receiver_1"
++(define_expand "builtin_setjmp_receiver"
+ [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
+ "TARGET_ABI_OSF"
+- "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)"
+- [(set_attr "length" "12")
+- (set_attr "type" "multi")])
++ "")
+
+-(define_expand "builtin_setjmp_receiver_er"
+- [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)
++(define_insn_and_split "*builtin_setjmp_receiver_1"
++ [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR)]
++ "TARGET_ABI_OSF"
++{
++ if (TARGET_EXPLICIT_RELOCS)
++ return "#";
++ else
++ return "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)";
++}
++ "&& TARGET_EXPLICIT_RELOCS && reload_completed"
++ [(unspec_volatile [(match_dup 0)] UNSPECV_SETJMPR_ER)
+ (set (match_dup 1)
+ (unspec_volatile:DI [(match_dup 2) (match_dup 3)] UNSPECV_LDGP1))
+ (set (match_dup 1)
+ (unspec:DI [(match_dup 1) (match_dup 3)] UNSPEC_LDGP2))]
+- ""
+ {
+ operands[1] = pic_offset_table_rtx;
+ operands[2] = gen_rtx_REG (Pmode, 27);
+ operands[3] = GEN_INT (alpha_next_sequence_number++);
+-})
++}
++ [(set_attr "length" "12")
++ (set_attr "type" "multi")])
+
+-(define_expand "builtin_setjmp_receiver"
+- [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
+- "TARGET_ABI_OSF"
+-{
+- if (TARGET_EXPLICIT_RELOCS)
+- {
+- emit_insn (gen_builtin_setjmp_receiver_er (operands[0]));
+- DONE;
+- }
+-})
++(define_insn "*builtin_setjmp_receiver_er_sl_1"
++ [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)]
++ "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS && TARGET_AS_CAN_SUBTRACT_LABELS"
++ "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:")
+
+-(define_expand "exception_receiver_er"
+- [(set (match_dup 0)
+- (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1))
+- (set (match_dup 0)
+- (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))]
+- ""
+-{
+- operands[0] = pic_offset_table_rtx;
+- operands[1] = gen_rtx_REG (Pmode, 26);
+- operands[2] = GEN_INT (alpha_next_sequence_number++);
+-})
++(define_insn "*builtin_setjmp_receiver_er_1"
++ [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)]
++ "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS"
++ "br $27,$LSJ%=\n$LSJ%=:"
++ [(set_attr "type" "ibr")])
+
+ (define_expand "exception_receiver"
+ [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)]
+@@ -6835,28 +6810,38 @@
+ {
+ if (TARGET_LD_BUGGY_LDGP)
+ operands[0] = alpha_gp_save_rtx ();
+- else if (TARGET_EXPLICIT_RELOCS)
+- {
+- emit_insn (gen_exception_receiver_er ());
+- DONE;
+- }
+ else
+ operands[0] = const0_rtx;
+ })
+
+-(define_insn "*exception_receiver_1"
+- [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
+- "! TARGET_LD_BUGGY_LDGP"
+- "ldgp $29,0($26)"
+- [(set_attr "length" "8")
+- (set_attr "type" "multi")])
+-
+ (define_insn "*exception_receiver_2"
+ [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)]
+- "TARGET_LD_BUGGY_LDGP"
++ "TARGET_ABI_OSF && TARGET_LD_BUGGY_LDGP"
+ "ldq $29,%0"
+ [(set_attr "type" "ild")])
+
++(define_insn_and_split "*exception_receiver_1"
++ [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
++ "TARGET_ABI_OSF"
++{
++ if (TARGET_EXPLICIT_RELOCS)
++ return "ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*";
++ else
++ return "ldgp $29,0($26)";
++}
++ "&& TARGET_EXPLICIT_RELOCS && reload_completed"
++ [(set (match_dup 0)
++ (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1))
++ (set (match_dup 0)
++ (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))]
++{
++ operands[0] = pic_offset_table_rtx;
++ operands[1] = gen_rtx_REG (Pmode, 26);
++ operands[2] = GEN_INT (alpha_next_sequence_number++);
++}
++ [(set_attr "length" "8")
++ (set_attr "type" "multi")])
++
+ (define_expand "nonlocal_goto_receiver"
+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (set (reg:DI 27) (mem:DI (reg:DI 29)))
+Index: gcc/config/alpha/qrnnd.asm
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/alpha/qrnnd.asm,v
+retrieving revision 1.1
+retrieving revision 1.1.60.1
+diff -u -r1.1 -r1.1.60.1
+--- gcc/gcc/config/alpha/qrnnd.asm 15 Apr 2000 16:34:38 -0000 1.1
++++ gcc/gcc/config/alpha/qrnnd.asm 30 Sep 2004 19:36:28 -0000 1.1.60.1
+@@ -26,6 +26,10 @@
+ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
+
++#ifdef __ELF__
++.section .note.GNU-stack,""
++#endif
++
+ .set noreorder
+ .set noat
+
+Index: gcc/config/i386/i386-protos.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-protos.h,v
+retrieving revision 1.86.2.2
+retrieving revision 1.86.2.3
+diff -u -r1.86.2.2 -r1.86.2.3
+--- gcc/gcc/config/i386/i386-protos.h 8 Jul 2003 19:16:44 -0000 1.86.2.2
++++ gcc/gcc/config/i386/i386-protos.h 12 Dec 2004 21:00:44 -0000 1.86.2.3
+@@ -88,6 +88,8 @@
+ extern int cmpsi_operand PARAMS ((rtx, enum machine_mode));
+ extern int long_memory_operand PARAMS ((rtx, enum machine_mode));
+ extern int aligned_operand PARAMS ((rtx, enum machine_mode));
++extern int compare_operator PARAMS ((rtx, enum machine_mode));
++extern int flags_reg_operand PARAMS ((rtx, enum machine_mode));
+ extern enum machine_mode ix86_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
+
+ extern int ix86_expand_movstr PARAMS ((rtx, rtx, rtx, rtx));
+Index: gcc/config/i386/i386.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
+retrieving revision 1.495.2.36
+retrieving revision 1.495.2.37
+diff -u -r1.495.2.36 -r1.495.2.37
+--- gcc/gcc/config/i386/i386.c 18 May 2004 05:07:52 -0000 1.495.2.36
++++ gcc/gcc/config/i386/i386.c 12 Dec 2004 21:00:44 -0000 1.495.2.37
+@@ -3609,6 +3609,20 @@
+ return ANY_QI_REG_P (op);
+ }
+
++/* Return true if op is an flags register. */
++
++int
++flags_reg_operand (op, mode)
++ register rtx op;
++ enum machine_mode mode;
++{
++ if (mode != VOIDmode && GET_MODE (op) != mode)
++ return 0;
++ return (GET_CODE (op) == REG
++ && REGNO (op) == FLAGS_REG
++ && GET_MODE (op) != VOIDmode);
++}
++
+ /* Return true if op is a NON_Q_REGS class register. */
+
+ int
+@@ -3969,6 +3983,14 @@
+ /* Didn't find one -- this must be an aligned address. */
+ return 1;
+ }
++
++int
++compare_operator (op, mode)
++ rtx op;
++ enum machine_mode mode ATTRIBUTE_UNUSED;
++{
++ return GET_CODE (op) == COMPARE;
++}
+
+ /* Return true if the constant is something that can be loaded with
+ a special instruction. Only handle 0.0 and 1.0; others are less
+Index: gcc/config/i386/i386.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
+retrieving revision 1.309.2.11
+retrieving revision 1.309.2.12
+diff -u -r1.309.2.11 -r1.309.2.12
+--- gcc/gcc/config/i386/i386.h 6 Feb 2004 19:43:31 -0000 1.309.2.11
++++ gcc/gcc/config/i386/i386.h 12 Dec 2004 21:00:47 -0000 1.309.2.12
+@@ -3319,6 +3319,7 @@
+ SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM}}, \
+ {"nonmemory_no_elim_operand", {CONST_INT, REG, SUBREG}}, \
+ {"index_register_operand", {SUBREG, REG}}, \
++ {"flags_reg_operand", {REG}}, \
+ {"q_regs_operand", {SUBREG, REG}}, \
+ {"non_q_regs_operand", {SUBREG, REG}}, \
+ {"fcmov_comparison_operator", {EQ, NE, LTU, GTU, LEU, GEU, UNORDERED, \
+@@ -3354,6 +3355,7 @@
+ {"fp_register_operand", {REG}}, \
+ {"register_and_not_fp_reg_operand", {REG}}, \
+ {"vector_move_operand", {CONST_VECTOR, SUBREG, REG, MEM}}, \
++ {"compare_operator", {COMPARE}},
+
+ /* A list of predicates that do special things with modes, and so
+ should not elicit warnings for VOIDmode match_operand. */
+Index: gcc/config/i386/i386.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
+retrieving revision 1.404.2.24
+retrieving revision 1.404.2.29
+diff -u -r1.404.2.24 -r1.404.2.29
+--- gcc/gcc/config/i386/i386.md 28 Apr 2004 17:00:03 -0000 1.404.2.24
++++ gcc/gcc/config/i386/i386.md 23 Jan 2005 05:15:59 -0000 1.404.2.29
+@@ -1188,10 +1188,9 @@
+ ""
+ "xchg{l}\t%1, %0"
+ [(set_attr "type" "imov")
++ (set_attr "mode" "SI")
+ (set_attr "pent_pair" "np")
+ (set_attr "athlon_decode" "vector")
+- (set_attr "mode" "SI")
+- (set_attr "modrm" "0")
+ (set_attr "ppro_uops" "few")])
+
+ (define_expand "movhi"
+@@ -1304,12 +1303,12 @@
+ (match_operand:HI 1 "register_operand" "+r"))
+ (set (match_dup 1)
+ (match_dup 0))]
+- "TARGET_PARTIAL_REG_STALL"
+- "xchg{w}\t%1, %0"
++ "!TARGET_PARTIAL_REG_STALL || optimize_size"
++ "xchg{l}\t%k1, %k0"
+ [(set_attr "type" "imov")
++ (set_attr "mode" "SI")
+ (set_attr "pent_pair" "np")
+- (set_attr "mode" "HI")
+- (set_attr "modrm" "0")
++ (set_attr "athlon_decode" "vector")
+ (set_attr "ppro_uops" "few")])
+
+ (define_insn "*swaphi_2"
+@@ -1317,12 +1316,12 @@
+ (match_operand:HI 1 "register_operand" "+r"))
+ (set (match_dup 1)
+ (match_dup 0))]
+- "! TARGET_PARTIAL_REG_STALL"
+- "xchg{l}\t%k1, %k0"
++ "TARGET_PARTIAL_REG_STALL"
++ "xchg{w}\t%1, %0"
+ [(set_attr "type" "imov")
++ (set_attr "mode" "HI")
+ (set_attr "pent_pair" "np")
+- (set_attr "mode" "SI")
+- (set_attr "modrm" "0")
++ (set_attr "athlon_decode" "vector")
+ (set_attr "ppro_uops" "few")])
+
+ (define_expand "movstricthi"
+@@ -1470,17 +1469,30 @@
+ DONE;
+ })
+
+-(define_insn "*swapqi"
++(define_insn "*swapqi_1"
+ [(set (match_operand:QI 0 "register_operand" "+r")
+ (match_operand:QI 1 "register_operand" "+r"))
+ (set (match_dup 1)
+ (match_dup 0))]
+- ""
+- "xchg{b}\t%1, %0"
++ "!TARGET_PARTIAL_REG_STALL || optimize_size"
++ "xchg{l}\t%k1, %k0"
+ [(set_attr "type" "imov")
++ (set_attr "mode" "SI")
+ (set_attr "pent_pair" "np")
++ (set_attr "athlon_decode" "vector")
++ (set_attr "ppro_uops" "few")])
++
++(define_insn "*swapqi_2"
++ [(set (match_operand:QI 0 "register_operand" "+q")
++ (match_operand:QI 1 "register_operand" "+q"))
++ (set (match_dup 1)
++ (match_dup 0))]
++ "TARGET_PARTIAL_REG_STALL"
++ "xchg{b}\t%1, %0"
++ [(set_attr "type" "imov")
+ (set_attr "mode" "QI")
+- (set_attr "modrm" "0")
++ (set_attr "pent_pair" "np")
++ (set_attr "athlon_decode" "vector")
+ (set_attr "ppro_uops" "few")])
+
+ (define_expand "movstrictqi"
+@@ -1987,13 +1999,11 @@
+ "TARGET_64BIT"
+ "xchg{q}\t%1, %0"
+ [(set_attr "type" "imov")
++ (set_attr "mode" "DI")
+ (set_attr "pent_pair" "np")
+ (set_attr "athlon_decode" "vector")
+- (set_attr "mode" "DI")
+- (set_attr "modrm" "0")
+ (set_attr "ppro_uops" "few")])
+
+-
+ (define_expand "movsf"
+ [(set (match_operand:SF 0 "nonimmediate_operand" "")
+ (match_operand:SF 1 "general_operand" ""))]
+@@ -7559,17 +7569,21 @@
+ ""
+ "")
+
+-(define_insn "*testqi_1"
++(define_insn "*testqi_1_maybe_si"
+ [(set (reg 17)
+- (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm,r")
+- (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
+- (const_int 0)))]
+- "ix86_match_ccmode (insn, CCNOmode)"
++ (compare
++ (and:QI
++ (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm,r")
++ (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
++ (const_int 0)))]
++ "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
++ && ix86_match_ccmode (insn,
++ GET_CODE (operands[1]) == CONST_INT
++ && INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)"
+ {
+ if (which_alternative == 3)
+ {
+- if (GET_CODE (operands[1]) == CONST_INT
+- && (INTVAL (operands[1]) & 0xffffff00))
++ if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 0)
+ operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff);
+ return "test{l}\t{%1, %k0|%k0, %1}";
+ }
+@@ -7580,6 +7594,18 @@
+ (set_attr "mode" "QI,QI,QI,SI")
+ (set_attr "pent_pair" "uv,np,uv,np")])
+
++(define_insn "*testqi_1"
++ [(set (reg 17)
++ (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm")
++ (match_operand:QI 1 "nonmemory_operand" "n,n,qn"))
++ (const_int 0)))]
++ "ix86_match_ccmode (insn, CCNOmode)"
++ "test{b}\t{%1, %0|%0, %1}"
++ [(set_attr "type" "test")
++ (set_attr "modrm" "0,1,1")
++ (set_attr "mode" "QI")
++ (set_attr "pent_pair" "uv,np,uv")])
++
+ (define_expand "testqi_ext_ccno_0"
+ [(set (reg:CCNO 17)
+ (compare:CCNO
+@@ -7697,51 +7723,53 @@
+ "#")
+
+ (define_split
+- [(set (reg 17)
+- (compare (zero_extract
+- (match_operand 0 "nonimmediate_operand" "")
+- (match_operand 1 "const_int_operand" "")
+- (match_operand 2 "const_int_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(zero_extract
++ (match_operand 2 "nonimmediate_operand" "")
++ (match_operand 3 "const_int_operand" "")
++ (match_operand 4 "const_int_operand" ""))
++ (const_int 0)]))]
+ "ix86_match_ccmode (insn, CCNOmode)"
+- [(set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))]
++ [(set (match_dup 0) (match_op_dup 1 [(match_dup 2) (const_int 0)]))]
+ {
+- HOST_WIDE_INT len = INTVAL (operands[1]);
+- HOST_WIDE_INT pos = INTVAL (operands[2]);
++ rtx val = operands[2];
++ HOST_WIDE_INT len = INTVAL (operands[3]);
++ HOST_WIDE_INT pos = INTVAL (operands[4]);
+ HOST_WIDE_INT mask;
+ enum machine_mode mode, submode;
+
+- mode = GET_MODE (operands[0]);
+- if (GET_CODE (operands[0]) == MEM)
++ mode = GET_MODE (val);
++ if (GET_CODE (val) == MEM)
+ {
+ /* ??? Combine likes to put non-volatile mem extractions in QImode
+ no matter the size of the test. So find a mode that works. */
+- if (! MEM_VOLATILE_P (operands[0]))
++ if (! MEM_VOLATILE_P (val))
+ {
+ mode = smallest_mode_for_size (pos + len, MODE_INT);
+- operands[0] = adjust_address (operands[0], mode, 0);
++ val = adjust_address (val, mode, 0);
+ }
+ }
+- else if (GET_CODE (operands[0]) == SUBREG
+- && (submode = GET_MODE (SUBREG_REG (operands[0])),
++ else if (GET_CODE (val) == SUBREG
++ && (submode = GET_MODE (SUBREG_REG (val)),
+ GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode))
+ && pos + len <= GET_MODE_BITSIZE (submode))
+ {
+ /* Narrow a paradoxical subreg to prevent partial register stalls. */
+ mode = submode;
+- operands[0] = SUBREG_REG (operands[0]);
++ val = SUBREG_REG (val);
+ }
+ else if (mode == HImode && pos + len <= 8)
+ {
+ /* Small HImode tests can be converted to QImode. */
+ mode = QImode;
+- operands[0] = gen_lowpart (QImode, operands[0]);
++ val = gen_lowpart (QImode, val);
+ }
+
+ mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1;
+ mask &= ~(((HOST_WIDE_INT)1 << pos) - 1);
+
+- operands[3] = gen_rtx_AND (mode, operands[0], gen_int_mode (mask, mode));
++ operands[2] = gen_rtx_AND (mode, val, gen_int_mode (mask, mode));
+ })
+
+ ;; Convert HImode/SImode test instructions with immediate to QImode ones.
+@@ -7750,46 +7778,44 @@
+ ;; Do the converison only post-reload to avoid limiting of the register class
+ ;; to QI regs.
+ (define_split
+- [(set (reg 17)
+- (compare
+- (and (match_operand 0 "register_operand" "")
+- (match_operand 1 "const_int_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(and (match_operand 2 "register_operand" "")
++ (match_operand 3 "const_int_operand" ""))
++ (const_int 0)]))]
+ "reload_completed
+- && QI_REG_P (operands[0])
++ && QI_REG_P (operands[2])
++ && GET_MODE (operands[2]) != QImode
+ && ((ix86_match_ccmode (insn, CCZmode)
+- && !(INTVAL (operands[1]) & ~(255 << 8)))
++ && !(INTVAL (operands[3]) & ~(255 << 8)))
+ || (ix86_match_ccmode (insn, CCNOmode)
+- && !(INTVAL (operands[1]) & ~(127 << 8))))
+- && GET_MODE (operands[0]) != QImode"
+- [(set (reg:CCNO 17)
+- (compare:CCNO
+- (and:SI (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8))
+- (match_dup 1))
+- (const_int 0)))]
+- "operands[0] = gen_lowpart (SImode, operands[0]);
+- operands[1] = gen_int_mode (INTVAL (operands[1]) >> 8, SImode);")
++ && !(INTVAL (operands[3]) & ~(127 << 8))))"
++ [(set (match_dup 0)
++ (match_op_dup 1
++ [(and:SI (zero_extract:SI (match_dup 2) (const_int 8) (const_int 8))
++ (match_dup 3))
++ (const_int 0)]))]
++ "operands[2] = gen_lowpart (SImode, operands[2]);
++ operands[3] = gen_int_mode (INTVAL (operands[3]) >> 8, SImode);")
+
+ (define_split
+- [(set (reg 17)
+- (compare
+- (and (match_operand 0 "nonimmediate_operand" "")
+- (match_operand 1 "const_int_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(and (match_operand 2 "nonimmediate_operand" "")
++ (match_operand 3 "const_int_operand" ""))
++ (const_int 0)]))]
+ "reload_completed
+- && (!REG_P (operands[0]) || ANY_QI_REG_P (operands[0]))
++ && GET_MODE (operands[2]) != QImode
++ && (!REG_P (operands[2]) || ANY_QI_REG_P (operands[2]))
+ && ((ix86_match_ccmode (insn, CCZmode)
+- && !(INTVAL (operands[1]) & ~255))
++ && !(INTVAL (operands[3]) & ~255))
+ || (ix86_match_ccmode (insn, CCNOmode)
+- && !(INTVAL (operands[1]) & ~127)))
+- && GET_MODE (operands[0]) != QImode"
+- [(set (reg:CCNO 17)
+- (compare:CCNO
+- (and:QI (match_dup 0)
+- (match_dup 1))
+- (const_int 0)))]
+- "operands[0] = gen_lowpart (QImode, operands[0]);
+- operands[1] = gen_lowpart (QImode, operands[1]);")
++ && !(INTVAL (operands[3]) & ~127)))"
++ [(set (match_dup 0)
++ (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3))
++ (const_int 0)]))]
++ "operands[2] = gen_lowpart (QImode, operands[2]);
++ operands[3] = gen_lowpart (QImode, operands[3]);")
+
+
+ ;; %%% This used to optimize known byte-wide and operations to memory,
+@@ -8066,7 +8092,7 @@
+ [(set_attr "type" "alu1")
+ (set_attr "mode" "QI")])
+
+-(define_insn "*andqi_2"
++(define_insn "*andqi_2_maybe_si"
+ [(set (reg 17)
+ (compare (and:QI
+ (match_operand:QI 1 "nonimmediate_operand" "%0,0,0")
+@@ -8074,13 +8100,14 @@
+ (const_int 0)))
+ (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm,*r")
+ (and:QI (match_dup 1) (match_dup 2)))]
+- "ix86_match_ccmode (insn, CCNOmode)
+- && ix86_binary_operator_ok (AND, QImode, operands)"
++ "ix86_binary_operator_ok (AND, QImode, operands)
++ && ix86_match_ccmode (insn,
++ GET_CODE (operands[2]) == CONST_INT
++ && INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)"
+ {
+ if (which_alternative == 2)
+ {
+- if (GET_CODE (operands[2]) == CONST_INT
+- && (INTVAL (operands[2]) & 0xffffff00))
++ if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
+ operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff);
+ return "and{l}\t{%2, %k0|%k0, %2}";
+ }
+@@ -8089,6 +8116,20 @@
+ [(set_attr "type" "alu")
+ (set_attr "mode" "QI,QI,SI")])
+
++(define_insn "*andqi_2"
++ [(set (reg 17)
++ (compare (and:QI
++ (match_operand:QI 1 "nonimmediate_operand" "%0,0")
++ (match_operand:QI 2 "general_operand" "qim,qi"))
++ (const_int 0)))
++ (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm")
++ (and:QI (match_dup 1) (match_dup 2)))]
++ "ix86_match_ccmode (insn, CCNOmode)
++ && ix86_binary_operator_ok (AND, QImode, operands)"
++ "and{b}\t{%2, %0|%0, %2}"
++ [(set_attr "type" "alu")
++ (set_attr "mode" "QI")])
++
+ (define_insn "*andqi_2_slp"
+ [(set (reg 17)
+ (compare (and:QI
+@@ -10147,17 +10188,19 @@
+ (set_attr "mode" "DI")])
+
+ (define_split
+- [(set (reg 17)
+- (compare (not:DI (match_operand:DI 1 "nonimmediate_operand" ""))
+- (const_int 0)))
+- (set (match_operand:DI 0 "nonimmediate_operand" "")
+- (not:DI (match_dup 1)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 2 "compare_operator"
++ [(not:DI (match_operand:DI 3 "nonimmediate_operand" ""))
++ (const_int 0)]))
++ (set (match_operand:DI 1 "nonimmediate_operand" "")
++ (not:DI (match_dup 3)))]
+ "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO (xor:DI (match_dup 1) (const_int -1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (xor:DI (match_dup 1) (const_int -1)))])]
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 2
++ [(xor:DI (match_dup 3) (const_int -1))
++ (const_int 0)]))
++ (set (match_dup 1)
++ (xor:DI (match_dup 3) (const_int -1)))])]
+ "")
+
+ (define_expand "one_cmplsi2"
+@@ -10196,17 +10239,18 @@
+ (set_attr "mode" "SI")])
+
+ (define_split
+- [(set (reg 17)
+- (compare (not:SI (match_operand:SI 1 "nonimmediate_operand" ""))
+- (const_int 0)))
+- (set (match_operand:SI 0 "nonimmediate_operand" "")
+- (not:SI (match_dup 1)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 2 "compare_operator"
++ [(not:SI (match_operand:SI 3 "nonimmediate_operand" ""))
++ (const_int 0)]))
++ (set (match_operand:SI 1 "nonimmediate_operand" "")
++ (not:SI (match_dup 3)))]
+ "ix86_match_ccmode (insn, CCNOmode)"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO (xor:SI (match_dup 1) (const_int -1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (xor:SI (match_dup 1) (const_int -1)))])]
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1))
++ (const_int 0)]))
++ (set (match_dup 1)
++ (xor:SI (match_dup 3) (const_int -1)))])]
+ "")
+
+ ;; ??? Currently never generated - xor is used instead.
+@@ -10223,17 +10267,18 @@
+ (set_attr "mode" "SI")])
+
+ (define_split
+- [(set (reg 17)
+- (compare (not:SI (match_operand:SI 1 "register_operand" ""))
+- (const_int 0)))
+- (set (match_operand:DI 0 "register_operand" "")
+- (zero_extend:DI (not:SI (match_dup 1))))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 2 "compare_operator"
++ [(not:SI (match_operand:SI 3 "register_operand" ""))
++ (const_int 0)]))
++ (set (match_operand:DI 1 "register_operand" "")
++ (zero_extend:DI (not:SI (match_dup 3))))]
+ "ix86_match_ccmode (insn, CCNOmode)"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO (xor:SI (match_dup 1) (const_int -1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (zero_extend:DI (xor:SI (match_dup 1) (const_int -1))))])]
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1))
++ (const_int 0)]))
++ (set (match_dup 1)
++ (zero_extend:DI (xor:SI (match_dup 3) (const_int -1))))])]
+ "")
+
+ (define_expand "one_cmplhi2"
+@@ -10263,17 +10308,18 @@
+ (set_attr "mode" "HI")])
+
+ (define_split
+- [(set (reg 17)
+- (compare (not:HI (match_operand:HI 1 "nonimmediate_operand" ""))
+- (const_int 0)))
+- (set (match_operand:HI 0 "nonimmediate_operand" "")
+- (not:HI (match_dup 1)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 2 "compare_operator"
++ [(not:HI (match_operand:HI 3 "nonimmediate_operand" ""))
++ (const_int 0)]))
++ (set (match_operand:HI 1 "nonimmediate_operand" "")
++ (not:HI (match_dup 3)))]
+ "ix86_match_ccmode (insn, CCNOmode)"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO (xor:HI (match_dup 1) (const_int -1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (xor:HI (match_dup 1) (const_int -1)))])]
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 2 [(xor:HI (match_dup 3) (const_int -1))
++ (const_int 0)]))
++ (set (match_dup 1)
++ (xor:HI (match_dup 3) (const_int -1)))])]
+ "")
+
+ ;; %%% Potential partial reg stall on alternative 1. What to do?
+@@ -10306,17 +10352,18 @@
+ (set_attr "mode" "QI")])
+
+ (define_split
+- [(set (reg 17)
+- (compare (not:QI (match_operand:QI 1 "nonimmediate_operand" ""))
+- (const_int 0)))
+- (set (match_operand:QI 0 "nonimmediate_operand" "")
+- (not:QI (match_dup 1)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 2 "compare_operator"
++ [(not:QI (match_operand:QI 3 "nonimmediate_operand" ""))
++ (const_int 0)]))
++ (set (match_operand:QI 1 "nonimmediate_operand" "")
++ (not:QI (match_dup 3)))]
+ "ix86_match_ccmode (insn, CCNOmode)"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO (xor:QI (match_dup 1) (const_int -1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (xor:QI (match_dup 1) (const_int -1)))])]
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 2 [(xor:QI (match_dup 3) (const_int -1))
++ (const_int 0)]))
++ (set (match_dup 1)
++ (xor:QI (match_dup 3) (const_int -1)))])]
+ "")
+
+ ;; Arithmetic shift instructions
+@@ -16639,10 +16686,12 @@
+ (set (subreg:TI (match_dup 0) 0) (ior:TI (subreg:TI (match_dup 6) 0)
+ (subreg:TI (match_dup 7) 0)))]
+ {
+- /* If op2 == op3, op3 will be clobbered before it is used.
+- This should be optimized out though. */
++ /* If op2 == op3, op3 would be clobbered before it is used. */
+ if (operands_match_p (operands[2], operands[3]))
+- abort ();
++ {
++ emit_move_insn (operands[0], operands[2]);
++ DONE;
++ }
+ PUT_MODE (operands[1], GET_MODE (operands[0]));
+ if (operands_match_p (operands[0], operands[4]))
+ operands[6] = operands[4], operands[7] = operands[2];
+@@ -16863,52 +16912,56 @@
+ ; instruction size is unchanged, except in the %eax case for
+ ; which it is increased by one byte, hence the ! optimize_size.
+ (define_split
+- [(set (reg 17)
+- (compare (and (match_operand 1 "aligned_operand" "")
+- (match_operand 2 "const_int_operand" ""))
+- (const_int 0)))
+- (set (match_operand 0 "register_operand" "")
+- (and (match_dup 1) (match_dup 2)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 2 "compare_operator"
++ [(and (match_operand 3 "aligned_operand" "")
++ (match_operand 4 "const_int_operand" ""))
++ (const_int 0)]))
++ (set (match_operand 1 "register_operand" "")
++ (and (match_dup 3) (match_dup 4)))]
+ "! TARGET_PARTIAL_REG_STALL && reload_completed
+ /* Ensure that the operand will remain sign-extended immediate. */
+- && ix86_match_ccmode (insn, INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)
++ && ix86_match_ccmode (insn, INTVAL (operands[4]) >= 0 ? CCNOmode : CCZmode)
+ && ! optimize_size
+- && ((GET_MODE (operands[0]) == HImode && ! TARGET_FAST_PREFIX)
+- || (GET_MODE (operands[0]) == QImode && TARGET_PROMOTE_QImode))"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO (and:SI (match_dup 1) (match_dup 2))
+- (const_int 0)))
+- (set (match_dup 0)
+- (and:SI (match_dup 1) (match_dup 2)))])]
+- "operands[2]
+- = gen_int_mode (INTVAL (operands[2])
+- & GET_MODE_MASK (GET_MODE (operands[0])),
+- SImode);
+- operands[0] = gen_lowpart (SImode, operands[0]);
+- operands[1] = gen_lowpart (SImode, operands[1]);")
++ && ((GET_MODE (operands[1]) == HImode && ! TARGET_FAST_PREFIX)
++ || (GET_MODE (operands[1]) == QImode && TARGET_PROMOTE_QImode))"
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 2 [(and:SI (match_dup 3) (match_dup 4))
++ (const_int 0)]))
++ (set (match_dup 1)
++ (and:SI (match_dup 3) (match_dup 4)))])]
++{
++ operands[4]
++ = gen_int_mode (INTVAL (operands[4])
++ & GET_MODE_MASK (GET_MODE (operands[1])), SImode);
++ operands[1] = gen_lowpart (SImode, operands[1]);
++ operands[3] = gen_lowpart (SImode, operands[3]);
++})
+
+ ; Don't promote the QImode tests, as i386 doesn't have encoding of
+ ; the TEST instruction with 32-bit sign-extended immediate and thus
+ ; the instruction size would at least double, which is not what we
+ ; want even with ! optimize_size.
+ (define_split
+- [(set (reg 17)
+- (compare (and (match_operand:HI 0 "aligned_operand" "")
+- (match_operand:HI 1 "const_int_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(and (match_operand:HI 2 "aligned_operand" "")
++ (match_operand:HI 3 "const_int_operand" ""))
++ (const_int 0)]))]
+ "! TARGET_PARTIAL_REG_STALL && reload_completed
+ /* Ensure that the operand will remain sign-extended immediate. */
+- && ix86_match_ccmode (insn, INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)
++ && ix86_match_ccmode (insn, INTVAL (operands[3]) >= 0 ? CCNOmode : CCZmode)
+ && ! TARGET_FAST_PREFIX
+ && ! optimize_size"
+- [(set (reg:CCNO 17)
+- (compare:CCNO (and:SI (match_dup 0) (match_dup 1))
+- (const_int 0)))]
+- "operands[1]
+- = gen_int_mode (INTVAL (operands[1])
+- & GET_MODE_MASK (GET_MODE (operands[0])),
+- SImode);
+- operands[0] = gen_lowpart (SImode, operands[0]);")
++ [(set (match_dup 0)
++ (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3))
++ (const_int 0)]))]
++{
++ operands[3]
++ = gen_int_mode (INTVAL (operands[3])
++ & GET_MODE_MASK (GET_MODE (operands[2])), SImode);
++ operands[2] = gen_lowpart (SImode, operands[2]);
++})
+
+ (define_split
+ [(set (match_operand 0 "register_operand" "")
+@@ -17081,13 +17134,14 @@
+
+ ;; Don't compare memory with zero, load and use a test instead.
+ (define_peephole2
+- [(set (reg 17)
+- (compare (match_operand:SI 0 "memory_operand" "")
+- (const_int 0)))
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(match_operand:SI 2 "memory_operand" "")
++ (const_int 0)]))
+ (match_scratch:SI 3 "r")]
+ "ix86_match_ccmode (insn, CCNOmode) && ! optimize_size"
+- [(set (match_dup 3) (match_dup 0))
+- (set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))]
++ [(set (match_dup 3) (match_dup 2))
++ (set (match_dup 0) (match_op_dup 1 [(match_dup 3) (const_int 0)]))]
+ "")
+
+ ;; NOT is not pairable on Pentium, while XOR is, but one byte longer.
+@@ -17151,77 +17205,77 @@
+ ;; versions if we're concerned about partial register stalls.
+
+ (define_peephole2
+- [(set (reg 17)
+- (compare (and:SI (match_operand:SI 0 "register_operand" "")
+- (match_operand:SI 1 "immediate_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(and:SI (match_operand:SI 2 "register_operand" "")
++ (match_operand:SI 3 "immediate_operand" ""))
++ (const_int 0)]))]
+ "ix86_match_ccmode (insn, CCNOmode)
+- && (true_regnum (operands[0]) != 0
+- || (GET_CODE (operands[1]) == CONST_INT
+- && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K')))
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
++ && (true_regnum (operands[2]) != 0
++ || (GET_CODE (operands[3]) == CONST_INT
++ && CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'K')))
++ && peep2_reg_dead_p (1, operands[2])"
+ [(parallel
+- [(set (reg:CCNO 17)
+- (compare:CCNO (and:SI (match_dup 0)
+- (match_dup 1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (and:SI (match_dup 0) (match_dup 1)))])]
++ [(set (match_dup 0)
++ (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3))
++ (const_int 0)]))
++ (set (match_dup 2)
++ (and:SI (match_dup 2) (match_dup 3)))])]
+ "")
+
+ ;; We don't need to handle HImode case, because it will be promoted to SImode
+ ;; on ! TARGET_PARTIAL_REG_STALL
+
+ (define_peephole2
+- [(set (reg 17)
+- (compare (and:QI (match_operand:QI 0 "register_operand" "")
+- (match_operand:QI 1 "immediate_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(and:QI (match_operand:QI 2 "register_operand" "")
++ (match_operand:QI 3 "immediate_operand" ""))
++ (const_int 0)]))]
+ "! TARGET_PARTIAL_REG_STALL
+ && ix86_match_ccmode (insn, CCNOmode)
+- && true_regnum (operands[0]) != 0
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
++ && true_regnum (operands[2]) != 0
++ && peep2_reg_dead_p (1, operands[2])"
+ [(parallel
+- [(set (reg:CCNO 17)
+- (compare:CCNO (and:QI (match_dup 0)
+- (match_dup 1))
+- (const_int 0)))
+- (set (match_dup 0)
+- (and:QI (match_dup 0) (match_dup 1)))])]
++ [(set (match_dup 0)
++ (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3))
++ (const_int 0)]))
++ (set (match_dup 2)
++ (and:QI (match_dup 2) (match_dup 3)))])]
+ "")
+
+ (define_peephole2
+- [(set (reg 17)
+- (compare
+- (and:SI
+- (zero_extract:SI
+- (match_operand 0 "ext_register_operand" "")
+- (const_int 8)
+- (const_int 8))
+- (match_operand 1 "const_int_operand" ""))
+- (const_int 0)))]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(and:SI
++ (zero_extract:SI
++ (match_operand 2 "ext_register_operand" "")
++ (const_int 8)
++ (const_int 8))
++ (match_operand 3 "const_int_operand" ""))
++ (const_int 0)]))]
+ "! TARGET_PARTIAL_REG_STALL
+ && ix86_match_ccmode (insn, CCNOmode)
+- && true_regnum (operands[0]) != 0
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
+- [(parallel [(set (reg:CCNO 17)
+- (compare:CCNO
+- (and:SI
+- (zero_extract:SI
+- (match_dup 0)
+- (const_int 8)
+- (const_int 8))
+- (match_dup 1))
+- (const_int 0)))
+- (set (zero_extract:SI (match_dup 0)
++ && true_regnum (operands[2]) != 0
++ && peep2_reg_dead_p (1, operands[2])"
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 1
++ [(and:SI
++ (zero_extract:SI
++ (match_dup 2)
++ (const_int 8)
++ (const_int 8))
++ (match_dup 3))
++ (const_int 0)]))
++ (set (zero_extract:SI (match_dup 2)
+ (const_int 8)
+ (const_int 8))
+ (and:SI
+ (zero_extract:SI
+- (match_dup 0)
++ (match_dup 2)
+ (const_int 8)
+ (const_int 8))
+- (match_dup 1)))])]
++ (match_dup 3)))])]
+ "")
+
+ ;; Don't do logical operations with memory inputs.
+@@ -17523,66 +17577,20 @@
+ "")
+
+ ;; Convert compares with 1 to shorter inc/dec operations when CF is not
+-;; required and register dies.
+-(define_peephole2
+- [(set (reg 17)
+- (compare (match_operand:SI 0 "register_operand" "")
+- (match_operand:SI 1 "incdec_operand" "")))]
+- "ix86_match_ccmode (insn, CCGCmode)
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
+- [(parallel [(set (reg:CCGC 17)
+- (compare:CCGC (match_dup 0)
+- (match_dup 1)))
+- (clobber (match_dup 0))])]
+- "")
+-
++;; required and register dies. Similarly for 128 to plus -128.
+ (define_peephole2
+- [(set (reg 17)
+- (compare (match_operand:HI 0 "register_operand" "")
+- (match_operand:HI 1 "incdec_operand" "")))]
+- "ix86_match_ccmode (insn, CCGCmode)
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
+- [(parallel [(set (reg:CCGC 17)
+- (compare:CCGC (match_dup 0)
+- (match_dup 1)))
+- (clobber (match_dup 0))])]
+- "")
+-
+-(define_peephole2
+- [(set (reg 17)
+- (compare (match_operand:QI 0 "register_operand" "")
+- (match_operand:QI 1 "incdec_operand" "")))]
+- "ix86_match_ccmode (insn, CCGCmode)
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
+- [(parallel [(set (reg:CCGC 17)
+- (compare:CCGC (match_dup 0)
+- (match_dup 1)))
+- (clobber (match_dup 0))])]
+- "")
+-
+-;; Convert compares with 128 to shorter add -128
+-(define_peephole2
+- [(set (reg 17)
+- (compare (match_operand:SI 0 "register_operand" "")
+- (const_int 128)))]
+- "ix86_match_ccmode (insn, CCGCmode)
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
+- [(parallel [(set (reg:CCGC 17)
+- (compare:CCGC (match_dup 0)
+- (const_int 128)))
+- (clobber (match_dup 0))])]
+- "")
+-
+-(define_peephole2
+- [(set (reg 17)
+- (compare (match_operand:HI 0 "register_operand" "")
+- (const_int 128)))]
+- "ix86_match_ccmode (insn, CCGCmode)
+- && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
+- [(parallel [(set (reg:CCGC 17)
+- (compare:CCGC (match_dup 0)
+- (const_int 128)))
+- (clobber (match_dup 0))])]
++ [(set (match_operand 0 "flags_reg_operand" "")
++ (match_operator 1 "compare_operator"
++ [(match_operand 2 "register_operand" "")
++ (match_operand 3 "const_int_operand" "")]))]
++ "(INTVAL (operands[3]) == -1
++ || INTVAL (operands[3]) == 1
++ || INTVAL (operands[3]) == 128)
++ && ix86_match_ccmode (insn, CCGCmode)
++ && peep2_reg_dead_p (1, operands[2])"
++ [(parallel [(set (match_dup 0)
++ (match_op_dup 1 [(match_dup 2) (match_dup 3)]))
++ (clobber (match_dup 2))])]
+ "")
+
+ (define_peephole2
+@@ -17780,9 +17788,9 @@
+ return "call\t%P1";
+ }
+ if (SIBLING_CALL_P (insn))
+- return "jmp\t%*%1";
++ return "jmp\t%A1";
+ else
+- return "call\t%*%1";
++ return "call\t%A1";
+ }
+ [(set_attr "type" "callv")])
+
+Index: gcc/config/ia64/ia64.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
+retrieving revision 1.198.2.22
+retrieving revision 1.198.2.24
+diff -u -r1.198.2.22 -r1.198.2.24
+--- gcc/gcc/config/ia64/ia64.c 17 Sep 2004 17:56:32 -0000 1.198.2.22
++++ gcc/gcc/config/ia64/ia64.c 14 Jan 2005 19:15:40 -0000 1.198.2.24
+@@ -2884,10 +2884,13 @@
+ preserve those input registers used as arguments to the sibling call.
+ It is unclear how to compute that number here. */
+ if (current_frame_info.n_input_regs != 0)
+- emit_insn (gen_alloc (gen_rtx_REG (DImode, fp),
+- GEN_INT (0), GEN_INT (0),
+- GEN_INT (current_frame_info.n_input_regs),
+- GEN_INT (0)));
++ {
++ rtx n_inputs = GEN_INT (current_frame_info.n_input_regs);
++ insn = emit_insn (gen_alloc (gen_rtx_REG (DImode, fp),
++ const0_rtx, const0_rtx,
++ n_inputs, const0_rtx));
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
+ }
+ }
+
+@@ -3021,15 +3024,16 @@
+ int aligned_p;
+ {
+ if (size == (TARGET_ILP32 ? 4 : 8)
+- && aligned_p
+ && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
+ && GET_CODE (x) == SYMBOL_REF
+ && SYMBOL_REF_FLAG (x))
+ {
+- if (TARGET_ILP32)
+- fputs ("\tdata4\t@fptr(", asm_out_file);
+- else
+- fputs ("\tdata8\t@fptr(", asm_out_file);
++ static const char * const directive[2][2] = {
++ /* 64-bit pointer */ /* 32-bit pointer */
++ { "\tdata8.ua\t@fptr(", "\tdata4.ua\t@fptr("}, /* unaligned */
++ { "\tdata8\t@fptr(", "\tdata4\t@fptr("} /* aligned */
++ };
++ fputs (directive[aligned_p != 0][TARGET_ILP32 != 0], asm_out_file);
+ output_addr_const (asm_out_file, x);
+ fputs (")\n", asm_out_file);
+ return true;
+@@ -7451,13 +7455,24 @@
+ {
+ dest_regno = REGNO (dest);
+
+- /* If this isn't the final destination for ar.pfs, the alloc
+- shouldn't have been marked frame related. */
+- if (dest_regno != current_frame_info.reg_save_ar_pfs)
+- abort ();
+-
+- fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
+- ia64_dbx_register_number (dest_regno));
++ /* If this is the final destination for ar.pfs, then this must
++ be the alloc in the prologue. */
++ if (dest_regno == current_frame_info.reg_save_ar_pfs)
++ fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
++ ia64_dbx_register_number (dest_regno));
++ else
++ {
++ /* This must be an alloc before a sibcall. We must drop the
++ old frame info. The easiest way to drop the old frame
++ info is to ensure we had a ".restore sp" directive
++ followed by a new prologue. If the procedure doesn't
++ have a memory-stack frame, we'll issue a dummy ".restore
++ sp" now. */
++ if (current_frame_info.total_size == 0 && !frame_pointer_needed)
++ /* if haven't done process_epilogue() yet, do it now */
++ process_epilogue ();
++ fprintf (asm_out_file, "\t.prologue\n");
++ }
+ return 1;
+ }
+
+Index: gcc/config/m68hc11/t-m68hc11-gas
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/t-m68hc11-gas,v
+retrieving revision 1.7.14.3
+retrieving revision 1.7.14.4
+diff -u -r1.7.14.3 -r1.7.14.4
+--- gcc/gcc/config/m68hc11/t-m68hc11-gas 4 Oct 2003 19:45:57 -0000 1.7.14.3
++++ gcc/gcc/config/m68hc11/t-m68hc11-gas 28 Jan 2005 22:21:39 -0000 1.7.14.4
+@@ -53,7 +53,7 @@
+ dp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#define SMALL_MACHINE' >> dp-bit.c
+ echo '#define CMPtype HItype' >> dp-bit.c
+- echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' >> dp-bit.c
+ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
+ echo '#endif' >> dp-bit.c
+ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
+Index: gcc/config/mips/mips-protos.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/mips-protos.h,v
+retrieving revision 1.30.4.1
+retrieving revision 1.30.4.2
+diff -u -r1.30.4.1 -r1.30.4.2
+--- gcc/gcc/config/mips/mips-protos.h 31 Jan 2003 23:51:22 -0000 1.30.4.1
++++ gcc/gcc/config/mips/mips-protos.h 8 Jan 2005 14:33:32 -0000 1.30.4.2
+@@ -1,6 +1,6 @@
+ /* Prototypes of target machine for GNU compiler. MIPS version.
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+- 1999, 2001, 2002 Free Software Foundation, Inc.
++ 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Contributed by A. Lichnewsky (lich@inria.inria.fr).
+ Changed by Michael Meissner (meissner@osf.org).
+ 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
+@@ -36,9 +36,13 @@
+ extern const char * current_section_name PARAMS ((void));
+ extern unsigned int current_section_flags PARAMS ((void));
+ extern int mips_can_use_return_insn PARAMS ((void));
+-extern void mips_declare_object PARAMS ((FILE *, const char *,
+- const char *,
+- const char *, int));
++extern void mips_output_aligned_decl_common
++ PARAMS ((FILE *, tree, const char *,
++ unsigned HOST_WIDE_INT,
++ unsigned int));
++extern void mips_declare_object
++ PARAMS ((FILE *, const char *, const char *,
++ const char *, ...));
+ extern void mips_expand_epilogue PARAMS ((void));
+ extern void mips_expand_prologue PARAMS ((void));
+ extern void mips_output_filename PARAMS ((FILE *, const char *));
+Index: gcc/config/mips/mips.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
+retrieving revision 1.241.2.4
+retrieving revision 1.241.2.5
+diff -u -r1.241.2.4 -r1.241.2.5
+--- gcc/gcc/config/mips/mips.c 27 Jun 2003 11:44:23 -0000 1.241.2.4
++++ gcc/gcc/config/mips/mips.c 8 Jan 2005 14:33:33 -0000 1.241.2.5
+@@ -1,6 +1,6 @@
+ /* Subroutines for insn-output.c for MIPS
+ Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
+- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
++ 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Contributed by A. Lichnewsky, lich@inria.inria.fr.
+ Changes by Michael Meissner, meissner@osf.org.
+ 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
+@@ -6562,26 +6562,84 @@
+ fatal_io_error ("can't close temp file");
+ }
+
+-/* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
+- is used, so that we don't emit an .extern for it in mips_asm_file_end. */
++/* Implement ASM_OUTPUT_ALIGNED_DECL_COMMON. This is usually the same as
++ the elfos.h version, but we also need to handle -muninit-const-in-rodata
++ and the limitations of the SGI o32 assembler. */
+
+ void
+-mips_declare_object (stream, name, init_string, final_string, size)
++mips_output_aligned_decl_common (stream, decl, name, size, align)
+ FILE *stream;
++ tree decl;
+ const char *name;
+- const char *init_string;
+- const char *final_string;
+- int size;
++ unsigned HOST_WIDE_INT size;
++ unsigned int align;
+ {
+- fputs (init_string, stream); /* "", "\t.comm\t", or "\t.lcomm\t" */
++ const char *format;
++
++ /* If the target wants uninitialized const declarations in
++ .rdata then don't put them in .comm. */
++ if (TARGET_EMBEDDED_DATA && TARGET_UNINIT_CONST_IN_RODATA
++ && TREE_CODE (decl) == VAR_DECL && TREE_READONLY (decl)
++ && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
++ {
++ if (TREE_PUBLIC (decl) && DECL_NAME (decl))
++ targetm.asm_out.globalize_label (stream, name);
++
++ readonly_data_section ();
++ ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT));
++
++ format = ACONCAT ((":\n\t.space\t", HOST_WIDE_INT_PRINT_UNSIGNED,
++ "\n", NULL));
++ mips_declare_object (stream, name, "", format, size);
++ }
++#ifdef TARGET_IRIX6
++ /* The SGI o32 assembler doesn't accept an alignment, so round up
++ the size instead. */
++ else if (mips_abi == ABI_32 && !TARGET_GAS)
++ {
++ size += (align / BITS_PER_UNIT) - 1;
++ size -= size % (align / BITS_PER_UNIT);
++ format = ACONCAT ((",", HOST_WIDE_INT_PRINT_UNSIGNED, "\n", NULL));
++ mips_declare_object (stream, name, "\n\t.comm\t", format, size);
++ }
++#endif
++ else
++ {
++ format = ACONCAT ((",", HOST_WIDE_INT_PRINT_UNSIGNED, ",%u\n", NULL));
++ mips_declare_object (stream, name, "\n\t.comm\t", format,
++ size, align / BITS_PER_UNIT);
++ }
++}
++
++/* Emit either a label, .comm, or .lcomm directive. When using assembler
++ macros, mark the symbol as written so that mips_file_end won't emit an
++ .extern for it. STREAM is the output file, NAME is the name of the
++ symbol, INIT_STRING is the string that should be written before the
++ symbol and FINAL_STRING is the string that shoulbe written after it.
++ FINAL_STRING is a printf() format that consumes the remaining arguments. */
++
++void
++mips_declare_object VPARAMS ((FILE *stream, const char *name,
++ const char *init_string,
++ const char *final_string, ...))
++{
++ VA_OPEN (ap, final_string);
++ VA_FIXEDARG (ap, FILE *, stream);
++ VA_FIXEDARG (ap, const char *, name);
++ VA_FIXEDARG (ap, const char *, init_string);
++ VA_FIXEDARG (ap, const char *, final_string);
++
++ fputs (init_string, stream);
+ assemble_name (stream, name);
+- fprintf (stream, final_string, size); /* ":\n", ",%u\n", ",%u\n" */
++ vfprintf (stream, final_string, ap);
+
+ if (TARGET_GP_OPT)
+ {
+ tree name_tree = get_identifier (name);
+ TREE_ASM_WRITTEN (name_tree) = 1;
+ }
++
++ VA_CLOSE (ap);
+ }
+
+ /* Return the bytes needed to compute the frame pointer from the current
+Index: gcc/config/mips/mips.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
+retrieving revision 1.227.4.6
+retrieving revision 1.227.4.7
+diff -u -r1.227.4.6 -r1.227.4.7
+--- gcc/gcc/config/mips/mips.h 30 May 2003 12:00:42 -0000 1.227.4.6
++++ gcc/gcc/config/mips/mips.h 8 Jan 2005 14:33:34 -0000 1.227.4.7
+@@ -1,6 +1,6 @@
+ /* Definitions of target machine for GNU compiler. MIPS version.
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
+- 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++ 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Contributed by A. Lichnewsky (lich@inria.inria.fr).
+ Changed by Michael Meissner (meissner@osf.org).
+ 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
+@@ -4326,28 +4326,7 @@
+
+ /* This says how to define a global common symbol. */
+
+-#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGN) \
+- do { \
+- /* If the target wants uninitialized const declarations in \
+- .rdata then don't put them in .comm */ \
+- if (TARGET_EMBEDDED_DATA && TARGET_UNINIT_CONST_IN_RODATA \
+- && TREE_CODE (DECL) == VAR_DECL && TREE_READONLY (DECL) \
+- && (DECL_INITIAL (DECL) == 0 \
+- || DECL_INITIAL (DECL) == error_mark_node)) \
+- { \
+- if (TREE_PUBLIC (DECL) && DECL_NAME (DECL)) \
+- (*targetm.asm_out.globalize_label) (STREAM, NAME); \
+- \
+- readonly_data_section (); \
+- ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
+- mips_declare_object (STREAM, NAME, "", ":\n\t.space\t%u\n", \
+- (SIZE)); \
+- } \
+- else \
+- mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", \
+- (SIZE)); \
+- } while (0)
+-
++#define ASM_OUTPUT_ALIGNED_DECL_COMMON mips_output_aligned_decl_common
+
+ /* This says how to define a local common symbol (ie, not visible to
+ linker). */
+Index: gcc/config/mips/mips.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
+retrieving revision 1.153.2.5
+retrieving revision 1.153.2.6
+diff -u -r1.153.2.5 -r1.153.2.6
+--- gcc/gcc/config/mips/mips.md 27 Mar 2004 10:35:03 -0000 1.153.2.5
++++ gcc/gcc/config/mips/mips.md 8 Jan 2005 14:11:12 -0000 1.153.2.6
+@@ -1,6 +1,6 @@
+ ;; Mips.md Machine Description for MIPS based processors
+ ;; Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+-;; 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
++;; 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
+ ;; Contributed by A. Lichnewsky, lich@inria.inria.fr
+ ;; Changes by Michael Meissner, meissner@osf.org
+ ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
+@@ -163,7 +163,8 @@
+
+ ;; Describe a user's asm statement.
+ (define_asm_attributes
+- [(set_attr "type" "multi")])
++ [(set_attr "type" "multi")
++ (set_attr "can_delay" "no")])
+
+ ;; whether or not generating calls to position independent functions
+ (define_attr "abicalls" "no,yes"
+Index: gcc/config/pa/pa32-linux.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/pa/pa32-linux.h,v
+retrieving revision 1.10
+retrieving revision 1.10.2.1
+diff -u -r1.10 -r1.10.2.1
+--- gcc/gcc/config/pa/pa32-linux.h 6 Dec 2002 02:54:38 -0000 1.10
++++ gcc/gcc/config/pa/pa32-linux.h 27 Dec 2004 02:55:49 -0000 1.10.2.1
+@@ -28,7 +28,7 @@
+ pointer into the frame. This target does not need multiple
+ subspace stubs, so we allow sibcalls to all functions. */
+ #undef FUNCTION_OK_FOR_SIBCALL
+-#define FUNCTION_OK_FOR_SIBCALL(DECL) 1
++#define FUNCTION_OK_FOR_SIBCALL(DECL) (!TARGET_PORTABLE_RUNTIME)
+
+ /* The libcall __canonicalize_funcptr_for_compare is referenced in
+ crtend.o and the reference isn't resolved in objects that don't
+Index: gcc/config/rs6000/rs6000.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
+retrieving revision 1.403.2.14
+retrieving revision 1.403.2.16
+diff -u -r1.403.2.14 -r1.403.2.16
+--- gcc/gcc/config/rs6000/rs6000.c 14 Jan 2004 14:03:58 -0000 1.403.2.14
++++ gcc/gcc/config/rs6000/rs6000.c 1 Dec 2004 06:13:16 -0000 1.403.2.16
+@@ -150,7 +150,8 @@
+ /* Call distance, overridden by -mlongcall and #pragma longcall(1).
+ The only place that looks at this is rs6000_set_default_type_attributes;
+ everywhere else should rely on the presence or absence of a longcall
+- attribute on the function declaration. */
++ attribute on the function declaration. Exception: init_cumulative_args
++ looks at it too, for libcalls. */
+ int rs6000_default_long_calls;
+ const char *rs6000_longcall_switch;
+
+@@ -2910,10 +2911,11 @@
+ cum->orig_nargs = cum->nargs_prototype;
+
+ /* Check for a longcall attribute. */
+- if (fntype
+- && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
+- && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype)))
+- cum->call_cookie = CALL_LONG;
++ if ((!fntype && rs6000_default_long_calls)
++ || (fntype
++ && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
++ && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
++ cum->call_cookie |= CALL_LONG;
+
+ if (TARGET_DEBUG_ARG)
+ {
+@@ -10356,8 +10358,10 @@
+ rtx reg, mem, vrsave;
+ int offset;
+
+- /* Get VRSAVE onto a GPR. */
+- reg = gen_rtx_REG (SImode, 12);
++ /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12
++ as frame_reg_rtx and r11 as the static chain pointer for
++ nested functions. */
++ reg = gen_rtx_REG (SImode, 0);
+ vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO);
+ if (TARGET_MACHO)
+ emit_insn (gen_get_vrsave_internal (reg));
+Index: gcc/config/rs6000/rs6000.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
+retrieving revision 1.224.2.6
+retrieving revision 1.224.2.7
+diff -u -r1.224.2.6 -r1.224.2.7
+--- gcc/gcc/config/rs6000/rs6000.md 8 Mar 2004 04:20:45 -0000 1.224.2.6
++++ gcc/gcc/config/rs6000/rs6000.md 24 Dec 2004 23:17:06 -0000 1.224.2.7
+@@ -3124,61 +3124,6 @@
+ }"
+ [(set_attr "length" "8")])
+
+-(define_insn_and_split "*andsi3_internal7"
+- [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
+- (compare:CC (and:SI (match_operand:SI 0 "gpc_reg_operand" "r,r")
+- (match_operand:SI 1 "mask_operand_wrap" "i,i"))
+- (const_int 0)))
+- (clobber (match_scratch:SI 3 "=r,r"))]
+- "TARGET_POWERPC64"
+- "#"
+- "TARGET_POWERPC64"
+- [(parallel [(set (match_dup 2)
+- (compare:CC (and:SI (rotate:SI (match_dup 0) (match_dup 4))
+- (match_dup 5))
+- (const_int 0)))
+- (clobber (match_dup 3))])]
+- "
+-{
+- int mb = extract_MB (operands[1]);
+- int me = extract_ME (operands[1]);
+- operands[4] = GEN_INT (me + 1);
+- operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb)));
+-}"
+- [(set_attr "type" "delayed_compare,compare")
+- (set_attr "length" "4,8")])
+-
+-(define_insn_and_split "*andsi3_internal8"
+- [(set (match_operand:CC 3 "cc_reg_operand" "=x,??y")
+- (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")
+- (match_operand:SI 2 "mask_operand_wrap" "i,i"))
+- (const_int 0)))
+- (set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
+- (and:SI (match_dup 1)
+- (match_dup 2)))]
+- "TARGET_POWERPC64"
+- "#"
+- "TARGET_POWERPC64"
+- [(parallel [(set (match_dup 3)
+- (compare:CC (and:SI (rotate:SI (match_dup 1) (match_dup 4))
+- (match_dup 5))
+- (const_int 0)))
+- (set (match_dup 0)
+- (and:SI (rotate:SI (match_dup 1) (match_dup 4))
+- (match_dup 5)))])
+- (set (match_dup 0)
+- (rotate:SI (match_dup 0) (match_dup 6)))]
+- "
+-{
+- int mb = extract_MB (operands[2]);
+- int me = extract_ME (operands[2]);
+- operands[4] = GEN_INT (me + 1);
+- operands[6] = GEN_INT (32 - (me + 1));
+- operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb)));
+-}"
+- [(set_attr "type" "delayed_compare,compare")
+- (set_attr "length" "8,12")])
+-
+ (define_expand "iorsi3"
+ [(set (match_operand:SI 0 "gpc_reg_operand" "")
+ (ior:SI (match_operand:SI 1 "gpc_reg_operand" "")
+Index: gcc/config/s390/s390.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
+retrieving revision 1.41.2.12
+retrieving revision 1.41.2.13
+diff -u -r1.41.2.12 -r1.41.2.13
+--- gcc/gcc/config/s390/s390.md 3 Aug 2004 20:06:51 -0000 1.41.2.12
++++ gcc/gcc/config/s390/s390.md 27 Jan 2005 23:38:39 -0000 1.41.2.13
+@@ -910,11 +910,13 @@
+ })
+
+ (define_expand "reload_outti"
+- [(parallel [(match_operand:TI 0 "memory_operand" "")
++ [(parallel [(match_operand:TI 0 "" "")
+ (match_operand:TI 1 "register_operand" "d")
+ (match_operand:DI 2 "register_operand" "=&a")])]
+ "TARGET_64BIT"
+ {
++ if (GET_CODE (operands[0]) != MEM)
++ abort ();
+ s390_load_address (operands[2], XEXP (operands[0], 0));
+ operands[0] = replace_equiv_address (operands[0], operands[2]);
+ emit_move_insn (operands[0], operands[1]);
+@@ -1060,11 +1062,13 @@
+ })
+
+ (define_expand "reload_outdi"
+- [(parallel [(match_operand:DI 0 "memory_operand" "")
++ [(parallel [(match_operand:DI 0 "" "")
+ (match_operand:DI 1 "register_operand" "d")
+ (match_operand:SI 2 "register_operand" "=&a")])]
+ "!TARGET_64BIT"
+ {
++ if (GET_CODE (operands[0]) != MEM)
++ abort ();
+ s390_load_address (operands[2], XEXP (operands[0], 0));
+ operands[0] = replace_equiv_address (operands[0], operands[2]);
+ emit_move_insn (operands[0], operands[1]);
+@@ -1374,11 +1378,13 @@
+ })
+
+ (define_expand "reload_outdf"
+- [(parallel [(match_operand:DF 0 "memory_operand" "")
++ [(parallel [(match_operand:DF 0 "" "")
+ (match_operand:DF 1 "register_operand" "d")
+ (match_operand:SI 2 "register_operand" "=&a")])]
+ "!TARGET_64BIT"
+ {
++ if (GET_CODE (operands[0]) != MEM)
++ abort ();
+ s390_load_address (operands[2], XEXP (operands[0], 0));
+ operands[0] = replace_equiv_address (operands[0], operands[2]);
+ emit_move_insn (operands[0], operands[1]);
+Index: gcc/config/sparc/sparc.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
+retrieving revision 1.233.4.12
+retrieving revision 1.233.4.13
+diff -u -r1.233.4.12 -r1.233.4.13
+--- gcc/gcc/config/sparc/sparc.c 17 Jul 2004 19:49:21 -0000 1.233.4.12
++++ gcc/gcc/config/sparc/sparc.c 14 Oct 2004 06:54:26 -0000 1.233.4.13
+@@ -178,6 +178,8 @@
+ static void sparc_encode_section_info PARAMS ((tree, int));
+ static void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
+ HOST_WIDE_INT, tree));
++static bool sparc_can_output_mi_thunk PARAMS ((tree, HOST_WIDE_INT,
++ HOST_WIDE_INT, tree));
+
+ /* Option handling. */
+
+@@ -244,7 +246,7 @@
+ #undef TARGET_ASM_OUTPUT_MI_THUNK
+ #define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk
+ #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
+-#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
++#define TARGET_ASM_CAN_OUTPUT_MI_THUNK sparc_can_output_mi_thunk
+
+ struct gcc_target targetm = TARGET_INITIALIZER;
+
+@@ -8622,18 +8624,21 @@
+ SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
+ }
+
+-/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
+- Used for C++ multiple inheritance. */
++/* Output the assembler code for a thunk function. THUNK_DECL is the
++ declaration for the thunk function itself, FUNCTION is the decl for
++ the target function. DELTA is an immediate constant offset to be
++ added to THIS. If VCALL_OFFSET is nonzero, the word at address
++ (*THIS + VCALL_OFFSET) should be additionally added to THIS. */
+
+ static void
+ sparc_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function)
+ FILE *file;
+ tree thunk_fndecl ATTRIBUTE_UNUSED;
+ HOST_WIDE_INT delta;
+- HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
++ HOST_WIDE_INT vcall_offset;
+ tree function;
+ {
+- rtx this, insn, funexp, delta_rtx, tmp;
++ rtx this, insn, funexp;
+
+ reload_completed = 1;
+ no_new_pseudos = 1;
+@@ -8650,26 +8655,73 @@
+
+ /* Add DELTA. When possible use a plain add, otherwise load it into
+ a register first. */
+- delta_rtx = GEN_INT (delta);
+- if (!SPARC_SIMM13_P (delta))
++ if (delta)
+ {
++ rtx delta_rtx = GEN_INT (delta);
++
++ if (! SPARC_SIMM13_P (delta))
++ {
++ rtx scratch = gen_rtx_REG (Pmode, 1);
++ emit_move_insn (scratch, delta_rtx);
++ delta_rtx = scratch;
++ }
++
++ /* THIS += DELTA. */
++ emit_insn (gen_add2_insn (this, delta_rtx));
++ }
++
++ /* Add the word at address (*THIS + VCALL_OFFSET). */
++ if (vcall_offset)
++ {
++ rtx vcall_offset_rtx = GEN_INT (vcall_offset);
+ rtx scratch = gen_rtx_REG (Pmode, 1);
+
+- if (input_operand (delta_rtx, GET_MODE (scratch)))
+- emit_insn (gen_rtx_SET (VOIDmode, scratch, delta_rtx));
++ if (vcall_offset >= 0)
++ abort ();
++
++ /* SCRATCH = *THIS. */
++ emit_move_insn (scratch, gen_rtx_MEM (Pmode, this));
++
++ /* Prepare for adding VCALL_OFFSET. The difficulty is that we
++ may not have any available scratch register at this point. */
++ if (SPARC_SIMM13_P (vcall_offset))
++ ;
++ /* This is the case if ARCH64 (unless -ffixed-g5 is passed). */
++ else if (! fixed_regs[5]
++ /* The below sequence is made up of at least 2 insns,
++ while the default method may need only one. */
++ && vcall_offset < -8192)
++ {
++ rtx scratch2 = gen_rtx_REG (Pmode, 5);
++ emit_move_insn (scratch2, vcall_offset_rtx);
++ vcall_offset_rtx = scratch2;
++ }
+ else
+ {
+- if (TARGET_ARCH64)
+- sparc_emit_set_const64 (scratch, delta_rtx);
+- else
+- sparc_emit_set_const32 (scratch, delta_rtx);
++ rtx increment = GEN_INT (-4096);
++
++ /* VCALL_OFFSET is a negative number whose typical range can be
++ estimated as -32768..0 in 32-bit mode. In almost all cases
++ it is therefore cheaper to emit multiple add insns than
++ spilling and loading the constant into a register (at least
++ 6 insns). */
++ while (! SPARC_SIMM13_P (vcall_offset))
++ {
++ emit_insn (gen_add2_insn (scratch, increment));
++ vcall_offset += 4096;
++ }
++ vcall_offset_rtx = GEN_INT (vcall_offset); /* cannot be 0 */
+ }
+
+- delta_rtx = scratch;
+- }
++ /* SCRATCH = *(*THIS + VCALL_OFFSET). */
++ emit_move_insn (scratch, gen_rtx_MEM (Pmode,
++ gen_rtx_PLUS (Pmode,
++ scratch,
++ vcall_offset_rtx)));
+
+- tmp = gen_rtx_PLUS (Pmode, this, delta_rtx);
+- emit_insn (gen_rtx_SET (VOIDmode, this, tmp));
++ /* THIS += *(*THIS + VCALL_OFFSET). */
++ emit_insn (gen_add2_insn (this, scratch));
++ }
+
+ /* Generate a tail call to the target function. */
+ if (! TREE_USED (function))
+@@ -8697,4 +8749,18 @@
+ no_new_pseudos = 0;
+ }
+
++/* Return true if sparc_output_mi_thunk would be able to output the
++ assembler code for the thunk function specified by the arguments
++ it is passed, and false otherwise. */
++static bool
++sparc_can_output_mi_thunk (thunk_fndecl, delta, vcall_offset, function)
++ tree thunk_fndecl ATTRIBUTE_UNUSED;
++ HOST_WIDE_INT delta ATTRIBUTE_UNUSED;
++ HOST_WIDE_INT vcall_offset;
++ tree function ATTRIBUTE_UNUSED;
++{
++ /* Bound the loop used in the default method above. */
++ return (vcall_offset >= -32768 || ! fixed_regs[5]);
++}
++
+ #include "gt-sparc.h"
+Index: gcc/config/sparc/sparc.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.md,v
+retrieving revision 1.181.4.13
+retrieving revision 1.181.4.14
+diff -u -r1.181.4.13 -r1.181.4.14
+--- gcc/gcc/config/sparc/sparc.md 17 Jul 2004 19:49:21 -0000 1.181.4.13
++++ gcc/gcc/config/sparc/sparc.md 14 Oct 2004 06:54:27 -0000 1.181.4.14
+@@ -2048,7 +2048,6 @@
+ if (! CONSTANT_P (operands[1]) || input_operand (operands[1], DImode))
+ ;
+ else if (TARGET_ARCH64
+- && CONSTANT_P (operands[1])
+ && GET_CODE (operands[1]) != HIGH
+ && GET_CODE (operands[1]) != LO_SUM)
+ {
+Index: gcc/config/vax/vax.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.c,v
+retrieving revision 1.38
+retrieving revision 1.38.4.1
+diff -u -r1.38 -r1.38.4.1
+--- gcc/gcc/config/vax/vax.c 22 Oct 2002 23:05:24 -0000 1.38
++++ gcc/gcc/config/vax/vax.c 28 Dec 2004 06:29:59 -0000 1.38.4.1
+@@ -462,7 +462,7 @@
+ case CONST_INT:
+ /* byte offsets cost nothing (on a VAX 2, they cost 1 cycle) */
+ if (offset == 0)
+- offset = (unsigned)(INTVAL(addr)+128) > 256;
++ offset = (unsigned HOST_WIDE_INT)(INTVAL(addr)+128) > 256;
+ break;
+ case CONST:
+ case SYMBOL_REF:
+@@ -595,13 +595,13 @@
+ fmt = "e"; /* all constant rotate counts are short */
+ break;
+ case PLUS:
+- /* Check for small negative integer operand: subl2 can be used with
+- a short positive constant instead. */
+- if (GET_CODE (XEXP (x, 1)) == CONST_INT)
+- if ((unsigned)(INTVAL (XEXP (x, 1)) + 63) < 127)
+- fmt = "e";
+ case MINUS:
+ c = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */
++ /* Small integer operands can use subl2 and addl2. */
++ if ((GET_CODE (XEXP (x, 1)) == CONST_INT)
++ && (unsigned HOST_WIDE_INT)(INTVAL (XEXP (x, 1)) + 63) < 127)
++ fmt = "e";
++ break;
+ case IOR:
+ case XOR:
+ c = 3;
+@@ -611,7 +611,7 @@
+ c = 3;
+ if (GET_CODE (XEXP (x, 0)) == CONST_INT)
+ {
+- if ((unsigned)~INTVAL (XEXP (x, 0)) > 63)
++ if ((unsigned HOST_WIDE_INT)~INTVAL (XEXP (x, 0)) > 63)
+ c = 4;
+ fmt = "e";
+ i = 1;
+@@ -665,7 +665,8 @@
+ switch (code)
+ {
+ case CONST_INT:
+- if ((unsigned)INTVAL (op) > 63 && GET_MODE (x) != QImode)
++ if ((unsigned HOST_WIDE_INT)INTVAL (op) > 63
++ && GET_MODE (x) != QImode)
+ c += 1; /* 2 on VAX 2 */
+ break;
+ case CONST:
+Index: gcc/config/vax/vax.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.h,v
+retrieving revision 1.54
+retrieving revision 1.54.4.1
+diff -u -r1.54 -r1.54.4.1
+--- gcc/gcc/config/vax/vax.h 22 Oct 2002 23:05:24 -0000 1.54
++++ gcc/gcc/config/vax/vax.h 28 Dec 2004 06:28:01 -0000 1.54.4.1
+@@ -800,11 +800,6 @@
+ Do not define this if the table should contain absolute addresses. */
+ #define CASE_VECTOR_PC_RELATIVE 1
+
+-/* Define this if the case instruction drops through after the table
+- when the index is out of range. Don't define it if the case insn
+- jumps to the default label instead. */
+-#define CASE_DROPS_THROUGH
+-
+ /* Indicate that jump tables go in the text section. This is
+ necessary when compiling PIC code. */
+ #define JUMP_TABLES_IN_TEXT_SECTION 1
+Index: gcc/config/vax/vax.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.md,v
+retrieving revision 1.23
+retrieving revision 1.23.4.1
+diff -u -r1.23 -r1.23.4.1
+--- gcc/gcc/config/vax/vax.md 1 Oct 2002 20:16:04 -0000 1.23
++++ gcc/gcc/config/vax/vax.md 28 Dec 2004 06:28:01 -0000 1.23.4.1
+@@ -1969,68 +1969,63 @@
+ "jmp (%0)")
+
+ ;; This is here to accept 5 arguments (as passed by expand_end_case)
+-;; and pass the first 4 along to the casesi1 pattern that really does the work.
++;; and pass the first 4 along to the casesi1 pattern that really does
++;; the actual casesi work. We emit a jump here to the default label
++;; _before_ the casesi so that we can be sure that the casesi never
++;; drops through.
++;; This is suboptimal perhaps, but so is much of the rest of this
++;; machine description. For what it's worth, HPPA uses the same trick.
++;;
++;; operand 0 is index
++;; operand 1 is the minimum bound (a const_int)
++;; operand 2 is the maximum bound - minimum bound + 1 (also a const_int)
++;; operand 3 is CODE_LABEL for the table;
++;; operand 4 is the CODE_LABEL to go to if index out of range (ie. default).
++;;
++;; We emit:
++;; i = index - minimum_bound
++;; if (i > (maximum_bound - minimum_bound + 1) goto default;
++;; casesi (i, 0, table);
++;;
+ (define_expand "casesi"
+- [(match_operand:SI 0 "general_operand" "") ; index
+- (match_operand:SI 1 "general_operand" "") ; lower
+- (match_operand:SI 2 "general_operand" "") ; upper-lower
+- (match_operand 3 "" "") ; table label
+- (match_operand 4 "" "")] ; default label
+- ""
+-{
+- emit_jump_insn (gen_casesi1 (operands[0], operands[1],
+- operands[2], operands[3]));
++ [(match_operand:SI 0 "general_operand" "")
++ (match_operand:SI 1 "general_operand" "")
++ (match_operand:SI 2 "general_operand" "")
++ (match_operand 3 "" "")
++ (match_operand 4 "" "")]
++ ""
++{
++ /* i = index - minimum_bound;
++ But only if the lower bound is not already zero. */
++ if (operands[1] != const0_rtx)
++ {
++ rtx index = gen_reg_rtx (SImode);
++ emit_insn (gen_addsi3 (index,
++ operands[0],
++ GEN_INT (-INTVAL (operands[1]))));
++ operands[0] = index;
++ }
++
++ /* if (i > (maximum_bound - minimum_bound + 1) goto default; */
++ emit_insn (gen_cmpsi (operands[0], operands[2]));
++ emit_jump_insn (gen_bgtu (operands[4]));
++
++ /* casesi (i, 0, table); */
++ emit_jump_insn (gen_casesi1 (operands[0], operands[2], operands[3]));
+ DONE;
+ })
+
++;; This insn is a bit of a lier. It actually falls through if no case
++;; matches. But, we prevent that from ever happening by emiting a jump
++;; before this, see the define_expand above.
+ (define_insn "casesi1"
+- [(set (pc)
+- (if_then_else
+- (leu (minus:SI (match_operand:SI 0 "general_operand" "g")
+- (match_operand:SI 1 "general_operand" "g"))
+- (match_operand:SI 2 "general_operand" "g"))
+- (plus:SI (sign_extend:SI
+- (mem:HI (plus:SI (mult:SI (minus:SI (match_dup 0)
+- (match_dup 1))
+- (const_int 2))
+- (pc))))
+- (label_ref:SI (match_operand 3 "" "")))
+- (pc)))]
+- ""
+- "casel %0,%1,%2")
+-
+-;; This can arise by simplification when operand 1 is a constant int.
+-(define_insn ""
+- [(set (pc)
+- (if_then_else
+- (leu (plus:SI (match_operand:SI 0 "general_operand" "g")
+- (match_operand:SI 1 "const_int_operand" "n"))
+- (match_operand:SI 2 "general_operand" "g"))
+- (plus:SI (sign_extend:SI
+- (mem:HI (plus:SI (mult:SI (plus:SI (match_dup 0)
+- (match_dup 1))
+- (const_int 2))
+- (pc))))
+- (label_ref:SI (match_operand 3 "" "")))
+- (pc)))]
+- ""
+- "*
+-{
+- operands[1] = GEN_INT (-INTVAL (operands[1]));
+- return \"casel %0,%1,%2\";
+-}")
+-
+-;; This can arise by simplification when the base for the case insn is zero.
+-(define_insn ""
+- [(set (pc)
+- (if_then_else (leu (match_operand:SI 0 "general_operand" "g")
+- (match_operand:SI 1 "general_operand" "g"))
+- (plus:SI (sign_extend:SI
+- (mem:HI (plus:SI (mult:SI (match_dup 0)
+- (const_int 2))
+- (pc))))
+- (label_ref:SI (match_operand 2 "" "")))
+- (pc)))]
++ [(match_operand:SI 1 "const_int_operand" "n")
++ (set (pc)
++ (plus:SI (sign_extend:SI
++ (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "general_operand" "g")
++ (const_int 2))
++ (pc))))
++ (label_ref:SI (match_operand 2 "" ""))))]
+ ""
+ "casel %0,$0,%1")
+
+Index: gcc/cp/ChangeLog
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
+retrieving revision 1.3076.2.277
+retrieving revision 1.3076.2.281
+diff -u -r1.3076.2.277 -r1.3076.2.281
+--- gcc/gcc/cp/ChangeLog 30 Sep 2004 16:44:00 -0000 1.3076.2.277
++++ gcc/gcc/cp/ChangeLog 18 Dec 2004 20:26:04 -0000 1.3076.2.281
+@@ -1,3 +1,25 @@
++2004-12-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
++
++ PR c++/17456
++ * cvt.c (convert_to_void): Set expr to void_zero_node after
++ overload failure.
++
++2004-12-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
++
++ PR c++/16806
++ * error.c (dump_expr) [BASELINK]: Use dump_expr.
++
++2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
++
++ PR c++/17868
++ * error.c (dump_expr): Add missing case for RDIV_EXPR.
++
++2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
++
++ PR c++/16681
++ * init.c (build_zero_init): Build a RANGE_EXPR for an array
++ initializer.
++
+ 2004-09-30 Release Manager
+
+ * GCC 3.3.5 Released.
+Index: gcc/cp/cvt.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/cp/cvt.c,v
+retrieving revision 1.126.2.4
+retrieving revision 1.126.2.5
+diff -u -r1.126.2.4 -r1.126.2.5
+--- gcc/gcc/cp/cvt.c 23 Feb 2004 12:50:50 -0000 1.126.2.4
++++ gcc/gcc/cp/cvt.c 18 Dec 2004 20:26:10 -0000 1.126.2.5
+@@ -903,6 +903,7 @@
+ of an overloaded function, and this is not one of them. */
+ pedwarn ("%s cannot resolve address of overloaded function",
+ implicit ? implicit : "void cast");
++ expr = void_zero_node;
+ }
+ else if (implicit && probe == expr && is_overloaded_fn (probe))
+ /* Only warn when there is no &. */
+Index: gcc/cp/error.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
+retrieving revision 1.192.2.9
+retrieving revision 1.192.2.11
+diff -u -r1.192.2.9 -r1.192.2.11
+--- gcc/gcc/cp/error.c 24 Jul 2004 13:03:23 -0000 1.192.2.9
++++ gcc/gcc/cp/error.c 15 Dec 2004 16:45:23 -0000 1.192.2.11
+@@ -1724,6 +1724,7 @@
+ case CEIL_DIV_EXPR:
+ case FLOOR_DIV_EXPR:
+ case ROUND_DIV_EXPR:
++ case RDIV_EXPR:
+ dump_binary_op ("/", t, flags);
+ break;
+
+@@ -2070,7 +2071,7 @@
+ break;
+
+ case BASELINK:
+- print_tree_identifier (scratch_buffer, DECL_NAME (get_first_fn (t)));
++ dump_expr (get_first_fn (t), flags & ~TFF_EXPR_IN_PARENS);
+ break;
+
+ case TREE_LIST:
+Index: gcc/cp/init.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/cp/init.c,v
+retrieving revision 1.299.2.18
+retrieving revision 1.299.2.19
+diff -u -r1.299.2.18 -r1.299.2.19
+--- gcc/gcc/cp/init.c 28 Jul 2004 02:17:28 -0000 1.299.2.18
++++ gcc/gcc/cp/init.c 9 Dec 2004 15:09:19 -0000 1.299.2.19
+@@ -235,7 +235,6 @@
+ }
+ else if (TREE_CODE (type) == ARRAY_TYPE)
+ {
+- tree index;
+ tree max_index;
+ tree inits;
+
+@@ -249,15 +248,17 @@
+ /* A zero-sized array, which is accepted as an extension, will
+ have an upper bound of -1. */
+ if (!tree_int_cst_equal (max_index, integer_minus_one_node))
+- for (index = size_zero_node;
+- !tree_int_cst_lt (max_index, index);
+- index = size_binop (PLUS_EXPR, index, size_one_node))
+- inits = tree_cons (index,
+- build_zero_init (TREE_TYPE (type),
+- /*nelts=*/NULL_TREE,
+- static_storage_p),
+- inits);
+- CONSTRUCTOR_ELTS (init) = nreverse (inits);
++ {
++ tree elt_init = build_zero_init (TREE_TYPE (type),
++ /*nelts=*/NULL_TREE,
++ static_storage_p);
++ tree range = build (RANGE_EXPR,
++ sizetype, size_zero_node, max_index);
++
++ inits = tree_cons (range, elt_init, inits);
++ }
++
++ CONSTRUCTOR_ELTS (init) = nreverse (inits);
+ }
+ else if (TREE_CODE (type) == REFERENCE_TYPE)
+ ;
+Index: gcc/doc/install.texi
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
+retrieving revision 1.151.2.53
+retrieving revision 1.151.2.56
+diff -u -r1.151.2.53 -r1.151.2.56
+--- gcc/gcc/doc/install.texi 8 May 2004 17:37:31 -0000 1.151.2.53
++++ gcc/gcc/doc/install.texi 14 Oct 2004 12:31:38 -0000 1.151.2.56
+@@ -3098,8 +3098,19 @@
+ @file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build.
+
+ All releases of GNU binutils prior to 2.11.2 have known bugs on this
+-platform. We recommend the use of GNU binutils 2.11.2 or the vendor
+-tools (Sun @command{as}, Sun @command{ld}).
++platform. We recommend the use of GNU binutils 2.11.2 or later, or the
++vendor tools (Sun @command{as}, Sun @command{ld}). Note that your mileage
++may vary if you use a combination of the GNU tools and the Sun tools: while
++the combination GNU @command{as} + Sun @command{ld} should reasonably work,
++the reverse combination Sun @command{as} + GNU @command{ld} is known to
++cause memory corruption at runtime in some cases for C++ programs.
++
++The stock GNU binutils 2.15 release is broken on this platform because of a
++single bug. It has been fixed on the 2.15 branch in the CVS repository.
++You can obtain a working version by checking out the binutils-2_15-branch
++from the CVS repository or applying the patch
++@uref{http://sources.redhat.com/ml/binutils-cvs/2004-09/msg00036.html} to the
++release.
+
+ Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
+ newer: @command{g++} will complain that types are missing. These headers assume
+@@ -3115,6 +3126,17 @@
+ 108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
+ 108653-22 for Intel) that fix this bug.
+
++Sun bug 4927647 sometimes causes random spurious testsuite failures
++related to missing diagnostic output. This bug doesn't affect GCC
++itself, rather it is a kernel bug triggered by the @command{expect}
++program which is used only by the GCC testsuite driver. When the bug
++causes the @command{expect} program to miss anticipated output, extra
++testsuite failures appear.
++
++There are patches for Solaris 8 (117350-12 or newer for SPARC,
++117351-12 or newer for Intel) and Solaris 9 (117171-11 or newer for
++SPARC, 117172-11 or newer for Intel) that address this problem.
++
+ @html
+ <hr />
+ @end html
+Index: gcc/doc/tm.texi
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
+retrieving revision 1.182.2.8
+retrieving revision 1.182.2.9
+diff -u -r1.182.2.8 -r1.182.2.9
+--- gcc/gcc/doc/tm.texi 5 Mar 2004 17:55:57 -0000 1.182.2.8
++++ gcc/gcc/doc/tm.texi 14 Oct 2004 06:54:32 -0000 1.182.2.9
+@@ -4160,7 +4160,7 @@
+ @end table
+
+ @findex TARGET_ASM_OUTPUT_MI_THUNK
+-@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, tree @var{function})
++@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
+ A function that outputs the assembler code for a thunk
+ function, used to implement C++ virtual function calls with multiple
+ inheritance. The thunk acts as a wrapper around a virtual function,
+@@ -4174,7 +4174,15 @@
+ e.g.@: @samp{%o0} on a sparc. The addition must preserve the values of
+ all other incoming arguments.
+
+-After the addition, emit code to jump to @var{function}, which is a
++Then, if @var{vcall_offset} is nonzero, an additional adjustment should be
++made after adding @code{delta}. In particular, if @var{p} is the
++adjusted pointer, the following adjustment should be made:
++
++@smallexample
++p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
++@end smallexample
++
++After the additions, emit code to jump to @var{function}, which is a
+ @code{FUNCTION_DECL}. This is a direct pure jump, not a call, and does
+ not touch the return address. Hence returning from @var{FUNCTION} will
+ return to whoever called the current @samp{thunk}.
+@@ -4194,21 +4202,13 @@
+ not support varargs.
+ @end deftypefn
+
+-@findex TARGET_ASM_OUTPUT_MI_VCALL_THUNK
+-@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_VCALL_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, int @var{vcall_offset}, tree @var{function})
+-A function like @code{TARGET_ASM_OUTPUT_MI_THUNK}, except that if
+-@var{vcall_offset} is nonzero, an additional adjustment should be made
+-after adding @code{delta}. In particular, if @var{p} is the
+-adjusted pointer, the following adjustment should be made:
+-
+-@example
+-p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
+-@end example
+-
+-@noindent
+-If this function is defined, it will always be used in place of
+-@code{TARGET_ASM_OUTPUT_MI_THUNK}.
+-
++@findex TARGET_ASM_CAN_OUTPUT_MI_THUNK
++@deftypefn {Target Hook} bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
++A function that returns true if TARGET_ASM_OUTPUT_MI_THUNK would be able
++to output the assembler code for the thunk function specified by the
++arguments it is passed, and false otherwise. In the latter case, the
++generic approach will be used by the C++ front end, with the limitations
++previously exposed.
+ @end deftypefn
+
+ @node Profiling
+Index: gcc/testsuite/ChangeLog
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
+retrieving revision 1.2261.2.384
+retrieving revision 1.2261.2.398
+diff -u -r1.2261.2.384 -r1.2261.2.398
+--- gcc/gcc/testsuite/ChangeLog 30 Sep 2004 16:45:41 -0000 1.2261.2.384
++++ gcc/gcc/testsuite/ChangeLog 23 Jan 2005 05:16:05 -0000 1.2261.2.398
+@@ -1,3 +1,78 @@
++2005-01-22 Roger Sayle <roger@eyesopen.com>
++
++ PR target/18402
++ Backport from mainline
++ 2003-02-05 Jakub Jelinek <jakub@redhat.com>
++
++ PR optimization/8555
++ * gcc.dg/20030204-1.c: New test.
++
++2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
++
++ PR c++/17115
++ * g++.dg/warn/Winline-4.C: New test.
++
++2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ * gcc.dg/short-compare-1.c: New test.
++ * gcc.dg/short-compare-2.c: Likewise.
++
++2005-01-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
++
++ Backport:
++ 2003-10-13 Geoffrey Keating <geoffk@apple.com>
++
++ * gcc.dg/asm-names.c: Use scan-assembler-not rather
++ than linker trickery.
++
++2005-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
++
++ * gcc.c-torture/execute/20020720-1.x: XFAIL for x86 when using
++ -fpic or -fPIC.
++
++2004-12-21 Joseph S. Myers <jsm@polyomino.org.uk>
++
++ PR c/14765
++ * gcc.dg/pr14765-1.c: New test.
++
++2004-12-20 Andrew Pinski <pinskia@physics.uc.edu>
++
++ PR other/19093
++ * g++.dg/opt/max1.C: Fix for 64bit targets.
++
++2004-12-19 Roger Sayle <roger@eyesopen.com>
++
++ PR middle-end/19068
++ * g++.dg/opt/max1.C: New test case.
++
++2004-12-16 Wolfgang Bangerth <bangerth@dealii.com>
++
++ * g++.dg/other/complex1.C: New test.
++
++2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
++
++ PR rtl-optimization/16536
++ * gcc.c-torture/execute/restrict-1.c: New test.
++
++2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
++
++ PR c++/16681
++ * g++.dg/init/array15.C: New.
++ * g++.dg/init/array16.C: New.
++
++2004-11-29 Roger Sayle <roger@eyesopen.com>
++
++ PR rtl-optimization/9771
++ * gcc.dg/pr9771-1.c: New test case.
++
++2004-11-27 Falk Hueffner <falk@debian.org>
++
++ * gcc.dg/loop-6.c: New test.
++
++2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr>
++
++ * g++.dg/inherit/thunk1.C: Run on the SPARC.
++
+ 2004-09-30 Release Manager
+
+ * GCC 3.3.5 Released.
+Index: gcc/testsuite/g++.dg/inherit/thunk1.C
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/inherit/thunk1.C,v
+retrieving revision 1.5
+retrieving revision 1.5.12.1
+diff -u -r1.5 -r1.5.12.1
+--- gcc/gcc/testsuite/g++.dg/inherit/thunk1.C 24 Oct 2002 09:16:36 -0000 1.5
++++ gcc/gcc/testsuite/g++.dg/inherit/thunk1.C 14 Oct 2004 06:54:49 -0000 1.5.12.1
+@@ -1,4 +1,4 @@
+-// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* } }
++// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
+
+ #include <stdarg.h>
+
+Index: gcc/testsuite/g++.dg/init/array15.C
+===================================================================
+RCS file: gcc/testsuite/g++.dg/init/array15.C
+diff -N gcc/testsuite/g++.dg/init/array15.C
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/g++.dg/init/array15.C 9 Dec 2004 15:09:32 -0000 1.1.6.1
+@@ -0,0 +1,46 @@
++// { dg-do run }
++
++// Copyright (C) 2004 Free Software Foundation, Inc.
++// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
++
++// PR 16681 too much memory used
++// Origin: Matt LaFary <lafary@activmedia.com>
++
++struct foo {
++ unsigned char buffer[4111222];
++ foo() ;
++ bool check () const;
++};
++
++foo::foo ()
++ : buffer()
++{}
++
++bool foo::check () const
++{
++ for (unsigned ix = sizeof (buffer); ix--;)
++ if (buffer[ix])
++ return false;
++ return true;
++}
++
++void *operator new (__SIZE_TYPE__ size, void *p)
++{
++ return p;
++}
++
++char heap[5000000];
++
++int main ()
++{
++ for (unsigned ix = sizeof (heap); ix--;)
++ heap[ix] = ix;
++
++ foo *f = new (heap) foo ();
++
++ if (!f->check ())
++ return 1;
++ return 0;
++}
++
++
+Index: gcc/testsuite/g++.dg/init/array16.C
+===================================================================
+RCS file: gcc/testsuite/g++.dg/init/array16.C
+diff -N gcc/testsuite/g++.dg/init/array16.C
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/g++.dg/init/array16.C 9 Dec 2004 15:09:32 -0000 1.1.6.1
+@@ -0,0 +1,106 @@
++// { dg-do run }
++
++// Copyright (C) 2004 Free Software Foundation, Inc.
++// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
++
++// PR 16681 too much memory used
++// Origin: Matt LaFary <lafary@activmedia.com>
++
++
++struct elt
++{
++ static int count;
++ static elt*ptr;
++ static int abort;
++ char c;
++
++ elt ();
++ ~elt ();
++
++};
++
++int elt::count;
++elt *elt::ptr;
++int elt::abort;
++
++elt::elt ()
++ :c ()
++{
++ if (count >= 0)
++ {
++ if (!ptr)
++ ptr = this;
++ if (count == 100)
++ throw 2;
++ if (this != ptr)
++ abort = 1;
++ count++;
++ ptr++;
++ }
++}
++
++elt::~elt ()
++{
++ if (count >= 0)
++ {
++ ptr--;
++ count--;
++ if (ptr != this)
++ abort = 2;
++ }
++}
++
++struct foo {
++ elt buffer[4111222];
++ foo() ;
++ bool check () const;
++};
++
++foo::foo ()
++ : buffer()
++{}
++
++bool foo::check () const
++{
++ for (unsigned ix = sizeof (buffer)/ sizeof (buffer[0]); ix--;)
++ if (buffer[ix].c)
++ return false;
++ return true;
++}
++
++void *operator new (__SIZE_TYPE__ size, void *p)
++{
++ return p;
++}
++
++char heap[5000000];
++
++int main ()
++{
++ for (unsigned ix = sizeof (heap); ix--;)
++ heap[ix] = ix;
++
++ try
++ {
++ foo *f = new (heap) foo ();
++ return 1;
++ }
++ catch (...)
++ {
++ if (elt::count)
++ return 2;
++ if (elt::abort)
++ return elt::abort + 3;
++ }
++
++ for (unsigned ix = sizeof (heap); ix--;)
++ heap[ix] = ix;
++
++ elt::count = -1;
++ foo *f = new (heap) foo ();
++ if (!f->check ())
++ return 3;
++ return 0;
++}
++
++
+Index: gcc/testsuite/g++.dg/opt/max1.C
+===================================================================
+RCS file: gcc/testsuite/g++.dg/opt/max1.C
+diff -N gcc/testsuite/g++.dg/opt/max1.C
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/g++.dg/opt/max1.C 20 Dec 2004 21:12:34 -0000 1.2.2.2
+@@ -0,0 +1,29 @@
++/* PR middle-end/19068 */
++/* Test case by Andrew Pinski <pinskia@physics.uc.edu> */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++extern "C" void abort (void);
++
++long fff[10];
++
++void f(long a)
++{
++ int i;
++ a = *((long*)(a+1+sizeof(long))) >? *((long*)(a+1));
++
++ for(i=0;i<10;i++)
++ fff[i] = a;
++}
++
++int main(void)
++{
++ int i;
++ long a[2] = {10,5};
++ f((long)(&a)-1);
++ for(i = 0;i<10;i++)
++ if (fff[i]!=10)
++ abort ();
++ return 0;
++}
++
+Index: gcc/testsuite/g++.dg/other/complex1.C
+===================================================================
+RCS file: gcc/testsuite/g++.dg/other/complex1.C
+diff -N gcc/testsuite/g++.dg/other/complex1.C
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/g++.dg/other/complex1.C 16 Dec 2004 14:04:52 -0000 1.1.4.1
+@@ -0,0 +1,28 @@
++// PR middle-end/18882
++// Origin: Petr Mikulik <mikulik@physics.muni.cz>
++// Testcase by Wolfgang Bangerth <bangerth@dealii.com>
++
++// { dg-do run }
++// { dg-options "" }
++
++extern "C" void abort ();
++
++struct C {
++ __complex__ long double c;
++};
++
++void foo()
++{
++ C x = {2+2i};
++
++ int n = 1;
++ C y = (n==1) ? x : (C){3+3i};
++ if (__imag__ y.c != 2)
++ abort ();
++}
++
++int main(void)
++{
++ foo ();
++ return 0;
++}
+Index: gcc/testsuite/g++.dg/warn/Winline-4.C
+===================================================================
+RCS file: gcc/testsuite/g++.dg/warn/Winline-4.C
+diff -N gcc/testsuite/g++.dg/warn/Winline-4.C
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/g++.dg/warn/Winline-4.C 21 Jan 2005 10:02:30 -0000 1.1.42.1
+@@ -0,0 +1,17 @@
++// { dg-do compile }
++// { dg-options "-O2 -Winline" }
++// Origin: <markus at oberhumer dot com>
++// PR 17115: We should not emit -Winline warning for functions marked with
++// noinline
++
++struct Foo {
++ __attribute__((noinline)) int a(int r) { return r & 1; }
++ virtual __attribute__((noinline)) int b(int r) { return r & 1; }
++ static __attribute__((noinline)) int c(int r) { return r & 1; }
++};
++
++int bar(int r) {
++ Foo f;
++ int k = 1; k &= f.a(r); k &= f.b(r); k &= f.a(r);
++ return k;
++}
+Index: gcc/testsuite/gcc.c-torture/execute/20020720-1.x
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x,v
+retrieving revision 1.8.6.2
+retrieving revision 1.8.6.3
+diff -u -r1.8.6.2 -r1.8.6.3
+--- gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x 8 Mar 2003 14:34:06 -0000 1.8.6.2
++++ gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x 3 Jan 2005 01:43:45 -0000 1.8.6.3
+@@ -11,6 +11,19 @@
+ # and can make the optimization.
+
+ # Don't XFAIL at -O0, that should never fail.
++if { [istarget "i?86-*-*"] } {
++ set torture_eval_before_compile {
++ global compiler_conditional_xfail_data
++ set compiler_conditional_xfail_data {
++ "PR opt/10348" \
++ { "*-*-*" } \
++ { "-fpic" "-fPIC" } \
++ { "-O0" }
++ }
++ }
++ return 0
++}
++
+ set torture_eval_before_compile {
+ global compiler_conditional_xfail_data
+ set compiler_conditional_xfail_data {
+Index: gcc/testsuite/gcc.c-torture/execute/restrict-1.c
+===================================================================
+RCS file: gcc/testsuite/gcc.c-torture/execute/restrict-1.c
+diff -N gcc/testsuite/gcc.c-torture/execute/restrict-1.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.c-torture/execute/restrict-1.c 10 Dec 2004 17:25:07 -0000 1.2.44.1
+@@ -0,0 +1,30 @@
++/* PR rtl-optimization/16536
++ Origin: Jeremy Denise <jeremy.denise@libertysurf.fr>
++ Reduced: Wolfgang Bangerth <bangerth@dealii.org>
++ Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
++
++extern void abort ();
++
++typedef struct
++{
++ int i, dummy;
++} A;
++
++inline A foo (const A* p, const A* q)
++{
++ return (A){p->i+q->i};
++}
++
++void bar (A* __restrict__ p)
++{
++ *p=foo(p,p);
++ if (p->i!=2)
++ abort();
++}
++
++int main ()
++{
++ A a={1};
++ bar(&a);
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/20030204-1.c
+===================================================================
+RCS file: gcc/testsuite/gcc.dg/20030204-1.c
+diff -N gcc/testsuite/gcc.dg/20030204-1.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.dg/20030204-1.c 23 Jan 2005 05:16:14 -0000 1.3.6.1
+@@ -0,0 +1,16 @@
++/* PR optimization/8555 */
++/* { dg-do compile } */
++/* { dg-options "-O -ffast-math -funroll-loops" } */
++/* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target i?86-*-* } } */
++
++float foo (float *a, int i)
++{
++ int j;
++ float x = a[j = i - 1], y;
++
++ for (j = i; --j >= 0; )
++ if ((y = a[j]) > x)
++ x = y;
++
++ return x;
++}
+Index: gcc/testsuite/gcc.dg/asm-names.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/asm-names.c,v
+retrieving revision 1.2
+retrieving revision 1.2.44.1
+diff -u -r1.2 -r1.2.44.1
+--- gcc/gcc/testsuite/gcc.dg/asm-names.c 27 Aug 2001 19:23:11 -0000 1.2
++++ gcc/gcc/testsuite/gcc.dg/asm-names.c 4 Jan 2005 00:20:35 -0000 1.2.44.1
+@@ -2,26 +2,15 @@
+ to have an underscore prefixed, even if normal symbols are.
+ Problem reported by Krister Walfridsson <cato@df.lth.se>. */
+
+-/* { dg-do link } */
++/* { dg-do compile } */
+ /* { dg-options "-fleading-underscore" } */
++/* { dg-final { scan-assembler-not "____frob14" } } */
+
+ extern void frobnicate (void) asm ("___frob14"); /* three underscores */
+
+-void __frob14 (void) {} /* two underscores */
+-
+ int
+ main (void)
+ {
+ frobnicate ();
+ return 0;
+ }
+-
+-/* In case built where the runtime expects no leading underscore on
+- main(). */
+-extern int xmain (void) asm ("main");
+-
+-int xmain (void) { return main(); }
+-
+-/* In case built where the runtime calls __main. */
+-extern int ymain (void) asm ("___main");
+-int ymain (void) { return main(); }
+Index: gcc/testsuite/gcc.dg/loop-6.c
+===================================================================
+RCS file: gcc/testsuite/gcc.dg/loop-6.c
+diff -N gcc/testsuite/gcc.dg/loop-6.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.dg/loop-6.c 27 Nov 2004 16:59:16 -0000 1.1.4.1
+@@ -0,0 +1,25 @@
++/* PR optimization/18577 */
++/* Origin: Falk Hueffner <falk@debian.org> */
++
++/* { dg-do run } */
++/* { dg-options "-O2 -funroll-all-loops" } */
++
++static float tfcos12[3];
++__attribute__((noinline)) double f(double x) { return x; }
++int g;
++
++int main(void)
++{
++ int i, j;
++ for (i = 0; i < 1; i++)
++ tfcos12[i] = 0.5;
++
++ for (i = 0; i < 1; i++)
++ {
++ tfcos12[i] = 0.5 * f(i);
++ for (j = 0; j < 12; j++)
++ g++;
++ }
++
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/pr14765-1.c
+===================================================================
+RCS file: gcc/testsuite/gcc.dg/pr14765-1.c
+diff -N gcc/testsuite/gcc.dg/pr14765-1.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.dg/pr14765-1.c 21 Dec 2004 21:51:29 -0000 1.1.48.1
+@@ -0,0 +1,11 @@
++/* Empty statement expressions should get void type. Bug 14765 from
++ Serge Belyshev <belyshev@lubercy.com>. */
++/* { dg-do compile } */
++/* { dg-options "" } */
++
++int a;
++void fun ()
++{
++ a = 0;
++ a = ({}); /* { dg-error "not ignored" "void stmt expr" } */
++}
+Index: gcc/testsuite/gcc.dg/pr9771-1.c
+===================================================================
+RCS file: gcc/testsuite/gcc.dg/pr9771-1.c
+diff -N gcc/testsuite/gcc.dg/pr9771-1.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.dg/pr9771-1.c 30 Nov 2004 04:34:21 -0000 1.1.44.1
+@@ -0,0 +1,43 @@
++/* PR rtl-optimization/9771 */
++/* { dg-do run { target i?86-*-* } } */
++/* { dg-options "-O2 -fomit-frame-pointer -ffixed-ebp" } */
++
++extern void abort(void);
++extern void exit(int);
++
++register long *B asm ("ebp");
++
++long x = 10;
++long y = 20;
++
++void bar(void)
++{
++ B = &y;
++}
++
++void foo()
++{
++ long *adr = B;
++ long save = *adr;
++
++ *adr = 123;
++
++ bar();
++
++ *adr = save;
++}
++
++int main()
++{
++ B = &x;
++
++ foo();
++
++ if (x != 10 || y != 20)
++ abort();
++
++ /* We can't return, as our caller may assume %ebp is preserved! */
++ /* We could save/restore it (like foo), but its easier to exit. */
++ exit(0);
++}
++
+Index: gcc/testsuite/gcc.dg/short-compare-1.c
+===================================================================
+RCS file: gcc/testsuite/gcc.dg/short-compare-1.c
+diff -N gcc/testsuite/gcc.dg/short-compare-1.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.dg/short-compare-1.c 18 Jan 2005 08:39:29 -0000 1.1.4.1
+@@ -0,0 +1,21 @@
++/* PR rtl-optimization/19296 */
++/* Origin: Falk Hueffner <falk@debian.org> */
++
++/* { dg-do run } */
++/* { dg-options "-O" } */
++/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
++/* { dg-options "-O -m32 -mcpu=i686" { target x86_64-*-* } } */
++
++extern void abort(void);
++
++void f(unsigned short ad)
++{
++ if (ad >= 0x4000 && ad < 0xc000)
++ abort();
++}
++
++int main(void)
++{
++ f(0xff00);
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/short-compare-2.c
+===================================================================
+RCS file: gcc/testsuite/gcc.dg/short-compare-2.c
+diff -N gcc/testsuite/gcc.dg/short-compare-2.c
+--- gcc//dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/gcc.dg/short-compare-2.c 18 Jan 2005 08:39:29 -0000 1.1.4.1
+@@ -0,0 +1,22 @@
++/* PR rtl-optimization/19296 */
++/* Origin: Falk Hueffner <falk@debian.org> */
++/* Testcase by Andrew Pinski <pinskia@gcc.gnu.org> */
++
++/* { dg-do run } */
++/* { dg-options "-O" } */
++/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
++/* { dg-options "-O -m32 -mcpu=i686" { target x86_64-*-* } } */
++
++extern void abort();
++
++void f(unsigned short ad)
++{
++ if ((short) (ad - 0x4000) >= 0)
++ abort();
++}
++
++int main(void)
++{
++ f(0xc000);
++ return 0;
++}
+Index: libstdc++-v3/ChangeLog
+===================================================================
+RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
+retrieving revision 1.1464.2.192
+retrieving revision 1.1464.2.195
+diff -u -r1.1464.2.192 -r1.1464.2.195
+--- gcc/libstdc++-v3/ChangeLog 30 Sep 2004 16:47:23 -0000 1.1464.2.192
++++ gcc/libstdc++-v3/ChangeLog 21 Jan 2005 23:52:45 -0000 1.1464.2.195
+@@ -1,3 +1,18 @@
++2005-01-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
++
++ PR libstdc++/19510
++ * include/bits/stl_list.h (_List_iterator_base): Initialize _M_node
++ in constructor.
++ (_List_iterator): Initialize _List_iterator_base in constructor.
++ * include/bits/stl_tree.h (_Rb_tree_iterator): Initialize _M_node
++ in constructor.
++
++2004-12-03 Richard Henderson <rth@redhat.com>
++
++ PR 17856
++ * config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
++ Split in-out memory constraints.
++
+ 2004-09-30 Release Manager
+
+ * GCC 3.3.5 Released.
+Index: libstdc++-v3/config/cpu/i486/atomicity.h
+===================================================================
+RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/i486/atomicity.h,v
+retrieving revision 1.1.22.1
+retrieving revision 1.1.22.2
+diff -u -r1.1.22.1 -r1.1.22.2
+--- gcc/libstdc++-v3/config/cpu/i486/atomicity.h 2 Jun 2003 18:48:52 -0000 1.1.22.1
++++ gcc/libstdc++-v3/config/cpu/i486/atomicity.h 3 Dec 2004 23:44:07 -0000 1.1.22.2
+@@ -1,6 +1,6 @@
+ // Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
+
+-// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
++// Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -38,8 +38,8 @@
+ {
+ register _Atomic_word __result;
+ __asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
+- : "=r" (__result), "+m" (*__mem)
+- : "0" (__val)
++ : "=r" (__result), "=m" (*__mem)
++ : "0" (__val), "m"(*__mem)
+ : "memory");
+ return __result;
+ }
+@@ -49,7 +49,9 @@
+ __atomic_add (volatile _Atomic_word* __mem, int __val)
+ {
+ __asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
+- : "+m" (*__mem) : "ir" (__val) : "memory");
++ : "=m" (*__mem)
++ : "ir" (__val), "m"(*__mem)
++ : "memory");
+ }
+
+ #endif /* atomicity.h */
+Index: libstdc++-v3/include/bits/c++config
+===================================================================
+RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/c++config,v
+retrieving revision 1.574.2.657
+retrieving revision 1.574.2.779
+diff -u -r1.574.2.657 -r1.574.2.779
+--- gcc/libstdc++-v3/include/bits/c++config 30 Sep 2004 00:16:09 -0000 1.574.2.657
++++ gcc/libstdc++-v3/include/bits/c++config 30 Jan 2005 00:16:14 -0000 1.574.2.779
+@@ -35,7 +35,7 @@
+ #include <bits/os_defines.h>
+
+ // The current version of the C++ library in compressed ISO date format.
+-#define __GLIBCPP__ 20040930
++#define __GLIBCPP__ 20050130
+
+ // This is necessary until GCC supports separate template compilation.
+ #define _GLIBCPP_NO_TEMPLATE_EXPORT 1
+Index: libstdc++-v3/include/bits/stl_list.h
+===================================================================
+RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_list.h,v
+retrieving revision 1.20
+retrieving revision 1.20.8.1
+diff -u -r1.20 -r1.20.8.1
+--- gcc/libstdc++-v3/include/bits/stl_list.h 10 Sep 2002 23:19:10 -0000 1.20
++++ gcc/libstdc++-v3/include/bits/stl_list.h 21 Jan 2005 23:52:48 -0000 1.20.8.1
+@@ -1,6 +1,6 @@
+ // List implementation -*- C++ -*-
+
+-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -108,6 +108,7 @@
+ { }
+
+ _List_iterator_base()
++ : _M_node()
+ { }
+
+ /// Walk the %list forward.
+@@ -156,6 +157,7 @@
+ { }
+
+ _List_iterator()
++ : _List_iterator_base()
+ { }
+
+ _List_iterator(const iterator& __x)
+Index: libstdc++-v3/include/bits/stl_tree.h
+===================================================================
+RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_tree.h,v
+retrieving revision 1.17
+retrieving revision 1.17.2.1
+diff -u -r1.17 -r1.17.2.1
+--- gcc/libstdc++-v3/include/bits/stl_tree.h 22 Nov 2002 18:53:53 -0000 1.17
++++ gcc/libstdc++-v3/include/bits/stl_tree.h 21 Jan 2005 23:52:49 -0000 1.17.2.1
+@@ -1,6 +1,6 @@
+ // RB tree implementation -*- C++ -*-
+
+-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+ //
+ // This file is part of the GNU ISO C++ Library. This library is free
+ // software; you can redistribute it and/or modify it under the
+@@ -191,7 +191,7 @@
+ typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
+ typedef _Rb_tree_node<_Val>* _Link_type;
+
+- _Rb_tree_iterator() {}
++ _Rb_tree_iterator() { _M_node = 0; }
+ _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
+ _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }
+
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/specs-arm-soft-float b/misc/buildroot/toolchain/gcc/3.3.5/specs-arm-soft-float
new file mode 100644
index 000000000..d692174aa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/specs-arm-soft-float
@@ -0,0 +1,124 @@
+*asm:
+%{mbig-endian:-EB} %{mlittle-endian:-EL} %{mcpu=*:-mcpu=%*} %{march=*:-march=%*} %{mapcs-*:-mapcs-%*} %(subtarget_asm_float_spec) %{mthumb-interwork:-mthumb-interwork} %(subtarget_extra_asm_spec)
+
+*asm_debug:
+%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}
+
+*asm_final:
+
+
+*asm_options:
+%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
+
+*invoke_as:
+%{!S:-o %{|!pipe:%g.s} |
+ as %(asm_options) %{!pipe:%g.s} %A }
+
+*cpp:
+%(cpp_cpu_arch) %(subtarget_cpp_spec) %{mapcs-32:%{mapcs-26: %e-mapcs-26 and -mapcs-32 may not be used together}} %{msoft-float:%{mhard-float: %e-msoft-float and -mhard_float may not be used together}} %{mbig-endian:%{mlittle-endian: %e-mbig-endian and -mlittle-endian may not be used together}}
+
+*cpp_options:
+%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{O*} %{undef}
+
+*cpp_debug_options:
+%{d*}
+
+*cpp_unique_options:
+%{C:%{!E:%eGNU C does not support -C without using -E}} %{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}
+
+*trad_capable_cpp:
+cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}
+
+*cc1:
+%{profile:-p}
+
+*cc1_options:
+%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{msoft-float:%{mhard-float: %e-msoft-float and -mhard_float may not be used together}} %{!mhard-float:%{!msoft-float:-msoft-float}}
+
+*cc1plus:
+
+
+*link_gcc_c_sequence:
+%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}
+
+*endfile:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
+
+*link:
+%{h*} %{version:-v} %{b} %{Wl,*:%*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} -X %{mbig-endian:-EB} -m armelf_linux -p
+
+*lib:
+%{pthread:-lpthread} %{shared:-lc} %{!shared:%{profile:-lc_p}%{!profile:-lc}}
+
+*libgcc:
+%{!mhard-float:-lfloat} %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:-lgcc_s%M}}}
+
+*startfile:
+%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}} crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
+
+*switches_need_spaces:
+
+
+*predefines:
+
+
+*cross_compile:
+1
+
+*version:
+3.3.4
+
+*multilib:
+. ;
+
+*multilib_defaults:
+marm mlittle-endian msoft-float mapcs-32 mno-thumb-interwork
+
+*multilib_extra:
+
+
+*multilib_matches:
+
+
+*multilib_exclusions:
+
+
+*multilib_options:
+
+
+*linker:
+collect2
+
+*link_libgcc:
+%D
+
+*md_exec_prefix:
+
+
+*md_startfile_prefix:
+
+
+*md_startfile_prefix_1:
+
+
+*startfile_prefix_spec:
+
+
+*cpp_cpu_arch:
+%{march=arm2:-D__ARM_ARCH_2__} %{march=arm250:-D__ARM_ARCH_2__} %{march=arm3:-D__ARM_ARCH_2__} %{march=arm6:-D__ARM_ARCH_3__} %{march=arm600:-D__ARM_ARCH_3__} %{march=arm610:-D__ARM_ARCH_3__} %{march=arm7:-D__ARM_ARCH_3__} %{march=arm700:-D__ARM_ARCH_3__} %{march=arm710:-D__ARM_ARCH_3__} %{march=arm720:-D__ARM_ARCH_3__} %{march=arm7100:-D__ARM_ARCH_3__} %{march=arm7500:-D__ARM_ARCH_3__} %{march=arm7500fe:-D__ARM_ARCH_3__} %{march=arm7m:-D__ARM_ARCH_3M__} %{march=arm7dm:-D__ARM_ARCH_3M__} %{march=arm7dmi:-D__ARM_ARCH_3M__} %{march=arm7tdmi:-D__ARM_ARCH_4T__} %{march=arm8:-D__ARM_ARCH_4__} %{march=arm810:-D__ARM_ARCH_4__} %{march=arm9:-D__ARM_ARCH_4T__} %{march=arm920:-D__ARM_ARCH_4__} %{march=arm920t:-D__ARM_ARCH_4T__} %{march=arm9tdmi:-D__ARM_ARCH_4T__} %{march=strongarm:-D__ARM_ARCH_4__} %{march=strongarm110:-D__ARM_ARCH_4__} %{march=strongarm1100:-D__ARM_ARCH_4__} %{march=xscale:-D__ARM_ARCH_5TE__} %{march=xscale:-D__XSCALE__} %{march=armv2:-D__ARM_ARCH_2__} %{march=armv2a:-D__ARM_ARCH_2__} %{march=armv3:-D__ARM_ARCH_3__} %{march=armv3m:-D__ARM_ARCH_3M__} %{march=armv4:-D__ARM_ARCH_4__} %{march=armv4t:-D__ARM_ARCH_4T__} %{march=armv5:-D__ARM_ARCH_5__} %{march=armv5t:-D__ARM_ARCH_5T__} %{march=armv5e:-D__ARM_ARCH_5E__} %{march=armv5te:-D__ARM_ARCH_5TE__} %{!march=*: %{mcpu=arm2:-D__ARM_ARCH_2__} %{mcpu=arm250:-D__ARM_ARCH_2__} %{mcpu=arm3:-D__ARM_ARCH_2__} %{mcpu=arm6:-D__ARM_ARCH_3__} %{mcpu=arm600:-D__ARM_ARCH_3__} %{mcpu=arm610:-D__ARM_ARCH_3__} %{mcpu=arm7:-D__ARM_ARCH_3__} %{mcpu=arm700:-D__ARM_ARCH_3__} %{mcpu=arm710:-D__ARM_ARCH_3__} %{mcpu=arm720:-D__ARM_ARCH_3__} %{mcpu=arm7100:-D__ARM_ARCH_3__} %{mcpu=arm7500:-D__ARM_ARCH_3__} %{mcpu=arm7500fe:-D__ARM_ARCH_3__} %{mcpu=arm7m:-D__ARM_ARCH_3M__} %{mcpu=arm7dm:-D__ARM_ARCH_3M__} %{mcpu=arm7dmi:-D__ARM_ARCH_3M__} %{mcpu=arm7tdmi:-D__ARM_ARCH_4T__} %{mcpu=arm8:-D__ARM_ARCH_4__} %{mcpu=arm810:-D__ARM_ARCH_4__} %{mcpu=arm9:-D__ARM_ARCH_4T__} %{mcpu=arm920:-D__ARM_ARCH_4__} %{mcpu=arm920t:-D__ARM_ARCH_4T__} %{mcpu=arm9tdmi:-D__ARM_ARCH_4T__} %{mcpu=strongarm:-D__ARM_ARCH_4__} %{mcpu=strongarm110:-D__ARM_ARCH_4__} %{mcpu=strongarm1100:-D__ARM_ARCH_4__} %{mcpu=xscale:-D__ARM_ARCH_5TE__} %{mcpu=xscale:-D__XSCALE__} %{!mcpu*:%(cpp_cpu_arch_default)}}
+
+*cpp_cpu_arch_default:
+-D__ARM_ARCH_4T__
+
+*subtarget_cpp_spec:
+%{posix:-D_POSIX_SOURCE} %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__}
+
+*subtarget_extra_asm_spec:
+
+
+*subtarget_asm_float_spec:
+%{mapcs-float:-mfloat} %{!mhard-float:-mno-fpu}
+
+*link_command:
+%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}
+
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/specs-mips-soft-float b/misc/buildroot/toolchain/gcc/3.3.5/specs-mips-soft-float
new file mode 100644
index 000000000..2a4240012
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/specs-mips-soft-float
@@ -0,0 +1,145 @@
+*asm:
+%{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64}%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} %(subtarget_asm_optimizing_spec) %(subtarget_asm_debugging_spec) %{membedded-pic} %{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} %{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} %{mgp32} %{mgp64} %{march=*} %(target_asm_spec) %(subtarget_asm_spec)
+
+*asm_debug:
+%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}
+
+*asm_final:
+%|
+
+*asm_options:
+%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
+
+*invoke_as:
+%{!S:-o %{|!pipe:%g.s} |
+ as %(asm_options) %{!pipe:%g.s} %A }
+
+*cpp:
+%(subtarget_cpp_spec)
+
+*cpp_options:
+%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{O*} %{undef}
+
+*cpp_debug_options:
+%{d*}
+
+*cpp_unique_options:
+%{C:%{!E:%eGNU C does not support -C without using -E}} %{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}
+
+*trad_capable_cpp:
+cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}
+
+*cc1:
+%{profile:-p}
+
+*cc1_options:
+%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{msoft-float:%{mhard-float: %e-msoft-float and -mhard_float may not be used together}} %{!mhard-float:%{!msoft-float:-msoft-float}}
+
+*cc1plus:
+
+
+*link_gcc_c_sequence:
+%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}
+
+*endfile:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
+
+*link:
+%{!static:--eh-frame-hdr} %(endian_spec) %{shared:-shared} %{!shared: %{!ibcs: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} %{static:-static}}}
+
+*lib:
+%{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}}
+
+*libgcc:
+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}}
+
+*startfile:
+%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}} crti.o%s %{static:crtbeginT.o%s} %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}
+
+*switches_need_spaces:
+
+
+*predefines:
+
+
+*cross_compile:
+1
+
+*version:
+3.3.4
+
+*multilib:
+. ;
+
+*multilib_defaults:
+EB mips1 mabi=32
+
+*multilib_extra:
+
+
+*multilib_matches:
+
+
+*multilib_exclusions:
+
+
+*multilib_options:
+
+
+*linker:
+collect2
+
+*link_libgcc:
+%D
+
+*md_exec_prefix:
+
+
+*md_startfile_prefix:
+
+
+*md_startfile_prefix_1:
+
+
+*startfile_prefix_spec:
+
+
+*subtarget_cc1_spec:
+
+
+*subtarget_cpp_spec:
+%{fno-PIC:-U__PIC__ -U__pic__} %{fno-pic:-U__PIC__ -U__pic__} %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{pthread:-D_REENTRANT}
+
+*mips_as_asm_spec:
+%{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} %{pipe: %e-pipe is not supported} %{K} %(subtarget_mips_as_asm_spec)
+
+*gas_asm_spec:
+%{mtune=*} %{v}
+
+*target_asm_spec:
+%{mmips-as: %(mips_as_asm_spec)} %{!mmips-as: %(gas_asm_spec)}
+
+*subtarget_mips_as_asm_spec:
+%{v}
+
+*subtarget_asm_optimizing_spec:
+%{noasmopt:-O0} %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}}
+
+*subtarget_asm_debugging_spec:
+-g0
+
+*mdebug_asm_spec:
+%{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}
+
+*subtarget_asm_spec:
+%{mabi=64: -64} %{!fno-PIC:%{!fno-pic:-KPIC}} %{fno-PIC:-non_shared} %{fno-pic:-non_shared}
+
+*asm_abi_default_spec:
+-32
+
+*endian_spec:
+%{!EL:%{!mel:-EB}} %{EL|mel:-EL}
+
+*link_command:
+%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}
+
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/specs-mipsel-soft-float b/misc/buildroot/toolchain/gcc/3.3.5/specs-mipsel-soft-float
new file mode 100644
index 000000000..481bf5a39
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/specs-mipsel-soft-float
@@ -0,0 +1,145 @@
+*asm:
+%{G*} %(endian_spec) %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64}%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} %(subtarget_asm_optimizing_spec) %(subtarget_asm_debugging_spec) %{membedded-pic} %{mabi=32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} %{mabi=eabi} %{mabi=o64} %{!mabi*: %(asm_abi_default_spec)} %{mgp32} %{mgp64} %{march=*} %(target_asm_spec) %(subtarget_asm_spec)
+
+*asm_debug:
+%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}
+
+*asm_final:
+%|
+
+*asm_options:
+%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
+
+*invoke_as:
+%{!S:-o %{|!pipe:%g.s} |
+ as %(asm_options) %{!pipe:%g.s} %A }
+
+*cpp:
+%(subtarget_cpp_spec)
+
+*cpp_options:
+%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{O*} %{undef}
+
+*cpp_debug_options:
+%{d*}
+
+*cpp_unique_options:
+%{C:%{!E:%eGNU C does not support -C without using -E}} %{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}
+
+*trad_capable_cpp:
+cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}
+
+*cc1:
+%{profile:-p}
+
+*cc1_options:
+%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{msoft-float:%{mhard-float: %e-msoft-float and -mhard_float may not be used together}} %{!mhard-float:%{!msoft-float:-msoft-float}}
+
+*cc1plus:
+
+
+*link_gcc_c_sequence:
+%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}
+
+*endfile:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
+
+*link:
+%{!static:--eh-frame-hdr} %(endian_spec) %{shared:-shared} %{!shared: %{!ibcs: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} %{static:-static}}}
+
+*lib:
+%{shared: -lc} %{!static:-rpath-link %R/lib:%R/usr/lib} %{!shared: %{pthread:-lpthread} %{profile:-lc_p} %{!profile: -lc}}
+
+*libgcc:
+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}}
+
+*startfile:
+%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}} crti.o%s %{static:crtbeginT.o%s} %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}
+
+*switches_need_spaces:
+
+
+*predefines:
+
+
+*cross_compile:
+1
+
+*version:
+3.3.4
+
+*multilib:
+. ;
+
+*multilib_defaults:
+EL mips1 mabi=32
+
+*multilib_extra:
+
+
+*multilib_matches:
+
+
+*multilib_exclusions:
+
+
+*multilib_options:
+
+
+*linker:
+collect2
+
+*link_libgcc:
+%D
+
+*md_exec_prefix:
+
+
+*md_startfile_prefix:
+
+
+*md_startfile_prefix_1:
+
+
+*startfile_prefix_spec:
+
+
+*subtarget_cc1_spec:
+
+
+*subtarget_cpp_spec:
+%{fno-PIC:-U__PIC__ -U__pic__} %{fno-pic:-U__PIC__ -U__pic__} %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{pthread:-D_REENTRANT}
+
+*mips_as_asm_spec:
+%{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} %{pipe: %e-pipe is not supported} %{K} %(subtarget_mips_as_asm_spec)
+
+*gas_asm_spec:
+%{mtune=*} %{v}
+
+*target_asm_spec:
+%{mmips-as: %(mips_as_asm_spec)} %{!mmips-as: %(gas_asm_spec)}
+
+*subtarget_mips_as_asm_spec:
+%{v}
+
+*subtarget_asm_optimizing_spec:
+%{noasmopt:-O0} %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}}
+
+*subtarget_asm_debugging_spec:
+-g0
+
+*mdebug_asm_spec:
+%{!gdwarf*:-mdebug} %{gdwarf*:-no-mdebug}
+
+*subtarget_asm_spec:
+%{mabi=64: -64} %{!fno-PIC:%{!fno-pic:-KPIC}} %{fno-PIC:-non_shared} %{fno-pic:-non_shared}
+
+*asm_abi_default_spec:
+-32
+
+*endian_spec:
+%{!EB:%{!meb:-EL}} %{EB|meb:-EB}
+
+*link_command:
+%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}
+
diff --git a/misc/buildroot/toolchain/gcc/3.3.5/specs-powerpc-soft-float b/misc/buildroot/toolchain/gcc/3.3.5/specs-powerpc-soft-float
new file mode 100644
index 000000000..8a546ac8e
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.5/specs-powerpc-soft-float
@@ -0,0 +1,352 @@
+*asm:
+%(asm_cpu) %{.s: %{mregnames} %{mno-regnames}} %{.S: %{mregnames} %{mno-regnames}} %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} %{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian} %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: %{mcall-freebsd: -mbig} %{mcall-i960-old: -mlittle} %{mcall-linux: -mbig} %{mcall-gnu: -mbig} %{mcall-netbsd: -mbig} }}}}
+
+*asm_debug:
+%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}
+
+*asm_final:
+%|
+
+*asm_options:
+%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
+
+*invoke_as:
+%{!S:-o %{|!pipe:%g.s} |
+ as %(asm_options) %{!pipe:%g.s} %A }
+
+*cpp:
+%{posix: -D_POSIX_SOURCE} %(cpp_sysv) %{mads: %(cpp_os_ads) } %{myellowknife: %(cpp_os_yellowknife) } %{mmvme: %(cpp_os_mvme) } %{msim: %(cpp_os_sim) } %{mwindiss: %(cpp_os_windiss) } %{mcall-freebsd: %(cpp_os_freebsd) } %{mcall-linux: %(cpp_os_linux) } %{mcall-gnu: %(cpp_os_gnu) } %{mcall-netbsd: %(cpp_os_netbsd) } %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(cpp_os_default) }}}}}}}}}
+
+*cpp_options:
+%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{O*} %{undef}
+
+*cpp_debug_options:
+%{d*}
+
+*cpp_unique_options:
+%{C:%{!E:%eGNU C does not support -C without using -E}} %{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}
+
+*trad_capable_cpp:
+cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}
+
+*cc1:
+%{G*} %{mlittle: %(cc1_endian_little)} %{!mlittle: %{mlittle-endian: %(cc1_endian_little)}} %{mbig: %(cc1_endian_big)} %{!mbig: %{mbig-endian: %(cc1_endian_big)}} %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: %{mcall-aixdesc: -mbig %(cc1_endian_big) } %{mcall-freebsd: -mbig %(cc1_endian_big) } %{mcall-i960-old: -mlittle %(cc1_endian_little) } %{mcall-linux: -mbig %(cc1_endian_big) } %{mcall-gnu: -mbig %(cc1_endian_big) } %{mcall-netbsd: -mbig %(cc1_endian_big) } %{!mcall-aixdesc: %{!mcall-freebsd: %{!mcall-i960-old: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(cc1_endian_default) }}}}}} }}}} %{mno-sdata: -msdata=none } %{meabi: %{!mcall-*: -mcall-sysv }} %{!meabi: %{!mno-eabi: %{mrelocatable: -meabi } %{mcall-freebsd: -mno-eabi } %{mcall-i960-old: -meabi } %{mcall-linux: -mno-eabi } %{mcall-gnu: -mno-eabi } %{mcall-netbsd: -mno-eabi }}} %{msdata: -msdata=default} %{mno-sdata: -msdata=none} %{profile: -p}
+
+*cc1_options:
+%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{msoft-float:%{mhard-float: %e-msoft-float and -mhard_float may not be used together}} %{!mhard-float:%{!msoft-float:-msoft-float}}
+
+*cc1plus:
+
+
+*link_gcc_c_sequence:
+%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}
+
+*endfile:
+%{mads: crtsavres.o%s %(endfile_ads)} %{myellowknife: crtsavres.o%s %(endfile_yellowknife)} %{mmvme: crtsavres.o%s %(endfile_mvme)} %{msim: crtsavres.o%s %(endfile_sim)} %{mwindiss: %(endfile_windiss)} %{mcall-freebsd: crtsavres.o%s %(endfile_freebsd) } %{mcall-linux: crtsavres.o%s %(endfile_linux) } %{mcall-gnu: crtsavres.o%s %(endfile_gnu) } %{mcall-netbsd: crtsavres.o%s %(endfile_netbsd) } %{mvxworks: crtsavres.o%s %(endfile_vxworks) } %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %{!mvxworks: %(crtsavres_default) %(endfile_default) }}}}}}}}}}
+
+*link:
+%{!static:--eh-frame-hdr} %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} %{YP,*} %{R*} %{Qy:} %{!Qn:-Qy} %(link_shlib) %{!Wl,-T*: %{!T*: %(link_start) }} %(link_target) %(link_os)
+
+*lib:
+%{mads: %(lib_ads) } %{myellowknife: %(lib_yellowknife) } %{mmvme: %(lib_mvme) } %{msim: %(lib_sim) } %{mwindiss: %(lib_windiss) } %{mcall-freebsd: %(lib_freebsd) } %{mcall-linux: %(lib_linux) } %{mcall-gnu: %(lib_gnu) } %{mcall-netbsd: %(lib_netbsd) } %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(lib_default) }}}}}}}}}
+
+*libgcc:
+%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s%M -lgcc}}%{shared:%{shared-libgcc:-lgcc_s%M}%{!shared-libgcc:-lgcc}}}}
+
+*startfile:
+%{mads: %(startfile_ads) } %{myellowknife: %(startfile_yellowknife) } %{mmvme: %(startfile_mvme) } %{msim: %(startfile_sim) } %{mwindiss: %(startfile_windiss) } %{mcall-freebsd: %(startfile_freebsd) } %{mcall-linux: %(startfile_linux) } %{mcall-gnu: %(startfile_gnu) } %{mcall-netbsd: %(startfile_netbsd) } %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %(startfile_default) }}}}}}}}}
+
+*switches_need_spaces:
+
+
+*predefines:
+
+
+*cross_compile:
+1
+
+*version:
+3.3.4
+
+*multilib:
+. mhard-float;nof !mhard-float;
+
+*multilib_defaults:
+mbig mcall-sysv
+
+*multilib_extra:
+fPIC mstrict-align
+
+*multilib_matches:
+mcpu=401 msoft-float;mcpu=403 msoft-float;mcpu=405 msoft-float;mcpu=ec603e msoft-float;mcpu=801 msoft-float;mcpu=821 msoft-float;mcpu=823 msoft-float;mcpu=860 msoft-float;msoft-float msoft-float;
+
+*multilib_exclusions:
+
+
+*multilib_options:
+msoft-float
+
+*linker:
+collect2
+
+*link_libgcc:
+%D
+
+*md_exec_prefix:
+
+
+*md_startfile_prefix:
+
+
+*md_startfile_prefix_1:
+
+
+*startfile_prefix_spec:
+
+
+*cpp_default:
+
+
+*asm_cpu:
+%{!mcpu*: %{mpower: %{!mpower2: -mpwr}} %{mpower2: -mpwrx} %{mpowerpc*: -mppc} %{mno-power: %{!mpowerpc*: -mcom}} %{!mno-power: %{!mpower2: %(asm_default)}}} %{mcpu=common: -mcom} %{mcpu=power: -mpwr} %{mcpu=power2: -mpwrx} %{mcpu=power3: -m604} %{mcpu=power4: -mpower4} %{mcpu=powerpc: -mppc} %{mcpu=rios: -mpwr} %{mcpu=rios1: -mpwr} %{mcpu=rios2: -mpwrx} %{mcpu=rsc: -mpwr} %{mcpu=rsc1: -mpwr} %{mcpu=401: -mppc} %{mcpu=403: -m403} %{mcpu=405: -m405} %{mcpu=505: -mppc} %{mcpu=601: -m601} %{mcpu=602: -mppc} %{mcpu=603: -mppc} %{mcpu=603e: -mppc} %{mcpu=ec603e: -mppc} %{mcpu=604: -mppc} %{mcpu=604e: -mppc} %{mcpu=620: -mppc} %{mcpu=630: -m604} %{mcpu=740: -mppc} %{mcpu=7400: -mppc} %{mcpu=7450: -mppc} %{mcpu=750: -mppc} %{mcpu=801: -mppc} %{mcpu=821: -mppc} %{mcpu=823: -mppc} %{mcpu=860: -mppc} %{mcpu=8540: -me500} %{maltivec: -maltivec}
+
+*asm_default:
+-mppc
+
+*cpp_sysv:
+%{mrelocatable*: -D_RELOCATABLE} %{fpic: -D__PIC__=1 -D__pic__=1} %{!fpic: %{fPIC: -D__PIC__=2 -D__pic__=2}}
+
+*crtsavres_default:
+crtsavres.o%s
+
+*lib_ads:
+--start-group -lads -lc --end-group
+
+*lib_yellowknife:
+--start-group -lyk -lc --end-group
+
+*lib_mvme:
+--start-group -lmvme -lc --end-group
+
+*lib_sim:
+--start-group -lsim -lc --end-group
+
+*lib_freebsd:
+ %{!shared: %{!pg: %{!pthread:-lc} %{pthread:-lc_r}} %{pg: %{!pthread:-lc_p} %{pthread:-lc_r_p}} }
+
+*lib_gnu:
+%{mnewlib: --start-group -lgnu -lc --end-group } %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } %{profile:-lc_p} %{!profile:-lc}}}
+
+*lib_linux:
+%{mnewlib: --start-group -llinux -lc --end-group } %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} %{!shared: %{profile:-lc_p} %{!profile:-lc}}}
+
+*lib_netbsd:
+%{profile:-lgmon -lc_p} %{!profile:-lc}
+
+*lib_vxworks:
+
+
+*lib_windiss:
+--start-group -li -lcfp -lwindiss -lram -limpl -limpfp --end-group
+
+*lib_default:
+%(lib_linux)
+
+*startfile_ads:
+ecrti.o%s crt0.o%s crtbegin.o%s
+
+*startfile_yellowknife:
+ecrti.o%s crt0.o%s crtbegin.o%s
+
+*startfile_mvme:
+ecrti.o%s crt0.o%s crtbegin.o%s
+
+*startfile_sim:
+ecrti.o%s sim-crt0.o%s crtbegin.o%s
+
+*startfile_freebsd:
+%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}} crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
+
+*startfile_gnu:
+%{!shared: %{!static: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}} %{static: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}} %{mnewlib: ecrti.o%s} %{!mnewlib: crti.o%s} %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
+
+*startfile_linux:
+%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} %{mnewlib: ecrti.o%s} %{!mnewlib: crti.o%s} %{static:crtbeginT.o%s} %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}
+
+*startfile_netbsd:
+ncrti.o%s crt0.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
+
+*startfile_vxworks:
+
+
+*startfile_windiss:
+crt0.o%s crtbegin.o%s
+
+*startfile_default:
+%(startfile_linux)
+
+*endfile_ads:
+crtend.o%s ecrtn.o%s
+
+*endfile_yellowknife:
+crtend.o%s ecrtn.o%s
+
+*endfile_mvme:
+crtend.o%s ecrtn.o%s
+
+*endfile_sim:
+crtend.o%s ecrtn.o%s
+
+*endfile_freebsd:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
+
+*endfile_gnu:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} %{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}
+
+*endfile_linux:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} %{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}
+
+*endfile_netbsd:
+%{!shared:crtend.o%s} %{shared:crtendS.o%s} ncrtn.o%s
+
+*endfile_vxworks:
+
+
+*endfile_windiss:
+crtend.o%s
+
+*endfile_default:
+%(endfile_linux)
+
+*link_path:
+
+
+*link_shlib:
+%{shared:-shared} %{!shared: %{static:-static}}
+
+*link_target:
+%{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: %{mcall-i960-old: --oformat elf32-powerpcle} }}}}
+
+*link_start:
+%{mads: %(link_start_ads) } %{myellowknife: %(link_start_yellowknife) } %{mmvme: %(link_start_mvme) } %{msim: %(link_start_sim) } %{mwindiss: %(link_start_windiss) } %{mcall-freebsd: %(link_start_freebsd) } %{mcall-linux: %(link_start_linux) } %{mcall-gnu: %(link_start_gnu) } %{mcall-netbsd: %(link_start_netbsd) } %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %{!mcall-freebsd: %(link_start_default) }}}}}}}}}
+
+*link_start_ads:
+-T ads.ld%s
+
+*link_start_yellowknife:
+-T yellowknife.ld%s
+
+*link_start_mvme:
+-Ttext 0x40000
+
+*link_start_sim:
+
+
+*link_start_freebsd:
+
+
+*link_start_gnu:
+
+
+*link_start_linux:
+
+
+*link_start_netbsd:
+
+
+*link_start_vxworks:
+
+
+*link_start_windiss:
+
+
+*link_start_default:
+%(link_start_linux)
+
+*link_os:
+%{mads: %(link_os_ads) } %{myellowknife: %(link_os_yellowknife) } %{mmvme: %(link_os_mvme) } %{msim: %(link_os_sim) } %{mwindiss: %(link_os_windiss) } %{mcall-freebsd: %(link_os_freebsd) } %{mcall-linux: %(link_os_linux) } %{mcall-gnu: %(link_os_gnu) } %{mcall-netbsd: %(link_os_netbsd) } %{mcall-uclibc: %(link_os_linux_uclibc) } %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: %{!mcall-netbsd: %{!mcall-uclibc: %(link_os_default) }}}}}}}}}}
+
+*link_os_ads:
+
+
+*link_os_yellowknife:
+
+
+*link_os_mvme:
+
+
+*link_os_sim:
+-m elf32ppcsim
+
+*link_os_freebsd:
+ %{p:%e`-p' not supported; use `-pg' and gprof(1)} %{Wl,*:%*} %{v:-V} %{assert*} %{R*} %{rpath*} %{defsym*} %{shared:-Bshareable %{h*} %{soname*}} %{!shared: %{!static: %{rdynamic: -export-dynamic} %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} %{static:-Bstatic}} %{symbolic:-Bsymbolic}
+
+*link_os_linux:
+-m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}
+
+*link_os_gnu:
+-m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}
+
+*link_os_netbsd:
+%{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}}
+
+*link_os_vxworks:
+-r
+
+*link_os_windiss:
+
+
+*link_os_linux_uclibc:
+-m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}
+
+*link_os_default:
+%(link_os_linux_uclibc)
+
+*cc1_endian_big:
+
+
+*cc1_endian_little:
+%{!mstrict-align: %{!mno-strict-align: %{!mcall-i960-old: -mstrict-align } }}
+
+*cc1_endian_default:
+%(cc1_endian_big)
+
+*cpp_os_ads:
+
+
+*cpp_os_yellowknife:
+
+
+*cpp_os_mvme:
+
+
+*cpp_os_sim:
+
+
+*cpp_os_freebsd:
+ -D__ELF__ -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__ -Acpu=powerpc -Amachine=powerpc
+
+*cpp_os_gnu:
+-D__unix__ -D__gnu_hurd__ -D__GNU__ %{!undef: %{!ansi: -Dunix -D__unix}} -Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}
+
+*cpp_os_linux:
+-D__unix__ -D__gnu_linux__ -D__linux__ %{!undef: %{!ansi: %{!std=*:-Dunix -D__unix -Dlinux -D__linux} %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}} -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}
+
+*cpp_os_netbsd:
+-D__powerpc__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__
+
+*cpp_os_rtems:
+%{!mcpu*: %{!Dppc*: %{!Dmpc*: -Dmpc750} } }%{mcpu=403: %{!Dppc*: %{!Dmpc*: -Dppc403} } } %{mcpu=505: %{!Dppc*: %{!Dmpc*: -Dmpc505} } } %{mcpu=601: %{!Dppc*: %{!Dmpc*: -Dppc601} } } %{mcpu=602: %{!Dppc*: %{!Dmpc*: -Dppc602} } } %{mcpu=603: %{!Dppc*: %{!Dmpc*: -Dppc603} } } %{mcpu=603e: %{!Dppc*: %{!Dmpc*: -Dppc603e} } } %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } %{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }
+
+*cpp_os_vxworks:
+-DCPU_FAMILY=PPC %{!mcpu*: %{mpowerpc*: -DCPU=PPC603} %{!mno-powerpc: -DCPU=PPC603}} %{mcpu=powerpc: -DCPU=PPC603} %{mcpu=401: -DCPU=PPC403} %{mcpu=403: -DCPU=PPC403} %{mcpu=405: -DCPU=PPC405} %{mcpu=601: -DCPU=PPC601} %{mcpu=602: -DCPU=PPC603} %{mcpu=603: -DCPU=PPC603} %{mcpu=603e: -DCPU=PPC603} %{mcpu=ec603e: -DCPU=PPC603} %{mcpu=604: -DCPU=PPC604} %{mcpu=604e: -DCPU=PPC604} %{mcpu=620: -DCPU=PPC604} %{mcpu=740: -DCPU=PPC603} %{mcpu=7450: -DCPU=PPC603} %{mcpu=750: -DCPU=PPC603} %{mcpu=801: -DCPU=PPC603} %{mcpu=821: -DCPU=PPC603} %{mcpu=823: -DCPU=PPC603} %{mcpu=860: -DCPU=PPC603}
+
+*cpp_os_windiss:
+-D__rtasim -D__EABI__ -D__ppc %{!msoft-float: -D__hardfp}
+
+*cpp_os_default:
+%(cpp_os_linux)
+
+*link_command:
+%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}
+
diff --git a/misc/buildroot/toolchain/gcc/3.3.6/120-softfloat.patch b/misc/buildroot/toolchain/gcc/3.3.6/120-softfloat.patch
new file mode 100644
index 000000000..f2431896c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.6/120-softfloat.patch
@@ -0,0 +1,14 @@
+--- gcc-3.3.2-old/configure.in 2003-08-09 01:57:21.000000000 -0500
++++ gcc-3.3.2/configure.in 2004-01-15 12:46:29.000000000 -0600
+@@ -1418,6 +1418,11 @@
+ fi
+
+ FLAGS_FOR_TARGET=
++case " $targargs " in
++ *" --nfp "* | *" --without-float "*)
++ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -msoft-float'
++ ;;
++esac
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $targargs " in
diff --git a/misc/buildroot/toolchain/gcc/3.3.6/500-loop.patch b/misc/buildroot/toolchain/gcc/3.3.6/500-loop.patch
new file mode 100644
index 000000000..476f84b37
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.6/500-loop.patch
@@ -0,0 +1,10 @@
+--- gcc/gcc/loop.c 14 Feb 2004 14:46:03 -0000 1.488.2.3
++++ gcc/gcc/loop.c 28 Apr 2004 22:02:53 -0000
+@@ -929,6 +929,7 @@
+ || (! (GET_CODE (SET_SRC (set)) == REG
+ && (REGNO (SET_SRC (set))
+ < FIRST_PSEUDO_REGISTER))))
++ && regno >= FIRST_PSEUDO_REGISTER
+ /* This test is not redundant; SET_SRC (set) might be
+ a call-clobbered register and the life of REGNO
+ might span a call. */
diff --git a/misc/buildroot/toolchain/gcc/3.3.6/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.3.6/800-arm-bigendian.patch
new file mode 100644
index 000000000..79140ddf0
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.6/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.3.5-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.3.5/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -100,7 +117,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.3.5-dist/gcc/config.gcc
++++ gcc-3.3.5/gcc/config.gcc
+@@ -710,6 +710,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.3.6/810-mips-xgot.patch b/misc/buildroot/toolchain/gcc/3.3.6/810-mips-xgot.patch
new file mode 100644
index 000000000..d7d6691ef
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.6/810-mips-xgot.patch
@@ -0,0 +1,6 @@
+--- gcc.orig/gcc/config/mips/t-linux 1970-01-01 01:00:00.000000000 +0100
++++ gcc/gcc/config/mips/t-linux 2004-08-26 18:28:12.000000000 +0200
+@@ -0,0 +1,3 @@
++# Compile crtbegin/end with xgot so it works for both
++# normal and large GOTs.
++CRTSTUFF_T_CFLAGS = -Wa,-xgot
diff --git a/misc/buildroot/toolchain/gcc/3.3.6/820-no-mips-empic-relocs.patch b/misc/buildroot/toolchain/gcc/3.3.6/820-no-mips-empic-relocs.patch
new file mode 100644
index 000000000..d5c4c9cb5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.6/820-no-mips-empic-relocs.patch
@@ -0,0 +1,59 @@
+From: cgd at broadcom dot com
+To: gcc-patches at gcc dot gnu dot org
+Cc: mark at codesourcery dot com
+Date: 13 Jun 2004 22:51:30 -0700
+Subject: [trunk + 3.4-branch RFA] don't use empic relocs for mips-linuxeh
+
+This patch changes mips-linux to avoid using embedded-pic relocs for
+its eh data. (Support for generating these for new code is removed in
+current binutils srcs.)
+
+Relating to this, previously, mips-linux and mips64-linux would use
+different representations for their EH data (even for mips64-linux o32
+abi), due to the mips64-linux n32/64 BFDs not supporting the
+embedded-pic relocs. This was a bug.
+
+For more explanation, see the thread of the URL quoted in the comment
+in linux.h.
+
+
+Tested the same w/ sources of about a week ago for c/c++ for
+mips-linux (native) before/after. Also verified .o compatibility
+before/after just to be sure.
+
+I'd like this approved for the branch as well, so 3.4.1 will work
+nicely w/ the next major binutils release.
+
+
+thanks,
+
+chris
+
+2004-06-13 Chris Demetriou <cgd@broadcom.com>
+
+ * config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Redefine
+ to return DW_EH_PE_absptr.
+
+Index: config/mips/linux.h
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/linux.h,v
+retrieving revision 1.77
+diff -u -p -r1.77 linux.h
+--- gcc/gcc/config/mips/linux.h 19 Feb 2004 22:07:51 -0000 1.77
++++ gcc/gcc/config/mips/linux.h 14 Jun 2004 05:49:51 -0000
+@@ -170,10 +170,11 @@ Boston, MA 02111-1307, USA. */
+ #undef FUNCTION_NAME_ALREADY_DECLARED
+ #define FUNCTION_NAME_ALREADY_DECLARED 1
+
+-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
+- (flag_pic \
+- ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
+- : DW_EH_PE_absptr)
++/* If possible, we should attempt to use GP-relative relocs for this
++ (see <a href="http://sources.redhat.com/ml/binutils/2004-05/msg00227.html">http://sources.redhat.com/ml/binutils/2004-05/msg00227.html</a>).
++ However, until that is implement, this just uses standard, absolute
++ references. */
++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) DW_EH_PE_absptr
+
+ /* The glibc _mcount stub will save $v0 for us. Don't mess with saving
+ it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
diff --git a/misc/buildroot/toolchain/gcc/3.3.6/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/3.3.6/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.3.6/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/3.4.2/300-libstdc++-pic.patch
new file mode 100644
index 000000000..9f304a4c4
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/300-libstdc++-pic.patch
@@ -0,0 +1,47 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -224,6 +224,10 @@
+ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCPP_BUILD_DEBUG
+ all-local: build_debug
+
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -585,7 +585,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -618,6 +618,7 @@
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
++ install-exec-local \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+@@ -707,6 +708,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/3.4.2/300-pr15526.patch b/misc/buildroot/toolchain/gcc/3.4.2/300-pr15526.patch
new file mode 100644
index 000000000..f01c59f11
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/300-pr15526.patch
@@ -0,0 +1,53 @@
+# DP: 2004-09-26 Roger Sayle <roger@eyesopen.com>
+# DP:
+# DP: PR other/15526
+# DP: Backport from mainline
+# DP: 2004-05-20 Falk Hueffner <falk@debian.org>
+# DP: * libgcc2.c (__mulvsi3): Fix overflow test.
+
+diff -u -r1.170.6.1 -r1.170.6.2
+--- gcc/gcc/libgcc2.c 2004/07/17 21:18:47 1.170.6.1
++++ gcc/gcc/libgcc2.c 2004/09/26 20:47:14 1.170.6.2
+@@ -130,9 +130,7 @@
+ {
+ const DWtype w = (DWtype) a * (DWtype) b;
+
+- if (((a >= 0) == (b >= 0))
+- ? (UDWtype) w > (UDWtype) (((DWtype) 1 << (WORD_SIZE - 1)) - 1)
+- : (UDWtype) w < (UDWtype) ((DWtype) -1 << (WORD_SIZE - 1)))
++ if ((Wtype) (w >> WORD_SIZE) != (Wtype) w >> (WORD_SIZE - 1))
+ abort ();
+
+ return w;
+
+/cvs/gcc/gcc/gcc/testsuite/gcc.dg/ftrapv-1.c,v --> standard output
+revision 1.1.22.1
+--- gcc/gcc/testsuite/gcc.dg/ftrapv-1.c
++++ /dev/null 2004-10-15 06:22:06.980596000 +0000
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2004 Free Software Foundation.
++
++ PR other/15526
++ Verify correct overflow checking with -ftrapv.
++
++ Written by Falk Hueffner, 20th May 2004. */
++
++/* { dg-do run } */
++/* { dg-options "-ftrapv" } */
++
++__attribute__((noinline)) int
++mulv(int a, int b)
++{
++ return a * b;
++}
++
++int
++main()
++{
++ mulv( 0, 0);
++ mulv( 0, -1);
++ mulv(-1, 0);
++ mulv(-1, -1);
++ return 0;
++}
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/300-pr17541.patch b/misc/buildroot/toolchain/gcc/3.4.2/300-pr17541.patch
new file mode 100644
index 000000000..ca5fa09ab
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/300-pr17541.patch
@@ -0,0 +1,234 @@
+# DP: 2004-09-21 Bud Davis <bdavis9659@comcast.net>
+# DP:
+# DP: PR fortran/17541
+# DP: * bld.c (ffebld_constant_new_real2_val): Fix typo,
+# DP:
+# DP: PR fortran/17541
+# DP: * g77.f-torture/execute/pr17541.f: New test.
+
+Index: gcc/gcc/f/bld.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/f/Attic/bld.c,v
+retrieving revision 1.16.14.1
+retrieving revision 1.16.14.2
+diff -u -r1.16.14.1 -r1.16.14.2
+--- gcc/gcc/f/bld.c 12 Jul 2004 17:58:36 -0000 1.16.14.1
++++ gcc/gcc/f/bld.c 21 Sep 2004 12:54:27 -0000 1.16.14.2
+@@ -1333,7 +1333,7 @@
+ nc = malloc_new_kp (ffebld_constant_pool(),
+ "FFEBLD_constREAL2",
+ sizeof (*nc));
+- nc->consttype = FFEBLD_constREAL1;
++ nc->consttype = FFEBLD_constREAL2;
+ nc->u.real2 = val;
+ nc->hook = FFECOM_constantNULL;
+ nc->llink = NULL;
+Index: gcc/gcc/testsuite/g77.f-torture/execute/pr17541.f
+===================================================================
+RCS file: gcc/gcc/testsuite/g77.f-torture/execute/pr17541.f
+diff -N gcc/gcc/testsuite/g77.f-torture/execute/pr17541.f
+--- /dev/null 1 Jan 1970 00:00:00 -0000
++++ gcc/gcc/testsuite/g77.f-torture/execute/pr17541.f 21 Sep 2004 12:54:35 -0000 1.1.2.1
+@@ -0,0 +1,202 @@
++ program test
++ implicit none
++! check all types of data statements
++! pr 17541
++ real r(2)
++ double precision s(2)
++ integer*1 ib(2)
++ integer*2 ih(2)
++ integer*4 iw(2)
++ integer*8 id(3)
++ logical*1 lb(2)
++ logical*2 lh(2)
++ logical*4 lw(2)
++ logical*8 ld(2)
++ character*1 a(2)
++ character*5 b(2)
++ complex c1(2)
++ complex*8 c2(2)
++ data r / 1.0,2.0 /
++ data s / 2.d0,1.d0/
++ data ib / 1,-1 /
++ data ih / 2,100/
++ data iw / 4,3560000 /
++ data id / 8,Z'ABCDEF01',Z'5555AAAA' /
++ data a / 'a', 'z' /
++ data b / 'xyz','abc'/
++ data c1 /(1.0,2.0),(-1.0,-2.0)/
++ data c2 /(1.d0,2.d0),(-1.d0,-2.d0)/
++ data lb / .TRUE.,.FALSE. /
++ data lh / .TRUE.,.FALSE. /
++ data lw / .TRUE.,.FALSE. /
++ data ld / .TRUE.,.FALSE. /
++ logical dbug
++ data dbug /.FALSE./
++! check the reals first
++ if (r(1).ne.1.0) then
++ if (dbug) then
++ print*,r(1), ' should be 1.0 '
++ else
++ call abort
++ endif
++ endif
++ if (r(2).ne.2.0) then
++ if (dbug) then
++ print*,r(2), ' should be 2.0 '
++ else
++ call abort
++ endif
++ endif
++ if (s(1).ne.2.d0) then
++ if (dbug) then
++ print*,s(1), ' xxshould be 2.d0 '
++ else
++ call abort
++ endif
++ endif
++ if (s(2).ne.1.d0) then
++ if (dbug) then
++ print*,s(2), ' should be 1.d0 '
++ else
++ call abort
++ endif
++ endif
++! now the integers
++ if (ib(1).ne.1) then
++ if (dbug) then
++ print*,ib(1), ' should be 1 '
++ else
++ call abort
++ endif
++ endif
++ if (ib(2).ne.-1) then
++ if (dbug) then
++ print*,ib(2), ' should be -1 '
++ else
++ call abort
++ endif
++ endif
++ if (ih(1).ne.2) then
++ if (dbug) then
++ print*,ih(2), ' should be 2 '
++ else
++ call abort
++ endif
++ endif
++ if (ih(2).ne.100) then
++ if (dbug) then
++ print*,ih(2), ' should be 100 '
++ else
++ call abort
++ endif
++ endif
++ if (iw(1).ne.4) then
++ if (dbug) then
++ print*,iw(1), ' should be 4 '
++ else
++ call abort
++ endif
++ endif
++ if (iw(2).ne.3560000) then
++ if (dbug) then
++ print*,iw(2), ' should be 3560000 '
++ else
++ call abort
++ endif
++ endif
++ if (id(1).ne.8) then
++ if (dbug) print*,id(1), ' should be 8 '
++ call abort
++ endif
++ if (id(2).ne.Z'ABCDEF01') then
++ if (dbug) print*,id(2), " should be Z'ABCDEF01' "
++ call abort
++ endif
++ if (id(3).ne.Z'5555AAAA') then
++ if (dbug) print*,id(2), " should be Z'5555AAAA' "
++ call abort
++ endif
++! complex
++ if (c1(1).ne.(1.0,2.0)) then
++ if (dbug) then
++ print*,c1(1), ' should be (1.0,2.0) '
++ else
++ call abort
++ endif
++ endif
++ if (c1(2).ne.(-1.0,-2.0)) then
++ if (dbug) then
++ print*,c1(2), ' should be (-1.0,-2.0) '
++ else
++ call abort
++ endif
++ endif
++ if (c2(1).ne.(1.d0,2.d0)) then
++ if (dbug) then
++ print*,c2(1), ' should be (1.0,2.0) '
++ else
++ call abort
++ endif
++ endif
++ if (c2(2).ne.(-1.d0,-2.d0)) then
++ if (dbug) then
++ print*,c2(2), ' should be (-1.0,-2.0) '
++ else
++ call abort
++ endif
++ endif
++! character
++ if (a(1).ne.'a') then
++ if (dbug) then
++ print*,a(1), ' should be a '
++ else
++ call abort
++ endif
++ endif
++ if (b(1).ne.'xyz') then
++ if (dbug) then
++ print*,b(1), ' should be xyz '
++ else
++ call abort
++ endif
++ endif
++!logicals
++ if (.NOT.lb(1)) then
++ if (dbug) print*,lb(1), ' should be .T. '
++ call abort
++ endif
++ if (lb(2)) then
++ if (dbug) print*,lb(2), ' should be .F. '
++ call abort
++ endif
++ if (.NOT.lh(1)) then
++ if (dbug) print*,lh(1), ' should be .T. '
++ call abort
++ endif
++ if (lh(2)) then
++ if (dbug) print*,lh(2), ' should be .F. '
++ call abort
++ endif
++ if (.NOT.lw(1)) then
++ if (dbug) print*,lw(1), ' should be .T. '
++ call abort
++ endif
++ if (lw(2)) then
++ if (dbug) print*,lw(2), ' should be .F. '
++ call abort
++ endif
++ if (.NOT.ld(1)) then
++ if (dbug) then
++ print*,ld(1), ' should be .T. '
++ else
++ call abort
++ endif
++ endif
++ if (ld(2)) then
++ if (dbug) then
++ print*,ld(2), ' should be .F. '
++ else
++ call abort
++ endif
++ endif
++ end
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/300-pr17976.patch b/misc/buildroot/toolchain/gcc/3.4.2/300-pr17976.patch
new file mode 100644
index 000000000..78bb3559f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/300-pr17976.patch
@@ -0,0 +1,106 @@
+From: Mark Mitchell <mark@codesourcery.com>
+Sender: gcc-patches-owner@gcc.gnu.org
+To: gcc-patches@gcc.gnu.org
+Subject: C++ PATCH: PR 17976
+Date: Thu, 14 Oct 2004 21:24:41 -0700
+
+
+This was a case where we generated multiple destructor calls for the
+same global variable, in the (probably rare) situation that an
+"extern" declaration followed the definition.
+
+Tested on i686-pc-linux-gnu, applied on the mainline and on the 3.4
+branch.
+
+--
+Mark Mitchell
+CodeSourcery, LLC
+mark@codesourcery.com
+
+# DP: 2004-10-14 Mark Mitchell <mark@codesourcery.com>
+# DP:
+# DP: PR c++/17976
+# DP: * decl.c (cp_finish_decl): Do not call expand_static_init more
+# DP: than once for a single variable.
+# DP:
+# DP: 2004-10-14 Mark Mitchell <mark@codesourcery.com>
+# DP:
+# DP: PR c++/17976
+# DP: * g++.dg/init/dtor3.C: New test.
+
+Index: testsuite/g++.dg/init/dtor3.C
+===================================================================
+RCS file: testsuite/g++.dg/init/dtor3.C
+diff -N testsuite/g++.dg/init/dtor3.C
+*** /dev/null 1 Jan 1970 00:00:00 -0000
+--- gcc/gcc/testsuite/g++.dg/init/dtor3.C 15 Oct 2004 04:02:22 -0000
+***************
+*** 0 ****
+--- 1,21 ----
++ // PR c++/17976
++ // { dg-do run }
++
++ extern "C" void abort();
++ struct A
++ {
++ static int i;
++ A(){}
++ ~A(){i++;if(i>1)abort();}
++ };
++
++ int A::i = 0;
++
++ A a;
++ extern A a;
++
++ int main()
++ {
++ return 0;
++ }
++
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
+retrieving revision 1.1174.2.26
+retrieving revision 1.1174.2.27
+diff -u -r1.1174.2.26 -r1.1174.2.27
+--- gcc/gcc/cp/decl.c 2004/10/10 21:54:59 1.1174.2.26
++++ gcc/gcc/cp/decl.c 2004/10/15 04:23:46 1.1174.2.27
+@@ -4778,6 +4778,7 @@
+ tree cleanup;
+ const char *asmspec = NULL;
+ int was_readonly = 0;
++ bool var_definition_p = false;
+
+ if (decl == error_mark_node)
+ return;
+@@ -4930,6 +4931,11 @@
+ /* Remember that the initialization for this variable has
+ taken place. */
+ DECL_INITIALIZED_P (decl) = 1;
++ /* This declaration is the definition of this variable,
++ unless we are initializing a static data member within
++ the class specifier. */
++ if (!DECL_EXTERNAL (decl))
++ var_definition_p = true;
+ }
+ /* If the variable has an array type, lay out the type, even if
+ there is no initializer. It is valid to index through the
+@@ -5004,8 +5010,16 @@
+ initialize_local_var (decl, init);
+ }
+
+- if (TREE_STATIC (decl))
+- expand_static_init (decl, init);
++ /* If a variable is defined, and then a subsequent
++ definintion with external linkage is encountered, we will
++ get here twice for the same variable. We want to avoid
++ calling expand_static_init more than once. For variables
++ that are not static data members, we can call
++ expand_static_init only when we actually process the
++ initializer. It is not legal to redeclare a static data
++ member, so this issue does not arise in that case. */
++ if (var_definition_p && TREE_STATIC (decl))
++ expand_static_init (decl, init);
+ }
+ finish_end0:
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/400-mips-pr17565.patch b/misc/buildroot/toolchain/gcc/3.4.2/400-mips-pr17565.patch
new file mode 100644
index 000000000..7ae6aa56f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/400-mips-pr17565.patch
@@ -0,0 +1,102 @@
+[committed] Fix target/17565: asms in delay slots
+
+ * From: Richard Sandiford <rsandifo at redhat dot com>
+ * To: gcc-patches at gcc dot gnu dot org
+ * Date: Mon, 20 Sep 2004 07:55:58 +0100
+ * Subject: [committed] Fix target/17565: asms in delay slots
+
+The MIPS port was allowing asms to be put into delay slots if the
+compiler guesses they are only one instruction long. This is wrong
+because of the possibility of it containing macros.
+
+The problem can be reproduced as an assembler warning
+in the following testcase:
+
+int foo (int n)
+{
+ register int k asm ("$16") = n;
+ if (k > 0)
+ {
+ bar ();
+ asm ("li %0,0x12345678" : "=r" (k));
+ }
+ return k;
+}
+
+because the multi-instruction asm statement goes into the delay
+slot of the call to bar().
+
+This is reduced from a much more serious linux problem. Linux is fond
+of using empty asm statements, and since gcc estimates empty asms to be
+one instruction long, they too might be put into delay slots. This
+actually has the effect of putting the following instruction into the
+delay slot instead. Since there's no assembler warning, the problem was
+only detected as a run-time failure.
+
+The fix is simple: set the asm value of "can_delay" to "no".
+Tested on mipsisa64-elf, applied to mainline.
+
+This problem goes back to at least 2.95, so it isn't technically a
+regression. On the other hand, it's the kind of bug that could trigger
+for different types of code in different releases, so I'm sure there's
+a testcase that fails (say) in 3.4 and not in 2.95. Will probably ask
+Mark for permission to backport to 3.4.
+
+Richard
+
+
+ PR target/17565
+ * config/mips/mips.md (define_asm_attributes): Set can_delay to no.
+
+testsuite/
+ * gcc.target/mips/asm-1.c: New test.
+
+Index: config/mips/mips.md
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
+retrieving revision 1.306
+diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.306 mips.md
+*** gcc/gcc/config/mips/mips.md 13 Sep 2004 19:32:05 -0000 1.306
+--- gcc/gcc/config/mips/mips.md 20 Sep 2004 06:52:31 -0000
+*************** (define_attr "may_clobber_hilo" "no,yes"
+*** 266,272 ****
+
+ ;; Describe a user's asm statement.
+ (define_asm_attributes
+! [(set_attr "type" "multi")])
+
+ ;; .........................
+ ;;
+--- 266,273 ----
+
+ ;; Describe a user's asm statement.
+ (define_asm_attributes
+! [(set_attr "type" "multi")
+! (set_attr "can_delay" "no")])
+
+ ;; .........................
+ ;;
+Index: testsuite/gcc.target/mips/asm-1.c
+===================================================================
+RCS file: testsuite/gcc.target/mips/asm-1.c
+diff -N testsuite/gcc.target/mips/asm-1.c
+*** gcc/gcc/testsuite/gcc.target/mips/asm-1.c 1 Jan 1970 00:00:00 -0000
+--- gcc/gcc/testsuite/gcc.target/mips/asm-1.c 20 Sep 2004 06:52:31 -0000
+***************
+*** 0 ****
+--- 1,14 ----
++ /* PR target/17565. GCC used to put the asm into the delay slot
++ of the call. */
++ /* { dg-do assemble } */
++ /* { dg-options "-O" } */
++ int foo (int n)
++ {
++ register int k asm ("$16") = n;
++ if (k > 0)
++ {
++ bar ();
++ asm ("li %0,0x12345678" : "=r" (k));
++ }
++ return k;
++ }
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/401-ppc-eabi-typo.patch b/misc/buildroot/toolchain/gcc/3.4.2/401-ppc-eabi-typo.patch
new file mode 100644
index 000000000..dbb856868
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/401-ppc-eabi-typo.patch
@@ -0,0 +1,20 @@
+revision 1.12
+date: 2004/07/16 15:13:40; author: segher; state: Exp; lines: +1 -1
+ * config/rs6000/eabi.asm (__eabi_convert): Fix typo (cmpi vs. cmpwi).
+Index: gcc/config/rs6000/eabi.asm
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/config/rs6000/eabi.asm,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -b -B -w -p -r1.11 -r1.12
+--- gcc/gcc/config/rs6000/eabi.asm 20 Sep 2002 23:46:58 -0000 1.11
++++ gcc/gcc/config/rs6000/eabi.asm 16 Jul 2004 15:13:40 -0000 1.12
+@@ -252,7 +252,7 @@ FUNC_START(__eabi_convert)
+
+ .Lcvt:
+ lwzu 6,4(3) /* pointer to convert */
+- cmpi 0,6,0
++ cmpwi 0,6,0
+ beq- .Lcvt2 /* if pointer is null, don't convert */
+
+ add 6,6,12 /* convert pointer */
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/402-mips-pr17770.patch b/misc/buildroot/toolchain/gcc/3.4.2/402-mips-pr17770.patch
new file mode 100644
index 000000000..87d603023
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/402-mips-pr17770.patch
@@ -0,0 +1,12 @@
+--- gcc-3.4.2/gcc/config/mips/mips.md 2004-06-25 02:35:30.000000000 -0500
++++ gcc-3.4-cvs/gcc/config/mips/mips.md 2004-10-26 01:54:56.000000000 -0500
+@@ -4073,8 +4073,7 @@
+ "!TARGET_MIPS16"
+ "lwl\t%0,%2"
+ [(set_attr "type" "load")
+- (set_attr "mode" "SI")
+- (set_attr "hazard" "none")])
++ (set_attr "mode" "SI")])
+
+ (define_insn "mov_lwr"
+ [(set (match_operand:SI 0 "register_operand" "=d")
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/600-gcc34-arm-ldm-peephole.patch b/misc/buildroot/toolchain/gcc/3.4.2/600-gcc34-arm-ldm-peephole.patch
new file mode 100644
index 000000000..fb317e153
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/600-gcc34-arm-ldm-peephole.patch
@@ -0,0 +1,79 @@
+--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
+@@ -8810,13 +8810,16 @@
+ (set_attr "length" "4,8,8")]
+ )
+
++; Try to convert LDR+LDR+arith into [add+]LDM+arith
++; On XScale, LDM is always slower than two LDRs, so only do this if
++; optimising for size.
+ (define_insn "*arith_adjacentmem"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (match_operator:SI 1 "shiftable_operator"
+ [(match_operand:SI 2 "memory_operand" "m")
+ (match_operand:SI 3 "memory_operand" "m")]))
+ (clobber (match_scratch:SI 4 "=r"))]
+- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
++ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
+ "*
+ {
+ rtx ldm[3];
+@@ -8851,6 +8854,8 @@
+ }
+ if (val1 && val2)
+ {
++ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
++ will prevent it from happening. */
+ rtx ops[3];
+ ldm[0] = ops[0] = operands[4];
+ ops[1] = XEXP (XEXP (operands[2], 0), 0);
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
+@@ -4593,8 +4593,11 @@
+ arith_adjacentmem pattern to output an overlong sequence. */
+ if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
+ return 0;
+-
+- return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
++
++ /* For Harvard cores, only accept pairs where one offset is zero.
++ See comment in load_multiple_sequence. */
++ return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4)
++ && (!arm_ld_sched || val0 == 0 || val1 == 0);
+ }
+ return 0;
+ }
+@@ -4838,6 +4841,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* ldmia */
+
+@@ -5064,6 +5072,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* stmia */
+
+--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
++++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
+@@ -381,6 +381,7 @@
+ printf ("#include \"recog.h\"\n");
+ printf ("#include \"except.h\"\n\n");
+ printf ("#include \"function.h\"\n\n");
++ printf ("#include \"flags.h\"\n\n");
+
+ printf ("#ifdef HAVE_peephole\n");
+ printf ("extern rtx peep_operand[];\n\n");
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/601-gcc34-arm-ldm.patch b/misc/buildroot/toolchain/gcc/3.4.2/601-gcc34-arm-ldm.patch
new file mode 100644
index 000000000..142052fdf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/601-gcc34-arm-ldm.patch
@@ -0,0 +1,119 @@
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
+@@ -8520,6 +8520,26 @@
+ return_used_this_function = 0;
+ }
+
++/* Return the number (counting from 0) of
++ the least significant set bit in MASK. */
++
++#ifdef __GNUC__
++inline
++#endif
++static int
++number_of_first_bit_set (mask)
++ int mask;
++{
++ int bit;
++
++ for (bit = 0;
++ (mask & (1 << bit)) == 0;
++ ++bit)
++ continue;
++
++ return bit;
++}
++
+ const char *
+ arm_output_epilogue (rtx sibling)
+ {
+@@ -8753,27 +8773,47 @@
+ saved_regs_mask |= (1 << PC_REGNUM);
+ }
+
+- /* Load the registers off the stack. If we only have one register
+- to load use the LDR instruction - it is faster. */
+- if (saved_regs_mask == (1 << LR_REGNUM))
+- {
+- /* The exception handler ignores the LR, so we do
+- not really need to load it off the stack. */
+- if (eh_ofs)
+- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+- else
+- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
+- }
+- else if (saved_regs_mask)
++ if (saved_regs_mask)
+ {
+- if (saved_regs_mask & (1 << SP_REGNUM))
+- /* Note - write back to the stack register is not enabled
+- (ie "ldmfd sp!..."). We know that the stack pointer is
+- in the list of registers and if we add writeback the
+- instruction becomes UNPREDICTABLE. */
+- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ /* Load the registers off the stack. If we only have one register
++ to load use the LDR instruction - it is faster. */
++ if (bit_count (saved_regs_mask) == 1)
++ {
++ int reg = number_of_first_bit_set (saved_regs_mask);
++
++ switch (reg)
++ {
++ case SP_REGNUM:
++ /* Mustn't use base writeback when loading SP. */
++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
++ break;
++
++ case LR_REGNUM:
++ if (eh_ofs)
++ {
++ /* The exception handler ignores the LR, so we do
++ not really need to load it off the stack. */
++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
++ break;
++ }
++ /* else fall through */
++
++ default:
++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
++ break;
++ }
++ }
+ else
+- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ {
++ if (saved_regs_mask & (1 << SP_REGNUM))
++ /* Note - write back to the stack register is not enabled
++ (ie "ldmfd sp!..."). We know that the stack pointer is
++ in the list of registers and if we add writeback the
++ instruction becomes UNPREDICTABLE. */
++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ else
++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ }
+ }
+
+ if (current_function_pretend_args_size)
+@@ -11401,22 +11441,6 @@
+ }
+ }
+
+-/* Return the number (counting from 0) of
+- the least significant set bit in MASK. */
+-
+-inline static int
+-number_of_first_bit_set (int mask)
+-{
+- int bit;
+-
+- for (bit = 0;
+- (mask & (1 << bit)) == 0;
+- ++bit)
+- continue;
+-
+- return bit;
+-}
+-
+ /* Generate code to return from a thumb function.
+ If 'reg_containing_return_addr' is -1, then the return address is
+ actually on the stack, at the stack pointer. */
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/3.4.2/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..4377c2143
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/700-pr15068-fix.patch b/misc/buildroot/toolchain/gcc/3.4.2/700-pr15068-fix.patch
new file mode 100644
index 000000000..2977765c5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/700-pr15068-fix.patch
@@ -0,0 +1,44 @@
+See http://gcc.gnu.org/PR15068
+
+Fixes error
+
+../sysdeps/generic/s_fmax.c: In function `__fmax':
+../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <URL:http://gcc.gnu.org/bugs.html> for instructions.
+make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
+make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
+make[1]: *** [math/others] Error 2
+make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
+make: *** [all] Error 2
+
+[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
+
+--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
+@@ -1878,6 +1878,7 @@
+ rtx set_src = SET_SRC (pc_set (BB_END (bb)));
+ rtx cond_true = XEXP (set_src, 0);
+ rtx reg = XEXP (cond_true, 0);
++ enum rtx_code inv_cond;
+
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+@@ -1886,11 +1887,13 @@
+ in the form of a comparison of a register against zero.
+ If the condition is more complex than that, then it is safe
+ not to record any information. */
+- if (GET_CODE (reg) == REG
++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
++ if (inv_cond != UNKNOWN
++ && GET_CODE (reg) == REG
+ && XEXP (cond_true, 1) == const0_rtx)
+ {
+ rtx cond_false
+- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
++ = gen_rtx_fmt_ee (inv_cond,
+ GET_MODE (cond_true), XEXP (cond_true, 0),
+ XEXP (cond_true, 1));
+ if (GET_CODE (XEXP (set_src, 1)) == PC)
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.4.2/800-arm-bigendian.patch
new file mode 100644
index 000000000..04e998419
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -101,7 +118,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.4.1-dist/gcc/config.gcc
++++ gcc-3.4.1/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/3.4.2/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/900-nios2.patch b/misc/buildroot/toolchain/gcc/3.4.2/900-nios2.patch
new file mode 100644
index 000000000..bfa06a21c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/900-nios2.patch
@@ -0,0 +1,10211 @@
+--- gcc-3.4.3/gcc/Makefile.in
++++ gcc-3.4.3-nios2/gcc/Makefile.in
+@@ -3085,7 +3085,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
+ $(INSTALL_DATA) $(srcdir)/README-fixinc \
+ $(DESTDIR)$(itoolsdatadir)/include/README ; \
+ $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
+- $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
++ $(INSTALL_PROGRAM) fixinc/fixincl$(build_exeext) $(DESTDIR)$(itoolsdir)/fixincl$(build_exeext) ; \
+ $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
+ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \
+ else :; fi
+--- gcc-3.4.3/gcc/combine.c
++++ gcc-3.4.3-nios2/gcc/combine.c
+@@ -4380,6 +4380,14 @@ combine_simplify_rtx (rtx x, enum machin
+ mode);
+ }
+
++#ifndef __nios2__
++/* This screws up Nios II in this test case:
++
++if (x & 1)
++ return 2;
++else
++ return 3;
++*/
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+ && op1 == const0_rtx
+@@ -4391,6 +4399,7 @@ combine_simplify_rtx (rtx x, enum machin
+ gen_lowpart_for_combine (mode, op0),
+ const1_rtx);
+ }
++#endif
+
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+--- gcc-3.4.3/gcc/config/nios2/crti.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crti.asm
+@@ -0,0 +1,88 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just make a stack frame for the contents of the .fini and
++.init sections. Users may put any desired instructions in those
++sections.
++
++
++While technically any code can be put in the init and fini sections
++most stuff will not work other than stuff which obeys the call frame
++and ABI. All the call-preserved registers are saved, the call clobbered
++registers should have been saved by the code calling init and fini.
++
++See crtstuff.c for an example of code that inserts itself in the
++init and fini sections.
++
++See crt0.s for the code that calls init and fini.
++*/
++
++ .file "crti.asm"
++
++ .section ".init"
++ .align 2
++ .global _init
++_init:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
++ .section ".fini"
++ .align 2
++ .global _fini
++_fini:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
+--- gcc-3.4.3/gcc/config/nios2/crtn.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crtn.asm
+@@ -0,0 +1,70 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just makes sure that the .fini and .init sections do in
++fact return. Users may put any desired instructions in those sections.
++This file is the last thing linked into any executable.
++*/
++ .file "crtn.asm"
++
++
++
++ .section ".init"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
++ .section ".fini"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod-hi.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod-hi.c
+@@ -0,0 +1,123 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern HItype __modhi3 (HItype, HItype);
++extern HItype __divhi3 (HItype, HItype);
++extern HItype __umodhi3 (HItype, HItype);
++extern HItype __udivhi3 (HItype, HItype);
++
++static UHItype udivmodhi4(UHItype, UHItype, word_type);
++
++static UHItype
++udivmodhi4(UHItype num, UHItype den, word_type modwanted)
++{
++ UHItype bit = 1;
++ UHItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<15)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++HItype
++__divhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodhi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__modhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodhi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__udivhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 0);
++}
++
++
++HItype
++__umodhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod.c
+@@ -0,0 +1,126 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern SItype __modsi3 (SItype, SItype);
++extern SItype __divsi3 (SItype, SItype);
++extern SItype __umodsi3 (SItype, SItype);
++extern SItype __udivsi3 (SItype, SItype);
++
++static USItype udivmodsi4(USItype, USItype, word_type);
++
++/* 16-bit SI divide and modulo as used in NIOS */
++
++
++static USItype
++udivmodsi4(USItype num, USItype den, word_type modwanted)
++{
++ USItype bit = 1;
++ USItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<31)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodsi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__modsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodsi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__udivsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 0);
++}
++
++
++SItype
++__umodsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divtable.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divtable.c
+@@ -0,0 +1,46 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++UQItype __divsi3_table[] =
++{
++ 0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15,
++ 0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15,
++ 0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15,
++ 0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15,
++ 0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15,
++ 0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15,
++ 0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15,
++ 0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15,
++ 0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15,
++ 0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15,
++ 0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15,
++ 0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15,
++ 0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15,
++ 0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15,
++ 0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15,
++ 0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
++};
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-mul.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-mul.c
+@@ -0,0 +1,103 @@
++/* while we are debugging (ie compile outside of gcc build)
++ disable gcc specific headers */
++#ifndef DEBUG_MULSI3
++
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++#else
++#define SItype int
++#define USItype unsigned int
++#endif
++
++
++extern SItype __mulsi3 (SItype, SItype);
++
++SItype
++__mulsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = a;
++
++ while (cnt)
++ {
++ if (cnt & 1)
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt >>= 1;
++ }
++
++ return res;
++}
++/*
++TODO: Choose best alternative implementation.
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = 0;
++
++ while (cnt < 32)
++ {
++ if (a & (1L << cnt))
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt++;
++ }
++
++ return res;
++}
++*/
++
++
++#ifdef DEBUG_MULSI3
++
++int
++main ()
++{
++ int i, j;
++ int error = 0;
++
++ for (i = -1000; i < 1000; i++)
++ for (j = -1000; j < 1000; j++)
++ {
++ int expect = i * j;
++ int actual = A__divsi3 (i, j);
++ if (expect != actual)
++ {
++ printf ("error: %d * %d = %d not %d\n", i, j, expect, actual);
++ error = 1;
++ }
++ }
++
++ return error;
++}
++#endif
+--- gcc-3.4.3/gcc/config/nios2/nios2-dp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-dp-bit.c
+@@ -0,0 +1,1652 @@
++
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-fp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-fp-bit.c
+@@ -0,0 +1,1652 @@
++#define FLOAT
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-protos.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-protos.h
+@@ -0,0 +1,70 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++extern void dump_frame_size (FILE *);
++extern HOST_WIDE_INT compute_frame_size (void);
++extern int nios2_initial_elimination_offset (int, int);
++extern void override_options (void);
++extern void optimization_options (int, int);
++extern int nios2_can_use_return_insn (void);
++extern void expand_prologue (void);
++extern void expand_epilogue (bool);
++extern void function_profiler (FILE *, int);
++
++
++#ifdef RTX_CODE
++extern int nios2_legitimate_address (rtx, enum machine_mode, int);
++extern void nios2_print_operand (FILE *, rtx, int);
++extern void nios2_print_operand_address (FILE *, rtx);
++
++extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
++extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
++
++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx);
++extern void gen_conditional_move (rtx *, enum machine_mode);
++extern const char *asm_output_opcode (FILE *, const char *);
++
++/* predicates */
++extern int arith_operand (rtx, enum machine_mode);
++extern int uns_arith_operand (rtx, enum machine_mode);
++extern int logical_operand (rtx, enum machine_mode);
++extern int shift_operand (rtx, enum machine_mode);
++extern int reg_or_0_operand (rtx, enum machine_mode);
++extern int equality_op (rtx, enum machine_mode);
++extern int custom_insn_opcode (rtx, enum machine_mode);
++extern int rdwrctl_operand (rtx, enum machine_mode);
++
++# ifdef HAVE_MACHINE_MODES
++# if defined TREE_CODE
++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
++extern int nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++
++# endif /* TREE_CODE */
++# endif /* HAVE_MACHINE_MODES */
++#endif
++
++#ifdef TREE_CODE
++extern int nios2_return_in_memory (tree);
++
++#endif /* TREE_CODE */
+--- gcc-3.4.3/gcc/config/nios2/nios2.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.c
+@@ -0,0 +1,2853 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++#include <stdio.h>
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "rtl.h"
++#include "tree.h"
++#include "tm_p.h"
++#include "regs.h"
++#include "hard-reg-set.h"
++#include "real.h"
++#include "insn-config.h"
++#include "conditions.h"
++#include "output.h"
++#include "insn-attr.h"
++#include "flags.h"
++#include "recog.h"
++#include "expr.h"
++#include "toplev.h"
++#include "basic-block.h"
++#include "function.h"
++#include "ggc.h"
++#include "reload.h"
++#include "debug.h"
++#include "optabs.h"
++#include "target.h"
++#include "target-def.h"
++
++/* local prototypes */
++static bool nios2_rtx_costs (rtx, int, int, int *);
++
++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT);
++static int nios2_use_dfa_pipeline_interface (void);
++static int nios2_issue_rate (void);
++static struct machine_function *nios2_init_machine_status (void);
++static bool nios2_in_small_data_p (tree);
++static rtx save_reg (int, HOST_WIDE_INT, rtx);
++static rtx restore_reg (int, HOST_WIDE_INT);
++static unsigned int nios2_section_type_flags (tree, const char *, int);
++static void nios2_init_builtins (void);
++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
++static bool nios2_function_ok_for_sibcall (tree, tree);
++static void nios2_encode_section_info (tree, rtx, int);
++
++/* Initialize the GCC target structure. */
++#undef TARGET_ASM_FUNCTION_PROLOGUE
++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue
++
++#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
++#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \
++ nios2_use_dfa_pipeline_interface
++#undef TARGET_SCHED_ISSUE_RATE
++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate
++#undef TARGET_IN_SMALL_DATA_P
++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p
++#undef TARGET_ENCODE_SECTION_INFO
++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info
++#undef TARGET_SECTION_TYPE_FLAGS
++#define TARGET_SECTION_TYPE_FLAGS nios2_section_type_flags
++
++#undef TARGET_INIT_BUILTINS
++#define TARGET_INIT_BUILTINS nios2_init_builtins
++#undef TARGET_EXPAND_BUILTIN
++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin
++
++#undef TARGET_FUNCTION_OK_FOR_SIBCALL
++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall
++
++#undef TARGET_RTX_COSTS
++#define TARGET_RTX_COSTS nios2_rtx_costs
++
++
++struct gcc_target targetm = TARGET_INITIALIZER;
++
++
++
++/* Threshold for data being put into the small data/bss area, instead
++ of the normal data area (references to the small data/bss area take
++ 1 instruction, and use the global pointer, references to the normal
++ data area takes 2 instructions). */
++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE;
++
++
++/* Structure to be filled in by compute_frame_size with register
++ save masks, and offsets for the current function. */
++
++struct nios2_frame_info
++GTY (())
++{
++ long total_size; /* # bytes that the entire frame takes up */
++ long var_size; /* # bytes that variables take up */
++ long args_size; /* # bytes that outgoing arguments take up */
++ int save_reg_size; /* # bytes needed to store gp regs */
++ int save_reg_rounded; /* # bytes needed to store gp regs */
++ long save_regs_offset; /* offset from new sp to store gp registers */
++ int initialized; /* != 0 if frame size already calculated */
++ int num_regs; /* number of gp registers saved */
++};
++
++struct machine_function
++GTY (())
++{
++
++ /* Current frame information, calculated by compute_frame_size. */
++ struct nios2_frame_info frame;
++};
++
++
++/***************************************
++ * Section encodings
++ ***************************************/
++
++
++
++
++
++/***************************************
++ * Stack Layout and Calling Conventions
++ ***************************************/
++
++
++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1))
++#define TEMP_REG_NUM 8
++
++static void
++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
++{
++ if (flag_verbose_asm || flag_debug_asm)
++ {
++ compute_frame_size ();
++ dump_frame_size (file);
++ }
++}
++
++static rtx
++save_reg (int regno, HOST_WIDE_INT offset, rtx cfa_store_reg)
++{
++ rtx insn, stack_slot;
++
++ stack_slot = gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ GEN_INT (offset));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_MEM (SImode, stack_slot),
++ gen_rtx_REG (SImode, regno)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ return insn;
++}
++
++static rtx
++restore_reg (int regno, HOST_WIDE_INT offset)
++{
++ rtx insn, stack_slot;
++
++ if (TOO_BIG_OFFSET (offset))
++ {
++ stack_slot = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ GEN_INT (offset)));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ gen_rtx_PLUS (SImode,
++ stack_slot,
++ stack_pointer_rtx)));
++ }
++ else
++ {
++ stack_slot = gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (offset));
++ }
++
++ stack_slot = gen_rtx_MEM (SImode, stack_slot);
++
++ insn = emit_move_insn (gen_rtx_REG (SImode, regno), stack_slot);
++
++ return insn;
++}
++
++
++/* There are two possible paths for prologue expansion,
++- the first is if the total frame size is < 2^15-1. In that
++case all the immediates will fit into the 16-bit immediate
++fields.
++- the second is when the frame size is too big, in that
++case an additional temporary register is used, first
++as a cfa_temp to offset the sp, second as the cfa_store
++register.
++
++See the comment above dwarf2out_frame_debug_expr in
++dwarf2out.c for more explanation of the "rules."
++
++
++Case 1:
++Rule # Example Insn Effect
++2 addi sp, sp, -total_frame_size cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++12 stw ra, offset(sp)
++12 stw r16, offset(sp)
++1 mov fp, sp
++
++Case 2:
++Rule # Example Insn Effect
++6 movi r8, total_frame_size cfa_temp.reg=r8, cfa_temp.offset=total_frame_size
++2 sub sp, sp, r8 cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++5 add r8, r8, sp cfa_store.reg=r8, cfa_store.offset=0
++12 stw ra, offset(r8)
++12 stw r16, offset(r8)
++1 mov fp, sp
++
++*/
++
++void
++expand_prologue ()
++{
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int cfa_store_offset;
++ rtx insn;
++ rtx cfa_store_reg = 0;
++
++ total_frame_size = compute_frame_size ();
++
++ if (total_frame_size)
++ {
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ /* cfa_temp and cfa_store_reg are the same register,
++ cfa_store_reg overwrites cfa_temp */
++ cfa_store_reg = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ cfa_store_reg,
++ GEN_INT (total_frame_size)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_MINUS (SImode,
++ stack_pointer_rtx,
++ cfa_store_reg));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ /* if there are no registers to save, I don't need to
++ create a cfa_store */
++ if (cfun->machine->frame.save_reg_size)
++ {
++ insn = gen_rtx_SET (SImode,
++ cfa_store_reg,
++ gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ stack_pointer_rtx));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ cfa_store_offset
++ = total_frame_size
++ - (cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded);
++ }
++ else
++ {
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (-total_frame_size)));
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ cfa_store_reg = stack_pointer_rtx;
++ cfa_store_offset
++ = cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded;
++ }
++ }
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (RA_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (FP_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ cfa_store_offset -= 4;
++ save_reg (i, cfa_store_offset, cfa_store_reg);
++ }
++ }
++
++ if (frame_pointer_needed)
++ {
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_REG (SImode, FP_REGNO),
++ gen_rtx_REG (SImode, SP_REGNO)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ /* If we are profiling, make sure no instructions are scheduled before
++ the call to mcount. */
++ if (current_function_profile)
++ emit_insn (gen_blockage ());
++}
++
++void
++expand_epilogue (bool sibcall_p)
++{
++ rtx insn;
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int register_store_offset;
++
++ total_frame_size = compute_frame_size ();
++
++ if (!sibcall_p && nios2_can_use_return_insn ())
++ {
++ insn = emit_jump_insn (gen_return ());
++ return;
++ }
++
++ emit_insn (gen_blockage ());
++
++ register_store_offset =
++ cfun->machine->frame.save_regs_offset +
++ cfun->machine->frame.save_reg_rounded;
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (RA_REGNO, register_store_offset);
++ }
++
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (FP_REGNO, register_store_offset);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ register_store_offset -= 4;
++ restore_reg (i, register_store_offset);
++ }
++ }
++
++ if (total_frame_size)
++ {
++ rtx sp_adjust;
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ sp_adjust = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ sp_adjust,
++ GEN_INT (total_frame_size)));
++
++ }
++ else
++ {
++ sp_adjust = GEN_INT (total_frame_size);
++ }
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ sp_adjust));
++ insn = emit_insn (insn);
++ }
++
++
++ if (!sibcall_p)
++ {
++ insn = emit_jump_insn (gen_return_from_epilogue (gen_rtx (REG, Pmode,
++ RA_REGNO)));
++ }
++}
++
++
++bool
++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
++{
++ return true;
++}
++
++
++
++
++
++/* ----------------------- *
++ * Profiling
++ * ----------------------- */
++
++void
++function_profiler (FILE *file, int labelno)
++{
++ fprintf (file, "\t%s mcount begin, label: .LP%d\n",
++ ASM_COMMENT_START, labelno);
++ fprintf (file, "\tnextpc\tr8\n");
++ fprintf (file, "\tmov\tr9, ra\n");
++ fprintf (file, "\tmovhi\tr10, %%hiadj(.LP%d)\n", labelno);
++ fprintf (file, "\taddi\tr10, r10, %%lo(.LP%d)\n", labelno);
++ fprintf (file, "\tcall\tmcount\n");
++ fprintf (file, "\tmov\tra, r9\n");
++ fprintf (file, "\t%s mcount end\n", ASM_COMMENT_START);
++}
++
++
++/***************************************
++ * Stack Layout
++ ***************************************/
++
++
++void
++dump_frame_size (FILE *file)
++{
++ fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START);
++
++ fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.total_size);
++ fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.var_size);
++ fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.args_size);
++ fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_size);
++ fprintf (file, "\t%s save_reg_rounded = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_rounded);
++ fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.initialized);
++ fprintf (file, "\t%s num_regs = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.num_regs);
++ fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_regs_offset);
++ fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START,
++ current_function_is_leaf);
++ fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START,
++ frame_pointer_needed);
++ fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START,
++ current_function_pretend_args_size);
++
++}
++
++
++/* Return the bytes needed to compute the frame pointer from the current
++ stack pointer.
++*/
++
++HOST_WIDE_INT
++compute_frame_size ()
++{
++ unsigned int regno;
++ HOST_WIDE_INT var_size; /* # of var. bytes allocated */
++ HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up */
++ HOST_WIDE_INT save_reg_size; /* # bytes needed to store callee save regs */
++ HOST_WIDE_INT save_reg_rounded;
++ /* # bytes needed to store callee save regs (rounded) */
++ HOST_WIDE_INT out_args_size; /* # bytes needed for outgoing args */
++
++ save_reg_size = 0;
++ var_size = STACK_ALIGN (get_frame_size ());
++ out_args_size = STACK_ALIGN (current_function_outgoing_args_size);
++
++ total_size = var_size + out_args_size;
++
++ /* Calculate space needed for gp registers. */
++ for (regno = 0; regno <= FIRST_PSEUDO_REGISTER; regno++)
++ {
++ if (MUST_SAVE_REGISTER (regno))
++ {
++ save_reg_size += 4;
++ }
++ }
++
++ save_reg_rounded = STACK_ALIGN (save_reg_size);
++ total_size += save_reg_rounded;
++
++ total_size += STACK_ALIGN (current_function_pretend_args_size);
++
++ /* Save other computed information. */
++ cfun->machine->frame.total_size = total_size;
++ cfun->machine->frame.var_size = var_size;
++ cfun->machine->frame.args_size = current_function_outgoing_args_size;
++ cfun->machine->frame.save_reg_size = save_reg_size;
++ cfun->machine->frame.save_reg_rounded = save_reg_rounded;
++ cfun->machine->frame.initialized = reload_completed;
++ cfun->machine->frame.num_regs = save_reg_size / UNITS_PER_WORD;
++
++ cfun->machine->frame.save_regs_offset
++ = save_reg_rounded ? current_function_outgoing_args_size + var_size : 0;
++
++ return total_size;
++}
++
++
++int
++nios2_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED)
++{
++ int offset;
++
++ /* Set OFFSET to the offset from the stack pointer. */
++ switch (from)
++ {
++ case FRAME_POINTER_REGNUM:
++ offset = 0;
++ break;
++
++ case ARG_POINTER_REGNUM:
++ compute_frame_size ();
++ offset = cfun->machine->frame.total_size;
++ offset -= current_function_pretend_args_size;
++ break;
++
++ case RETURN_ADDRESS_POINTER_REGNUM:
++ compute_frame_size ();
++ /* since the return address is always the first of the
++ saved registers, return the offset to the beginning
++ of the saved registers block */
++ offset = cfun->machine->frame.save_regs_offset;
++ break;
++
++ default:
++ abort ();
++ }
++
++ return offset;
++}
++
++/* Return nonzero if this function is known to have a null epilogue.
++ This allows the optimizer to omit jumps to jumps if no stack
++ was created. */
++int
++nios2_can_use_return_insn ()
++{
++ if (!reload_completed)
++ return 0;
++
++ if (regs_ever_live[RA_REGNO] || current_function_profile)
++ return 0;
++
++ if (cfun->machine->frame.initialized)
++ return cfun->machine->frame.total_size == 0;
++
++ return compute_frame_size () == 0;
++}
++
++
++
++
++
++/***************************************
++ *
++ ***************************************/
++
++const char *nios2_sys_nosys_string; /* for -msys=nosys */
++const char *nios2_sys_lib_string; /* for -msys-lib= */
++const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++void
++override_options ()
++{
++ /* Function to allocate machine-dependent function status. */
++ init_machine_status = &nios2_init_machine_status;
++
++ nios2_section_threshold
++ = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE;
++
++ if (nios2_sys_nosys_string && *nios2_sys_nosys_string)
++ {
++ error ("invalid option '-msys=nosys%s'", nios2_sys_nosys_string);
++ }
++
++ /* If we don't have mul, we don't have mulx either! */
++ if (!TARGET_HAS_MUL && TARGET_HAS_MULX)
++ {
++ target_flags &= ~HAS_MULX_FLAG;
++ }
++
++}
++
++void
++optimization_options (int level, int size)
++{
++ if (level || size)
++ {
++ target_flags |= INLINE_MEMCPY_FLAG;
++ }
++
++ if (level >= 3 && !size)
++ {
++ target_flags |= FAST_SW_DIV_FLAG;
++ }
++}
++
++/* Allocate a chunk of memory for per-function machine-dependent data. */
++static struct machine_function *
++nios2_init_machine_status ()
++{
++ return ((struct machine_function *)
++ ggc_alloc_cleared (sizeof (struct machine_function)));
++}
++
++
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++/* Compute a (partial) cost for rtx X. Return true if the complete
++ cost has been computed, and false if subexpressions should be
++ scanned. In either case, *TOTAL contains the cost result. */
++
++
++
++static bool
++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
++{
++ switch (code)
++ {
++ case CONST_INT:
++ if (INTVAL (x) == 0)
++ {
++ *total = COSTS_N_INSNS (0);
++ return true;
++ }
++ else if (SMALL_INT (INTVAL (x))
++ || SMALL_INT_UNSIGNED (INTVAL (x))
++ || UPPER16_INT (INTVAL (x)))
++ {
++ *total = COSTS_N_INSNS (2);
++ return true;
++ }
++ else
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case LABEL_REF:
++ case SYMBOL_REF:
++ /* ??? gp relative stuff will fit in here */
++ /* fall through */
++ case CONST:
++ case CONST_DOUBLE:
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case MULT:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++ case SIGN_EXTEND:
++ {
++ *total = COSTS_N_INSNS (3);
++ return false;
++ }
++ case ZERO_EXTEND:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++
++ default:
++ return false;
++ }
++}
++
++
++/***************************************
++ * INSTRUCTION SUPPORT
++ *
++ * These functions are used within the Machine Description to
++ * handle common or complicated output and expansions from
++ * instructions.
++ ***************************************/
++
++int
++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
++{
++ rtx to = operands[0];
++ rtx from = operands[1];
++
++ if (!register_operand (to, mode) && !reg_or_0_operand (from, mode))
++ {
++ if (no_new_pseudos)
++ internal_error ("Trying to force_reg no_new_pseudos == 1");
++ from = copy_to_mode_reg (mode, from);
++ }
++
++ operands[0] = to;
++ operands[1] = from;
++ return 0;
++}
++
++/* Divide Support */
++
++/*
++ If -O3 is used, we want to output a table lookup for
++ divides between small numbers (both num and den >= 0
++ and < 0x10). The overhead of this method in the worse
++ case is 40 bytes in the text section (10 insns) and
++ 256 bytes in the data section. Additional divides do
++ not incur additional penalties in the data section.
++
++ Code speed is improved for small divides by about 5x
++ when using this method in the worse case (~9 cycles
++ vs ~45). And in the worse case divides not within the
++ table are penalized by about 10% (~5 cycles vs ~45).
++ However in the typical case the penalty is not as bad
++ because doing the long divide in only 45 cycles is
++ quite optimistic.
++
++ ??? It would be nice to have some benchmarks other
++ than Dhrystone to back this up.
++
++ This bit of expansion is to create this instruction
++ sequence as rtl.
++ or $8, $4, $5
++ slli $9, $4, 4
++ cmpgeui $3, $8, 16
++ beq $3, $0, .L3
++ or $10, $9, $5
++ add $12, $11, divide_table
++ ldbu $2, 0($12)
++ br .L1
++.L3:
++ call slow_div
++.L1:
++# continue here with result in $2
++
++ ??? Ideally I would like the emit libcall block to contain
++ all of this code, but I don't know how to do that. What it
++ means is that if the divide can be eliminated, it may not
++ completely disappear.
++
++ ??? The __divsi3_table label should ideally be moved out
++ of this block and into a global. If it is placed into the
++ sdata section we can save even more cycles by doing things
++ gp relative.
++*/
++int
++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode)
++{
++ rtx or_result, shift_left_result;
++ rtx lookup_value;
++ rtx lab1, lab3;
++ rtx insns;
++ rtx libfunc;
++ rtx final_result;
++ rtx tmp;
++
++ /* it may look a little generic, but only SImode
++ is supported for now */
++ if (mode != SImode)
++ abort ();
++
++ libfunc = sdiv_optab->handlers[(int) SImode].libfunc;
++
++
++
++ lab1 = gen_label_rtx ();
++ lab3 = gen_label_rtx ();
++
++ or_result = expand_simple_binop (SImode, IOR,
++ operands[1], operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0,
++ GET_MODE (or_result), 0, lab3);
++ JUMP_LABEL (get_last_insn ()) = lab3;
++
++ shift_left_result = expand_simple_binop (SImode, ASHIFT,
++ operands[1], GEN_INT (4),
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ lookup_value = expand_simple_binop (SImode, IOR,
++ shift_left_result, operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ convert_move (operands[0],
++ gen_rtx (MEM, QImode,
++ gen_rtx (PLUS, SImode,
++ lookup_value,
++ gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))),
++ 1);
++
++
++ tmp = emit_jump_insn (gen_jump (lab1));
++ JUMP_LABEL (tmp) = lab1;
++ emit_barrier ();
++
++ emit_label (lab3);
++ LABEL_NUSES (lab3) = 1;
++
++ start_sequence ();
++ final_result = emit_library_call_value (libfunc, NULL_RTX,
++ LCT_CONST, SImode, 2,
++ operands[1], SImode,
++ operands[2], SImode);
++
++
++ insns = get_insns ();
++ end_sequence ();
++ emit_libcall_block (insns, operands[0], final_result,
++ gen_rtx (DIV, SImode, operands[1], operands[2]));
++
++ emit_label (lab1);
++ LABEL_NUSES (lab1) = 1;
++ return 1;
++}
++
++/* Branches/Compares */
++
++/* the way of handling branches/compares
++ in gcc is heavily borrowed from MIPS */
++
++enum internal_test
++{
++ ITEST_EQ,
++ ITEST_NE,
++ ITEST_GT,
++ ITEST_GE,
++ ITEST_LT,
++ ITEST_LE,
++ ITEST_GTU,
++ ITEST_GEU,
++ ITEST_LTU,
++ ITEST_LEU,
++ ITEST_MAX
++};
++
++static enum internal_test map_test_to_internal_test (enum rtx_code);
++
++/* Cached operands, and operator to compare for use in set/branch/trap
++ on condition codes. */
++rtx branch_cmp[2];
++enum cmp_type branch_type;
++
++/* Make normal rtx_code into something we can index from an array */
++
++static enum internal_test
++map_test_to_internal_test (enum rtx_code test_code)
++{
++ enum internal_test test = ITEST_MAX;
++
++ switch (test_code)
++ {
++ case EQ:
++ test = ITEST_EQ;
++ break;
++ case NE:
++ test = ITEST_NE;
++ break;
++ case GT:
++ test = ITEST_GT;
++ break;
++ case GE:
++ test = ITEST_GE;
++ break;
++ case LT:
++ test = ITEST_LT;
++ break;
++ case LE:
++ test = ITEST_LE;
++ break;
++ case GTU:
++ test = ITEST_GTU;
++ break;
++ case GEU:
++ test = ITEST_GEU;
++ break;
++ case LTU:
++ test = ITEST_LTU;
++ break;
++ case LEU:
++ test = ITEST_LEU;
++ break;
++ default:
++ break;
++ }
++
++ return test;
++}
++
++/* Generate the code to compare (and possibly branch) two integer values
++ TEST_CODE is the comparison code we are trying to emulate
++ (or implement directly)
++ RESULT is where to store the result of the comparison,
++ or null to emit a branch
++ CMP0 CMP1 are the two comparison operands
++ DESTINATION is the destination of the branch, or null to only compare
++ */
++
++void
++gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
++ rtx result, /* result to store comp. or 0 if branch */
++ rtx cmp0, /* first operand to compare */
++ rtx cmp1, /* second operand to compare */
++ rtx destination) /* destination of the branch, or 0 if compare */
++{
++ struct cmp_info
++ {
++ /* for register (or 0) compares */
++ enum rtx_code test_code_reg; /* code to use in instruction (LT vs. LTU) */
++ int reverse_regs; /* reverse registers in test */
++
++ /* for immediate compares */
++ enum rtx_code test_code_const;
++ /* code to use in instruction (LT vs. LTU) */
++ int const_low; /* low bound of constant we can accept */
++ int const_high; /* high bound of constant we can accept */
++ int const_add; /* constant to add */
++
++ /* generic info */
++ int unsignedp; /* != 0 for unsigned comparisons. */
++ };
++
++ static const struct cmp_info info[(int) ITEST_MAX] = {
++
++ {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ */
++ {NE, 0, NE, -32768, 32767, 0, 0}, /* NE */
++
++ {LT, 1, GE, -32769, 32766, 1, 0}, /* GT */
++ {GE, 0, GE, -32768, 32767, 0, 0}, /* GE */
++ {LT, 0, LT, -32768, 32767, 0, 0}, /* LT */
++ {GE, 1, LT, -32769, 32766, 1, 0}, /* LE */
++
++ {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */
++ {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */
++ {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */
++ {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */
++ };
++
++ enum internal_test test;
++ enum machine_mode mode;
++ const struct cmp_info *p_info;
++ int branch_p;
++
++
++
++
++ test = map_test_to_internal_test (test_code);
++ if (test == ITEST_MAX)
++ abort ();
++
++ p_info = &info[(int) test];
++
++ mode = GET_MODE (cmp0);
++ if (mode == VOIDmode)
++ mode = GET_MODE (cmp1);
++
++ branch_p = (destination != 0);
++
++ /* We can't, under any circumstances, have const_ints in cmp0
++ ??? Actually we could have const0 */
++ if (GET_CODE (cmp0) == CONST_INT)
++ cmp0 = force_reg (mode, cmp0);
++
++ /* if the comparison is against an int not in legal range
++ move it into a register */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (cmp1);
++
++ if (value < p_info->const_low || value > p_info->const_high)
++ cmp1 = force_reg (mode, cmp1);
++ }
++
++ /* Comparison to constants, may involve adding 1 to change a GT into GE.
++ Comparison between two registers, may involve switching operands. */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ if (p_info->const_add != 0)
++ {
++ HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
++
++ /* If modification of cmp1 caused overflow,
++ we would get the wrong answer if we follow the usual path;
++ thus, x > 0xffffffffU would turn into x > 0U. */
++ if ((p_info->unsignedp
++ ? (unsigned HOST_WIDE_INT) new >
++ (unsigned HOST_WIDE_INT) INTVAL (cmp1)
++ : new > INTVAL (cmp1)) != (p_info->const_add > 0))
++ {
++ /* ??? This case can never happen with the current numbers,
++ but I am paranoid and would rather an abort than
++ a bug I will never find */
++ abort ();
++ }
++ else
++ cmp1 = GEN_INT (new);
++ }
++ }
++
++ else if (p_info->reverse_regs)
++ {
++ rtx temp = cmp0;
++ cmp0 = cmp1;
++ cmp1 = temp;
++ }
++
++
++
++ if (branch_p)
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ rtx insn;
++ rtx cond = gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1);
++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ insn = gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond, label, pc_rtx));
++ emit_jump_insn (insn);
++ }
++ else
++ {
++ rtx cond, label;
++
++ result = gen_reg_rtx (mode);
++
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++
++ cond = gen_rtx (NE, mode, result, const0_rtx);
++ label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond,
++ label, pc_rtx)));
++ }
++ }
++ else
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1));
++ }
++ else
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++ }
++ }
++
++}
++
++
++/* ??? For now conditional moves are only supported
++ when the mode of the operands being compared are
++ the same as the ones being moved */
++
++void
++gen_conditional_move (rtx *operands, enum machine_mode mode)
++{
++ rtx insn, cond;
++ rtx cmp_reg = gen_reg_rtx (mode);
++ enum rtx_code cmp_code = GET_CODE (operands[1]);
++ enum rtx_code move_code = EQ;
++
++ /* emit a comparison if it is not "simple".
++ Simple comparisons are X eq 0 and X ne 0 */
++ if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[0];
++ move_code = cmp_code;
++ }
++ else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[1];
++ move_code = cmp_code == EQ ? NE : EQ;
++ }
++ else
++ gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1],
++ NULL_RTX);
++
++ cond = gen_rtx (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode));
++ insn = gen_rtx_SET (mode, operands[0],
++ gen_rtx_IF_THEN_ELSE (mode,
++ cond, operands[2], operands[3]));
++ emit_insn (insn);
++}
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++int
++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int strict)
++{
++ int ret_val = 0;
++
++ switch (GET_CODE (operand))
++ {
++ /* direct. */
++ case SYMBOL_REF:
++ if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand))
++ {
++ ret_val = 1;
++ break;
++ }
++ /* else, fall through */
++ case LABEL_REF:
++ case CONST_INT:
++ case CONST:
++ case CONST_DOUBLE:
++ /* ??? In here I need to add gp addressing */
++ ret_val = 0;
++
++ break;
++
++ /* Register indirect. */
++ case REG:
++ ret_val = REG_OK_FOR_BASE_P2 (operand, strict);
++ break;
++
++ /* Register indirect with displacement */
++ case PLUS:
++ {
++ rtx op0 = XEXP (operand, 0);
++ rtx op1 = XEXP (operand, 1);
++
++ if (REG_P (op0) && REG_P (op1))
++ ret_val = 0;
++ else if (REG_P (op0) && CONSTANT_P (op1))
++ ret_val = REG_OK_FOR_BASE_P2 (op0, strict)
++ && SMALL_INT (INTVAL (op1));
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ ret_val = REG_OK_FOR_BASE_P2 (op1, strict)
++ && SMALL_INT (INTVAL (op0));
++ else
++ ret_val = 0;
++ }
++ break;
++
++ default:
++ ret_val = 0;
++ break;
++ }
++
++ return ret_val;
++}
++
++/* Return true if EXP should be placed in the small data section. */
++
++static bool
++nios2_in_small_data_p (tree exp)
++{
++ /* We want to merge strings, so we never consider them small data. */
++ if (TREE_CODE (exp) == STRING_CST)
++ return false;
++
++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
++ {
++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
++ /* ??? these string names need moving into
++ an array in some header file */
++ if (nios2_section_threshold > 0
++ && (strcmp (section, ".sbss") == 0
++ || strncmp (section, ".sbss.", 6) == 0
++ || strcmp (section, ".sdata") == 0
++ || strncmp (section, ".sdata.", 7) == 0))
++ return true;
++ }
++ else if (TREE_CODE (exp) == VAR_DECL)
++ {
++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
++
++ /* If this is an incomplete type with size 0, then we can't put it
++ in sdata because it might be too big when completed. */
++ if (size > 0 && size <= nios2_section_threshold)
++ return true;
++ }
++
++ return false;
++}
++
++static void
++nios2_encode_section_info (tree decl, rtx rtl, int first)
++{
++
++ rtx symbol;
++ int flags;
++
++ default_encode_section_info (decl, rtl, first);
++
++ /* Careful not to prod global register variables. */
++ if (GET_CODE (rtl) != MEM)
++ return;
++ symbol = XEXP (rtl, 0);
++ if (GET_CODE (symbol) != SYMBOL_REF)
++ return;
++
++ flags = SYMBOL_REF_FLAGS (symbol);
++
++ /* We don't want weak variables to be addressed with gp in case they end up with
++ value 0 which is not within 2^15 of $gp */
++ if (DECL_P (decl) && DECL_WEAK (decl))
++ flags |= SYMBOL_FLAG_WEAK_DECL;
++
++ SYMBOL_REF_FLAGS (symbol) = flags;
++}
++
++
++static unsigned int
++nios2_section_type_flags (tree decl, const char *name, int reloc)
++{
++ unsigned int flags;
++
++ flags = default_section_type_flags (decl, name, reloc);
++
++ /* ??? these string names need moving into an array in some header file */
++ if (strcmp (name, ".sbss") == 0
++ || strncmp (name, ".sbss.", 6) == 0
++ || strcmp (name, ".sdata") == 0
++ || strncmp (name, ".sdata.", 7) == 0)
++ flags |= SECTION_SMALL;
++
++ return flags;
++}
++
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++
++/* print the operand OP to file stream
++ FILE modified by LETTER. LETTER
++ can be one of:
++ i: print "i" if OP is an immediate, except 0
++ o: print "io" if OP is volatile
++
++ z: for const0_rtx print $0 instead of 0
++ H: for %hiadj
++ L: for %lo
++ U: for upper half of 32 bit value
++ */
++
++void
++nios2_print_operand (FILE *file, rtx op, int letter)
++{
++
++ switch (letter)
++ {
++ case 'i':
++ if (CONSTANT_P (op) && (op != const0_rtx))
++ fprintf (file, "i");
++ return;
++
++ case 'o':
++ if (GET_CODE (op) == MEM
++ && ((MEM_VOLATILE_P (op) && !TARGET_CACHE_VOLATILE)
++ || TARGET_BYPASS_CACHE))
++ fprintf (file, "io");
++ return;
++
++ default:
++ break;
++ }
++
++ if (comparison_operator (op, VOIDmode))
++ {
++ if (letter == 0)
++ {
++ fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op)));
++ return;
++ }
++ }
++
++
++ switch (GET_CODE (op))
++ {
++ case REG:
++ if (letter == 0 || letter == 'z')
++ {
++ fprintf (file, "%s", reg_names[REGNO (op)]);
++ return;
++ }
++
++ case CONST_INT:
++ if (INTVAL (op) == 0 && letter == 'z')
++ {
++ fprintf (file, "zero");
++ return;
++ }
++ else if (letter == 'U')
++ {
++ HOST_WIDE_INT val = INTVAL (op);
++ rtx new_op;
++ val = (val / 65536) & 0xFFFF;
++ new_op = GEN_INT (val);
++ output_addr_const (file, new_op);
++ return;
++ }
++
++ /* else, fall through */
++ case CONST:
++ case LABEL_REF:
++ case SYMBOL_REF:
++ case CONST_DOUBLE:
++ if (letter == 0 || letter == 'z')
++ {
++ output_addr_const (file, op);
++ return;
++ }
++ else if (letter == 'H')
++ {
++ fprintf (file, "%%hiadj(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++ else if (letter == 'L')
++ {
++ fprintf (file, "%%lo(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++
++
++ case SUBREG:
++ case MEM:
++ if (letter == 0)
++ {
++ output_address (op);
++ return;
++ }
++
++ case CODE_LABEL:
++ if (letter == 0)
++ {
++ output_addr_const (file, op);
++ return;
++ }
++
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print (%c) ", letter);
++ debug_rtx (op);
++ abort ();
++}
++
++static int gprel_constant (rtx);
++
++static int
++gprel_constant (rtx op)
++{
++ if (GET_CODE (op) == SYMBOL_REF
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op))
++ {
++ return 1;
++ }
++ else if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == PLUS)
++ {
++ return gprel_constant (XEXP (XEXP (op, 0), 0));
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++void
++nios2_print_operand_address (FILE *file, rtx op)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST:
++ case CONST_INT:
++ case LABEL_REF:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ if (gprel_constant (op))
++ {
++ fprintf (file, "%%gprel(");
++ output_addr_const (file, op);
++ fprintf (file, ")(%s)", reg_names[GP_REGNO]);
++ return;
++ }
++
++ break;
++
++ case PLUS:
++ {
++ rtx op0 = XEXP (op, 0);
++ rtx op1 = XEXP (op, 1);
++
++ if (REG_P (op0) && CONSTANT_P (op1))
++ {
++ output_addr_const (file, op1);
++ fprintf (file, "(%s)", reg_names[REGNO (op0)]);
++ return;
++ }
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ {
++ output_addr_const (file, op0);
++ fprintf (file, "(%s)", reg_names[REGNO (op1)]);
++ return;
++ }
++ }
++ break;
++
++ case REG:
++ fprintf (file, "0(%s)", reg_names[REGNO (op)]);
++ return;
++
++ case MEM:
++ {
++ rtx base = XEXP (op, 0);
++ PRINT_OPERAND_ADDRESS (file, base);
++ return;
++ }
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print address\n");
++ debug_rtx (op);
++ abort ();
++}
++
++
++
++
++
++/****************************
++ * Predicates
++ ****************************/
++
++int
++arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++uns_arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++logical_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT
++ && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op))))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++shift_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op));
++}
++
++/* Return truth value of whether OP is a register or the constant 0. */
++
++int
++reg_or_0_operand (rtx op, enum machine_mode mode)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST_INT:
++ return INTVAL (op) == 0;
++
++ case CONST_DOUBLE:
++ return op == CONST0_RTX (mode);
++
++ default:
++ break;
++ }
++
++ return register_operand (op, mode);
++}
++
++
++int
++equality_op (rtx op, enum machine_mode mode)
++{
++ if (mode != GET_MODE (op))
++ return 0;
++
++ return GET_CODE (op) == EQ || GET_CODE (op) == NE;
++}
++
++int
++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op));
++}
++
++
++
++
++
++
++
++/*****************************************************************************
++**
++** instruction scheduler
++**
++*****************************************************************************/
++static int
++nios2_use_dfa_pipeline_interface ()
++{
++ return 1;
++}
++
++
++static int
++nios2_issue_rate ()
++{
++#ifdef MAX_DFA_ISSUE_RATE
++ return MAX_DFA_ISSUE_RATE;
++#else
++ return 1;
++#endif
++}
++
++
++const char *
++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED,
++ const char *ptr ATTRIBUTE_UNUSED)
++{
++ const char *p;
++
++ p = ptr;
++ return ptr;
++}
++
++
++
++/*****************************************************************************
++**
++** function arguments
++**
++*****************************************************************************/
++
++void
++init_cumulative_args (CUMULATIVE_ARGS *cum,
++ tree fntype ATTRIBUTE_UNUSED,
++ rtx libname ATTRIBUTE_UNUSED,
++ tree fndecl ATTRIBUTE_UNUSED,
++ int n_named_args ATTRIBUTE_UNUSED)
++{
++ cum->regs_used = 0;
++}
++
++
++/* Update the data in CUM to advance over an argument
++ of mode MODE and data type TYPE.
++ (TYPE is null for libcalls where that information may not be available.) */
++
++void
++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ cum->regs_used = NUM_ARG_REGS;
++ }
++ else
++ {
++ cum->regs_used += param_size;
++ }
++
++ return;
++}
++
++/* Define where to put the arguments to a function. Value is zero to
++ push the argument on the stack, or a hard register in which to
++ store the argument.
++
++ MODE is the argument's machine mode.
++ TYPE is the data type of the argument (as a tree).
++ This is null for libcalls where that information may
++ not be available.
++ CUM is a variable of type CUMULATIVE_ARGS which gives info about
++ the preceding args and about the function being called.
++ NAMED is nonzero if this argument is a named parameter
++ (otherwise it is an extra parameter matching an ellipsis). */
++rtx
++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ rtx return_rtx = NULL_RTX;
++
++ if (cum->regs_used < NUM_ARG_REGS)
++ {
++ return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used);
++ }
++
++ return return_rtx;
++}
++
++int
++function_arg_partial_nregs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used < NUM_ARG_REGS
++ && cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ return NUM_ARG_REGS - cum->regs_used;
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++
++int
++nios2_return_in_memory (tree type)
++{
++ int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
++ || (int_size_in_bytes (type) == -1));
++
++ return res;
++}
++
++/* ??? It may be possible to eliminate the copyback and implement
++ my own va_arg type, but that is more work for now. */
++int
++nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int no_rtl)
++{
++ CUMULATIVE_ARGS local_cum;
++ int regs_to_push;
++
++ local_cum = *cum;
++ FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
++
++ regs_to_push = NUM_ARG_REGS - local_cum.regs_used;
++
++ if (!no_rtl)
++ {
++ if (regs_to_push > 0)
++ {
++ rtx ptr, mem;
++
++ ptr = virtual_incoming_args_rtx;
++ mem = gen_rtx_MEM (BLKmode, ptr);
++
++ /* va_arg is an array access in this case, which causes
++ it to get MEM_IN_STRUCT_P set. We must set it here
++ so that the insn scheduler won't assume that these
++ stores can't possibly overlap with the va_arg loads. */
++ MEM_SET_IN_STRUCT_P (mem, 1);
++
++ emit_insn (gen_blockage ());
++ move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem,
++ regs_to_push);
++ emit_insn (gen_blockage ());
++ }
++ }
++
++ return regs_to_push * UNITS_PER_WORD;
++
++}
++
++
++
++/*****************************************************************************
++**
++** builtins
++**
++** This method for handling builtins is from CSP where _many_ more types of
++** expanders have already been written. Check there first before writing
++** new ones.
++**
++*****************************************************************************/
++
++enum nios2_builtins
++{
++ NIOS2_BUILTIN_LDBIO,
++ NIOS2_BUILTIN_LDBUIO,
++ NIOS2_BUILTIN_LDHIO,
++ NIOS2_BUILTIN_LDHUIO,
++ NIOS2_BUILTIN_LDWIO,
++ NIOS2_BUILTIN_STBIO,
++ NIOS2_BUILTIN_STHIO,
++ NIOS2_BUILTIN_STWIO,
++ NIOS2_BUILTIN_SYNC,
++ NIOS2_BUILTIN_RDCTL,
++ NIOS2_BUILTIN_WRCTL,
++
++ NIOS2_BUILTIN_CUSTOM_N,
++ NIOS2_BUILTIN_CUSTOM_NI,
++ NIOS2_BUILTIN_CUSTOM_NF,
++ NIOS2_BUILTIN_CUSTOM_NP,
++ NIOS2_BUILTIN_CUSTOM_NII,
++ NIOS2_BUILTIN_CUSTOM_NIF,
++ NIOS2_BUILTIN_CUSTOM_NIP,
++ NIOS2_BUILTIN_CUSTOM_NFI,
++ NIOS2_BUILTIN_CUSTOM_NFF,
++ NIOS2_BUILTIN_CUSTOM_NFP,
++ NIOS2_BUILTIN_CUSTOM_NPI,
++ NIOS2_BUILTIN_CUSTOM_NPF,
++ NIOS2_BUILTIN_CUSTOM_NPP,
++ NIOS2_BUILTIN_CUSTOM_IN,
++ NIOS2_BUILTIN_CUSTOM_INI,
++ NIOS2_BUILTIN_CUSTOM_INF,
++ NIOS2_BUILTIN_CUSTOM_INP,
++ NIOS2_BUILTIN_CUSTOM_INII,
++ NIOS2_BUILTIN_CUSTOM_INIF,
++ NIOS2_BUILTIN_CUSTOM_INIP,
++ NIOS2_BUILTIN_CUSTOM_INFI,
++ NIOS2_BUILTIN_CUSTOM_INFF,
++ NIOS2_BUILTIN_CUSTOM_INFP,
++ NIOS2_BUILTIN_CUSTOM_INPI,
++ NIOS2_BUILTIN_CUSTOM_INPF,
++ NIOS2_BUILTIN_CUSTOM_INPP,
++ NIOS2_BUILTIN_CUSTOM_FN,
++ NIOS2_BUILTIN_CUSTOM_FNI,
++ NIOS2_BUILTIN_CUSTOM_FNF,
++ NIOS2_BUILTIN_CUSTOM_FNP,
++ NIOS2_BUILTIN_CUSTOM_FNII,
++ NIOS2_BUILTIN_CUSTOM_FNIF,
++ NIOS2_BUILTIN_CUSTOM_FNIP,
++ NIOS2_BUILTIN_CUSTOM_FNFI,
++ NIOS2_BUILTIN_CUSTOM_FNFF,
++ NIOS2_BUILTIN_CUSTOM_FNFP,
++ NIOS2_BUILTIN_CUSTOM_FNPI,
++ NIOS2_BUILTIN_CUSTOM_FNPF,
++ NIOS2_BUILTIN_CUSTOM_FNPP,
++ NIOS2_BUILTIN_CUSTOM_PN,
++ NIOS2_BUILTIN_CUSTOM_PNI,
++ NIOS2_BUILTIN_CUSTOM_PNF,
++ NIOS2_BUILTIN_CUSTOM_PNP,
++ NIOS2_BUILTIN_CUSTOM_PNII,
++ NIOS2_BUILTIN_CUSTOM_PNIF,
++ NIOS2_BUILTIN_CUSTOM_PNIP,
++ NIOS2_BUILTIN_CUSTOM_PNFI,
++ NIOS2_BUILTIN_CUSTOM_PNFF,
++ NIOS2_BUILTIN_CUSTOM_PNFP,
++ NIOS2_BUILTIN_CUSTOM_PNPI,
++ NIOS2_BUILTIN_CUSTOM_PNPF,
++ NIOS2_BUILTIN_CUSTOM_PNPP,
++
++
++ LIM_NIOS2_BUILTINS
++};
++
++struct builtin_description
++{
++ const enum insn_code icode;
++ const char *const name;
++ const enum nios2_builtins code;
++ const tree *type;
++ rtx (* expander) PARAMS ((const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int));
++};
++
++static rtx nios2_expand_STXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_LDXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_sync (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_rdctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_wrctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static rtx nios2_expand_custom_n (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_Xn (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static tree endlink;
++
++/* int fn (volatile const void *)
++ */
++static tree int_ftype_volatile_const_void_p;
++
++/* int fn (int)
++ */
++static tree int_ftype_int;
++
++/* void fn (int, int)
++ */
++static tree void_ftype_int_int;
++
++/* void fn (volatile void *, int)
++ */
++static tree void_ftype_volatile_void_p_int;
++
++/* void fn (void)
++ */
++static tree void_ftype_void;
++
++static tree custom_n;
++static tree custom_ni;
++static tree custom_nf;
++static tree custom_np;
++static tree custom_nii;
++static tree custom_nif;
++static tree custom_nip;
++static tree custom_nfi;
++static tree custom_nff;
++static tree custom_nfp;
++static tree custom_npi;
++static tree custom_npf;
++static tree custom_npp;
++static tree custom_in;
++static tree custom_ini;
++static tree custom_inf;
++static tree custom_inp;
++static tree custom_inii;
++static tree custom_inif;
++static tree custom_inip;
++static tree custom_infi;
++static tree custom_inff;
++static tree custom_infp;
++static tree custom_inpi;
++static tree custom_inpf;
++static tree custom_inpp;
++static tree custom_fn;
++static tree custom_fni;
++static tree custom_fnf;
++static tree custom_fnp;
++static tree custom_fnii;
++static tree custom_fnif;
++static tree custom_fnip;
++static tree custom_fnfi;
++static tree custom_fnff;
++static tree custom_fnfp;
++static tree custom_fnpi;
++static tree custom_fnpf;
++static tree custom_fnpp;
++static tree custom_pn;
++static tree custom_pni;
++static tree custom_pnf;
++static tree custom_pnp;
++static tree custom_pnii;
++static tree custom_pnif;
++static tree custom_pnip;
++static tree custom_pnfi;
++static tree custom_pnff;
++static tree custom_pnfp;
++static tree custom_pnpi;
++static tree custom_pnpf;
++static tree custom_pnpp;
++
++
++static const struct builtin_description bdesc[] = {
++ {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++
++ {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++
++ {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, &void_ftype_void, nios2_expand_sync},
++ {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, &int_ftype_int, nios2_expand_rdctl},
++ {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, &void_ftype_int_int, nios2_expand_wrctl},
++
++ {CODE_FOR_custom_n, "__builtin_custom_n", NIOS2_BUILTIN_CUSTOM_N, &custom_n, nios2_expand_custom_n},
++ {CODE_FOR_custom_ni, "__builtin_custom_ni", NIOS2_BUILTIN_CUSTOM_NI, &custom_ni, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nf, "__builtin_custom_nf", NIOS2_BUILTIN_CUSTOM_NF, &custom_nf, nios2_expand_custom_nX},
++ {CODE_FOR_custom_np, "__builtin_custom_np", NIOS2_BUILTIN_CUSTOM_NP, &custom_np, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nii, "__builtin_custom_nii", NIOS2_BUILTIN_CUSTOM_NII, &custom_nii, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nif, "__builtin_custom_nif", NIOS2_BUILTIN_CUSTOM_NIF, &custom_nif, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nip, "__builtin_custom_nip", NIOS2_BUILTIN_CUSTOM_NIP, &custom_nip, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfi, "__builtin_custom_nfi", NIOS2_BUILTIN_CUSTOM_NFI, &custom_nfi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nff, "__builtin_custom_nff", NIOS2_BUILTIN_CUSTOM_NFF, &custom_nff, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfp, "__builtin_custom_nfp", NIOS2_BUILTIN_CUSTOM_NFP, &custom_nfp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npi, "__builtin_custom_npi", NIOS2_BUILTIN_CUSTOM_NPI, &custom_npi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npf, "__builtin_custom_npf", NIOS2_BUILTIN_CUSTOM_NPF, &custom_npf, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npp, "__builtin_custom_npp", NIOS2_BUILTIN_CUSTOM_NPP, &custom_npp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_in, "__builtin_custom_in", NIOS2_BUILTIN_CUSTOM_IN, &custom_in, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_ini, "__builtin_custom_ini", NIOS2_BUILTIN_CUSTOM_INI, &custom_ini, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inf, "__builtin_custom_inf", NIOS2_BUILTIN_CUSTOM_INF, &custom_inf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inp, "__builtin_custom_inp", NIOS2_BUILTIN_CUSTOM_INP, &custom_inp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inii, "__builtin_custom_inii", NIOS2_BUILTIN_CUSTOM_INII, &custom_inii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inif, "__builtin_custom_inif", NIOS2_BUILTIN_CUSTOM_INIF, &custom_inif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inip, "__builtin_custom_inip", NIOS2_BUILTIN_CUSTOM_INIP, &custom_inip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infi, "__builtin_custom_infi", NIOS2_BUILTIN_CUSTOM_INFI, &custom_infi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inff, "__builtin_custom_inff", NIOS2_BUILTIN_CUSTOM_INFF, &custom_inff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infp, "__builtin_custom_infp", NIOS2_BUILTIN_CUSTOM_INFP, &custom_infp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpi, "__builtin_custom_inpi", NIOS2_BUILTIN_CUSTOM_INPI, &custom_inpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpf, "__builtin_custom_inpf", NIOS2_BUILTIN_CUSTOM_INPF, &custom_inpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpp, "__builtin_custom_inpp", NIOS2_BUILTIN_CUSTOM_INPP, &custom_inpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fn, "__builtin_custom_fn", NIOS2_BUILTIN_CUSTOM_FN, &custom_fn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_fni, "__builtin_custom_fni", NIOS2_BUILTIN_CUSTOM_FNI, &custom_fni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnf, "__builtin_custom_fnf", NIOS2_BUILTIN_CUSTOM_FNF, &custom_fnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnp, "__builtin_custom_fnp", NIOS2_BUILTIN_CUSTOM_FNP, &custom_fnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnii, "__builtin_custom_fnii", NIOS2_BUILTIN_CUSTOM_FNII, &custom_fnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnif, "__builtin_custom_fnif", NIOS2_BUILTIN_CUSTOM_FNIF, &custom_fnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnip, "__builtin_custom_fnip", NIOS2_BUILTIN_CUSTOM_FNIP, &custom_fnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfi, "__builtin_custom_fnfi", NIOS2_BUILTIN_CUSTOM_FNFI, &custom_fnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnff, "__builtin_custom_fnff", NIOS2_BUILTIN_CUSTOM_FNFF, &custom_fnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfp, "__builtin_custom_fnfp", NIOS2_BUILTIN_CUSTOM_FNFP, &custom_fnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpi, "__builtin_custom_fnpi", NIOS2_BUILTIN_CUSTOM_FNPI, &custom_fnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpf, "__builtin_custom_fnpf", NIOS2_BUILTIN_CUSTOM_FNPF, &custom_fnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpp, "__builtin_custom_fnpp", NIOS2_BUILTIN_CUSTOM_FNPP, &custom_fnpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pn, "__builtin_custom_pn", NIOS2_BUILTIN_CUSTOM_PN, &custom_pn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_pni, "__builtin_custom_pni", NIOS2_BUILTIN_CUSTOM_PNI, &custom_pni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnf, "__builtin_custom_pnf", NIOS2_BUILTIN_CUSTOM_PNF, &custom_pnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnp, "__builtin_custom_pnp", NIOS2_BUILTIN_CUSTOM_PNP, &custom_pnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnii, "__builtin_custom_pnii", NIOS2_BUILTIN_CUSTOM_PNII, &custom_pnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnif, "__builtin_custom_pnif", NIOS2_BUILTIN_CUSTOM_PNIF, &custom_pnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnip, "__builtin_custom_pnip", NIOS2_BUILTIN_CUSTOM_PNIP, &custom_pnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfi, "__builtin_custom_pnfi", NIOS2_BUILTIN_CUSTOM_PNFI, &custom_pnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnff, "__builtin_custom_pnff", NIOS2_BUILTIN_CUSTOM_PNFF, &custom_pnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfp, "__builtin_custom_pnfp", NIOS2_BUILTIN_CUSTOM_PNFP, &custom_pnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpi, "__builtin_custom_pnpi", NIOS2_BUILTIN_CUSTOM_PNPI, &custom_pnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpf, "__builtin_custom_pnpf", NIOS2_BUILTIN_CUSTOM_PNPF, &custom_pnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpp, "__builtin_custom_pnpp", NIOS2_BUILTIN_CUSTOM_PNPP, &custom_pnpp, nios2_expand_custom_XnXX},
++
++
++ {0, 0, 0, 0, 0},
++};
++
++/* This does not have a closing bracket on purpose (see use) */
++#define def_param(TYPE) \
++ tree_cons (NULL_TREE, TYPE,
++
++static void
++nios2_init_builtins ()
++{
++ const struct builtin_description *d;
++
++
++ endlink = void_list_node;
++
++ /* Special indenting here because one of the brackets is in def_param */
++ /* *INDENT-OFF* */
++
++ /* int fn (volatile const void *)
++ */
++ int_ftype_volatile_const_void_p
++ = build_function_type (integer_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))
++ endlink));
++
++
++ /* void fn (volatile void *, int)
++ */
++ void_ftype_volatile_void_p_int
++ = build_function_type (void_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_VOLATILE))
++ def_param (integer_type_node)
++ endlink)));
++
++ /* void fn (void)
++ */
++ void_ftype_void
++ = build_function_type (void_type_node,
++ endlink);
++
++ /* int fn (int)
++ */
++ int_ftype_int
++ = build_function_type (integer_type_node,
++ def_param (integer_type_node)
++ endlink));
++
++ /* void fn (int, int)
++ */
++ void_ftype_int_int
++ = build_function_type (void_type_node,
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink)));
++
++
++#define CUSTOM_NUM def_param (integer_type_node)
++
++ custom_n
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ni
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_nf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_np
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_nii
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nif
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nip
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_nfi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nff
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nfp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_npi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_npf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_npp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_in
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ini
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_inf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_inp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_inii
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inif
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inip
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_infi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inff
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_infp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_inpi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inpf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inpp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_fn
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_fni
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_fnf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_fnp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_fnii
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnif
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnip
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnfi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnff
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnfp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnpi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnpf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnpp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++ custom_pn
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_pni
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_pnf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_pnp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_pnii
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnif
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnip
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnfi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnff
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnfp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnpi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnpf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnpp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++
++ /* *INDENT-ON* */
++
++
++ for (d = bdesc; d->name; d++)
++ {
++ builtin_function (d->name, *d->type, d->code,
++ BUILT_IN_MD, NULL, NULL);
++ }
++}
++
++/* Expand an expression EXP that calls a built-in function,
++ with result going to TARGET if that's convenient
++ (and in mode MODE if that's convenient).
++ SUBTARGET may be used as the target for computing one of EXP's operands.
++ IGNORE is nonzero if the value is to be ignored. */
++
++static rtx
++nios2_expand_builtin (tree exp, rtx target, rtx subtarget,
++ enum machine_mode mode, int ignore)
++{
++ const struct builtin_description *d;
++ tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
++
++ for (d = bdesc; d->name; d++)
++ if (d->code == fcode)
++ return (d->expander) (d, exp, target, subtarget, mode, ignore);
++
++ /* we should have seen one of the functins we registered */
++ abort ();
++}
++
++static rtx nios2_create_target (const struct builtin_description *, rtx);
++
++
++static rtx
++nios2_create_target (const struct builtin_description *d, rtx target)
++{
++ if (!target
++ || !(*insn_data[d->icode].operand[0].predicate) (target,
++ insn_data[d->icode].operand[0].mode))
++ {
++ target = gen_reg_rtx (insn_data[d->icode].operand[0].mode);
++ }
++
++ return target;
++}
++
++
++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree);
++static rtx nios2_extract_operand (const struct builtin_description *, int, int, tree);
++
++static rtx
++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx opcode = expand_expr (arg, NULL_RTX, mode, 0);
++ opcode = protect_from_queue (opcode, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode))
++ error ("Custom instruction opcode must be compile time constant in the range 0-255 for %s", d->name);
++
++ return opcode;
++}
++
++static rtx
++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx operand = expand_expr (arg, NULL_RTX, mode, 0);
++ operand = protect_from_queue (operand, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ operand = copy_to_mode_reg (mode, operand);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ error ("Invalid argument %d to %s", argnum, d->name);
++
++ return operand;
++}
++
++
++static rtx
++nios2_expand_custom_n (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_n should have exactly one operand */
++ if (insn_data[d->icode].n_operands != 1)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++
++ pat = GEN_FCN (d->icode) (opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp,
++ rtx target, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_Xn should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ pat = GEN_FCN (d->icode) (target, opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nX (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++
++ /* custom_nX should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++ /* custom_Xn should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_nX should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_XnX should have exactly four operands */
++ if (insn_data[d->icode].n_operands != 4)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++
++static rtx
++nios2_expand_STXIO (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx store_dest, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ store_dest = protect_from_queue (store_dest, 0);
++
++ store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode))
++ error ("Invalid argument 1 to %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (store_dest, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++static rtx
++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx ld_src;
++ enum insn_code icode = d->icode;
++
++ /* loads should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ ld_src = protect_from_queue (ld_src, 0);
++
++ ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode))
++ {
++ error ("Invalid argument 1 to %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, ld_src);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++static rtx
++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ emit_insn (gen_sync ());
++ return 0;
++}
++
++static rtx
++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx rdctl_reg;
++ enum insn_code icode = d->icode;
++
++ /* rdctl should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ rdctl_reg = protect_from_queue (rdctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode))
++ {
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, rdctl_reg);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx wrctl_reg, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ wrctl_reg = protect_from_queue (wrctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode))
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (wrctl_reg, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++#include "gt-nios2.h"
++
+--- gcc-3.4.3/gcc/config/nios2/nios2.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.h
+@@ -0,0 +1,824 @@
++/* Definitions of target machine for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++
++#define TARGET_CPU_CPP_BUILTINS() \
++ do \
++ { \
++ builtin_define_std ("NIOS2"); \
++ builtin_define_std ("nios2"); \
++ builtin_define ("_GNU_SOURCE"); \
++ } \
++ while (0)
++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)")
++
++
++
++
++
++/*********************************
++ * Run-time Target Specification
++ *********************************/
++
++#define HAS_DIV_FLAG 0x0001
++#define HAS_MUL_FLAG 0x0002
++#define HAS_MULX_FLAG 0x0004
++#define FAST_SW_DIV_FLAG 0x0008
++#define INLINE_MEMCPY_FLAG 0x00010
++#define CACHE_VOLATILE_FLAG 0x0020
++#define BYPASS_CACHE_FLAG 0x0040
++
++extern int target_flags;
++#define TARGET_HAS_DIV (target_flags & HAS_DIV_FLAG)
++#define TARGET_HAS_MUL (target_flags & HAS_MUL_FLAG)
++#define TARGET_HAS_MULX (target_flags & HAS_MULX_FLAG)
++#define TARGET_FAST_SW_DIV (target_flags & FAST_SW_DIV_FLAG)
++#define TARGET_INLINE_MEMCPY (target_flags & INLINE_MEMCPY_FLAG)
++#define TARGET_CACHE_VOLATILE (target_flags & CACHE_VOLATILE_FLAG)
++#define TARGET_BYPASS_CACHE (target_flags & BYPASS_CACHE_FLAG)
++
++#define TARGET_SWITCHES \
++{ \
++ { "hw-div", HAS_DIV_FLAG, \
++ N_("Enable DIV, DIVU") }, \
++ { "no-hw-div", -HAS_DIV_FLAG, \
++ N_("Disable DIV, DIVU (default)") }, \
++ { "hw-mul", HAS_MUL_FLAG, \
++ N_("Enable MUL instructions (default)") }, \
++ { "hw-mulx", HAS_MULX_FLAG, \
++ N_("Enable MULX instructions, assume fast shifter") }, \
++ { "no-hw-mul", -HAS_MUL_FLAG, \
++ N_("Disable MUL instructions") }, \
++ { "no-hw-mulx", -HAS_MULX_FLAG, \
++ N_("Disable MULX instructions, assume slow shifter (default and implied by -mno-hw-mul)") }, \
++ { "fast-sw-div", FAST_SW_DIV_FLAG, \
++ N_("Use table based fast divide (default at -O3)") }, \
++ { "no-fast-sw-div", -FAST_SW_DIV_FLAG, \
++ N_("Don't use table based fast divide ever") }, \
++ { "inline-memcpy", INLINE_MEMCPY_FLAG, \
++ N_("Inline small memcpy (default when optimizing)") }, \
++ { "no-inline-memcpy", -INLINE_MEMCPY_FLAG, \
++ N_("Don't Inline small memcpy") }, \
++ { "cache-volatile", CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use non-io variants of instructions (default)") }, \
++ { "no-cache-volatile", -CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use io variants of instructions") }, \
++ { "bypass-cache", BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins use io variants") }, \
++ { "no-bypass-cache", -BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins do not use io variants (default)") }, \
++ { "smallc", 0, \
++ N_("Link with a limited version of the C library") }, \
++ { "ctors-in-init", 0, \
++ "" /* undocumented: N_("Link with static constructors and destructors in init") */ }, \
++ { "", TARGET_DEFAULT, 0 } \
++}
++
++
++extern const char *nios2_sys_nosys_string; /* for -msys=nosys */
++extern const char *nios2_sys_lib_string; /* for -msys-lib= */
++extern const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++#define TARGET_OPTIONS \
++{ \
++ { "sys=nosys", &nios2_sys_nosys_string, \
++ N_("Use stub versions of OS library calls (default)"), 0}, \
++ { "sys-lib=", &nios2_sys_lib_string, \
++ N_("Name of System Library to link against. (Converted to a -l option)"), 0}, \
++ { "sys-crt0=", &nios2_sys_crt0_string, \
++ N_("Name of the startfile. (default is a crt0 for the ISS only)"), 0}, \
++}
++
++
++/* Default target_flags if no switches specified. */
++#ifndef TARGET_DEFAULT
++# define TARGET_DEFAULT (HAS_MUL_FLAG | CACHE_VOLATILE_FLAG)
++#endif
++
++/* Switch Recognition by gcc.c. Add -G xx support */
++#undef SWITCH_TAKES_ARG
++#define SWITCH_TAKES_ARG(CHAR) \
++ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
++
++#define OVERRIDE_OPTIONS override_options ()
++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE)
++#define CAN_DEBUG_WITHOUT_FP
++
++#define CC1_SPEC "\
++%{G*}"
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
++ %{msys-lib=*: -l%*} \
++ %{!msys-lib=*: -lc } \
++ --end-group \
++ %{msys-lib=: %eYou need a library name for -msys-lib=} \
++"
++
++
++#undef STARTFILE_SPEC
++#define STARTFILE_SPEC \
++"%{msys-crt0=*: %*} %{!msys-crt0=*: crt1%O%s} \
++ %{msys-crt0=: %eYou need a C startup file for -msys-crt0=} \
++ %{mctors-in-init: crti%O%s crtbegin%O%s} \
++"
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{mctors-in-init: crtend%O%s crtn%O%s}"
++
++
++/***********************
++ * Storage Layout
++ ***********************/
++
++#define DEFAULT_SIGNED_CHAR 1
++#define BITS_BIG_ENDIAN 0
++#define BYTES_BIG_ENDIAN 0
++#define WORDS_BIG_ENDIAN 0
++#define BITS_PER_UNIT 8
++#define BITS_PER_WORD 32
++#define UNITS_PER_WORD 4
++#define POINTER_SIZE 32
++#define BIGGEST_ALIGNMENT 32
++#define STRICT_ALIGNMENT 1
++#define FUNCTION_BOUNDARY 32
++#define PARM_BOUNDARY 32
++#define STACK_BOUNDARY 32
++#define PREFERRED_STACK_BOUNDARY 32
++#define MAX_FIXED_MODE_SIZE 64
++
++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
++ ((TREE_CODE (EXP) == STRING_CST) \
++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
++
++
++/**********************
++ * Layout of Source Language Data Types
++ **********************/
++
++#define INT_TYPE_SIZE 32
++#define SHORT_TYPE_SIZE 16
++#define LONG_TYPE_SIZE 32
++#define LONG_LONG_TYPE_SIZE 64
++#define FLOAT_TYPE_SIZE 32
++#define DOUBLE_TYPE_SIZE 64
++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
++
++
++/*************************
++ * Condition Code Status
++ ************************/
++
++/* comparison type */
++/* ??? currently only CMP_SI is used */
++enum cmp_type {
++ CMP_SI, /* compare four byte integers */
++ CMP_DI, /* compare eight byte integers */
++ CMP_SF, /* compare single precision floats */
++ CMP_DF, /* compare double precision floats */
++ CMP_MAX /* max comparison type */
++};
++
++extern GTY(()) rtx branch_cmp[2]; /* operands for compare */
++extern enum cmp_type branch_type; /* what type of branch to use */
++
++/**********************
++ * Register Usage
++ **********************/
++
++/* ---------------------------------- *
++ * Basic Characteristics of Registers
++ * ---------------------------------- */
++
++/*
++Register Number
++ Register Name
++ Alternate Name
++ Purpose
++0 r0 zero always zero
++1 r1 at Assembler Temporary
++2-3 r2-r3 Return Location
++4-7 r4-r7 Register Arguments
++8-15 r8-r15 Caller Saved Registers
++16-22 r16-r22 Callee Saved Registers
++23 r23 sc Static Chain (Callee Saved)
++ ??? Does $sc want to be caller or callee
++ saved. If caller, 15, else 23.
++24 r24 Exception Temporary
++25 r25 Breakpoint Temporary
++26 r26 gp Global Pointer
++27 r27 sp Stack Pointer
++28 r28 fp Frame Pointer
++29 r29 ea Exception Return Address
++30 r30 ba Breakpoint Return Address
++31 r31 ra Return Address
++
++32 ctl0 status
++33 ctl1 estatus STATUS saved by exception ?
++34 ctl2 bstatus STATUS saved by break ?
++35 ctl3 ipri Interrupt Priority Mask ?
++36 ctl4 ecause Exception Cause ?
++
++37 pc Not an actual register
++
++38 rap Return address pointer, this does not
++ actually exist and will be eliminated
++
++39 fake_fp Fake Frame Pointer which will always be eliminated.
++40 fake_ap Fake Argument Pointer which will always be eliminated.
++
++41 First Pseudo Register
++
++
++The definitions for all the hard register numbers
++are located in nios2.md.
++*/
++
++#define FIRST_PSEUDO_REGISTER 41
++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1)
++
++
++
++/* also see CONDITIONAL_REGISTER_USAGE */
++#define FIXED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++/* call used is the same as caller saved
++ + fixed regs + args + ret vals */
++#define CALL_USED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 10 */ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++#define HARD_REGNO_NREGS(REGNO, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++/* --------------------------- *
++ * How Values Fit in Registers
++ * --------------------------- */
++
++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
++
++#define MODES_TIEABLE_P(MODE1, MODE2) 1
++
++
++/*************************
++ * Register Classes
++ *************************/
++
++enum reg_class
++{
++ NO_REGS,
++ ALL_REGS,
++ LIM_REG_CLASSES
++};
++
++#define N_REG_CLASSES (int) LIM_REG_CLASSES
++
++#define REG_CLASS_NAMES \
++ {"NO_REGS", \
++ "ALL_REGS"}
++
++#define GENERAL_REGS ALL_REGS
++
++#define REG_CLASS_CONTENTS \
++/* NO_REGS */ {{ 0, 0}, \
++/* ALL_REGS */ {~0,~0}} \
++
++#define REGNO_REG_CLASS(REGNO) ALL_REGS
++
++#define BASE_REG_CLASS ALL_REGS
++#define INDEX_REG_CLASS ALL_REGS
++
++/* only one reg class, 'r', is handled automatically */
++#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS
++
++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \
++ ((STRICT) \
++ ? (REGNO) < FIRST_PSEUDO_REGISTER \
++ : (REGNO) < FIRST_PSEUDO_REGISTER || (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
++
++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT))
++
++#define REGNO_OK_FOR_BASE_P(REGNO) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, 1))
++
++#define REGNO_OK_FOR_INDEX_P(REGNO) \
++ (REGNO_OK_FOR_INDEX_P2 (REGNO, 1))
++
++#define REG_OK_FOR_BASE_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define REG_OK_FOR_INDEX_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define CLASS_MAX_NREGS(CLASS, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++
++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000)
++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000)
++#define UPPER16_INT(X) (((X) & 0xffff) == 0)
++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31)
++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31)
++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255)
++
++#define CONST_OK_FOR_LETTER_P(VALUE, C) \
++ ( \
++ (C) == 'I' ? SMALL_INT (VALUE) : \
++ (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) : \
++ (C) == 'K' ? UPPER16_INT (VALUE) : \
++ (C) == 'L' ? SHIFT_INT (VALUE) : \
++ (C) == 'M' ? (VALUE) == 0 : \
++ (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) : \
++ (C) == 'O' ? RDWRCTL_INT (VALUE) : \
++ 0)
++
++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
++
++#define PREFERRED_RELOAD_CLASS(X, CLASS) \
++ ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS))
++
++/* 'S' matches immediates which are in small data
++ and therefore can be added to gp to create a
++ 32-bit value. */
++#define EXTRA_CONSTRAINT(VALUE, C) \
++ ((C) == 'S' \
++ && (GET_CODE (VALUE) == SYMBOL_REF) \
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE))
++
++
++
++
++/* Say that the epilogue uses the return address register. Note that
++ in the case of sibcalls, the values "used by the epilogue" are
++ considered live at the start of the called function. */
++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO)
++
++
++#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
++
++/**********************************
++ * Trampolines for Nested Functions
++ ***********************************/
++
++#define TRAMPOLINE_TEMPLATE(FILE) \
++ error ("trampolines not yet implemented")
++#define TRAMPOLINE_SIZE 20
++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
++ error ("trampolines not yet implemented")
++
++/***************************
++ * Stack Layout and Calling Conventions
++ ***************************/
++
++/* ------------------ *
++ * Basic Stack Layout
++ * ------------------ */
++
++/* The downward variants are used by the compiler,
++ the upward ones serve as documentation */
++#define STACK_GROWS_DOWNWARD
++#define FRAME_GROWS_UPWARD
++#define ARGS_GROW_UPWARD
++
++#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
++#define FIRST_PARM_OFFSET(FUNDECL) 0
++
++/* Before the prologue, RA lives in r31. */
++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO)
++
++/* -------------------------------------- *
++ * Registers That Address the Stack Frame
++ * -------------------------------------- */
++
++#define STACK_POINTER_REGNUM SP_REGNO
++#define STATIC_CHAIN_REGNUM SC_REGNO
++#define PC_REGNUM PC_REGNO
++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO
++
++/* Base register for access to local variables of the function. We
++ pretend that the frame pointer is a non-existent hard register, and
++ then eliminate it to HARD_FRAME_POINTER_REGNUM. */
++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO
++
++#define HARD_FRAME_POINTER_REGNUM FP_REGNO
++#define RETURN_ADDRESS_POINTER_REGNUM RAP_REGNO
++/* the argumnet pointer needs to always be eliminated
++ so it is set to a fake hard register. */
++#define ARG_POINTER_REGNUM FAKE_AP_REGNO
++
++/* ----------------------------------------- *
++ * Eliminating Frame Pointer and Arg Pointer
++ * ----------------------------------------- */
++
++#define FRAME_POINTER_REQUIRED 0
++
++#define ELIMINABLE_REGS \
++{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
++
++#define CAN_ELIMINATE(FROM, TO) 1
++
++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
++ (OFFSET) = nios2_initial_elimination_offset ((FROM), (TO))
++
++#define MUST_SAVE_REGISTER(regno) \
++ ((regs_ever_live[regno] && !call_used_regs[regno]) \
++ || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \
++ || (regno == RA_REGNO && regs_ever_live[RA_REGNO]))
++
++/* Treat LOC as a byte offset from the stack pointer and round it up
++ to the next fully-aligned offset. */
++#define STACK_ALIGN(LOC) \
++ (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & ~((PREFERRED_STACK_BOUNDARY / 8) - 1))
++
++
++/* ------------------------------ *
++ * Passing Arguments in Registers
++ * ------------------------------ */
++
++/* see nios2.c */
++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
++ (function_arg (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
++ (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
++
++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
++
++typedef struct nios2_args
++{
++ int regs_used;
++} CUMULATIVE_ARGS;
++
++/* This is to initialize the above unused CUM data type */
++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
++ (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS))
++
++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
++ (function_arg_advance (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_REGNO_P(REGNO) \
++ ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO)
++
++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
++ { \
++ int pret_size = nios2_setup_incoming_varargs (&(CUM), (MODE), \
++ (TYPE), (NO_RTL)); \
++ if (pret_size) \
++ (PRETEND_SIZE) = pret_size; \
++ }
++
++/* ----------------------------- *
++ * Generating Code for Profiling
++ * ----------------------------- */
++
++#define PROFILE_BEFORE_PROLOGUE
++
++#define FUNCTION_PROFILER(FILE, LABELNO) \
++ function_profiler ((FILE), (LABELNO))
++
++/* --------------------------------------- *
++ * Passing Function Arguments on the Stack
++ * --------------------------------------- */
++
++#define PROMOTE_PROTOTYPES 1
++
++#define PUSH_ARGS 0
++#define ACCUMULATE_OUTGOING_ARGS 1
++
++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0
++
++/* --------------------------------------- *
++ * How Scalar Function Values Are Returned
++ * --------------------------------------- */
++
++#define FUNCTION_VALUE(VALTYPE, FUNC) \
++ gen_rtx(REG, TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO)
++
++#define LIBCALL_VALUE(MODE) \
++ gen_rtx(REG, MODE, FIRST_RETVAL_REGNO)
++
++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO)
++
++/* ----------------------------- *
++ * How Large Values Are Returned
++ * ----------------------------- */
++
++
++#define RETURN_IN_MEMORY(TYPE) \
++ nios2_return_in_memory (TYPE)
++
++
++#define STRUCT_VALUE 0
++
++#define DEFAULT_PCC_STRUCT_RETURN 0
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++
++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
++
++#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
++
++#define MAX_REGS_PER_ADDRESS 1
++
++/* Go to ADDR if X is a valid address. */
++#ifndef REG_OK_STRICT
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 0)) \
++ goto ADDR; \
++ }
++#else
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 1)) \
++ goto ADDR; \
++ }
++#endif
++
++#ifndef REG_OK_STRICT
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 0)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0)
++#else
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)
++#endif
++
++#define LEGITIMATE_CONSTANT_P(X) 1
++
++/* Nios II has no mode dependent addresses. */
++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
++
++/* Set if this has a weak declaration */
++#define SYMBOL_FLAG_WEAK_DECL (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
++#define SYMBOL_REF_WEAK_DECL_P(RTX) \
++ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0)
++
++
++/* true if a symbol is both small and not weak. In this case, gp
++ relative access can be used */
++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \
++ (SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX))
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++#define SLOW_BYTE_ACCESS 1
++
++/* It is as good to call a constant function address as to call an address
++ kept in a register.
++ ??? Not true anymore really. Now that call cannot address full range
++ of memory callr may need to be used */
++
++#define NO_FUNCTION_CSE
++#define NO_RECURSIVE_FUNCTION_CSE
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* ------------------------------------------ *
++ * The Overall Framework of an Assembler File
++ * ------------------------------------------ */
++
++#define ASM_APP_ON "#APP\n"
++#define ASM_APP_OFF "#NO_APP\n"
++
++#define ASM_COMMENT_START "# "
++
++/* ------------------------------- *
++ * Output and Generation of Labels
++ * ------------------------------- */
++
++#define GLOBAL_ASM_OP "\t.global\t"
++
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++#define DWARF2_UNWIND_INFO 0
++
++
++/* -------------------------------- *
++ * Assembler Commands for Alignment
++ * -------------------------------- */
++
++#define ASM_OUTPUT_ALIGN(FILE, LOG) \
++ do { \
++ fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \
++ } while (0)
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++#define REGISTER_NAMES \
++{ \
++ "zero", \
++ "at", \
++ "r2", \
++ "r3", \
++ "r4", \
++ "r5", \
++ "r6", \
++ "r7", \
++ "r8", \
++ "r9", \
++ "r10", \
++ "r11", \
++ "r12", \
++ "r13", \
++ "r14", \
++ "r15", \
++ "r16", \
++ "r17", \
++ "r18", \
++ "r19", \
++ "r20", \
++ "r21", \
++ "r22", \
++ "r23", \
++ "r24", \
++ "r25", \
++ "gp", \
++ "sp", \
++ "fp", \
++ "ta", \
++ "ba", \
++ "ra", \
++ "status", \
++ "estatus", \
++ "bstatus", \
++ "ipri", \
++ "ecause", \
++ "pc", \
++ "rap", \
++ "fake_fp", \
++ "fake_ap", \
++}
++
++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\
++ (PTR) = asm_output_opcode (STREAM, PTR)
++
++#define PRINT_OPERAND(STREAM, X, CODE) \
++ nios2_print_operand (STREAM, X, CODE)
++
++#define PRINT_OPERAND_ADDRESS(STREAM, X) \
++ nios2_print_operand_address (STREAM, X)
++
++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
++ fprintf (FILE, ".L%u\n", (unsigned) (VALUE)); \
++ } while (0)
++
++
++/* ------------ *
++ * Label Output
++ * ------------ */
++
++
++/* ---------------------------------------------------- *
++ * Dividing the Output into Sections (Texts, Data, ...)
++ * ---------------------------------------------------- */
++
++/* Output before read-only data. */
++#define TEXT_SECTION_ASM_OP ("\t.section\t.text")
++
++/* Output before writable data. */
++#define DATA_SECTION_ASM_OP ("\t.section\t.data")
++
++
++/* Default the definition of "small data" to 8 bytes. */
++/* ??? How come I can't use HOST_WIDE_INT here? */
++extern unsigned long nios2_section_threshold;
++#define NIOS2_DEFAULT_GVALUE 8
++
++
++
++/* This says how to output assembler code to declare an
++ uninitialized external linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef COMMON_ASM_OP
++#define COMMON_ASM_OP "\t.comm\t"
++
++#undef ASM_OUTPUT_ALIGNED_COMMON
++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
++do \
++{ \
++ if ((SIZE) <= nios2_section_threshold) \
++ { \
++ named_section (0, ".sbss", 0); \
++ (*targetm.asm_out.globalize_label) (FILE, NAME); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++ } \
++ else \
++ { \
++ fprintf ((FILE), "%s", COMMON_ASM_OP); \
++ assemble_name ((FILE), (NAME)); \
++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
++ } \
++} \
++while (0)
++
++
++/* This says how to output assembler code to declare an
++ uninitialized internal linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef ASM_OUTPUT_ALIGNED_LOCAL
++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
++do { \
++ if ((SIZE) <= nios2_section_threshold) \
++ named_section (0, ".sbss", 0); \
++ else \
++ named_section (0, ".bss", 0); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++} while (0)
++
++
++
++/***************************
++ * Miscellaneous Parameters
++ ***************************/
++
++#define MOVE_MAX 4
++
++#define Pmode SImode
++#define FUNCTION_MODE QImode
++
++#define CASE_VECTOR_MODE Pmode
++
++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
++
++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND)
++
++#define WORD_REGISTER_OPERATIONS
+--- gcc-3.4.3/gcc/config/nios2/nios2.md
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.md
+@@ -0,0 +1,2078 @@
++;; Machine Description for Altera NIOS 2G NIOS2 version.
++;; Copyright (C) 2003 Altera
++;; Contributed by Jonah Graham (jgraham@altera.com).
++;;
++;; This file is part of GNU CC.
++;;
++;; GNU CC 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 2, or (at your option)
++;; any later version.
++;;
++;; GNU CC 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 GNU CC; see the file COPYING. If not, write to
++;; the Free Software Foundation, 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA. */
++
++
++
++;*****************************************************************************
++;*
++;* constants
++;*
++;*****************************************************************************
++(define_constants [
++ (GP_REGNO 26)
++ (SP_REGNO 27)
++ (FP_REGNO 28)
++ (RA_REGNO 31)
++ (RAP_REGNO 38)
++ (FIRST_RETVAL_REGNO 2)
++ (LAST_RETVAL_REGNO 3)
++ (FIRST_ARG_REGNO 4)
++ (LAST_ARG_REGNO 7)
++ (SC_REGNO 23)
++ (PC_REGNO 37)
++ (FAKE_FP_REGNO 39)
++ (FAKE_AP_REGNO 40)
++
++
++ (UNSPEC_BLOCKAGE 0)
++ (UNSPEC_LDBIO 1)
++ (UNSPEC_LDBUIO 2)
++ (UNSPEC_LDHIO 3)
++ (UNSPEC_LDHUIO 4)
++ (UNSPEC_LDWIO 5)
++ (UNSPEC_STBIO 6)
++ (UNSPEC_STHIO 7)
++ (UNSPEC_STWIO 8)
++ (UNSPEC_SYNC 9)
++ (UNSPEC_WRCTL 10)
++ (UNSPEC_RDCTL 11)
++
++])
++
++
++
++;*****************************************************************************
++;*
++;* instruction scheduler
++;*
++;*****************************************************************************
++
++; No schedule info is currently available, using an assumption that no
++; instruction can use the results of the previous instruction without
++; incuring a stall.
++
++; length of an instruction (in bytes)
++(define_attr "length" "" (const_int 4))
++(define_attr "type" "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" (const_string "complex"))
++
++(define_asm_attributes
++ [(set_attr "length" "4")
++ (set_attr "type" "complex")])
++
++(define_automaton "nios2")
++(automata_option "v")
++;(automata_option "no-minimization")
++(automata_option "ndfa")
++
++; The nios2 pipeline is fairly straightforward for the fast model.
++; Every alu operation is pipelined so that an instruction can
++; be issued every cycle. However, there are still potential
++; stalls which this description tries to deal with.
++
++(define_cpu_unit "cpu" "nios2")
++
++(define_insn_reservation "complex" 1
++ (eq_attr "type" "complex")
++ "cpu")
++
++(define_insn_reservation "control" 1
++ (eq_attr "type" "control")
++ "cpu")
++
++(define_insn_reservation "alu" 1
++ (eq_attr "type" "alu")
++ "cpu")
++
++(define_insn_reservation "cond_alu" 1
++ (eq_attr "type" "cond_alu")
++ "cpu")
++
++(define_insn_reservation "st" 1
++ (eq_attr "type" "st")
++ "cpu")
++
++(define_insn_reservation "custom" 1
++ (eq_attr "type" "custom")
++ "cpu")
++
++; shifts, muls and lds have three cycle latency
++(define_insn_reservation "ld" 3
++ (eq_attr "type" "ld")
++ "cpu")
++
++(define_insn_reservation "shift" 3
++ (eq_attr "type" "shift")
++ "cpu")
++
++(define_insn_reservation "mul" 3
++ (eq_attr "type" "mul")
++ "cpu")
++
++(define_insn_reservation "div" 1
++ (eq_attr "type" "div")
++ "cpu")
++
++
++;*****************************************************************************
++;*
++;* MOV Instructions
++;*
++;*****************************************************************************
++
++(define_expand "movqi"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "")
++ (match_operand:QI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, QImode))
++ DONE;
++})
++
++(define_insn "movqi_internal"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r")
++ (match_operand:QI 1 "general_operand" "rM,m,rM,I"))]
++ "(register_operand (operands[0], QImode)
++ || register_operand (operands[1], QImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stb%o0\\t%z1, %0
++ ldbu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu")])
++
++(define_insn "ldbio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldbuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stbio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)]
++ ""
++ "stbio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++(define_expand "movhi"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "")
++ (match_operand:HI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, HImode))
++ DONE;
++})
++
++(define_insn "movhi_internal"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r")
++ (match_operand:HI 1 "general_operand" "rM,m,rM,I,J"))]
++ "(register_operand (operands[0], HImode)
++ || register_operand (operands[1], HImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ sth%o0\\t%z1, %0
++ ldhu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu,alu")])
++
++(define_insn "ldhio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldhuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "sthio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)]
++ ""
++ "sthio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++(define_expand "movsi"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "")
++ (match_operand:SI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, SImode))
++ DONE;
++})
++
++(define_insn "movsi_internal"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r")
++ (match_operand:SI 1 "general_operand" "rM,m,rM,I,J,S,i"))]
++ "(register_operand (operands[0], SImode)
++ || register_operand (operands[1], SImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stw%o0\\t%z1, %0
++ ldw%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1
++ addi\\t%0, gp, %%gprel(%1)
++ movhi\\t%0, %H1\;addi\\t%0, %0, %L1"
++ [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")])
++
++(define_insn "ldwio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldwio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stwio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)]
++ ""
++ "stwio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++
++;*****************************************************************************
++;*
++;* zero extension
++;*
++;*****************************************************************************
++
++
++(define_insn "zero_extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xffff
++ ldhu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "=r,r")
++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++
++
++;*****************************************************************************
++;*
++;* sign extension
++;*
++;*****************************************************************************
++
++(define_expand "extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (16);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendhisi2_internal"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
++ ""
++ "ldh%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_expand "extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "")
++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op0 = gen_lowpart (SImode, operands[0]);
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (op0, temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqihi2_internal"
++ [(set (match_operand:HI 0 "register_operand" "=r")
++ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++(define_expand "extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqisi2_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++
++;*****************************************************************************
++;*
++;* Arithmetic Operations
++;*
++;*****************************************************************************
++
++(define_insn "addsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ ""
++ "add%i2\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "subsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++ "sub\\t%0, %z1, %2"
++ [(set_attr "type" "alu")])
++
++(define_insn "mulsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (mult:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ "TARGET_HAS_MUL"
++ "mul%i2\\t%0, %1, %z2"
++ [(set_attr "type" "mul")])
++
++(define_expand "divsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++{
++ if (!TARGET_HAS_DIV)
++ {
++ if (!TARGET_FAST_SW_DIV)
++ FAIL;
++ else
++ {
++ if (nios2_emit_expensive_div (operands, SImode))
++ DONE;
++ }
++ }
++})
++
++(define_insn "divsi3_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "div\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "udivsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (udiv:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "divu\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "smulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxss\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++(define_insn "umulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxuu\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++
++(define_expand "mulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
++ (sign_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++(define_expand "umulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
++ (zero_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++
++
++;*****************************************************************************
++;*
++;* Negate and ones complement
++;*
++;*****************************************************************************
++
++(define_insn "negsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (neg:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "sub\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++(define_insn "one_cmplsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (not:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "nor\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++
++
++; Logical Operantions
++
++(define_insn "andsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (and:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ and\\t%0, %1, %z2
++ and%i2\\t%0, %1, %2
++ andh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "iorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (ior:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ or\\t%0, %1, %z2
++ or%i2\\t%0, %1, %2
++ orh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "*norsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (and:SI (not:SI (match_operand:SI 1 "register_operand" "%r"))
++ (not:SI (match_operand:SI 2 "reg_or_0_operand" "rM"))))]
++ ""
++ "nor\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "xorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (xor:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ xor\\t%0, %1, %z2
++ xor%i2\\t%0, %1, %2
++ xorh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++
++
++;*****************************************************************************
++;*
++;* Shifts
++;*
++;*****************************************************************************
++
++(define_insn "ashlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashift:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sll%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "ashrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sra%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "lshrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "srl%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotate:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "rol%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotatert:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "register_operand" "r,r")))]
++ ""
++ "ror\\t%0, %1, %2"
++ [(set_attr "type" "shift")])
++
++(define_insn "*shift_mul_constants"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ashift:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "const_int_operand" "I"))
++ (match_operand:SI 3 "const_int_operand" "I")))]
++ "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))"
++{
++ HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]);
++ rtx ops[3];
++
++ ops[0] = operands[0];
++ ops[1] = operands[1];
++ ops[2] = GEN_INT (mul);
++
++ output_asm_insn ("muli\t%0, %1, %2", ops);
++ return "";
++}
++ [(set_attr "type" "mul")])
++
++
++
++
++;*****************************************************************************
++;*
++;* Prologue, Epilogue and Return
++;*
++;*****************************************************************************
++
++(define_expand "prologue"
++ [(const_int 1)]
++ ""
++{
++ expand_prologue ();
++ DONE;
++})
++
++(define_expand "epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (false);
++ DONE;
++})
++
++(define_expand "sibcall_epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (true);
++ DONE;
++})
++
++(define_insn "return"
++ [(return)]
++ "reload_completed && nios2_can_use_return_insn ()"
++ "ret\\t"
++)
++
++(define_insn "return_from_epilogue"
++ [(use (match_operand 0 "pmode_register_operand" ""))
++ (return)]
++ "reload_completed"
++ "ret\\t"
++)
++
++;; Block any insns from being moved before this point, since the
++;; profiling call to mcount can use various registers that aren't
++;; saved or used to pass arguments.
++
++(define_insn "blockage"
++ [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)]
++ ""
++ ""
++ [(set_attr "type" "unknown")
++ (set_attr "length" "0")])
++
++
++
++;*****************************************************************************
++;*
++;* Jumps and Calls
++;*
++;*****************************************************************************
++
++(define_insn "indirect_jump"
++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "jump"
++ [(set (pc)
++ (label_ref (match_operand 0 "" "")))]
++ ""
++ "br\\t%0"
++ [(set_attr "type" "control")])
++
++
++(define_insn "indirect_call"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "indirect_call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%1"
++)
++
++(define_expand "call"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_expand "call_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_insn "*call"
++ [(call (mem:QI (match_operand:SI 0 "immediate_operand" "i"))
++ (match_operand 1 "" ""))
++ (clobber (match_operand:SI 2 "register_operand" "=r"))]
++ ""
++ "call\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "*call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "immediate_operand" "i"))
++ (match_operand 2 "" "")))
++ (clobber (match_operand:SI 3 "register_operand" "=r"))]
++ ""
++ "call\\t%1"
++ [(set_attr "type" "control")])
++
++(define_expand "sibcall"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))])]
++ ""
++ {
++ XEXP (operands[0], 0) = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
++
++ if (operands[2] == NULL_RTX)
++ operands[2] = const0_rtx;
++ }
++)
++
++(define_expand "sibcall_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))])]
++ ""
++ {
++ XEXP (operands[1], 0) = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
++
++ if (operands[3] == NULL_RTX)
++ operands[3] = const0_rtx;
++ }
++)
++
++(define_insn "sibcall_insn"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))]
++ ""
++ "jmp\\t%0"
++)
++
++(define_insn "sibcall_value_insn"
++ [(set (match_operand 0 "register_operand" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))]
++ ""
++ "jmp\\t%1"
++)
++
++
++
++
++(define_expand "tablejump"
++ [(parallel [(set (pc) (match_operand 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))])]
++ ""
++ ""
++)
++
++(define_insn "*tablejump"
++ [(set (pc)
++ (match_operand:SI 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Comparisons
++;*
++;*****************************************************************************
++;; Flow here is rather complex (based on MIPS):
++;;
++;; 1) The cmp{si,di,sf,df} routine is called. It deposits the
++;; arguments into the branch_cmp array, and the type into
++;; branch_type. No RTL is generated.
++;;
++;; 2) The appropriate branch define_expand is called, which then
++;; creates the appropriate RTL for the comparison and branch.
++;; Different CC modes are used, based on what type of branch is
++;; done, so that we can constrain things appropriately. There
++;; are assumptions in the rest of GCC that break if we fold the
++;; operands into the branchs for integer operations, and use cc0
++;; for floating point, so we use the fp status register instead.
++;; If needed, an appropriate temporary is created to hold the
++;; of the integer compare.
++
++(define_expand "cmpsi"
++ [(set (cc0)
++ (compare:CC (match_operand:SI 0 "register_operand" "")
++ (match_operand:SI 1 "arith_operand" "")))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = operands[1];
++ branch_type = CMP_SI;
++ DONE;
++})
++
++(define_expand "tstsi"
++ [(set (cc0)
++ (match_operand:SI 0 "register_operand" ""))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = const0_rtx;
++ branch_type = CMP_SI;
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* setting a register from a comparison
++;*
++;*****************************************************************************
++
++(define_expand "seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpeq%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpne%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmplt\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpge%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpge\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmplt%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpltu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpgeu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpgeu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpltu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++
++
++;*****************************************************************************
++;*
++;* branches
++;*
++;*****************************************************************************
++
++(define_insn "*cbranch"
++ [(set (pc)
++ (if_then_else
++ (match_operator:SI 0 "comparison_operator"
++ [(match_operand:SI 2 "reg_or_0_operand" "rM")
++ (match_operand:SI 3 "reg_or_0_operand" "rM")])
++ (label_ref (match_operand 1 "" ""))
++ (pc)))]
++ ""
++ "b%0\\t%z2, %z3, %l1"
++ [(set_attr "type" "control")])
++
++
++(define_expand "beq"
++ [(set (pc)
++ (if_then_else (eq:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bne"
++ [(set (pc)
++ (if_then_else (ne:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgt"
++ [(set (pc)
++ (if_then_else (gt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bge"
++ [(set (pc)
++ (if_then_else (ge:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "ble"
++ [(set (pc)
++ (if_then_else (le:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "blt"
++ [(set (pc)
++ (if_then_else (lt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgtu"
++ [(set (pc)
++ (if_then_else (gtu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bgeu"
++ [(set (pc)
++ (if_then_else (geu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bleu"
++ [(set (pc)
++ (if_then_else (leu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bltu"
++ [(set (pc)
++ (if_then_else (ltu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* String and Block Operations
++;*
++;*****************************************************************************
++
++; ??? This is all really a hack to get Dhrystone to work as fast as possible
++; things to be fixed:
++; * let the compiler core handle all of this, for that to work the extra
++; aliasing needs to be addressed.
++; * we use three temporary registers for loading and storing to ensure no
++; ld use stalls, this is excessive, because after the first ld/st only
++; two are needed. Only two would be needed all the way through if
++; we could schedule with other code. Consider:
++; 1 ld $1, 0($src)
++; 2 ld $2, 4($src)
++; 3 ld $3, 8($src)
++; 4 st $1, 0($dest)
++; 5 ld $1, 12($src)
++; 6 st $2, 4($src)
++; 7 etc.
++; The first store has to wait until 4. If it does not there will be one
++; cycle of stalling. However, if any other instruction could be placed
++; between 1 and 4, $3 would not be needed.
++; * In small we probably don't want to ever do this ourself because there
++; is no ld use stall.
++
++(define_expand "movstrsi"
++ [(parallel [(set (match_operand:BLK 0 "general_operand" "")
++ (match_operand:BLK 1 "general_operand" ""))
++ (use (match_operand:SI 2 "const_int_operand" ""))
++ (use (match_operand:SI 3 "const_int_operand" ""))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))])]
++ "TARGET_INLINE_MEMCPY"
++{
++ rtx ld_addr_reg, st_addr_reg;
++
++ /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr
++ it trys to copy to a register, but does not re-try the predicate.
++ ??? Intead of fixing expr.c, I fix it here. */
++ if (!const_int_operand (operands[2], SImode))
++ FAIL;
++
++ /* ??? there are some magic numbers which need to be sorted out here.
++ the basis for them is not increasing code size hugely or going
++ out of range of offset addressing */
++ if (INTVAL (operands[3]) < 4)
++ FAIL;
++ if (!optimize
++ || (optimize_size && INTVAL (operands[2]) > 12)
++ || (optimize < 3 && INTVAL (operands[2]) > 100)
++ || INTVAL (operands[2]) > 200)
++ FAIL;
++
++ st_addr_reg
++ = replace_equiv_address (operands[0],
++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
++ ld_addr_reg
++ = replace_equiv_address (operands[1],
++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
++ emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg,
++ operands[2], operands[3]));
++
++ DONE;
++})
++
++
++(define_insn "movstrsi_internal"
++ [(set (match_operand:BLK 0 "memory_operand" "=o")
++ (match_operand:BLK 1 "memory_operand" "o"))
++ (use (match_operand:SI 2 "const_int_operand" "i"))
++ (use (match_operand:SI 3 "const_int_operand" "i"))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))]
++ "TARGET_INLINE_MEMCPY"
++{
++ int ld_offset = INTVAL (operands[2]);
++ int ld_len = INTVAL (operands[2]);
++ int ld_reg = 0;
++ rtx ld_addr_reg = XEXP (operands[1], 0);
++ int st_offset = INTVAL (operands[2]);
++ int st_len = INTVAL (operands[2]);
++ int st_reg = 0;
++ rtx st_addr_reg = XEXP (operands[0], 0);
++ int delay_count = 0;
++
++ /* ops[0] is the address used by the insn
++ ops[1] is the register being loaded or stored */
++ rtx ops[2];
++
++ if (INTVAL (operands[3]) < 4)
++ abort ();
++
++ while (ld_offset >= 4)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldw\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 4;
++ delay_count++;
++ }
++
++ if (ld_offset >= 2)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldh\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 2;
++ delay_count++;
++ }
++
++ if (ld_offset >= 1)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldb\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 1;
++ delay_count++;
++ }
++
++ while (st_offset >= 4)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ while (st_offset >= 2)
++ {
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("sth\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 2;
++ }
++
++ while (st_offset >= 1)
++ {
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stb\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 1;
++ }
++
++ return "";
++}
++; ??? lengths are not being used yet, but I will probably forget
++; to update this once I am using lengths, so set it to something
++; definetely big enough to cover it. 400 allows for 200 bytes
++; of motion.
++ [(set_attr "length" "400")])
++
++
++
++;*****************************************************************************
++;*
++;* Custom instructions
++;*
++;*****************************************************************************
++
++(define_constants [
++ (CUSTOM_N 100)
++ (CUSTOM_NI 101)
++ (CUSTOM_NF 102)
++ (CUSTOM_NP 103)
++ (CUSTOM_NII 104)
++ (CUSTOM_NIF 105)
++ (CUSTOM_NIP 106)
++ (CUSTOM_NFI 107)
++ (CUSTOM_NFF 108)
++ (CUSTOM_NFP 109)
++ (CUSTOM_NPI 110)
++ (CUSTOM_NPF 111)
++ (CUSTOM_NPP 112)
++ (CUSTOM_IN 113)
++ (CUSTOM_INI 114)
++ (CUSTOM_INF 115)
++ (CUSTOM_INP 116)
++ (CUSTOM_INII 117)
++ (CUSTOM_INIF 118)
++ (CUSTOM_INIP 119)
++ (CUSTOM_INFI 120)
++ (CUSTOM_INFF 121)
++ (CUSTOM_INFP 122)
++ (CUSTOM_INPI 123)
++ (CUSTOM_INPF 124)
++ (CUSTOM_INPP 125)
++ (CUSTOM_FN 126)
++ (CUSTOM_FNI 127)
++ (CUSTOM_FNF 128)
++ (CUSTOM_FNP 129)
++ (CUSTOM_FNII 130)
++ (CUSTOM_FNIF 131)
++ (CUSTOM_FNIP 132)
++ (CUSTOM_FNFI 133)
++ (CUSTOM_FNFF 134)
++ (CUSTOM_FNFP 135)
++ (CUSTOM_FNPI 136)
++ (CUSTOM_FNPF 137)
++ (CUSTOM_FNPP 138)
++ (CUSTOM_PN 139)
++ (CUSTOM_PNI 140)
++ (CUSTOM_PNF 141)
++ (CUSTOM_PNP 142)
++ (CUSTOM_PNII 143)
++ (CUSTOM_PNIF 144)
++ (CUSTOM_PNIP 145)
++ (CUSTOM_PNFI 146)
++ (CUSTOM_PNFF 147)
++ (CUSTOM_PNFP 148)
++ (CUSTOM_PNPI 149)
++ (CUSTOM_PNPF 150)
++ (CUSTOM_PNPP 151)
++])
++
++
++(define_insn "custom_n"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)]
++ ""
++ "custom\\t%0, zero, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ni"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NI)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")] CUSTOM_NF)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_np"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NP)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nii"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NII)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nif"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NIF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nip"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NIP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nff"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NFF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NPF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_in"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_IN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ini"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_INF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++(define_insn "custom_fn"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_FN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fni"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_FNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnii"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnif"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnip"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnff"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_pn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_PN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pni"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_PNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++
++;*****************************************************************************
++;*
++;* Misc
++;*
++;*****************************************************************************
++
++(define_insn "nop"
++ [(const_int 0)]
++ ""
++ "nop\\t"
++ [(set_attr "type" "alu")])
++
++(define_insn "sync"
++ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
++ ""
++ "sync\\t"
++ [(set_attr "type" "control")])
++
++
++(define_insn "rdctl"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] UNSPEC_RDCTL))]
++ ""
++ "rdctl\\t%0, ctl%1"
++ [(set_attr "type" "control")])
++
++(define_insn "wrctl"
++ [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand" "O")
++ (match_operand:SI 1 "register_operand" "r")] UNSPEC_WRCTL)]
++ ""
++ "wrctl\\tctl%0, %1"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Peepholes
++;*
++;*****************************************************************************
++
++
+--- gcc-3.4.3/gcc/config/nios2/t-nios2
++++ gcc-3.4.3-nios2/gcc/config/nios2/t-nios2
+@@ -0,0 +1,123 @@
++##
++## Compiler flags to use when compiling libgcc2.c.
++##
++## LIB2FUNCS_EXTRA
++## A list of source file names to be compiled or assembled and inserted into libgcc.a.
++
++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \
++ $(srcdir)/config/nios2/lib2-divmod-hi.c \
++ $(srcdir)/config/nios2/lib2-divtable.c \
++ $(srcdir)/config/nios2/lib2-mul.c
++
++##
++## Floating Point Emulation
++## To have GCC include software floating point libraries in libgcc.a define FPBIT
++## and DPBIT along with a few rules as follows:
++##
++## # We want fine grained libraries, so use the new code
++## # to build the floating point emulation libraries.
++FPBIT=$(srcdir)/config/nios2/nios2-fp-bit.c
++DPBIT=$(srcdir)/config/nios2/nios2-dp-bit.c
++
++TARGET_LIBGCC2_CFLAGS = -O2
++
++# FLOAT_ONLY - no doubles
++# SMALL_MACHINE - QI/HI is faster than SI
++# Actually SMALL_MACHINE uses chars and shorts instead of ints
++# since ints (16-bit ones as they are today) are at least as fast
++# as chars and shorts, don't define SMALL_MACHINE
++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code )
++
++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '#define FLOAT' > ${FPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${FPBIT}
++
++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '' > ${DPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${DPBIT}
++
++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
++
++# Assemble startup files.
++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm
++
++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm
++
++
++## You may need to provide additional #defines at the beginning of
++## fp-bit.c and dp-bit.c to control target endianness and other options
++##
++## CRTSTUFF_T_CFLAGS
++## Special flags used when compiling crtstuff.c. See Initialization.
++##
++## CRTSTUFF_T_CFLAGS_S
++## Special flags used when compiling crtstuff.c for shared linking. Used
++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization.
++##
++## MULTILIB_OPTIONS
++## For some targets, invoking GCC in different ways produces objects that
++## can not be linked together. For example, for some targets GCC produces
++## both big and little endian code. For these targets, you must arrange
++## for multiple versions of libgcc.a to be compiled, one for each set of
++## incompatible options. When GCC invokes the linker, it arranges to link
++## in the right version of libgcc.a, based on the command line options
++## used.
++## The MULTILIB_OPTIONS macro lists the set of options for which special
++## versions of libgcc.a must be built. Write options that are mutually
++## incompatible side by side, separated by a slash. Write options that may
++## be used together separated by a space. The build procedure will build
++## all combinations of compatible options.
++##
++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float,
++## Makefile will build special versions of libgcc.a using the following
++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float,
++## and -m68020 -msoft-float.
++
++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx
++
++## MULTILIB_DIRNAMES
++## If MULTILIB_OPTIONS is used, this variable specifies the directory names
++## that should be used to hold the various libraries. Write one element in
++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If
++## MULTILIB_DIRNAMES is not used, the default value will be
++## MULTILIB_OPTIONS, with all slashes treated as spaces.
++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float,
++## then the default value of MULTILIB_DIRNAMES is m68000 m68020
++## msoft-float. You may specify a different value if you desire a
++## different set of directory names.
++
++# MULTILIB_DIRNAMES =
++
++## MULTILIB_MATCHES
++## Sometimes the same option may be written in two different ways. If an
++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any
++## synonyms. In that case, set MULTILIB_MATCHES to a list of items of the
++## form option=option to describe all relevant synonyms. For example,
++## m68000=mc68000 m68020=mc68020.
++##
++## MULTILIB_EXCEPTIONS
++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being
++## specified, there are combinations that should not be built. In that
++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in
++## shell case syntax that should not be built.
++## For example, in the PowerPC embedded ABI support, it is not desirable to
++## build libraries compiled with the -mcall-aix option and either of the
++## -fleading-underscore or -mlittle options at the same time. Therefore
++## MULTILIB_EXCEPTIONS is set to
++##
++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
++##
++
++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx*
++
++##
++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building
++## multiple versions of libgcc.a certain options should always be passed on
++## to the compiler. In that case, set MULTILIB_EXTRA_OPTS to be the list
++## of options to be used for all builds.
++##
++
+--- gcc-3.4.3/gcc/config.gcc
++++ gcc-3.4.3-nios2/gcc/config.gcc
+@@ -1321,6 +1321,10 @@ m32rle-*-linux*)
+ thread_file='posix'
+ fi
+ ;;
++# JBG
++nios2-*-* | nios2-*-*)
++ tm_file="elfos.h ${tm_file}"
++ ;;
+ # m68hc11 and m68hc12 share the same machine description.
+ m68hc11-*-*|m6811-*-*)
+ tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
+--- gcc-3.4.3/gcc/cse.c
++++ gcc-3.4.3-nios2/gcc/cse.c
+@@ -3134,6 +3134,10 @@ find_comparison_args (enum rtx_code code
+ #ifdef FLOAT_STORE_FLAG_VALUE
+ REAL_VALUE_TYPE fsfv;
+ #endif
++#ifdef __nios2__
++ if (p->is_const)
++ break;
++#endif
+
+ /* If the entry isn't valid, skip it. */
+ if (! exp_equiv_p (p->exp, p->exp, 1, 0))
+--- gcc-3.4.3/gcc/doc/extend.texi
++++ gcc-3.4.3-nios2/gcc/doc/extend.texi
+@@ -5636,12 +5636,118 @@ to those machines. Generally these gene
+ instructions, but allow the compiler to schedule those calls.
+
+ @menu
++* Altera Nios II Built-in Functions::
+ * Alpha Built-in Functions::
+ * ARM Built-in Functions::
+ * X86 Built-in Functions::
+ * PowerPC AltiVec Built-in Functions::
+ @end menu
+
++@node Altera Nios II Built-in Functions
++@subsection Altera Nios II Built-in Functions
++
++These built-in functions are available for the Altera Nios II
++family of processors.
++
++The following built-in functions are always available. They
++all generate the machine instruction that is part of the name.
++
++@example
++int __builtin_ldbio (volatile const void *)
++int __builtin_ldbuio (volatile const void *)
++int __builtin_ldhio (volatile const void *)
++int __builtin_ldhuio (volatile const void *)
++int __builtin_ldwio (volatile const void *)
++void __builtin_stbio (volatile void *, int)
++void __builtin_sthio (volatile void *, int)
++void __builtin_stwio (volatile void *, int)
++void __builtin_sync (void)
++int __builtin_rdctl (int)
++void __builtin_wrctl (int, int)
++@end example
++
++The following built-in functions are always available. They
++all generate a Nios II Custom Instruction. The name of the
++function represents the types that the function takes and
++returns. The letter before the @code{n} is the return type
++or void if absent. The @code{n} represnts the first parameter
++to all the custom instructions, the custom instruction number.
++The two letters after the @code{n} represent the up to two
++parameters to the function.
++
++The letters reprsent the following data types:
++@table @code
++@item <no letter>
++@code{void} for return type and no parameter for parameter types.
++
++@item i
++@code{int} for return type and parameter type
++
++@item f
++@code{float} for return type and parameter type
++
++@item p
++@code{void *} for return type and parameter type
++
++@end table
++
++And the function names are:
++@example
++void __builtin_custom_n (void)
++void __builtin_custom_ni (int)
++void __builtin_custom_nf (float)
++void __builtin_custom_np (void *)
++void __builtin_custom_nii (int, int)
++void __builtin_custom_nif (int, float)
++void __builtin_custom_nip (int, void *)
++void __builtin_custom_nfi (float, int)
++void __builtin_custom_nff (float, float)
++void __builtin_custom_nfp (float, void *)
++void __builtin_custom_npi (void *, int)
++void __builtin_custom_npf (void *, float)
++void __builtin_custom_npp (void *, void *)
++int __builtin_custom_in (void)
++int __builtin_custom_ini (int)
++int __builtin_custom_inf (float)
++int __builtin_custom_inp (void *)
++int __builtin_custom_inii (int, int)
++int __builtin_custom_inif (int, float)
++int __builtin_custom_inip (int, void *)
++int __builtin_custom_infi (float, int)
++int __builtin_custom_inff (float, float)
++int __builtin_custom_infp (float, void *)
++int __builtin_custom_inpi (void *, int)
++int __builtin_custom_inpf (void *, float)
++int __builtin_custom_inpp (void *, void *)
++float __builtin_custom_fn (void)
++float __builtin_custom_fni (int)
++float __builtin_custom_fnf (float)
++float __builtin_custom_fnp (void *)
++float __builtin_custom_fnii (int, int)
++float __builtin_custom_fnif (int, float)
++float __builtin_custom_fnip (int, void *)
++float __builtin_custom_fnfi (float, int)
++float __builtin_custom_fnff (float, float)
++float __builtin_custom_fnfp (float, void *)
++float __builtin_custom_fnpi (void *, int)
++float __builtin_custom_fnpf (void *, float)
++float __builtin_custom_fnpp (void *, void *)
++void * __builtin_custom_pn (void)
++void * __builtin_custom_pni (int)
++void * __builtin_custom_pnf (float)
++void * __builtin_custom_pnp (void *)
++void * __builtin_custom_pnii (int, int)
++void * __builtin_custom_pnif (int, float)
++void * __builtin_custom_pnip (int, void *)
++void * __builtin_custom_pnfi (float, int)
++void * __builtin_custom_pnff (float, float)
++void * __builtin_custom_pnfp (float, void *)
++void * __builtin_custom_pnpi (void *, int)
++void * __builtin_custom_pnpf (void *, float)
++void * __builtin_custom_pnpp (void *, void *)
++@end example
++
++
+ @node Alpha Built-in Functions
+ @subsection Alpha Built-in Functions
+
+--- gcc-3.4.3/gcc/doc/invoke.texi
++++ gcc-3.4.3-nios2/gcc/doc/invoke.texi
+@@ -337,6 +337,14 @@ in the following sections.
+ @item Machine Dependent Options
+ @xref{Submodel Options,,Hardware Models and Configurations}.
+
++@emph{Altera Nios II Options}
++@gccoptlist{-msmallc -mno-bypass-cache -mbypass-cache @gol
++-mno-cache-volatile -mcache-volatile -mno-inline-memcpy @gol
++-minline-memcpy -mno-fast-sw-div -mfast-sw-div @gol
++-mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx @gol
++-mno-hw-div -mhw-div @gol
++-msys-crt0= -msys-lib= -msys=nosys }
++
+ @emph{M680x0 Options}
+ @gccoptlist{-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
+ -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 @gol
+@@ -5836,6 +5844,7 @@ machine description. The default for th
+ that macro, which enables you to change the defaults.
+
+ @menu
++* Altera Nios II Options::
+ * M680x0 Options::
+ * M68hc1x Options::
+ * VAX Options::
+@@ -5871,6 +5880,103 @@ that macro, which enables you to change
+ * FRV Options::
+ @end menu
+
++
++@node Altera Nios II Options
++@subsection Altera Nios II Options
++@cindex Altera Nios II options
++
++These are the @samp{-m} options defined for the Altera Nios II
++processor.
++
++@table @gcctabopt
++
++@item -msmallc
++@opindex msmallc
++
++Link with a limited version of the C library, -lsmallc. For more
++information see the C Library Documentation.
++
++
++@item -mbypass-cache
++@itemx -mno-bypass-cache
++@opindex mno-bypass-cache
++@opindex mbypass-cache
++
++Force all load and store instructions to always bypass cache by
++using io variants of the instructions. The default is to not
++bypass the cache.
++
++@item -mno-cache-volatile
++@itemx -mcache-volatile
++@opindex mcache-volatile
++@opindex mno-cache-volatile
++
++Volatile memory access bypass the cache using the io variants of
++the ld and st instructions. The default is to cache volatile
++accesses.
++
++-mno-cache-volatile is deprecated and will be deleted in a
++future GCC release.
++
++
++@item -mno-inline-memcpy
++@itemx -minline-memcpy
++@opindex mno-inline-memcpy
++@opindex minline-memcpy
++
++Do not inline memcpy. The default is to inline when -O is on.
++
++
++@item -mno-fast-sw-div
++@itemx -mfast-sw-div
++@opindex mno-fast-sw-div
++@opindex mfast-sw-div
++
++Do no use table based fast divide for small numbers. The default
++is to use the fast divide at -O3 and above.
++
++
++@item -mno-hw-mul
++@itemx -mhw-mul
++@itemx -mno-hw-mulx
++@itemx -mhw-mulx
++@itemx -mno-hw-div
++@itemx -mhw-div
++@opindex mno-hw-mul
++@opindex mhw-mul
++@opindex mno-hw-mulx
++@opindex mhw-mulx
++@opindex mno-hw-div
++@opindex mhw-div
++
++Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of
++instructions by the compiler. The default is to emit @code{mul}
++and not emit @code{div} and @code{mulx}.
++
++The different combinations of @code{mul} and @code{mulx} instructions
++generate a different multilib options.
++
++
++@item -msys-crt0=@var{startfile}
++@opindex msys-crt0
++
++@var{startfile} is the file name of the startfile (crt0) to use
++when linking. The default is crt0.o that comes with libgloss
++and is only suitable for use with the instruction set
++simulator.
++
++@item -msys-lib=@var{systemlib}
++@itemx -msys-lib=nosys
++@opindex msys-lib
++
++@var{systemlib} is the library name of the library which provides
++the system calls required by the C library, e.g. @code{read}, @code{write}
++etc. The default is to use nosys, this library provides
++stub implementations of the calls and is part of libgloss.
++
++@end table
++
++
+ @node M680x0 Options
+ @subsection M680x0 Options
+ @cindex M680x0 options
+--- gcc-3.4.3/gcc/doc/md.texi
++++ gcc-3.4.3-nios2/gcc/doc/md.texi
+@@ -1335,6 +1335,49 @@ However, here is a summary of the machin
+ available on some particular machines.
+
+ @table @emph
++
++@item Altera Nios II family---@file{nios2.h}
++@table @code
++
++@item I
++Integer that is valid as an immediate operand in an
++instruction taking a signed 16-bit number. Range
++@minus{}32768 to 32767.
++
++@item J
++Integer that is valid as an immediate operand in an
++instruction taking an unsigned 16-bit number. Range
++0 to 65535.
++
++@item K
++Integer that is valid as an immediate operand in an
++instruction taking only the upper 16-bits of a
++32-bit number. Range 32-bit numbers with the lower
++16-bits being 0.
++
++@item L
++Integer that is valid as an immediate operand for a
++shift instruction. Range 0 to 31.
++
++
++@item M
++Integer that is valid as an immediate operand for
++only the value 0. Can be used in conjunction with
++the format modifier @code{z} to use @code{r0}
++instead of @code{0} in the assembly output.
++
++@item N
++Integer that is valid as an immediate operand for
++a custom instruction opcode. Range 0 to 255.
++
++@item S
++Matches immediates which are addresses in the small
++data section and therefore can be added to @code{gp}
++as a 16-bit immediate to re-create their 32-bit value.
++
++@end table
++
++
+ @item ARM family---@file{arm.h}
+ @table @code
+ @item f
diff --git a/misc/buildroot/toolchain/gcc/3.4.2/arm-softfloat.patch.conditional b/misc/buildroot/toolchain/gcc/3.4.2/arm-softfloat.patch.conditional
new file mode 100644
index 000000000..19d1b90da
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.2/arm-softfloat.patch.conditional
@@ -0,0 +1,270 @@
+Note... modified my mjn3 to not conflict with the big endian arm patch.
+Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
+Also changed
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{!mcpu=*:-mcpu=xscale} \
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+to
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+in gcc/config/arm/linux-elf.h.
+#
+# Submitted:
+#
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# Description:
+#
+# Nicholas Pitre released this patch for gcc soft-float support here:
+# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
+#
+# This version has been adapted to work with gcc 3.4.0.
+#
+# The original patch doesn't distinguish between softfpa and softvfp modes
+# in the way Nicholas Pitre probably meant. His description is:
+#
+# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
+# floats can be achieved with -mhard-float or with the configure
+# --with-float=hard option. If -msoft-float or --with-float=soft is used then
+# software float support will be used just like the default but with the legacy
+# big endian word ordering for double float representation instead."
+#
+# Which means the following:
+#
+# * If you compile without -mhard-float or -msoft-float, you should get
+# software floating point, using the VFP format. The produced object file
+# should have these flags in its header:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# * If you compile with -mhard-float, you should get hardware floating point,
+# which always uses the FPA format. Object file header flags should be:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# * If you compile with -msoft-float, you should get software floating point,
+# using the FPA format. This is done for compatibility reasons with many
+# existing distributions. Object file header flags should be:
+#
+# private flags = 200: [APCS-32] [FPA float format] [software FP]
+#
+# The original patch from Nicholas Pitre contained the following constructs:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
+#
+# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
+# is probably the reason Robert Schwebel modified it to:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
+#
+# But this causes the following behaviour:
+#
+# * If you compile without -mhard-float or -msoft-float, the compiler generates
+# software floating point instructions, but *nothing* is passed to the
+# assembler, which results in an object file which has flags:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# This is not correct!
+#
+# * If you compile with -mhard-float, the compiler generates hardware floating
+# point instructions, and passes "-mfpu=fpa" to the assembler, which results
+# in an object file which has the same flags as in the previous item, but now
+# those *are* correct.
+#
+# * If you compile with -msoft-float, the compiler generates software floating
+# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
+# order) to the assembler, which results in an object file with flags:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# This is not correct, because the last "-mfpu=" option on the assembler
+# command line determines the actual FPU convention used (which should be FPA
+# in this case).
+#
+# Therefore, I modified this patch to get the desired behaviour. Every
+# instance of the notation:
+#
+# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
+#
+# was changed to:
+#
+# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
+#
+# I also did the following:
+#
+# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
+# be consistent with Nicholas' original patch.
+# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
+# macros I could find. I think that if you compile without any options, you
+# would like to get the defaults. :)
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+
+diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
+--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
+@@ -31,11 +31,16 @@
+ #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
+ #endif
+
+ /* This is COFF, but prefer stabs. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
+--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -46,7 +46,9 @@
+
+ #ifndef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
++%{mapcs-float:-mfloat} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+ #endif
+
+ #ifndef ASM_SPEC
+@@ -106,12 +108,17 @@
+ #endif
+
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
+ #endif
+
+ #define TARGET_ASM_FILE_START_APP_OFF true
+diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
+@@ -44,12 +44,26 @@
+ #define TARGET_LINKER_EMULATION "armelf_linux"
+ #endif
+
+-/* Default is to use APCS-32 mode. */
++/*
++ * Default is to use APCS-32 mode with soft-vfp.
++ * The old Linux default for floats can be achieved with -mhard-float
++ * or with the configure --with-float=hard option.
++ * If -msoft-float or --with-float=soft is used then software float
++ * support will be used just like the default but with the legacy
++ * big endian word ordering for double float representation instead.
++ */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT \
+- ( ARM_FLAG_APCS_32 | \
+- ARM_FLAG_MMU_TRAPS | \
+- TARGET_ENDIAN_DEFAULT )
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 \
++ | ARM_FLAG_SOFT_FLOAT \
++ | TARGET_ENDIAN_DEFAULT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_MMU_TRAPS )
++
++#undef SUBTARGET_EXTRA_ASM_SPEC
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+@@ -57,7 +71,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -72,7 +86,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
+--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -30,7 +30,12 @@
+
+ /* Default to using APCS-32 and software floating point. */
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ /* Now we define the strings used to build the spec file. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -49,11 +49,12 @@
+ endian, regardless of the endian-ness of the memory
+ system. */
+
+-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+- %{mhard-float:-mfpu=fpa} \
+- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{!mcpu=*:-mcpu=xscale} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
++ { "mlittle-endian", "mno-thumb-interwork", "marm" }
+ #endif
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/3.4.3/300-libstdc++-pic.patch
new file mode 100644
index 000000000..9f304a4c4
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/300-libstdc++-pic.patch
@@ -0,0 +1,47 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -224,6 +224,10 @@
+ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCPP_BUILD_DEBUG
+ all-local: build_debug
+
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -585,7 +585,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -618,6 +618,7 @@
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
++ install-exec-local \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+@@ -707,6 +708,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/3.4.3/600-gcc34-arm-ldm-peephole.patch b/misc/buildroot/toolchain/gcc/3.4.3/600-gcc34-arm-ldm-peephole.patch
new file mode 100644
index 000000000..fb317e153
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/600-gcc34-arm-ldm-peephole.patch
@@ -0,0 +1,79 @@
+--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
+@@ -8810,13 +8810,16 @@
+ (set_attr "length" "4,8,8")]
+ )
+
++; Try to convert LDR+LDR+arith into [add+]LDM+arith
++; On XScale, LDM is always slower than two LDRs, so only do this if
++; optimising for size.
+ (define_insn "*arith_adjacentmem"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (match_operator:SI 1 "shiftable_operator"
+ [(match_operand:SI 2 "memory_operand" "m")
+ (match_operand:SI 3 "memory_operand" "m")]))
+ (clobber (match_scratch:SI 4 "=r"))]
+- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
++ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
+ "*
+ {
+ rtx ldm[3];
+@@ -8851,6 +8854,8 @@
+ }
+ if (val1 && val2)
+ {
++ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
++ will prevent it from happening. */
+ rtx ops[3];
+ ldm[0] = ops[0] = operands[4];
+ ops[1] = XEXP (XEXP (operands[2], 0), 0);
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
+@@ -4593,8 +4593,11 @@
+ arith_adjacentmem pattern to output an overlong sequence. */
+ if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
+ return 0;
+-
+- return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
++
++ /* For Harvard cores, only accept pairs where one offset is zero.
++ See comment in load_multiple_sequence. */
++ return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4)
++ && (!arm_ld_sched || val0 == 0 || val1 == 0);
+ }
+ return 0;
+ }
+@@ -4838,6 +4841,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* ldmia */
+
+@@ -5064,6 +5072,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* stmia */
+
+--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
++++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
+@@ -381,6 +381,7 @@
+ printf ("#include \"recog.h\"\n");
+ printf ("#include \"except.h\"\n\n");
+ printf ("#include \"function.h\"\n\n");
++ printf ("#include \"flags.h\"\n\n");
+
+ printf ("#ifdef HAVE_peephole\n");
+ printf ("extern rtx peep_operand[];\n\n");
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/601-gcc34-arm-ldm.patch b/misc/buildroot/toolchain/gcc/3.4.3/601-gcc34-arm-ldm.patch
new file mode 100644
index 000000000..142052fdf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/601-gcc34-arm-ldm.patch
@@ -0,0 +1,119 @@
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
+@@ -8520,6 +8520,26 @@
+ return_used_this_function = 0;
+ }
+
++/* Return the number (counting from 0) of
++ the least significant set bit in MASK. */
++
++#ifdef __GNUC__
++inline
++#endif
++static int
++number_of_first_bit_set (mask)
++ int mask;
++{
++ int bit;
++
++ for (bit = 0;
++ (mask & (1 << bit)) == 0;
++ ++bit)
++ continue;
++
++ return bit;
++}
++
+ const char *
+ arm_output_epilogue (rtx sibling)
+ {
+@@ -8753,27 +8773,47 @@
+ saved_regs_mask |= (1 << PC_REGNUM);
+ }
+
+- /* Load the registers off the stack. If we only have one register
+- to load use the LDR instruction - it is faster. */
+- if (saved_regs_mask == (1 << LR_REGNUM))
+- {
+- /* The exception handler ignores the LR, so we do
+- not really need to load it off the stack. */
+- if (eh_ofs)
+- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+- else
+- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
+- }
+- else if (saved_regs_mask)
++ if (saved_regs_mask)
+ {
+- if (saved_regs_mask & (1 << SP_REGNUM))
+- /* Note - write back to the stack register is not enabled
+- (ie "ldmfd sp!..."). We know that the stack pointer is
+- in the list of registers and if we add writeback the
+- instruction becomes UNPREDICTABLE. */
+- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ /* Load the registers off the stack. If we only have one register
++ to load use the LDR instruction - it is faster. */
++ if (bit_count (saved_regs_mask) == 1)
++ {
++ int reg = number_of_first_bit_set (saved_regs_mask);
++
++ switch (reg)
++ {
++ case SP_REGNUM:
++ /* Mustn't use base writeback when loading SP. */
++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
++ break;
++
++ case LR_REGNUM:
++ if (eh_ofs)
++ {
++ /* The exception handler ignores the LR, so we do
++ not really need to load it off the stack. */
++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
++ break;
++ }
++ /* else fall through */
++
++ default:
++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
++ break;
++ }
++ }
+ else
+- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ {
++ if (saved_regs_mask & (1 << SP_REGNUM))
++ /* Note - write back to the stack register is not enabled
++ (ie "ldmfd sp!..."). We know that the stack pointer is
++ in the list of registers and if we add writeback the
++ instruction becomes UNPREDICTABLE. */
++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ else
++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ }
+ }
+
+ if (current_function_pretend_args_size)
+@@ -11401,22 +11441,6 @@
+ }
+ }
+
+-/* Return the number (counting from 0) of
+- the least significant set bit in MASK. */
+-
+-inline static int
+-number_of_first_bit_set (int mask)
+-{
+- int bit;
+-
+- for (bit = 0;
+- (mask & (1 << bit)) == 0;
+- ++bit)
+- continue;
+-
+- return bit;
+-}
+-
+ /* Generate code to return from a thumb function.
+ If 'reg_containing_return_addr' is -1, then the return address is
+ actually on the stack, at the stack pointer. */
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/3.4.3/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..4377c2143
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/700-pr15068-fix.patch b/misc/buildroot/toolchain/gcc/3.4.3/700-pr15068-fix.patch
new file mode 100644
index 000000000..2977765c5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/700-pr15068-fix.patch
@@ -0,0 +1,44 @@
+See http://gcc.gnu.org/PR15068
+
+Fixes error
+
+../sysdeps/generic/s_fmax.c: In function `__fmax':
+../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <URL:http://gcc.gnu.org/bugs.html> for instructions.
+make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
+make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
+make[1]: *** [math/others] Error 2
+make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
+make: *** [all] Error 2
+
+[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
+
+--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
+@@ -1878,6 +1878,7 @@
+ rtx set_src = SET_SRC (pc_set (BB_END (bb)));
+ rtx cond_true = XEXP (set_src, 0);
+ rtx reg = XEXP (cond_true, 0);
++ enum rtx_code inv_cond;
+
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+@@ -1886,11 +1887,13 @@
+ in the form of a comparison of a register against zero.
+ If the condition is more complex than that, then it is safe
+ not to record any information. */
+- if (GET_CODE (reg) == REG
++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
++ if (inv_cond != UNKNOWN
++ && GET_CODE (reg) == REG
+ && XEXP (cond_true, 1) == const0_rtx)
+ {
+ rtx cond_false
+- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
++ = gen_rtx_fmt_ee (inv_cond,
+ GET_MODE (cond_true), XEXP (cond_true, 0),
+ XEXP (cond_true, 1));
+ if (GET_CODE (XEXP (set_src, 1)) == PC)
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.4.3/800-arm-bigendian.patch
new file mode 100644
index 000000000..04e998419
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -101,7 +118,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.4.1-dist/gcc/config.gcc
++++ gcc-3.4.1/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/3.4.3/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/900-nios2.patch b/misc/buildroot/toolchain/gcc/3.4.3/900-nios2.patch
new file mode 100644
index 000000000..bfa06a21c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/900-nios2.patch
@@ -0,0 +1,10211 @@
+--- gcc-3.4.3/gcc/Makefile.in
++++ gcc-3.4.3-nios2/gcc/Makefile.in
+@@ -3085,7 +3085,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
+ $(INSTALL_DATA) $(srcdir)/README-fixinc \
+ $(DESTDIR)$(itoolsdatadir)/include/README ; \
+ $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
+- $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
++ $(INSTALL_PROGRAM) fixinc/fixincl$(build_exeext) $(DESTDIR)$(itoolsdir)/fixincl$(build_exeext) ; \
+ $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
+ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \
+ else :; fi
+--- gcc-3.4.3/gcc/combine.c
++++ gcc-3.4.3-nios2/gcc/combine.c
+@@ -4380,6 +4380,14 @@ combine_simplify_rtx (rtx x, enum machin
+ mode);
+ }
+
++#ifndef __nios2__
++/* This screws up Nios II in this test case:
++
++if (x & 1)
++ return 2;
++else
++ return 3;
++*/
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+ && op1 == const0_rtx
+@@ -4391,6 +4399,7 @@ combine_simplify_rtx (rtx x, enum machin
+ gen_lowpart_for_combine (mode, op0),
+ const1_rtx);
+ }
++#endif
+
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+--- gcc-3.4.3/gcc/config/nios2/crti.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crti.asm
+@@ -0,0 +1,88 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just make a stack frame for the contents of the .fini and
++.init sections. Users may put any desired instructions in those
++sections.
++
++
++While technically any code can be put in the init and fini sections
++most stuff will not work other than stuff which obeys the call frame
++and ABI. All the call-preserved registers are saved, the call clobbered
++registers should have been saved by the code calling init and fini.
++
++See crtstuff.c for an example of code that inserts itself in the
++init and fini sections.
++
++See crt0.s for the code that calls init and fini.
++*/
++
++ .file "crti.asm"
++
++ .section ".init"
++ .align 2
++ .global _init
++_init:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
++ .section ".fini"
++ .align 2
++ .global _fini
++_fini:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
+--- gcc-3.4.3/gcc/config/nios2/crtn.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crtn.asm
+@@ -0,0 +1,70 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just makes sure that the .fini and .init sections do in
++fact return. Users may put any desired instructions in those sections.
++This file is the last thing linked into any executable.
++*/
++ .file "crtn.asm"
++
++
++
++ .section ".init"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
++ .section ".fini"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod-hi.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod-hi.c
+@@ -0,0 +1,123 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern HItype __modhi3 (HItype, HItype);
++extern HItype __divhi3 (HItype, HItype);
++extern HItype __umodhi3 (HItype, HItype);
++extern HItype __udivhi3 (HItype, HItype);
++
++static UHItype udivmodhi4(UHItype, UHItype, word_type);
++
++static UHItype
++udivmodhi4(UHItype num, UHItype den, word_type modwanted)
++{
++ UHItype bit = 1;
++ UHItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<15)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++HItype
++__divhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodhi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__modhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodhi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__udivhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 0);
++}
++
++
++HItype
++__umodhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod.c
+@@ -0,0 +1,126 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern SItype __modsi3 (SItype, SItype);
++extern SItype __divsi3 (SItype, SItype);
++extern SItype __umodsi3 (SItype, SItype);
++extern SItype __udivsi3 (SItype, SItype);
++
++static USItype udivmodsi4(USItype, USItype, word_type);
++
++/* 16-bit SI divide and modulo as used in NIOS */
++
++
++static USItype
++udivmodsi4(USItype num, USItype den, word_type modwanted)
++{
++ USItype bit = 1;
++ USItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<31)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodsi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__modsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodsi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__udivsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 0);
++}
++
++
++SItype
++__umodsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divtable.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divtable.c
+@@ -0,0 +1,46 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++UQItype __divsi3_table[] =
++{
++ 0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15,
++ 0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15,
++ 0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15,
++ 0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15,
++ 0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15,
++ 0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15,
++ 0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15,
++ 0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15,
++ 0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15,
++ 0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15,
++ 0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15,
++ 0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15,
++ 0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15,
++ 0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15,
++ 0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15,
++ 0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
++};
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-mul.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-mul.c
+@@ -0,0 +1,103 @@
++/* while we are debugging (ie compile outside of gcc build)
++ disable gcc specific headers */
++#ifndef DEBUG_MULSI3
++
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++#else
++#define SItype int
++#define USItype unsigned int
++#endif
++
++
++extern SItype __mulsi3 (SItype, SItype);
++
++SItype
++__mulsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = a;
++
++ while (cnt)
++ {
++ if (cnt & 1)
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt >>= 1;
++ }
++
++ return res;
++}
++/*
++TODO: Choose best alternative implementation.
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = 0;
++
++ while (cnt < 32)
++ {
++ if (a & (1L << cnt))
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt++;
++ }
++
++ return res;
++}
++*/
++
++
++#ifdef DEBUG_MULSI3
++
++int
++main ()
++{
++ int i, j;
++ int error = 0;
++
++ for (i = -1000; i < 1000; i++)
++ for (j = -1000; j < 1000; j++)
++ {
++ int expect = i * j;
++ int actual = A__divsi3 (i, j);
++ if (expect != actual)
++ {
++ printf ("error: %d * %d = %d not %d\n", i, j, expect, actual);
++ error = 1;
++ }
++ }
++
++ return error;
++}
++#endif
+--- gcc-3.4.3/gcc/config/nios2/nios2-dp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-dp-bit.c
+@@ -0,0 +1,1652 @@
++
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-fp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-fp-bit.c
+@@ -0,0 +1,1652 @@
++#define FLOAT
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-protos.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-protos.h
+@@ -0,0 +1,70 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++extern void dump_frame_size (FILE *);
++extern HOST_WIDE_INT compute_frame_size (void);
++extern int nios2_initial_elimination_offset (int, int);
++extern void override_options (void);
++extern void optimization_options (int, int);
++extern int nios2_can_use_return_insn (void);
++extern void expand_prologue (void);
++extern void expand_epilogue (bool);
++extern void function_profiler (FILE *, int);
++
++
++#ifdef RTX_CODE
++extern int nios2_legitimate_address (rtx, enum machine_mode, int);
++extern void nios2_print_operand (FILE *, rtx, int);
++extern void nios2_print_operand_address (FILE *, rtx);
++
++extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
++extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
++
++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx);
++extern void gen_conditional_move (rtx *, enum machine_mode);
++extern const char *asm_output_opcode (FILE *, const char *);
++
++/* predicates */
++extern int arith_operand (rtx, enum machine_mode);
++extern int uns_arith_operand (rtx, enum machine_mode);
++extern int logical_operand (rtx, enum machine_mode);
++extern int shift_operand (rtx, enum machine_mode);
++extern int reg_or_0_operand (rtx, enum machine_mode);
++extern int equality_op (rtx, enum machine_mode);
++extern int custom_insn_opcode (rtx, enum machine_mode);
++extern int rdwrctl_operand (rtx, enum machine_mode);
++
++# ifdef HAVE_MACHINE_MODES
++# if defined TREE_CODE
++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
++extern int nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++
++# endif /* TREE_CODE */
++# endif /* HAVE_MACHINE_MODES */
++#endif
++
++#ifdef TREE_CODE
++extern int nios2_return_in_memory (tree);
++
++#endif /* TREE_CODE */
+--- gcc-3.4.3/gcc/config/nios2/nios2.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.c
+@@ -0,0 +1,2853 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++#include <stdio.h>
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "rtl.h"
++#include "tree.h"
++#include "tm_p.h"
++#include "regs.h"
++#include "hard-reg-set.h"
++#include "real.h"
++#include "insn-config.h"
++#include "conditions.h"
++#include "output.h"
++#include "insn-attr.h"
++#include "flags.h"
++#include "recog.h"
++#include "expr.h"
++#include "toplev.h"
++#include "basic-block.h"
++#include "function.h"
++#include "ggc.h"
++#include "reload.h"
++#include "debug.h"
++#include "optabs.h"
++#include "target.h"
++#include "target-def.h"
++
++/* local prototypes */
++static bool nios2_rtx_costs (rtx, int, int, int *);
++
++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT);
++static int nios2_use_dfa_pipeline_interface (void);
++static int nios2_issue_rate (void);
++static struct machine_function *nios2_init_machine_status (void);
++static bool nios2_in_small_data_p (tree);
++static rtx save_reg (int, HOST_WIDE_INT, rtx);
++static rtx restore_reg (int, HOST_WIDE_INT);
++static unsigned int nios2_section_type_flags (tree, const char *, int);
++static void nios2_init_builtins (void);
++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
++static bool nios2_function_ok_for_sibcall (tree, tree);
++static void nios2_encode_section_info (tree, rtx, int);
++
++/* Initialize the GCC target structure. */
++#undef TARGET_ASM_FUNCTION_PROLOGUE
++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue
++
++#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
++#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \
++ nios2_use_dfa_pipeline_interface
++#undef TARGET_SCHED_ISSUE_RATE
++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate
++#undef TARGET_IN_SMALL_DATA_P
++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p
++#undef TARGET_ENCODE_SECTION_INFO
++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info
++#undef TARGET_SECTION_TYPE_FLAGS
++#define TARGET_SECTION_TYPE_FLAGS nios2_section_type_flags
++
++#undef TARGET_INIT_BUILTINS
++#define TARGET_INIT_BUILTINS nios2_init_builtins
++#undef TARGET_EXPAND_BUILTIN
++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin
++
++#undef TARGET_FUNCTION_OK_FOR_SIBCALL
++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall
++
++#undef TARGET_RTX_COSTS
++#define TARGET_RTX_COSTS nios2_rtx_costs
++
++
++struct gcc_target targetm = TARGET_INITIALIZER;
++
++
++
++/* Threshold for data being put into the small data/bss area, instead
++ of the normal data area (references to the small data/bss area take
++ 1 instruction, and use the global pointer, references to the normal
++ data area takes 2 instructions). */
++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE;
++
++
++/* Structure to be filled in by compute_frame_size with register
++ save masks, and offsets for the current function. */
++
++struct nios2_frame_info
++GTY (())
++{
++ long total_size; /* # bytes that the entire frame takes up */
++ long var_size; /* # bytes that variables take up */
++ long args_size; /* # bytes that outgoing arguments take up */
++ int save_reg_size; /* # bytes needed to store gp regs */
++ int save_reg_rounded; /* # bytes needed to store gp regs */
++ long save_regs_offset; /* offset from new sp to store gp registers */
++ int initialized; /* != 0 if frame size already calculated */
++ int num_regs; /* number of gp registers saved */
++};
++
++struct machine_function
++GTY (())
++{
++
++ /* Current frame information, calculated by compute_frame_size. */
++ struct nios2_frame_info frame;
++};
++
++
++/***************************************
++ * Section encodings
++ ***************************************/
++
++
++
++
++
++/***************************************
++ * Stack Layout and Calling Conventions
++ ***************************************/
++
++
++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1))
++#define TEMP_REG_NUM 8
++
++static void
++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
++{
++ if (flag_verbose_asm || flag_debug_asm)
++ {
++ compute_frame_size ();
++ dump_frame_size (file);
++ }
++}
++
++static rtx
++save_reg (int regno, HOST_WIDE_INT offset, rtx cfa_store_reg)
++{
++ rtx insn, stack_slot;
++
++ stack_slot = gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ GEN_INT (offset));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_MEM (SImode, stack_slot),
++ gen_rtx_REG (SImode, regno)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ return insn;
++}
++
++static rtx
++restore_reg (int regno, HOST_WIDE_INT offset)
++{
++ rtx insn, stack_slot;
++
++ if (TOO_BIG_OFFSET (offset))
++ {
++ stack_slot = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ GEN_INT (offset)));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ gen_rtx_PLUS (SImode,
++ stack_slot,
++ stack_pointer_rtx)));
++ }
++ else
++ {
++ stack_slot = gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (offset));
++ }
++
++ stack_slot = gen_rtx_MEM (SImode, stack_slot);
++
++ insn = emit_move_insn (gen_rtx_REG (SImode, regno), stack_slot);
++
++ return insn;
++}
++
++
++/* There are two possible paths for prologue expansion,
++- the first is if the total frame size is < 2^15-1. In that
++case all the immediates will fit into the 16-bit immediate
++fields.
++- the second is when the frame size is too big, in that
++case an additional temporary register is used, first
++as a cfa_temp to offset the sp, second as the cfa_store
++register.
++
++See the comment above dwarf2out_frame_debug_expr in
++dwarf2out.c for more explanation of the "rules."
++
++
++Case 1:
++Rule # Example Insn Effect
++2 addi sp, sp, -total_frame_size cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++12 stw ra, offset(sp)
++12 stw r16, offset(sp)
++1 mov fp, sp
++
++Case 2:
++Rule # Example Insn Effect
++6 movi r8, total_frame_size cfa_temp.reg=r8, cfa_temp.offset=total_frame_size
++2 sub sp, sp, r8 cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++5 add r8, r8, sp cfa_store.reg=r8, cfa_store.offset=0
++12 stw ra, offset(r8)
++12 stw r16, offset(r8)
++1 mov fp, sp
++
++*/
++
++void
++expand_prologue ()
++{
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int cfa_store_offset;
++ rtx insn;
++ rtx cfa_store_reg = 0;
++
++ total_frame_size = compute_frame_size ();
++
++ if (total_frame_size)
++ {
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ /* cfa_temp and cfa_store_reg are the same register,
++ cfa_store_reg overwrites cfa_temp */
++ cfa_store_reg = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ cfa_store_reg,
++ GEN_INT (total_frame_size)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_MINUS (SImode,
++ stack_pointer_rtx,
++ cfa_store_reg));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ /* if there are no registers to save, I don't need to
++ create a cfa_store */
++ if (cfun->machine->frame.save_reg_size)
++ {
++ insn = gen_rtx_SET (SImode,
++ cfa_store_reg,
++ gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ stack_pointer_rtx));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ cfa_store_offset
++ = total_frame_size
++ - (cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded);
++ }
++ else
++ {
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (-total_frame_size)));
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ cfa_store_reg = stack_pointer_rtx;
++ cfa_store_offset
++ = cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded;
++ }
++ }
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (RA_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (FP_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ cfa_store_offset -= 4;
++ save_reg (i, cfa_store_offset, cfa_store_reg);
++ }
++ }
++
++ if (frame_pointer_needed)
++ {
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_REG (SImode, FP_REGNO),
++ gen_rtx_REG (SImode, SP_REGNO)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ /* If we are profiling, make sure no instructions are scheduled before
++ the call to mcount. */
++ if (current_function_profile)
++ emit_insn (gen_blockage ());
++}
++
++void
++expand_epilogue (bool sibcall_p)
++{
++ rtx insn;
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int register_store_offset;
++
++ total_frame_size = compute_frame_size ();
++
++ if (!sibcall_p && nios2_can_use_return_insn ())
++ {
++ insn = emit_jump_insn (gen_return ());
++ return;
++ }
++
++ emit_insn (gen_blockage ());
++
++ register_store_offset =
++ cfun->machine->frame.save_regs_offset +
++ cfun->machine->frame.save_reg_rounded;
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (RA_REGNO, register_store_offset);
++ }
++
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (FP_REGNO, register_store_offset);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ register_store_offset -= 4;
++ restore_reg (i, register_store_offset);
++ }
++ }
++
++ if (total_frame_size)
++ {
++ rtx sp_adjust;
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ sp_adjust = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ sp_adjust,
++ GEN_INT (total_frame_size)));
++
++ }
++ else
++ {
++ sp_adjust = GEN_INT (total_frame_size);
++ }
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ sp_adjust));
++ insn = emit_insn (insn);
++ }
++
++
++ if (!sibcall_p)
++ {
++ insn = emit_jump_insn (gen_return_from_epilogue (gen_rtx (REG, Pmode,
++ RA_REGNO)));
++ }
++}
++
++
++bool
++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
++{
++ return true;
++}
++
++
++
++
++
++/* ----------------------- *
++ * Profiling
++ * ----------------------- */
++
++void
++function_profiler (FILE *file, int labelno)
++{
++ fprintf (file, "\t%s mcount begin, label: .LP%d\n",
++ ASM_COMMENT_START, labelno);
++ fprintf (file, "\tnextpc\tr8\n");
++ fprintf (file, "\tmov\tr9, ra\n");
++ fprintf (file, "\tmovhi\tr10, %%hiadj(.LP%d)\n", labelno);
++ fprintf (file, "\taddi\tr10, r10, %%lo(.LP%d)\n", labelno);
++ fprintf (file, "\tcall\tmcount\n");
++ fprintf (file, "\tmov\tra, r9\n");
++ fprintf (file, "\t%s mcount end\n", ASM_COMMENT_START);
++}
++
++
++/***************************************
++ * Stack Layout
++ ***************************************/
++
++
++void
++dump_frame_size (FILE *file)
++{
++ fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START);
++
++ fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.total_size);
++ fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.var_size);
++ fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.args_size);
++ fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_size);
++ fprintf (file, "\t%s save_reg_rounded = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_rounded);
++ fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.initialized);
++ fprintf (file, "\t%s num_regs = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.num_regs);
++ fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_regs_offset);
++ fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START,
++ current_function_is_leaf);
++ fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START,
++ frame_pointer_needed);
++ fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START,
++ current_function_pretend_args_size);
++
++}
++
++
++/* Return the bytes needed to compute the frame pointer from the current
++ stack pointer.
++*/
++
++HOST_WIDE_INT
++compute_frame_size ()
++{
++ unsigned int regno;
++ HOST_WIDE_INT var_size; /* # of var. bytes allocated */
++ HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up */
++ HOST_WIDE_INT save_reg_size; /* # bytes needed to store callee save regs */
++ HOST_WIDE_INT save_reg_rounded;
++ /* # bytes needed to store callee save regs (rounded) */
++ HOST_WIDE_INT out_args_size; /* # bytes needed for outgoing args */
++
++ save_reg_size = 0;
++ var_size = STACK_ALIGN (get_frame_size ());
++ out_args_size = STACK_ALIGN (current_function_outgoing_args_size);
++
++ total_size = var_size + out_args_size;
++
++ /* Calculate space needed for gp registers. */
++ for (regno = 0; regno <= FIRST_PSEUDO_REGISTER; regno++)
++ {
++ if (MUST_SAVE_REGISTER (regno))
++ {
++ save_reg_size += 4;
++ }
++ }
++
++ save_reg_rounded = STACK_ALIGN (save_reg_size);
++ total_size += save_reg_rounded;
++
++ total_size += STACK_ALIGN (current_function_pretend_args_size);
++
++ /* Save other computed information. */
++ cfun->machine->frame.total_size = total_size;
++ cfun->machine->frame.var_size = var_size;
++ cfun->machine->frame.args_size = current_function_outgoing_args_size;
++ cfun->machine->frame.save_reg_size = save_reg_size;
++ cfun->machine->frame.save_reg_rounded = save_reg_rounded;
++ cfun->machine->frame.initialized = reload_completed;
++ cfun->machine->frame.num_regs = save_reg_size / UNITS_PER_WORD;
++
++ cfun->machine->frame.save_regs_offset
++ = save_reg_rounded ? current_function_outgoing_args_size + var_size : 0;
++
++ return total_size;
++}
++
++
++int
++nios2_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED)
++{
++ int offset;
++
++ /* Set OFFSET to the offset from the stack pointer. */
++ switch (from)
++ {
++ case FRAME_POINTER_REGNUM:
++ offset = 0;
++ break;
++
++ case ARG_POINTER_REGNUM:
++ compute_frame_size ();
++ offset = cfun->machine->frame.total_size;
++ offset -= current_function_pretend_args_size;
++ break;
++
++ case RETURN_ADDRESS_POINTER_REGNUM:
++ compute_frame_size ();
++ /* since the return address is always the first of the
++ saved registers, return the offset to the beginning
++ of the saved registers block */
++ offset = cfun->machine->frame.save_regs_offset;
++ break;
++
++ default:
++ abort ();
++ }
++
++ return offset;
++}
++
++/* Return nonzero if this function is known to have a null epilogue.
++ This allows the optimizer to omit jumps to jumps if no stack
++ was created. */
++int
++nios2_can_use_return_insn ()
++{
++ if (!reload_completed)
++ return 0;
++
++ if (regs_ever_live[RA_REGNO] || current_function_profile)
++ return 0;
++
++ if (cfun->machine->frame.initialized)
++ return cfun->machine->frame.total_size == 0;
++
++ return compute_frame_size () == 0;
++}
++
++
++
++
++
++/***************************************
++ *
++ ***************************************/
++
++const char *nios2_sys_nosys_string; /* for -msys=nosys */
++const char *nios2_sys_lib_string; /* for -msys-lib= */
++const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++void
++override_options ()
++{
++ /* Function to allocate machine-dependent function status. */
++ init_machine_status = &nios2_init_machine_status;
++
++ nios2_section_threshold
++ = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE;
++
++ if (nios2_sys_nosys_string && *nios2_sys_nosys_string)
++ {
++ error ("invalid option '-msys=nosys%s'", nios2_sys_nosys_string);
++ }
++
++ /* If we don't have mul, we don't have mulx either! */
++ if (!TARGET_HAS_MUL && TARGET_HAS_MULX)
++ {
++ target_flags &= ~HAS_MULX_FLAG;
++ }
++
++}
++
++void
++optimization_options (int level, int size)
++{
++ if (level || size)
++ {
++ target_flags |= INLINE_MEMCPY_FLAG;
++ }
++
++ if (level >= 3 && !size)
++ {
++ target_flags |= FAST_SW_DIV_FLAG;
++ }
++}
++
++/* Allocate a chunk of memory for per-function machine-dependent data. */
++static struct machine_function *
++nios2_init_machine_status ()
++{
++ return ((struct machine_function *)
++ ggc_alloc_cleared (sizeof (struct machine_function)));
++}
++
++
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++/* Compute a (partial) cost for rtx X. Return true if the complete
++ cost has been computed, and false if subexpressions should be
++ scanned. In either case, *TOTAL contains the cost result. */
++
++
++
++static bool
++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
++{
++ switch (code)
++ {
++ case CONST_INT:
++ if (INTVAL (x) == 0)
++ {
++ *total = COSTS_N_INSNS (0);
++ return true;
++ }
++ else if (SMALL_INT (INTVAL (x))
++ || SMALL_INT_UNSIGNED (INTVAL (x))
++ || UPPER16_INT (INTVAL (x)))
++ {
++ *total = COSTS_N_INSNS (2);
++ return true;
++ }
++ else
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case LABEL_REF:
++ case SYMBOL_REF:
++ /* ??? gp relative stuff will fit in here */
++ /* fall through */
++ case CONST:
++ case CONST_DOUBLE:
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case MULT:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++ case SIGN_EXTEND:
++ {
++ *total = COSTS_N_INSNS (3);
++ return false;
++ }
++ case ZERO_EXTEND:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++
++ default:
++ return false;
++ }
++}
++
++
++/***************************************
++ * INSTRUCTION SUPPORT
++ *
++ * These functions are used within the Machine Description to
++ * handle common or complicated output and expansions from
++ * instructions.
++ ***************************************/
++
++int
++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
++{
++ rtx to = operands[0];
++ rtx from = operands[1];
++
++ if (!register_operand (to, mode) && !reg_or_0_operand (from, mode))
++ {
++ if (no_new_pseudos)
++ internal_error ("Trying to force_reg no_new_pseudos == 1");
++ from = copy_to_mode_reg (mode, from);
++ }
++
++ operands[0] = to;
++ operands[1] = from;
++ return 0;
++}
++
++/* Divide Support */
++
++/*
++ If -O3 is used, we want to output a table lookup for
++ divides between small numbers (both num and den >= 0
++ and < 0x10). The overhead of this method in the worse
++ case is 40 bytes in the text section (10 insns) and
++ 256 bytes in the data section. Additional divides do
++ not incur additional penalties in the data section.
++
++ Code speed is improved for small divides by about 5x
++ when using this method in the worse case (~9 cycles
++ vs ~45). And in the worse case divides not within the
++ table are penalized by about 10% (~5 cycles vs ~45).
++ However in the typical case the penalty is not as bad
++ because doing the long divide in only 45 cycles is
++ quite optimistic.
++
++ ??? It would be nice to have some benchmarks other
++ than Dhrystone to back this up.
++
++ This bit of expansion is to create this instruction
++ sequence as rtl.
++ or $8, $4, $5
++ slli $9, $4, 4
++ cmpgeui $3, $8, 16
++ beq $3, $0, .L3
++ or $10, $9, $5
++ add $12, $11, divide_table
++ ldbu $2, 0($12)
++ br .L1
++.L3:
++ call slow_div
++.L1:
++# continue here with result in $2
++
++ ??? Ideally I would like the emit libcall block to contain
++ all of this code, but I don't know how to do that. What it
++ means is that if the divide can be eliminated, it may not
++ completely disappear.
++
++ ??? The __divsi3_table label should ideally be moved out
++ of this block and into a global. If it is placed into the
++ sdata section we can save even more cycles by doing things
++ gp relative.
++*/
++int
++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode)
++{
++ rtx or_result, shift_left_result;
++ rtx lookup_value;
++ rtx lab1, lab3;
++ rtx insns;
++ rtx libfunc;
++ rtx final_result;
++ rtx tmp;
++
++ /* it may look a little generic, but only SImode
++ is supported for now */
++ if (mode != SImode)
++ abort ();
++
++ libfunc = sdiv_optab->handlers[(int) SImode].libfunc;
++
++
++
++ lab1 = gen_label_rtx ();
++ lab3 = gen_label_rtx ();
++
++ or_result = expand_simple_binop (SImode, IOR,
++ operands[1], operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0,
++ GET_MODE (or_result), 0, lab3);
++ JUMP_LABEL (get_last_insn ()) = lab3;
++
++ shift_left_result = expand_simple_binop (SImode, ASHIFT,
++ operands[1], GEN_INT (4),
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ lookup_value = expand_simple_binop (SImode, IOR,
++ shift_left_result, operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ convert_move (operands[0],
++ gen_rtx (MEM, QImode,
++ gen_rtx (PLUS, SImode,
++ lookup_value,
++ gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))),
++ 1);
++
++
++ tmp = emit_jump_insn (gen_jump (lab1));
++ JUMP_LABEL (tmp) = lab1;
++ emit_barrier ();
++
++ emit_label (lab3);
++ LABEL_NUSES (lab3) = 1;
++
++ start_sequence ();
++ final_result = emit_library_call_value (libfunc, NULL_RTX,
++ LCT_CONST, SImode, 2,
++ operands[1], SImode,
++ operands[2], SImode);
++
++
++ insns = get_insns ();
++ end_sequence ();
++ emit_libcall_block (insns, operands[0], final_result,
++ gen_rtx (DIV, SImode, operands[1], operands[2]));
++
++ emit_label (lab1);
++ LABEL_NUSES (lab1) = 1;
++ return 1;
++}
++
++/* Branches/Compares */
++
++/* the way of handling branches/compares
++ in gcc is heavily borrowed from MIPS */
++
++enum internal_test
++{
++ ITEST_EQ,
++ ITEST_NE,
++ ITEST_GT,
++ ITEST_GE,
++ ITEST_LT,
++ ITEST_LE,
++ ITEST_GTU,
++ ITEST_GEU,
++ ITEST_LTU,
++ ITEST_LEU,
++ ITEST_MAX
++};
++
++static enum internal_test map_test_to_internal_test (enum rtx_code);
++
++/* Cached operands, and operator to compare for use in set/branch/trap
++ on condition codes. */
++rtx branch_cmp[2];
++enum cmp_type branch_type;
++
++/* Make normal rtx_code into something we can index from an array */
++
++static enum internal_test
++map_test_to_internal_test (enum rtx_code test_code)
++{
++ enum internal_test test = ITEST_MAX;
++
++ switch (test_code)
++ {
++ case EQ:
++ test = ITEST_EQ;
++ break;
++ case NE:
++ test = ITEST_NE;
++ break;
++ case GT:
++ test = ITEST_GT;
++ break;
++ case GE:
++ test = ITEST_GE;
++ break;
++ case LT:
++ test = ITEST_LT;
++ break;
++ case LE:
++ test = ITEST_LE;
++ break;
++ case GTU:
++ test = ITEST_GTU;
++ break;
++ case GEU:
++ test = ITEST_GEU;
++ break;
++ case LTU:
++ test = ITEST_LTU;
++ break;
++ case LEU:
++ test = ITEST_LEU;
++ break;
++ default:
++ break;
++ }
++
++ return test;
++}
++
++/* Generate the code to compare (and possibly branch) two integer values
++ TEST_CODE is the comparison code we are trying to emulate
++ (or implement directly)
++ RESULT is where to store the result of the comparison,
++ or null to emit a branch
++ CMP0 CMP1 are the two comparison operands
++ DESTINATION is the destination of the branch, or null to only compare
++ */
++
++void
++gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
++ rtx result, /* result to store comp. or 0 if branch */
++ rtx cmp0, /* first operand to compare */
++ rtx cmp1, /* second operand to compare */
++ rtx destination) /* destination of the branch, or 0 if compare */
++{
++ struct cmp_info
++ {
++ /* for register (or 0) compares */
++ enum rtx_code test_code_reg; /* code to use in instruction (LT vs. LTU) */
++ int reverse_regs; /* reverse registers in test */
++
++ /* for immediate compares */
++ enum rtx_code test_code_const;
++ /* code to use in instruction (LT vs. LTU) */
++ int const_low; /* low bound of constant we can accept */
++ int const_high; /* high bound of constant we can accept */
++ int const_add; /* constant to add */
++
++ /* generic info */
++ int unsignedp; /* != 0 for unsigned comparisons. */
++ };
++
++ static const struct cmp_info info[(int) ITEST_MAX] = {
++
++ {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ */
++ {NE, 0, NE, -32768, 32767, 0, 0}, /* NE */
++
++ {LT, 1, GE, -32769, 32766, 1, 0}, /* GT */
++ {GE, 0, GE, -32768, 32767, 0, 0}, /* GE */
++ {LT, 0, LT, -32768, 32767, 0, 0}, /* LT */
++ {GE, 1, LT, -32769, 32766, 1, 0}, /* LE */
++
++ {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */
++ {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */
++ {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */
++ {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */
++ };
++
++ enum internal_test test;
++ enum machine_mode mode;
++ const struct cmp_info *p_info;
++ int branch_p;
++
++
++
++
++ test = map_test_to_internal_test (test_code);
++ if (test == ITEST_MAX)
++ abort ();
++
++ p_info = &info[(int) test];
++
++ mode = GET_MODE (cmp0);
++ if (mode == VOIDmode)
++ mode = GET_MODE (cmp1);
++
++ branch_p = (destination != 0);
++
++ /* We can't, under any circumstances, have const_ints in cmp0
++ ??? Actually we could have const0 */
++ if (GET_CODE (cmp0) == CONST_INT)
++ cmp0 = force_reg (mode, cmp0);
++
++ /* if the comparison is against an int not in legal range
++ move it into a register */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (cmp1);
++
++ if (value < p_info->const_low || value > p_info->const_high)
++ cmp1 = force_reg (mode, cmp1);
++ }
++
++ /* Comparison to constants, may involve adding 1 to change a GT into GE.
++ Comparison between two registers, may involve switching operands. */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ if (p_info->const_add != 0)
++ {
++ HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
++
++ /* If modification of cmp1 caused overflow,
++ we would get the wrong answer if we follow the usual path;
++ thus, x > 0xffffffffU would turn into x > 0U. */
++ if ((p_info->unsignedp
++ ? (unsigned HOST_WIDE_INT) new >
++ (unsigned HOST_WIDE_INT) INTVAL (cmp1)
++ : new > INTVAL (cmp1)) != (p_info->const_add > 0))
++ {
++ /* ??? This case can never happen with the current numbers,
++ but I am paranoid and would rather an abort than
++ a bug I will never find */
++ abort ();
++ }
++ else
++ cmp1 = GEN_INT (new);
++ }
++ }
++
++ else if (p_info->reverse_regs)
++ {
++ rtx temp = cmp0;
++ cmp0 = cmp1;
++ cmp1 = temp;
++ }
++
++
++
++ if (branch_p)
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ rtx insn;
++ rtx cond = gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1);
++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ insn = gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond, label, pc_rtx));
++ emit_jump_insn (insn);
++ }
++ else
++ {
++ rtx cond, label;
++
++ result = gen_reg_rtx (mode);
++
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++
++ cond = gen_rtx (NE, mode, result, const0_rtx);
++ label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond,
++ label, pc_rtx)));
++ }
++ }
++ else
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1));
++ }
++ else
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++ }
++ }
++
++}
++
++
++/* ??? For now conditional moves are only supported
++ when the mode of the operands being compared are
++ the same as the ones being moved */
++
++void
++gen_conditional_move (rtx *operands, enum machine_mode mode)
++{
++ rtx insn, cond;
++ rtx cmp_reg = gen_reg_rtx (mode);
++ enum rtx_code cmp_code = GET_CODE (operands[1]);
++ enum rtx_code move_code = EQ;
++
++ /* emit a comparison if it is not "simple".
++ Simple comparisons are X eq 0 and X ne 0 */
++ if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[0];
++ move_code = cmp_code;
++ }
++ else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[1];
++ move_code = cmp_code == EQ ? NE : EQ;
++ }
++ else
++ gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1],
++ NULL_RTX);
++
++ cond = gen_rtx (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode));
++ insn = gen_rtx_SET (mode, operands[0],
++ gen_rtx_IF_THEN_ELSE (mode,
++ cond, operands[2], operands[3]));
++ emit_insn (insn);
++}
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++int
++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int strict)
++{
++ int ret_val = 0;
++
++ switch (GET_CODE (operand))
++ {
++ /* direct. */
++ case SYMBOL_REF:
++ if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand))
++ {
++ ret_val = 1;
++ break;
++ }
++ /* else, fall through */
++ case LABEL_REF:
++ case CONST_INT:
++ case CONST:
++ case CONST_DOUBLE:
++ /* ??? In here I need to add gp addressing */
++ ret_val = 0;
++
++ break;
++
++ /* Register indirect. */
++ case REG:
++ ret_val = REG_OK_FOR_BASE_P2 (operand, strict);
++ break;
++
++ /* Register indirect with displacement */
++ case PLUS:
++ {
++ rtx op0 = XEXP (operand, 0);
++ rtx op1 = XEXP (operand, 1);
++
++ if (REG_P (op0) && REG_P (op1))
++ ret_val = 0;
++ else if (REG_P (op0) && CONSTANT_P (op1))
++ ret_val = REG_OK_FOR_BASE_P2 (op0, strict)
++ && SMALL_INT (INTVAL (op1));
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ ret_val = REG_OK_FOR_BASE_P2 (op1, strict)
++ && SMALL_INT (INTVAL (op0));
++ else
++ ret_val = 0;
++ }
++ break;
++
++ default:
++ ret_val = 0;
++ break;
++ }
++
++ return ret_val;
++}
++
++/* Return true if EXP should be placed in the small data section. */
++
++static bool
++nios2_in_small_data_p (tree exp)
++{
++ /* We want to merge strings, so we never consider them small data. */
++ if (TREE_CODE (exp) == STRING_CST)
++ return false;
++
++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
++ {
++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
++ /* ??? these string names need moving into
++ an array in some header file */
++ if (nios2_section_threshold > 0
++ && (strcmp (section, ".sbss") == 0
++ || strncmp (section, ".sbss.", 6) == 0
++ || strcmp (section, ".sdata") == 0
++ || strncmp (section, ".sdata.", 7) == 0))
++ return true;
++ }
++ else if (TREE_CODE (exp) == VAR_DECL)
++ {
++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
++
++ /* If this is an incomplete type with size 0, then we can't put it
++ in sdata because it might be too big when completed. */
++ if (size > 0 && size <= nios2_section_threshold)
++ return true;
++ }
++
++ return false;
++}
++
++static void
++nios2_encode_section_info (tree decl, rtx rtl, int first)
++{
++
++ rtx symbol;
++ int flags;
++
++ default_encode_section_info (decl, rtl, first);
++
++ /* Careful not to prod global register variables. */
++ if (GET_CODE (rtl) != MEM)
++ return;
++ symbol = XEXP (rtl, 0);
++ if (GET_CODE (symbol) != SYMBOL_REF)
++ return;
++
++ flags = SYMBOL_REF_FLAGS (symbol);
++
++ /* We don't want weak variables to be addressed with gp in case they end up with
++ value 0 which is not within 2^15 of $gp */
++ if (DECL_P (decl) && DECL_WEAK (decl))
++ flags |= SYMBOL_FLAG_WEAK_DECL;
++
++ SYMBOL_REF_FLAGS (symbol) = flags;
++}
++
++
++static unsigned int
++nios2_section_type_flags (tree decl, const char *name, int reloc)
++{
++ unsigned int flags;
++
++ flags = default_section_type_flags (decl, name, reloc);
++
++ /* ??? these string names need moving into an array in some header file */
++ if (strcmp (name, ".sbss") == 0
++ || strncmp (name, ".sbss.", 6) == 0
++ || strcmp (name, ".sdata") == 0
++ || strncmp (name, ".sdata.", 7) == 0)
++ flags |= SECTION_SMALL;
++
++ return flags;
++}
++
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++
++/* print the operand OP to file stream
++ FILE modified by LETTER. LETTER
++ can be one of:
++ i: print "i" if OP is an immediate, except 0
++ o: print "io" if OP is volatile
++
++ z: for const0_rtx print $0 instead of 0
++ H: for %hiadj
++ L: for %lo
++ U: for upper half of 32 bit value
++ */
++
++void
++nios2_print_operand (FILE *file, rtx op, int letter)
++{
++
++ switch (letter)
++ {
++ case 'i':
++ if (CONSTANT_P (op) && (op != const0_rtx))
++ fprintf (file, "i");
++ return;
++
++ case 'o':
++ if (GET_CODE (op) == MEM
++ && ((MEM_VOLATILE_P (op) && !TARGET_CACHE_VOLATILE)
++ || TARGET_BYPASS_CACHE))
++ fprintf (file, "io");
++ return;
++
++ default:
++ break;
++ }
++
++ if (comparison_operator (op, VOIDmode))
++ {
++ if (letter == 0)
++ {
++ fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op)));
++ return;
++ }
++ }
++
++
++ switch (GET_CODE (op))
++ {
++ case REG:
++ if (letter == 0 || letter == 'z')
++ {
++ fprintf (file, "%s", reg_names[REGNO (op)]);
++ return;
++ }
++
++ case CONST_INT:
++ if (INTVAL (op) == 0 && letter == 'z')
++ {
++ fprintf (file, "zero");
++ return;
++ }
++ else if (letter == 'U')
++ {
++ HOST_WIDE_INT val = INTVAL (op);
++ rtx new_op;
++ val = (val / 65536) & 0xFFFF;
++ new_op = GEN_INT (val);
++ output_addr_const (file, new_op);
++ return;
++ }
++
++ /* else, fall through */
++ case CONST:
++ case LABEL_REF:
++ case SYMBOL_REF:
++ case CONST_DOUBLE:
++ if (letter == 0 || letter == 'z')
++ {
++ output_addr_const (file, op);
++ return;
++ }
++ else if (letter == 'H')
++ {
++ fprintf (file, "%%hiadj(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++ else if (letter == 'L')
++ {
++ fprintf (file, "%%lo(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++
++
++ case SUBREG:
++ case MEM:
++ if (letter == 0)
++ {
++ output_address (op);
++ return;
++ }
++
++ case CODE_LABEL:
++ if (letter == 0)
++ {
++ output_addr_const (file, op);
++ return;
++ }
++
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print (%c) ", letter);
++ debug_rtx (op);
++ abort ();
++}
++
++static int gprel_constant (rtx);
++
++static int
++gprel_constant (rtx op)
++{
++ if (GET_CODE (op) == SYMBOL_REF
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op))
++ {
++ return 1;
++ }
++ else if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == PLUS)
++ {
++ return gprel_constant (XEXP (XEXP (op, 0), 0));
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++void
++nios2_print_operand_address (FILE *file, rtx op)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST:
++ case CONST_INT:
++ case LABEL_REF:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ if (gprel_constant (op))
++ {
++ fprintf (file, "%%gprel(");
++ output_addr_const (file, op);
++ fprintf (file, ")(%s)", reg_names[GP_REGNO]);
++ return;
++ }
++
++ break;
++
++ case PLUS:
++ {
++ rtx op0 = XEXP (op, 0);
++ rtx op1 = XEXP (op, 1);
++
++ if (REG_P (op0) && CONSTANT_P (op1))
++ {
++ output_addr_const (file, op1);
++ fprintf (file, "(%s)", reg_names[REGNO (op0)]);
++ return;
++ }
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ {
++ output_addr_const (file, op0);
++ fprintf (file, "(%s)", reg_names[REGNO (op1)]);
++ return;
++ }
++ }
++ break;
++
++ case REG:
++ fprintf (file, "0(%s)", reg_names[REGNO (op)]);
++ return;
++
++ case MEM:
++ {
++ rtx base = XEXP (op, 0);
++ PRINT_OPERAND_ADDRESS (file, base);
++ return;
++ }
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print address\n");
++ debug_rtx (op);
++ abort ();
++}
++
++
++
++
++
++/****************************
++ * Predicates
++ ****************************/
++
++int
++arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++uns_arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++logical_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT
++ && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op))))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++shift_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op));
++}
++
++/* Return truth value of whether OP is a register or the constant 0. */
++
++int
++reg_or_0_operand (rtx op, enum machine_mode mode)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST_INT:
++ return INTVAL (op) == 0;
++
++ case CONST_DOUBLE:
++ return op == CONST0_RTX (mode);
++
++ default:
++ break;
++ }
++
++ return register_operand (op, mode);
++}
++
++
++int
++equality_op (rtx op, enum machine_mode mode)
++{
++ if (mode != GET_MODE (op))
++ return 0;
++
++ return GET_CODE (op) == EQ || GET_CODE (op) == NE;
++}
++
++int
++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op));
++}
++
++
++
++
++
++
++
++/*****************************************************************************
++**
++** instruction scheduler
++**
++*****************************************************************************/
++static int
++nios2_use_dfa_pipeline_interface ()
++{
++ return 1;
++}
++
++
++static int
++nios2_issue_rate ()
++{
++#ifdef MAX_DFA_ISSUE_RATE
++ return MAX_DFA_ISSUE_RATE;
++#else
++ return 1;
++#endif
++}
++
++
++const char *
++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED,
++ const char *ptr ATTRIBUTE_UNUSED)
++{
++ const char *p;
++
++ p = ptr;
++ return ptr;
++}
++
++
++
++/*****************************************************************************
++**
++** function arguments
++**
++*****************************************************************************/
++
++void
++init_cumulative_args (CUMULATIVE_ARGS *cum,
++ tree fntype ATTRIBUTE_UNUSED,
++ rtx libname ATTRIBUTE_UNUSED,
++ tree fndecl ATTRIBUTE_UNUSED,
++ int n_named_args ATTRIBUTE_UNUSED)
++{
++ cum->regs_used = 0;
++}
++
++
++/* Update the data in CUM to advance over an argument
++ of mode MODE and data type TYPE.
++ (TYPE is null for libcalls where that information may not be available.) */
++
++void
++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ cum->regs_used = NUM_ARG_REGS;
++ }
++ else
++ {
++ cum->regs_used += param_size;
++ }
++
++ return;
++}
++
++/* Define where to put the arguments to a function. Value is zero to
++ push the argument on the stack, or a hard register in which to
++ store the argument.
++
++ MODE is the argument's machine mode.
++ TYPE is the data type of the argument (as a tree).
++ This is null for libcalls where that information may
++ not be available.
++ CUM is a variable of type CUMULATIVE_ARGS which gives info about
++ the preceding args and about the function being called.
++ NAMED is nonzero if this argument is a named parameter
++ (otherwise it is an extra parameter matching an ellipsis). */
++rtx
++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ rtx return_rtx = NULL_RTX;
++
++ if (cum->regs_used < NUM_ARG_REGS)
++ {
++ return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used);
++ }
++
++ return return_rtx;
++}
++
++int
++function_arg_partial_nregs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used < NUM_ARG_REGS
++ && cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ return NUM_ARG_REGS - cum->regs_used;
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++
++int
++nios2_return_in_memory (tree type)
++{
++ int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
++ || (int_size_in_bytes (type) == -1));
++
++ return res;
++}
++
++/* ??? It may be possible to eliminate the copyback and implement
++ my own va_arg type, but that is more work for now. */
++int
++nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int no_rtl)
++{
++ CUMULATIVE_ARGS local_cum;
++ int regs_to_push;
++
++ local_cum = *cum;
++ FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
++
++ regs_to_push = NUM_ARG_REGS - local_cum.regs_used;
++
++ if (!no_rtl)
++ {
++ if (regs_to_push > 0)
++ {
++ rtx ptr, mem;
++
++ ptr = virtual_incoming_args_rtx;
++ mem = gen_rtx_MEM (BLKmode, ptr);
++
++ /* va_arg is an array access in this case, which causes
++ it to get MEM_IN_STRUCT_P set. We must set it here
++ so that the insn scheduler won't assume that these
++ stores can't possibly overlap with the va_arg loads. */
++ MEM_SET_IN_STRUCT_P (mem, 1);
++
++ emit_insn (gen_blockage ());
++ move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem,
++ regs_to_push);
++ emit_insn (gen_blockage ());
++ }
++ }
++
++ return regs_to_push * UNITS_PER_WORD;
++
++}
++
++
++
++/*****************************************************************************
++**
++** builtins
++**
++** This method for handling builtins is from CSP where _many_ more types of
++** expanders have already been written. Check there first before writing
++** new ones.
++**
++*****************************************************************************/
++
++enum nios2_builtins
++{
++ NIOS2_BUILTIN_LDBIO,
++ NIOS2_BUILTIN_LDBUIO,
++ NIOS2_BUILTIN_LDHIO,
++ NIOS2_BUILTIN_LDHUIO,
++ NIOS2_BUILTIN_LDWIO,
++ NIOS2_BUILTIN_STBIO,
++ NIOS2_BUILTIN_STHIO,
++ NIOS2_BUILTIN_STWIO,
++ NIOS2_BUILTIN_SYNC,
++ NIOS2_BUILTIN_RDCTL,
++ NIOS2_BUILTIN_WRCTL,
++
++ NIOS2_BUILTIN_CUSTOM_N,
++ NIOS2_BUILTIN_CUSTOM_NI,
++ NIOS2_BUILTIN_CUSTOM_NF,
++ NIOS2_BUILTIN_CUSTOM_NP,
++ NIOS2_BUILTIN_CUSTOM_NII,
++ NIOS2_BUILTIN_CUSTOM_NIF,
++ NIOS2_BUILTIN_CUSTOM_NIP,
++ NIOS2_BUILTIN_CUSTOM_NFI,
++ NIOS2_BUILTIN_CUSTOM_NFF,
++ NIOS2_BUILTIN_CUSTOM_NFP,
++ NIOS2_BUILTIN_CUSTOM_NPI,
++ NIOS2_BUILTIN_CUSTOM_NPF,
++ NIOS2_BUILTIN_CUSTOM_NPP,
++ NIOS2_BUILTIN_CUSTOM_IN,
++ NIOS2_BUILTIN_CUSTOM_INI,
++ NIOS2_BUILTIN_CUSTOM_INF,
++ NIOS2_BUILTIN_CUSTOM_INP,
++ NIOS2_BUILTIN_CUSTOM_INII,
++ NIOS2_BUILTIN_CUSTOM_INIF,
++ NIOS2_BUILTIN_CUSTOM_INIP,
++ NIOS2_BUILTIN_CUSTOM_INFI,
++ NIOS2_BUILTIN_CUSTOM_INFF,
++ NIOS2_BUILTIN_CUSTOM_INFP,
++ NIOS2_BUILTIN_CUSTOM_INPI,
++ NIOS2_BUILTIN_CUSTOM_INPF,
++ NIOS2_BUILTIN_CUSTOM_INPP,
++ NIOS2_BUILTIN_CUSTOM_FN,
++ NIOS2_BUILTIN_CUSTOM_FNI,
++ NIOS2_BUILTIN_CUSTOM_FNF,
++ NIOS2_BUILTIN_CUSTOM_FNP,
++ NIOS2_BUILTIN_CUSTOM_FNII,
++ NIOS2_BUILTIN_CUSTOM_FNIF,
++ NIOS2_BUILTIN_CUSTOM_FNIP,
++ NIOS2_BUILTIN_CUSTOM_FNFI,
++ NIOS2_BUILTIN_CUSTOM_FNFF,
++ NIOS2_BUILTIN_CUSTOM_FNFP,
++ NIOS2_BUILTIN_CUSTOM_FNPI,
++ NIOS2_BUILTIN_CUSTOM_FNPF,
++ NIOS2_BUILTIN_CUSTOM_FNPP,
++ NIOS2_BUILTIN_CUSTOM_PN,
++ NIOS2_BUILTIN_CUSTOM_PNI,
++ NIOS2_BUILTIN_CUSTOM_PNF,
++ NIOS2_BUILTIN_CUSTOM_PNP,
++ NIOS2_BUILTIN_CUSTOM_PNII,
++ NIOS2_BUILTIN_CUSTOM_PNIF,
++ NIOS2_BUILTIN_CUSTOM_PNIP,
++ NIOS2_BUILTIN_CUSTOM_PNFI,
++ NIOS2_BUILTIN_CUSTOM_PNFF,
++ NIOS2_BUILTIN_CUSTOM_PNFP,
++ NIOS2_BUILTIN_CUSTOM_PNPI,
++ NIOS2_BUILTIN_CUSTOM_PNPF,
++ NIOS2_BUILTIN_CUSTOM_PNPP,
++
++
++ LIM_NIOS2_BUILTINS
++};
++
++struct builtin_description
++{
++ const enum insn_code icode;
++ const char *const name;
++ const enum nios2_builtins code;
++ const tree *type;
++ rtx (* expander) PARAMS ((const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int));
++};
++
++static rtx nios2_expand_STXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_LDXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_sync (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_rdctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_wrctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static rtx nios2_expand_custom_n (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_Xn (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static tree endlink;
++
++/* int fn (volatile const void *)
++ */
++static tree int_ftype_volatile_const_void_p;
++
++/* int fn (int)
++ */
++static tree int_ftype_int;
++
++/* void fn (int, int)
++ */
++static tree void_ftype_int_int;
++
++/* void fn (volatile void *, int)
++ */
++static tree void_ftype_volatile_void_p_int;
++
++/* void fn (void)
++ */
++static tree void_ftype_void;
++
++static tree custom_n;
++static tree custom_ni;
++static tree custom_nf;
++static tree custom_np;
++static tree custom_nii;
++static tree custom_nif;
++static tree custom_nip;
++static tree custom_nfi;
++static tree custom_nff;
++static tree custom_nfp;
++static tree custom_npi;
++static tree custom_npf;
++static tree custom_npp;
++static tree custom_in;
++static tree custom_ini;
++static tree custom_inf;
++static tree custom_inp;
++static tree custom_inii;
++static tree custom_inif;
++static tree custom_inip;
++static tree custom_infi;
++static tree custom_inff;
++static tree custom_infp;
++static tree custom_inpi;
++static tree custom_inpf;
++static tree custom_inpp;
++static tree custom_fn;
++static tree custom_fni;
++static tree custom_fnf;
++static tree custom_fnp;
++static tree custom_fnii;
++static tree custom_fnif;
++static tree custom_fnip;
++static tree custom_fnfi;
++static tree custom_fnff;
++static tree custom_fnfp;
++static tree custom_fnpi;
++static tree custom_fnpf;
++static tree custom_fnpp;
++static tree custom_pn;
++static tree custom_pni;
++static tree custom_pnf;
++static tree custom_pnp;
++static tree custom_pnii;
++static tree custom_pnif;
++static tree custom_pnip;
++static tree custom_pnfi;
++static tree custom_pnff;
++static tree custom_pnfp;
++static tree custom_pnpi;
++static tree custom_pnpf;
++static tree custom_pnpp;
++
++
++static const struct builtin_description bdesc[] = {
++ {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++
++ {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++
++ {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, &void_ftype_void, nios2_expand_sync},
++ {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, &int_ftype_int, nios2_expand_rdctl},
++ {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, &void_ftype_int_int, nios2_expand_wrctl},
++
++ {CODE_FOR_custom_n, "__builtin_custom_n", NIOS2_BUILTIN_CUSTOM_N, &custom_n, nios2_expand_custom_n},
++ {CODE_FOR_custom_ni, "__builtin_custom_ni", NIOS2_BUILTIN_CUSTOM_NI, &custom_ni, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nf, "__builtin_custom_nf", NIOS2_BUILTIN_CUSTOM_NF, &custom_nf, nios2_expand_custom_nX},
++ {CODE_FOR_custom_np, "__builtin_custom_np", NIOS2_BUILTIN_CUSTOM_NP, &custom_np, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nii, "__builtin_custom_nii", NIOS2_BUILTIN_CUSTOM_NII, &custom_nii, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nif, "__builtin_custom_nif", NIOS2_BUILTIN_CUSTOM_NIF, &custom_nif, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nip, "__builtin_custom_nip", NIOS2_BUILTIN_CUSTOM_NIP, &custom_nip, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfi, "__builtin_custom_nfi", NIOS2_BUILTIN_CUSTOM_NFI, &custom_nfi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nff, "__builtin_custom_nff", NIOS2_BUILTIN_CUSTOM_NFF, &custom_nff, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfp, "__builtin_custom_nfp", NIOS2_BUILTIN_CUSTOM_NFP, &custom_nfp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npi, "__builtin_custom_npi", NIOS2_BUILTIN_CUSTOM_NPI, &custom_npi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npf, "__builtin_custom_npf", NIOS2_BUILTIN_CUSTOM_NPF, &custom_npf, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npp, "__builtin_custom_npp", NIOS2_BUILTIN_CUSTOM_NPP, &custom_npp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_in, "__builtin_custom_in", NIOS2_BUILTIN_CUSTOM_IN, &custom_in, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_ini, "__builtin_custom_ini", NIOS2_BUILTIN_CUSTOM_INI, &custom_ini, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inf, "__builtin_custom_inf", NIOS2_BUILTIN_CUSTOM_INF, &custom_inf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inp, "__builtin_custom_inp", NIOS2_BUILTIN_CUSTOM_INP, &custom_inp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inii, "__builtin_custom_inii", NIOS2_BUILTIN_CUSTOM_INII, &custom_inii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inif, "__builtin_custom_inif", NIOS2_BUILTIN_CUSTOM_INIF, &custom_inif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inip, "__builtin_custom_inip", NIOS2_BUILTIN_CUSTOM_INIP, &custom_inip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infi, "__builtin_custom_infi", NIOS2_BUILTIN_CUSTOM_INFI, &custom_infi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inff, "__builtin_custom_inff", NIOS2_BUILTIN_CUSTOM_INFF, &custom_inff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infp, "__builtin_custom_infp", NIOS2_BUILTIN_CUSTOM_INFP, &custom_infp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpi, "__builtin_custom_inpi", NIOS2_BUILTIN_CUSTOM_INPI, &custom_inpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpf, "__builtin_custom_inpf", NIOS2_BUILTIN_CUSTOM_INPF, &custom_inpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpp, "__builtin_custom_inpp", NIOS2_BUILTIN_CUSTOM_INPP, &custom_inpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fn, "__builtin_custom_fn", NIOS2_BUILTIN_CUSTOM_FN, &custom_fn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_fni, "__builtin_custom_fni", NIOS2_BUILTIN_CUSTOM_FNI, &custom_fni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnf, "__builtin_custom_fnf", NIOS2_BUILTIN_CUSTOM_FNF, &custom_fnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnp, "__builtin_custom_fnp", NIOS2_BUILTIN_CUSTOM_FNP, &custom_fnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnii, "__builtin_custom_fnii", NIOS2_BUILTIN_CUSTOM_FNII, &custom_fnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnif, "__builtin_custom_fnif", NIOS2_BUILTIN_CUSTOM_FNIF, &custom_fnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnip, "__builtin_custom_fnip", NIOS2_BUILTIN_CUSTOM_FNIP, &custom_fnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfi, "__builtin_custom_fnfi", NIOS2_BUILTIN_CUSTOM_FNFI, &custom_fnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnff, "__builtin_custom_fnff", NIOS2_BUILTIN_CUSTOM_FNFF, &custom_fnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfp, "__builtin_custom_fnfp", NIOS2_BUILTIN_CUSTOM_FNFP, &custom_fnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpi, "__builtin_custom_fnpi", NIOS2_BUILTIN_CUSTOM_FNPI, &custom_fnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpf, "__builtin_custom_fnpf", NIOS2_BUILTIN_CUSTOM_FNPF, &custom_fnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpp, "__builtin_custom_fnpp", NIOS2_BUILTIN_CUSTOM_FNPP, &custom_fnpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pn, "__builtin_custom_pn", NIOS2_BUILTIN_CUSTOM_PN, &custom_pn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_pni, "__builtin_custom_pni", NIOS2_BUILTIN_CUSTOM_PNI, &custom_pni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnf, "__builtin_custom_pnf", NIOS2_BUILTIN_CUSTOM_PNF, &custom_pnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnp, "__builtin_custom_pnp", NIOS2_BUILTIN_CUSTOM_PNP, &custom_pnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnii, "__builtin_custom_pnii", NIOS2_BUILTIN_CUSTOM_PNII, &custom_pnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnif, "__builtin_custom_pnif", NIOS2_BUILTIN_CUSTOM_PNIF, &custom_pnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnip, "__builtin_custom_pnip", NIOS2_BUILTIN_CUSTOM_PNIP, &custom_pnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfi, "__builtin_custom_pnfi", NIOS2_BUILTIN_CUSTOM_PNFI, &custom_pnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnff, "__builtin_custom_pnff", NIOS2_BUILTIN_CUSTOM_PNFF, &custom_pnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfp, "__builtin_custom_pnfp", NIOS2_BUILTIN_CUSTOM_PNFP, &custom_pnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpi, "__builtin_custom_pnpi", NIOS2_BUILTIN_CUSTOM_PNPI, &custom_pnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpf, "__builtin_custom_pnpf", NIOS2_BUILTIN_CUSTOM_PNPF, &custom_pnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpp, "__builtin_custom_pnpp", NIOS2_BUILTIN_CUSTOM_PNPP, &custom_pnpp, nios2_expand_custom_XnXX},
++
++
++ {0, 0, 0, 0, 0},
++};
++
++/* This does not have a closing bracket on purpose (see use) */
++#define def_param(TYPE) \
++ tree_cons (NULL_TREE, TYPE,
++
++static void
++nios2_init_builtins ()
++{
++ const struct builtin_description *d;
++
++
++ endlink = void_list_node;
++
++ /* Special indenting here because one of the brackets is in def_param */
++ /* *INDENT-OFF* */
++
++ /* int fn (volatile const void *)
++ */
++ int_ftype_volatile_const_void_p
++ = build_function_type (integer_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))
++ endlink));
++
++
++ /* void fn (volatile void *, int)
++ */
++ void_ftype_volatile_void_p_int
++ = build_function_type (void_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_VOLATILE))
++ def_param (integer_type_node)
++ endlink)));
++
++ /* void fn (void)
++ */
++ void_ftype_void
++ = build_function_type (void_type_node,
++ endlink);
++
++ /* int fn (int)
++ */
++ int_ftype_int
++ = build_function_type (integer_type_node,
++ def_param (integer_type_node)
++ endlink));
++
++ /* void fn (int, int)
++ */
++ void_ftype_int_int
++ = build_function_type (void_type_node,
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink)));
++
++
++#define CUSTOM_NUM def_param (integer_type_node)
++
++ custom_n
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ni
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_nf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_np
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_nii
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nif
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nip
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_nfi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nff
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nfp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_npi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_npf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_npp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_in
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ini
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_inf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_inp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_inii
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inif
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inip
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_infi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inff
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_infp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_inpi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inpf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inpp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_fn
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_fni
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_fnf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_fnp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_fnii
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnif
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnip
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnfi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnff
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnfp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnpi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnpf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnpp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++ custom_pn
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_pni
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_pnf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_pnp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_pnii
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnif
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnip
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnfi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnff
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnfp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnpi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnpf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnpp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++
++ /* *INDENT-ON* */
++
++
++ for (d = bdesc; d->name; d++)
++ {
++ builtin_function (d->name, *d->type, d->code,
++ BUILT_IN_MD, NULL, NULL);
++ }
++}
++
++/* Expand an expression EXP that calls a built-in function,
++ with result going to TARGET if that's convenient
++ (and in mode MODE if that's convenient).
++ SUBTARGET may be used as the target for computing one of EXP's operands.
++ IGNORE is nonzero if the value is to be ignored. */
++
++static rtx
++nios2_expand_builtin (tree exp, rtx target, rtx subtarget,
++ enum machine_mode mode, int ignore)
++{
++ const struct builtin_description *d;
++ tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
++
++ for (d = bdesc; d->name; d++)
++ if (d->code == fcode)
++ return (d->expander) (d, exp, target, subtarget, mode, ignore);
++
++ /* we should have seen one of the functins we registered */
++ abort ();
++}
++
++static rtx nios2_create_target (const struct builtin_description *, rtx);
++
++
++static rtx
++nios2_create_target (const struct builtin_description *d, rtx target)
++{
++ if (!target
++ || !(*insn_data[d->icode].operand[0].predicate) (target,
++ insn_data[d->icode].operand[0].mode))
++ {
++ target = gen_reg_rtx (insn_data[d->icode].operand[0].mode);
++ }
++
++ return target;
++}
++
++
++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree);
++static rtx nios2_extract_operand (const struct builtin_description *, int, int, tree);
++
++static rtx
++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx opcode = expand_expr (arg, NULL_RTX, mode, 0);
++ opcode = protect_from_queue (opcode, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode))
++ error ("Custom instruction opcode must be compile time constant in the range 0-255 for %s", d->name);
++
++ return opcode;
++}
++
++static rtx
++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx operand = expand_expr (arg, NULL_RTX, mode, 0);
++ operand = protect_from_queue (operand, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ operand = copy_to_mode_reg (mode, operand);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ error ("Invalid argument %d to %s", argnum, d->name);
++
++ return operand;
++}
++
++
++static rtx
++nios2_expand_custom_n (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_n should have exactly one operand */
++ if (insn_data[d->icode].n_operands != 1)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++
++ pat = GEN_FCN (d->icode) (opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp,
++ rtx target, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_Xn should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ pat = GEN_FCN (d->icode) (target, opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nX (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++
++ /* custom_nX should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++ /* custom_Xn should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_nX should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_XnX should have exactly four operands */
++ if (insn_data[d->icode].n_operands != 4)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++
++static rtx
++nios2_expand_STXIO (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx store_dest, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ store_dest = protect_from_queue (store_dest, 0);
++
++ store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode))
++ error ("Invalid argument 1 to %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (store_dest, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++static rtx
++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx ld_src;
++ enum insn_code icode = d->icode;
++
++ /* loads should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ ld_src = protect_from_queue (ld_src, 0);
++
++ ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode))
++ {
++ error ("Invalid argument 1 to %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, ld_src);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++static rtx
++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ emit_insn (gen_sync ());
++ return 0;
++}
++
++static rtx
++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx rdctl_reg;
++ enum insn_code icode = d->icode;
++
++ /* rdctl should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ rdctl_reg = protect_from_queue (rdctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode))
++ {
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, rdctl_reg);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx wrctl_reg, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ wrctl_reg = protect_from_queue (wrctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode))
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (wrctl_reg, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++#include "gt-nios2.h"
++
+--- gcc-3.4.3/gcc/config/nios2/nios2.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.h
+@@ -0,0 +1,824 @@
++/* Definitions of target machine for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++
++#define TARGET_CPU_CPP_BUILTINS() \
++ do \
++ { \
++ builtin_define_std ("NIOS2"); \
++ builtin_define_std ("nios2"); \
++ builtin_define ("_GNU_SOURCE"); \
++ } \
++ while (0)
++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)")
++
++
++
++
++
++/*********************************
++ * Run-time Target Specification
++ *********************************/
++
++#define HAS_DIV_FLAG 0x0001
++#define HAS_MUL_FLAG 0x0002
++#define HAS_MULX_FLAG 0x0004
++#define FAST_SW_DIV_FLAG 0x0008
++#define INLINE_MEMCPY_FLAG 0x00010
++#define CACHE_VOLATILE_FLAG 0x0020
++#define BYPASS_CACHE_FLAG 0x0040
++
++extern int target_flags;
++#define TARGET_HAS_DIV (target_flags & HAS_DIV_FLAG)
++#define TARGET_HAS_MUL (target_flags & HAS_MUL_FLAG)
++#define TARGET_HAS_MULX (target_flags & HAS_MULX_FLAG)
++#define TARGET_FAST_SW_DIV (target_flags & FAST_SW_DIV_FLAG)
++#define TARGET_INLINE_MEMCPY (target_flags & INLINE_MEMCPY_FLAG)
++#define TARGET_CACHE_VOLATILE (target_flags & CACHE_VOLATILE_FLAG)
++#define TARGET_BYPASS_CACHE (target_flags & BYPASS_CACHE_FLAG)
++
++#define TARGET_SWITCHES \
++{ \
++ { "hw-div", HAS_DIV_FLAG, \
++ N_("Enable DIV, DIVU") }, \
++ { "no-hw-div", -HAS_DIV_FLAG, \
++ N_("Disable DIV, DIVU (default)") }, \
++ { "hw-mul", HAS_MUL_FLAG, \
++ N_("Enable MUL instructions (default)") }, \
++ { "hw-mulx", HAS_MULX_FLAG, \
++ N_("Enable MULX instructions, assume fast shifter") }, \
++ { "no-hw-mul", -HAS_MUL_FLAG, \
++ N_("Disable MUL instructions") }, \
++ { "no-hw-mulx", -HAS_MULX_FLAG, \
++ N_("Disable MULX instructions, assume slow shifter (default and implied by -mno-hw-mul)") }, \
++ { "fast-sw-div", FAST_SW_DIV_FLAG, \
++ N_("Use table based fast divide (default at -O3)") }, \
++ { "no-fast-sw-div", -FAST_SW_DIV_FLAG, \
++ N_("Don't use table based fast divide ever") }, \
++ { "inline-memcpy", INLINE_MEMCPY_FLAG, \
++ N_("Inline small memcpy (default when optimizing)") }, \
++ { "no-inline-memcpy", -INLINE_MEMCPY_FLAG, \
++ N_("Don't Inline small memcpy") }, \
++ { "cache-volatile", CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use non-io variants of instructions (default)") }, \
++ { "no-cache-volatile", -CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use io variants of instructions") }, \
++ { "bypass-cache", BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins use io variants") }, \
++ { "no-bypass-cache", -BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins do not use io variants (default)") }, \
++ { "smallc", 0, \
++ N_("Link with a limited version of the C library") }, \
++ { "ctors-in-init", 0, \
++ "" /* undocumented: N_("Link with static constructors and destructors in init") */ }, \
++ { "", TARGET_DEFAULT, 0 } \
++}
++
++
++extern const char *nios2_sys_nosys_string; /* for -msys=nosys */
++extern const char *nios2_sys_lib_string; /* for -msys-lib= */
++extern const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++#define TARGET_OPTIONS \
++{ \
++ { "sys=nosys", &nios2_sys_nosys_string, \
++ N_("Use stub versions of OS library calls (default)"), 0}, \
++ { "sys-lib=", &nios2_sys_lib_string, \
++ N_("Name of System Library to link against. (Converted to a -l option)"), 0}, \
++ { "sys-crt0=", &nios2_sys_crt0_string, \
++ N_("Name of the startfile. (default is a crt0 for the ISS only)"), 0}, \
++}
++
++
++/* Default target_flags if no switches specified. */
++#ifndef TARGET_DEFAULT
++# define TARGET_DEFAULT (HAS_MUL_FLAG | CACHE_VOLATILE_FLAG)
++#endif
++
++/* Switch Recognition by gcc.c. Add -G xx support */
++#undef SWITCH_TAKES_ARG
++#define SWITCH_TAKES_ARG(CHAR) \
++ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
++
++#define OVERRIDE_OPTIONS override_options ()
++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE)
++#define CAN_DEBUG_WITHOUT_FP
++
++#define CC1_SPEC "\
++%{G*}"
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
++ %{msys-lib=*: -l%*} \
++ %{!msys-lib=*: -lc } \
++ --end-group \
++ %{msys-lib=: %eYou need a library name for -msys-lib=} \
++"
++
++
++#undef STARTFILE_SPEC
++#define STARTFILE_SPEC \
++"%{msys-crt0=*: %*} %{!msys-crt0=*: crt1%O%s} \
++ %{msys-crt0=: %eYou need a C startup file for -msys-crt0=} \
++ %{mctors-in-init: crti%O%s crtbegin%O%s} \
++"
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{mctors-in-init: crtend%O%s crtn%O%s}"
++
++
++/***********************
++ * Storage Layout
++ ***********************/
++
++#define DEFAULT_SIGNED_CHAR 1
++#define BITS_BIG_ENDIAN 0
++#define BYTES_BIG_ENDIAN 0
++#define WORDS_BIG_ENDIAN 0
++#define BITS_PER_UNIT 8
++#define BITS_PER_WORD 32
++#define UNITS_PER_WORD 4
++#define POINTER_SIZE 32
++#define BIGGEST_ALIGNMENT 32
++#define STRICT_ALIGNMENT 1
++#define FUNCTION_BOUNDARY 32
++#define PARM_BOUNDARY 32
++#define STACK_BOUNDARY 32
++#define PREFERRED_STACK_BOUNDARY 32
++#define MAX_FIXED_MODE_SIZE 64
++
++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
++ ((TREE_CODE (EXP) == STRING_CST) \
++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
++
++
++/**********************
++ * Layout of Source Language Data Types
++ **********************/
++
++#define INT_TYPE_SIZE 32
++#define SHORT_TYPE_SIZE 16
++#define LONG_TYPE_SIZE 32
++#define LONG_LONG_TYPE_SIZE 64
++#define FLOAT_TYPE_SIZE 32
++#define DOUBLE_TYPE_SIZE 64
++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
++
++
++/*************************
++ * Condition Code Status
++ ************************/
++
++/* comparison type */
++/* ??? currently only CMP_SI is used */
++enum cmp_type {
++ CMP_SI, /* compare four byte integers */
++ CMP_DI, /* compare eight byte integers */
++ CMP_SF, /* compare single precision floats */
++ CMP_DF, /* compare double precision floats */
++ CMP_MAX /* max comparison type */
++};
++
++extern GTY(()) rtx branch_cmp[2]; /* operands for compare */
++extern enum cmp_type branch_type; /* what type of branch to use */
++
++/**********************
++ * Register Usage
++ **********************/
++
++/* ---------------------------------- *
++ * Basic Characteristics of Registers
++ * ---------------------------------- */
++
++/*
++Register Number
++ Register Name
++ Alternate Name
++ Purpose
++0 r0 zero always zero
++1 r1 at Assembler Temporary
++2-3 r2-r3 Return Location
++4-7 r4-r7 Register Arguments
++8-15 r8-r15 Caller Saved Registers
++16-22 r16-r22 Callee Saved Registers
++23 r23 sc Static Chain (Callee Saved)
++ ??? Does $sc want to be caller or callee
++ saved. If caller, 15, else 23.
++24 r24 Exception Temporary
++25 r25 Breakpoint Temporary
++26 r26 gp Global Pointer
++27 r27 sp Stack Pointer
++28 r28 fp Frame Pointer
++29 r29 ea Exception Return Address
++30 r30 ba Breakpoint Return Address
++31 r31 ra Return Address
++
++32 ctl0 status
++33 ctl1 estatus STATUS saved by exception ?
++34 ctl2 bstatus STATUS saved by break ?
++35 ctl3 ipri Interrupt Priority Mask ?
++36 ctl4 ecause Exception Cause ?
++
++37 pc Not an actual register
++
++38 rap Return address pointer, this does not
++ actually exist and will be eliminated
++
++39 fake_fp Fake Frame Pointer which will always be eliminated.
++40 fake_ap Fake Argument Pointer which will always be eliminated.
++
++41 First Pseudo Register
++
++
++The definitions for all the hard register numbers
++are located in nios2.md.
++*/
++
++#define FIRST_PSEUDO_REGISTER 41
++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1)
++
++
++
++/* also see CONDITIONAL_REGISTER_USAGE */
++#define FIXED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++/* call used is the same as caller saved
++ + fixed regs + args + ret vals */
++#define CALL_USED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 10 */ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++#define HARD_REGNO_NREGS(REGNO, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++/* --------------------------- *
++ * How Values Fit in Registers
++ * --------------------------- */
++
++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
++
++#define MODES_TIEABLE_P(MODE1, MODE2) 1
++
++
++/*************************
++ * Register Classes
++ *************************/
++
++enum reg_class
++{
++ NO_REGS,
++ ALL_REGS,
++ LIM_REG_CLASSES
++};
++
++#define N_REG_CLASSES (int) LIM_REG_CLASSES
++
++#define REG_CLASS_NAMES \
++ {"NO_REGS", \
++ "ALL_REGS"}
++
++#define GENERAL_REGS ALL_REGS
++
++#define REG_CLASS_CONTENTS \
++/* NO_REGS */ {{ 0, 0}, \
++/* ALL_REGS */ {~0,~0}} \
++
++#define REGNO_REG_CLASS(REGNO) ALL_REGS
++
++#define BASE_REG_CLASS ALL_REGS
++#define INDEX_REG_CLASS ALL_REGS
++
++/* only one reg class, 'r', is handled automatically */
++#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS
++
++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \
++ ((STRICT) \
++ ? (REGNO) < FIRST_PSEUDO_REGISTER \
++ : (REGNO) < FIRST_PSEUDO_REGISTER || (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
++
++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT))
++
++#define REGNO_OK_FOR_BASE_P(REGNO) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, 1))
++
++#define REGNO_OK_FOR_INDEX_P(REGNO) \
++ (REGNO_OK_FOR_INDEX_P2 (REGNO, 1))
++
++#define REG_OK_FOR_BASE_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define REG_OK_FOR_INDEX_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define CLASS_MAX_NREGS(CLASS, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++
++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000)
++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000)
++#define UPPER16_INT(X) (((X) & 0xffff) == 0)
++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31)
++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31)
++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255)
++
++#define CONST_OK_FOR_LETTER_P(VALUE, C) \
++ ( \
++ (C) == 'I' ? SMALL_INT (VALUE) : \
++ (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) : \
++ (C) == 'K' ? UPPER16_INT (VALUE) : \
++ (C) == 'L' ? SHIFT_INT (VALUE) : \
++ (C) == 'M' ? (VALUE) == 0 : \
++ (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) : \
++ (C) == 'O' ? RDWRCTL_INT (VALUE) : \
++ 0)
++
++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
++
++#define PREFERRED_RELOAD_CLASS(X, CLASS) \
++ ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS))
++
++/* 'S' matches immediates which are in small data
++ and therefore can be added to gp to create a
++ 32-bit value. */
++#define EXTRA_CONSTRAINT(VALUE, C) \
++ ((C) == 'S' \
++ && (GET_CODE (VALUE) == SYMBOL_REF) \
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE))
++
++
++
++
++/* Say that the epilogue uses the return address register. Note that
++ in the case of sibcalls, the values "used by the epilogue" are
++ considered live at the start of the called function. */
++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO)
++
++
++#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
++
++/**********************************
++ * Trampolines for Nested Functions
++ ***********************************/
++
++#define TRAMPOLINE_TEMPLATE(FILE) \
++ error ("trampolines not yet implemented")
++#define TRAMPOLINE_SIZE 20
++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
++ error ("trampolines not yet implemented")
++
++/***************************
++ * Stack Layout and Calling Conventions
++ ***************************/
++
++/* ------------------ *
++ * Basic Stack Layout
++ * ------------------ */
++
++/* The downward variants are used by the compiler,
++ the upward ones serve as documentation */
++#define STACK_GROWS_DOWNWARD
++#define FRAME_GROWS_UPWARD
++#define ARGS_GROW_UPWARD
++
++#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
++#define FIRST_PARM_OFFSET(FUNDECL) 0
++
++/* Before the prologue, RA lives in r31. */
++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO)
++
++/* -------------------------------------- *
++ * Registers That Address the Stack Frame
++ * -------------------------------------- */
++
++#define STACK_POINTER_REGNUM SP_REGNO
++#define STATIC_CHAIN_REGNUM SC_REGNO
++#define PC_REGNUM PC_REGNO
++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO
++
++/* Base register for access to local variables of the function. We
++ pretend that the frame pointer is a non-existent hard register, and
++ then eliminate it to HARD_FRAME_POINTER_REGNUM. */
++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO
++
++#define HARD_FRAME_POINTER_REGNUM FP_REGNO
++#define RETURN_ADDRESS_POINTER_REGNUM RAP_REGNO
++/* the argumnet pointer needs to always be eliminated
++ so it is set to a fake hard register. */
++#define ARG_POINTER_REGNUM FAKE_AP_REGNO
++
++/* ----------------------------------------- *
++ * Eliminating Frame Pointer and Arg Pointer
++ * ----------------------------------------- */
++
++#define FRAME_POINTER_REQUIRED 0
++
++#define ELIMINABLE_REGS \
++{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
++
++#define CAN_ELIMINATE(FROM, TO) 1
++
++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
++ (OFFSET) = nios2_initial_elimination_offset ((FROM), (TO))
++
++#define MUST_SAVE_REGISTER(regno) \
++ ((regs_ever_live[regno] && !call_used_regs[regno]) \
++ || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \
++ || (regno == RA_REGNO && regs_ever_live[RA_REGNO]))
++
++/* Treat LOC as a byte offset from the stack pointer and round it up
++ to the next fully-aligned offset. */
++#define STACK_ALIGN(LOC) \
++ (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & ~((PREFERRED_STACK_BOUNDARY / 8) - 1))
++
++
++/* ------------------------------ *
++ * Passing Arguments in Registers
++ * ------------------------------ */
++
++/* see nios2.c */
++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
++ (function_arg (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
++ (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
++
++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
++
++typedef struct nios2_args
++{
++ int regs_used;
++} CUMULATIVE_ARGS;
++
++/* This is to initialize the above unused CUM data type */
++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
++ (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS))
++
++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
++ (function_arg_advance (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_REGNO_P(REGNO) \
++ ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO)
++
++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
++ { \
++ int pret_size = nios2_setup_incoming_varargs (&(CUM), (MODE), \
++ (TYPE), (NO_RTL)); \
++ if (pret_size) \
++ (PRETEND_SIZE) = pret_size; \
++ }
++
++/* ----------------------------- *
++ * Generating Code for Profiling
++ * ----------------------------- */
++
++#define PROFILE_BEFORE_PROLOGUE
++
++#define FUNCTION_PROFILER(FILE, LABELNO) \
++ function_profiler ((FILE), (LABELNO))
++
++/* --------------------------------------- *
++ * Passing Function Arguments on the Stack
++ * --------------------------------------- */
++
++#define PROMOTE_PROTOTYPES 1
++
++#define PUSH_ARGS 0
++#define ACCUMULATE_OUTGOING_ARGS 1
++
++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0
++
++/* --------------------------------------- *
++ * How Scalar Function Values Are Returned
++ * --------------------------------------- */
++
++#define FUNCTION_VALUE(VALTYPE, FUNC) \
++ gen_rtx(REG, TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO)
++
++#define LIBCALL_VALUE(MODE) \
++ gen_rtx(REG, MODE, FIRST_RETVAL_REGNO)
++
++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO)
++
++/* ----------------------------- *
++ * How Large Values Are Returned
++ * ----------------------------- */
++
++
++#define RETURN_IN_MEMORY(TYPE) \
++ nios2_return_in_memory (TYPE)
++
++
++#define STRUCT_VALUE 0
++
++#define DEFAULT_PCC_STRUCT_RETURN 0
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++
++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
++
++#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
++
++#define MAX_REGS_PER_ADDRESS 1
++
++/* Go to ADDR if X is a valid address. */
++#ifndef REG_OK_STRICT
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 0)) \
++ goto ADDR; \
++ }
++#else
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 1)) \
++ goto ADDR; \
++ }
++#endif
++
++#ifndef REG_OK_STRICT
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 0)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0)
++#else
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)
++#endif
++
++#define LEGITIMATE_CONSTANT_P(X) 1
++
++/* Nios II has no mode dependent addresses. */
++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
++
++/* Set if this has a weak declaration */
++#define SYMBOL_FLAG_WEAK_DECL (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
++#define SYMBOL_REF_WEAK_DECL_P(RTX) \
++ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0)
++
++
++/* true if a symbol is both small and not weak. In this case, gp
++ relative access can be used */
++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \
++ (SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX))
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++#define SLOW_BYTE_ACCESS 1
++
++/* It is as good to call a constant function address as to call an address
++ kept in a register.
++ ??? Not true anymore really. Now that call cannot address full range
++ of memory callr may need to be used */
++
++#define NO_FUNCTION_CSE
++#define NO_RECURSIVE_FUNCTION_CSE
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* ------------------------------------------ *
++ * The Overall Framework of an Assembler File
++ * ------------------------------------------ */
++
++#define ASM_APP_ON "#APP\n"
++#define ASM_APP_OFF "#NO_APP\n"
++
++#define ASM_COMMENT_START "# "
++
++/* ------------------------------- *
++ * Output and Generation of Labels
++ * ------------------------------- */
++
++#define GLOBAL_ASM_OP "\t.global\t"
++
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++#define DWARF2_UNWIND_INFO 0
++
++
++/* -------------------------------- *
++ * Assembler Commands for Alignment
++ * -------------------------------- */
++
++#define ASM_OUTPUT_ALIGN(FILE, LOG) \
++ do { \
++ fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \
++ } while (0)
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++#define REGISTER_NAMES \
++{ \
++ "zero", \
++ "at", \
++ "r2", \
++ "r3", \
++ "r4", \
++ "r5", \
++ "r6", \
++ "r7", \
++ "r8", \
++ "r9", \
++ "r10", \
++ "r11", \
++ "r12", \
++ "r13", \
++ "r14", \
++ "r15", \
++ "r16", \
++ "r17", \
++ "r18", \
++ "r19", \
++ "r20", \
++ "r21", \
++ "r22", \
++ "r23", \
++ "r24", \
++ "r25", \
++ "gp", \
++ "sp", \
++ "fp", \
++ "ta", \
++ "ba", \
++ "ra", \
++ "status", \
++ "estatus", \
++ "bstatus", \
++ "ipri", \
++ "ecause", \
++ "pc", \
++ "rap", \
++ "fake_fp", \
++ "fake_ap", \
++}
++
++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\
++ (PTR) = asm_output_opcode (STREAM, PTR)
++
++#define PRINT_OPERAND(STREAM, X, CODE) \
++ nios2_print_operand (STREAM, X, CODE)
++
++#define PRINT_OPERAND_ADDRESS(STREAM, X) \
++ nios2_print_operand_address (STREAM, X)
++
++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
++ fprintf (FILE, ".L%u\n", (unsigned) (VALUE)); \
++ } while (0)
++
++
++/* ------------ *
++ * Label Output
++ * ------------ */
++
++
++/* ---------------------------------------------------- *
++ * Dividing the Output into Sections (Texts, Data, ...)
++ * ---------------------------------------------------- */
++
++/* Output before read-only data. */
++#define TEXT_SECTION_ASM_OP ("\t.section\t.text")
++
++/* Output before writable data. */
++#define DATA_SECTION_ASM_OP ("\t.section\t.data")
++
++
++/* Default the definition of "small data" to 8 bytes. */
++/* ??? How come I can't use HOST_WIDE_INT here? */
++extern unsigned long nios2_section_threshold;
++#define NIOS2_DEFAULT_GVALUE 8
++
++
++
++/* This says how to output assembler code to declare an
++ uninitialized external linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef COMMON_ASM_OP
++#define COMMON_ASM_OP "\t.comm\t"
++
++#undef ASM_OUTPUT_ALIGNED_COMMON
++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
++do \
++{ \
++ if ((SIZE) <= nios2_section_threshold) \
++ { \
++ named_section (0, ".sbss", 0); \
++ (*targetm.asm_out.globalize_label) (FILE, NAME); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++ } \
++ else \
++ { \
++ fprintf ((FILE), "%s", COMMON_ASM_OP); \
++ assemble_name ((FILE), (NAME)); \
++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
++ } \
++} \
++while (0)
++
++
++/* This says how to output assembler code to declare an
++ uninitialized internal linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef ASM_OUTPUT_ALIGNED_LOCAL
++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
++do { \
++ if ((SIZE) <= nios2_section_threshold) \
++ named_section (0, ".sbss", 0); \
++ else \
++ named_section (0, ".bss", 0); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++} while (0)
++
++
++
++/***************************
++ * Miscellaneous Parameters
++ ***************************/
++
++#define MOVE_MAX 4
++
++#define Pmode SImode
++#define FUNCTION_MODE QImode
++
++#define CASE_VECTOR_MODE Pmode
++
++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
++
++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND)
++
++#define WORD_REGISTER_OPERATIONS
+--- gcc-3.4.3/gcc/config/nios2/nios2.md
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.md
+@@ -0,0 +1,2078 @@
++;; Machine Description for Altera NIOS 2G NIOS2 version.
++;; Copyright (C) 2003 Altera
++;; Contributed by Jonah Graham (jgraham@altera.com).
++;;
++;; This file is part of GNU CC.
++;;
++;; GNU CC 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 2, or (at your option)
++;; any later version.
++;;
++;; GNU CC 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 GNU CC; see the file COPYING. If not, write to
++;; the Free Software Foundation, 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA. */
++
++
++
++;*****************************************************************************
++;*
++;* constants
++;*
++;*****************************************************************************
++(define_constants [
++ (GP_REGNO 26)
++ (SP_REGNO 27)
++ (FP_REGNO 28)
++ (RA_REGNO 31)
++ (RAP_REGNO 38)
++ (FIRST_RETVAL_REGNO 2)
++ (LAST_RETVAL_REGNO 3)
++ (FIRST_ARG_REGNO 4)
++ (LAST_ARG_REGNO 7)
++ (SC_REGNO 23)
++ (PC_REGNO 37)
++ (FAKE_FP_REGNO 39)
++ (FAKE_AP_REGNO 40)
++
++
++ (UNSPEC_BLOCKAGE 0)
++ (UNSPEC_LDBIO 1)
++ (UNSPEC_LDBUIO 2)
++ (UNSPEC_LDHIO 3)
++ (UNSPEC_LDHUIO 4)
++ (UNSPEC_LDWIO 5)
++ (UNSPEC_STBIO 6)
++ (UNSPEC_STHIO 7)
++ (UNSPEC_STWIO 8)
++ (UNSPEC_SYNC 9)
++ (UNSPEC_WRCTL 10)
++ (UNSPEC_RDCTL 11)
++
++])
++
++
++
++;*****************************************************************************
++;*
++;* instruction scheduler
++;*
++;*****************************************************************************
++
++; No schedule info is currently available, using an assumption that no
++; instruction can use the results of the previous instruction without
++; incuring a stall.
++
++; length of an instruction (in bytes)
++(define_attr "length" "" (const_int 4))
++(define_attr "type" "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" (const_string "complex"))
++
++(define_asm_attributes
++ [(set_attr "length" "4")
++ (set_attr "type" "complex")])
++
++(define_automaton "nios2")
++(automata_option "v")
++;(automata_option "no-minimization")
++(automata_option "ndfa")
++
++; The nios2 pipeline is fairly straightforward for the fast model.
++; Every alu operation is pipelined so that an instruction can
++; be issued every cycle. However, there are still potential
++; stalls which this description tries to deal with.
++
++(define_cpu_unit "cpu" "nios2")
++
++(define_insn_reservation "complex" 1
++ (eq_attr "type" "complex")
++ "cpu")
++
++(define_insn_reservation "control" 1
++ (eq_attr "type" "control")
++ "cpu")
++
++(define_insn_reservation "alu" 1
++ (eq_attr "type" "alu")
++ "cpu")
++
++(define_insn_reservation "cond_alu" 1
++ (eq_attr "type" "cond_alu")
++ "cpu")
++
++(define_insn_reservation "st" 1
++ (eq_attr "type" "st")
++ "cpu")
++
++(define_insn_reservation "custom" 1
++ (eq_attr "type" "custom")
++ "cpu")
++
++; shifts, muls and lds have three cycle latency
++(define_insn_reservation "ld" 3
++ (eq_attr "type" "ld")
++ "cpu")
++
++(define_insn_reservation "shift" 3
++ (eq_attr "type" "shift")
++ "cpu")
++
++(define_insn_reservation "mul" 3
++ (eq_attr "type" "mul")
++ "cpu")
++
++(define_insn_reservation "div" 1
++ (eq_attr "type" "div")
++ "cpu")
++
++
++;*****************************************************************************
++;*
++;* MOV Instructions
++;*
++;*****************************************************************************
++
++(define_expand "movqi"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "")
++ (match_operand:QI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, QImode))
++ DONE;
++})
++
++(define_insn "movqi_internal"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r")
++ (match_operand:QI 1 "general_operand" "rM,m,rM,I"))]
++ "(register_operand (operands[0], QImode)
++ || register_operand (operands[1], QImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stb%o0\\t%z1, %0
++ ldbu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu")])
++
++(define_insn "ldbio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldbuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stbio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)]
++ ""
++ "stbio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++(define_expand "movhi"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "")
++ (match_operand:HI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, HImode))
++ DONE;
++})
++
++(define_insn "movhi_internal"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r")
++ (match_operand:HI 1 "general_operand" "rM,m,rM,I,J"))]
++ "(register_operand (operands[0], HImode)
++ || register_operand (operands[1], HImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ sth%o0\\t%z1, %0
++ ldhu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu,alu")])
++
++(define_insn "ldhio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldhuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "sthio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)]
++ ""
++ "sthio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++(define_expand "movsi"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "")
++ (match_operand:SI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, SImode))
++ DONE;
++})
++
++(define_insn "movsi_internal"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r")
++ (match_operand:SI 1 "general_operand" "rM,m,rM,I,J,S,i"))]
++ "(register_operand (operands[0], SImode)
++ || register_operand (operands[1], SImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stw%o0\\t%z1, %0
++ ldw%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1
++ addi\\t%0, gp, %%gprel(%1)
++ movhi\\t%0, %H1\;addi\\t%0, %0, %L1"
++ [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")])
++
++(define_insn "ldwio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldwio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stwio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)]
++ ""
++ "stwio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++
++;*****************************************************************************
++;*
++;* zero extension
++;*
++;*****************************************************************************
++
++
++(define_insn "zero_extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xffff
++ ldhu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "=r,r")
++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++
++
++;*****************************************************************************
++;*
++;* sign extension
++;*
++;*****************************************************************************
++
++(define_expand "extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (16);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendhisi2_internal"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
++ ""
++ "ldh%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_expand "extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "")
++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op0 = gen_lowpart (SImode, operands[0]);
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (op0, temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqihi2_internal"
++ [(set (match_operand:HI 0 "register_operand" "=r")
++ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++(define_expand "extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqisi2_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++
++;*****************************************************************************
++;*
++;* Arithmetic Operations
++;*
++;*****************************************************************************
++
++(define_insn "addsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ ""
++ "add%i2\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "subsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++ "sub\\t%0, %z1, %2"
++ [(set_attr "type" "alu")])
++
++(define_insn "mulsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (mult:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ "TARGET_HAS_MUL"
++ "mul%i2\\t%0, %1, %z2"
++ [(set_attr "type" "mul")])
++
++(define_expand "divsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++{
++ if (!TARGET_HAS_DIV)
++ {
++ if (!TARGET_FAST_SW_DIV)
++ FAIL;
++ else
++ {
++ if (nios2_emit_expensive_div (operands, SImode))
++ DONE;
++ }
++ }
++})
++
++(define_insn "divsi3_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "div\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "udivsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (udiv:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "divu\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "smulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxss\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++(define_insn "umulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxuu\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++
++(define_expand "mulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
++ (sign_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++(define_expand "umulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
++ (zero_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++
++
++;*****************************************************************************
++;*
++;* Negate and ones complement
++;*
++;*****************************************************************************
++
++(define_insn "negsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (neg:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "sub\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++(define_insn "one_cmplsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (not:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "nor\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++
++
++; Logical Operantions
++
++(define_insn "andsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (and:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ and\\t%0, %1, %z2
++ and%i2\\t%0, %1, %2
++ andh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "iorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (ior:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ or\\t%0, %1, %z2
++ or%i2\\t%0, %1, %2
++ orh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "*norsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (and:SI (not:SI (match_operand:SI 1 "register_operand" "%r"))
++ (not:SI (match_operand:SI 2 "reg_or_0_operand" "rM"))))]
++ ""
++ "nor\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "xorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (xor:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ xor\\t%0, %1, %z2
++ xor%i2\\t%0, %1, %2
++ xorh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++
++
++;*****************************************************************************
++;*
++;* Shifts
++;*
++;*****************************************************************************
++
++(define_insn "ashlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashift:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sll%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "ashrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sra%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "lshrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "srl%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotate:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "rol%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotatert:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "register_operand" "r,r")))]
++ ""
++ "ror\\t%0, %1, %2"
++ [(set_attr "type" "shift")])
++
++(define_insn "*shift_mul_constants"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ashift:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "const_int_operand" "I"))
++ (match_operand:SI 3 "const_int_operand" "I")))]
++ "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))"
++{
++ HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]);
++ rtx ops[3];
++
++ ops[0] = operands[0];
++ ops[1] = operands[1];
++ ops[2] = GEN_INT (mul);
++
++ output_asm_insn ("muli\t%0, %1, %2", ops);
++ return "";
++}
++ [(set_attr "type" "mul")])
++
++
++
++
++;*****************************************************************************
++;*
++;* Prologue, Epilogue and Return
++;*
++;*****************************************************************************
++
++(define_expand "prologue"
++ [(const_int 1)]
++ ""
++{
++ expand_prologue ();
++ DONE;
++})
++
++(define_expand "epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (false);
++ DONE;
++})
++
++(define_expand "sibcall_epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (true);
++ DONE;
++})
++
++(define_insn "return"
++ [(return)]
++ "reload_completed && nios2_can_use_return_insn ()"
++ "ret\\t"
++)
++
++(define_insn "return_from_epilogue"
++ [(use (match_operand 0 "pmode_register_operand" ""))
++ (return)]
++ "reload_completed"
++ "ret\\t"
++)
++
++;; Block any insns from being moved before this point, since the
++;; profiling call to mcount can use various registers that aren't
++;; saved or used to pass arguments.
++
++(define_insn "blockage"
++ [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)]
++ ""
++ ""
++ [(set_attr "type" "unknown")
++ (set_attr "length" "0")])
++
++
++
++;*****************************************************************************
++;*
++;* Jumps and Calls
++;*
++;*****************************************************************************
++
++(define_insn "indirect_jump"
++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "jump"
++ [(set (pc)
++ (label_ref (match_operand 0 "" "")))]
++ ""
++ "br\\t%0"
++ [(set_attr "type" "control")])
++
++
++(define_insn "indirect_call"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "indirect_call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%1"
++)
++
++(define_expand "call"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_expand "call_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_insn "*call"
++ [(call (mem:QI (match_operand:SI 0 "immediate_operand" "i"))
++ (match_operand 1 "" ""))
++ (clobber (match_operand:SI 2 "register_operand" "=r"))]
++ ""
++ "call\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "*call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "immediate_operand" "i"))
++ (match_operand 2 "" "")))
++ (clobber (match_operand:SI 3 "register_operand" "=r"))]
++ ""
++ "call\\t%1"
++ [(set_attr "type" "control")])
++
++(define_expand "sibcall"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))])]
++ ""
++ {
++ XEXP (operands[0], 0) = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
++
++ if (operands[2] == NULL_RTX)
++ operands[2] = const0_rtx;
++ }
++)
++
++(define_expand "sibcall_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))])]
++ ""
++ {
++ XEXP (operands[1], 0) = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
++
++ if (operands[3] == NULL_RTX)
++ operands[3] = const0_rtx;
++ }
++)
++
++(define_insn "sibcall_insn"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))]
++ ""
++ "jmp\\t%0"
++)
++
++(define_insn "sibcall_value_insn"
++ [(set (match_operand 0 "register_operand" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))]
++ ""
++ "jmp\\t%1"
++)
++
++
++
++
++(define_expand "tablejump"
++ [(parallel [(set (pc) (match_operand 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))])]
++ ""
++ ""
++)
++
++(define_insn "*tablejump"
++ [(set (pc)
++ (match_operand:SI 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Comparisons
++;*
++;*****************************************************************************
++;; Flow here is rather complex (based on MIPS):
++;;
++;; 1) The cmp{si,di,sf,df} routine is called. It deposits the
++;; arguments into the branch_cmp array, and the type into
++;; branch_type. No RTL is generated.
++;;
++;; 2) The appropriate branch define_expand is called, which then
++;; creates the appropriate RTL for the comparison and branch.
++;; Different CC modes are used, based on what type of branch is
++;; done, so that we can constrain things appropriately. There
++;; are assumptions in the rest of GCC that break if we fold the
++;; operands into the branchs for integer operations, and use cc0
++;; for floating point, so we use the fp status register instead.
++;; If needed, an appropriate temporary is created to hold the
++;; of the integer compare.
++
++(define_expand "cmpsi"
++ [(set (cc0)
++ (compare:CC (match_operand:SI 0 "register_operand" "")
++ (match_operand:SI 1 "arith_operand" "")))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = operands[1];
++ branch_type = CMP_SI;
++ DONE;
++})
++
++(define_expand "tstsi"
++ [(set (cc0)
++ (match_operand:SI 0 "register_operand" ""))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = const0_rtx;
++ branch_type = CMP_SI;
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* setting a register from a comparison
++;*
++;*****************************************************************************
++
++(define_expand "seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpeq%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpne%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmplt\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpge%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpge\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmplt%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpltu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpgeu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpgeu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpltu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++
++
++;*****************************************************************************
++;*
++;* branches
++;*
++;*****************************************************************************
++
++(define_insn "*cbranch"
++ [(set (pc)
++ (if_then_else
++ (match_operator:SI 0 "comparison_operator"
++ [(match_operand:SI 2 "reg_or_0_operand" "rM")
++ (match_operand:SI 3 "reg_or_0_operand" "rM")])
++ (label_ref (match_operand 1 "" ""))
++ (pc)))]
++ ""
++ "b%0\\t%z2, %z3, %l1"
++ [(set_attr "type" "control")])
++
++
++(define_expand "beq"
++ [(set (pc)
++ (if_then_else (eq:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bne"
++ [(set (pc)
++ (if_then_else (ne:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgt"
++ [(set (pc)
++ (if_then_else (gt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bge"
++ [(set (pc)
++ (if_then_else (ge:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "ble"
++ [(set (pc)
++ (if_then_else (le:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "blt"
++ [(set (pc)
++ (if_then_else (lt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgtu"
++ [(set (pc)
++ (if_then_else (gtu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bgeu"
++ [(set (pc)
++ (if_then_else (geu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bleu"
++ [(set (pc)
++ (if_then_else (leu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bltu"
++ [(set (pc)
++ (if_then_else (ltu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* String and Block Operations
++;*
++;*****************************************************************************
++
++; ??? This is all really a hack to get Dhrystone to work as fast as possible
++; things to be fixed:
++; * let the compiler core handle all of this, for that to work the extra
++; aliasing needs to be addressed.
++; * we use three temporary registers for loading and storing to ensure no
++; ld use stalls, this is excessive, because after the first ld/st only
++; two are needed. Only two would be needed all the way through if
++; we could schedule with other code. Consider:
++; 1 ld $1, 0($src)
++; 2 ld $2, 4($src)
++; 3 ld $3, 8($src)
++; 4 st $1, 0($dest)
++; 5 ld $1, 12($src)
++; 6 st $2, 4($src)
++; 7 etc.
++; The first store has to wait until 4. If it does not there will be one
++; cycle of stalling. However, if any other instruction could be placed
++; between 1 and 4, $3 would not be needed.
++; * In small we probably don't want to ever do this ourself because there
++; is no ld use stall.
++
++(define_expand "movstrsi"
++ [(parallel [(set (match_operand:BLK 0 "general_operand" "")
++ (match_operand:BLK 1 "general_operand" ""))
++ (use (match_operand:SI 2 "const_int_operand" ""))
++ (use (match_operand:SI 3 "const_int_operand" ""))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))])]
++ "TARGET_INLINE_MEMCPY"
++{
++ rtx ld_addr_reg, st_addr_reg;
++
++ /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr
++ it trys to copy to a register, but does not re-try the predicate.
++ ??? Intead of fixing expr.c, I fix it here. */
++ if (!const_int_operand (operands[2], SImode))
++ FAIL;
++
++ /* ??? there are some magic numbers which need to be sorted out here.
++ the basis for them is not increasing code size hugely or going
++ out of range of offset addressing */
++ if (INTVAL (operands[3]) < 4)
++ FAIL;
++ if (!optimize
++ || (optimize_size && INTVAL (operands[2]) > 12)
++ || (optimize < 3 && INTVAL (operands[2]) > 100)
++ || INTVAL (operands[2]) > 200)
++ FAIL;
++
++ st_addr_reg
++ = replace_equiv_address (operands[0],
++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
++ ld_addr_reg
++ = replace_equiv_address (operands[1],
++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
++ emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg,
++ operands[2], operands[3]));
++
++ DONE;
++})
++
++
++(define_insn "movstrsi_internal"
++ [(set (match_operand:BLK 0 "memory_operand" "=o")
++ (match_operand:BLK 1 "memory_operand" "o"))
++ (use (match_operand:SI 2 "const_int_operand" "i"))
++ (use (match_operand:SI 3 "const_int_operand" "i"))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))]
++ "TARGET_INLINE_MEMCPY"
++{
++ int ld_offset = INTVAL (operands[2]);
++ int ld_len = INTVAL (operands[2]);
++ int ld_reg = 0;
++ rtx ld_addr_reg = XEXP (operands[1], 0);
++ int st_offset = INTVAL (operands[2]);
++ int st_len = INTVAL (operands[2]);
++ int st_reg = 0;
++ rtx st_addr_reg = XEXP (operands[0], 0);
++ int delay_count = 0;
++
++ /* ops[0] is the address used by the insn
++ ops[1] is the register being loaded or stored */
++ rtx ops[2];
++
++ if (INTVAL (operands[3]) < 4)
++ abort ();
++
++ while (ld_offset >= 4)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldw\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 4;
++ delay_count++;
++ }
++
++ if (ld_offset >= 2)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldh\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 2;
++ delay_count++;
++ }
++
++ if (ld_offset >= 1)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldb\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 1;
++ delay_count++;
++ }
++
++ while (st_offset >= 4)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ while (st_offset >= 2)
++ {
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("sth\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 2;
++ }
++
++ while (st_offset >= 1)
++ {
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stb\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 1;
++ }
++
++ return "";
++}
++; ??? lengths are not being used yet, but I will probably forget
++; to update this once I am using lengths, so set it to something
++; definetely big enough to cover it. 400 allows for 200 bytes
++; of motion.
++ [(set_attr "length" "400")])
++
++
++
++;*****************************************************************************
++;*
++;* Custom instructions
++;*
++;*****************************************************************************
++
++(define_constants [
++ (CUSTOM_N 100)
++ (CUSTOM_NI 101)
++ (CUSTOM_NF 102)
++ (CUSTOM_NP 103)
++ (CUSTOM_NII 104)
++ (CUSTOM_NIF 105)
++ (CUSTOM_NIP 106)
++ (CUSTOM_NFI 107)
++ (CUSTOM_NFF 108)
++ (CUSTOM_NFP 109)
++ (CUSTOM_NPI 110)
++ (CUSTOM_NPF 111)
++ (CUSTOM_NPP 112)
++ (CUSTOM_IN 113)
++ (CUSTOM_INI 114)
++ (CUSTOM_INF 115)
++ (CUSTOM_INP 116)
++ (CUSTOM_INII 117)
++ (CUSTOM_INIF 118)
++ (CUSTOM_INIP 119)
++ (CUSTOM_INFI 120)
++ (CUSTOM_INFF 121)
++ (CUSTOM_INFP 122)
++ (CUSTOM_INPI 123)
++ (CUSTOM_INPF 124)
++ (CUSTOM_INPP 125)
++ (CUSTOM_FN 126)
++ (CUSTOM_FNI 127)
++ (CUSTOM_FNF 128)
++ (CUSTOM_FNP 129)
++ (CUSTOM_FNII 130)
++ (CUSTOM_FNIF 131)
++ (CUSTOM_FNIP 132)
++ (CUSTOM_FNFI 133)
++ (CUSTOM_FNFF 134)
++ (CUSTOM_FNFP 135)
++ (CUSTOM_FNPI 136)
++ (CUSTOM_FNPF 137)
++ (CUSTOM_FNPP 138)
++ (CUSTOM_PN 139)
++ (CUSTOM_PNI 140)
++ (CUSTOM_PNF 141)
++ (CUSTOM_PNP 142)
++ (CUSTOM_PNII 143)
++ (CUSTOM_PNIF 144)
++ (CUSTOM_PNIP 145)
++ (CUSTOM_PNFI 146)
++ (CUSTOM_PNFF 147)
++ (CUSTOM_PNFP 148)
++ (CUSTOM_PNPI 149)
++ (CUSTOM_PNPF 150)
++ (CUSTOM_PNPP 151)
++])
++
++
++(define_insn "custom_n"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)]
++ ""
++ "custom\\t%0, zero, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ni"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NI)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")] CUSTOM_NF)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_np"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NP)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nii"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NII)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nif"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NIF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nip"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NIP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nff"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NFF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NPF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_in"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_IN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ini"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_INF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++(define_insn "custom_fn"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_FN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fni"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_FNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnii"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnif"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnip"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnff"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_pn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_PN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pni"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_PNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++
++;*****************************************************************************
++;*
++;* Misc
++;*
++;*****************************************************************************
++
++(define_insn "nop"
++ [(const_int 0)]
++ ""
++ "nop\\t"
++ [(set_attr "type" "alu")])
++
++(define_insn "sync"
++ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
++ ""
++ "sync\\t"
++ [(set_attr "type" "control")])
++
++
++(define_insn "rdctl"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] UNSPEC_RDCTL))]
++ ""
++ "rdctl\\t%0, ctl%1"
++ [(set_attr "type" "control")])
++
++(define_insn "wrctl"
++ [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand" "O")
++ (match_operand:SI 1 "register_operand" "r")] UNSPEC_WRCTL)]
++ ""
++ "wrctl\\tctl%0, %1"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Peepholes
++;*
++;*****************************************************************************
++
++
+--- gcc-3.4.3/gcc/config/nios2/t-nios2
++++ gcc-3.4.3-nios2/gcc/config/nios2/t-nios2
+@@ -0,0 +1,123 @@
++##
++## Compiler flags to use when compiling libgcc2.c.
++##
++## LIB2FUNCS_EXTRA
++## A list of source file names to be compiled or assembled and inserted into libgcc.a.
++
++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \
++ $(srcdir)/config/nios2/lib2-divmod-hi.c \
++ $(srcdir)/config/nios2/lib2-divtable.c \
++ $(srcdir)/config/nios2/lib2-mul.c
++
++##
++## Floating Point Emulation
++## To have GCC include software floating point libraries in libgcc.a define FPBIT
++## and DPBIT along with a few rules as follows:
++##
++## # We want fine grained libraries, so use the new code
++## # to build the floating point emulation libraries.
++FPBIT=$(srcdir)/config/nios2/nios2-fp-bit.c
++DPBIT=$(srcdir)/config/nios2/nios2-dp-bit.c
++
++TARGET_LIBGCC2_CFLAGS = -O2
++
++# FLOAT_ONLY - no doubles
++# SMALL_MACHINE - QI/HI is faster than SI
++# Actually SMALL_MACHINE uses chars and shorts instead of ints
++# since ints (16-bit ones as they are today) are at least as fast
++# as chars and shorts, don't define SMALL_MACHINE
++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code )
++
++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '#define FLOAT' > ${FPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${FPBIT}
++
++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '' > ${DPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${DPBIT}
++
++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
++
++# Assemble startup files.
++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm
++
++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm
++
++
++## You may need to provide additional #defines at the beginning of
++## fp-bit.c and dp-bit.c to control target endianness and other options
++##
++## CRTSTUFF_T_CFLAGS
++## Special flags used when compiling crtstuff.c. See Initialization.
++##
++## CRTSTUFF_T_CFLAGS_S
++## Special flags used when compiling crtstuff.c for shared linking. Used
++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization.
++##
++## MULTILIB_OPTIONS
++## For some targets, invoking GCC in different ways produces objects that
++## can not be linked together. For example, for some targets GCC produces
++## both big and little endian code. For these targets, you must arrange
++## for multiple versions of libgcc.a to be compiled, one for each set of
++## incompatible options. When GCC invokes the linker, it arranges to link
++## in the right version of libgcc.a, based on the command line options
++## used.
++## The MULTILIB_OPTIONS macro lists the set of options for which special
++## versions of libgcc.a must be built. Write options that are mutually
++## incompatible side by side, separated by a slash. Write options that may
++## be used together separated by a space. The build procedure will build
++## all combinations of compatible options.
++##
++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float,
++## Makefile will build special versions of libgcc.a using the following
++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float,
++## and -m68020 -msoft-float.
++
++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx
++
++## MULTILIB_DIRNAMES
++## If MULTILIB_OPTIONS is used, this variable specifies the directory names
++## that should be used to hold the various libraries. Write one element in
++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If
++## MULTILIB_DIRNAMES is not used, the default value will be
++## MULTILIB_OPTIONS, with all slashes treated as spaces.
++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float,
++## then the default value of MULTILIB_DIRNAMES is m68000 m68020
++## msoft-float. You may specify a different value if you desire a
++## different set of directory names.
++
++# MULTILIB_DIRNAMES =
++
++## MULTILIB_MATCHES
++## Sometimes the same option may be written in two different ways. If an
++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any
++## synonyms. In that case, set MULTILIB_MATCHES to a list of items of the
++## form option=option to describe all relevant synonyms. For example,
++## m68000=mc68000 m68020=mc68020.
++##
++## MULTILIB_EXCEPTIONS
++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being
++## specified, there are combinations that should not be built. In that
++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in
++## shell case syntax that should not be built.
++## For example, in the PowerPC embedded ABI support, it is not desirable to
++## build libraries compiled with the -mcall-aix option and either of the
++## -fleading-underscore or -mlittle options at the same time. Therefore
++## MULTILIB_EXCEPTIONS is set to
++##
++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
++##
++
++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx*
++
++##
++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building
++## multiple versions of libgcc.a certain options should always be passed on
++## to the compiler. In that case, set MULTILIB_EXTRA_OPTS to be the list
++## of options to be used for all builds.
++##
++
+--- gcc-3.4.3/gcc/config.gcc
++++ gcc-3.4.3-nios2/gcc/config.gcc
+@@ -1321,6 +1321,10 @@ m32rle-*-linux*)
+ thread_file='posix'
+ fi
+ ;;
++# JBG
++nios2-*-* | nios2-*-*)
++ tm_file="elfos.h ${tm_file}"
++ ;;
+ # m68hc11 and m68hc12 share the same machine description.
+ m68hc11-*-*|m6811-*-*)
+ tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
+--- gcc-3.4.3/gcc/cse.c
++++ gcc-3.4.3-nios2/gcc/cse.c
+@@ -3134,6 +3134,10 @@ find_comparison_args (enum rtx_code code
+ #ifdef FLOAT_STORE_FLAG_VALUE
+ REAL_VALUE_TYPE fsfv;
+ #endif
++#ifdef __nios2__
++ if (p->is_const)
++ break;
++#endif
+
+ /* If the entry isn't valid, skip it. */
+ if (! exp_equiv_p (p->exp, p->exp, 1, 0))
+--- gcc-3.4.3/gcc/doc/extend.texi
++++ gcc-3.4.3-nios2/gcc/doc/extend.texi
+@@ -5636,12 +5636,118 @@ to those machines. Generally these gene
+ instructions, but allow the compiler to schedule those calls.
+
+ @menu
++* Altera Nios II Built-in Functions::
+ * Alpha Built-in Functions::
+ * ARM Built-in Functions::
+ * X86 Built-in Functions::
+ * PowerPC AltiVec Built-in Functions::
+ @end menu
+
++@node Altera Nios II Built-in Functions
++@subsection Altera Nios II Built-in Functions
++
++These built-in functions are available for the Altera Nios II
++family of processors.
++
++The following built-in functions are always available. They
++all generate the machine instruction that is part of the name.
++
++@example
++int __builtin_ldbio (volatile const void *)
++int __builtin_ldbuio (volatile const void *)
++int __builtin_ldhio (volatile const void *)
++int __builtin_ldhuio (volatile const void *)
++int __builtin_ldwio (volatile const void *)
++void __builtin_stbio (volatile void *, int)
++void __builtin_sthio (volatile void *, int)
++void __builtin_stwio (volatile void *, int)
++void __builtin_sync (void)
++int __builtin_rdctl (int)
++void __builtin_wrctl (int, int)
++@end example
++
++The following built-in functions are always available. They
++all generate a Nios II Custom Instruction. The name of the
++function represents the types that the function takes and
++returns. The letter before the @code{n} is the return type
++or void if absent. The @code{n} represnts the first parameter
++to all the custom instructions, the custom instruction number.
++The two letters after the @code{n} represent the up to two
++parameters to the function.
++
++The letters reprsent the following data types:
++@table @code
++@item <no letter>
++@code{void} for return type and no parameter for parameter types.
++
++@item i
++@code{int} for return type and parameter type
++
++@item f
++@code{float} for return type and parameter type
++
++@item p
++@code{void *} for return type and parameter type
++
++@end table
++
++And the function names are:
++@example
++void __builtin_custom_n (void)
++void __builtin_custom_ni (int)
++void __builtin_custom_nf (float)
++void __builtin_custom_np (void *)
++void __builtin_custom_nii (int, int)
++void __builtin_custom_nif (int, float)
++void __builtin_custom_nip (int, void *)
++void __builtin_custom_nfi (float, int)
++void __builtin_custom_nff (float, float)
++void __builtin_custom_nfp (float, void *)
++void __builtin_custom_npi (void *, int)
++void __builtin_custom_npf (void *, float)
++void __builtin_custom_npp (void *, void *)
++int __builtin_custom_in (void)
++int __builtin_custom_ini (int)
++int __builtin_custom_inf (float)
++int __builtin_custom_inp (void *)
++int __builtin_custom_inii (int, int)
++int __builtin_custom_inif (int, float)
++int __builtin_custom_inip (int, void *)
++int __builtin_custom_infi (float, int)
++int __builtin_custom_inff (float, float)
++int __builtin_custom_infp (float, void *)
++int __builtin_custom_inpi (void *, int)
++int __builtin_custom_inpf (void *, float)
++int __builtin_custom_inpp (void *, void *)
++float __builtin_custom_fn (void)
++float __builtin_custom_fni (int)
++float __builtin_custom_fnf (float)
++float __builtin_custom_fnp (void *)
++float __builtin_custom_fnii (int, int)
++float __builtin_custom_fnif (int, float)
++float __builtin_custom_fnip (int, void *)
++float __builtin_custom_fnfi (float, int)
++float __builtin_custom_fnff (float, float)
++float __builtin_custom_fnfp (float, void *)
++float __builtin_custom_fnpi (void *, int)
++float __builtin_custom_fnpf (void *, float)
++float __builtin_custom_fnpp (void *, void *)
++void * __builtin_custom_pn (void)
++void * __builtin_custom_pni (int)
++void * __builtin_custom_pnf (float)
++void * __builtin_custom_pnp (void *)
++void * __builtin_custom_pnii (int, int)
++void * __builtin_custom_pnif (int, float)
++void * __builtin_custom_pnip (int, void *)
++void * __builtin_custom_pnfi (float, int)
++void * __builtin_custom_pnff (float, float)
++void * __builtin_custom_pnfp (float, void *)
++void * __builtin_custom_pnpi (void *, int)
++void * __builtin_custom_pnpf (void *, float)
++void * __builtin_custom_pnpp (void *, void *)
++@end example
++
++
+ @node Alpha Built-in Functions
+ @subsection Alpha Built-in Functions
+
+--- gcc-3.4.3/gcc/doc/invoke.texi
++++ gcc-3.4.3-nios2/gcc/doc/invoke.texi
+@@ -337,6 +337,14 @@ in the following sections.
+ @item Machine Dependent Options
+ @xref{Submodel Options,,Hardware Models and Configurations}.
+
++@emph{Altera Nios II Options}
++@gccoptlist{-msmallc -mno-bypass-cache -mbypass-cache @gol
++-mno-cache-volatile -mcache-volatile -mno-inline-memcpy @gol
++-minline-memcpy -mno-fast-sw-div -mfast-sw-div @gol
++-mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx @gol
++-mno-hw-div -mhw-div @gol
++-msys-crt0= -msys-lib= -msys=nosys }
++
+ @emph{M680x0 Options}
+ @gccoptlist{-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
+ -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 @gol
+@@ -5836,6 +5844,7 @@ machine description. The default for th
+ that macro, which enables you to change the defaults.
+
+ @menu
++* Altera Nios II Options::
+ * M680x0 Options::
+ * M68hc1x Options::
+ * VAX Options::
+@@ -5871,6 +5880,103 @@ that macro, which enables you to change
+ * FRV Options::
+ @end menu
+
++
++@node Altera Nios II Options
++@subsection Altera Nios II Options
++@cindex Altera Nios II options
++
++These are the @samp{-m} options defined for the Altera Nios II
++processor.
++
++@table @gcctabopt
++
++@item -msmallc
++@opindex msmallc
++
++Link with a limited version of the C library, -lsmallc. For more
++information see the C Library Documentation.
++
++
++@item -mbypass-cache
++@itemx -mno-bypass-cache
++@opindex mno-bypass-cache
++@opindex mbypass-cache
++
++Force all load and store instructions to always bypass cache by
++using io variants of the instructions. The default is to not
++bypass the cache.
++
++@item -mno-cache-volatile
++@itemx -mcache-volatile
++@opindex mcache-volatile
++@opindex mno-cache-volatile
++
++Volatile memory access bypass the cache using the io variants of
++the ld and st instructions. The default is to cache volatile
++accesses.
++
++-mno-cache-volatile is deprecated and will be deleted in a
++future GCC release.
++
++
++@item -mno-inline-memcpy
++@itemx -minline-memcpy
++@opindex mno-inline-memcpy
++@opindex minline-memcpy
++
++Do not inline memcpy. The default is to inline when -O is on.
++
++
++@item -mno-fast-sw-div
++@itemx -mfast-sw-div
++@opindex mno-fast-sw-div
++@opindex mfast-sw-div
++
++Do no use table based fast divide for small numbers. The default
++is to use the fast divide at -O3 and above.
++
++
++@item -mno-hw-mul
++@itemx -mhw-mul
++@itemx -mno-hw-mulx
++@itemx -mhw-mulx
++@itemx -mno-hw-div
++@itemx -mhw-div
++@opindex mno-hw-mul
++@opindex mhw-mul
++@opindex mno-hw-mulx
++@opindex mhw-mulx
++@opindex mno-hw-div
++@opindex mhw-div
++
++Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of
++instructions by the compiler. The default is to emit @code{mul}
++and not emit @code{div} and @code{mulx}.
++
++The different combinations of @code{mul} and @code{mulx} instructions
++generate a different multilib options.
++
++
++@item -msys-crt0=@var{startfile}
++@opindex msys-crt0
++
++@var{startfile} is the file name of the startfile (crt0) to use
++when linking. The default is crt0.o that comes with libgloss
++and is only suitable for use with the instruction set
++simulator.
++
++@item -msys-lib=@var{systemlib}
++@itemx -msys-lib=nosys
++@opindex msys-lib
++
++@var{systemlib} is the library name of the library which provides
++the system calls required by the C library, e.g. @code{read}, @code{write}
++etc. The default is to use nosys, this library provides
++stub implementations of the calls and is part of libgloss.
++
++@end table
++
++
+ @node M680x0 Options
+ @subsection M680x0 Options
+ @cindex M680x0 options
+--- gcc-3.4.3/gcc/doc/md.texi
++++ gcc-3.4.3-nios2/gcc/doc/md.texi
+@@ -1335,6 +1335,49 @@ However, here is a summary of the machin
+ available on some particular machines.
+
+ @table @emph
++
++@item Altera Nios II family---@file{nios2.h}
++@table @code
++
++@item I
++Integer that is valid as an immediate operand in an
++instruction taking a signed 16-bit number. Range
++@minus{}32768 to 32767.
++
++@item J
++Integer that is valid as an immediate operand in an
++instruction taking an unsigned 16-bit number. Range
++0 to 65535.
++
++@item K
++Integer that is valid as an immediate operand in an
++instruction taking only the upper 16-bits of a
++32-bit number. Range 32-bit numbers with the lower
++16-bits being 0.
++
++@item L
++Integer that is valid as an immediate operand for a
++shift instruction. Range 0 to 31.
++
++
++@item M
++Integer that is valid as an immediate operand for
++only the value 0. Can be used in conjunction with
++the format modifier @code{z} to use @code{r0}
++instead of @code{0} in the assembly output.
++
++@item N
++Integer that is valid as an immediate operand for
++a custom instruction opcode. Range 0 to 255.
++
++@item S
++Matches immediates which are addresses in the small
++data section and therefore can be added to @code{gp}
++as a 16-bit immediate to re-create their 32-bit value.
++
++@end table
++
++
+ @item ARM family---@file{arm.h}
+ @table @code
+ @item f
diff --git a/misc/buildroot/toolchain/gcc/3.4.3/arm-softfloat.patch.conditional b/misc/buildroot/toolchain/gcc/3.4.3/arm-softfloat.patch.conditional
new file mode 100644
index 000000000..19d1b90da
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.3/arm-softfloat.patch.conditional
@@ -0,0 +1,270 @@
+Note... modified my mjn3 to not conflict with the big endian arm patch.
+Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
+Also changed
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{!mcpu=*:-mcpu=xscale} \
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+to
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+in gcc/config/arm/linux-elf.h.
+#
+# Submitted:
+#
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# Description:
+#
+# Nicholas Pitre released this patch for gcc soft-float support here:
+# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
+#
+# This version has been adapted to work with gcc 3.4.0.
+#
+# The original patch doesn't distinguish between softfpa and softvfp modes
+# in the way Nicholas Pitre probably meant. His description is:
+#
+# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
+# floats can be achieved with -mhard-float or with the configure
+# --with-float=hard option. If -msoft-float or --with-float=soft is used then
+# software float support will be used just like the default but with the legacy
+# big endian word ordering for double float representation instead."
+#
+# Which means the following:
+#
+# * If you compile without -mhard-float or -msoft-float, you should get
+# software floating point, using the VFP format. The produced object file
+# should have these flags in its header:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# * If you compile with -mhard-float, you should get hardware floating point,
+# which always uses the FPA format. Object file header flags should be:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# * If you compile with -msoft-float, you should get software floating point,
+# using the FPA format. This is done for compatibility reasons with many
+# existing distributions. Object file header flags should be:
+#
+# private flags = 200: [APCS-32] [FPA float format] [software FP]
+#
+# The original patch from Nicholas Pitre contained the following constructs:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
+#
+# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
+# is probably the reason Robert Schwebel modified it to:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
+#
+# But this causes the following behaviour:
+#
+# * If you compile without -mhard-float or -msoft-float, the compiler generates
+# software floating point instructions, but *nothing* is passed to the
+# assembler, which results in an object file which has flags:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# This is not correct!
+#
+# * If you compile with -mhard-float, the compiler generates hardware floating
+# point instructions, and passes "-mfpu=fpa" to the assembler, which results
+# in an object file which has the same flags as in the previous item, but now
+# those *are* correct.
+#
+# * If you compile with -msoft-float, the compiler generates software floating
+# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
+# order) to the assembler, which results in an object file with flags:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# This is not correct, because the last "-mfpu=" option on the assembler
+# command line determines the actual FPU convention used (which should be FPA
+# in this case).
+#
+# Therefore, I modified this patch to get the desired behaviour. Every
+# instance of the notation:
+#
+# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
+#
+# was changed to:
+#
+# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
+#
+# I also did the following:
+#
+# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
+# be consistent with Nicholas' original patch.
+# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
+# macros I could find. I think that if you compile without any options, you
+# would like to get the defaults. :)
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+
+diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
+--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
+@@ -31,11 +31,16 @@
+ #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
+ #endif
+
+ /* This is COFF, but prefer stabs. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
+--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -46,7 +46,9 @@
+
+ #ifndef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
++%{mapcs-float:-mfloat} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+ #endif
+
+ #ifndef ASM_SPEC
+@@ -106,12 +108,17 @@
+ #endif
+
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
+ #endif
+
+ #define TARGET_ASM_FILE_START_APP_OFF true
+diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
+@@ -44,12 +44,26 @@
+ #define TARGET_LINKER_EMULATION "armelf_linux"
+ #endif
+
+-/* Default is to use APCS-32 mode. */
++/*
++ * Default is to use APCS-32 mode with soft-vfp.
++ * The old Linux default for floats can be achieved with -mhard-float
++ * or with the configure --with-float=hard option.
++ * If -msoft-float or --with-float=soft is used then software float
++ * support will be used just like the default but with the legacy
++ * big endian word ordering for double float representation instead.
++ */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT \
+- ( ARM_FLAG_APCS_32 | \
+- ARM_FLAG_MMU_TRAPS | \
+- TARGET_ENDIAN_DEFAULT )
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 \
++ | ARM_FLAG_SOFT_FLOAT \
++ | TARGET_ENDIAN_DEFAULT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_MMU_TRAPS )
++
++#undef SUBTARGET_EXTRA_ASM_SPEC
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+@@ -57,7 +71,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -72,7 +86,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
+--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -30,7 +30,12 @@
+
+ /* Default to using APCS-32 and software floating point. */
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ /* Now we define the strings used to build the spec file. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -49,11 +49,12 @@
+ endian, regardless of the endian-ness of the memory
+ system. */
+
+-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+- %{mhard-float:-mfpu=fpa} \
+- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{!mcpu=*:-mcpu=xscale} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
++ { "mlittle-endian", "mno-thumb-interwork", "marm" }
+ #endif
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/3.4.4/300-libstdc++-pic.patch
new file mode 100644
index 000000000..9f304a4c4
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/300-libstdc++-pic.patch
@@ -0,0 +1,47 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -224,6 +224,10 @@
+ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCPP_BUILD_DEBUG
+ all-local: build_debug
+
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -585,7 +585,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -618,6 +618,7 @@
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
++ install-exec-local \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+@@ -707,6 +708,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/3.4.4/600-gcc34-arm-ldm-peephole.patch b/misc/buildroot/toolchain/gcc/3.4.4/600-gcc34-arm-ldm-peephole.patch
new file mode 100644
index 000000000..0c370502c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/600-gcc34-arm-ldm-peephole.patch
@@ -0,0 +1,65 @@
+--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
+@@ -8810,13 +8810,16 @@
+ (set_attr "length" "4,8,8")]
+ )
+
++; Try to convert LDR+LDR+arith into [add+]LDM+arith
++; On XScale, LDM is always slower than two LDRs, so only do this if
++; optimising for size.
+ (define_insn "*arith_adjacentmem"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (match_operator:SI 1 "shiftable_operator"
+ [(match_operand:SI 2 "memory_operand" "m")
+ (match_operand:SI 3 "memory_operand" "m")]))
+ (clobber (match_scratch:SI 4 "=r"))]
+- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
++ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
+ "*
+ {
+ rtx ldm[3];
+@@ -8851,6 +8854,8 @@
+ }
+ if (val1 && val2)
+ {
++ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
++ will prevent it from happening. */
+ rtx ops[3];
+ ldm[0] = ops[0] = operands[4];
+ ops[1] = XEXP (XEXP (operands[2], 0), 0);
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
+@@ -4838,6 +4841,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* ldmia */
+
+@@ -5064,6 +5072,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* stmia */
+
+--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
++++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
+@@ -381,6 +381,7 @@
+ printf ("#include \"recog.h\"\n");
+ printf ("#include \"except.h\"\n\n");
+ printf ("#include \"function.h\"\n\n");
++ printf ("#include \"flags.h\"\n\n");
+
+ printf ("#ifdef HAVE_peephole\n");
+ printf ("extern rtx peep_operand[];\n\n");
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm-peephole2.patch b/misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm-peephole2.patch
new file mode 100644
index 000000000..27f7c07db
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm-peephole2.patch
@@ -0,0 +1,42 @@
+The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting
+with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from
+it that was causing problems and grabbed an updated version from
+upstream cvs.
+
+Index: gcc/config/arm/arm.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
+retrieving revision 1.432
+retrieving revision 1.433
+diff -u -r1.432 -r1.433
+--- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432
++++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433
+@@ -5139,6 +5139,10 @@
+ int
+ adjacent_mem_locations (rtx a, rtx b)
+ {
++ /* We don't guarantee to preserve the order of these memory refs. */
++ if (volatile_refs_p (a) || volatile_refs_p (b))
++ return 0;
++
+ if ((GET_CODE (XEXP (a, 0)) == REG
+ || (GET_CODE (XEXP (a, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
+@@ -5178,6 +5182,17 @@
+ return 0;
+
+ val_diff = val1 - val0;
++
++ if (arm_ld_sched)
++ {
++ /* If the target has load delay slots, then there's no benefit
++ to using an ldm instruction unless the offset is zero and
++ we are optimizing for size. */
++ return (optimize_size && (REGNO (reg0) == REGNO (reg1))
++ && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
++ && (val_diff == 4 || val_diff == -4));
++ }
++
+ return ((REGNO (reg0) == REGNO (reg1))
+ && (val_diff == 4 || val_diff == -4));
+ }
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm.patch b/misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm.patch
new file mode 100644
index 000000000..142052fdf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/601-gcc34-arm-ldm.patch
@@ -0,0 +1,119 @@
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
+@@ -8520,6 +8520,26 @@
+ return_used_this_function = 0;
+ }
+
++/* Return the number (counting from 0) of
++ the least significant set bit in MASK. */
++
++#ifdef __GNUC__
++inline
++#endif
++static int
++number_of_first_bit_set (mask)
++ int mask;
++{
++ int bit;
++
++ for (bit = 0;
++ (mask & (1 << bit)) == 0;
++ ++bit)
++ continue;
++
++ return bit;
++}
++
+ const char *
+ arm_output_epilogue (rtx sibling)
+ {
+@@ -8753,27 +8773,47 @@
+ saved_regs_mask |= (1 << PC_REGNUM);
+ }
+
+- /* Load the registers off the stack. If we only have one register
+- to load use the LDR instruction - it is faster. */
+- if (saved_regs_mask == (1 << LR_REGNUM))
+- {
+- /* The exception handler ignores the LR, so we do
+- not really need to load it off the stack. */
+- if (eh_ofs)
+- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+- else
+- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
+- }
+- else if (saved_regs_mask)
++ if (saved_regs_mask)
+ {
+- if (saved_regs_mask & (1 << SP_REGNUM))
+- /* Note - write back to the stack register is not enabled
+- (ie "ldmfd sp!..."). We know that the stack pointer is
+- in the list of registers and if we add writeback the
+- instruction becomes UNPREDICTABLE. */
+- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ /* Load the registers off the stack. If we only have one register
++ to load use the LDR instruction - it is faster. */
++ if (bit_count (saved_regs_mask) == 1)
++ {
++ int reg = number_of_first_bit_set (saved_regs_mask);
++
++ switch (reg)
++ {
++ case SP_REGNUM:
++ /* Mustn't use base writeback when loading SP. */
++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
++ break;
++
++ case LR_REGNUM:
++ if (eh_ofs)
++ {
++ /* The exception handler ignores the LR, so we do
++ not really need to load it off the stack. */
++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
++ break;
++ }
++ /* else fall through */
++
++ default:
++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
++ break;
++ }
++ }
+ else
+- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ {
++ if (saved_regs_mask & (1 << SP_REGNUM))
++ /* Note - write back to the stack register is not enabled
++ (ie "ldmfd sp!..."). We know that the stack pointer is
++ in the list of registers and if we add writeback the
++ instruction becomes UNPREDICTABLE. */
++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ else
++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ }
+ }
+
+ if (current_function_pretend_args_size)
+@@ -11401,22 +11441,6 @@
+ }
+ }
+
+-/* Return the number (counting from 0) of
+- the least significant set bit in MASK. */
+-
+-inline static int
+-number_of_first_bit_set (int mask)
+-{
+- int bit;
+-
+- for (bit = 0;
+- (mask & (1 << bit)) == 0;
+- ++bit)
+- continue;
+-
+- return bit;
+-}
+-
+ /* Generate code to return from a thumb function.
+ If 'reg_containing_return_addr' is -1, then the return address is
+ actually on the stack, at the stack pointer. */
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/3.4.4/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..4377c2143
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/700-pr15068-fix.patch b/misc/buildroot/toolchain/gcc/3.4.4/700-pr15068-fix.patch
new file mode 100644
index 000000000..2977765c5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/700-pr15068-fix.patch
@@ -0,0 +1,44 @@
+See http://gcc.gnu.org/PR15068
+
+Fixes error
+
+../sysdeps/generic/s_fmax.c: In function `__fmax':
+../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <URL:http://gcc.gnu.org/bugs.html> for instructions.
+make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
+make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
+make[1]: *** [math/others] Error 2
+make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
+make: *** [all] Error 2
+
+[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
+
+--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
+@@ -1878,6 +1878,7 @@
+ rtx set_src = SET_SRC (pc_set (BB_END (bb)));
+ rtx cond_true = XEXP (set_src, 0);
+ rtx reg = XEXP (cond_true, 0);
++ enum rtx_code inv_cond;
+
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+@@ -1886,11 +1887,13 @@
+ in the form of a comparison of a register against zero.
+ If the condition is more complex than that, then it is safe
+ not to record any information. */
+- if (GET_CODE (reg) == REG
++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
++ if (inv_cond != UNKNOWN
++ && GET_CODE (reg) == REG
+ && XEXP (cond_true, 1) == const0_rtx)
+ {
+ rtx cond_false
+- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
++ = gen_rtx_fmt_ee (inv_cond,
+ GET_MODE (cond_true), XEXP (cond_true, 0),
+ XEXP (cond_true, 1));
+ if (GET_CODE (XEXP (set_src, 1)) == PC)
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/71_all_sh-pr16665-fix.patch b/misc/buildroot/toolchain/gcc/3.4.4/71_all_sh-pr16665-fix.patch
new file mode 100644
index 000000000..680bb3978
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/71_all_sh-pr16665-fix.patch
@@ -0,0 +1,43 @@
+--- gcc/gcc/config/sh/sh.c
++++ gcc/gcc/config/sh/sh.c
+@@ -9106,6 +9106,15 @@ sh_output_mi_thunk (FILE *file, tree thu
+ }
+ this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
+
++ /* In PIC case, we set PIC register to compute the target address. We
++ can use a scratch register to save and restore the original value
++ except for SHcompact. For SHcompact, use stack. */
++ if (flag_pic && TARGET_SHCOMPACT)
++ {
++ push (PIC_OFFSET_TABLE_REGNUM);
++ emit_insn (gen_GOTaddr2picreg ());
++ }
++
+ /* For SHcompact, we only have r0 for a scratch register: r1 is the
+ static chain pointer (even if you can't have nested virtual functions
+ right now, someone might implement them sometime), and the rest of the
+@@ -9188,8 +9197,24 @@ sh_output_mi_thunk (FILE *file, tree thu
+ assemble_external (function);
+ TREE_USED (function) = 1;
+ }
++ /* We can use scratch1 to save and restore the original value of
++ PIC register except for SHcompact. */
++ if (flag_pic && ! TARGET_SHCOMPACT)
++ {
++ emit_move_insn (scratch1,
++ gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
++ emit_insn (gen_GOTaddr2picreg ());
++ }
+ funexp = XEXP (DECL_RTL (function), 0);
+ emit_move_insn (scratch2, funexp);
++ if (flag_pic)
++ {
++ if (! TARGET_SHCOMPACT)
++ emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
++ scratch1);
++ else
++ pop (PIC_OFFSET_TABLE_REGNUM);
++ }
+ funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
+ sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
+ SIBLING_CALL_P (sibcall) = 1;
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/72_all_sh-no-reorder-blocks.patch b/misc/buildroot/toolchain/gcc/3.4.4/72_all_sh-no-reorder-blocks.patch
new file mode 100644
index 000000000..8b9826831
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/72_all_sh-no-reorder-blocks.patch
@@ -0,0 +1,13 @@
+--- g/gcc/config/sh/sh.h
++++ g/gcc/config/sh/sh.h
+@@ -422,6 +422,10 @@
+ do { \
+ if (LEVEL) \
+ flag_omit_frame_pointer = -1; \
++ if (LEVEL <= 2) \
++ { \
++ flag_reorder_blocks = 0; \
++ } \
+ if (SIZE) \
+ target_flags |= SPACE_BIT; \
+ if (TARGET_SHMEDIA && LEVEL > 1) \
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/73_all_sh-pr20617.patch b/misc/buildroot/toolchain/gcc/3.4.4/73_all_sh-pr20617.patch
new file mode 100644
index 000000000..6d8021cc7
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/73_all_sh-pr20617.patch
@@ -0,0 +1,28 @@
+2005-03-24 J"orn Rennecke <joern.rennecke@st.com>
+
+ Band aid for PR target/20617:
+ * config/sh/lib1funcs.asm (FUNC, ALIAS): Add .hidden directive.
+
+--- g/gcc/config/sh/lib1funcs.asm
++++ g/gcc/config/sh/lib1funcs.asm
+@@ -37,9 +37,19 @@ Boston, MA 02111-1307, USA. */
+ ELF local label prefixes by J"orn Rennecke
+ amylaar@cygnus.com */
+
++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
++
+ #ifdef __ELF__
+ #define LOCAL(X) .L_##X
+-#define FUNC(X) .type X,@function
++
++#if 1 /* ??? The export list mechanism is broken, everything that is not
++ hidden is exported. */
++#undef FUNC
++#define FUNC(X) .type X,@function; .hidden X
++#undef ALIAS
++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
++#endif
++
+ #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
+ #define ENDFUNC(X) ENDFUNC0(X)
+ #else
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.4.4/800-arm-bigendian.patch
new file mode 100644
index 000000000..04e998419
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -101,7 +118,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.4.1-dist/gcc/config.gcc
++++ gcc-3.4.1/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/3.4.4/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/900-nios2.patch b/misc/buildroot/toolchain/gcc/3.4.4/900-nios2.patch
new file mode 100644
index 000000000..bfa06a21c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/900-nios2.patch
@@ -0,0 +1,10211 @@
+--- gcc-3.4.3/gcc/Makefile.in
++++ gcc-3.4.3-nios2/gcc/Makefile.in
+@@ -3085,7 +3085,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
+ $(INSTALL_DATA) $(srcdir)/README-fixinc \
+ $(DESTDIR)$(itoolsdatadir)/include/README ; \
+ $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
+- $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
++ $(INSTALL_PROGRAM) fixinc/fixincl$(build_exeext) $(DESTDIR)$(itoolsdir)/fixincl$(build_exeext) ; \
+ $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
+ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \
+ else :; fi
+--- gcc-3.4.3/gcc/combine.c
++++ gcc-3.4.3-nios2/gcc/combine.c
+@@ -4380,6 +4380,14 @@ combine_simplify_rtx (rtx x, enum machin
+ mode);
+ }
+
++#ifndef __nios2__
++/* This screws up Nios II in this test case:
++
++if (x & 1)
++ return 2;
++else
++ return 3;
++*/
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+ && op1 == const0_rtx
+@@ -4391,6 +4399,7 @@ combine_simplify_rtx (rtx x, enum machin
+ gen_lowpart_for_combine (mode, op0),
+ const1_rtx);
+ }
++#endif
+
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+--- gcc-3.4.3/gcc/config/nios2/crti.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crti.asm
+@@ -0,0 +1,88 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just make a stack frame for the contents of the .fini and
++.init sections. Users may put any desired instructions in those
++sections.
++
++
++While technically any code can be put in the init and fini sections
++most stuff will not work other than stuff which obeys the call frame
++and ABI. All the call-preserved registers are saved, the call clobbered
++registers should have been saved by the code calling init and fini.
++
++See crtstuff.c for an example of code that inserts itself in the
++init and fini sections.
++
++See crt0.s for the code that calls init and fini.
++*/
++
++ .file "crti.asm"
++
++ .section ".init"
++ .align 2
++ .global _init
++_init:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
++ .section ".fini"
++ .align 2
++ .global _fini
++_fini:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
+--- gcc-3.4.3/gcc/config/nios2/crtn.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crtn.asm
+@@ -0,0 +1,70 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just makes sure that the .fini and .init sections do in
++fact return. Users may put any desired instructions in those sections.
++This file is the last thing linked into any executable.
++*/
++ .file "crtn.asm"
++
++
++
++ .section ".init"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
++ .section ".fini"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod-hi.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod-hi.c
+@@ -0,0 +1,123 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern HItype __modhi3 (HItype, HItype);
++extern HItype __divhi3 (HItype, HItype);
++extern HItype __umodhi3 (HItype, HItype);
++extern HItype __udivhi3 (HItype, HItype);
++
++static UHItype udivmodhi4(UHItype, UHItype, word_type);
++
++static UHItype
++udivmodhi4(UHItype num, UHItype den, word_type modwanted)
++{
++ UHItype bit = 1;
++ UHItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<15)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++HItype
++__divhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodhi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__modhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodhi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__udivhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 0);
++}
++
++
++HItype
++__umodhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod.c
+@@ -0,0 +1,126 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern SItype __modsi3 (SItype, SItype);
++extern SItype __divsi3 (SItype, SItype);
++extern SItype __umodsi3 (SItype, SItype);
++extern SItype __udivsi3 (SItype, SItype);
++
++static USItype udivmodsi4(USItype, USItype, word_type);
++
++/* 16-bit SI divide and modulo as used in NIOS */
++
++
++static USItype
++udivmodsi4(USItype num, USItype den, word_type modwanted)
++{
++ USItype bit = 1;
++ USItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<31)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodsi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__modsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodsi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__udivsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 0);
++}
++
++
++SItype
++__umodsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divtable.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divtable.c
+@@ -0,0 +1,46 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++UQItype __divsi3_table[] =
++{
++ 0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15,
++ 0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15,
++ 0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15,
++ 0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15,
++ 0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15,
++ 0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15,
++ 0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15,
++ 0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15,
++ 0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15,
++ 0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15,
++ 0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15,
++ 0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15,
++ 0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15,
++ 0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15,
++ 0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15,
++ 0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
++};
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-mul.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-mul.c
+@@ -0,0 +1,103 @@
++/* while we are debugging (ie compile outside of gcc build)
++ disable gcc specific headers */
++#ifndef DEBUG_MULSI3
++
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++#else
++#define SItype int
++#define USItype unsigned int
++#endif
++
++
++extern SItype __mulsi3 (SItype, SItype);
++
++SItype
++__mulsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = a;
++
++ while (cnt)
++ {
++ if (cnt & 1)
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt >>= 1;
++ }
++
++ return res;
++}
++/*
++TODO: Choose best alternative implementation.
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = 0;
++
++ while (cnt < 32)
++ {
++ if (a & (1L << cnt))
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt++;
++ }
++
++ return res;
++}
++*/
++
++
++#ifdef DEBUG_MULSI3
++
++int
++main ()
++{
++ int i, j;
++ int error = 0;
++
++ for (i = -1000; i < 1000; i++)
++ for (j = -1000; j < 1000; j++)
++ {
++ int expect = i * j;
++ int actual = A__divsi3 (i, j);
++ if (expect != actual)
++ {
++ printf ("error: %d * %d = %d not %d\n", i, j, expect, actual);
++ error = 1;
++ }
++ }
++
++ return error;
++}
++#endif
+--- gcc-3.4.3/gcc/config/nios2/nios2-dp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-dp-bit.c
+@@ -0,0 +1,1652 @@
++
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-fp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-fp-bit.c
+@@ -0,0 +1,1652 @@
++#define FLOAT
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-protos.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-protos.h
+@@ -0,0 +1,70 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++extern void dump_frame_size (FILE *);
++extern HOST_WIDE_INT compute_frame_size (void);
++extern int nios2_initial_elimination_offset (int, int);
++extern void override_options (void);
++extern void optimization_options (int, int);
++extern int nios2_can_use_return_insn (void);
++extern void expand_prologue (void);
++extern void expand_epilogue (bool);
++extern void function_profiler (FILE *, int);
++
++
++#ifdef RTX_CODE
++extern int nios2_legitimate_address (rtx, enum machine_mode, int);
++extern void nios2_print_operand (FILE *, rtx, int);
++extern void nios2_print_operand_address (FILE *, rtx);
++
++extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
++extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
++
++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx);
++extern void gen_conditional_move (rtx *, enum machine_mode);
++extern const char *asm_output_opcode (FILE *, const char *);
++
++/* predicates */
++extern int arith_operand (rtx, enum machine_mode);
++extern int uns_arith_operand (rtx, enum machine_mode);
++extern int logical_operand (rtx, enum machine_mode);
++extern int shift_operand (rtx, enum machine_mode);
++extern int reg_or_0_operand (rtx, enum machine_mode);
++extern int equality_op (rtx, enum machine_mode);
++extern int custom_insn_opcode (rtx, enum machine_mode);
++extern int rdwrctl_operand (rtx, enum machine_mode);
++
++# ifdef HAVE_MACHINE_MODES
++# if defined TREE_CODE
++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
++extern int nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++
++# endif /* TREE_CODE */
++# endif /* HAVE_MACHINE_MODES */
++#endif
++
++#ifdef TREE_CODE
++extern int nios2_return_in_memory (tree);
++
++#endif /* TREE_CODE */
+--- gcc-3.4.3/gcc/config/nios2/nios2.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.c
+@@ -0,0 +1,2853 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++#include <stdio.h>
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "rtl.h"
++#include "tree.h"
++#include "tm_p.h"
++#include "regs.h"
++#include "hard-reg-set.h"
++#include "real.h"
++#include "insn-config.h"
++#include "conditions.h"
++#include "output.h"
++#include "insn-attr.h"
++#include "flags.h"
++#include "recog.h"
++#include "expr.h"
++#include "toplev.h"
++#include "basic-block.h"
++#include "function.h"
++#include "ggc.h"
++#include "reload.h"
++#include "debug.h"
++#include "optabs.h"
++#include "target.h"
++#include "target-def.h"
++
++/* local prototypes */
++static bool nios2_rtx_costs (rtx, int, int, int *);
++
++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT);
++static int nios2_use_dfa_pipeline_interface (void);
++static int nios2_issue_rate (void);
++static struct machine_function *nios2_init_machine_status (void);
++static bool nios2_in_small_data_p (tree);
++static rtx save_reg (int, HOST_WIDE_INT, rtx);
++static rtx restore_reg (int, HOST_WIDE_INT);
++static unsigned int nios2_section_type_flags (tree, const char *, int);
++static void nios2_init_builtins (void);
++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
++static bool nios2_function_ok_for_sibcall (tree, tree);
++static void nios2_encode_section_info (tree, rtx, int);
++
++/* Initialize the GCC target structure. */
++#undef TARGET_ASM_FUNCTION_PROLOGUE
++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue
++
++#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
++#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \
++ nios2_use_dfa_pipeline_interface
++#undef TARGET_SCHED_ISSUE_RATE
++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate
++#undef TARGET_IN_SMALL_DATA_P
++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p
++#undef TARGET_ENCODE_SECTION_INFO
++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info
++#undef TARGET_SECTION_TYPE_FLAGS
++#define TARGET_SECTION_TYPE_FLAGS nios2_section_type_flags
++
++#undef TARGET_INIT_BUILTINS
++#define TARGET_INIT_BUILTINS nios2_init_builtins
++#undef TARGET_EXPAND_BUILTIN
++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin
++
++#undef TARGET_FUNCTION_OK_FOR_SIBCALL
++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall
++
++#undef TARGET_RTX_COSTS
++#define TARGET_RTX_COSTS nios2_rtx_costs
++
++
++struct gcc_target targetm = TARGET_INITIALIZER;
++
++
++
++/* Threshold for data being put into the small data/bss area, instead
++ of the normal data area (references to the small data/bss area take
++ 1 instruction, and use the global pointer, references to the normal
++ data area takes 2 instructions). */
++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE;
++
++
++/* Structure to be filled in by compute_frame_size with register
++ save masks, and offsets for the current function. */
++
++struct nios2_frame_info
++GTY (())
++{
++ long total_size; /* # bytes that the entire frame takes up */
++ long var_size; /* # bytes that variables take up */
++ long args_size; /* # bytes that outgoing arguments take up */
++ int save_reg_size; /* # bytes needed to store gp regs */
++ int save_reg_rounded; /* # bytes needed to store gp regs */
++ long save_regs_offset; /* offset from new sp to store gp registers */
++ int initialized; /* != 0 if frame size already calculated */
++ int num_regs; /* number of gp registers saved */
++};
++
++struct machine_function
++GTY (())
++{
++
++ /* Current frame information, calculated by compute_frame_size. */
++ struct nios2_frame_info frame;
++};
++
++
++/***************************************
++ * Section encodings
++ ***************************************/
++
++
++
++
++
++/***************************************
++ * Stack Layout and Calling Conventions
++ ***************************************/
++
++
++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1))
++#define TEMP_REG_NUM 8
++
++static void
++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
++{
++ if (flag_verbose_asm || flag_debug_asm)
++ {
++ compute_frame_size ();
++ dump_frame_size (file);
++ }
++}
++
++static rtx
++save_reg (int regno, HOST_WIDE_INT offset, rtx cfa_store_reg)
++{
++ rtx insn, stack_slot;
++
++ stack_slot = gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ GEN_INT (offset));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_MEM (SImode, stack_slot),
++ gen_rtx_REG (SImode, regno)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ return insn;
++}
++
++static rtx
++restore_reg (int regno, HOST_WIDE_INT offset)
++{
++ rtx insn, stack_slot;
++
++ if (TOO_BIG_OFFSET (offset))
++ {
++ stack_slot = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ GEN_INT (offset)));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ gen_rtx_PLUS (SImode,
++ stack_slot,
++ stack_pointer_rtx)));
++ }
++ else
++ {
++ stack_slot = gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (offset));
++ }
++
++ stack_slot = gen_rtx_MEM (SImode, stack_slot);
++
++ insn = emit_move_insn (gen_rtx_REG (SImode, regno), stack_slot);
++
++ return insn;
++}
++
++
++/* There are two possible paths for prologue expansion,
++- the first is if the total frame size is < 2^15-1. In that
++case all the immediates will fit into the 16-bit immediate
++fields.
++- the second is when the frame size is too big, in that
++case an additional temporary register is used, first
++as a cfa_temp to offset the sp, second as the cfa_store
++register.
++
++See the comment above dwarf2out_frame_debug_expr in
++dwarf2out.c for more explanation of the "rules."
++
++
++Case 1:
++Rule # Example Insn Effect
++2 addi sp, sp, -total_frame_size cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++12 stw ra, offset(sp)
++12 stw r16, offset(sp)
++1 mov fp, sp
++
++Case 2:
++Rule # Example Insn Effect
++6 movi r8, total_frame_size cfa_temp.reg=r8, cfa_temp.offset=total_frame_size
++2 sub sp, sp, r8 cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++5 add r8, r8, sp cfa_store.reg=r8, cfa_store.offset=0
++12 stw ra, offset(r8)
++12 stw r16, offset(r8)
++1 mov fp, sp
++
++*/
++
++void
++expand_prologue ()
++{
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int cfa_store_offset;
++ rtx insn;
++ rtx cfa_store_reg = 0;
++
++ total_frame_size = compute_frame_size ();
++
++ if (total_frame_size)
++ {
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ /* cfa_temp and cfa_store_reg are the same register,
++ cfa_store_reg overwrites cfa_temp */
++ cfa_store_reg = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ cfa_store_reg,
++ GEN_INT (total_frame_size)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_MINUS (SImode,
++ stack_pointer_rtx,
++ cfa_store_reg));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ /* if there are no registers to save, I don't need to
++ create a cfa_store */
++ if (cfun->machine->frame.save_reg_size)
++ {
++ insn = gen_rtx_SET (SImode,
++ cfa_store_reg,
++ gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ stack_pointer_rtx));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ cfa_store_offset
++ = total_frame_size
++ - (cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded);
++ }
++ else
++ {
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (-total_frame_size)));
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ cfa_store_reg = stack_pointer_rtx;
++ cfa_store_offset
++ = cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded;
++ }
++ }
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (RA_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (FP_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ cfa_store_offset -= 4;
++ save_reg (i, cfa_store_offset, cfa_store_reg);
++ }
++ }
++
++ if (frame_pointer_needed)
++ {
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_REG (SImode, FP_REGNO),
++ gen_rtx_REG (SImode, SP_REGNO)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ /* If we are profiling, make sure no instructions are scheduled before
++ the call to mcount. */
++ if (current_function_profile)
++ emit_insn (gen_blockage ());
++}
++
++void
++expand_epilogue (bool sibcall_p)
++{
++ rtx insn;
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int register_store_offset;
++
++ total_frame_size = compute_frame_size ();
++
++ if (!sibcall_p && nios2_can_use_return_insn ())
++ {
++ insn = emit_jump_insn (gen_return ());
++ return;
++ }
++
++ emit_insn (gen_blockage ());
++
++ register_store_offset =
++ cfun->machine->frame.save_regs_offset +
++ cfun->machine->frame.save_reg_rounded;
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (RA_REGNO, register_store_offset);
++ }
++
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (FP_REGNO, register_store_offset);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ register_store_offset -= 4;
++ restore_reg (i, register_store_offset);
++ }
++ }
++
++ if (total_frame_size)
++ {
++ rtx sp_adjust;
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ sp_adjust = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ sp_adjust,
++ GEN_INT (total_frame_size)));
++
++ }
++ else
++ {
++ sp_adjust = GEN_INT (total_frame_size);
++ }
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ sp_adjust));
++ insn = emit_insn (insn);
++ }
++
++
++ if (!sibcall_p)
++ {
++ insn = emit_jump_insn (gen_return_from_epilogue (gen_rtx (REG, Pmode,
++ RA_REGNO)));
++ }
++}
++
++
++bool
++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
++{
++ return true;
++}
++
++
++
++
++
++/* ----------------------- *
++ * Profiling
++ * ----------------------- */
++
++void
++function_profiler (FILE *file, int labelno)
++{
++ fprintf (file, "\t%s mcount begin, label: .LP%d\n",
++ ASM_COMMENT_START, labelno);
++ fprintf (file, "\tnextpc\tr8\n");
++ fprintf (file, "\tmov\tr9, ra\n");
++ fprintf (file, "\tmovhi\tr10, %%hiadj(.LP%d)\n", labelno);
++ fprintf (file, "\taddi\tr10, r10, %%lo(.LP%d)\n", labelno);
++ fprintf (file, "\tcall\tmcount\n");
++ fprintf (file, "\tmov\tra, r9\n");
++ fprintf (file, "\t%s mcount end\n", ASM_COMMENT_START);
++}
++
++
++/***************************************
++ * Stack Layout
++ ***************************************/
++
++
++void
++dump_frame_size (FILE *file)
++{
++ fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START);
++
++ fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.total_size);
++ fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.var_size);
++ fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.args_size);
++ fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_size);
++ fprintf (file, "\t%s save_reg_rounded = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_rounded);
++ fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.initialized);
++ fprintf (file, "\t%s num_regs = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.num_regs);
++ fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_regs_offset);
++ fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START,
++ current_function_is_leaf);
++ fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START,
++ frame_pointer_needed);
++ fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START,
++ current_function_pretend_args_size);
++
++}
++
++
++/* Return the bytes needed to compute the frame pointer from the current
++ stack pointer.
++*/
++
++HOST_WIDE_INT
++compute_frame_size ()
++{
++ unsigned int regno;
++ HOST_WIDE_INT var_size; /* # of var. bytes allocated */
++ HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up */
++ HOST_WIDE_INT save_reg_size; /* # bytes needed to store callee save regs */
++ HOST_WIDE_INT save_reg_rounded;
++ /* # bytes needed to store callee save regs (rounded) */
++ HOST_WIDE_INT out_args_size; /* # bytes needed for outgoing args */
++
++ save_reg_size = 0;
++ var_size = STACK_ALIGN (get_frame_size ());
++ out_args_size = STACK_ALIGN (current_function_outgoing_args_size);
++
++ total_size = var_size + out_args_size;
++
++ /* Calculate space needed for gp registers. */
++ for (regno = 0; regno <= FIRST_PSEUDO_REGISTER; regno++)
++ {
++ if (MUST_SAVE_REGISTER (regno))
++ {
++ save_reg_size += 4;
++ }
++ }
++
++ save_reg_rounded = STACK_ALIGN (save_reg_size);
++ total_size += save_reg_rounded;
++
++ total_size += STACK_ALIGN (current_function_pretend_args_size);
++
++ /* Save other computed information. */
++ cfun->machine->frame.total_size = total_size;
++ cfun->machine->frame.var_size = var_size;
++ cfun->machine->frame.args_size = current_function_outgoing_args_size;
++ cfun->machine->frame.save_reg_size = save_reg_size;
++ cfun->machine->frame.save_reg_rounded = save_reg_rounded;
++ cfun->machine->frame.initialized = reload_completed;
++ cfun->machine->frame.num_regs = save_reg_size / UNITS_PER_WORD;
++
++ cfun->machine->frame.save_regs_offset
++ = save_reg_rounded ? current_function_outgoing_args_size + var_size : 0;
++
++ return total_size;
++}
++
++
++int
++nios2_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED)
++{
++ int offset;
++
++ /* Set OFFSET to the offset from the stack pointer. */
++ switch (from)
++ {
++ case FRAME_POINTER_REGNUM:
++ offset = 0;
++ break;
++
++ case ARG_POINTER_REGNUM:
++ compute_frame_size ();
++ offset = cfun->machine->frame.total_size;
++ offset -= current_function_pretend_args_size;
++ break;
++
++ case RETURN_ADDRESS_POINTER_REGNUM:
++ compute_frame_size ();
++ /* since the return address is always the first of the
++ saved registers, return the offset to the beginning
++ of the saved registers block */
++ offset = cfun->machine->frame.save_regs_offset;
++ break;
++
++ default:
++ abort ();
++ }
++
++ return offset;
++}
++
++/* Return nonzero if this function is known to have a null epilogue.
++ This allows the optimizer to omit jumps to jumps if no stack
++ was created. */
++int
++nios2_can_use_return_insn ()
++{
++ if (!reload_completed)
++ return 0;
++
++ if (regs_ever_live[RA_REGNO] || current_function_profile)
++ return 0;
++
++ if (cfun->machine->frame.initialized)
++ return cfun->machine->frame.total_size == 0;
++
++ return compute_frame_size () == 0;
++}
++
++
++
++
++
++/***************************************
++ *
++ ***************************************/
++
++const char *nios2_sys_nosys_string; /* for -msys=nosys */
++const char *nios2_sys_lib_string; /* for -msys-lib= */
++const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++void
++override_options ()
++{
++ /* Function to allocate machine-dependent function status. */
++ init_machine_status = &nios2_init_machine_status;
++
++ nios2_section_threshold
++ = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE;
++
++ if (nios2_sys_nosys_string && *nios2_sys_nosys_string)
++ {
++ error ("invalid option '-msys=nosys%s'", nios2_sys_nosys_string);
++ }
++
++ /* If we don't have mul, we don't have mulx either! */
++ if (!TARGET_HAS_MUL && TARGET_HAS_MULX)
++ {
++ target_flags &= ~HAS_MULX_FLAG;
++ }
++
++}
++
++void
++optimization_options (int level, int size)
++{
++ if (level || size)
++ {
++ target_flags |= INLINE_MEMCPY_FLAG;
++ }
++
++ if (level >= 3 && !size)
++ {
++ target_flags |= FAST_SW_DIV_FLAG;
++ }
++}
++
++/* Allocate a chunk of memory for per-function machine-dependent data. */
++static struct machine_function *
++nios2_init_machine_status ()
++{
++ return ((struct machine_function *)
++ ggc_alloc_cleared (sizeof (struct machine_function)));
++}
++
++
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++/* Compute a (partial) cost for rtx X. Return true if the complete
++ cost has been computed, and false if subexpressions should be
++ scanned. In either case, *TOTAL contains the cost result. */
++
++
++
++static bool
++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
++{
++ switch (code)
++ {
++ case CONST_INT:
++ if (INTVAL (x) == 0)
++ {
++ *total = COSTS_N_INSNS (0);
++ return true;
++ }
++ else if (SMALL_INT (INTVAL (x))
++ || SMALL_INT_UNSIGNED (INTVAL (x))
++ || UPPER16_INT (INTVAL (x)))
++ {
++ *total = COSTS_N_INSNS (2);
++ return true;
++ }
++ else
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case LABEL_REF:
++ case SYMBOL_REF:
++ /* ??? gp relative stuff will fit in here */
++ /* fall through */
++ case CONST:
++ case CONST_DOUBLE:
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case MULT:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++ case SIGN_EXTEND:
++ {
++ *total = COSTS_N_INSNS (3);
++ return false;
++ }
++ case ZERO_EXTEND:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++
++ default:
++ return false;
++ }
++}
++
++
++/***************************************
++ * INSTRUCTION SUPPORT
++ *
++ * These functions are used within the Machine Description to
++ * handle common or complicated output and expansions from
++ * instructions.
++ ***************************************/
++
++int
++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
++{
++ rtx to = operands[0];
++ rtx from = operands[1];
++
++ if (!register_operand (to, mode) && !reg_or_0_operand (from, mode))
++ {
++ if (no_new_pseudos)
++ internal_error ("Trying to force_reg no_new_pseudos == 1");
++ from = copy_to_mode_reg (mode, from);
++ }
++
++ operands[0] = to;
++ operands[1] = from;
++ return 0;
++}
++
++/* Divide Support */
++
++/*
++ If -O3 is used, we want to output a table lookup for
++ divides between small numbers (both num and den >= 0
++ and < 0x10). The overhead of this method in the worse
++ case is 40 bytes in the text section (10 insns) and
++ 256 bytes in the data section. Additional divides do
++ not incur additional penalties in the data section.
++
++ Code speed is improved for small divides by about 5x
++ when using this method in the worse case (~9 cycles
++ vs ~45). And in the worse case divides not within the
++ table are penalized by about 10% (~5 cycles vs ~45).
++ However in the typical case the penalty is not as bad
++ because doing the long divide in only 45 cycles is
++ quite optimistic.
++
++ ??? It would be nice to have some benchmarks other
++ than Dhrystone to back this up.
++
++ This bit of expansion is to create this instruction
++ sequence as rtl.
++ or $8, $4, $5
++ slli $9, $4, 4
++ cmpgeui $3, $8, 16
++ beq $3, $0, .L3
++ or $10, $9, $5
++ add $12, $11, divide_table
++ ldbu $2, 0($12)
++ br .L1
++.L3:
++ call slow_div
++.L1:
++# continue here with result in $2
++
++ ??? Ideally I would like the emit libcall block to contain
++ all of this code, but I don't know how to do that. What it
++ means is that if the divide can be eliminated, it may not
++ completely disappear.
++
++ ??? The __divsi3_table label should ideally be moved out
++ of this block and into a global. If it is placed into the
++ sdata section we can save even more cycles by doing things
++ gp relative.
++*/
++int
++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode)
++{
++ rtx or_result, shift_left_result;
++ rtx lookup_value;
++ rtx lab1, lab3;
++ rtx insns;
++ rtx libfunc;
++ rtx final_result;
++ rtx tmp;
++
++ /* it may look a little generic, but only SImode
++ is supported for now */
++ if (mode != SImode)
++ abort ();
++
++ libfunc = sdiv_optab->handlers[(int) SImode].libfunc;
++
++
++
++ lab1 = gen_label_rtx ();
++ lab3 = gen_label_rtx ();
++
++ or_result = expand_simple_binop (SImode, IOR,
++ operands[1], operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0,
++ GET_MODE (or_result), 0, lab3);
++ JUMP_LABEL (get_last_insn ()) = lab3;
++
++ shift_left_result = expand_simple_binop (SImode, ASHIFT,
++ operands[1], GEN_INT (4),
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ lookup_value = expand_simple_binop (SImode, IOR,
++ shift_left_result, operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ convert_move (operands[0],
++ gen_rtx (MEM, QImode,
++ gen_rtx (PLUS, SImode,
++ lookup_value,
++ gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))),
++ 1);
++
++
++ tmp = emit_jump_insn (gen_jump (lab1));
++ JUMP_LABEL (tmp) = lab1;
++ emit_barrier ();
++
++ emit_label (lab3);
++ LABEL_NUSES (lab3) = 1;
++
++ start_sequence ();
++ final_result = emit_library_call_value (libfunc, NULL_RTX,
++ LCT_CONST, SImode, 2,
++ operands[1], SImode,
++ operands[2], SImode);
++
++
++ insns = get_insns ();
++ end_sequence ();
++ emit_libcall_block (insns, operands[0], final_result,
++ gen_rtx (DIV, SImode, operands[1], operands[2]));
++
++ emit_label (lab1);
++ LABEL_NUSES (lab1) = 1;
++ return 1;
++}
++
++/* Branches/Compares */
++
++/* the way of handling branches/compares
++ in gcc is heavily borrowed from MIPS */
++
++enum internal_test
++{
++ ITEST_EQ,
++ ITEST_NE,
++ ITEST_GT,
++ ITEST_GE,
++ ITEST_LT,
++ ITEST_LE,
++ ITEST_GTU,
++ ITEST_GEU,
++ ITEST_LTU,
++ ITEST_LEU,
++ ITEST_MAX
++};
++
++static enum internal_test map_test_to_internal_test (enum rtx_code);
++
++/* Cached operands, and operator to compare for use in set/branch/trap
++ on condition codes. */
++rtx branch_cmp[2];
++enum cmp_type branch_type;
++
++/* Make normal rtx_code into something we can index from an array */
++
++static enum internal_test
++map_test_to_internal_test (enum rtx_code test_code)
++{
++ enum internal_test test = ITEST_MAX;
++
++ switch (test_code)
++ {
++ case EQ:
++ test = ITEST_EQ;
++ break;
++ case NE:
++ test = ITEST_NE;
++ break;
++ case GT:
++ test = ITEST_GT;
++ break;
++ case GE:
++ test = ITEST_GE;
++ break;
++ case LT:
++ test = ITEST_LT;
++ break;
++ case LE:
++ test = ITEST_LE;
++ break;
++ case GTU:
++ test = ITEST_GTU;
++ break;
++ case GEU:
++ test = ITEST_GEU;
++ break;
++ case LTU:
++ test = ITEST_LTU;
++ break;
++ case LEU:
++ test = ITEST_LEU;
++ break;
++ default:
++ break;
++ }
++
++ return test;
++}
++
++/* Generate the code to compare (and possibly branch) two integer values
++ TEST_CODE is the comparison code we are trying to emulate
++ (or implement directly)
++ RESULT is where to store the result of the comparison,
++ or null to emit a branch
++ CMP0 CMP1 are the two comparison operands
++ DESTINATION is the destination of the branch, or null to only compare
++ */
++
++void
++gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
++ rtx result, /* result to store comp. or 0 if branch */
++ rtx cmp0, /* first operand to compare */
++ rtx cmp1, /* second operand to compare */
++ rtx destination) /* destination of the branch, or 0 if compare */
++{
++ struct cmp_info
++ {
++ /* for register (or 0) compares */
++ enum rtx_code test_code_reg; /* code to use in instruction (LT vs. LTU) */
++ int reverse_regs; /* reverse registers in test */
++
++ /* for immediate compares */
++ enum rtx_code test_code_const;
++ /* code to use in instruction (LT vs. LTU) */
++ int const_low; /* low bound of constant we can accept */
++ int const_high; /* high bound of constant we can accept */
++ int const_add; /* constant to add */
++
++ /* generic info */
++ int unsignedp; /* != 0 for unsigned comparisons. */
++ };
++
++ static const struct cmp_info info[(int) ITEST_MAX] = {
++
++ {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ */
++ {NE, 0, NE, -32768, 32767, 0, 0}, /* NE */
++
++ {LT, 1, GE, -32769, 32766, 1, 0}, /* GT */
++ {GE, 0, GE, -32768, 32767, 0, 0}, /* GE */
++ {LT, 0, LT, -32768, 32767, 0, 0}, /* LT */
++ {GE, 1, LT, -32769, 32766, 1, 0}, /* LE */
++
++ {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */
++ {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */
++ {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */
++ {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */
++ };
++
++ enum internal_test test;
++ enum machine_mode mode;
++ const struct cmp_info *p_info;
++ int branch_p;
++
++
++
++
++ test = map_test_to_internal_test (test_code);
++ if (test == ITEST_MAX)
++ abort ();
++
++ p_info = &info[(int) test];
++
++ mode = GET_MODE (cmp0);
++ if (mode == VOIDmode)
++ mode = GET_MODE (cmp1);
++
++ branch_p = (destination != 0);
++
++ /* We can't, under any circumstances, have const_ints in cmp0
++ ??? Actually we could have const0 */
++ if (GET_CODE (cmp0) == CONST_INT)
++ cmp0 = force_reg (mode, cmp0);
++
++ /* if the comparison is against an int not in legal range
++ move it into a register */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (cmp1);
++
++ if (value < p_info->const_low || value > p_info->const_high)
++ cmp1 = force_reg (mode, cmp1);
++ }
++
++ /* Comparison to constants, may involve adding 1 to change a GT into GE.
++ Comparison between two registers, may involve switching operands. */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ if (p_info->const_add != 0)
++ {
++ HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
++
++ /* If modification of cmp1 caused overflow,
++ we would get the wrong answer if we follow the usual path;
++ thus, x > 0xffffffffU would turn into x > 0U. */
++ if ((p_info->unsignedp
++ ? (unsigned HOST_WIDE_INT) new >
++ (unsigned HOST_WIDE_INT) INTVAL (cmp1)
++ : new > INTVAL (cmp1)) != (p_info->const_add > 0))
++ {
++ /* ??? This case can never happen with the current numbers,
++ but I am paranoid and would rather an abort than
++ a bug I will never find */
++ abort ();
++ }
++ else
++ cmp1 = GEN_INT (new);
++ }
++ }
++
++ else if (p_info->reverse_regs)
++ {
++ rtx temp = cmp0;
++ cmp0 = cmp1;
++ cmp1 = temp;
++ }
++
++
++
++ if (branch_p)
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ rtx insn;
++ rtx cond = gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1);
++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ insn = gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond, label, pc_rtx));
++ emit_jump_insn (insn);
++ }
++ else
++ {
++ rtx cond, label;
++
++ result = gen_reg_rtx (mode);
++
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++
++ cond = gen_rtx (NE, mode, result, const0_rtx);
++ label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond,
++ label, pc_rtx)));
++ }
++ }
++ else
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1));
++ }
++ else
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++ }
++ }
++
++}
++
++
++/* ??? For now conditional moves are only supported
++ when the mode of the operands being compared are
++ the same as the ones being moved */
++
++void
++gen_conditional_move (rtx *operands, enum machine_mode mode)
++{
++ rtx insn, cond;
++ rtx cmp_reg = gen_reg_rtx (mode);
++ enum rtx_code cmp_code = GET_CODE (operands[1]);
++ enum rtx_code move_code = EQ;
++
++ /* emit a comparison if it is not "simple".
++ Simple comparisons are X eq 0 and X ne 0 */
++ if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[0];
++ move_code = cmp_code;
++ }
++ else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[1];
++ move_code = cmp_code == EQ ? NE : EQ;
++ }
++ else
++ gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1],
++ NULL_RTX);
++
++ cond = gen_rtx (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode));
++ insn = gen_rtx_SET (mode, operands[0],
++ gen_rtx_IF_THEN_ELSE (mode,
++ cond, operands[2], operands[3]));
++ emit_insn (insn);
++}
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++int
++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int strict)
++{
++ int ret_val = 0;
++
++ switch (GET_CODE (operand))
++ {
++ /* direct. */
++ case SYMBOL_REF:
++ if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand))
++ {
++ ret_val = 1;
++ break;
++ }
++ /* else, fall through */
++ case LABEL_REF:
++ case CONST_INT:
++ case CONST:
++ case CONST_DOUBLE:
++ /* ??? In here I need to add gp addressing */
++ ret_val = 0;
++
++ break;
++
++ /* Register indirect. */
++ case REG:
++ ret_val = REG_OK_FOR_BASE_P2 (operand, strict);
++ break;
++
++ /* Register indirect with displacement */
++ case PLUS:
++ {
++ rtx op0 = XEXP (operand, 0);
++ rtx op1 = XEXP (operand, 1);
++
++ if (REG_P (op0) && REG_P (op1))
++ ret_val = 0;
++ else if (REG_P (op0) && CONSTANT_P (op1))
++ ret_val = REG_OK_FOR_BASE_P2 (op0, strict)
++ && SMALL_INT (INTVAL (op1));
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ ret_val = REG_OK_FOR_BASE_P2 (op1, strict)
++ && SMALL_INT (INTVAL (op0));
++ else
++ ret_val = 0;
++ }
++ break;
++
++ default:
++ ret_val = 0;
++ break;
++ }
++
++ return ret_val;
++}
++
++/* Return true if EXP should be placed in the small data section. */
++
++static bool
++nios2_in_small_data_p (tree exp)
++{
++ /* We want to merge strings, so we never consider them small data. */
++ if (TREE_CODE (exp) == STRING_CST)
++ return false;
++
++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
++ {
++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
++ /* ??? these string names need moving into
++ an array in some header file */
++ if (nios2_section_threshold > 0
++ && (strcmp (section, ".sbss") == 0
++ || strncmp (section, ".sbss.", 6) == 0
++ || strcmp (section, ".sdata") == 0
++ || strncmp (section, ".sdata.", 7) == 0))
++ return true;
++ }
++ else if (TREE_CODE (exp) == VAR_DECL)
++ {
++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
++
++ /* If this is an incomplete type with size 0, then we can't put it
++ in sdata because it might be too big when completed. */
++ if (size > 0 && size <= nios2_section_threshold)
++ return true;
++ }
++
++ return false;
++}
++
++static void
++nios2_encode_section_info (tree decl, rtx rtl, int first)
++{
++
++ rtx symbol;
++ int flags;
++
++ default_encode_section_info (decl, rtl, first);
++
++ /* Careful not to prod global register variables. */
++ if (GET_CODE (rtl) != MEM)
++ return;
++ symbol = XEXP (rtl, 0);
++ if (GET_CODE (symbol) != SYMBOL_REF)
++ return;
++
++ flags = SYMBOL_REF_FLAGS (symbol);
++
++ /* We don't want weak variables to be addressed with gp in case they end up with
++ value 0 which is not within 2^15 of $gp */
++ if (DECL_P (decl) && DECL_WEAK (decl))
++ flags |= SYMBOL_FLAG_WEAK_DECL;
++
++ SYMBOL_REF_FLAGS (symbol) = flags;
++}
++
++
++static unsigned int
++nios2_section_type_flags (tree decl, const char *name, int reloc)
++{
++ unsigned int flags;
++
++ flags = default_section_type_flags (decl, name, reloc);
++
++ /* ??? these string names need moving into an array in some header file */
++ if (strcmp (name, ".sbss") == 0
++ || strncmp (name, ".sbss.", 6) == 0
++ || strcmp (name, ".sdata") == 0
++ || strncmp (name, ".sdata.", 7) == 0)
++ flags |= SECTION_SMALL;
++
++ return flags;
++}
++
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++
++/* print the operand OP to file stream
++ FILE modified by LETTER. LETTER
++ can be one of:
++ i: print "i" if OP is an immediate, except 0
++ o: print "io" if OP is volatile
++
++ z: for const0_rtx print $0 instead of 0
++ H: for %hiadj
++ L: for %lo
++ U: for upper half of 32 bit value
++ */
++
++void
++nios2_print_operand (FILE *file, rtx op, int letter)
++{
++
++ switch (letter)
++ {
++ case 'i':
++ if (CONSTANT_P (op) && (op != const0_rtx))
++ fprintf (file, "i");
++ return;
++
++ case 'o':
++ if (GET_CODE (op) == MEM
++ && ((MEM_VOLATILE_P (op) && !TARGET_CACHE_VOLATILE)
++ || TARGET_BYPASS_CACHE))
++ fprintf (file, "io");
++ return;
++
++ default:
++ break;
++ }
++
++ if (comparison_operator (op, VOIDmode))
++ {
++ if (letter == 0)
++ {
++ fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op)));
++ return;
++ }
++ }
++
++
++ switch (GET_CODE (op))
++ {
++ case REG:
++ if (letter == 0 || letter == 'z')
++ {
++ fprintf (file, "%s", reg_names[REGNO (op)]);
++ return;
++ }
++
++ case CONST_INT:
++ if (INTVAL (op) == 0 && letter == 'z')
++ {
++ fprintf (file, "zero");
++ return;
++ }
++ else if (letter == 'U')
++ {
++ HOST_WIDE_INT val = INTVAL (op);
++ rtx new_op;
++ val = (val / 65536) & 0xFFFF;
++ new_op = GEN_INT (val);
++ output_addr_const (file, new_op);
++ return;
++ }
++
++ /* else, fall through */
++ case CONST:
++ case LABEL_REF:
++ case SYMBOL_REF:
++ case CONST_DOUBLE:
++ if (letter == 0 || letter == 'z')
++ {
++ output_addr_const (file, op);
++ return;
++ }
++ else if (letter == 'H')
++ {
++ fprintf (file, "%%hiadj(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++ else if (letter == 'L')
++ {
++ fprintf (file, "%%lo(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++
++
++ case SUBREG:
++ case MEM:
++ if (letter == 0)
++ {
++ output_address (op);
++ return;
++ }
++
++ case CODE_LABEL:
++ if (letter == 0)
++ {
++ output_addr_const (file, op);
++ return;
++ }
++
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print (%c) ", letter);
++ debug_rtx (op);
++ abort ();
++}
++
++static int gprel_constant (rtx);
++
++static int
++gprel_constant (rtx op)
++{
++ if (GET_CODE (op) == SYMBOL_REF
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op))
++ {
++ return 1;
++ }
++ else if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == PLUS)
++ {
++ return gprel_constant (XEXP (XEXP (op, 0), 0));
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++void
++nios2_print_operand_address (FILE *file, rtx op)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST:
++ case CONST_INT:
++ case LABEL_REF:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ if (gprel_constant (op))
++ {
++ fprintf (file, "%%gprel(");
++ output_addr_const (file, op);
++ fprintf (file, ")(%s)", reg_names[GP_REGNO]);
++ return;
++ }
++
++ break;
++
++ case PLUS:
++ {
++ rtx op0 = XEXP (op, 0);
++ rtx op1 = XEXP (op, 1);
++
++ if (REG_P (op0) && CONSTANT_P (op1))
++ {
++ output_addr_const (file, op1);
++ fprintf (file, "(%s)", reg_names[REGNO (op0)]);
++ return;
++ }
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ {
++ output_addr_const (file, op0);
++ fprintf (file, "(%s)", reg_names[REGNO (op1)]);
++ return;
++ }
++ }
++ break;
++
++ case REG:
++ fprintf (file, "0(%s)", reg_names[REGNO (op)]);
++ return;
++
++ case MEM:
++ {
++ rtx base = XEXP (op, 0);
++ PRINT_OPERAND_ADDRESS (file, base);
++ return;
++ }
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print address\n");
++ debug_rtx (op);
++ abort ();
++}
++
++
++
++
++
++/****************************
++ * Predicates
++ ****************************/
++
++int
++arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++uns_arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++logical_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT
++ && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op))))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++shift_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op));
++}
++
++/* Return truth value of whether OP is a register or the constant 0. */
++
++int
++reg_or_0_operand (rtx op, enum machine_mode mode)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST_INT:
++ return INTVAL (op) == 0;
++
++ case CONST_DOUBLE:
++ return op == CONST0_RTX (mode);
++
++ default:
++ break;
++ }
++
++ return register_operand (op, mode);
++}
++
++
++int
++equality_op (rtx op, enum machine_mode mode)
++{
++ if (mode != GET_MODE (op))
++ return 0;
++
++ return GET_CODE (op) == EQ || GET_CODE (op) == NE;
++}
++
++int
++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op));
++}
++
++
++
++
++
++
++
++/*****************************************************************************
++**
++** instruction scheduler
++**
++*****************************************************************************/
++static int
++nios2_use_dfa_pipeline_interface ()
++{
++ return 1;
++}
++
++
++static int
++nios2_issue_rate ()
++{
++#ifdef MAX_DFA_ISSUE_RATE
++ return MAX_DFA_ISSUE_RATE;
++#else
++ return 1;
++#endif
++}
++
++
++const char *
++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED,
++ const char *ptr ATTRIBUTE_UNUSED)
++{
++ const char *p;
++
++ p = ptr;
++ return ptr;
++}
++
++
++
++/*****************************************************************************
++**
++** function arguments
++**
++*****************************************************************************/
++
++void
++init_cumulative_args (CUMULATIVE_ARGS *cum,
++ tree fntype ATTRIBUTE_UNUSED,
++ rtx libname ATTRIBUTE_UNUSED,
++ tree fndecl ATTRIBUTE_UNUSED,
++ int n_named_args ATTRIBUTE_UNUSED)
++{
++ cum->regs_used = 0;
++}
++
++
++/* Update the data in CUM to advance over an argument
++ of mode MODE and data type TYPE.
++ (TYPE is null for libcalls where that information may not be available.) */
++
++void
++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ cum->regs_used = NUM_ARG_REGS;
++ }
++ else
++ {
++ cum->regs_used += param_size;
++ }
++
++ return;
++}
++
++/* Define where to put the arguments to a function. Value is zero to
++ push the argument on the stack, or a hard register in which to
++ store the argument.
++
++ MODE is the argument's machine mode.
++ TYPE is the data type of the argument (as a tree).
++ This is null for libcalls where that information may
++ not be available.
++ CUM is a variable of type CUMULATIVE_ARGS which gives info about
++ the preceding args and about the function being called.
++ NAMED is nonzero if this argument is a named parameter
++ (otherwise it is an extra parameter matching an ellipsis). */
++rtx
++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ rtx return_rtx = NULL_RTX;
++
++ if (cum->regs_used < NUM_ARG_REGS)
++ {
++ return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used);
++ }
++
++ return return_rtx;
++}
++
++int
++function_arg_partial_nregs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used < NUM_ARG_REGS
++ && cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ return NUM_ARG_REGS - cum->regs_used;
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++
++int
++nios2_return_in_memory (tree type)
++{
++ int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
++ || (int_size_in_bytes (type) == -1));
++
++ return res;
++}
++
++/* ??? It may be possible to eliminate the copyback and implement
++ my own va_arg type, but that is more work for now. */
++int
++nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int no_rtl)
++{
++ CUMULATIVE_ARGS local_cum;
++ int regs_to_push;
++
++ local_cum = *cum;
++ FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
++
++ regs_to_push = NUM_ARG_REGS - local_cum.regs_used;
++
++ if (!no_rtl)
++ {
++ if (regs_to_push > 0)
++ {
++ rtx ptr, mem;
++
++ ptr = virtual_incoming_args_rtx;
++ mem = gen_rtx_MEM (BLKmode, ptr);
++
++ /* va_arg is an array access in this case, which causes
++ it to get MEM_IN_STRUCT_P set. We must set it here
++ so that the insn scheduler won't assume that these
++ stores can't possibly overlap with the va_arg loads. */
++ MEM_SET_IN_STRUCT_P (mem, 1);
++
++ emit_insn (gen_blockage ());
++ move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem,
++ regs_to_push);
++ emit_insn (gen_blockage ());
++ }
++ }
++
++ return regs_to_push * UNITS_PER_WORD;
++
++}
++
++
++
++/*****************************************************************************
++**
++** builtins
++**
++** This method for handling builtins is from CSP where _many_ more types of
++** expanders have already been written. Check there first before writing
++** new ones.
++**
++*****************************************************************************/
++
++enum nios2_builtins
++{
++ NIOS2_BUILTIN_LDBIO,
++ NIOS2_BUILTIN_LDBUIO,
++ NIOS2_BUILTIN_LDHIO,
++ NIOS2_BUILTIN_LDHUIO,
++ NIOS2_BUILTIN_LDWIO,
++ NIOS2_BUILTIN_STBIO,
++ NIOS2_BUILTIN_STHIO,
++ NIOS2_BUILTIN_STWIO,
++ NIOS2_BUILTIN_SYNC,
++ NIOS2_BUILTIN_RDCTL,
++ NIOS2_BUILTIN_WRCTL,
++
++ NIOS2_BUILTIN_CUSTOM_N,
++ NIOS2_BUILTIN_CUSTOM_NI,
++ NIOS2_BUILTIN_CUSTOM_NF,
++ NIOS2_BUILTIN_CUSTOM_NP,
++ NIOS2_BUILTIN_CUSTOM_NII,
++ NIOS2_BUILTIN_CUSTOM_NIF,
++ NIOS2_BUILTIN_CUSTOM_NIP,
++ NIOS2_BUILTIN_CUSTOM_NFI,
++ NIOS2_BUILTIN_CUSTOM_NFF,
++ NIOS2_BUILTIN_CUSTOM_NFP,
++ NIOS2_BUILTIN_CUSTOM_NPI,
++ NIOS2_BUILTIN_CUSTOM_NPF,
++ NIOS2_BUILTIN_CUSTOM_NPP,
++ NIOS2_BUILTIN_CUSTOM_IN,
++ NIOS2_BUILTIN_CUSTOM_INI,
++ NIOS2_BUILTIN_CUSTOM_INF,
++ NIOS2_BUILTIN_CUSTOM_INP,
++ NIOS2_BUILTIN_CUSTOM_INII,
++ NIOS2_BUILTIN_CUSTOM_INIF,
++ NIOS2_BUILTIN_CUSTOM_INIP,
++ NIOS2_BUILTIN_CUSTOM_INFI,
++ NIOS2_BUILTIN_CUSTOM_INFF,
++ NIOS2_BUILTIN_CUSTOM_INFP,
++ NIOS2_BUILTIN_CUSTOM_INPI,
++ NIOS2_BUILTIN_CUSTOM_INPF,
++ NIOS2_BUILTIN_CUSTOM_INPP,
++ NIOS2_BUILTIN_CUSTOM_FN,
++ NIOS2_BUILTIN_CUSTOM_FNI,
++ NIOS2_BUILTIN_CUSTOM_FNF,
++ NIOS2_BUILTIN_CUSTOM_FNP,
++ NIOS2_BUILTIN_CUSTOM_FNII,
++ NIOS2_BUILTIN_CUSTOM_FNIF,
++ NIOS2_BUILTIN_CUSTOM_FNIP,
++ NIOS2_BUILTIN_CUSTOM_FNFI,
++ NIOS2_BUILTIN_CUSTOM_FNFF,
++ NIOS2_BUILTIN_CUSTOM_FNFP,
++ NIOS2_BUILTIN_CUSTOM_FNPI,
++ NIOS2_BUILTIN_CUSTOM_FNPF,
++ NIOS2_BUILTIN_CUSTOM_FNPP,
++ NIOS2_BUILTIN_CUSTOM_PN,
++ NIOS2_BUILTIN_CUSTOM_PNI,
++ NIOS2_BUILTIN_CUSTOM_PNF,
++ NIOS2_BUILTIN_CUSTOM_PNP,
++ NIOS2_BUILTIN_CUSTOM_PNII,
++ NIOS2_BUILTIN_CUSTOM_PNIF,
++ NIOS2_BUILTIN_CUSTOM_PNIP,
++ NIOS2_BUILTIN_CUSTOM_PNFI,
++ NIOS2_BUILTIN_CUSTOM_PNFF,
++ NIOS2_BUILTIN_CUSTOM_PNFP,
++ NIOS2_BUILTIN_CUSTOM_PNPI,
++ NIOS2_BUILTIN_CUSTOM_PNPF,
++ NIOS2_BUILTIN_CUSTOM_PNPP,
++
++
++ LIM_NIOS2_BUILTINS
++};
++
++struct builtin_description
++{
++ const enum insn_code icode;
++ const char *const name;
++ const enum nios2_builtins code;
++ const tree *type;
++ rtx (* expander) PARAMS ((const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int));
++};
++
++static rtx nios2_expand_STXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_LDXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_sync (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_rdctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_wrctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static rtx nios2_expand_custom_n (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_Xn (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static tree endlink;
++
++/* int fn (volatile const void *)
++ */
++static tree int_ftype_volatile_const_void_p;
++
++/* int fn (int)
++ */
++static tree int_ftype_int;
++
++/* void fn (int, int)
++ */
++static tree void_ftype_int_int;
++
++/* void fn (volatile void *, int)
++ */
++static tree void_ftype_volatile_void_p_int;
++
++/* void fn (void)
++ */
++static tree void_ftype_void;
++
++static tree custom_n;
++static tree custom_ni;
++static tree custom_nf;
++static tree custom_np;
++static tree custom_nii;
++static tree custom_nif;
++static tree custom_nip;
++static tree custom_nfi;
++static tree custom_nff;
++static tree custom_nfp;
++static tree custom_npi;
++static tree custom_npf;
++static tree custom_npp;
++static tree custom_in;
++static tree custom_ini;
++static tree custom_inf;
++static tree custom_inp;
++static tree custom_inii;
++static tree custom_inif;
++static tree custom_inip;
++static tree custom_infi;
++static tree custom_inff;
++static tree custom_infp;
++static tree custom_inpi;
++static tree custom_inpf;
++static tree custom_inpp;
++static tree custom_fn;
++static tree custom_fni;
++static tree custom_fnf;
++static tree custom_fnp;
++static tree custom_fnii;
++static tree custom_fnif;
++static tree custom_fnip;
++static tree custom_fnfi;
++static tree custom_fnff;
++static tree custom_fnfp;
++static tree custom_fnpi;
++static tree custom_fnpf;
++static tree custom_fnpp;
++static tree custom_pn;
++static tree custom_pni;
++static tree custom_pnf;
++static tree custom_pnp;
++static tree custom_pnii;
++static tree custom_pnif;
++static tree custom_pnip;
++static tree custom_pnfi;
++static tree custom_pnff;
++static tree custom_pnfp;
++static tree custom_pnpi;
++static tree custom_pnpf;
++static tree custom_pnpp;
++
++
++static const struct builtin_description bdesc[] = {
++ {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++
++ {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++
++ {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, &void_ftype_void, nios2_expand_sync},
++ {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, &int_ftype_int, nios2_expand_rdctl},
++ {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, &void_ftype_int_int, nios2_expand_wrctl},
++
++ {CODE_FOR_custom_n, "__builtin_custom_n", NIOS2_BUILTIN_CUSTOM_N, &custom_n, nios2_expand_custom_n},
++ {CODE_FOR_custom_ni, "__builtin_custom_ni", NIOS2_BUILTIN_CUSTOM_NI, &custom_ni, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nf, "__builtin_custom_nf", NIOS2_BUILTIN_CUSTOM_NF, &custom_nf, nios2_expand_custom_nX},
++ {CODE_FOR_custom_np, "__builtin_custom_np", NIOS2_BUILTIN_CUSTOM_NP, &custom_np, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nii, "__builtin_custom_nii", NIOS2_BUILTIN_CUSTOM_NII, &custom_nii, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nif, "__builtin_custom_nif", NIOS2_BUILTIN_CUSTOM_NIF, &custom_nif, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nip, "__builtin_custom_nip", NIOS2_BUILTIN_CUSTOM_NIP, &custom_nip, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfi, "__builtin_custom_nfi", NIOS2_BUILTIN_CUSTOM_NFI, &custom_nfi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nff, "__builtin_custom_nff", NIOS2_BUILTIN_CUSTOM_NFF, &custom_nff, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfp, "__builtin_custom_nfp", NIOS2_BUILTIN_CUSTOM_NFP, &custom_nfp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npi, "__builtin_custom_npi", NIOS2_BUILTIN_CUSTOM_NPI, &custom_npi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npf, "__builtin_custom_npf", NIOS2_BUILTIN_CUSTOM_NPF, &custom_npf, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npp, "__builtin_custom_npp", NIOS2_BUILTIN_CUSTOM_NPP, &custom_npp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_in, "__builtin_custom_in", NIOS2_BUILTIN_CUSTOM_IN, &custom_in, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_ini, "__builtin_custom_ini", NIOS2_BUILTIN_CUSTOM_INI, &custom_ini, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inf, "__builtin_custom_inf", NIOS2_BUILTIN_CUSTOM_INF, &custom_inf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inp, "__builtin_custom_inp", NIOS2_BUILTIN_CUSTOM_INP, &custom_inp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inii, "__builtin_custom_inii", NIOS2_BUILTIN_CUSTOM_INII, &custom_inii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inif, "__builtin_custom_inif", NIOS2_BUILTIN_CUSTOM_INIF, &custom_inif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inip, "__builtin_custom_inip", NIOS2_BUILTIN_CUSTOM_INIP, &custom_inip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infi, "__builtin_custom_infi", NIOS2_BUILTIN_CUSTOM_INFI, &custom_infi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inff, "__builtin_custom_inff", NIOS2_BUILTIN_CUSTOM_INFF, &custom_inff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infp, "__builtin_custom_infp", NIOS2_BUILTIN_CUSTOM_INFP, &custom_infp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpi, "__builtin_custom_inpi", NIOS2_BUILTIN_CUSTOM_INPI, &custom_inpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpf, "__builtin_custom_inpf", NIOS2_BUILTIN_CUSTOM_INPF, &custom_inpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpp, "__builtin_custom_inpp", NIOS2_BUILTIN_CUSTOM_INPP, &custom_inpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fn, "__builtin_custom_fn", NIOS2_BUILTIN_CUSTOM_FN, &custom_fn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_fni, "__builtin_custom_fni", NIOS2_BUILTIN_CUSTOM_FNI, &custom_fni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnf, "__builtin_custom_fnf", NIOS2_BUILTIN_CUSTOM_FNF, &custom_fnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnp, "__builtin_custom_fnp", NIOS2_BUILTIN_CUSTOM_FNP, &custom_fnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnii, "__builtin_custom_fnii", NIOS2_BUILTIN_CUSTOM_FNII, &custom_fnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnif, "__builtin_custom_fnif", NIOS2_BUILTIN_CUSTOM_FNIF, &custom_fnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnip, "__builtin_custom_fnip", NIOS2_BUILTIN_CUSTOM_FNIP, &custom_fnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfi, "__builtin_custom_fnfi", NIOS2_BUILTIN_CUSTOM_FNFI, &custom_fnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnff, "__builtin_custom_fnff", NIOS2_BUILTIN_CUSTOM_FNFF, &custom_fnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfp, "__builtin_custom_fnfp", NIOS2_BUILTIN_CUSTOM_FNFP, &custom_fnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpi, "__builtin_custom_fnpi", NIOS2_BUILTIN_CUSTOM_FNPI, &custom_fnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpf, "__builtin_custom_fnpf", NIOS2_BUILTIN_CUSTOM_FNPF, &custom_fnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpp, "__builtin_custom_fnpp", NIOS2_BUILTIN_CUSTOM_FNPP, &custom_fnpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pn, "__builtin_custom_pn", NIOS2_BUILTIN_CUSTOM_PN, &custom_pn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_pni, "__builtin_custom_pni", NIOS2_BUILTIN_CUSTOM_PNI, &custom_pni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnf, "__builtin_custom_pnf", NIOS2_BUILTIN_CUSTOM_PNF, &custom_pnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnp, "__builtin_custom_pnp", NIOS2_BUILTIN_CUSTOM_PNP, &custom_pnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnii, "__builtin_custom_pnii", NIOS2_BUILTIN_CUSTOM_PNII, &custom_pnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnif, "__builtin_custom_pnif", NIOS2_BUILTIN_CUSTOM_PNIF, &custom_pnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnip, "__builtin_custom_pnip", NIOS2_BUILTIN_CUSTOM_PNIP, &custom_pnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfi, "__builtin_custom_pnfi", NIOS2_BUILTIN_CUSTOM_PNFI, &custom_pnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnff, "__builtin_custom_pnff", NIOS2_BUILTIN_CUSTOM_PNFF, &custom_pnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfp, "__builtin_custom_pnfp", NIOS2_BUILTIN_CUSTOM_PNFP, &custom_pnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpi, "__builtin_custom_pnpi", NIOS2_BUILTIN_CUSTOM_PNPI, &custom_pnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpf, "__builtin_custom_pnpf", NIOS2_BUILTIN_CUSTOM_PNPF, &custom_pnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpp, "__builtin_custom_pnpp", NIOS2_BUILTIN_CUSTOM_PNPP, &custom_pnpp, nios2_expand_custom_XnXX},
++
++
++ {0, 0, 0, 0, 0},
++};
++
++/* This does not have a closing bracket on purpose (see use) */
++#define def_param(TYPE) \
++ tree_cons (NULL_TREE, TYPE,
++
++static void
++nios2_init_builtins ()
++{
++ const struct builtin_description *d;
++
++
++ endlink = void_list_node;
++
++ /* Special indenting here because one of the brackets is in def_param */
++ /* *INDENT-OFF* */
++
++ /* int fn (volatile const void *)
++ */
++ int_ftype_volatile_const_void_p
++ = build_function_type (integer_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))
++ endlink));
++
++
++ /* void fn (volatile void *, int)
++ */
++ void_ftype_volatile_void_p_int
++ = build_function_type (void_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_VOLATILE))
++ def_param (integer_type_node)
++ endlink)));
++
++ /* void fn (void)
++ */
++ void_ftype_void
++ = build_function_type (void_type_node,
++ endlink);
++
++ /* int fn (int)
++ */
++ int_ftype_int
++ = build_function_type (integer_type_node,
++ def_param (integer_type_node)
++ endlink));
++
++ /* void fn (int, int)
++ */
++ void_ftype_int_int
++ = build_function_type (void_type_node,
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink)));
++
++
++#define CUSTOM_NUM def_param (integer_type_node)
++
++ custom_n
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ni
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_nf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_np
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_nii
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nif
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nip
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_nfi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nff
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nfp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_npi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_npf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_npp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_in
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ini
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_inf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_inp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_inii
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inif
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inip
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_infi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inff
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_infp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_inpi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inpf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inpp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_fn
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_fni
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_fnf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_fnp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_fnii
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnif
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnip
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnfi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnff
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnfp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnpi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnpf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnpp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++ custom_pn
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_pni
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_pnf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_pnp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_pnii
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnif
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnip
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnfi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnff
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnfp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnpi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnpf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnpp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++
++ /* *INDENT-ON* */
++
++
++ for (d = bdesc; d->name; d++)
++ {
++ builtin_function (d->name, *d->type, d->code,
++ BUILT_IN_MD, NULL, NULL);
++ }
++}
++
++/* Expand an expression EXP that calls a built-in function,
++ with result going to TARGET if that's convenient
++ (and in mode MODE if that's convenient).
++ SUBTARGET may be used as the target for computing one of EXP's operands.
++ IGNORE is nonzero if the value is to be ignored. */
++
++static rtx
++nios2_expand_builtin (tree exp, rtx target, rtx subtarget,
++ enum machine_mode mode, int ignore)
++{
++ const struct builtin_description *d;
++ tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
++
++ for (d = bdesc; d->name; d++)
++ if (d->code == fcode)
++ return (d->expander) (d, exp, target, subtarget, mode, ignore);
++
++ /* we should have seen one of the functins we registered */
++ abort ();
++}
++
++static rtx nios2_create_target (const struct builtin_description *, rtx);
++
++
++static rtx
++nios2_create_target (const struct builtin_description *d, rtx target)
++{
++ if (!target
++ || !(*insn_data[d->icode].operand[0].predicate) (target,
++ insn_data[d->icode].operand[0].mode))
++ {
++ target = gen_reg_rtx (insn_data[d->icode].operand[0].mode);
++ }
++
++ return target;
++}
++
++
++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree);
++static rtx nios2_extract_operand (const struct builtin_description *, int, int, tree);
++
++static rtx
++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx opcode = expand_expr (arg, NULL_RTX, mode, 0);
++ opcode = protect_from_queue (opcode, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode))
++ error ("Custom instruction opcode must be compile time constant in the range 0-255 for %s", d->name);
++
++ return opcode;
++}
++
++static rtx
++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx operand = expand_expr (arg, NULL_RTX, mode, 0);
++ operand = protect_from_queue (operand, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ operand = copy_to_mode_reg (mode, operand);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ error ("Invalid argument %d to %s", argnum, d->name);
++
++ return operand;
++}
++
++
++static rtx
++nios2_expand_custom_n (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_n should have exactly one operand */
++ if (insn_data[d->icode].n_operands != 1)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++
++ pat = GEN_FCN (d->icode) (opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp,
++ rtx target, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_Xn should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ pat = GEN_FCN (d->icode) (target, opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nX (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++
++ /* custom_nX should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++ /* custom_Xn should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_nX should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_XnX should have exactly four operands */
++ if (insn_data[d->icode].n_operands != 4)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++
++static rtx
++nios2_expand_STXIO (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx store_dest, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ store_dest = protect_from_queue (store_dest, 0);
++
++ store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode))
++ error ("Invalid argument 1 to %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (store_dest, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++static rtx
++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx ld_src;
++ enum insn_code icode = d->icode;
++
++ /* loads should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ ld_src = protect_from_queue (ld_src, 0);
++
++ ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode))
++ {
++ error ("Invalid argument 1 to %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, ld_src);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++static rtx
++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ emit_insn (gen_sync ());
++ return 0;
++}
++
++static rtx
++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx rdctl_reg;
++ enum insn_code icode = d->icode;
++
++ /* rdctl should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ rdctl_reg = protect_from_queue (rdctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode))
++ {
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, rdctl_reg);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx wrctl_reg, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ wrctl_reg = protect_from_queue (wrctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode))
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (wrctl_reg, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++#include "gt-nios2.h"
++
+--- gcc-3.4.3/gcc/config/nios2/nios2.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.h
+@@ -0,0 +1,824 @@
++/* Definitions of target machine for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++
++#define TARGET_CPU_CPP_BUILTINS() \
++ do \
++ { \
++ builtin_define_std ("NIOS2"); \
++ builtin_define_std ("nios2"); \
++ builtin_define ("_GNU_SOURCE"); \
++ } \
++ while (0)
++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)")
++
++
++
++
++
++/*********************************
++ * Run-time Target Specification
++ *********************************/
++
++#define HAS_DIV_FLAG 0x0001
++#define HAS_MUL_FLAG 0x0002
++#define HAS_MULX_FLAG 0x0004
++#define FAST_SW_DIV_FLAG 0x0008
++#define INLINE_MEMCPY_FLAG 0x00010
++#define CACHE_VOLATILE_FLAG 0x0020
++#define BYPASS_CACHE_FLAG 0x0040
++
++extern int target_flags;
++#define TARGET_HAS_DIV (target_flags & HAS_DIV_FLAG)
++#define TARGET_HAS_MUL (target_flags & HAS_MUL_FLAG)
++#define TARGET_HAS_MULX (target_flags & HAS_MULX_FLAG)
++#define TARGET_FAST_SW_DIV (target_flags & FAST_SW_DIV_FLAG)
++#define TARGET_INLINE_MEMCPY (target_flags & INLINE_MEMCPY_FLAG)
++#define TARGET_CACHE_VOLATILE (target_flags & CACHE_VOLATILE_FLAG)
++#define TARGET_BYPASS_CACHE (target_flags & BYPASS_CACHE_FLAG)
++
++#define TARGET_SWITCHES \
++{ \
++ { "hw-div", HAS_DIV_FLAG, \
++ N_("Enable DIV, DIVU") }, \
++ { "no-hw-div", -HAS_DIV_FLAG, \
++ N_("Disable DIV, DIVU (default)") }, \
++ { "hw-mul", HAS_MUL_FLAG, \
++ N_("Enable MUL instructions (default)") }, \
++ { "hw-mulx", HAS_MULX_FLAG, \
++ N_("Enable MULX instructions, assume fast shifter") }, \
++ { "no-hw-mul", -HAS_MUL_FLAG, \
++ N_("Disable MUL instructions") }, \
++ { "no-hw-mulx", -HAS_MULX_FLAG, \
++ N_("Disable MULX instructions, assume slow shifter (default and implied by -mno-hw-mul)") }, \
++ { "fast-sw-div", FAST_SW_DIV_FLAG, \
++ N_("Use table based fast divide (default at -O3)") }, \
++ { "no-fast-sw-div", -FAST_SW_DIV_FLAG, \
++ N_("Don't use table based fast divide ever") }, \
++ { "inline-memcpy", INLINE_MEMCPY_FLAG, \
++ N_("Inline small memcpy (default when optimizing)") }, \
++ { "no-inline-memcpy", -INLINE_MEMCPY_FLAG, \
++ N_("Don't Inline small memcpy") }, \
++ { "cache-volatile", CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use non-io variants of instructions (default)") }, \
++ { "no-cache-volatile", -CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use io variants of instructions") }, \
++ { "bypass-cache", BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins use io variants") }, \
++ { "no-bypass-cache", -BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins do not use io variants (default)") }, \
++ { "smallc", 0, \
++ N_("Link with a limited version of the C library") }, \
++ { "ctors-in-init", 0, \
++ "" /* undocumented: N_("Link with static constructors and destructors in init") */ }, \
++ { "", TARGET_DEFAULT, 0 } \
++}
++
++
++extern const char *nios2_sys_nosys_string; /* for -msys=nosys */
++extern const char *nios2_sys_lib_string; /* for -msys-lib= */
++extern const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++#define TARGET_OPTIONS \
++{ \
++ { "sys=nosys", &nios2_sys_nosys_string, \
++ N_("Use stub versions of OS library calls (default)"), 0}, \
++ { "sys-lib=", &nios2_sys_lib_string, \
++ N_("Name of System Library to link against. (Converted to a -l option)"), 0}, \
++ { "sys-crt0=", &nios2_sys_crt0_string, \
++ N_("Name of the startfile. (default is a crt0 for the ISS only)"), 0}, \
++}
++
++
++/* Default target_flags if no switches specified. */
++#ifndef TARGET_DEFAULT
++# define TARGET_DEFAULT (HAS_MUL_FLAG | CACHE_VOLATILE_FLAG)
++#endif
++
++/* Switch Recognition by gcc.c. Add -G xx support */
++#undef SWITCH_TAKES_ARG
++#define SWITCH_TAKES_ARG(CHAR) \
++ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
++
++#define OVERRIDE_OPTIONS override_options ()
++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE)
++#define CAN_DEBUG_WITHOUT_FP
++
++#define CC1_SPEC "\
++%{G*}"
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
++ %{msys-lib=*: -l%*} \
++ %{!msys-lib=*: -lc } \
++ --end-group \
++ %{msys-lib=: %eYou need a library name for -msys-lib=} \
++"
++
++
++#undef STARTFILE_SPEC
++#define STARTFILE_SPEC \
++"%{msys-crt0=*: %*} %{!msys-crt0=*: crt1%O%s} \
++ %{msys-crt0=: %eYou need a C startup file for -msys-crt0=} \
++ %{mctors-in-init: crti%O%s crtbegin%O%s} \
++"
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{mctors-in-init: crtend%O%s crtn%O%s}"
++
++
++/***********************
++ * Storage Layout
++ ***********************/
++
++#define DEFAULT_SIGNED_CHAR 1
++#define BITS_BIG_ENDIAN 0
++#define BYTES_BIG_ENDIAN 0
++#define WORDS_BIG_ENDIAN 0
++#define BITS_PER_UNIT 8
++#define BITS_PER_WORD 32
++#define UNITS_PER_WORD 4
++#define POINTER_SIZE 32
++#define BIGGEST_ALIGNMENT 32
++#define STRICT_ALIGNMENT 1
++#define FUNCTION_BOUNDARY 32
++#define PARM_BOUNDARY 32
++#define STACK_BOUNDARY 32
++#define PREFERRED_STACK_BOUNDARY 32
++#define MAX_FIXED_MODE_SIZE 64
++
++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
++ ((TREE_CODE (EXP) == STRING_CST) \
++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
++
++
++/**********************
++ * Layout of Source Language Data Types
++ **********************/
++
++#define INT_TYPE_SIZE 32
++#define SHORT_TYPE_SIZE 16
++#define LONG_TYPE_SIZE 32
++#define LONG_LONG_TYPE_SIZE 64
++#define FLOAT_TYPE_SIZE 32
++#define DOUBLE_TYPE_SIZE 64
++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
++
++
++/*************************
++ * Condition Code Status
++ ************************/
++
++/* comparison type */
++/* ??? currently only CMP_SI is used */
++enum cmp_type {
++ CMP_SI, /* compare four byte integers */
++ CMP_DI, /* compare eight byte integers */
++ CMP_SF, /* compare single precision floats */
++ CMP_DF, /* compare double precision floats */
++ CMP_MAX /* max comparison type */
++};
++
++extern GTY(()) rtx branch_cmp[2]; /* operands for compare */
++extern enum cmp_type branch_type; /* what type of branch to use */
++
++/**********************
++ * Register Usage
++ **********************/
++
++/* ---------------------------------- *
++ * Basic Characteristics of Registers
++ * ---------------------------------- */
++
++/*
++Register Number
++ Register Name
++ Alternate Name
++ Purpose
++0 r0 zero always zero
++1 r1 at Assembler Temporary
++2-3 r2-r3 Return Location
++4-7 r4-r7 Register Arguments
++8-15 r8-r15 Caller Saved Registers
++16-22 r16-r22 Callee Saved Registers
++23 r23 sc Static Chain (Callee Saved)
++ ??? Does $sc want to be caller or callee
++ saved. If caller, 15, else 23.
++24 r24 Exception Temporary
++25 r25 Breakpoint Temporary
++26 r26 gp Global Pointer
++27 r27 sp Stack Pointer
++28 r28 fp Frame Pointer
++29 r29 ea Exception Return Address
++30 r30 ba Breakpoint Return Address
++31 r31 ra Return Address
++
++32 ctl0 status
++33 ctl1 estatus STATUS saved by exception ?
++34 ctl2 bstatus STATUS saved by break ?
++35 ctl3 ipri Interrupt Priority Mask ?
++36 ctl4 ecause Exception Cause ?
++
++37 pc Not an actual register
++
++38 rap Return address pointer, this does not
++ actually exist and will be eliminated
++
++39 fake_fp Fake Frame Pointer which will always be eliminated.
++40 fake_ap Fake Argument Pointer which will always be eliminated.
++
++41 First Pseudo Register
++
++
++The definitions for all the hard register numbers
++are located in nios2.md.
++*/
++
++#define FIRST_PSEUDO_REGISTER 41
++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1)
++
++
++
++/* also see CONDITIONAL_REGISTER_USAGE */
++#define FIXED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++/* call used is the same as caller saved
++ + fixed regs + args + ret vals */
++#define CALL_USED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 10 */ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++#define HARD_REGNO_NREGS(REGNO, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++/* --------------------------- *
++ * How Values Fit in Registers
++ * --------------------------- */
++
++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
++
++#define MODES_TIEABLE_P(MODE1, MODE2) 1
++
++
++/*************************
++ * Register Classes
++ *************************/
++
++enum reg_class
++{
++ NO_REGS,
++ ALL_REGS,
++ LIM_REG_CLASSES
++};
++
++#define N_REG_CLASSES (int) LIM_REG_CLASSES
++
++#define REG_CLASS_NAMES \
++ {"NO_REGS", \
++ "ALL_REGS"}
++
++#define GENERAL_REGS ALL_REGS
++
++#define REG_CLASS_CONTENTS \
++/* NO_REGS */ {{ 0, 0}, \
++/* ALL_REGS */ {~0,~0}} \
++
++#define REGNO_REG_CLASS(REGNO) ALL_REGS
++
++#define BASE_REG_CLASS ALL_REGS
++#define INDEX_REG_CLASS ALL_REGS
++
++/* only one reg class, 'r', is handled automatically */
++#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS
++
++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \
++ ((STRICT) \
++ ? (REGNO) < FIRST_PSEUDO_REGISTER \
++ : (REGNO) < FIRST_PSEUDO_REGISTER || (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
++
++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT))
++
++#define REGNO_OK_FOR_BASE_P(REGNO) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, 1))
++
++#define REGNO_OK_FOR_INDEX_P(REGNO) \
++ (REGNO_OK_FOR_INDEX_P2 (REGNO, 1))
++
++#define REG_OK_FOR_BASE_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define REG_OK_FOR_INDEX_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define CLASS_MAX_NREGS(CLASS, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++
++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000)
++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000)
++#define UPPER16_INT(X) (((X) & 0xffff) == 0)
++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31)
++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31)
++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255)
++
++#define CONST_OK_FOR_LETTER_P(VALUE, C) \
++ ( \
++ (C) == 'I' ? SMALL_INT (VALUE) : \
++ (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) : \
++ (C) == 'K' ? UPPER16_INT (VALUE) : \
++ (C) == 'L' ? SHIFT_INT (VALUE) : \
++ (C) == 'M' ? (VALUE) == 0 : \
++ (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) : \
++ (C) == 'O' ? RDWRCTL_INT (VALUE) : \
++ 0)
++
++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
++
++#define PREFERRED_RELOAD_CLASS(X, CLASS) \
++ ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS))
++
++/* 'S' matches immediates which are in small data
++ and therefore can be added to gp to create a
++ 32-bit value. */
++#define EXTRA_CONSTRAINT(VALUE, C) \
++ ((C) == 'S' \
++ && (GET_CODE (VALUE) == SYMBOL_REF) \
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE))
++
++
++
++
++/* Say that the epilogue uses the return address register. Note that
++ in the case of sibcalls, the values "used by the epilogue" are
++ considered live at the start of the called function. */
++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO)
++
++
++#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
++
++/**********************************
++ * Trampolines for Nested Functions
++ ***********************************/
++
++#define TRAMPOLINE_TEMPLATE(FILE) \
++ error ("trampolines not yet implemented")
++#define TRAMPOLINE_SIZE 20
++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
++ error ("trampolines not yet implemented")
++
++/***************************
++ * Stack Layout and Calling Conventions
++ ***************************/
++
++/* ------------------ *
++ * Basic Stack Layout
++ * ------------------ */
++
++/* The downward variants are used by the compiler,
++ the upward ones serve as documentation */
++#define STACK_GROWS_DOWNWARD
++#define FRAME_GROWS_UPWARD
++#define ARGS_GROW_UPWARD
++
++#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
++#define FIRST_PARM_OFFSET(FUNDECL) 0
++
++/* Before the prologue, RA lives in r31. */
++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO)
++
++/* -------------------------------------- *
++ * Registers That Address the Stack Frame
++ * -------------------------------------- */
++
++#define STACK_POINTER_REGNUM SP_REGNO
++#define STATIC_CHAIN_REGNUM SC_REGNO
++#define PC_REGNUM PC_REGNO
++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO
++
++/* Base register for access to local variables of the function. We
++ pretend that the frame pointer is a non-existent hard register, and
++ then eliminate it to HARD_FRAME_POINTER_REGNUM. */
++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO
++
++#define HARD_FRAME_POINTER_REGNUM FP_REGNO
++#define RETURN_ADDRESS_POINTER_REGNUM RAP_REGNO
++/* the argumnet pointer needs to always be eliminated
++ so it is set to a fake hard register. */
++#define ARG_POINTER_REGNUM FAKE_AP_REGNO
++
++/* ----------------------------------------- *
++ * Eliminating Frame Pointer and Arg Pointer
++ * ----------------------------------------- */
++
++#define FRAME_POINTER_REQUIRED 0
++
++#define ELIMINABLE_REGS \
++{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
++
++#define CAN_ELIMINATE(FROM, TO) 1
++
++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
++ (OFFSET) = nios2_initial_elimination_offset ((FROM), (TO))
++
++#define MUST_SAVE_REGISTER(regno) \
++ ((regs_ever_live[regno] && !call_used_regs[regno]) \
++ || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \
++ || (regno == RA_REGNO && regs_ever_live[RA_REGNO]))
++
++/* Treat LOC as a byte offset from the stack pointer and round it up
++ to the next fully-aligned offset. */
++#define STACK_ALIGN(LOC) \
++ (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & ~((PREFERRED_STACK_BOUNDARY / 8) - 1))
++
++
++/* ------------------------------ *
++ * Passing Arguments in Registers
++ * ------------------------------ */
++
++/* see nios2.c */
++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
++ (function_arg (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
++ (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
++
++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
++
++typedef struct nios2_args
++{
++ int regs_used;
++} CUMULATIVE_ARGS;
++
++/* This is to initialize the above unused CUM data type */
++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
++ (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS))
++
++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
++ (function_arg_advance (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_REGNO_P(REGNO) \
++ ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO)
++
++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
++ { \
++ int pret_size = nios2_setup_incoming_varargs (&(CUM), (MODE), \
++ (TYPE), (NO_RTL)); \
++ if (pret_size) \
++ (PRETEND_SIZE) = pret_size; \
++ }
++
++/* ----------------------------- *
++ * Generating Code for Profiling
++ * ----------------------------- */
++
++#define PROFILE_BEFORE_PROLOGUE
++
++#define FUNCTION_PROFILER(FILE, LABELNO) \
++ function_profiler ((FILE), (LABELNO))
++
++/* --------------------------------------- *
++ * Passing Function Arguments on the Stack
++ * --------------------------------------- */
++
++#define PROMOTE_PROTOTYPES 1
++
++#define PUSH_ARGS 0
++#define ACCUMULATE_OUTGOING_ARGS 1
++
++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0
++
++/* --------------------------------------- *
++ * How Scalar Function Values Are Returned
++ * --------------------------------------- */
++
++#define FUNCTION_VALUE(VALTYPE, FUNC) \
++ gen_rtx(REG, TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO)
++
++#define LIBCALL_VALUE(MODE) \
++ gen_rtx(REG, MODE, FIRST_RETVAL_REGNO)
++
++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO)
++
++/* ----------------------------- *
++ * How Large Values Are Returned
++ * ----------------------------- */
++
++
++#define RETURN_IN_MEMORY(TYPE) \
++ nios2_return_in_memory (TYPE)
++
++
++#define STRUCT_VALUE 0
++
++#define DEFAULT_PCC_STRUCT_RETURN 0
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++
++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
++
++#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
++
++#define MAX_REGS_PER_ADDRESS 1
++
++/* Go to ADDR if X is a valid address. */
++#ifndef REG_OK_STRICT
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 0)) \
++ goto ADDR; \
++ }
++#else
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 1)) \
++ goto ADDR; \
++ }
++#endif
++
++#ifndef REG_OK_STRICT
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 0)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0)
++#else
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)
++#endif
++
++#define LEGITIMATE_CONSTANT_P(X) 1
++
++/* Nios II has no mode dependent addresses. */
++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
++
++/* Set if this has a weak declaration */
++#define SYMBOL_FLAG_WEAK_DECL (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
++#define SYMBOL_REF_WEAK_DECL_P(RTX) \
++ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0)
++
++
++/* true if a symbol is both small and not weak. In this case, gp
++ relative access can be used */
++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \
++ (SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX))
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++#define SLOW_BYTE_ACCESS 1
++
++/* It is as good to call a constant function address as to call an address
++ kept in a register.
++ ??? Not true anymore really. Now that call cannot address full range
++ of memory callr may need to be used */
++
++#define NO_FUNCTION_CSE
++#define NO_RECURSIVE_FUNCTION_CSE
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* ------------------------------------------ *
++ * The Overall Framework of an Assembler File
++ * ------------------------------------------ */
++
++#define ASM_APP_ON "#APP\n"
++#define ASM_APP_OFF "#NO_APP\n"
++
++#define ASM_COMMENT_START "# "
++
++/* ------------------------------- *
++ * Output and Generation of Labels
++ * ------------------------------- */
++
++#define GLOBAL_ASM_OP "\t.global\t"
++
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++#define DWARF2_UNWIND_INFO 0
++
++
++/* -------------------------------- *
++ * Assembler Commands for Alignment
++ * -------------------------------- */
++
++#define ASM_OUTPUT_ALIGN(FILE, LOG) \
++ do { \
++ fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \
++ } while (0)
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++#define REGISTER_NAMES \
++{ \
++ "zero", \
++ "at", \
++ "r2", \
++ "r3", \
++ "r4", \
++ "r5", \
++ "r6", \
++ "r7", \
++ "r8", \
++ "r9", \
++ "r10", \
++ "r11", \
++ "r12", \
++ "r13", \
++ "r14", \
++ "r15", \
++ "r16", \
++ "r17", \
++ "r18", \
++ "r19", \
++ "r20", \
++ "r21", \
++ "r22", \
++ "r23", \
++ "r24", \
++ "r25", \
++ "gp", \
++ "sp", \
++ "fp", \
++ "ta", \
++ "ba", \
++ "ra", \
++ "status", \
++ "estatus", \
++ "bstatus", \
++ "ipri", \
++ "ecause", \
++ "pc", \
++ "rap", \
++ "fake_fp", \
++ "fake_ap", \
++}
++
++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\
++ (PTR) = asm_output_opcode (STREAM, PTR)
++
++#define PRINT_OPERAND(STREAM, X, CODE) \
++ nios2_print_operand (STREAM, X, CODE)
++
++#define PRINT_OPERAND_ADDRESS(STREAM, X) \
++ nios2_print_operand_address (STREAM, X)
++
++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
++ fprintf (FILE, ".L%u\n", (unsigned) (VALUE)); \
++ } while (0)
++
++
++/* ------------ *
++ * Label Output
++ * ------------ */
++
++
++/* ---------------------------------------------------- *
++ * Dividing the Output into Sections (Texts, Data, ...)
++ * ---------------------------------------------------- */
++
++/* Output before read-only data. */
++#define TEXT_SECTION_ASM_OP ("\t.section\t.text")
++
++/* Output before writable data. */
++#define DATA_SECTION_ASM_OP ("\t.section\t.data")
++
++
++/* Default the definition of "small data" to 8 bytes. */
++/* ??? How come I can't use HOST_WIDE_INT here? */
++extern unsigned long nios2_section_threshold;
++#define NIOS2_DEFAULT_GVALUE 8
++
++
++
++/* This says how to output assembler code to declare an
++ uninitialized external linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef COMMON_ASM_OP
++#define COMMON_ASM_OP "\t.comm\t"
++
++#undef ASM_OUTPUT_ALIGNED_COMMON
++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
++do \
++{ \
++ if ((SIZE) <= nios2_section_threshold) \
++ { \
++ named_section (0, ".sbss", 0); \
++ (*targetm.asm_out.globalize_label) (FILE, NAME); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++ } \
++ else \
++ { \
++ fprintf ((FILE), "%s", COMMON_ASM_OP); \
++ assemble_name ((FILE), (NAME)); \
++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
++ } \
++} \
++while (0)
++
++
++/* This says how to output assembler code to declare an
++ uninitialized internal linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef ASM_OUTPUT_ALIGNED_LOCAL
++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
++do { \
++ if ((SIZE) <= nios2_section_threshold) \
++ named_section (0, ".sbss", 0); \
++ else \
++ named_section (0, ".bss", 0); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++} while (0)
++
++
++
++/***************************
++ * Miscellaneous Parameters
++ ***************************/
++
++#define MOVE_MAX 4
++
++#define Pmode SImode
++#define FUNCTION_MODE QImode
++
++#define CASE_VECTOR_MODE Pmode
++
++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
++
++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND)
++
++#define WORD_REGISTER_OPERATIONS
+--- gcc-3.4.3/gcc/config/nios2/nios2.md
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.md
+@@ -0,0 +1,2078 @@
++;; Machine Description for Altera NIOS 2G NIOS2 version.
++;; Copyright (C) 2003 Altera
++;; Contributed by Jonah Graham (jgraham@altera.com).
++;;
++;; This file is part of GNU CC.
++;;
++;; GNU CC 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 2, or (at your option)
++;; any later version.
++;;
++;; GNU CC 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 GNU CC; see the file COPYING. If not, write to
++;; the Free Software Foundation, 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA. */
++
++
++
++;*****************************************************************************
++;*
++;* constants
++;*
++;*****************************************************************************
++(define_constants [
++ (GP_REGNO 26)
++ (SP_REGNO 27)
++ (FP_REGNO 28)
++ (RA_REGNO 31)
++ (RAP_REGNO 38)
++ (FIRST_RETVAL_REGNO 2)
++ (LAST_RETVAL_REGNO 3)
++ (FIRST_ARG_REGNO 4)
++ (LAST_ARG_REGNO 7)
++ (SC_REGNO 23)
++ (PC_REGNO 37)
++ (FAKE_FP_REGNO 39)
++ (FAKE_AP_REGNO 40)
++
++
++ (UNSPEC_BLOCKAGE 0)
++ (UNSPEC_LDBIO 1)
++ (UNSPEC_LDBUIO 2)
++ (UNSPEC_LDHIO 3)
++ (UNSPEC_LDHUIO 4)
++ (UNSPEC_LDWIO 5)
++ (UNSPEC_STBIO 6)
++ (UNSPEC_STHIO 7)
++ (UNSPEC_STWIO 8)
++ (UNSPEC_SYNC 9)
++ (UNSPEC_WRCTL 10)
++ (UNSPEC_RDCTL 11)
++
++])
++
++
++
++;*****************************************************************************
++;*
++;* instruction scheduler
++;*
++;*****************************************************************************
++
++; No schedule info is currently available, using an assumption that no
++; instruction can use the results of the previous instruction without
++; incuring a stall.
++
++; length of an instruction (in bytes)
++(define_attr "length" "" (const_int 4))
++(define_attr "type" "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" (const_string "complex"))
++
++(define_asm_attributes
++ [(set_attr "length" "4")
++ (set_attr "type" "complex")])
++
++(define_automaton "nios2")
++(automata_option "v")
++;(automata_option "no-minimization")
++(automata_option "ndfa")
++
++; The nios2 pipeline is fairly straightforward for the fast model.
++; Every alu operation is pipelined so that an instruction can
++; be issued every cycle. However, there are still potential
++; stalls which this description tries to deal with.
++
++(define_cpu_unit "cpu" "nios2")
++
++(define_insn_reservation "complex" 1
++ (eq_attr "type" "complex")
++ "cpu")
++
++(define_insn_reservation "control" 1
++ (eq_attr "type" "control")
++ "cpu")
++
++(define_insn_reservation "alu" 1
++ (eq_attr "type" "alu")
++ "cpu")
++
++(define_insn_reservation "cond_alu" 1
++ (eq_attr "type" "cond_alu")
++ "cpu")
++
++(define_insn_reservation "st" 1
++ (eq_attr "type" "st")
++ "cpu")
++
++(define_insn_reservation "custom" 1
++ (eq_attr "type" "custom")
++ "cpu")
++
++; shifts, muls and lds have three cycle latency
++(define_insn_reservation "ld" 3
++ (eq_attr "type" "ld")
++ "cpu")
++
++(define_insn_reservation "shift" 3
++ (eq_attr "type" "shift")
++ "cpu")
++
++(define_insn_reservation "mul" 3
++ (eq_attr "type" "mul")
++ "cpu")
++
++(define_insn_reservation "div" 1
++ (eq_attr "type" "div")
++ "cpu")
++
++
++;*****************************************************************************
++;*
++;* MOV Instructions
++;*
++;*****************************************************************************
++
++(define_expand "movqi"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "")
++ (match_operand:QI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, QImode))
++ DONE;
++})
++
++(define_insn "movqi_internal"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r")
++ (match_operand:QI 1 "general_operand" "rM,m,rM,I"))]
++ "(register_operand (operands[0], QImode)
++ || register_operand (operands[1], QImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stb%o0\\t%z1, %0
++ ldbu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu")])
++
++(define_insn "ldbio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldbuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stbio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)]
++ ""
++ "stbio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++(define_expand "movhi"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "")
++ (match_operand:HI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, HImode))
++ DONE;
++})
++
++(define_insn "movhi_internal"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r")
++ (match_operand:HI 1 "general_operand" "rM,m,rM,I,J"))]
++ "(register_operand (operands[0], HImode)
++ || register_operand (operands[1], HImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ sth%o0\\t%z1, %0
++ ldhu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu,alu")])
++
++(define_insn "ldhio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldhuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "sthio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)]
++ ""
++ "sthio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++(define_expand "movsi"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "")
++ (match_operand:SI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, SImode))
++ DONE;
++})
++
++(define_insn "movsi_internal"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r")
++ (match_operand:SI 1 "general_operand" "rM,m,rM,I,J,S,i"))]
++ "(register_operand (operands[0], SImode)
++ || register_operand (operands[1], SImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stw%o0\\t%z1, %0
++ ldw%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1
++ addi\\t%0, gp, %%gprel(%1)
++ movhi\\t%0, %H1\;addi\\t%0, %0, %L1"
++ [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")])
++
++(define_insn "ldwio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldwio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stwio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)]
++ ""
++ "stwio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++
++;*****************************************************************************
++;*
++;* zero extension
++;*
++;*****************************************************************************
++
++
++(define_insn "zero_extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xffff
++ ldhu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "=r,r")
++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++
++
++;*****************************************************************************
++;*
++;* sign extension
++;*
++;*****************************************************************************
++
++(define_expand "extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (16);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendhisi2_internal"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
++ ""
++ "ldh%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_expand "extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "")
++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op0 = gen_lowpart (SImode, operands[0]);
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (op0, temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqihi2_internal"
++ [(set (match_operand:HI 0 "register_operand" "=r")
++ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++(define_expand "extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqisi2_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++
++;*****************************************************************************
++;*
++;* Arithmetic Operations
++;*
++;*****************************************************************************
++
++(define_insn "addsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ ""
++ "add%i2\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "subsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++ "sub\\t%0, %z1, %2"
++ [(set_attr "type" "alu")])
++
++(define_insn "mulsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (mult:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ "TARGET_HAS_MUL"
++ "mul%i2\\t%0, %1, %z2"
++ [(set_attr "type" "mul")])
++
++(define_expand "divsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++{
++ if (!TARGET_HAS_DIV)
++ {
++ if (!TARGET_FAST_SW_DIV)
++ FAIL;
++ else
++ {
++ if (nios2_emit_expensive_div (operands, SImode))
++ DONE;
++ }
++ }
++})
++
++(define_insn "divsi3_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "div\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "udivsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (udiv:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "divu\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "smulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxss\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++(define_insn "umulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxuu\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++
++(define_expand "mulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
++ (sign_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++(define_expand "umulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
++ (zero_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++
++
++;*****************************************************************************
++;*
++;* Negate and ones complement
++;*
++;*****************************************************************************
++
++(define_insn "negsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (neg:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "sub\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++(define_insn "one_cmplsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (not:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "nor\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++
++
++; Logical Operantions
++
++(define_insn "andsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (and:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ and\\t%0, %1, %z2
++ and%i2\\t%0, %1, %2
++ andh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "iorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (ior:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ or\\t%0, %1, %z2
++ or%i2\\t%0, %1, %2
++ orh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "*norsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (and:SI (not:SI (match_operand:SI 1 "register_operand" "%r"))
++ (not:SI (match_operand:SI 2 "reg_or_0_operand" "rM"))))]
++ ""
++ "nor\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "xorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (xor:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ xor\\t%0, %1, %z2
++ xor%i2\\t%0, %1, %2
++ xorh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++
++
++;*****************************************************************************
++;*
++;* Shifts
++;*
++;*****************************************************************************
++
++(define_insn "ashlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashift:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sll%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "ashrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sra%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "lshrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "srl%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotate:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "rol%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotatert:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "register_operand" "r,r")))]
++ ""
++ "ror\\t%0, %1, %2"
++ [(set_attr "type" "shift")])
++
++(define_insn "*shift_mul_constants"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ashift:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "const_int_operand" "I"))
++ (match_operand:SI 3 "const_int_operand" "I")))]
++ "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))"
++{
++ HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]);
++ rtx ops[3];
++
++ ops[0] = operands[0];
++ ops[1] = operands[1];
++ ops[2] = GEN_INT (mul);
++
++ output_asm_insn ("muli\t%0, %1, %2", ops);
++ return "";
++}
++ [(set_attr "type" "mul")])
++
++
++
++
++;*****************************************************************************
++;*
++;* Prologue, Epilogue and Return
++;*
++;*****************************************************************************
++
++(define_expand "prologue"
++ [(const_int 1)]
++ ""
++{
++ expand_prologue ();
++ DONE;
++})
++
++(define_expand "epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (false);
++ DONE;
++})
++
++(define_expand "sibcall_epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (true);
++ DONE;
++})
++
++(define_insn "return"
++ [(return)]
++ "reload_completed && nios2_can_use_return_insn ()"
++ "ret\\t"
++)
++
++(define_insn "return_from_epilogue"
++ [(use (match_operand 0 "pmode_register_operand" ""))
++ (return)]
++ "reload_completed"
++ "ret\\t"
++)
++
++;; Block any insns from being moved before this point, since the
++;; profiling call to mcount can use various registers that aren't
++;; saved or used to pass arguments.
++
++(define_insn "blockage"
++ [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)]
++ ""
++ ""
++ [(set_attr "type" "unknown")
++ (set_attr "length" "0")])
++
++
++
++;*****************************************************************************
++;*
++;* Jumps and Calls
++;*
++;*****************************************************************************
++
++(define_insn "indirect_jump"
++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "jump"
++ [(set (pc)
++ (label_ref (match_operand 0 "" "")))]
++ ""
++ "br\\t%0"
++ [(set_attr "type" "control")])
++
++
++(define_insn "indirect_call"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "indirect_call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%1"
++)
++
++(define_expand "call"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_expand "call_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_insn "*call"
++ [(call (mem:QI (match_operand:SI 0 "immediate_operand" "i"))
++ (match_operand 1 "" ""))
++ (clobber (match_operand:SI 2 "register_operand" "=r"))]
++ ""
++ "call\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "*call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "immediate_operand" "i"))
++ (match_operand 2 "" "")))
++ (clobber (match_operand:SI 3 "register_operand" "=r"))]
++ ""
++ "call\\t%1"
++ [(set_attr "type" "control")])
++
++(define_expand "sibcall"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))])]
++ ""
++ {
++ XEXP (operands[0], 0) = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
++
++ if (operands[2] == NULL_RTX)
++ operands[2] = const0_rtx;
++ }
++)
++
++(define_expand "sibcall_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))])]
++ ""
++ {
++ XEXP (operands[1], 0) = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
++
++ if (operands[3] == NULL_RTX)
++ operands[3] = const0_rtx;
++ }
++)
++
++(define_insn "sibcall_insn"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))]
++ ""
++ "jmp\\t%0"
++)
++
++(define_insn "sibcall_value_insn"
++ [(set (match_operand 0 "register_operand" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))]
++ ""
++ "jmp\\t%1"
++)
++
++
++
++
++(define_expand "tablejump"
++ [(parallel [(set (pc) (match_operand 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))])]
++ ""
++ ""
++)
++
++(define_insn "*tablejump"
++ [(set (pc)
++ (match_operand:SI 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Comparisons
++;*
++;*****************************************************************************
++;; Flow here is rather complex (based on MIPS):
++;;
++;; 1) The cmp{si,di,sf,df} routine is called. It deposits the
++;; arguments into the branch_cmp array, and the type into
++;; branch_type. No RTL is generated.
++;;
++;; 2) The appropriate branch define_expand is called, which then
++;; creates the appropriate RTL for the comparison and branch.
++;; Different CC modes are used, based on what type of branch is
++;; done, so that we can constrain things appropriately. There
++;; are assumptions in the rest of GCC that break if we fold the
++;; operands into the branchs for integer operations, and use cc0
++;; for floating point, so we use the fp status register instead.
++;; If needed, an appropriate temporary is created to hold the
++;; of the integer compare.
++
++(define_expand "cmpsi"
++ [(set (cc0)
++ (compare:CC (match_operand:SI 0 "register_operand" "")
++ (match_operand:SI 1 "arith_operand" "")))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = operands[1];
++ branch_type = CMP_SI;
++ DONE;
++})
++
++(define_expand "tstsi"
++ [(set (cc0)
++ (match_operand:SI 0 "register_operand" ""))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = const0_rtx;
++ branch_type = CMP_SI;
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* setting a register from a comparison
++;*
++;*****************************************************************************
++
++(define_expand "seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpeq%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpne%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmplt\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpge%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpge\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmplt%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpltu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpgeu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpgeu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpltu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++
++
++;*****************************************************************************
++;*
++;* branches
++;*
++;*****************************************************************************
++
++(define_insn "*cbranch"
++ [(set (pc)
++ (if_then_else
++ (match_operator:SI 0 "comparison_operator"
++ [(match_operand:SI 2 "reg_or_0_operand" "rM")
++ (match_operand:SI 3 "reg_or_0_operand" "rM")])
++ (label_ref (match_operand 1 "" ""))
++ (pc)))]
++ ""
++ "b%0\\t%z2, %z3, %l1"
++ [(set_attr "type" "control")])
++
++
++(define_expand "beq"
++ [(set (pc)
++ (if_then_else (eq:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bne"
++ [(set (pc)
++ (if_then_else (ne:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgt"
++ [(set (pc)
++ (if_then_else (gt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bge"
++ [(set (pc)
++ (if_then_else (ge:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "ble"
++ [(set (pc)
++ (if_then_else (le:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "blt"
++ [(set (pc)
++ (if_then_else (lt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgtu"
++ [(set (pc)
++ (if_then_else (gtu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bgeu"
++ [(set (pc)
++ (if_then_else (geu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bleu"
++ [(set (pc)
++ (if_then_else (leu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bltu"
++ [(set (pc)
++ (if_then_else (ltu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* String and Block Operations
++;*
++;*****************************************************************************
++
++; ??? This is all really a hack to get Dhrystone to work as fast as possible
++; things to be fixed:
++; * let the compiler core handle all of this, for that to work the extra
++; aliasing needs to be addressed.
++; * we use three temporary registers for loading and storing to ensure no
++; ld use stalls, this is excessive, because after the first ld/st only
++; two are needed. Only two would be needed all the way through if
++; we could schedule with other code. Consider:
++; 1 ld $1, 0($src)
++; 2 ld $2, 4($src)
++; 3 ld $3, 8($src)
++; 4 st $1, 0($dest)
++; 5 ld $1, 12($src)
++; 6 st $2, 4($src)
++; 7 etc.
++; The first store has to wait until 4. If it does not there will be one
++; cycle of stalling. However, if any other instruction could be placed
++; between 1 and 4, $3 would not be needed.
++; * In small we probably don't want to ever do this ourself because there
++; is no ld use stall.
++
++(define_expand "movstrsi"
++ [(parallel [(set (match_operand:BLK 0 "general_operand" "")
++ (match_operand:BLK 1 "general_operand" ""))
++ (use (match_operand:SI 2 "const_int_operand" ""))
++ (use (match_operand:SI 3 "const_int_operand" ""))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))])]
++ "TARGET_INLINE_MEMCPY"
++{
++ rtx ld_addr_reg, st_addr_reg;
++
++ /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr
++ it trys to copy to a register, but does not re-try the predicate.
++ ??? Intead of fixing expr.c, I fix it here. */
++ if (!const_int_operand (operands[2], SImode))
++ FAIL;
++
++ /* ??? there are some magic numbers which need to be sorted out here.
++ the basis for them is not increasing code size hugely or going
++ out of range of offset addressing */
++ if (INTVAL (operands[3]) < 4)
++ FAIL;
++ if (!optimize
++ || (optimize_size && INTVAL (operands[2]) > 12)
++ || (optimize < 3 && INTVAL (operands[2]) > 100)
++ || INTVAL (operands[2]) > 200)
++ FAIL;
++
++ st_addr_reg
++ = replace_equiv_address (operands[0],
++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
++ ld_addr_reg
++ = replace_equiv_address (operands[1],
++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
++ emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg,
++ operands[2], operands[3]));
++
++ DONE;
++})
++
++
++(define_insn "movstrsi_internal"
++ [(set (match_operand:BLK 0 "memory_operand" "=o")
++ (match_operand:BLK 1 "memory_operand" "o"))
++ (use (match_operand:SI 2 "const_int_operand" "i"))
++ (use (match_operand:SI 3 "const_int_operand" "i"))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))]
++ "TARGET_INLINE_MEMCPY"
++{
++ int ld_offset = INTVAL (operands[2]);
++ int ld_len = INTVAL (operands[2]);
++ int ld_reg = 0;
++ rtx ld_addr_reg = XEXP (operands[1], 0);
++ int st_offset = INTVAL (operands[2]);
++ int st_len = INTVAL (operands[2]);
++ int st_reg = 0;
++ rtx st_addr_reg = XEXP (operands[0], 0);
++ int delay_count = 0;
++
++ /* ops[0] is the address used by the insn
++ ops[1] is the register being loaded or stored */
++ rtx ops[2];
++
++ if (INTVAL (operands[3]) < 4)
++ abort ();
++
++ while (ld_offset >= 4)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldw\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 4;
++ delay_count++;
++ }
++
++ if (ld_offset >= 2)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldh\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 2;
++ delay_count++;
++ }
++
++ if (ld_offset >= 1)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldb\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 1;
++ delay_count++;
++ }
++
++ while (st_offset >= 4)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ while (st_offset >= 2)
++ {
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("sth\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 2;
++ }
++
++ while (st_offset >= 1)
++ {
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stb\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 1;
++ }
++
++ return "";
++}
++; ??? lengths are not being used yet, but I will probably forget
++; to update this once I am using lengths, so set it to something
++; definetely big enough to cover it. 400 allows for 200 bytes
++; of motion.
++ [(set_attr "length" "400")])
++
++
++
++;*****************************************************************************
++;*
++;* Custom instructions
++;*
++;*****************************************************************************
++
++(define_constants [
++ (CUSTOM_N 100)
++ (CUSTOM_NI 101)
++ (CUSTOM_NF 102)
++ (CUSTOM_NP 103)
++ (CUSTOM_NII 104)
++ (CUSTOM_NIF 105)
++ (CUSTOM_NIP 106)
++ (CUSTOM_NFI 107)
++ (CUSTOM_NFF 108)
++ (CUSTOM_NFP 109)
++ (CUSTOM_NPI 110)
++ (CUSTOM_NPF 111)
++ (CUSTOM_NPP 112)
++ (CUSTOM_IN 113)
++ (CUSTOM_INI 114)
++ (CUSTOM_INF 115)
++ (CUSTOM_INP 116)
++ (CUSTOM_INII 117)
++ (CUSTOM_INIF 118)
++ (CUSTOM_INIP 119)
++ (CUSTOM_INFI 120)
++ (CUSTOM_INFF 121)
++ (CUSTOM_INFP 122)
++ (CUSTOM_INPI 123)
++ (CUSTOM_INPF 124)
++ (CUSTOM_INPP 125)
++ (CUSTOM_FN 126)
++ (CUSTOM_FNI 127)
++ (CUSTOM_FNF 128)
++ (CUSTOM_FNP 129)
++ (CUSTOM_FNII 130)
++ (CUSTOM_FNIF 131)
++ (CUSTOM_FNIP 132)
++ (CUSTOM_FNFI 133)
++ (CUSTOM_FNFF 134)
++ (CUSTOM_FNFP 135)
++ (CUSTOM_FNPI 136)
++ (CUSTOM_FNPF 137)
++ (CUSTOM_FNPP 138)
++ (CUSTOM_PN 139)
++ (CUSTOM_PNI 140)
++ (CUSTOM_PNF 141)
++ (CUSTOM_PNP 142)
++ (CUSTOM_PNII 143)
++ (CUSTOM_PNIF 144)
++ (CUSTOM_PNIP 145)
++ (CUSTOM_PNFI 146)
++ (CUSTOM_PNFF 147)
++ (CUSTOM_PNFP 148)
++ (CUSTOM_PNPI 149)
++ (CUSTOM_PNPF 150)
++ (CUSTOM_PNPP 151)
++])
++
++
++(define_insn "custom_n"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)]
++ ""
++ "custom\\t%0, zero, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ni"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NI)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")] CUSTOM_NF)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_np"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NP)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nii"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NII)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nif"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NIF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nip"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NIP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nff"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NFF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NPF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_in"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_IN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ini"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_INF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++(define_insn "custom_fn"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_FN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fni"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_FNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnii"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnif"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnip"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnff"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_pn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_PN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pni"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_PNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++
++;*****************************************************************************
++;*
++;* Misc
++;*
++;*****************************************************************************
++
++(define_insn "nop"
++ [(const_int 0)]
++ ""
++ "nop\\t"
++ [(set_attr "type" "alu")])
++
++(define_insn "sync"
++ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
++ ""
++ "sync\\t"
++ [(set_attr "type" "control")])
++
++
++(define_insn "rdctl"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] UNSPEC_RDCTL))]
++ ""
++ "rdctl\\t%0, ctl%1"
++ [(set_attr "type" "control")])
++
++(define_insn "wrctl"
++ [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand" "O")
++ (match_operand:SI 1 "register_operand" "r")] UNSPEC_WRCTL)]
++ ""
++ "wrctl\\tctl%0, %1"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Peepholes
++;*
++;*****************************************************************************
++
++
+--- gcc-3.4.3/gcc/config/nios2/t-nios2
++++ gcc-3.4.3-nios2/gcc/config/nios2/t-nios2
+@@ -0,0 +1,123 @@
++##
++## Compiler flags to use when compiling libgcc2.c.
++##
++## LIB2FUNCS_EXTRA
++## A list of source file names to be compiled or assembled and inserted into libgcc.a.
++
++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \
++ $(srcdir)/config/nios2/lib2-divmod-hi.c \
++ $(srcdir)/config/nios2/lib2-divtable.c \
++ $(srcdir)/config/nios2/lib2-mul.c
++
++##
++## Floating Point Emulation
++## To have GCC include software floating point libraries in libgcc.a define FPBIT
++## and DPBIT along with a few rules as follows:
++##
++## # We want fine grained libraries, so use the new code
++## # to build the floating point emulation libraries.
++FPBIT=$(srcdir)/config/nios2/nios2-fp-bit.c
++DPBIT=$(srcdir)/config/nios2/nios2-dp-bit.c
++
++TARGET_LIBGCC2_CFLAGS = -O2
++
++# FLOAT_ONLY - no doubles
++# SMALL_MACHINE - QI/HI is faster than SI
++# Actually SMALL_MACHINE uses chars and shorts instead of ints
++# since ints (16-bit ones as they are today) are at least as fast
++# as chars and shorts, don't define SMALL_MACHINE
++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code )
++
++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '#define FLOAT' > ${FPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${FPBIT}
++
++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '' > ${DPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${DPBIT}
++
++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
++
++# Assemble startup files.
++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm
++
++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm
++
++
++## You may need to provide additional #defines at the beginning of
++## fp-bit.c and dp-bit.c to control target endianness and other options
++##
++## CRTSTUFF_T_CFLAGS
++## Special flags used when compiling crtstuff.c. See Initialization.
++##
++## CRTSTUFF_T_CFLAGS_S
++## Special flags used when compiling crtstuff.c for shared linking. Used
++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization.
++##
++## MULTILIB_OPTIONS
++## For some targets, invoking GCC in different ways produces objects that
++## can not be linked together. For example, for some targets GCC produces
++## both big and little endian code. For these targets, you must arrange
++## for multiple versions of libgcc.a to be compiled, one for each set of
++## incompatible options. When GCC invokes the linker, it arranges to link
++## in the right version of libgcc.a, based on the command line options
++## used.
++## The MULTILIB_OPTIONS macro lists the set of options for which special
++## versions of libgcc.a must be built. Write options that are mutually
++## incompatible side by side, separated by a slash. Write options that may
++## be used together separated by a space. The build procedure will build
++## all combinations of compatible options.
++##
++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float,
++## Makefile will build special versions of libgcc.a using the following
++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float,
++## and -m68020 -msoft-float.
++
++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx
++
++## MULTILIB_DIRNAMES
++## If MULTILIB_OPTIONS is used, this variable specifies the directory names
++## that should be used to hold the various libraries. Write one element in
++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If
++## MULTILIB_DIRNAMES is not used, the default value will be
++## MULTILIB_OPTIONS, with all slashes treated as spaces.
++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float,
++## then the default value of MULTILIB_DIRNAMES is m68000 m68020
++## msoft-float. You may specify a different value if you desire a
++## different set of directory names.
++
++# MULTILIB_DIRNAMES =
++
++## MULTILIB_MATCHES
++## Sometimes the same option may be written in two different ways. If an
++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any
++## synonyms. In that case, set MULTILIB_MATCHES to a list of items of the
++## form option=option to describe all relevant synonyms. For example,
++## m68000=mc68000 m68020=mc68020.
++##
++## MULTILIB_EXCEPTIONS
++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being
++## specified, there are combinations that should not be built. In that
++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in
++## shell case syntax that should not be built.
++## For example, in the PowerPC embedded ABI support, it is not desirable to
++## build libraries compiled with the -mcall-aix option and either of the
++## -fleading-underscore or -mlittle options at the same time. Therefore
++## MULTILIB_EXCEPTIONS is set to
++##
++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
++##
++
++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx*
++
++##
++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building
++## multiple versions of libgcc.a certain options should always be passed on
++## to the compiler. In that case, set MULTILIB_EXTRA_OPTS to be the list
++## of options to be used for all builds.
++##
++
+--- gcc-3.4.3/gcc/config.gcc
++++ gcc-3.4.3-nios2/gcc/config.gcc
+@@ -1321,6 +1321,10 @@ m32rle-*-linux*)
+ thread_file='posix'
+ fi
+ ;;
++# JBG
++nios2-*-* | nios2-*-*)
++ tm_file="elfos.h ${tm_file}"
++ ;;
+ # m68hc11 and m68hc12 share the same machine description.
+ m68hc11-*-*|m6811-*-*)
+ tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
+--- gcc-3.4.3/gcc/cse.c
++++ gcc-3.4.3-nios2/gcc/cse.c
+@@ -3134,6 +3134,10 @@ find_comparison_args (enum rtx_code code
+ #ifdef FLOAT_STORE_FLAG_VALUE
+ REAL_VALUE_TYPE fsfv;
+ #endif
++#ifdef __nios2__
++ if (p->is_const)
++ break;
++#endif
+
+ /* If the entry isn't valid, skip it. */
+ if (! exp_equiv_p (p->exp, p->exp, 1, 0))
+--- gcc-3.4.3/gcc/doc/extend.texi
++++ gcc-3.4.3-nios2/gcc/doc/extend.texi
+@@ -5636,12 +5636,118 @@ to those machines. Generally these gene
+ instructions, but allow the compiler to schedule those calls.
+
+ @menu
++* Altera Nios II Built-in Functions::
+ * Alpha Built-in Functions::
+ * ARM Built-in Functions::
+ * X86 Built-in Functions::
+ * PowerPC AltiVec Built-in Functions::
+ @end menu
+
++@node Altera Nios II Built-in Functions
++@subsection Altera Nios II Built-in Functions
++
++These built-in functions are available for the Altera Nios II
++family of processors.
++
++The following built-in functions are always available. They
++all generate the machine instruction that is part of the name.
++
++@example
++int __builtin_ldbio (volatile const void *)
++int __builtin_ldbuio (volatile const void *)
++int __builtin_ldhio (volatile const void *)
++int __builtin_ldhuio (volatile const void *)
++int __builtin_ldwio (volatile const void *)
++void __builtin_stbio (volatile void *, int)
++void __builtin_sthio (volatile void *, int)
++void __builtin_stwio (volatile void *, int)
++void __builtin_sync (void)
++int __builtin_rdctl (int)
++void __builtin_wrctl (int, int)
++@end example
++
++The following built-in functions are always available. They
++all generate a Nios II Custom Instruction. The name of the
++function represents the types that the function takes and
++returns. The letter before the @code{n} is the return type
++or void if absent. The @code{n} represnts the first parameter
++to all the custom instructions, the custom instruction number.
++The two letters after the @code{n} represent the up to two
++parameters to the function.
++
++The letters reprsent the following data types:
++@table @code
++@item <no letter>
++@code{void} for return type and no parameter for parameter types.
++
++@item i
++@code{int} for return type and parameter type
++
++@item f
++@code{float} for return type and parameter type
++
++@item p
++@code{void *} for return type and parameter type
++
++@end table
++
++And the function names are:
++@example
++void __builtin_custom_n (void)
++void __builtin_custom_ni (int)
++void __builtin_custom_nf (float)
++void __builtin_custom_np (void *)
++void __builtin_custom_nii (int, int)
++void __builtin_custom_nif (int, float)
++void __builtin_custom_nip (int, void *)
++void __builtin_custom_nfi (float, int)
++void __builtin_custom_nff (float, float)
++void __builtin_custom_nfp (float, void *)
++void __builtin_custom_npi (void *, int)
++void __builtin_custom_npf (void *, float)
++void __builtin_custom_npp (void *, void *)
++int __builtin_custom_in (void)
++int __builtin_custom_ini (int)
++int __builtin_custom_inf (float)
++int __builtin_custom_inp (void *)
++int __builtin_custom_inii (int, int)
++int __builtin_custom_inif (int, float)
++int __builtin_custom_inip (int, void *)
++int __builtin_custom_infi (float, int)
++int __builtin_custom_inff (float, float)
++int __builtin_custom_infp (float, void *)
++int __builtin_custom_inpi (void *, int)
++int __builtin_custom_inpf (void *, float)
++int __builtin_custom_inpp (void *, void *)
++float __builtin_custom_fn (void)
++float __builtin_custom_fni (int)
++float __builtin_custom_fnf (float)
++float __builtin_custom_fnp (void *)
++float __builtin_custom_fnii (int, int)
++float __builtin_custom_fnif (int, float)
++float __builtin_custom_fnip (int, void *)
++float __builtin_custom_fnfi (float, int)
++float __builtin_custom_fnff (float, float)
++float __builtin_custom_fnfp (float, void *)
++float __builtin_custom_fnpi (void *, int)
++float __builtin_custom_fnpf (void *, float)
++float __builtin_custom_fnpp (void *, void *)
++void * __builtin_custom_pn (void)
++void * __builtin_custom_pni (int)
++void * __builtin_custom_pnf (float)
++void * __builtin_custom_pnp (void *)
++void * __builtin_custom_pnii (int, int)
++void * __builtin_custom_pnif (int, float)
++void * __builtin_custom_pnip (int, void *)
++void * __builtin_custom_pnfi (float, int)
++void * __builtin_custom_pnff (float, float)
++void * __builtin_custom_pnfp (float, void *)
++void * __builtin_custom_pnpi (void *, int)
++void * __builtin_custom_pnpf (void *, float)
++void * __builtin_custom_pnpp (void *, void *)
++@end example
++
++
+ @node Alpha Built-in Functions
+ @subsection Alpha Built-in Functions
+
+--- gcc-3.4.3/gcc/doc/invoke.texi
++++ gcc-3.4.3-nios2/gcc/doc/invoke.texi
+@@ -337,6 +337,14 @@ in the following sections.
+ @item Machine Dependent Options
+ @xref{Submodel Options,,Hardware Models and Configurations}.
+
++@emph{Altera Nios II Options}
++@gccoptlist{-msmallc -mno-bypass-cache -mbypass-cache @gol
++-mno-cache-volatile -mcache-volatile -mno-inline-memcpy @gol
++-minline-memcpy -mno-fast-sw-div -mfast-sw-div @gol
++-mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx @gol
++-mno-hw-div -mhw-div @gol
++-msys-crt0= -msys-lib= -msys=nosys }
++
+ @emph{M680x0 Options}
+ @gccoptlist{-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
+ -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 @gol
+@@ -5836,6 +5844,7 @@ machine description. The default for th
+ that macro, which enables you to change the defaults.
+
+ @menu
++* Altera Nios II Options::
+ * M680x0 Options::
+ * M68hc1x Options::
+ * VAX Options::
+@@ -5871,6 +5880,103 @@ that macro, which enables you to change
+ * FRV Options::
+ @end menu
+
++
++@node Altera Nios II Options
++@subsection Altera Nios II Options
++@cindex Altera Nios II options
++
++These are the @samp{-m} options defined for the Altera Nios II
++processor.
++
++@table @gcctabopt
++
++@item -msmallc
++@opindex msmallc
++
++Link with a limited version of the C library, -lsmallc. For more
++information see the C Library Documentation.
++
++
++@item -mbypass-cache
++@itemx -mno-bypass-cache
++@opindex mno-bypass-cache
++@opindex mbypass-cache
++
++Force all load and store instructions to always bypass cache by
++using io variants of the instructions. The default is to not
++bypass the cache.
++
++@item -mno-cache-volatile
++@itemx -mcache-volatile
++@opindex mcache-volatile
++@opindex mno-cache-volatile
++
++Volatile memory access bypass the cache using the io variants of
++the ld and st instructions. The default is to cache volatile
++accesses.
++
++-mno-cache-volatile is deprecated and will be deleted in a
++future GCC release.
++
++
++@item -mno-inline-memcpy
++@itemx -minline-memcpy
++@opindex mno-inline-memcpy
++@opindex minline-memcpy
++
++Do not inline memcpy. The default is to inline when -O is on.
++
++
++@item -mno-fast-sw-div
++@itemx -mfast-sw-div
++@opindex mno-fast-sw-div
++@opindex mfast-sw-div
++
++Do no use table based fast divide for small numbers. The default
++is to use the fast divide at -O3 and above.
++
++
++@item -mno-hw-mul
++@itemx -mhw-mul
++@itemx -mno-hw-mulx
++@itemx -mhw-mulx
++@itemx -mno-hw-div
++@itemx -mhw-div
++@opindex mno-hw-mul
++@opindex mhw-mul
++@opindex mno-hw-mulx
++@opindex mhw-mulx
++@opindex mno-hw-div
++@opindex mhw-div
++
++Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of
++instructions by the compiler. The default is to emit @code{mul}
++and not emit @code{div} and @code{mulx}.
++
++The different combinations of @code{mul} and @code{mulx} instructions
++generate a different multilib options.
++
++
++@item -msys-crt0=@var{startfile}
++@opindex msys-crt0
++
++@var{startfile} is the file name of the startfile (crt0) to use
++when linking. The default is crt0.o that comes with libgloss
++and is only suitable for use with the instruction set
++simulator.
++
++@item -msys-lib=@var{systemlib}
++@itemx -msys-lib=nosys
++@opindex msys-lib
++
++@var{systemlib} is the library name of the library which provides
++the system calls required by the C library, e.g. @code{read}, @code{write}
++etc. The default is to use nosys, this library provides
++stub implementations of the calls and is part of libgloss.
++
++@end table
++
++
+ @node M680x0 Options
+ @subsection M680x0 Options
+ @cindex M680x0 options
+--- gcc-3.4.3/gcc/doc/md.texi
++++ gcc-3.4.3-nios2/gcc/doc/md.texi
+@@ -1335,6 +1335,49 @@ However, here is a summary of the machin
+ available on some particular machines.
+
+ @table @emph
++
++@item Altera Nios II family---@file{nios2.h}
++@table @code
++
++@item I
++Integer that is valid as an immediate operand in an
++instruction taking a signed 16-bit number. Range
++@minus{}32768 to 32767.
++
++@item J
++Integer that is valid as an immediate operand in an
++instruction taking an unsigned 16-bit number. Range
++0 to 65535.
++
++@item K
++Integer that is valid as an immediate operand in an
++instruction taking only the upper 16-bits of a
++32-bit number. Range 32-bit numbers with the lower
++16-bits being 0.
++
++@item L
++Integer that is valid as an immediate operand for a
++shift instruction. Range 0 to 31.
++
++
++@item M
++Integer that is valid as an immediate operand for
++only the value 0. Can be used in conjunction with
++the format modifier @code{z} to use @code{r0}
++instead of @code{0} in the assembly output.
++
++@item N
++Integer that is valid as an immediate operand for
++a custom instruction opcode. Range 0 to 255.
++
++@item S
++Matches immediates which are addresses in the small
++data section and therefore can be added to @code{gp}
++as a 16-bit immediate to re-create their 32-bit value.
++
++@end table
++
++
+ @item ARM family---@file{arm.h}
+ @table @code
+ @item f
diff --git a/misc/buildroot/toolchain/gcc/3.4.4/arm-softfloat.patch.conditional b/misc/buildroot/toolchain/gcc/3.4.4/arm-softfloat.patch.conditional
new file mode 100644
index 000000000..19d1b90da
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.4/arm-softfloat.patch.conditional
@@ -0,0 +1,270 @@
+Note... modified my mjn3 to not conflict with the big endian arm patch.
+Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
+Also changed
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{!mcpu=*:-mcpu=xscale} \
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+to
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+in gcc/config/arm/linux-elf.h.
+#
+# Submitted:
+#
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# Description:
+#
+# Nicholas Pitre released this patch for gcc soft-float support here:
+# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
+#
+# This version has been adapted to work with gcc 3.4.0.
+#
+# The original patch doesn't distinguish between softfpa and softvfp modes
+# in the way Nicholas Pitre probably meant. His description is:
+#
+# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
+# floats can be achieved with -mhard-float or with the configure
+# --with-float=hard option. If -msoft-float or --with-float=soft is used then
+# software float support will be used just like the default but with the legacy
+# big endian word ordering for double float representation instead."
+#
+# Which means the following:
+#
+# * If you compile without -mhard-float or -msoft-float, you should get
+# software floating point, using the VFP format. The produced object file
+# should have these flags in its header:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# * If you compile with -mhard-float, you should get hardware floating point,
+# which always uses the FPA format. Object file header flags should be:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# * If you compile with -msoft-float, you should get software floating point,
+# using the FPA format. This is done for compatibility reasons with many
+# existing distributions. Object file header flags should be:
+#
+# private flags = 200: [APCS-32] [FPA float format] [software FP]
+#
+# The original patch from Nicholas Pitre contained the following constructs:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
+#
+# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
+# is probably the reason Robert Schwebel modified it to:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
+#
+# But this causes the following behaviour:
+#
+# * If you compile without -mhard-float or -msoft-float, the compiler generates
+# software floating point instructions, but *nothing* is passed to the
+# assembler, which results in an object file which has flags:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# This is not correct!
+#
+# * If you compile with -mhard-float, the compiler generates hardware floating
+# point instructions, and passes "-mfpu=fpa" to the assembler, which results
+# in an object file which has the same flags as in the previous item, but now
+# those *are* correct.
+#
+# * If you compile with -msoft-float, the compiler generates software floating
+# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
+# order) to the assembler, which results in an object file with flags:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# This is not correct, because the last "-mfpu=" option on the assembler
+# command line determines the actual FPU convention used (which should be FPA
+# in this case).
+#
+# Therefore, I modified this patch to get the desired behaviour. Every
+# instance of the notation:
+#
+# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
+#
+# was changed to:
+#
+# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
+#
+# I also did the following:
+#
+# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
+# be consistent with Nicholas' original patch.
+# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
+# macros I could find. I think that if you compile without any options, you
+# would like to get the defaults. :)
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+
+diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
+--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
+@@ -31,11 +31,16 @@
+ #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
+ #endif
+
+ /* This is COFF, but prefer stabs. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
+--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -46,7 +46,9 @@
+
+ #ifndef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
++%{mapcs-float:-mfloat} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+ #endif
+
+ #ifndef ASM_SPEC
+@@ -106,12 +108,17 @@
+ #endif
+
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
+ #endif
+
+ #define TARGET_ASM_FILE_START_APP_OFF true
+diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
+@@ -44,12 +44,26 @@
+ #define TARGET_LINKER_EMULATION "armelf_linux"
+ #endif
+
+-/* Default is to use APCS-32 mode. */
++/*
++ * Default is to use APCS-32 mode with soft-vfp.
++ * The old Linux default for floats can be achieved with -mhard-float
++ * or with the configure --with-float=hard option.
++ * If -msoft-float or --with-float=soft is used then software float
++ * support will be used just like the default but with the legacy
++ * big endian word ordering for double float representation instead.
++ */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT \
+- ( ARM_FLAG_APCS_32 | \
+- ARM_FLAG_MMU_TRAPS | \
+- TARGET_ENDIAN_DEFAULT )
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 \
++ | ARM_FLAG_SOFT_FLOAT \
++ | TARGET_ENDIAN_DEFAULT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_MMU_TRAPS )
++
++#undef SUBTARGET_EXTRA_ASM_SPEC
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+@@ -57,7 +71,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -72,7 +86,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
+--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -30,7 +30,12 @@
+
+ /* Default to using APCS-32 and software floating point. */
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ /* Now we define the strings used to build the spec file. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -49,11 +49,12 @@
+ endian, regardless of the endian-ness of the memory
+ system. */
+
+-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+- %{mhard-float:-mfpu=fpa} \
+- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{!mcpu=*:-mcpu=xscale} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
++ { "mlittle-endian", "mno-thumb-interwork", "marm" }
+ #endif
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/3.4.5/300-libstdc++-pic.patch
new file mode 100644
index 000000000..9f304a4c4
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/300-libstdc++-pic.patch
@@ -0,0 +1,47 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -224,6 +224,10 @@
+ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCPP_BUILD_DEBUG
+ all-local: build_debug
+
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -585,7 +585,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -618,6 +618,7 @@
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
++ install-exec-local \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+@@ -707,6 +708,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch b/misc/buildroot/toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch
new file mode 100644
index 000000000..0c370502c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/600-gcc34-arm-ldm-peephole.patch
@@ -0,0 +1,65 @@
+--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
+@@ -8810,13 +8810,16 @@
+ (set_attr "length" "4,8,8")]
+ )
+
++; Try to convert LDR+LDR+arith into [add+]LDM+arith
++; On XScale, LDM is always slower than two LDRs, so only do this if
++; optimising for size.
+ (define_insn "*arith_adjacentmem"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (match_operator:SI 1 "shiftable_operator"
+ [(match_operand:SI 2 "memory_operand" "m")
+ (match_operand:SI 3 "memory_operand" "m")]))
+ (clobber (match_scratch:SI 4 "=r"))]
+- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
++ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
+ "*
+ {
+ rtx ldm[3];
+@@ -8851,6 +8854,8 @@
+ }
+ if (val1 && val2)
+ {
++ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
++ will prevent it from happening. */
+ rtx ops[3];
+ ldm[0] = ops[0] = operands[4];
+ ops[1] = XEXP (XEXP (operands[2], 0), 0);
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
+@@ -4838,6 +4841,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* ldmia */
+
+@@ -5064,6 +5072,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* stmia */
+
+--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
++++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
+@@ -381,6 +381,7 @@
+ printf ("#include \"recog.h\"\n");
+ printf ("#include \"except.h\"\n\n");
+ printf ("#include \"function.h\"\n\n");
++ printf ("#include \"flags.h\"\n\n");
+
+ printf ("#ifdef HAVE_peephole\n");
+ printf ("extern rtx peep_operand[];\n\n");
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch b/misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch
new file mode 100644
index 000000000..27f7c07db
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm-peephole2.patch
@@ -0,0 +1,42 @@
+The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting
+with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from
+it that was causing problems and grabbed an updated version from
+upstream cvs.
+
+Index: gcc/config/arm/arm.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
+retrieving revision 1.432
+retrieving revision 1.433
+diff -u -r1.432 -r1.433
+--- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432
++++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433
+@@ -5139,6 +5139,10 @@
+ int
+ adjacent_mem_locations (rtx a, rtx b)
+ {
++ /* We don't guarantee to preserve the order of these memory refs. */
++ if (volatile_refs_p (a) || volatile_refs_p (b))
++ return 0;
++
+ if ((GET_CODE (XEXP (a, 0)) == REG
+ || (GET_CODE (XEXP (a, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
+@@ -5178,6 +5182,17 @@
+ return 0;
+
+ val_diff = val1 - val0;
++
++ if (arm_ld_sched)
++ {
++ /* If the target has load delay slots, then there's no benefit
++ to using an ldm instruction unless the offset is zero and
++ we are optimizing for size. */
++ return (optimize_size && (REGNO (reg0) == REGNO (reg1))
++ && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
++ && (val_diff == 4 || val_diff == -4));
++ }
++
+ return ((REGNO (reg0) == REGNO (reg1))
+ && (val_diff == 4 || val_diff == -4));
+ }
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm.patch b/misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm.patch
new file mode 100644
index 000000000..142052fdf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/601-gcc34-arm-ldm.patch
@@ -0,0 +1,119 @@
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
+@@ -8520,6 +8520,26 @@
+ return_used_this_function = 0;
+ }
+
++/* Return the number (counting from 0) of
++ the least significant set bit in MASK. */
++
++#ifdef __GNUC__
++inline
++#endif
++static int
++number_of_first_bit_set (mask)
++ int mask;
++{
++ int bit;
++
++ for (bit = 0;
++ (mask & (1 << bit)) == 0;
++ ++bit)
++ continue;
++
++ return bit;
++}
++
+ const char *
+ arm_output_epilogue (rtx sibling)
+ {
+@@ -8753,27 +8773,47 @@
+ saved_regs_mask |= (1 << PC_REGNUM);
+ }
+
+- /* Load the registers off the stack. If we only have one register
+- to load use the LDR instruction - it is faster. */
+- if (saved_regs_mask == (1 << LR_REGNUM))
+- {
+- /* The exception handler ignores the LR, so we do
+- not really need to load it off the stack. */
+- if (eh_ofs)
+- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+- else
+- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
+- }
+- else if (saved_regs_mask)
++ if (saved_regs_mask)
+ {
+- if (saved_regs_mask & (1 << SP_REGNUM))
+- /* Note - write back to the stack register is not enabled
+- (ie "ldmfd sp!..."). We know that the stack pointer is
+- in the list of registers and if we add writeback the
+- instruction becomes UNPREDICTABLE. */
+- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ /* Load the registers off the stack. If we only have one register
++ to load use the LDR instruction - it is faster. */
++ if (bit_count (saved_regs_mask) == 1)
++ {
++ int reg = number_of_first_bit_set (saved_regs_mask);
++
++ switch (reg)
++ {
++ case SP_REGNUM:
++ /* Mustn't use base writeback when loading SP. */
++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
++ break;
++
++ case LR_REGNUM:
++ if (eh_ofs)
++ {
++ /* The exception handler ignores the LR, so we do
++ not really need to load it off the stack. */
++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
++ break;
++ }
++ /* else fall through */
++
++ default:
++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
++ break;
++ }
++ }
+ else
+- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ {
++ if (saved_regs_mask & (1 << SP_REGNUM))
++ /* Note - write back to the stack register is not enabled
++ (ie "ldmfd sp!..."). We know that the stack pointer is
++ in the list of registers and if we add writeback the
++ instruction becomes UNPREDICTABLE. */
++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ else
++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ }
+ }
+
+ if (current_function_pretend_args_size)
+@@ -11401,22 +11441,6 @@
+ }
+ }
+
+-/* Return the number (counting from 0) of
+- the least significant set bit in MASK. */
+-
+-inline static int
+-number_of_first_bit_set (int mask)
+-{
+- int bit;
+-
+- for (bit = 0;
+- (mask & (1 << bit)) == 0;
+- ++bit)
+- continue;
+-
+- return bit;
+-}
+-
+ /* Generate code to return from a thumb function.
+ If 'reg_containing_return_addr' is -1, then the return address is
+ actually on the stack, at the stack pointer. */
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/3.4.5/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..4377c2143
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/700-pr15068-fix.patch b/misc/buildroot/toolchain/gcc/3.4.5/700-pr15068-fix.patch
new file mode 100644
index 000000000..2977765c5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/700-pr15068-fix.patch
@@ -0,0 +1,44 @@
+See http://gcc.gnu.org/PR15068
+
+Fixes error
+
+../sysdeps/generic/s_fmax.c: In function `__fmax':
+../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <URL:http://gcc.gnu.org/bugs.html> for instructions.
+make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
+make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
+make[1]: *** [math/others] Error 2
+make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
+make: *** [all] Error 2
+
+[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
+
+--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
+@@ -1878,6 +1878,7 @@
+ rtx set_src = SET_SRC (pc_set (BB_END (bb)));
+ rtx cond_true = XEXP (set_src, 0);
+ rtx reg = XEXP (cond_true, 0);
++ enum rtx_code inv_cond;
+
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+@@ -1886,11 +1887,13 @@
+ in the form of a comparison of a register against zero.
+ If the condition is more complex than that, then it is safe
+ not to record any information. */
+- if (GET_CODE (reg) == REG
++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
++ if (inv_cond != UNKNOWN
++ && GET_CODE (reg) == REG
+ && XEXP (cond_true, 1) == const0_rtx)
+ {
+ rtx cond_false
+- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
++ = gen_rtx_fmt_ee (inv_cond,
+ GET_MODE (cond_true), XEXP (cond_true, 0),
+ XEXP (cond_true, 1));
+ if (GET_CODE (XEXP (set_src, 1)) == PC)
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/71_all_sh-pr16665-fix.patch b/misc/buildroot/toolchain/gcc/3.4.5/71_all_sh-pr16665-fix.patch
new file mode 100644
index 000000000..680bb3978
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/71_all_sh-pr16665-fix.patch
@@ -0,0 +1,43 @@
+--- gcc/gcc/config/sh/sh.c
++++ gcc/gcc/config/sh/sh.c
+@@ -9106,6 +9106,15 @@ sh_output_mi_thunk (FILE *file, tree thu
+ }
+ this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
+
++ /* In PIC case, we set PIC register to compute the target address. We
++ can use a scratch register to save and restore the original value
++ except for SHcompact. For SHcompact, use stack. */
++ if (flag_pic && TARGET_SHCOMPACT)
++ {
++ push (PIC_OFFSET_TABLE_REGNUM);
++ emit_insn (gen_GOTaddr2picreg ());
++ }
++
+ /* For SHcompact, we only have r0 for a scratch register: r1 is the
+ static chain pointer (even if you can't have nested virtual functions
+ right now, someone might implement them sometime), and the rest of the
+@@ -9188,8 +9197,24 @@ sh_output_mi_thunk (FILE *file, tree thu
+ assemble_external (function);
+ TREE_USED (function) = 1;
+ }
++ /* We can use scratch1 to save and restore the original value of
++ PIC register except for SHcompact. */
++ if (flag_pic && ! TARGET_SHCOMPACT)
++ {
++ emit_move_insn (scratch1,
++ gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
++ emit_insn (gen_GOTaddr2picreg ());
++ }
+ funexp = XEXP (DECL_RTL (function), 0);
+ emit_move_insn (scratch2, funexp);
++ if (flag_pic)
++ {
++ if (! TARGET_SHCOMPACT)
++ emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
++ scratch1);
++ else
++ pop (PIC_OFFSET_TABLE_REGNUM);
++ }
+ funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
+ sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
+ SIBLING_CALL_P (sibcall) = 1;
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/72_all_sh-no-reorder-blocks.patch b/misc/buildroot/toolchain/gcc/3.4.5/72_all_sh-no-reorder-blocks.patch
new file mode 100644
index 000000000..8b9826831
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/72_all_sh-no-reorder-blocks.patch
@@ -0,0 +1,13 @@
+--- g/gcc/config/sh/sh.h
++++ g/gcc/config/sh/sh.h
+@@ -422,6 +422,10 @@
+ do { \
+ if (LEVEL) \
+ flag_omit_frame_pointer = -1; \
++ if (LEVEL <= 2) \
++ { \
++ flag_reorder_blocks = 0; \
++ } \
+ if (SIZE) \
+ target_flags |= SPACE_BIT; \
+ if (TARGET_SHMEDIA && LEVEL > 1) \
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/73_all_sh-pr20617.patch b/misc/buildroot/toolchain/gcc/3.4.5/73_all_sh-pr20617.patch
new file mode 100644
index 000000000..6d8021cc7
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/73_all_sh-pr20617.patch
@@ -0,0 +1,28 @@
+2005-03-24 J"orn Rennecke <joern.rennecke@st.com>
+
+ Band aid for PR target/20617:
+ * config/sh/lib1funcs.asm (FUNC, ALIAS): Add .hidden directive.
+
+--- g/gcc/config/sh/lib1funcs.asm
++++ g/gcc/config/sh/lib1funcs.asm
+@@ -37,9 +37,19 @@ Boston, MA 02111-1307, USA. */
+ ELF local label prefixes by J"orn Rennecke
+ amylaar@cygnus.com */
+
++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
++
+ #ifdef __ELF__
+ #define LOCAL(X) .L_##X
+-#define FUNC(X) .type X,@function
++
++#if 1 /* ??? The export list mechanism is broken, everything that is not
++ hidden is exported. */
++#undef FUNC
++#define FUNC(X) .type X,@function; .hidden X
++#undef ALIAS
++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
++#endif
++
+ #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
+ #define ENDFUNC(X) ENDFUNC0(X)
+ #else
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.4.5/800-arm-bigendian.patch
new file mode 100644
index 000000000..04e998419
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -101,7 +118,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.4.1-dist/gcc/config.gcc
++++ gcc-3.4.1/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/900-nios2.patch b/misc/buildroot/toolchain/gcc/3.4.5/900-nios2.patch
new file mode 100644
index 000000000..bfa06a21c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/900-nios2.patch
@@ -0,0 +1,10211 @@
+--- gcc-3.4.3/gcc/Makefile.in
++++ gcc-3.4.3-nios2/gcc/Makefile.in
+@@ -3085,7 +3085,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
+ $(INSTALL_DATA) $(srcdir)/README-fixinc \
+ $(DESTDIR)$(itoolsdatadir)/include/README ; \
+ $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
+- $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
++ $(INSTALL_PROGRAM) fixinc/fixincl$(build_exeext) $(DESTDIR)$(itoolsdir)/fixincl$(build_exeext) ; \
+ $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
+ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \
+ else :; fi
+--- gcc-3.4.3/gcc/combine.c
++++ gcc-3.4.3-nios2/gcc/combine.c
+@@ -4380,6 +4380,14 @@ combine_simplify_rtx (rtx x, enum machin
+ mode);
+ }
+
++#ifndef __nios2__
++/* This screws up Nios II in this test case:
++
++if (x & 1)
++ return 2;
++else
++ return 3;
++*/
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+ && op1 == const0_rtx
+@@ -4391,6 +4399,7 @@ combine_simplify_rtx (rtx x, enum machin
+ gen_lowpart_for_combine (mode, op0),
+ const1_rtx);
+ }
++#endif
+
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+--- gcc-3.4.3/gcc/config/nios2/crti.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crti.asm
+@@ -0,0 +1,88 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just make a stack frame for the contents of the .fini and
++.init sections. Users may put any desired instructions in those
++sections.
++
++
++While technically any code can be put in the init and fini sections
++most stuff will not work other than stuff which obeys the call frame
++and ABI. All the call-preserved registers are saved, the call clobbered
++registers should have been saved by the code calling init and fini.
++
++See crtstuff.c for an example of code that inserts itself in the
++init and fini sections.
++
++See crt0.s for the code that calls init and fini.
++*/
++
++ .file "crti.asm"
++
++ .section ".init"
++ .align 2
++ .global _init
++_init:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
++ .section ".fini"
++ .align 2
++ .global _fini
++_fini:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
+--- gcc-3.4.3/gcc/config/nios2/crtn.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crtn.asm
+@@ -0,0 +1,70 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just makes sure that the .fini and .init sections do in
++fact return. Users may put any desired instructions in those sections.
++This file is the last thing linked into any executable.
++*/
++ .file "crtn.asm"
++
++
++
++ .section ".init"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
++ .section ".fini"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod-hi.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod-hi.c
+@@ -0,0 +1,123 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern HItype __modhi3 (HItype, HItype);
++extern HItype __divhi3 (HItype, HItype);
++extern HItype __umodhi3 (HItype, HItype);
++extern HItype __udivhi3 (HItype, HItype);
++
++static UHItype udivmodhi4(UHItype, UHItype, word_type);
++
++static UHItype
++udivmodhi4(UHItype num, UHItype den, word_type modwanted)
++{
++ UHItype bit = 1;
++ UHItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<15)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++HItype
++__divhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodhi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__modhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodhi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__udivhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 0);
++}
++
++
++HItype
++__umodhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod.c
+@@ -0,0 +1,126 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern SItype __modsi3 (SItype, SItype);
++extern SItype __divsi3 (SItype, SItype);
++extern SItype __umodsi3 (SItype, SItype);
++extern SItype __udivsi3 (SItype, SItype);
++
++static USItype udivmodsi4(USItype, USItype, word_type);
++
++/* 16-bit SI divide and modulo as used in NIOS */
++
++
++static USItype
++udivmodsi4(USItype num, USItype den, word_type modwanted)
++{
++ USItype bit = 1;
++ USItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<31)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodsi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__modsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodsi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__udivsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 0);
++}
++
++
++SItype
++__umodsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divtable.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divtable.c
+@@ -0,0 +1,46 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++UQItype __divsi3_table[] =
++{
++ 0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15,
++ 0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15,
++ 0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15,
++ 0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15,
++ 0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15,
++ 0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15,
++ 0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15,
++ 0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15,
++ 0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15,
++ 0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15,
++ 0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15,
++ 0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15,
++ 0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15,
++ 0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15,
++ 0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15,
++ 0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
++};
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-mul.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-mul.c
+@@ -0,0 +1,103 @@
++/* while we are debugging (ie compile outside of gcc build)
++ disable gcc specific headers */
++#ifndef DEBUG_MULSI3
++
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++#else
++#define SItype int
++#define USItype unsigned int
++#endif
++
++
++extern SItype __mulsi3 (SItype, SItype);
++
++SItype
++__mulsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = a;
++
++ while (cnt)
++ {
++ if (cnt & 1)
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt >>= 1;
++ }
++
++ return res;
++}
++/*
++TODO: Choose best alternative implementation.
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = 0;
++
++ while (cnt < 32)
++ {
++ if (a & (1L << cnt))
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt++;
++ }
++
++ return res;
++}
++*/
++
++
++#ifdef DEBUG_MULSI3
++
++int
++main ()
++{
++ int i, j;
++ int error = 0;
++
++ for (i = -1000; i < 1000; i++)
++ for (j = -1000; j < 1000; j++)
++ {
++ int expect = i * j;
++ int actual = A__divsi3 (i, j);
++ if (expect != actual)
++ {
++ printf ("error: %d * %d = %d not %d\n", i, j, expect, actual);
++ error = 1;
++ }
++ }
++
++ return error;
++}
++#endif
+--- gcc-3.4.3/gcc/config/nios2/nios2-dp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-dp-bit.c
+@@ -0,0 +1,1652 @@
++
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-fp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-fp-bit.c
+@@ -0,0 +1,1652 @@
++#define FLOAT
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-protos.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-protos.h
+@@ -0,0 +1,70 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++extern void dump_frame_size (FILE *);
++extern HOST_WIDE_INT compute_frame_size (void);
++extern int nios2_initial_elimination_offset (int, int);
++extern void override_options (void);
++extern void optimization_options (int, int);
++extern int nios2_can_use_return_insn (void);
++extern void expand_prologue (void);
++extern void expand_epilogue (bool);
++extern void function_profiler (FILE *, int);
++
++
++#ifdef RTX_CODE
++extern int nios2_legitimate_address (rtx, enum machine_mode, int);
++extern void nios2_print_operand (FILE *, rtx, int);
++extern void nios2_print_operand_address (FILE *, rtx);
++
++extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
++extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
++
++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx);
++extern void gen_conditional_move (rtx *, enum machine_mode);
++extern const char *asm_output_opcode (FILE *, const char *);
++
++/* predicates */
++extern int arith_operand (rtx, enum machine_mode);
++extern int uns_arith_operand (rtx, enum machine_mode);
++extern int logical_operand (rtx, enum machine_mode);
++extern int shift_operand (rtx, enum machine_mode);
++extern int reg_or_0_operand (rtx, enum machine_mode);
++extern int equality_op (rtx, enum machine_mode);
++extern int custom_insn_opcode (rtx, enum machine_mode);
++extern int rdwrctl_operand (rtx, enum machine_mode);
++
++# ifdef HAVE_MACHINE_MODES
++# if defined TREE_CODE
++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
++extern int nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++
++# endif /* TREE_CODE */
++# endif /* HAVE_MACHINE_MODES */
++#endif
++
++#ifdef TREE_CODE
++extern int nios2_return_in_memory (tree);
++
++#endif /* TREE_CODE */
+--- gcc-3.4.3/gcc/config/nios2/nios2.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.c
+@@ -0,0 +1,2853 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++#include <stdio.h>
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "rtl.h"
++#include "tree.h"
++#include "tm_p.h"
++#include "regs.h"
++#include "hard-reg-set.h"
++#include "real.h"
++#include "insn-config.h"
++#include "conditions.h"
++#include "output.h"
++#include "insn-attr.h"
++#include "flags.h"
++#include "recog.h"
++#include "expr.h"
++#include "toplev.h"
++#include "basic-block.h"
++#include "function.h"
++#include "ggc.h"
++#include "reload.h"
++#include "debug.h"
++#include "optabs.h"
++#include "target.h"
++#include "target-def.h"
++
++/* local prototypes */
++static bool nios2_rtx_costs (rtx, int, int, int *);
++
++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT);
++static int nios2_use_dfa_pipeline_interface (void);
++static int nios2_issue_rate (void);
++static struct machine_function *nios2_init_machine_status (void);
++static bool nios2_in_small_data_p (tree);
++static rtx save_reg (int, HOST_WIDE_INT, rtx);
++static rtx restore_reg (int, HOST_WIDE_INT);
++static unsigned int nios2_section_type_flags (tree, const char *, int);
++static void nios2_init_builtins (void);
++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
++static bool nios2_function_ok_for_sibcall (tree, tree);
++static void nios2_encode_section_info (tree, rtx, int);
++
++/* Initialize the GCC target structure. */
++#undef TARGET_ASM_FUNCTION_PROLOGUE
++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue
++
++#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
++#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \
++ nios2_use_dfa_pipeline_interface
++#undef TARGET_SCHED_ISSUE_RATE
++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate
++#undef TARGET_IN_SMALL_DATA_P
++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p
++#undef TARGET_ENCODE_SECTION_INFO
++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info
++#undef TARGET_SECTION_TYPE_FLAGS
++#define TARGET_SECTION_TYPE_FLAGS nios2_section_type_flags
++
++#undef TARGET_INIT_BUILTINS
++#define TARGET_INIT_BUILTINS nios2_init_builtins
++#undef TARGET_EXPAND_BUILTIN
++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin
++
++#undef TARGET_FUNCTION_OK_FOR_SIBCALL
++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall
++
++#undef TARGET_RTX_COSTS
++#define TARGET_RTX_COSTS nios2_rtx_costs
++
++
++struct gcc_target targetm = TARGET_INITIALIZER;
++
++
++
++/* Threshold for data being put into the small data/bss area, instead
++ of the normal data area (references to the small data/bss area take
++ 1 instruction, and use the global pointer, references to the normal
++ data area takes 2 instructions). */
++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE;
++
++
++/* Structure to be filled in by compute_frame_size with register
++ save masks, and offsets for the current function. */
++
++struct nios2_frame_info
++GTY (())
++{
++ long total_size; /* # bytes that the entire frame takes up */
++ long var_size; /* # bytes that variables take up */
++ long args_size; /* # bytes that outgoing arguments take up */
++ int save_reg_size; /* # bytes needed to store gp regs */
++ int save_reg_rounded; /* # bytes needed to store gp regs */
++ long save_regs_offset; /* offset from new sp to store gp registers */
++ int initialized; /* != 0 if frame size already calculated */
++ int num_regs; /* number of gp registers saved */
++};
++
++struct machine_function
++GTY (())
++{
++
++ /* Current frame information, calculated by compute_frame_size. */
++ struct nios2_frame_info frame;
++};
++
++
++/***************************************
++ * Section encodings
++ ***************************************/
++
++
++
++
++
++/***************************************
++ * Stack Layout and Calling Conventions
++ ***************************************/
++
++
++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1))
++#define TEMP_REG_NUM 8
++
++static void
++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
++{
++ if (flag_verbose_asm || flag_debug_asm)
++ {
++ compute_frame_size ();
++ dump_frame_size (file);
++ }
++}
++
++static rtx
++save_reg (int regno, HOST_WIDE_INT offset, rtx cfa_store_reg)
++{
++ rtx insn, stack_slot;
++
++ stack_slot = gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ GEN_INT (offset));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_MEM (SImode, stack_slot),
++ gen_rtx_REG (SImode, regno)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ return insn;
++}
++
++static rtx
++restore_reg (int regno, HOST_WIDE_INT offset)
++{
++ rtx insn, stack_slot;
++
++ if (TOO_BIG_OFFSET (offset))
++ {
++ stack_slot = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ GEN_INT (offset)));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ gen_rtx_PLUS (SImode,
++ stack_slot,
++ stack_pointer_rtx)));
++ }
++ else
++ {
++ stack_slot = gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (offset));
++ }
++
++ stack_slot = gen_rtx_MEM (SImode, stack_slot);
++
++ insn = emit_move_insn (gen_rtx_REG (SImode, regno), stack_slot);
++
++ return insn;
++}
++
++
++/* There are two possible paths for prologue expansion,
++- the first is if the total frame size is < 2^15-1. In that
++case all the immediates will fit into the 16-bit immediate
++fields.
++- the second is when the frame size is too big, in that
++case an additional temporary register is used, first
++as a cfa_temp to offset the sp, second as the cfa_store
++register.
++
++See the comment above dwarf2out_frame_debug_expr in
++dwarf2out.c for more explanation of the "rules."
++
++
++Case 1:
++Rule # Example Insn Effect
++2 addi sp, sp, -total_frame_size cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++12 stw ra, offset(sp)
++12 stw r16, offset(sp)
++1 mov fp, sp
++
++Case 2:
++Rule # Example Insn Effect
++6 movi r8, total_frame_size cfa_temp.reg=r8, cfa_temp.offset=total_frame_size
++2 sub sp, sp, r8 cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++5 add r8, r8, sp cfa_store.reg=r8, cfa_store.offset=0
++12 stw ra, offset(r8)
++12 stw r16, offset(r8)
++1 mov fp, sp
++
++*/
++
++void
++expand_prologue ()
++{
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int cfa_store_offset;
++ rtx insn;
++ rtx cfa_store_reg = 0;
++
++ total_frame_size = compute_frame_size ();
++
++ if (total_frame_size)
++ {
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ /* cfa_temp and cfa_store_reg are the same register,
++ cfa_store_reg overwrites cfa_temp */
++ cfa_store_reg = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ cfa_store_reg,
++ GEN_INT (total_frame_size)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_MINUS (SImode,
++ stack_pointer_rtx,
++ cfa_store_reg));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ /* if there are no registers to save, I don't need to
++ create a cfa_store */
++ if (cfun->machine->frame.save_reg_size)
++ {
++ insn = gen_rtx_SET (SImode,
++ cfa_store_reg,
++ gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ stack_pointer_rtx));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ cfa_store_offset
++ = total_frame_size
++ - (cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded);
++ }
++ else
++ {
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (-total_frame_size)));
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ cfa_store_reg = stack_pointer_rtx;
++ cfa_store_offset
++ = cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded;
++ }
++ }
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (RA_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (FP_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ cfa_store_offset -= 4;
++ save_reg (i, cfa_store_offset, cfa_store_reg);
++ }
++ }
++
++ if (frame_pointer_needed)
++ {
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_REG (SImode, FP_REGNO),
++ gen_rtx_REG (SImode, SP_REGNO)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ /* If we are profiling, make sure no instructions are scheduled before
++ the call to mcount. */
++ if (current_function_profile)
++ emit_insn (gen_blockage ());
++}
++
++void
++expand_epilogue (bool sibcall_p)
++{
++ rtx insn;
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int register_store_offset;
++
++ total_frame_size = compute_frame_size ();
++
++ if (!sibcall_p && nios2_can_use_return_insn ())
++ {
++ insn = emit_jump_insn (gen_return ());
++ return;
++ }
++
++ emit_insn (gen_blockage ());
++
++ register_store_offset =
++ cfun->machine->frame.save_regs_offset +
++ cfun->machine->frame.save_reg_rounded;
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (RA_REGNO, register_store_offset);
++ }
++
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (FP_REGNO, register_store_offset);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ register_store_offset -= 4;
++ restore_reg (i, register_store_offset);
++ }
++ }
++
++ if (total_frame_size)
++ {
++ rtx sp_adjust;
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ sp_adjust = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ sp_adjust,
++ GEN_INT (total_frame_size)));
++
++ }
++ else
++ {
++ sp_adjust = GEN_INT (total_frame_size);
++ }
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ sp_adjust));
++ insn = emit_insn (insn);
++ }
++
++
++ if (!sibcall_p)
++ {
++ insn = emit_jump_insn (gen_return_from_epilogue (gen_rtx (REG, Pmode,
++ RA_REGNO)));
++ }
++}
++
++
++bool
++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
++{
++ return true;
++}
++
++
++
++
++
++/* ----------------------- *
++ * Profiling
++ * ----------------------- */
++
++void
++function_profiler (FILE *file, int labelno)
++{
++ fprintf (file, "\t%s mcount begin, label: .LP%d\n",
++ ASM_COMMENT_START, labelno);
++ fprintf (file, "\tnextpc\tr8\n");
++ fprintf (file, "\tmov\tr9, ra\n");
++ fprintf (file, "\tmovhi\tr10, %%hiadj(.LP%d)\n", labelno);
++ fprintf (file, "\taddi\tr10, r10, %%lo(.LP%d)\n", labelno);
++ fprintf (file, "\tcall\tmcount\n");
++ fprintf (file, "\tmov\tra, r9\n");
++ fprintf (file, "\t%s mcount end\n", ASM_COMMENT_START);
++}
++
++
++/***************************************
++ * Stack Layout
++ ***************************************/
++
++
++void
++dump_frame_size (FILE *file)
++{
++ fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START);
++
++ fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.total_size);
++ fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.var_size);
++ fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.args_size);
++ fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_size);
++ fprintf (file, "\t%s save_reg_rounded = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_rounded);
++ fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.initialized);
++ fprintf (file, "\t%s num_regs = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.num_regs);
++ fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_regs_offset);
++ fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START,
++ current_function_is_leaf);
++ fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START,
++ frame_pointer_needed);
++ fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START,
++ current_function_pretend_args_size);
++
++}
++
++
++/* Return the bytes needed to compute the frame pointer from the current
++ stack pointer.
++*/
++
++HOST_WIDE_INT
++compute_frame_size ()
++{
++ unsigned int regno;
++ HOST_WIDE_INT var_size; /* # of var. bytes allocated */
++ HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up */
++ HOST_WIDE_INT save_reg_size; /* # bytes needed to store callee save regs */
++ HOST_WIDE_INT save_reg_rounded;
++ /* # bytes needed to store callee save regs (rounded) */
++ HOST_WIDE_INT out_args_size; /* # bytes needed for outgoing args */
++
++ save_reg_size = 0;
++ var_size = STACK_ALIGN (get_frame_size ());
++ out_args_size = STACK_ALIGN (current_function_outgoing_args_size);
++
++ total_size = var_size + out_args_size;
++
++ /* Calculate space needed for gp registers. */
++ for (regno = 0; regno <= FIRST_PSEUDO_REGISTER; regno++)
++ {
++ if (MUST_SAVE_REGISTER (regno))
++ {
++ save_reg_size += 4;
++ }
++ }
++
++ save_reg_rounded = STACK_ALIGN (save_reg_size);
++ total_size += save_reg_rounded;
++
++ total_size += STACK_ALIGN (current_function_pretend_args_size);
++
++ /* Save other computed information. */
++ cfun->machine->frame.total_size = total_size;
++ cfun->machine->frame.var_size = var_size;
++ cfun->machine->frame.args_size = current_function_outgoing_args_size;
++ cfun->machine->frame.save_reg_size = save_reg_size;
++ cfun->machine->frame.save_reg_rounded = save_reg_rounded;
++ cfun->machine->frame.initialized = reload_completed;
++ cfun->machine->frame.num_regs = save_reg_size / UNITS_PER_WORD;
++
++ cfun->machine->frame.save_regs_offset
++ = save_reg_rounded ? current_function_outgoing_args_size + var_size : 0;
++
++ return total_size;
++}
++
++
++int
++nios2_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED)
++{
++ int offset;
++
++ /* Set OFFSET to the offset from the stack pointer. */
++ switch (from)
++ {
++ case FRAME_POINTER_REGNUM:
++ offset = 0;
++ break;
++
++ case ARG_POINTER_REGNUM:
++ compute_frame_size ();
++ offset = cfun->machine->frame.total_size;
++ offset -= current_function_pretend_args_size;
++ break;
++
++ case RETURN_ADDRESS_POINTER_REGNUM:
++ compute_frame_size ();
++ /* since the return address is always the first of the
++ saved registers, return the offset to the beginning
++ of the saved registers block */
++ offset = cfun->machine->frame.save_regs_offset;
++ break;
++
++ default:
++ abort ();
++ }
++
++ return offset;
++}
++
++/* Return nonzero if this function is known to have a null epilogue.
++ This allows the optimizer to omit jumps to jumps if no stack
++ was created. */
++int
++nios2_can_use_return_insn ()
++{
++ if (!reload_completed)
++ return 0;
++
++ if (regs_ever_live[RA_REGNO] || current_function_profile)
++ return 0;
++
++ if (cfun->machine->frame.initialized)
++ return cfun->machine->frame.total_size == 0;
++
++ return compute_frame_size () == 0;
++}
++
++
++
++
++
++/***************************************
++ *
++ ***************************************/
++
++const char *nios2_sys_nosys_string; /* for -msys=nosys */
++const char *nios2_sys_lib_string; /* for -msys-lib= */
++const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++void
++override_options ()
++{
++ /* Function to allocate machine-dependent function status. */
++ init_machine_status = &nios2_init_machine_status;
++
++ nios2_section_threshold
++ = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE;
++
++ if (nios2_sys_nosys_string && *nios2_sys_nosys_string)
++ {
++ error ("invalid option '-msys=nosys%s'", nios2_sys_nosys_string);
++ }
++
++ /* If we don't have mul, we don't have mulx either! */
++ if (!TARGET_HAS_MUL && TARGET_HAS_MULX)
++ {
++ target_flags &= ~HAS_MULX_FLAG;
++ }
++
++}
++
++void
++optimization_options (int level, int size)
++{
++ if (level || size)
++ {
++ target_flags |= INLINE_MEMCPY_FLAG;
++ }
++
++ if (level >= 3 && !size)
++ {
++ target_flags |= FAST_SW_DIV_FLAG;
++ }
++}
++
++/* Allocate a chunk of memory for per-function machine-dependent data. */
++static struct machine_function *
++nios2_init_machine_status ()
++{
++ return ((struct machine_function *)
++ ggc_alloc_cleared (sizeof (struct machine_function)));
++}
++
++
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++/* Compute a (partial) cost for rtx X. Return true if the complete
++ cost has been computed, and false if subexpressions should be
++ scanned. In either case, *TOTAL contains the cost result. */
++
++
++
++static bool
++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
++{
++ switch (code)
++ {
++ case CONST_INT:
++ if (INTVAL (x) == 0)
++ {
++ *total = COSTS_N_INSNS (0);
++ return true;
++ }
++ else if (SMALL_INT (INTVAL (x))
++ || SMALL_INT_UNSIGNED (INTVAL (x))
++ || UPPER16_INT (INTVAL (x)))
++ {
++ *total = COSTS_N_INSNS (2);
++ return true;
++ }
++ else
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case LABEL_REF:
++ case SYMBOL_REF:
++ /* ??? gp relative stuff will fit in here */
++ /* fall through */
++ case CONST:
++ case CONST_DOUBLE:
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case MULT:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++ case SIGN_EXTEND:
++ {
++ *total = COSTS_N_INSNS (3);
++ return false;
++ }
++ case ZERO_EXTEND:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++
++ default:
++ return false;
++ }
++}
++
++
++/***************************************
++ * INSTRUCTION SUPPORT
++ *
++ * These functions are used within the Machine Description to
++ * handle common or complicated output and expansions from
++ * instructions.
++ ***************************************/
++
++int
++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
++{
++ rtx to = operands[0];
++ rtx from = operands[1];
++
++ if (!register_operand (to, mode) && !reg_or_0_operand (from, mode))
++ {
++ if (no_new_pseudos)
++ internal_error ("Trying to force_reg no_new_pseudos == 1");
++ from = copy_to_mode_reg (mode, from);
++ }
++
++ operands[0] = to;
++ operands[1] = from;
++ return 0;
++}
++
++/* Divide Support */
++
++/*
++ If -O3 is used, we want to output a table lookup for
++ divides between small numbers (both num and den >= 0
++ and < 0x10). The overhead of this method in the worse
++ case is 40 bytes in the text section (10 insns) and
++ 256 bytes in the data section. Additional divides do
++ not incur additional penalties in the data section.
++
++ Code speed is improved for small divides by about 5x
++ when using this method in the worse case (~9 cycles
++ vs ~45). And in the worse case divides not within the
++ table are penalized by about 10% (~5 cycles vs ~45).
++ However in the typical case the penalty is not as bad
++ because doing the long divide in only 45 cycles is
++ quite optimistic.
++
++ ??? It would be nice to have some benchmarks other
++ than Dhrystone to back this up.
++
++ This bit of expansion is to create this instruction
++ sequence as rtl.
++ or $8, $4, $5
++ slli $9, $4, 4
++ cmpgeui $3, $8, 16
++ beq $3, $0, .L3
++ or $10, $9, $5
++ add $12, $11, divide_table
++ ldbu $2, 0($12)
++ br .L1
++.L3:
++ call slow_div
++.L1:
++# continue here with result in $2
++
++ ??? Ideally I would like the emit libcall block to contain
++ all of this code, but I don't know how to do that. What it
++ means is that if the divide can be eliminated, it may not
++ completely disappear.
++
++ ??? The __divsi3_table label should ideally be moved out
++ of this block and into a global. If it is placed into the
++ sdata section we can save even more cycles by doing things
++ gp relative.
++*/
++int
++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode)
++{
++ rtx or_result, shift_left_result;
++ rtx lookup_value;
++ rtx lab1, lab3;
++ rtx insns;
++ rtx libfunc;
++ rtx final_result;
++ rtx tmp;
++
++ /* it may look a little generic, but only SImode
++ is supported for now */
++ if (mode != SImode)
++ abort ();
++
++ libfunc = sdiv_optab->handlers[(int) SImode].libfunc;
++
++
++
++ lab1 = gen_label_rtx ();
++ lab3 = gen_label_rtx ();
++
++ or_result = expand_simple_binop (SImode, IOR,
++ operands[1], operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0,
++ GET_MODE (or_result), 0, lab3);
++ JUMP_LABEL (get_last_insn ()) = lab3;
++
++ shift_left_result = expand_simple_binop (SImode, ASHIFT,
++ operands[1], GEN_INT (4),
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ lookup_value = expand_simple_binop (SImode, IOR,
++ shift_left_result, operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ convert_move (operands[0],
++ gen_rtx (MEM, QImode,
++ gen_rtx (PLUS, SImode,
++ lookup_value,
++ gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))),
++ 1);
++
++
++ tmp = emit_jump_insn (gen_jump (lab1));
++ JUMP_LABEL (tmp) = lab1;
++ emit_barrier ();
++
++ emit_label (lab3);
++ LABEL_NUSES (lab3) = 1;
++
++ start_sequence ();
++ final_result = emit_library_call_value (libfunc, NULL_RTX,
++ LCT_CONST, SImode, 2,
++ operands[1], SImode,
++ operands[2], SImode);
++
++
++ insns = get_insns ();
++ end_sequence ();
++ emit_libcall_block (insns, operands[0], final_result,
++ gen_rtx (DIV, SImode, operands[1], operands[2]));
++
++ emit_label (lab1);
++ LABEL_NUSES (lab1) = 1;
++ return 1;
++}
++
++/* Branches/Compares */
++
++/* the way of handling branches/compares
++ in gcc is heavily borrowed from MIPS */
++
++enum internal_test
++{
++ ITEST_EQ,
++ ITEST_NE,
++ ITEST_GT,
++ ITEST_GE,
++ ITEST_LT,
++ ITEST_LE,
++ ITEST_GTU,
++ ITEST_GEU,
++ ITEST_LTU,
++ ITEST_LEU,
++ ITEST_MAX
++};
++
++static enum internal_test map_test_to_internal_test (enum rtx_code);
++
++/* Cached operands, and operator to compare for use in set/branch/trap
++ on condition codes. */
++rtx branch_cmp[2];
++enum cmp_type branch_type;
++
++/* Make normal rtx_code into something we can index from an array */
++
++static enum internal_test
++map_test_to_internal_test (enum rtx_code test_code)
++{
++ enum internal_test test = ITEST_MAX;
++
++ switch (test_code)
++ {
++ case EQ:
++ test = ITEST_EQ;
++ break;
++ case NE:
++ test = ITEST_NE;
++ break;
++ case GT:
++ test = ITEST_GT;
++ break;
++ case GE:
++ test = ITEST_GE;
++ break;
++ case LT:
++ test = ITEST_LT;
++ break;
++ case LE:
++ test = ITEST_LE;
++ break;
++ case GTU:
++ test = ITEST_GTU;
++ break;
++ case GEU:
++ test = ITEST_GEU;
++ break;
++ case LTU:
++ test = ITEST_LTU;
++ break;
++ case LEU:
++ test = ITEST_LEU;
++ break;
++ default:
++ break;
++ }
++
++ return test;
++}
++
++/* Generate the code to compare (and possibly branch) two integer values
++ TEST_CODE is the comparison code we are trying to emulate
++ (or implement directly)
++ RESULT is where to store the result of the comparison,
++ or null to emit a branch
++ CMP0 CMP1 are the two comparison operands
++ DESTINATION is the destination of the branch, or null to only compare
++ */
++
++void
++gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
++ rtx result, /* result to store comp. or 0 if branch */
++ rtx cmp0, /* first operand to compare */
++ rtx cmp1, /* second operand to compare */
++ rtx destination) /* destination of the branch, or 0 if compare */
++{
++ struct cmp_info
++ {
++ /* for register (or 0) compares */
++ enum rtx_code test_code_reg; /* code to use in instruction (LT vs. LTU) */
++ int reverse_regs; /* reverse registers in test */
++
++ /* for immediate compares */
++ enum rtx_code test_code_const;
++ /* code to use in instruction (LT vs. LTU) */
++ int const_low; /* low bound of constant we can accept */
++ int const_high; /* high bound of constant we can accept */
++ int const_add; /* constant to add */
++
++ /* generic info */
++ int unsignedp; /* != 0 for unsigned comparisons. */
++ };
++
++ static const struct cmp_info info[(int) ITEST_MAX] = {
++
++ {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ */
++ {NE, 0, NE, -32768, 32767, 0, 0}, /* NE */
++
++ {LT, 1, GE, -32769, 32766, 1, 0}, /* GT */
++ {GE, 0, GE, -32768, 32767, 0, 0}, /* GE */
++ {LT, 0, LT, -32768, 32767, 0, 0}, /* LT */
++ {GE, 1, LT, -32769, 32766, 1, 0}, /* LE */
++
++ {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */
++ {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */
++ {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */
++ {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */
++ };
++
++ enum internal_test test;
++ enum machine_mode mode;
++ const struct cmp_info *p_info;
++ int branch_p;
++
++
++
++
++ test = map_test_to_internal_test (test_code);
++ if (test == ITEST_MAX)
++ abort ();
++
++ p_info = &info[(int) test];
++
++ mode = GET_MODE (cmp0);
++ if (mode == VOIDmode)
++ mode = GET_MODE (cmp1);
++
++ branch_p = (destination != 0);
++
++ /* We can't, under any circumstances, have const_ints in cmp0
++ ??? Actually we could have const0 */
++ if (GET_CODE (cmp0) == CONST_INT)
++ cmp0 = force_reg (mode, cmp0);
++
++ /* if the comparison is against an int not in legal range
++ move it into a register */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (cmp1);
++
++ if (value < p_info->const_low || value > p_info->const_high)
++ cmp1 = force_reg (mode, cmp1);
++ }
++
++ /* Comparison to constants, may involve adding 1 to change a GT into GE.
++ Comparison between two registers, may involve switching operands. */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ if (p_info->const_add != 0)
++ {
++ HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
++
++ /* If modification of cmp1 caused overflow,
++ we would get the wrong answer if we follow the usual path;
++ thus, x > 0xffffffffU would turn into x > 0U. */
++ if ((p_info->unsignedp
++ ? (unsigned HOST_WIDE_INT) new >
++ (unsigned HOST_WIDE_INT) INTVAL (cmp1)
++ : new > INTVAL (cmp1)) != (p_info->const_add > 0))
++ {
++ /* ??? This case can never happen with the current numbers,
++ but I am paranoid and would rather an abort than
++ a bug I will never find */
++ abort ();
++ }
++ else
++ cmp1 = GEN_INT (new);
++ }
++ }
++
++ else if (p_info->reverse_regs)
++ {
++ rtx temp = cmp0;
++ cmp0 = cmp1;
++ cmp1 = temp;
++ }
++
++
++
++ if (branch_p)
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ rtx insn;
++ rtx cond = gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1);
++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ insn = gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond, label, pc_rtx));
++ emit_jump_insn (insn);
++ }
++ else
++ {
++ rtx cond, label;
++
++ result = gen_reg_rtx (mode);
++
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++
++ cond = gen_rtx (NE, mode, result, const0_rtx);
++ label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond,
++ label, pc_rtx)));
++ }
++ }
++ else
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1));
++ }
++ else
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++ }
++ }
++
++}
++
++
++/* ??? For now conditional moves are only supported
++ when the mode of the operands being compared are
++ the same as the ones being moved */
++
++void
++gen_conditional_move (rtx *operands, enum machine_mode mode)
++{
++ rtx insn, cond;
++ rtx cmp_reg = gen_reg_rtx (mode);
++ enum rtx_code cmp_code = GET_CODE (operands[1]);
++ enum rtx_code move_code = EQ;
++
++ /* emit a comparison if it is not "simple".
++ Simple comparisons are X eq 0 and X ne 0 */
++ if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[0];
++ move_code = cmp_code;
++ }
++ else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[1];
++ move_code = cmp_code == EQ ? NE : EQ;
++ }
++ else
++ gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1],
++ NULL_RTX);
++
++ cond = gen_rtx (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode));
++ insn = gen_rtx_SET (mode, operands[0],
++ gen_rtx_IF_THEN_ELSE (mode,
++ cond, operands[2], operands[3]));
++ emit_insn (insn);
++}
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++int
++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int strict)
++{
++ int ret_val = 0;
++
++ switch (GET_CODE (operand))
++ {
++ /* direct. */
++ case SYMBOL_REF:
++ if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand))
++ {
++ ret_val = 1;
++ break;
++ }
++ /* else, fall through */
++ case LABEL_REF:
++ case CONST_INT:
++ case CONST:
++ case CONST_DOUBLE:
++ /* ??? In here I need to add gp addressing */
++ ret_val = 0;
++
++ break;
++
++ /* Register indirect. */
++ case REG:
++ ret_val = REG_OK_FOR_BASE_P2 (operand, strict);
++ break;
++
++ /* Register indirect with displacement */
++ case PLUS:
++ {
++ rtx op0 = XEXP (operand, 0);
++ rtx op1 = XEXP (operand, 1);
++
++ if (REG_P (op0) && REG_P (op1))
++ ret_val = 0;
++ else if (REG_P (op0) && CONSTANT_P (op1))
++ ret_val = REG_OK_FOR_BASE_P2 (op0, strict)
++ && SMALL_INT (INTVAL (op1));
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ ret_val = REG_OK_FOR_BASE_P2 (op1, strict)
++ && SMALL_INT (INTVAL (op0));
++ else
++ ret_val = 0;
++ }
++ break;
++
++ default:
++ ret_val = 0;
++ break;
++ }
++
++ return ret_val;
++}
++
++/* Return true if EXP should be placed in the small data section. */
++
++static bool
++nios2_in_small_data_p (tree exp)
++{
++ /* We want to merge strings, so we never consider them small data. */
++ if (TREE_CODE (exp) == STRING_CST)
++ return false;
++
++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
++ {
++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
++ /* ??? these string names need moving into
++ an array in some header file */
++ if (nios2_section_threshold > 0
++ && (strcmp (section, ".sbss") == 0
++ || strncmp (section, ".sbss.", 6) == 0
++ || strcmp (section, ".sdata") == 0
++ || strncmp (section, ".sdata.", 7) == 0))
++ return true;
++ }
++ else if (TREE_CODE (exp) == VAR_DECL)
++ {
++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
++
++ /* If this is an incomplete type with size 0, then we can't put it
++ in sdata because it might be too big when completed. */
++ if (size > 0 && size <= nios2_section_threshold)
++ return true;
++ }
++
++ return false;
++}
++
++static void
++nios2_encode_section_info (tree decl, rtx rtl, int first)
++{
++
++ rtx symbol;
++ int flags;
++
++ default_encode_section_info (decl, rtl, first);
++
++ /* Careful not to prod global register variables. */
++ if (GET_CODE (rtl) != MEM)
++ return;
++ symbol = XEXP (rtl, 0);
++ if (GET_CODE (symbol) != SYMBOL_REF)
++ return;
++
++ flags = SYMBOL_REF_FLAGS (symbol);
++
++ /* We don't want weak variables to be addressed with gp in case they end up with
++ value 0 which is not within 2^15 of $gp */
++ if (DECL_P (decl) && DECL_WEAK (decl))
++ flags |= SYMBOL_FLAG_WEAK_DECL;
++
++ SYMBOL_REF_FLAGS (symbol) = flags;
++}
++
++
++static unsigned int
++nios2_section_type_flags (tree decl, const char *name, int reloc)
++{
++ unsigned int flags;
++
++ flags = default_section_type_flags (decl, name, reloc);
++
++ /* ??? these string names need moving into an array in some header file */
++ if (strcmp (name, ".sbss") == 0
++ || strncmp (name, ".sbss.", 6) == 0
++ || strcmp (name, ".sdata") == 0
++ || strncmp (name, ".sdata.", 7) == 0)
++ flags |= SECTION_SMALL;
++
++ return flags;
++}
++
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++
++/* print the operand OP to file stream
++ FILE modified by LETTER. LETTER
++ can be one of:
++ i: print "i" if OP is an immediate, except 0
++ o: print "io" if OP is volatile
++
++ z: for const0_rtx print $0 instead of 0
++ H: for %hiadj
++ L: for %lo
++ U: for upper half of 32 bit value
++ */
++
++void
++nios2_print_operand (FILE *file, rtx op, int letter)
++{
++
++ switch (letter)
++ {
++ case 'i':
++ if (CONSTANT_P (op) && (op != const0_rtx))
++ fprintf (file, "i");
++ return;
++
++ case 'o':
++ if (GET_CODE (op) == MEM
++ && ((MEM_VOLATILE_P (op) && !TARGET_CACHE_VOLATILE)
++ || TARGET_BYPASS_CACHE))
++ fprintf (file, "io");
++ return;
++
++ default:
++ break;
++ }
++
++ if (comparison_operator (op, VOIDmode))
++ {
++ if (letter == 0)
++ {
++ fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op)));
++ return;
++ }
++ }
++
++
++ switch (GET_CODE (op))
++ {
++ case REG:
++ if (letter == 0 || letter == 'z')
++ {
++ fprintf (file, "%s", reg_names[REGNO (op)]);
++ return;
++ }
++
++ case CONST_INT:
++ if (INTVAL (op) == 0 && letter == 'z')
++ {
++ fprintf (file, "zero");
++ return;
++ }
++ else if (letter == 'U')
++ {
++ HOST_WIDE_INT val = INTVAL (op);
++ rtx new_op;
++ val = (val / 65536) & 0xFFFF;
++ new_op = GEN_INT (val);
++ output_addr_const (file, new_op);
++ return;
++ }
++
++ /* else, fall through */
++ case CONST:
++ case LABEL_REF:
++ case SYMBOL_REF:
++ case CONST_DOUBLE:
++ if (letter == 0 || letter == 'z')
++ {
++ output_addr_const (file, op);
++ return;
++ }
++ else if (letter == 'H')
++ {
++ fprintf (file, "%%hiadj(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++ else if (letter == 'L')
++ {
++ fprintf (file, "%%lo(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++
++
++ case SUBREG:
++ case MEM:
++ if (letter == 0)
++ {
++ output_address (op);
++ return;
++ }
++
++ case CODE_LABEL:
++ if (letter == 0)
++ {
++ output_addr_const (file, op);
++ return;
++ }
++
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print (%c) ", letter);
++ debug_rtx (op);
++ abort ();
++}
++
++static int gprel_constant (rtx);
++
++static int
++gprel_constant (rtx op)
++{
++ if (GET_CODE (op) == SYMBOL_REF
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op))
++ {
++ return 1;
++ }
++ else if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == PLUS)
++ {
++ return gprel_constant (XEXP (XEXP (op, 0), 0));
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++void
++nios2_print_operand_address (FILE *file, rtx op)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST:
++ case CONST_INT:
++ case LABEL_REF:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ if (gprel_constant (op))
++ {
++ fprintf (file, "%%gprel(");
++ output_addr_const (file, op);
++ fprintf (file, ")(%s)", reg_names[GP_REGNO]);
++ return;
++ }
++
++ break;
++
++ case PLUS:
++ {
++ rtx op0 = XEXP (op, 0);
++ rtx op1 = XEXP (op, 1);
++
++ if (REG_P (op0) && CONSTANT_P (op1))
++ {
++ output_addr_const (file, op1);
++ fprintf (file, "(%s)", reg_names[REGNO (op0)]);
++ return;
++ }
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ {
++ output_addr_const (file, op0);
++ fprintf (file, "(%s)", reg_names[REGNO (op1)]);
++ return;
++ }
++ }
++ break;
++
++ case REG:
++ fprintf (file, "0(%s)", reg_names[REGNO (op)]);
++ return;
++
++ case MEM:
++ {
++ rtx base = XEXP (op, 0);
++ PRINT_OPERAND_ADDRESS (file, base);
++ return;
++ }
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print address\n");
++ debug_rtx (op);
++ abort ();
++}
++
++
++
++
++
++/****************************
++ * Predicates
++ ****************************/
++
++int
++arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++uns_arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++logical_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT
++ && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op))))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++shift_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op));
++}
++
++/* Return truth value of whether OP is a register or the constant 0. */
++
++int
++reg_or_0_operand (rtx op, enum machine_mode mode)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST_INT:
++ return INTVAL (op) == 0;
++
++ case CONST_DOUBLE:
++ return op == CONST0_RTX (mode);
++
++ default:
++ break;
++ }
++
++ return register_operand (op, mode);
++}
++
++
++int
++equality_op (rtx op, enum machine_mode mode)
++{
++ if (mode != GET_MODE (op))
++ return 0;
++
++ return GET_CODE (op) == EQ || GET_CODE (op) == NE;
++}
++
++int
++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op));
++}
++
++
++
++
++
++
++
++/*****************************************************************************
++**
++** instruction scheduler
++**
++*****************************************************************************/
++static int
++nios2_use_dfa_pipeline_interface ()
++{
++ return 1;
++}
++
++
++static int
++nios2_issue_rate ()
++{
++#ifdef MAX_DFA_ISSUE_RATE
++ return MAX_DFA_ISSUE_RATE;
++#else
++ return 1;
++#endif
++}
++
++
++const char *
++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED,
++ const char *ptr ATTRIBUTE_UNUSED)
++{
++ const char *p;
++
++ p = ptr;
++ return ptr;
++}
++
++
++
++/*****************************************************************************
++**
++** function arguments
++**
++*****************************************************************************/
++
++void
++init_cumulative_args (CUMULATIVE_ARGS *cum,
++ tree fntype ATTRIBUTE_UNUSED,
++ rtx libname ATTRIBUTE_UNUSED,
++ tree fndecl ATTRIBUTE_UNUSED,
++ int n_named_args ATTRIBUTE_UNUSED)
++{
++ cum->regs_used = 0;
++}
++
++
++/* Update the data in CUM to advance over an argument
++ of mode MODE and data type TYPE.
++ (TYPE is null for libcalls where that information may not be available.) */
++
++void
++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ cum->regs_used = NUM_ARG_REGS;
++ }
++ else
++ {
++ cum->regs_used += param_size;
++ }
++
++ return;
++}
++
++/* Define where to put the arguments to a function. Value is zero to
++ push the argument on the stack, or a hard register in which to
++ store the argument.
++
++ MODE is the argument's machine mode.
++ TYPE is the data type of the argument (as a tree).
++ This is null for libcalls where that information may
++ not be available.
++ CUM is a variable of type CUMULATIVE_ARGS which gives info about
++ the preceding args and about the function being called.
++ NAMED is nonzero if this argument is a named parameter
++ (otherwise it is an extra parameter matching an ellipsis). */
++rtx
++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ rtx return_rtx = NULL_RTX;
++
++ if (cum->regs_used < NUM_ARG_REGS)
++ {
++ return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used);
++ }
++
++ return return_rtx;
++}
++
++int
++function_arg_partial_nregs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used < NUM_ARG_REGS
++ && cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ return NUM_ARG_REGS - cum->regs_used;
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++
++int
++nios2_return_in_memory (tree type)
++{
++ int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
++ || (int_size_in_bytes (type) == -1));
++
++ return res;
++}
++
++/* ??? It may be possible to eliminate the copyback and implement
++ my own va_arg type, but that is more work for now. */
++int
++nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int no_rtl)
++{
++ CUMULATIVE_ARGS local_cum;
++ int regs_to_push;
++
++ local_cum = *cum;
++ FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
++
++ regs_to_push = NUM_ARG_REGS - local_cum.regs_used;
++
++ if (!no_rtl)
++ {
++ if (regs_to_push > 0)
++ {
++ rtx ptr, mem;
++
++ ptr = virtual_incoming_args_rtx;
++ mem = gen_rtx_MEM (BLKmode, ptr);
++
++ /* va_arg is an array access in this case, which causes
++ it to get MEM_IN_STRUCT_P set. We must set it here
++ so that the insn scheduler won't assume that these
++ stores can't possibly overlap with the va_arg loads. */
++ MEM_SET_IN_STRUCT_P (mem, 1);
++
++ emit_insn (gen_blockage ());
++ move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem,
++ regs_to_push);
++ emit_insn (gen_blockage ());
++ }
++ }
++
++ return regs_to_push * UNITS_PER_WORD;
++
++}
++
++
++
++/*****************************************************************************
++**
++** builtins
++**
++** This method for handling builtins is from CSP where _many_ more types of
++** expanders have already been written. Check there first before writing
++** new ones.
++**
++*****************************************************************************/
++
++enum nios2_builtins
++{
++ NIOS2_BUILTIN_LDBIO,
++ NIOS2_BUILTIN_LDBUIO,
++ NIOS2_BUILTIN_LDHIO,
++ NIOS2_BUILTIN_LDHUIO,
++ NIOS2_BUILTIN_LDWIO,
++ NIOS2_BUILTIN_STBIO,
++ NIOS2_BUILTIN_STHIO,
++ NIOS2_BUILTIN_STWIO,
++ NIOS2_BUILTIN_SYNC,
++ NIOS2_BUILTIN_RDCTL,
++ NIOS2_BUILTIN_WRCTL,
++
++ NIOS2_BUILTIN_CUSTOM_N,
++ NIOS2_BUILTIN_CUSTOM_NI,
++ NIOS2_BUILTIN_CUSTOM_NF,
++ NIOS2_BUILTIN_CUSTOM_NP,
++ NIOS2_BUILTIN_CUSTOM_NII,
++ NIOS2_BUILTIN_CUSTOM_NIF,
++ NIOS2_BUILTIN_CUSTOM_NIP,
++ NIOS2_BUILTIN_CUSTOM_NFI,
++ NIOS2_BUILTIN_CUSTOM_NFF,
++ NIOS2_BUILTIN_CUSTOM_NFP,
++ NIOS2_BUILTIN_CUSTOM_NPI,
++ NIOS2_BUILTIN_CUSTOM_NPF,
++ NIOS2_BUILTIN_CUSTOM_NPP,
++ NIOS2_BUILTIN_CUSTOM_IN,
++ NIOS2_BUILTIN_CUSTOM_INI,
++ NIOS2_BUILTIN_CUSTOM_INF,
++ NIOS2_BUILTIN_CUSTOM_INP,
++ NIOS2_BUILTIN_CUSTOM_INII,
++ NIOS2_BUILTIN_CUSTOM_INIF,
++ NIOS2_BUILTIN_CUSTOM_INIP,
++ NIOS2_BUILTIN_CUSTOM_INFI,
++ NIOS2_BUILTIN_CUSTOM_INFF,
++ NIOS2_BUILTIN_CUSTOM_INFP,
++ NIOS2_BUILTIN_CUSTOM_INPI,
++ NIOS2_BUILTIN_CUSTOM_INPF,
++ NIOS2_BUILTIN_CUSTOM_INPP,
++ NIOS2_BUILTIN_CUSTOM_FN,
++ NIOS2_BUILTIN_CUSTOM_FNI,
++ NIOS2_BUILTIN_CUSTOM_FNF,
++ NIOS2_BUILTIN_CUSTOM_FNP,
++ NIOS2_BUILTIN_CUSTOM_FNII,
++ NIOS2_BUILTIN_CUSTOM_FNIF,
++ NIOS2_BUILTIN_CUSTOM_FNIP,
++ NIOS2_BUILTIN_CUSTOM_FNFI,
++ NIOS2_BUILTIN_CUSTOM_FNFF,
++ NIOS2_BUILTIN_CUSTOM_FNFP,
++ NIOS2_BUILTIN_CUSTOM_FNPI,
++ NIOS2_BUILTIN_CUSTOM_FNPF,
++ NIOS2_BUILTIN_CUSTOM_FNPP,
++ NIOS2_BUILTIN_CUSTOM_PN,
++ NIOS2_BUILTIN_CUSTOM_PNI,
++ NIOS2_BUILTIN_CUSTOM_PNF,
++ NIOS2_BUILTIN_CUSTOM_PNP,
++ NIOS2_BUILTIN_CUSTOM_PNII,
++ NIOS2_BUILTIN_CUSTOM_PNIF,
++ NIOS2_BUILTIN_CUSTOM_PNIP,
++ NIOS2_BUILTIN_CUSTOM_PNFI,
++ NIOS2_BUILTIN_CUSTOM_PNFF,
++ NIOS2_BUILTIN_CUSTOM_PNFP,
++ NIOS2_BUILTIN_CUSTOM_PNPI,
++ NIOS2_BUILTIN_CUSTOM_PNPF,
++ NIOS2_BUILTIN_CUSTOM_PNPP,
++
++
++ LIM_NIOS2_BUILTINS
++};
++
++struct builtin_description
++{
++ const enum insn_code icode;
++ const char *const name;
++ const enum nios2_builtins code;
++ const tree *type;
++ rtx (* expander) PARAMS ((const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int));
++};
++
++static rtx nios2_expand_STXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_LDXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_sync (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_rdctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_wrctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static rtx nios2_expand_custom_n (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_Xn (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static tree endlink;
++
++/* int fn (volatile const void *)
++ */
++static tree int_ftype_volatile_const_void_p;
++
++/* int fn (int)
++ */
++static tree int_ftype_int;
++
++/* void fn (int, int)
++ */
++static tree void_ftype_int_int;
++
++/* void fn (volatile void *, int)
++ */
++static tree void_ftype_volatile_void_p_int;
++
++/* void fn (void)
++ */
++static tree void_ftype_void;
++
++static tree custom_n;
++static tree custom_ni;
++static tree custom_nf;
++static tree custom_np;
++static tree custom_nii;
++static tree custom_nif;
++static tree custom_nip;
++static tree custom_nfi;
++static tree custom_nff;
++static tree custom_nfp;
++static tree custom_npi;
++static tree custom_npf;
++static tree custom_npp;
++static tree custom_in;
++static tree custom_ini;
++static tree custom_inf;
++static tree custom_inp;
++static tree custom_inii;
++static tree custom_inif;
++static tree custom_inip;
++static tree custom_infi;
++static tree custom_inff;
++static tree custom_infp;
++static tree custom_inpi;
++static tree custom_inpf;
++static tree custom_inpp;
++static tree custom_fn;
++static tree custom_fni;
++static tree custom_fnf;
++static tree custom_fnp;
++static tree custom_fnii;
++static tree custom_fnif;
++static tree custom_fnip;
++static tree custom_fnfi;
++static tree custom_fnff;
++static tree custom_fnfp;
++static tree custom_fnpi;
++static tree custom_fnpf;
++static tree custom_fnpp;
++static tree custom_pn;
++static tree custom_pni;
++static tree custom_pnf;
++static tree custom_pnp;
++static tree custom_pnii;
++static tree custom_pnif;
++static tree custom_pnip;
++static tree custom_pnfi;
++static tree custom_pnff;
++static tree custom_pnfp;
++static tree custom_pnpi;
++static tree custom_pnpf;
++static tree custom_pnpp;
++
++
++static const struct builtin_description bdesc[] = {
++ {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++
++ {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++
++ {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, &void_ftype_void, nios2_expand_sync},
++ {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, &int_ftype_int, nios2_expand_rdctl},
++ {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, &void_ftype_int_int, nios2_expand_wrctl},
++
++ {CODE_FOR_custom_n, "__builtin_custom_n", NIOS2_BUILTIN_CUSTOM_N, &custom_n, nios2_expand_custom_n},
++ {CODE_FOR_custom_ni, "__builtin_custom_ni", NIOS2_BUILTIN_CUSTOM_NI, &custom_ni, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nf, "__builtin_custom_nf", NIOS2_BUILTIN_CUSTOM_NF, &custom_nf, nios2_expand_custom_nX},
++ {CODE_FOR_custom_np, "__builtin_custom_np", NIOS2_BUILTIN_CUSTOM_NP, &custom_np, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nii, "__builtin_custom_nii", NIOS2_BUILTIN_CUSTOM_NII, &custom_nii, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nif, "__builtin_custom_nif", NIOS2_BUILTIN_CUSTOM_NIF, &custom_nif, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nip, "__builtin_custom_nip", NIOS2_BUILTIN_CUSTOM_NIP, &custom_nip, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfi, "__builtin_custom_nfi", NIOS2_BUILTIN_CUSTOM_NFI, &custom_nfi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nff, "__builtin_custom_nff", NIOS2_BUILTIN_CUSTOM_NFF, &custom_nff, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfp, "__builtin_custom_nfp", NIOS2_BUILTIN_CUSTOM_NFP, &custom_nfp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npi, "__builtin_custom_npi", NIOS2_BUILTIN_CUSTOM_NPI, &custom_npi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npf, "__builtin_custom_npf", NIOS2_BUILTIN_CUSTOM_NPF, &custom_npf, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npp, "__builtin_custom_npp", NIOS2_BUILTIN_CUSTOM_NPP, &custom_npp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_in, "__builtin_custom_in", NIOS2_BUILTIN_CUSTOM_IN, &custom_in, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_ini, "__builtin_custom_ini", NIOS2_BUILTIN_CUSTOM_INI, &custom_ini, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inf, "__builtin_custom_inf", NIOS2_BUILTIN_CUSTOM_INF, &custom_inf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inp, "__builtin_custom_inp", NIOS2_BUILTIN_CUSTOM_INP, &custom_inp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inii, "__builtin_custom_inii", NIOS2_BUILTIN_CUSTOM_INII, &custom_inii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inif, "__builtin_custom_inif", NIOS2_BUILTIN_CUSTOM_INIF, &custom_inif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inip, "__builtin_custom_inip", NIOS2_BUILTIN_CUSTOM_INIP, &custom_inip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infi, "__builtin_custom_infi", NIOS2_BUILTIN_CUSTOM_INFI, &custom_infi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inff, "__builtin_custom_inff", NIOS2_BUILTIN_CUSTOM_INFF, &custom_inff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infp, "__builtin_custom_infp", NIOS2_BUILTIN_CUSTOM_INFP, &custom_infp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpi, "__builtin_custom_inpi", NIOS2_BUILTIN_CUSTOM_INPI, &custom_inpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpf, "__builtin_custom_inpf", NIOS2_BUILTIN_CUSTOM_INPF, &custom_inpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpp, "__builtin_custom_inpp", NIOS2_BUILTIN_CUSTOM_INPP, &custom_inpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fn, "__builtin_custom_fn", NIOS2_BUILTIN_CUSTOM_FN, &custom_fn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_fni, "__builtin_custom_fni", NIOS2_BUILTIN_CUSTOM_FNI, &custom_fni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnf, "__builtin_custom_fnf", NIOS2_BUILTIN_CUSTOM_FNF, &custom_fnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnp, "__builtin_custom_fnp", NIOS2_BUILTIN_CUSTOM_FNP, &custom_fnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnii, "__builtin_custom_fnii", NIOS2_BUILTIN_CUSTOM_FNII, &custom_fnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnif, "__builtin_custom_fnif", NIOS2_BUILTIN_CUSTOM_FNIF, &custom_fnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnip, "__builtin_custom_fnip", NIOS2_BUILTIN_CUSTOM_FNIP, &custom_fnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfi, "__builtin_custom_fnfi", NIOS2_BUILTIN_CUSTOM_FNFI, &custom_fnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnff, "__builtin_custom_fnff", NIOS2_BUILTIN_CUSTOM_FNFF, &custom_fnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfp, "__builtin_custom_fnfp", NIOS2_BUILTIN_CUSTOM_FNFP, &custom_fnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpi, "__builtin_custom_fnpi", NIOS2_BUILTIN_CUSTOM_FNPI, &custom_fnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpf, "__builtin_custom_fnpf", NIOS2_BUILTIN_CUSTOM_FNPF, &custom_fnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpp, "__builtin_custom_fnpp", NIOS2_BUILTIN_CUSTOM_FNPP, &custom_fnpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pn, "__builtin_custom_pn", NIOS2_BUILTIN_CUSTOM_PN, &custom_pn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_pni, "__builtin_custom_pni", NIOS2_BUILTIN_CUSTOM_PNI, &custom_pni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnf, "__builtin_custom_pnf", NIOS2_BUILTIN_CUSTOM_PNF, &custom_pnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnp, "__builtin_custom_pnp", NIOS2_BUILTIN_CUSTOM_PNP, &custom_pnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnii, "__builtin_custom_pnii", NIOS2_BUILTIN_CUSTOM_PNII, &custom_pnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnif, "__builtin_custom_pnif", NIOS2_BUILTIN_CUSTOM_PNIF, &custom_pnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnip, "__builtin_custom_pnip", NIOS2_BUILTIN_CUSTOM_PNIP, &custom_pnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfi, "__builtin_custom_pnfi", NIOS2_BUILTIN_CUSTOM_PNFI, &custom_pnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnff, "__builtin_custom_pnff", NIOS2_BUILTIN_CUSTOM_PNFF, &custom_pnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfp, "__builtin_custom_pnfp", NIOS2_BUILTIN_CUSTOM_PNFP, &custom_pnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpi, "__builtin_custom_pnpi", NIOS2_BUILTIN_CUSTOM_PNPI, &custom_pnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpf, "__builtin_custom_pnpf", NIOS2_BUILTIN_CUSTOM_PNPF, &custom_pnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpp, "__builtin_custom_pnpp", NIOS2_BUILTIN_CUSTOM_PNPP, &custom_pnpp, nios2_expand_custom_XnXX},
++
++
++ {0, 0, 0, 0, 0},
++};
++
++/* This does not have a closing bracket on purpose (see use) */
++#define def_param(TYPE) \
++ tree_cons (NULL_TREE, TYPE,
++
++static void
++nios2_init_builtins ()
++{
++ const struct builtin_description *d;
++
++
++ endlink = void_list_node;
++
++ /* Special indenting here because one of the brackets is in def_param */
++ /* *INDENT-OFF* */
++
++ /* int fn (volatile const void *)
++ */
++ int_ftype_volatile_const_void_p
++ = build_function_type (integer_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))
++ endlink));
++
++
++ /* void fn (volatile void *, int)
++ */
++ void_ftype_volatile_void_p_int
++ = build_function_type (void_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_VOLATILE))
++ def_param (integer_type_node)
++ endlink)));
++
++ /* void fn (void)
++ */
++ void_ftype_void
++ = build_function_type (void_type_node,
++ endlink);
++
++ /* int fn (int)
++ */
++ int_ftype_int
++ = build_function_type (integer_type_node,
++ def_param (integer_type_node)
++ endlink));
++
++ /* void fn (int, int)
++ */
++ void_ftype_int_int
++ = build_function_type (void_type_node,
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink)));
++
++
++#define CUSTOM_NUM def_param (integer_type_node)
++
++ custom_n
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ni
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_nf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_np
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_nii
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nif
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nip
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_nfi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nff
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nfp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_npi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_npf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_npp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_in
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ini
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_inf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_inp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_inii
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inif
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inip
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_infi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inff
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_infp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_inpi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inpf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inpp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_fn
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_fni
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_fnf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_fnp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_fnii
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnif
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnip
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnfi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnff
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnfp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnpi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnpf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnpp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++ custom_pn
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_pni
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_pnf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_pnp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_pnii
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnif
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnip
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnfi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnff
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnfp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnpi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnpf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnpp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++
++ /* *INDENT-ON* */
++
++
++ for (d = bdesc; d->name; d++)
++ {
++ builtin_function (d->name, *d->type, d->code,
++ BUILT_IN_MD, NULL, NULL);
++ }
++}
++
++/* Expand an expression EXP that calls a built-in function,
++ with result going to TARGET if that's convenient
++ (and in mode MODE if that's convenient).
++ SUBTARGET may be used as the target for computing one of EXP's operands.
++ IGNORE is nonzero if the value is to be ignored. */
++
++static rtx
++nios2_expand_builtin (tree exp, rtx target, rtx subtarget,
++ enum machine_mode mode, int ignore)
++{
++ const struct builtin_description *d;
++ tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
++
++ for (d = bdesc; d->name; d++)
++ if (d->code == fcode)
++ return (d->expander) (d, exp, target, subtarget, mode, ignore);
++
++ /* we should have seen one of the functins we registered */
++ abort ();
++}
++
++static rtx nios2_create_target (const struct builtin_description *, rtx);
++
++
++static rtx
++nios2_create_target (const struct builtin_description *d, rtx target)
++{
++ if (!target
++ || !(*insn_data[d->icode].operand[0].predicate) (target,
++ insn_data[d->icode].operand[0].mode))
++ {
++ target = gen_reg_rtx (insn_data[d->icode].operand[0].mode);
++ }
++
++ return target;
++}
++
++
++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree);
++static rtx nios2_extract_operand (const struct builtin_description *, int, int, tree);
++
++static rtx
++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx opcode = expand_expr (arg, NULL_RTX, mode, 0);
++ opcode = protect_from_queue (opcode, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode))
++ error ("Custom instruction opcode must be compile time constant in the range 0-255 for %s", d->name);
++
++ return opcode;
++}
++
++static rtx
++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx operand = expand_expr (arg, NULL_RTX, mode, 0);
++ operand = protect_from_queue (operand, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ operand = copy_to_mode_reg (mode, operand);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ error ("Invalid argument %d to %s", argnum, d->name);
++
++ return operand;
++}
++
++
++static rtx
++nios2_expand_custom_n (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_n should have exactly one operand */
++ if (insn_data[d->icode].n_operands != 1)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++
++ pat = GEN_FCN (d->icode) (opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp,
++ rtx target, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_Xn should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ pat = GEN_FCN (d->icode) (target, opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nX (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++
++ /* custom_nX should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++ /* custom_Xn should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_nX should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_XnX should have exactly four operands */
++ if (insn_data[d->icode].n_operands != 4)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++
++static rtx
++nios2_expand_STXIO (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx store_dest, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ store_dest = protect_from_queue (store_dest, 0);
++
++ store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode))
++ error ("Invalid argument 1 to %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (store_dest, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++static rtx
++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx ld_src;
++ enum insn_code icode = d->icode;
++
++ /* loads should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ ld_src = protect_from_queue (ld_src, 0);
++
++ ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode))
++ {
++ error ("Invalid argument 1 to %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, ld_src);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++static rtx
++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ emit_insn (gen_sync ());
++ return 0;
++}
++
++static rtx
++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx rdctl_reg;
++ enum insn_code icode = d->icode;
++
++ /* rdctl should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ rdctl_reg = protect_from_queue (rdctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode))
++ {
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, rdctl_reg);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx wrctl_reg, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ wrctl_reg = protect_from_queue (wrctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode))
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (wrctl_reg, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++#include "gt-nios2.h"
++
+--- gcc-3.4.3/gcc/config/nios2/nios2.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.h
+@@ -0,0 +1,824 @@
++/* Definitions of target machine for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++
++#define TARGET_CPU_CPP_BUILTINS() \
++ do \
++ { \
++ builtin_define_std ("NIOS2"); \
++ builtin_define_std ("nios2"); \
++ builtin_define ("_GNU_SOURCE"); \
++ } \
++ while (0)
++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)")
++
++
++
++
++
++/*********************************
++ * Run-time Target Specification
++ *********************************/
++
++#define HAS_DIV_FLAG 0x0001
++#define HAS_MUL_FLAG 0x0002
++#define HAS_MULX_FLAG 0x0004
++#define FAST_SW_DIV_FLAG 0x0008
++#define INLINE_MEMCPY_FLAG 0x00010
++#define CACHE_VOLATILE_FLAG 0x0020
++#define BYPASS_CACHE_FLAG 0x0040
++
++extern int target_flags;
++#define TARGET_HAS_DIV (target_flags & HAS_DIV_FLAG)
++#define TARGET_HAS_MUL (target_flags & HAS_MUL_FLAG)
++#define TARGET_HAS_MULX (target_flags & HAS_MULX_FLAG)
++#define TARGET_FAST_SW_DIV (target_flags & FAST_SW_DIV_FLAG)
++#define TARGET_INLINE_MEMCPY (target_flags & INLINE_MEMCPY_FLAG)
++#define TARGET_CACHE_VOLATILE (target_flags & CACHE_VOLATILE_FLAG)
++#define TARGET_BYPASS_CACHE (target_flags & BYPASS_CACHE_FLAG)
++
++#define TARGET_SWITCHES \
++{ \
++ { "hw-div", HAS_DIV_FLAG, \
++ N_("Enable DIV, DIVU") }, \
++ { "no-hw-div", -HAS_DIV_FLAG, \
++ N_("Disable DIV, DIVU (default)") }, \
++ { "hw-mul", HAS_MUL_FLAG, \
++ N_("Enable MUL instructions (default)") }, \
++ { "hw-mulx", HAS_MULX_FLAG, \
++ N_("Enable MULX instructions, assume fast shifter") }, \
++ { "no-hw-mul", -HAS_MUL_FLAG, \
++ N_("Disable MUL instructions") }, \
++ { "no-hw-mulx", -HAS_MULX_FLAG, \
++ N_("Disable MULX instructions, assume slow shifter (default and implied by -mno-hw-mul)") }, \
++ { "fast-sw-div", FAST_SW_DIV_FLAG, \
++ N_("Use table based fast divide (default at -O3)") }, \
++ { "no-fast-sw-div", -FAST_SW_DIV_FLAG, \
++ N_("Don't use table based fast divide ever") }, \
++ { "inline-memcpy", INLINE_MEMCPY_FLAG, \
++ N_("Inline small memcpy (default when optimizing)") }, \
++ { "no-inline-memcpy", -INLINE_MEMCPY_FLAG, \
++ N_("Don't Inline small memcpy") }, \
++ { "cache-volatile", CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use non-io variants of instructions (default)") }, \
++ { "no-cache-volatile", -CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use io variants of instructions") }, \
++ { "bypass-cache", BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins use io variants") }, \
++ { "no-bypass-cache", -BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins do not use io variants (default)") }, \
++ { "smallc", 0, \
++ N_("Link with a limited version of the C library") }, \
++ { "ctors-in-init", 0, \
++ "" /* undocumented: N_("Link with static constructors and destructors in init") */ }, \
++ { "", TARGET_DEFAULT, 0 } \
++}
++
++
++extern const char *nios2_sys_nosys_string; /* for -msys=nosys */
++extern const char *nios2_sys_lib_string; /* for -msys-lib= */
++extern const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++#define TARGET_OPTIONS \
++{ \
++ { "sys=nosys", &nios2_sys_nosys_string, \
++ N_("Use stub versions of OS library calls (default)"), 0}, \
++ { "sys-lib=", &nios2_sys_lib_string, \
++ N_("Name of System Library to link against. (Converted to a -l option)"), 0}, \
++ { "sys-crt0=", &nios2_sys_crt0_string, \
++ N_("Name of the startfile. (default is a crt0 for the ISS only)"), 0}, \
++}
++
++
++/* Default target_flags if no switches specified. */
++#ifndef TARGET_DEFAULT
++# define TARGET_DEFAULT (HAS_MUL_FLAG | CACHE_VOLATILE_FLAG)
++#endif
++
++/* Switch Recognition by gcc.c. Add -G xx support */
++#undef SWITCH_TAKES_ARG
++#define SWITCH_TAKES_ARG(CHAR) \
++ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
++
++#define OVERRIDE_OPTIONS override_options ()
++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE)
++#define CAN_DEBUG_WITHOUT_FP
++
++#define CC1_SPEC "\
++%{G*}"
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
++ %{msys-lib=*: -l%*} \
++ %{!msys-lib=*: -lc } \
++ --end-group \
++ %{msys-lib=: %eYou need a library name for -msys-lib=} \
++"
++
++
++#undef STARTFILE_SPEC
++#define STARTFILE_SPEC \
++"%{msys-crt0=*: %*} %{!msys-crt0=*: crt1%O%s} \
++ %{msys-crt0=: %eYou need a C startup file for -msys-crt0=} \
++ %{mctors-in-init: crti%O%s crtbegin%O%s} \
++"
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{mctors-in-init: crtend%O%s crtn%O%s}"
++
++
++/***********************
++ * Storage Layout
++ ***********************/
++
++#define DEFAULT_SIGNED_CHAR 1
++#define BITS_BIG_ENDIAN 0
++#define BYTES_BIG_ENDIAN 0
++#define WORDS_BIG_ENDIAN 0
++#define BITS_PER_UNIT 8
++#define BITS_PER_WORD 32
++#define UNITS_PER_WORD 4
++#define POINTER_SIZE 32
++#define BIGGEST_ALIGNMENT 32
++#define STRICT_ALIGNMENT 1
++#define FUNCTION_BOUNDARY 32
++#define PARM_BOUNDARY 32
++#define STACK_BOUNDARY 32
++#define PREFERRED_STACK_BOUNDARY 32
++#define MAX_FIXED_MODE_SIZE 64
++
++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
++ ((TREE_CODE (EXP) == STRING_CST) \
++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
++
++
++/**********************
++ * Layout of Source Language Data Types
++ **********************/
++
++#define INT_TYPE_SIZE 32
++#define SHORT_TYPE_SIZE 16
++#define LONG_TYPE_SIZE 32
++#define LONG_LONG_TYPE_SIZE 64
++#define FLOAT_TYPE_SIZE 32
++#define DOUBLE_TYPE_SIZE 64
++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
++
++
++/*************************
++ * Condition Code Status
++ ************************/
++
++/* comparison type */
++/* ??? currently only CMP_SI is used */
++enum cmp_type {
++ CMP_SI, /* compare four byte integers */
++ CMP_DI, /* compare eight byte integers */
++ CMP_SF, /* compare single precision floats */
++ CMP_DF, /* compare double precision floats */
++ CMP_MAX /* max comparison type */
++};
++
++extern GTY(()) rtx branch_cmp[2]; /* operands for compare */
++extern enum cmp_type branch_type; /* what type of branch to use */
++
++/**********************
++ * Register Usage
++ **********************/
++
++/* ---------------------------------- *
++ * Basic Characteristics of Registers
++ * ---------------------------------- */
++
++/*
++Register Number
++ Register Name
++ Alternate Name
++ Purpose
++0 r0 zero always zero
++1 r1 at Assembler Temporary
++2-3 r2-r3 Return Location
++4-7 r4-r7 Register Arguments
++8-15 r8-r15 Caller Saved Registers
++16-22 r16-r22 Callee Saved Registers
++23 r23 sc Static Chain (Callee Saved)
++ ??? Does $sc want to be caller or callee
++ saved. If caller, 15, else 23.
++24 r24 Exception Temporary
++25 r25 Breakpoint Temporary
++26 r26 gp Global Pointer
++27 r27 sp Stack Pointer
++28 r28 fp Frame Pointer
++29 r29 ea Exception Return Address
++30 r30 ba Breakpoint Return Address
++31 r31 ra Return Address
++
++32 ctl0 status
++33 ctl1 estatus STATUS saved by exception ?
++34 ctl2 bstatus STATUS saved by break ?
++35 ctl3 ipri Interrupt Priority Mask ?
++36 ctl4 ecause Exception Cause ?
++
++37 pc Not an actual register
++
++38 rap Return address pointer, this does not
++ actually exist and will be eliminated
++
++39 fake_fp Fake Frame Pointer which will always be eliminated.
++40 fake_ap Fake Argument Pointer which will always be eliminated.
++
++41 First Pseudo Register
++
++
++The definitions for all the hard register numbers
++are located in nios2.md.
++*/
++
++#define FIRST_PSEUDO_REGISTER 41
++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1)
++
++
++
++/* also see CONDITIONAL_REGISTER_USAGE */
++#define FIXED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++/* call used is the same as caller saved
++ + fixed regs + args + ret vals */
++#define CALL_USED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 10 */ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++#define HARD_REGNO_NREGS(REGNO, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++/* --------------------------- *
++ * How Values Fit in Registers
++ * --------------------------- */
++
++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
++
++#define MODES_TIEABLE_P(MODE1, MODE2) 1
++
++
++/*************************
++ * Register Classes
++ *************************/
++
++enum reg_class
++{
++ NO_REGS,
++ ALL_REGS,
++ LIM_REG_CLASSES
++};
++
++#define N_REG_CLASSES (int) LIM_REG_CLASSES
++
++#define REG_CLASS_NAMES \
++ {"NO_REGS", \
++ "ALL_REGS"}
++
++#define GENERAL_REGS ALL_REGS
++
++#define REG_CLASS_CONTENTS \
++/* NO_REGS */ {{ 0, 0}, \
++/* ALL_REGS */ {~0,~0}} \
++
++#define REGNO_REG_CLASS(REGNO) ALL_REGS
++
++#define BASE_REG_CLASS ALL_REGS
++#define INDEX_REG_CLASS ALL_REGS
++
++/* only one reg class, 'r', is handled automatically */
++#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS
++
++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \
++ ((STRICT) \
++ ? (REGNO) < FIRST_PSEUDO_REGISTER \
++ : (REGNO) < FIRST_PSEUDO_REGISTER || (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
++
++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT))
++
++#define REGNO_OK_FOR_BASE_P(REGNO) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, 1))
++
++#define REGNO_OK_FOR_INDEX_P(REGNO) \
++ (REGNO_OK_FOR_INDEX_P2 (REGNO, 1))
++
++#define REG_OK_FOR_BASE_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define REG_OK_FOR_INDEX_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define CLASS_MAX_NREGS(CLASS, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++
++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000)
++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000)
++#define UPPER16_INT(X) (((X) & 0xffff) == 0)
++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31)
++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31)
++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255)
++
++#define CONST_OK_FOR_LETTER_P(VALUE, C) \
++ ( \
++ (C) == 'I' ? SMALL_INT (VALUE) : \
++ (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) : \
++ (C) == 'K' ? UPPER16_INT (VALUE) : \
++ (C) == 'L' ? SHIFT_INT (VALUE) : \
++ (C) == 'M' ? (VALUE) == 0 : \
++ (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) : \
++ (C) == 'O' ? RDWRCTL_INT (VALUE) : \
++ 0)
++
++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
++
++#define PREFERRED_RELOAD_CLASS(X, CLASS) \
++ ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS))
++
++/* 'S' matches immediates which are in small data
++ and therefore can be added to gp to create a
++ 32-bit value. */
++#define EXTRA_CONSTRAINT(VALUE, C) \
++ ((C) == 'S' \
++ && (GET_CODE (VALUE) == SYMBOL_REF) \
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE))
++
++
++
++
++/* Say that the epilogue uses the return address register. Note that
++ in the case of sibcalls, the values "used by the epilogue" are
++ considered live at the start of the called function. */
++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO)
++
++
++#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
++
++/**********************************
++ * Trampolines for Nested Functions
++ ***********************************/
++
++#define TRAMPOLINE_TEMPLATE(FILE) \
++ error ("trampolines not yet implemented")
++#define TRAMPOLINE_SIZE 20
++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
++ error ("trampolines not yet implemented")
++
++/***************************
++ * Stack Layout and Calling Conventions
++ ***************************/
++
++/* ------------------ *
++ * Basic Stack Layout
++ * ------------------ */
++
++/* The downward variants are used by the compiler,
++ the upward ones serve as documentation */
++#define STACK_GROWS_DOWNWARD
++#define FRAME_GROWS_UPWARD
++#define ARGS_GROW_UPWARD
++
++#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
++#define FIRST_PARM_OFFSET(FUNDECL) 0
++
++/* Before the prologue, RA lives in r31. */
++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO)
++
++/* -------------------------------------- *
++ * Registers That Address the Stack Frame
++ * -------------------------------------- */
++
++#define STACK_POINTER_REGNUM SP_REGNO
++#define STATIC_CHAIN_REGNUM SC_REGNO
++#define PC_REGNUM PC_REGNO
++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO
++
++/* Base register for access to local variables of the function. We
++ pretend that the frame pointer is a non-existent hard register, and
++ then eliminate it to HARD_FRAME_POINTER_REGNUM. */
++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO
++
++#define HARD_FRAME_POINTER_REGNUM FP_REGNO
++#define RETURN_ADDRESS_POINTER_REGNUM RAP_REGNO
++/* the argumnet pointer needs to always be eliminated
++ so it is set to a fake hard register. */
++#define ARG_POINTER_REGNUM FAKE_AP_REGNO
++
++/* ----------------------------------------- *
++ * Eliminating Frame Pointer and Arg Pointer
++ * ----------------------------------------- */
++
++#define FRAME_POINTER_REQUIRED 0
++
++#define ELIMINABLE_REGS \
++{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
++
++#define CAN_ELIMINATE(FROM, TO) 1
++
++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
++ (OFFSET) = nios2_initial_elimination_offset ((FROM), (TO))
++
++#define MUST_SAVE_REGISTER(regno) \
++ ((regs_ever_live[regno] && !call_used_regs[regno]) \
++ || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \
++ || (regno == RA_REGNO && regs_ever_live[RA_REGNO]))
++
++/* Treat LOC as a byte offset from the stack pointer and round it up
++ to the next fully-aligned offset. */
++#define STACK_ALIGN(LOC) \
++ (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & ~((PREFERRED_STACK_BOUNDARY / 8) - 1))
++
++
++/* ------------------------------ *
++ * Passing Arguments in Registers
++ * ------------------------------ */
++
++/* see nios2.c */
++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
++ (function_arg (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
++ (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
++
++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
++
++typedef struct nios2_args
++{
++ int regs_used;
++} CUMULATIVE_ARGS;
++
++/* This is to initialize the above unused CUM data type */
++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
++ (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS))
++
++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
++ (function_arg_advance (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_REGNO_P(REGNO) \
++ ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO)
++
++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
++ { \
++ int pret_size = nios2_setup_incoming_varargs (&(CUM), (MODE), \
++ (TYPE), (NO_RTL)); \
++ if (pret_size) \
++ (PRETEND_SIZE) = pret_size; \
++ }
++
++/* ----------------------------- *
++ * Generating Code for Profiling
++ * ----------------------------- */
++
++#define PROFILE_BEFORE_PROLOGUE
++
++#define FUNCTION_PROFILER(FILE, LABELNO) \
++ function_profiler ((FILE), (LABELNO))
++
++/* --------------------------------------- *
++ * Passing Function Arguments on the Stack
++ * --------------------------------------- */
++
++#define PROMOTE_PROTOTYPES 1
++
++#define PUSH_ARGS 0
++#define ACCUMULATE_OUTGOING_ARGS 1
++
++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0
++
++/* --------------------------------------- *
++ * How Scalar Function Values Are Returned
++ * --------------------------------------- */
++
++#define FUNCTION_VALUE(VALTYPE, FUNC) \
++ gen_rtx(REG, TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO)
++
++#define LIBCALL_VALUE(MODE) \
++ gen_rtx(REG, MODE, FIRST_RETVAL_REGNO)
++
++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO)
++
++/* ----------------------------- *
++ * How Large Values Are Returned
++ * ----------------------------- */
++
++
++#define RETURN_IN_MEMORY(TYPE) \
++ nios2_return_in_memory (TYPE)
++
++
++#define STRUCT_VALUE 0
++
++#define DEFAULT_PCC_STRUCT_RETURN 0
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++
++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
++
++#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
++
++#define MAX_REGS_PER_ADDRESS 1
++
++/* Go to ADDR if X is a valid address. */
++#ifndef REG_OK_STRICT
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 0)) \
++ goto ADDR; \
++ }
++#else
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 1)) \
++ goto ADDR; \
++ }
++#endif
++
++#ifndef REG_OK_STRICT
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 0)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0)
++#else
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)
++#endif
++
++#define LEGITIMATE_CONSTANT_P(X) 1
++
++/* Nios II has no mode dependent addresses. */
++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
++
++/* Set if this has a weak declaration */
++#define SYMBOL_FLAG_WEAK_DECL (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
++#define SYMBOL_REF_WEAK_DECL_P(RTX) \
++ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0)
++
++
++/* true if a symbol is both small and not weak. In this case, gp
++ relative access can be used */
++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \
++ (SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX))
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++#define SLOW_BYTE_ACCESS 1
++
++/* It is as good to call a constant function address as to call an address
++ kept in a register.
++ ??? Not true anymore really. Now that call cannot address full range
++ of memory callr may need to be used */
++
++#define NO_FUNCTION_CSE
++#define NO_RECURSIVE_FUNCTION_CSE
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* ------------------------------------------ *
++ * The Overall Framework of an Assembler File
++ * ------------------------------------------ */
++
++#define ASM_APP_ON "#APP\n"
++#define ASM_APP_OFF "#NO_APP\n"
++
++#define ASM_COMMENT_START "# "
++
++/* ------------------------------- *
++ * Output and Generation of Labels
++ * ------------------------------- */
++
++#define GLOBAL_ASM_OP "\t.global\t"
++
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++#define DWARF2_UNWIND_INFO 0
++
++
++/* -------------------------------- *
++ * Assembler Commands for Alignment
++ * -------------------------------- */
++
++#define ASM_OUTPUT_ALIGN(FILE, LOG) \
++ do { \
++ fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \
++ } while (0)
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++#define REGISTER_NAMES \
++{ \
++ "zero", \
++ "at", \
++ "r2", \
++ "r3", \
++ "r4", \
++ "r5", \
++ "r6", \
++ "r7", \
++ "r8", \
++ "r9", \
++ "r10", \
++ "r11", \
++ "r12", \
++ "r13", \
++ "r14", \
++ "r15", \
++ "r16", \
++ "r17", \
++ "r18", \
++ "r19", \
++ "r20", \
++ "r21", \
++ "r22", \
++ "r23", \
++ "r24", \
++ "r25", \
++ "gp", \
++ "sp", \
++ "fp", \
++ "ta", \
++ "ba", \
++ "ra", \
++ "status", \
++ "estatus", \
++ "bstatus", \
++ "ipri", \
++ "ecause", \
++ "pc", \
++ "rap", \
++ "fake_fp", \
++ "fake_ap", \
++}
++
++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\
++ (PTR) = asm_output_opcode (STREAM, PTR)
++
++#define PRINT_OPERAND(STREAM, X, CODE) \
++ nios2_print_operand (STREAM, X, CODE)
++
++#define PRINT_OPERAND_ADDRESS(STREAM, X) \
++ nios2_print_operand_address (STREAM, X)
++
++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
++ fprintf (FILE, ".L%u\n", (unsigned) (VALUE)); \
++ } while (0)
++
++
++/* ------------ *
++ * Label Output
++ * ------------ */
++
++
++/* ---------------------------------------------------- *
++ * Dividing the Output into Sections (Texts, Data, ...)
++ * ---------------------------------------------------- */
++
++/* Output before read-only data. */
++#define TEXT_SECTION_ASM_OP ("\t.section\t.text")
++
++/* Output before writable data. */
++#define DATA_SECTION_ASM_OP ("\t.section\t.data")
++
++
++/* Default the definition of "small data" to 8 bytes. */
++/* ??? How come I can't use HOST_WIDE_INT here? */
++extern unsigned long nios2_section_threshold;
++#define NIOS2_DEFAULT_GVALUE 8
++
++
++
++/* This says how to output assembler code to declare an
++ uninitialized external linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef COMMON_ASM_OP
++#define COMMON_ASM_OP "\t.comm\t"
++
++#undef ASM_OUTPUT_ALIGNED_COMMON
++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
++do \
++{ \
++ if ((SIZE) <= nios2_section_threshold) \
++ { \
++ named_section (0, ".sbss", 0); \
++ (*targetm.asm_out.globalize_label) (FILE, NAME); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++ } \
++ else \
++ { \
++ fprintf ((FILE), "%s", COMMON_ASM_OP); \
++ assemble_name ((FILE), (NAME)); \
++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
++ } \
++} \
++while (0)
++
++
++/* This says how to output assembler code to declare an
++ uninitialized internal linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef ASM_OUTPUT_ALIGNED_LOCAL
++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
++do { \
++ if ((SIZE) <= nios2_section_threshold) \
++ named_section (0, ".sbss", 0); \
++ else \
++ named_section (0, ".bss", 0); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++} while (0)
++
++
++
++/***************************
++ * Miscellaneous Parameters
++ ***************************/
++
++#define MOVE_MAX 4
++
++#define Pmode SImode
++#define FUNCTION_MODE QImode
++
++#define CASE_VECTOR_MODE Pmode
++
++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
++
++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND)
++
++#define WORD_REGISTER_OPERATIONS
+--- gcc-3.4.3/gcc/config/nios2/nios2.md
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.md
+@@ -0,0 +1,2078 @@
++;; Machine Description for Altera NIOS 2G NIOS2 version.
++;; Copyright (C) 2003 Altera
++;; Contributed by Jonah Graham (jgraham@altera.com).
++;;
++;; This file is part of GNU CC.
++;;
++;; GNU CC 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 2, or (at your option)
++;; any later version.
++;;
++;; GNU CC 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 GNU CC; see the file COPYING. If not, write to
++;; the Free Software Foundation, 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA. */
++
++
++
++;*****************************************************************************
++;*
++;* constants
++;*
++;*****************************************************************************
++(define_constants [
++ (GP_REGNO 26)
++ (SP_REGNO 27)
++ (FP_REGNO 28)
++ (RA_REGNO 31)
++ (RAP_REGNO 38)
++ (FIRST_RETVAL_REGNO 2)
++ (LAST_RETVAL_REGNO 3)
++ (FIRST_ARG_REGNO 4)
++ (LAST_ARG_REGNO 7)
++ (SC_REGNO 23)
++ (PC_REGNO 37)
++ (FAKE_FP_REGNO 39)
++ (FAKE_AP_REGNO 40)
++
++
++ (UNSPEC_BLOCKAGE 0)
++ (UNSPEC_LDBIO 1)
++ (UNSPEC_LDBUIO 2)
++ (UNSPEC_LDHIO 3)
++ (UNSPEC_LDHUIO 4)
++ (UNSPEC_LDWIO 5)
++ (UNSPEC_STBIO 6)
++ (UNSPEC_STHIO 7)
++ (UNSPEC_STWIO 8)
++ (UNSPEC_SYNC 9)
++ (UNSPEC_WRCTL 10)
++ (UNSPEC_RDCTL 11)
++
++])
++
++
++
++;*****************************************************************************
++;*
++;* instruction scheduler
++;*
++;*****************************************************************************
++
++; No schedule info is currently available, using an assumption that no
++; instruction can use the results of the previous instruction without
++; incuring a stall.
++
++; length of an instruction (in bytes)
++(define_attr "length" "" (const_int 4))
++(define_attr "type" "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" (const_string "complex"))
++
++(define_asm_attributes
++ [(set_attr "length" "4")
++ (set_attr "type" "complex")])
++
++(define_automaton "nios2")
++(automata_option "v")
++;(automata_option "no-minimization")
++(automata_option "ndfa")
++
++; The nios2 pipeline is fairly straightforward for the fast model.
++; Every alu operation is pipelined so that an instruction can
++; be issued every cycle. However, there are still potential
++; stalls which this description tries to deal with.
++
++(define_cpu_unit "cpu" "nios2")
++
++(define_insn_reservation "complex" 1
++ (eq_attr "type" "complex")
++ "cpu")
++
++(define_insn_reservation "control" 1
++ (eq_attr "type" "control")
++ "cpu")
++
++(define_insn_reservation "alu" 1
++ (eq_attr "type" "alu")
++ "cpu")
++
++(define_insn_reservation "cond_alu" 1
++ (eq_attr "type" "cond_alu")
++ "cpu")
++
++(define_insn_reservation "st" 1
++ (eq_attr "type" "st")
++ "cpu")
++
++(define_insn_reservation "custom" 1
++ (eq_attr "type" "custom")
++ "cpu")
++
++; shifts, muls and lds have three cycle latency
++(define_insn_reservation "ld" 3
++ (eq_attr "type" "ld")
++ "cpu")
++
++(define_insn_reservation "shift" 3
++ (eq_attr "type" "shift")
++ "cpu")
++
++(define_insn_reservation "mul" 3
++ (eq_attr "type" "mul")
++ "cpu")
++
++(define_insn_reservation "div" 1
++ (eq_attr "type" "div")
++ "cpu")
++
++
++;*****************************************************************************
++;*
++;* MOV Instructions
++;*
++;*****************************************************************************
++
++(define_expand "movqi"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "")
++ (match_operand:QI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, QImode))
++ DONE;
++})
++
++(define_insn "movqi_internal"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r")
++ (match_operand:QI 1 "general_operand" "rM,m,rM,I"))]
++ "(register_operand (operands[0], QImode)
++ || register_operand (operands[1], QImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stb%o0\\t%z1, %0
++ ldbu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu")])
++
++(define_insn "ldbio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldbuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stbio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)]
++ ""
++ "stbio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++(define_expand "movhi"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "")
++ (match_operand:HI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, HImode))
++ DONE;
++})
++
++(define_insn "movhi_internal"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r")
++ (match_operand:HI 1 "general_operand" "rM,m,rM,I,J"))]
++ "(register_operand (operands[0], HImode)
++ || register_operand (operands[1], HImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ sth%o0\\t%z1, %0
++ ldhu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu,alu")])
++
++(define_insn "ldhio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldhuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "sthio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)]
++ ""
++ "sthio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++(define_expand "movsi"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "")
++ (match_operand:SI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, SImode))
++ DONE;
++})
++
++(define_insn "movsi_internal"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r")
++ (match_operand:SI 1 "general_operand" "rM,m,rM,I,J,S,i"))]
++ "(register_operand (operands[0], SImode)
++ || register_operand (operands[1], SImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stw%o0\\t%z1, %0
++ ldw%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1
++ addi\\t%0, gp, %%gprel(%1)
++ movhi\\t%0, %H1\;addi\\t%0, %0, %L1"
++ [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")])
++
++(define_insn "ldwio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldwio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stwio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)]
++ ""
++ "stwio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++
++;*****************************************************************************
++;*
++;* zero extension
++;*
++;*****************************************************************************
++
++
++(define_insn "zero_extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xffff
++ ldhu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "=r,r")
++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++
++
++;*****************************************************************************
++;*
++;* sign extension
++;*
++;*****************************************************************************
++
++(define_expand "extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (16);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendhisi2_internal"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
++ ""
++ "ldh%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_expand "extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "")
++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op0 = gen_lowpart (SImode, operands[0]);
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (op0, temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqihi2_internal"
++ [(set (match_operand:HI 0 "register_operand" "=r")
++ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++(define_expand "extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqisi2_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++
++;*****************************************************************************
++;*
++;* Arithmetic Operations
++;*
++;*****************************************************************************
++
++(define_insn "addsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ ""
++ "add%i2\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "subsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++ "sub\\t%0, %z1, %2"
++ [(set_attr "type" "alu")])
++
++(define_insn "mulsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (mult:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ "TARGET_HAS_MUL"
++ "mul%i2\\t%0, %1, %z2"
++ [(set_attr "type" "mul")])
++
++(define_expand "divsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++{
++ if (!TARGET_HAS_DIV)
++ {
++ if (!TARGET_FAST_SW_DIV)
++ FAIL;
++ else
++ {
++ if (nios2_emit_expensive_div (operands, SImode))
++ DONE;
++ }
++ }
++})
++
++(define_insn "divsi3_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "div\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "udivsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (udiv:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "divu\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "smulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxss\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++(define_insn "umulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxuu\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++
++(define_expand "mulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
++ (sign_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++(define_expand "umulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
++ (zero_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++
++
++;*****************************************************************************
++;*
++;* Negate and ones complement
++;*
++;*****************************************************************************
++
++(define_insn "negsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (neg:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "sub\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++(define_insn "one_cmplsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (not:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "nor\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++
++
++; Logical Operantions
++
++(define_insn "andsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (and:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ and\\t%0, %1, %z2
++ and%i2\\t%0, %1, %2
++ andh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "iorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (ior:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ or\\t%0, %1, %z2
++ or%i2\\t%0, %1, %2
++ orh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "*norsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (and:SI (not:SI (match_operand:SI 1 "register_operand" "%r"))
++ (not:SI (match_operand:SI 2 "reg_or_0_operand" "rM"))))]
++ ""
++ "nor\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "xorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (xor:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ xor\\t%0, %1, %z2
++ xor%i2\\t%0, %1, %2
++ xorh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++
++
++;*****************************************************************************
++;*
++;* Shifts
++;*
++;*****************************************************************************
++
++(define_insn "ashlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashift:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sll%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "ashrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sra%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "lshrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "srl%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotate:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "rol%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotatert:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "register_operand" "r,r")))]
++ ""
++ "ror\\t%0, %1, %2"
++ [(set_attr "type" "shift")])
++
++(define_insn "*shift_mul_constants"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ashift:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "const_int_operand" "I"))
++ (match_operand:SI 3 "const_int_operand" "I")))]
++ "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))"
++{
++ HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]);
++ rtx ops[3];
++
++ ops[0] = operands[0];
++ ops[1] = operands[1];
++ ops[2] = GEN_INT (mul);
++
++ output_asm_insn ("muli\t%0, %1, %2", ops);
++ return "";
++}
++ [(set_attr "type" "mul")])
++
++
++
++
++;*****************************************************************************
++;*
++;* Prologue, Epilogue and Return
++;*
++;*****************************************************************************
++
++(define_expand "prologue"
++ [(const_int 1)]
++ ""
++{
++ expand_prologue ();
++ DONE;
++})
++
++(define_expand "epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (false);
++ DONE;
++})
++
++(define_expand "sibcall_epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (true);
++ DONE;
++})
++
++(define_insn "return"
++ [(return)]
++ "reload_completed && nios2_can_use_return_insn ()"
++ "ret\\t"
++)
++
++(define_insn "return_from_epilogue"
++ [(use (match_operand 0 "pmode_register_operand" ""))
++ (return)]
++ "reload_completed"
++ "ret\\t"
++)
++
++;; Block any insns from being moved before this point, since the
++;; profiling call to mcount can use various registers that aren't
++;; saved or used to pass arguments.
++
++(define_insn "blockage"
++ [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)]
++ ""
++ ""
++ [(set_attr "type" "unknown")
++ (set_attr "length" "0")])
++
++
++
++;*****************************************************************************
++;*
++;* Jumps and Calls
++;*
++;*****************************************************************************
++
++(define_insn "indirect_jump"
++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "jump"
++ [(set (pc)
++ (label_ref (match_operand 0 "" "")))]
++ ""
++ "br\\t%0"
++ [(set_attr "type" "control")])
++
++
++(define_insn "indirect_call"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "indirect_call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%1"
++)
++
++(define_expand "call"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_expand "call_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_insn "*call"
++ [(call (mem:QI (match_operand:SI 0 "immediate_operand" "i"))
++ (match_operand 1 "" ""))
++ (clobber (match_operand:SI 2 "register_operand" "=r"))]
++ ""
++ "call\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "*call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "immediate_operand" "i"))
++ (match_operand 2 "" "")))
++ (clobber (match_operand:SI 3 "register_operand" "=r"))]
++ ""
++ "call\\t%1"
++ [(set_attr "type" "control")])
++
++(define_expand "sibcall"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))])]
++ ""
++ {
++ XEXP (operands[0], 0) = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
++
++ if (operands[2] == NULL_RTX)
++ operands[2] = const0_rtx;
++ }
++)
++
++(define_expand "sibcall_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))])]
++ ""
++ {
++ XEXP (operands[1], 0) = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
++
++ if (operands[3] == NULL_RTX)
++ operands[3] = const0_rtx;
++ }
++)
++
++(define_insn "sibcall_insn"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))]
++ ""
++ "jmp\\t%0"
++)
++
++(define_insn "sibcall_value_insn"
++ [(set (match_operand 0 "register_operand" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))]
++ ""
++ "jmp\\t%1"
++)
++
++
++
++
++(define_expand "tablejump"
++ [(parallel [(set (pc) (match_operand 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))])]
++ ""
++ ""
++)
++
++(define_insn "*tablejump"
++ [(set (pc)
++ (match_operand:SI 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Comparisons
++;*
++;*****************************************************************************
++;; Flow here is rather complex (based on MIPS):
++;;
++;; 1) The cmp{si,di,sf,df} routine is called. It deposits the
++;; arguments into the branch_cmp array, and the type into
++;; branch_type. No RTL is generated.
++;;
++;; 2) The appropriate branch define_expand is called, which then
++;; creates the appropriate RTL for the comparison and branch.
++;; Different CC modes are used, based on what type of branch is
++;; done, so that we can constrain things appropriately. There
++;; are assumptions in the rest of GCC that break if we fold the
++;; operands into the branchs for integer operations, and use cc0
++;; for floating point, so we use the fp status register instead.
++;; If needed, an appropriate temporary is created to hold the
++;; of the integer compare.
++
++(define_expand "cmpsi"
++ [(set (cc0)
++ (compare:CC (match_operand:SI 0 "register_operand" "")
++ (match_operand:SI 1 "arith_operand" "")))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = operands[1];
++ branch_type = CMP_SI;
++ DONE;
++})
++
++(define_expand "tstsi"
++ [(set (cc0)
++ (match_operand:SI 0 "register_operand" ""))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = const0_rtx;
++ branch_type = CMP_SI;
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* setting a register from a comparison
++;*
++;*****************************************************************************
++
++(define_expand "seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpeq%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpne%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmplt\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpge%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpge\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmplt%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpltu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpgeu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpgeu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpltu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++
++
++;*****************************************************************************
++;*
++;* branches
++;*
++;*****************************************************************************
++
++(define_insn "*cbranch"
++ [(set (pc)
++ (if_then_else
++ (match_operator:SI 0 "comparison_operator"
++ [(match_operand:SI 2 "reg_or_0_operand" "rM")
++ (match_operand:SI 3 "reg_or_0_operand" "rM")])
++ (label_ref (match_operand 1 "" ""))
++ (pc)))]
++ ""
++ "b%0\\t%z2, %z3, %l1"
++ [(set_attr "type" "control")])
++
++
++(define_expand "beq"
++ [(set (pc)
++ (if_then_else (eq:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bne"
++ [(set (pc)
++ (if_then_else (ne:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgt"
++ [(set (pc)
++ (if_then_else (gt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bge"
++ [(set (pc)
++ (if_then_else (ge:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "ble"
++ [(set (pc)
++ (if_then_else (le:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "blt"
++ [(set (pc)
++ (if_then_else (lt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgtu"
++ [(set (pc)
++ (if_then_else (gtu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bgeu"
++ [(set (pc)
++ (if_then_else (geu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bleu"
++ [(set (pc)
++ (if_then_else (leu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bltu"
++ [(set (pc)
++ (if_then_else (ltu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* String and Block Operations
++;*
++;*****************************************************************************
++
++; ??? This is all really a hack to get Dhrystone to work as fast as possible
++; things to be fixed:
++; * let the compiler core handle all of this, for that to work the extra
++; aliasing needs to be addressed.
++; * we use three temporary registers for loading and storing to ensure no
++; ld use stalls, this is excessive, because after the first ld/st only
++; two are needed. Only two would be needed all the way through if
++; we could schedule with other code. Consider:
++; 1 ld $1, 0($src)
++; 2 ld $2, 4($src)
++; 3 ld $3, 8($src)
++; 4 st $1, 0($dest)
++; 5 ld $1, 12($src)
++; 6 st $2, 4($src)
++; 7 etc.
++; The first store has to wait until 4. If it does not there will be one
++; cycle of stalling. However, if any other instruction could be placed
++; between 1 and 4, $3 would not be needed.
++; * In small we probably don't want to ever do this ourself because there
++; is no ld use stall.
++
++(define_expand "movstrsi"
++ [(parallel [(set (match_operand:BLK 0 "general_operand" "")
++ (match_operand:BLK 1 "general_operand" ""))
++ (use (match_operand:SI 2 "const_int_operand" ""))
++ (use (match_operand:SI 3 "const_int_operand" ""))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))])]
++ "TARGET_INLINE_MEMCPY"
++{
++ rtx ld_addr_reg, st_addr_reg;
++
++ /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr
++ it trys to copy to a register, but does not re-try the predicate.
++ ??? Intead of fixing expr.c, I fix it here. */
++ if (!const_int_operand (operands[2], SImode))
++ FAIL;
++
++ /* ??? there are some magic numbers which need to be sorted out here.
++ the basis for them is not increasing code size hugely or going
++ out of range of offset addressing */
++ if (INTVAL (operands[3]) < 4)
++ FAIL;
++ if (!optimize
++ || (optimize_size && INTVAL (operands[2]) > 12)
++ || (optimize < 3 && INTVAL (operands[2]) > 100)
++ || INTVAL (operands[2]) > 200)
++ FAIL;
++
++ st_addr_reg
++ = replace_equiv_address (operands[0],
++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
++ ld_addr_reg
++ = replace_equiv_address (operands[1],
++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
++ emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg,
++ operands[2], operands[3]));
++
++ DONE;
++})
++
++
++(define_insn "movstrsi_internal"
++ [(set (match_operand:BLK 0 "memory_operand" "=o")
++ (match_operand:BLK 1 "memory_operand" "o"))
++ (use (match_operand:SI 2 "const_int_operand" "i"))
++ (use (match_operand:SI 3 "const_int_operand" "i"))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))]
++ "TARGET_INLINE_MEMCPY"
++{
++ int ld_offset = INTVAL (operands[2]);
++ int ld_len = INTVAL (operands[2]);
++ int ld_reg = 0;
++ rtx ld_addr_reg = XEXP (operands[1], 0);
++ int st_offset = INTVAL (operands[2]);
++ int st_len = INTVAL (operands[2]);
++ int st_reg = 0;
++ rtx st_addr_reg = XEXP (operands[0], 0);
++ int delay_count = 0;
++
++ /* ops[0] is the address used by the insn
++ ops[1] is the register being loaded or stored */
++ rtx ops[2];
++
++ if (INTVAL (operands[3]) < 4)
++ abort ();
++
++ while (ld_offset >= 4)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldw\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 4;
++ delay_count++;
++ }
++
++ if (ld_offset >= 2)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldh\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 2;
++ delay_count++;
++ }
++
++ if (ld_offset >= 1)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldb\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 1;
++ delay_count++;
++ }
++
++ while (st_offset >= 4)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ while (st_offset >= 2)
++ {
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("sth\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 2;
++ }
++
++ while (st_offset >= 1)
++ {
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stb\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 1;
++ }
++
++ return "";
++}
++; ??? lengths are not being used yet, but I will probably forget
++; to update this once I am using lengths, so set it to something
++; definetely big enough to cover it. 400 allows for 200 bytes
++; of motion.
++ [(set_attr "length" "400")])
++
++
++
++;*****************************************************************************
++;*
++;* Custom instructions
++;*
++;*****************************************************************************
++
++(define_constants [
++ (CUSTOM_N 100)
++ (CUSTOM_NI 101)
++ (CUSTOM_NF 102)
++ (CUSTOM_NP 103)
++ (CUSTOM_NII 104)
++ (CUSTOM_NIF 105)
++ (CUSTOM_NIP 106)
++ (CUSTOM_NFI 107)
++ (CUSTOM_NFF 108)
++ (CUSTOM_NFP 109)
++ (CUSTOM_NPI 110)
++ (CUSTOM_NPF 111)
++ (CUSTOM_NPP 112)
++ (CUSTOM_IN 113)
++ (CUSTOM_INI 114)
++ (CUSTOM_INF 115)
++ (CUSTOM_INP 116)
++ (CUSTOM_INII 117)
++ (CUSTOM_INIF 118)
++ (CUSTOM_INIP 119)
++ (CUSTOM_INFI 120)
++ (CUSTOM_INFF 121)
++ (CUSTOM_INFP 122)
++ (CUSTOM_INPI 123)
++ (CUSTOM_INPF 124)
++ (CUSTOM_INPP 125)
++ (CUSTOM_FN 126)
++ (CUSTOM_FNI 127)
++ (CUSTOM_FNF 128)
++ (CUSTOM_FNP 129)
++ (CUSTOM_FNII 130)
++ (CUSTOM_FNIF 131)
++ (CUSTOM_FNIP 132)
++ (CUSTOM_FNFI 133)
++ (CUSTOM_FNFF 134)
++ (CUSTOM_FNFP 135)
++ (CUSTOM_FNPI 136)
++ (CUSTOM_FNPF 137)
++ (CUSTOM_FNPP 138)
++ (CUSTOM_PN 139)
++ (CUSTOM_PNI 140)
++ (CUSTOM_PNF 141)
++ (CUSTOM_PNP 142)
++ (CUSTOM_PNII 143)
++ (CUSTOM_PNIF 144)
++ (CUSTOM_PNIP 145)
++ (CUSTOM_PNFI 146)
++ (CUSTOM_PNFF 147)
++ (CUSTOM_PNFP 148)
++ (CUSTOM_PNPI 149)
++ (CUSTOM_PNPF 150)
++ (CUSTOM_PNPP 151)
++])
++
++
++(define_insn "custom_n"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)]
++ ""
++ "custom\\t%0, zero, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ni"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NI)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")] CUSTOM_NF)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_np"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NP)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nii"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NII)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nif"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NIF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nip"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NIP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nff"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NFF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NPF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_in"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_IN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ini"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_INF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++(define_insn "custom_fn"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_FN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fni"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_FNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnii"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnif"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnip"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnff"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_pn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_PN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pni"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_PNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++
++;*****************************************************************************
++;*
++;* Misc
++;*
++;*****************************************************************************
++
++(define_insn "nop"
++ [(const_int 0)]
++ ""
++ "nop\\t"
++ [(set_attr "type" "alu")])
++
++(define_insn "sync"
++ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
++ ""
++ "sync\\t"
++ [(set_attr "type" "control")])
++
++
++(define_insn "rdctl"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] UNSPEC_RDCTL))]
++ ""
++ "rdctl\\t%0, ctl%1"
++ [(set_attr "type" "control")])
++
++(define_insn "wrctl"
++ [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand" "O")
++ (match_operand:SI 1 "register_operand" "r")] UNSPEC_WRCTL)]
++ ""
++ "wrctl\\tctl%0, %1"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Peepholes
++;*
++;*****************************************************************************
++
++
+--- gcc-3.4.3/gcc/config/nios2/t-nios2
++++ gcc-3.4.3-nios2/gcc/config/nios2/t-nios2
+@@ -0,0 +1,123 @@
++##
++## Compiler flags to use when compiling libgcc2.c.
++##
++## LIB2FUNCS_EXTRA
++## A list of source file names to be compiled or assembled and inserted into libgcc.a.
++
++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \
++ $(srcdir)/config/nios2/lib2-divmod-hi.c \
++ $(srcdir)/config/nios2/lib2-divtable.c \
++ $(srcdir)/config/nios2/lib2-mul.c
++
++##
++## Floating Point Emulation
++## To have GCC include software floating point libraries in libgcc.a define FPBIT
++## and DPBIT along with a few rules as follows:
++##
++## # We want fine grained libraries, so use the new code
++## # to build the floating point emulation libraries.
++FPBIT=$(srcdir)/config/nios2/nios2-fp-bit.c
++DPBIT=$(srcdir)/config/nios2/nios2-dp-bit.c
++
++TARGET_LIBGCC2_CFLAGS = -O2
++
++# FLOAT_ONLY - no doubles
++# SMALL_MACHINE - QI/HI is faster than SI
++# Actually SMALL_MACHINE uses chars and shorts instead of ints
++# since ints (16-bit ones as they are today) are at least as fast
++# as chars and shorts, don't define SMALL_MACHINE
++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code )
++
++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '#define FLOAT' > ${FPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${FPBIT}
++
++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '' > ${DPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${DPBIT}
++
++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
++
++# Assemble startup files.
++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm
++
++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm
++
++
++## You may need to provide additional #defines at the beginning of
++## fp-bit.c and dp-bit.c to control target endianness and other options
++##
++## CRTSTUFF_T_CFLAGS
++## Special flags used when compiling crtstuff.c. See Initialization.
++##
++## CRTSTUFF_T_CFLAGS_S
++## Special flags used when compiling crtstuff.c for shared linking. Used
++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization.
++##
++## MULTILIB_OPTIONS
++## For some targets, invoking GCC in different ways produces objects that
++## can not be linked together. For example, for some targets GCC produces
++## both big and little endian code. For these targets, you must arrange
++## for multiple versions of libgcc.a to be compiled, one for each set of
++## incompatible options. When GCC invokes the linker, it arranges to link
++## in the right version of libgcc.a, based on the command line options
++## used.
++## The MULTILIB_OPTIONS macro lists the set of options for which special
++## versions of libgcc.a must be built. Write options that are mutually
++## incompatible side by side, separated by a slash. Write options that may
++## be used together separated by a space. The build procedure will build
++## all combinations of compatible options.
++##
++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float,
++## Makefile will build special versions of libgcc.a using the following
++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float,
++## and -m68020 -msoft-float.
++
++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx
++
++## MULTILIB_DIRNAMES
++## If MULTILIB_OPTIONS is used, this variable specifies the directory names
++## that should be used to hold the various libraries. Write one element in
++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If
++## MULTILIB_DIRNAMES is not used, the default value will be
++## MULTILIB_OPTIONS, with all slashes treated as spaces.
++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float,
++## then the default value of MULTILIB_DIRNAMES is m68000 m68020
++## msoft-float. You may specify a different value if you desire a
++## different set of directory names.
++
++# MULTILIB_DIRNAMES =
++
++## MULTILIB_MATCHES
++## Sometimes the same option may be written in two different ways. If an
++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any
++## synonyms. In that case, set MULTILIB_MATCHES to a list of items of the
++## form option=option to describe all relevant synonyms. For example,
++## m68000=mc68000 m68020=mc68020.
++##
++## MULTILIB_EXCEPTIONS
++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being
++## specified, there are combinations that should not be built. In that
++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in
++## shell case syntax that should not be built.
++## For example, in the PowerPC embedded ABI support, it is not desirable to
++## build libraries compiled with the -mcall-aix option and either of the
++## -fleading-underscore or -mlittle options at the same time. Therefore
++## MULTILIB_EXCEPTIONS is set to
++##
++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
++##
++
++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx*
++
++##
++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building
++## multiple versions of libgcc.a certain options should always be passed on
++## to the compiler. In that case, set MULTILIB_EXTRA_OPTS to be the list
++## of options to be used for all builds.
++##
++
+--- gcc-3.4.3/gcc/config.gcc
++++ gcc-3.4.3-nios2/gcc/config.gcc
+@@ -1321,6 +1321,10 @@ m32rle-*-linux*)
+ thread_file='posix'
+ fi
+ ;;
++# JBG
++nios2-*-* | nios2-*-*)
++ tm_file="elfos.h ${tm_file}"
++ ;;
+ # m68hc11 and m68hc12 share the same machine description.
+ m68hc11-*-*|m6811-*-*)
+ tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
+--- gcc-3.4.3/gcc/cse.c
++++ gcc-3.4.3-nios2/gcc/cse.c
+@@ -3134,6 +3134,10 @@ find_comparison_args (enum rtx_code code
+ #ifdef FLOAT_STORE_FLAG_VALUE
+ REAL_VALUE_TYPE fsfv;
+ #endif
++#ifdef __nios2__
++ if (p->is_const)
++ break;
++#endif
+
+ /* If the entry isn't valid, skip it. */
+ if (! exp_equiv_p (p->exp, p->exp, 1, 0))
+--- gcc-3.4.3/gcc/doc/extend.texi
++++ gcc-3.4.3-nios2/gcc/doc/extend.texi
+@@ -5636,12 +5636,118 @@ to those machines. Generally these gene
+ instructions, but allow the compiler to schedule those calls.
+
+ @menu
++* Altera Nios II Built-in Functions::
+ * Alpha Built-in Functions::
+ * ARM Built-in Functions::
+ * X86 Built-in Functions::
+ * PowerPC AltiVec Built-in Functions::
+ @end menu
+
++@node Altera Nios II Built-in Functions
++@subsection Altera Nios II Built-in Functions
++
++These built-in functions are available for the Altera Nios II
++family of processors.
++
++The following built-in functions are always available. They
++all generate the machine instruction that is part of the name.
++
++@example
++int __builtin_ldbio (volatile const void *)
++int __builtin_ldbuio (volatile const void *)
++int __builtin_ldhio (volatile const void *)
++int __builtin_ldhuio (volatile const void *)
++int __builtin_ldwio (volatile const void *)
++void __builtin_stbio (volatile void *, int)
++void __builtin_sthio (volatile void *, int)
++void __builtin_stwio (volatile void *, int)
++void __builtin_sync (void)
++int __builtin_rdctl (int)
++void __builtin_wrctl (int, int)
++@end example
++
++The following built-in functions are always available. They
++all generate a Nios II Custom Instruction. The name of the
++function represents the types that the function takes and
++returns. The letter before the @code{n} is the return type
++or void if absent. The @code{n} represnts the first parameter
++to all the custom instructions, the custom instruction number.
++The two letters after the @code{n} represent the up to two
++parameters to the function.
++
++The letters reprsent the following data types:
++@table @code
++@item <no letter>
++@code{void} for return type and no parameter for parameter types.
++
++@item i
++@code{int} for return type and parameter type
++
++@item f
++@code{float} for return type and parameter type
++
++@item p
++@code{void *} for return type and parameter type
++
++@end table
++
++And the function names are:
++@example
++void __builtin_custom_n (void)
++void __builtin_custom_ni (int)
++void __builtin_custom_nf (float)
++void __builtin_custom_np (void *)
++void __builtin_custom_nii (int, int)
++void __builtin_custom_nif (int, float)
++void __builtin_custom_nip (int, void *)
++void __builtin_custom_nfi (float, int)
++void __builtin_custom_nff (float, float)
++void __builtin_custom_nfp (float, void *)
++void __builtin_custom_npi (void *, int)
++void __builtin_custom_npf (void *, float)
++void __builtin_custom_npp (void *, void *)
++int __builtin_custom_in (void)
++int __builtin_custom_ini (int)
++int __builtin_custom_inf (float)
++int __builtin_custom_inp (void *)
++int __builtin_custom_inii (int, int)
++int __builtin_custom_inif (int, float)
++int __builtin_custom_inip (int, void *)
++int __builtin_custom_infi (float, int)
++int __builtin_custom_inff (float, float)
++int __builtin_custom_infp (float, void *)
++int __builtin_custom_inpi (void *, int)
++int __builtin_custom_inpf (void *, float)
++int __builtin_custom_inpp (void *, void *)
++float __builtin_custom_fn (void)
++float __builtin_custom_fni (int)
++float __builtin_custom_fnf (float)
++float __builtin_custom_fnp (void *)
++float __builtin_custom_fnii (int, int)
++float __builtin_custom_fnif (int, float)
++float __builtin_custom_fnip (int, void *)
++float __builtin_custom_fnfi (float, int)
++float __builtin_custom_fnff (float, float)
++float __builtin_custom_fnfp (float, void *)
++float __builtin_custom_fnpi (void *, int)
++float __builtin_custom_fnpf (void *, float)
++float __builtin_custom_fnpp (void *, void *)
++void * __builtin_custom_pn (void)
++void * __builtin_custom_pni (int)
++void * __builtin_custom_pnf (float)
++void * __builtin_custom_pnp (void *)
++void * __builtin_custom_pnii (int, int)
++void * __builtin_custom_pnif (int, float)
++void * __builtin_custom_pnip (int, void *)
++void * __builtin_custom_pnfi (float, int)
++void * __builtin_custom_pnff (float, float)
++void * __builtin_custom_pnfp (float, void *)
++void * __builtin_custom_pnpi (void *, int)
++void * __builtin_custom_pnpf (void *, float)
++void * __builtin_custom_pnpp (void *, void *)
++@end example
++
++
+ @node Alpha Built-in Functions
+ @subsection Alpha Built-in Functions
+
+--- gcc-3.4.3/gcc/doc/invoke.texi
++++ gcc-3.4.3-nios2/gcc/doc/invoke.texi
+@@ -337,6 +337,14 @@ in the following sections.
+ @item Machine Dependent Options
+ @xref{Submodel Options,,Hardware Models and Configurations}.
+
++@emph{Altera Nios II Options}
++@gccoptlist{-msmallc -mno-bypass-cache -mbypass-cache @gol
++-mno-cache-volatile -mcache-volatile -mno-inline-memcpy @gol
++-minline-memcpy -mno-fast-sw-div -mfast-sw-div @gol
++-mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx @gol
++-mno-hw-div -mhw-div @gol
++-msys-crt0= -msys-lib= -msys=nosys }
++
+ @emph{M680x0 Options}
+ @gccoptlist{-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
+ -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 @gol
+@@ -5836,6 +5844,7 @@ machine description. The default for th
+ that macro, which enables you to change the defaults.
+
+ @menu
++* Altera Nios II Options::
+ * M680x0 Options::
+ * M68hc1x Options::
+ * VAX Options::
+@@ -5871,6 +5880,103 @@ that macro, which enables you to change
+ * FRV Options::
+ @end menu
+
++
++@node Altera Nios II Options
++@subsection Altera Nios II Options
++@cindex Altera Nios II options
++
++These are the @samp{-m} options defined for the Altera Nios II
++processor.
++
++@table @gcctabopt
++
++@item -msmallc
++@opindex msmallc
++
++Link with a limited version of the C library, -lsmallc. For more
++information see the C Library Documentation.
++
++
++@item -mbypass-cache
++@itemx -mno-bypass-cache
++@opindex mno-bypass-cache
++@opindex mbypass-cache
++
++Force all load and store instructions to always bypass cache by
++using io variants of the instructions. The default is to not
++bypass the cache.
++
++@item -mno-cache-volatile
++@itemx -mcache-volatile
++@opindex mcache-volatile
++@opindex mno-cache-volatile
++
++Volatile memory access bypass the cache using the io variants of
++the ld and st instructions. The default is to cache volatile
++accesses.
++
++-mno-cache-volatile is deprecated and will be deleted in a
++future GCC release.
++
++
++@item -mno-inline-memcpy
++@itemx -minline-memcpy
++@opindex mno-inline-memcpy
++@opindex minline-memcpy
++
++Do not inline memcpy. The default is to inline when -O is on.
++
++
++@item -mno-fast-sw-div
++@itemx -mfast-sw-div
++@opindex mno-fast-sw-div
++@opindex mfast-sw-div
++
++Do no use table based fast divide for small numbers. The default
++is to use the fast divide at -O3 and above.
++
++
++@item -mno-hw-mul
++@itemx -mhw-mul
++@itemx -mno-hw-mulx
++@itemx -mhw-mulx
++@itemx -mno-hw-div
++@itemx -mhw-div
++@opindex mno-hw-mul
++@opindex mhw-mul
++@opindex mno-hw-mulx
++@opindex mhw-mulx
++@opindex mno-hw-div
++@opindex mhw-div
++
++Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of
++instructions by the compiler. The default is to emit @code{mul}
++and not emit @code{div} and @code{mulx}.
++
++The different combinations of @code{mul} and @code{mulx} instructions
++generate a different multilib options.
++
++
++@item -msys-crt0=@var{startfile}
++@opindex msys-crt0
++
++@var{startfile} is the file name of the startfile (crt0) to use
++when linking. The default is crt0.o that comes with libgloss
++and is only suitable for use with the instruction set
++simulator.
++
++@item -msys-lib=@var{systemlib}
++@itemx -msys-lib=nosys
++@opindex msys-lib
++
++@var{systemlib} is the library name of the library which provides
++the system calls required by the C library, e.g. @code{read}, @code{write}
++etc. The default is to use nosys, this library provides
++stub implementations of the calls and is part of libgloss.
++
++@end table
++
++
+ @node M680x0 Options
+ @subsection M680x0 Options
+ @cindex M680x0 options
+--- gcc-3.4.3/gcc/doc/md.texi
++++ gcc-3.4.3-nios2/gcc/doc/md.texi
+@@ -1335,6 +1335,49 @@ However, here is a summary of the machin
+ available on some particular machines.
+
+ @table @emph
++
++@item Altera Nios II family---@file{nios2.h}
++@table @code
++
++@item I
++Integer that is valid as an immediate operand in an
++instruction taking a signed 16-bit number. Range
++@minus{}32768 to 32767.
++
++@item J
++Integer that is valid as an immediate operand in an
++instruction taking an unsigned 16-bit number. Range
++0 to 65535.
++
++@item K
++Integer that is valid as an immediate operand in an
++instruction taking only the upper 16-bits of a
++32-bit number. Range 32-bit numbers with the lower
++16-bits being 0.
++
++@item L
++Integer that is valid as an immediate operand for a
++shift instruction. Range 0 to 31.
++
++
++@item M
++Integer that is valid as an immediate operand for
++only the value 0. Can be used in conjunction with
++the format modifier @code{z} to use @code{r0}
++instead of @code{0} in the assembly output.
++
++@item N
++Integer that is valid as an immediate operand for
++a custom instruction opcode. Range 0 to 255.
++
++@item S
++Matches immediates which are addresses in the small
++data section and therefore can be added to @code{gp}
++as a 16-bit immediate to re-create their 32-bit value.
++
++@end table
++
++
+ @item ARM family---@file{arm.h}
+ @table @code
+ @item f
diff --git a/misc/buildroot/toolchain/gcc/3.4.5/arm-softfloat.patch.conditional b/misc/buildroot/toolchain/gcc/3.4.5/arm-softfloat.patch.conditional
new file mode 100644
index 000000000..19d1b90da
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.5/arm-softfloat.patch.conditional
@@ -0,0 +1,270 @@
+Note... modified my mjn3 to not conflict with the big endian arm patch.
+Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
+Also changed
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{!mcpu=*:-mcpu=xscale} \
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+to
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+in gcc/config/arm/linux-elf.h.
+#
+# Submitted:
+#
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# Description:
+#
+# Nicholas Pitre released this patch for gcc soft-float support here:
+# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
+#
+# This version has been adapted to work with gcc 3.4.0.
+#
+# The original patch doesn't distinguish between softfpa and softvfp modes
+# in the way Nicholas Pitre probably meant. His description is:
+#
+# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
+# floats can be achieved with -mhard-float or with the configure
+# --with-float=hard option. If -msoft-float or --with-float=soft is used then
+# software float support will be used just like the default but with the legacy
+# big endian word ordering for double float representation instead."
+#
+# Which means the following:
+#
+# * If you compile without -mhard-float or -msoft-float, you should get
+# software floating point, using the VFP format. The produced object file
+# should have these flags in its header:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# * If you compile with -mhard-float, you should get hardware floating point,
+# which always uses the FPA format. Object file header flags should be:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# * If you compile with -msoft-float, you should get software floating point,
+# using the FPA format. This is done for compatibility reasons with many
+# existing distributions. Object file header flags should be:
+#
+# private flags = 200: [APCS-32] [FPA float format] [software FP]
+#
+# The original patch from Nicholas Pitre contained the following constructs:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
+#
+# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
+# is probably the reason Robert Schwebel modified it to:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
+#
+# But this causes the following behaviour:
+#
+# * If you compile without -mhard-float or -msoft-float, the compiler generates
+# software floating point instructions, but *nothing* is passed to the
+# assembler, which results in an object file which has flags:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# This is not correct!
+#
+# * If you compile with -mhard-float, the compiler generates hardware floating
+# point instructions, and passes "-mfpu=fpa" to the assembler, which results
+# in an object file which has the same flags as in the previous item, but now
+# those *are* correct.
+#
+# * If you compile with -msoft-float, the compiler generates software floating
+# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
+# order) to the assembler, which results in an object file with flags:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# This is not correct, because the last "-mfpu=" option on the assembler
+# command line determines the actual FPU convention used (which should be FPA
+# in this case).
+#
+# Therefore, I modified this patch to get the desired behaviour. Every
+# instance of the notation:
+#
+# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
+#
+# was changed to:
+#
+# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
+#
+# I also did the following:
+#
+# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
+# be consistent with Nicholas' original patch.
+# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
+# macros I could find. I think that if you compile without any options, you
+# would like to get the defaults. :)
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+
+diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
+--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
+@@ -31,11 +31,16 @@
+ #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
+ #endif
+
+ /* This is COFF, but prefer stabs. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
+--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -46,7 +46,9 @@
+
+ #ifndef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
++%{mapcs-float:-mfloat} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+ #endif
+
+ #ifndef ASM_SPEC
+@@ -106,12 +108,17 @@
+ #endif
+
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
+ #endif
+
+ #define TARGET_ASM_FILE_START_APP_OFF true
+diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
+@@ -44,12 +44,26 @@
+ #define TARGET_LINKER_EMULATION "armelf_linux"
+ #endif
+
+-/* Default is to use APCS-32 mode. */
++/*
++ * Default is to use APCS-32 mode with soft-vfp.
++ * The old Linux default for floats can be achieved with -mhard-float
++ * or with the configure --with-float=hard option.
++ * If -msoft-float or --with-float=soft is used then software float
++ * support will be used just like the default but with the legacy
++ * big endian word ordering for double float representation instead.
++ */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT \
+- ( ARM_FLAG_APCS_32 | \
+- ARM_FLAG_MMU_TRAPS | \
+- TARGET_ENDIAN_DEFAULT )
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 \
++ | ARM_FLAG_SOFT_FLOAT \
++ | TARGET_ENDIAN_DEFAULT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_MMU_TRAPS )
++
++#undef SUBTARGET_EXTRA_ASM_SPEC
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+@@ -57,7 +71,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -72,7 +86,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
+--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -30,7 +30,12 @@
+
+ /* Default to using APCS-32 and software floating point. */
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ /* Now we define the strings used to build the spec file. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -49,11 +49,12 @@
+ endian, regardless of the endian-ness of the memory
+ system. */
+
+-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+- %{mhard-float:-mfpu=fpa} \
+- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{!mcpu=*:-mcpu=xscale} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
++ { "mlittle-endian", "mno-thumb-interwork", "marm" }
+ #endif
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/3.4.6/300-libstdc++-pic.patch
new file mode 100644
index 000000000..9f304a4c4
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/300-libstdc++-pic.patch
@@ -0,0 +1,47 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -224,6 +224,10 @@
+ @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCPP_BUILD_DEBUG
+ all-local: build_debug
+
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -585,7 +585,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -618,6 +618,7 @@
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-data-local \
+ install-exec install-exec-am install-info install-info-am \
++ install-exec-local \
+ install-man install-strip install-toolexeclibLTLIBRARIES \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+@@ -707,6 +708,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/3.4.6/304-index_macro.patch b/misc/buildroot/toolchain/gcc/3.4.6/304-index_macro.patch
new file mode 100644
index 000000000..1fac112fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx
+ {
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/600-gcc34-arm-ldm-peephole.patch b/misc/buildroot/toolchain/gcc/3.4.6/600-gcc34-arm-ldm-peephole.patch
new file mode 100644
index 000000000..0c370502c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/600-gcc34-arm-ldm-peephole.patch
@@ -0,0 +1,65 @@
+--- gcc-3.4.0/gcc/config/arm/arm.md.arm-ldm-peephole 2004-01-13 08:24:37.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.md 2004-04-24 18:18:04.000000000 -0400
+@@ -8810,13 +8810,16 @@
+ (set_attr "length" "4,8,8")]
+ )
+
++; Try to convert LDR+LDR+arith into [add+]LDM+arith
++; On XScale, LDM is always slower than two LDRs, so only do this if
++; optimising for size.
+ (define_insn "*arith_adjacentmem"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (match_operator:SI 1 "shiftable_operator"
+ [(match_operand:SI 2 "memory_operand" "m")
+ (match_operand:SI 3 "memory_operand" "m")]))
+ (clobber (match_scratch:SI 4 "=r"))]
+- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
++ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
+ "*
+ {
+ rtx ldm[3];
+@@ -8851,6 +8854,8 @@
+ }
+ if (val1 && val2)
+ {
++ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
++ will prevent it from happening. */
+ rtx ops[3];
+ ldm[0] = ops[0] = operands[4];
+ ops[1] = XEXP (XEXP (operands[2], 0), 0);
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm-peephole 2004-04-24 18:16:25.000000000 -0400
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:18:04.000000000 -0400
+@@ -4838,6 +4841,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* ldmia */
+
+@@ -5064,6 +5072,11 @@
+ *load_offset = unsorted_offsets[order[0]];
+ }
+
++ /* For XScale a two-word LDM is a performance loss, so only do this if
++ size is more important. See comments in arm_gen_load_multiple. */
++ if (nops == 2 && arm_tune_xscale && !optimize_size)
++ return 0;
++
+ if (unsorted_offsets[order[0]] == 0)
+ return 1; /* stmia */
+
+--- gcc-3.4.0/gcc/genpeep.c.arm-ldm-peephole 2003-07-05 01:27:22.000000000 -0400
++++ gcc-3.4.0/gcc/genpeep.c 2004-04-24 18:18:04.000000000 -0400
+@@ -381,6 +381,7 @@
+ printf ("#include \"recog.h\"\n");
+ printf ("#include \"except.h\"\n\n");
+ printf ("#include \"function.h\"\n\n");
++ printf ("#include \"flags.h\"\n\n");
+
+ printf ("#ifdef HAVE_peephole\n");
+ printf ("extern rtx peep_operand[];\n\n");
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm-peephole2.patch b/misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm-peephole2.patch
new file mode 100644
index 000000000..27f7c07db
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm-peephole2.patch
@@ -0,0 +1,42 @@
+The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting
+with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from
+it that was causing problems and grabbed an updated version from
+upstream cvs.
+
+Index: gcc/config/arm/arm.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
+retrieving revision 1.432
+retrieving revision 1.433
+diff -u -r1.432 -r1.433
+--- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432
++++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433
+@@ -5139,6 +5139,10 @@
+ int
+ adjacent_mem_locations (rtx a, rtx b)
+ {
++ /* We don't guarantee to preserve the order of these memory refs. */
++ if (volatile_refs_p (a) || volatile_refs_p (b))
++ return 0;
++
+ if ((GET_CODE (XEXP (a, 0)) == REG
+ || (GET_CODE (XEXP (a, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
+@@ -5178,6 +5182,17 @@
+ return 0;
+
+ val_diff = val1 - val0;
++
++ if (arm_ld_sched)
++ {
++ /* If the target has load delay slots, then there's no benefit
++ to using an ldm instruction unless the offset is zero and
++ we are optimizing for size. */
++ return (optimize_size && (REGNO (reg0) == REGNO (reg1))
++ && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
++ && (val_diff == 4 || val_diff == -4));
++ }
++
+ return ((REGNO (reg0) == REGNO (reg1))
+ && (val_diff == 4 || val_diff == -4));
+ }
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm.patch b/misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm.patch
new file mode 100644
index 000000000..142052fdf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/601-gcc34-arm-ldm.patch
@@ -0,0 +1,119 @@
+--- gcc-3.4.0/gcc/config/arm/arm.c.arm-ldm 2004-02-27 09:51:05.000000000 -0500
++++ gcc-3.4.0/gcc/config/arm/arm.c 2004-04-24 18:16:25.000000000 -0400
+@@ -8520,6 +8520,26 @@
+ return_used_this_function = 0;
+ }
+
++/* Return the number (counting from 0) of
++ the least significant set bit in MASK. */
++
++#ifdef __GNUC__
++inline
++#endif
++static int
++number_of_first_bit_set (mask)
++ int mask;
++{
++ int bit;
++
++ for (bit = 0;
++ (mask & (1 << bit)) == 0;
++ ++bit)
++ continue;
++
++ return bit;
++}
++
+ const char *
+ arm_output_epilogue (rtx sibling)
+ {
+@@ -8753,27 +8773,47 @@
+ saved_regs_mask |= (1 << PC_REGNUM);
+ }
+
+- /* Load the registers off the stack. If we only have one register
+- to load use the LDR instruction - it is faster. */
+- if (saved_regs_mask == (1 << LR_REGNUM))
+- {
+- /* The exception handler ignores the LR, so we do
+- not really need to load it off the stack. */
+- if (eh_ofs)
+- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
+- else
+- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
+- }
+- else if (saved_regs_mask)
++ if (saved_regs_mask)
+ {
+- if (saved_regs_mask & (1 << SP_REGNUM))
+- /* Note - write back to the stack register is not enabled
+- (ie "ldmfd sp!..."). We know that the stack pointer is
+- in the list of registers and if we add writeback the
+- instruction becomes UNPREDICTABLE. */
+- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ /* Load the registers off the stack. If we only have one register
++ to load use the LDR instruction - it is faster. */
++ if (bit_count (saved_regs_mask) == 1)
++ {
++ int reg = number_of_first_bit_set (saved_regs_mask);
++
++ switch (reg)
++ {
++ case SP_REGNUM:
++ /* Mustn't use base writeback when loading SP. */
++ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
++ break;
++
++ case LR_REGNUM:
++ if (eh_ofs)
++ {
++ /* The exception handler ignores the LR, so we do
++ not really need to load it off the stack. */
++ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
++ break;
++ }
++ /* else fall through */
++
++ default:
++ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
++ break;
++ }
++ }
+ else
+- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ {
++ if (saved_regs_mask & (1 << SP_REGNUM))
++ /* Note - write back to the stack register is not enabled
++ (ie "ldmfd sp!..."). We know that the stack pointer is
++ in the list of registers and if we add writeback the
++ instruction becomes UNPREDICTABLE. */
++ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
++ else
++ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
++ }
+ }
+
+ if (current_function_pretend_args_size)
+@@ -11401,22 +11441,6 @@
+ }
+ }
+
+-/* Return the number (counting from 0) of
+- the least significant set bit in MASK. */
+-
+-inline static int
+-number_of_first_bit_set (int mask)
+-{
+- int bit;
+-
+- for (bit = 0;
+- (mask & (1 << bit)) == 0;
+- ++bit)
+- continue;
+-
+- return bit;
+-}
+-
+ /* Generate code to return from a thumb function.
+ If 'reg_containing_return_addr' is -1, then the return address is
+ actually on the stack, at the stack pointer. */
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/3.4.6/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..4377c2143
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/700-pr15068-fix.patch b/misc/buildroot/toolchain/gcc/3.4.6/700-pr15068-fix.patch
new file mode 100644
index 000000000..2977765c5
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/700-pr15068-fix.patch
@@ -0,0 +1,44 @@
+See http://gcc.gnu.org/PR15068
+
+Fixes error
+
+../sysdeps/generic/s_fmax.c: In function `__fmax':
+../sysdeps/generic/s_fmax.c:28: internal compiler error: in elim_reg_cond, at flow.c:3257
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <URL:http://gcc.gnu.org/bugs.html> for instructions.
+make[2]: *** [/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/math/s_fmax.o] Error 1
+make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822/math'
+make[1]: *** [math/others] Error 2
+make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc35/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040822'
+make: *** [all] Error 2
+
+[ rediffed against gcc-3.4.1, with elbow grease, ending up with same thing as
+http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/flow.c.diff?cvsroot=gcc&only_with_tag=csl-arm-branch&r1=1.563.4.2&r2=1.563.4.3 ]
+
+--- gcc-3.4.1/gcc/flow.c.old 2004-02-27 19:39:19.000000000 -0800
++++ gcc-3.4.1/gcc/flow.c 2004-08-26 07:29:46.000000000 -0700
+@@ -1878,6 +1878,7 @@
+ rtx set_src = SET_SRC (pc_set (BB_END (bb)));
+ rtx cond_true = XEXP (set_src, 0);
+ rtx reg = XEXP (cond_true, 0);
++ enum rtx_code inv_cond;
+
+ if (GET_CODE (reg) == SUBREG)
+ reg = SUBREG_REG (reg);
+@@ -1886,11 +1887,13 @@
+ in the form of a comparison of a register against zero.
+ If the condition is more complex than that, then it is safe
+ not to record any information. */
+- if (GET_CODE (reg) == REG
++ inv_cond = reversed_comparison_code (cond_true, BB_END (bb));
++ if (inv_cond != UNKNOWN
++ && GET_CODE (reg) == REG
+ && XEXP (cond_true, 1) == const0_rtx)
+ {
+ rtx cond_false
+- = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
++ = gen_rtx_fmt_ee (inv_cond,
+ GET_MODE (cond_true), XEXP (cond_true, 0),
+ XEXP (cond_true, 1));
+ if (GET_CODE (XEXP (set_src, 1)) == PC)
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/71_all_sh-pr16665-fix.patch b/misc/buildroot/toolchain/gcc/3.4.6/71_all_sh-pr16665-fix.patch
new file mode 100644
index 000000000..680bb3978
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/71_all_sh-pr16665-fix.patch
@@ -0,0 +1,43 @@
+--- gcc/gcc/config/sh/sh.c
++++ gcc/gcc/config/sh/sh.c
+@@ -9106,6 +9106,15 @@ sh_output_mi_thunk (FILE *file, tree thu
+ }
+ this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
+
++ /* In PIC case, we set PIC register to compute the target address. We
++ can use a scratch register to save and restore the original value
++ except for SHcompact. For SHcompact, use stack. */
++ if (flag_pic && TARGET_SHCOMPACT)
++ {
++ push (PIC_OFFSET_TABLE_REGNUM);
++ emit_insn (gen_GOTaddr2picreg ());
++ }
++
+ /* For SHcompact, we only have r0 for a scratch register: r1 is the
+ static chain pointer (even if you can't have nested virtual functions
+ right now, someone might implement them sometime), and the rest of the
+@@ -9188,8 +9197,24 @@ sh_output_mi_thunk (FILE *file, tree thu
+ assemble_external (function);
+ TREE_USED (function) = 1;
+ }
++ /* We can use scratch1 to save and restore the original value of
++ PIC register except for SHcompact. */
++ if (flag_pic && ! TARGET_SHCOMPACT)
++ {
++ emit_move_insn (scratch1,
++ gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
++ emit_insn (gen_GOTaddr2picreg ());
++ }
+ funexp = XEXP (DECL_RTL (function), 0);
+ emit_move_insn (scratch2, funexp);
++ if (flag_pic)
++ {
++ if (! TARGET_SHCOMPACT)
++ emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
++ scratch1);
++ else
++ pop (PIC_OFFSET_TABLE_REGNUM);
++ }
+ funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
+ sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
+ SIBLING_CALL_P (sibcall) = 1;
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/72_all_sh-no-reorder-blocks.patch b/misc/buildroot/toolchain/gcc/3.4.6/72_all_sh-no-reorder-blocks.patch
new file mode 100644
index 000000000..8b9826831
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/72_all_sh-no-reorder-blocks.patch
@@ -0,0 +1,13 @@
+--- g/gcc/config/sh/sh.h
++++ g/gcc/config/sh/sh.h
+@@ -422,6 +422,10 @@
+ do { \
+ if (LEVEL) \
+ flag_omit_frame_pointer = -1; \
++ if (LEVEL <= 2) \
++ { \
++ flag_reorder_blocks = 0; \
++ } \
+ if (SIZE) \
+ target_flags |= SPACE_BIT; \
+ if (TARGET_SHMEDIA && LEVEL > 1) \
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/73_all_sh-pr20617.patch b/misc/buildroot/toolchain/gcc/3.4.6/73_all_sh-pr20617.patch
new file mode 100644
index 000000000..6d8021cc7
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/73_all_sh-pr20617.patch
@@ -0,0 +1,28 @@
+2005-03-24 J"orn Rennecke <joern.rennecke@st.com>
+
+ Band aid for PR target/20617:
+ * config/sh/lib1funcs.asm (FUNC, ALIAS): Add .hidden directive.
+
+--- g/gcc/config/sh/lib1funcs.asm
++++ g/gcc/config/sh/lib1funcs.asm
+@@ -37,9 +37,19 @@ Boston, MA 02111-1307, USA. */
+ ELF local label prefixes by J"orn Rennecke
+ amylaar@cygnus.com */
+
++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
++
+ #ifdef __ELF__
+ #define LOCAL(X) .L_##X
+-#define FUNC(X) .type X,@function
++
++#if 1 /* ??? The export list mechanism is broken, everything that is not
++ hidden is exported. */
++#undef FUNC
++#define FUNC(X) .type X,@function; .hidden X
++#undef ALIAS
++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
++#endif
++
+ #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
+ #define ENDFUNC(X) ENDFUNC0(X)
+ #else
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/3.4.6/800-arm-bigendian.patch
new file mode 100644
index 000000000..04e998419
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/800-arm-bigendian.patch
@@ -0,0 +1,68 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-3.4.1-dist/gcc/config/arm/linux-elf.h
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h
+@@ -30,17 +30,34 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ /* Default is to use APCS-32 mode. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 | \
++ ARM_FLAG_MMU_TRAPS | \
++ TARGET_ENDIAN_DEFAULT )
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -101,7 +118,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+ #endif
+
+--- gcc-3.4.1-dist/gcc/config.gcc
++++ gcc-3.4.1/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/810-mips-xgot.patch b/misc/buildroot/toolchain/gcc/3.4.6/810-mips-xgot.patch
new file mode 100644
index 000000000..14e8d126e
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/810-mips-xgot.patch
@@ -0,0 +1,6 @@
+--- gcc.orig/gcc/config/mips/t-linux 1970-01-01 01:00:00.000000000 +0100
++++ gcc/gcc/config/mips/t-linux 2004-08-26 18:28:12.000000000 +0200
+@@ -0,0 +1,3 @@
++# Compile crtbegin/end with xgot so it works for both
++# normal and large GOTs.
++CRTSTUFF_T_CFLAGS = -mxgot
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/900-nios2.patch b/misc/buildroot/toolchain/gcc/3.4.6/900-nios2.patch
new file mode 100644
index 000000000..bfa06a21c
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/900-nios2.patch
@@ -0,0 +1,10211 @@
+--- gcc-3.4.3/gcc/Makefile.in
++++ gcc-3.4.3-nios2/gcc/Makefile.in
+@@ -3085,7 +3085,7 @@ install-mkheaders: stmp-int-hdrs $(STMP_
+ $(INSTALL_DATA) $(srcdir)/README-fixinc \
+ $(DESTDIR)$(itoolsdatadir)/include/README ; \
+ $(INSTALL_SCRIPT) fixinc.sh $(DESTDIR)$(itoolsdir)/fixinc.sh ; \
+- $(INSTALL_PROGRAM) fixinc/fixincl $(DESTDIR)$(itoolsdir)/fixincl ; \
++ $(INSTALL_PROGRAM) fixinc/fixincl$(build_exeext) $(DESTDIR)$(itoolsdir)/fixincl$(build_exeext) ; \
+ $(INSTALL_DATA) $(srcdir)/gsyslimits.h \
+ $(DESTDIR)$(itoolsdatadir)/gsyslimits.h ; \
+ else :; fi
+--- gcc-3.4.3/gcc/combine.c
++++ gcc-3.4.3-nios2/gcc/combine.c
+@@ -4380,6 +4380,14 @@ combine_simplify_rtx (rtx x, enum machin
+ mode);
+ }
+
++#ifndef __nios2__
++/* This screws up Nios II in this test case:
++
++if (x & 1)
++ return 2;
++else
++ return 3;
++*/
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+ && op1 == const0_rtx
+@@ -4391,6 +4399,7 @@ combine_simplify_rtx (rtx x, enum machin
+ gen_lowpart_for_combine (mode, op0),
+ const1_rtx);
+ }
++#endif
+
+ else if (STORE_FLAG_VALUE == 1
+ && new_code == EQ && GET_MODE_CLASS (mode) == MODE_INT
+--- gcc-3.4.3/gcc/config/nios2/crti.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crti.asm
+@@ -0,0 +1,88 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just make a stack frame for the contents of the .fini and
++.init sections. Users may put any desired instructions in those
++sections.
++
++
++While technically any code can be put in the init and fini sections
++most stuff will not work other than stuff which obeys the call frame
++and ABI. All the call-preserved registers are saved, the call clobbered
++registers should have been saved by the code calling init and fini.
++
++See crtstuff.c for an example of code that inserts itself in the
++init and fini sections.
++
++See crt0.s for the code that calls init and fini.
++*/
++
++ .file "crti.asm"
++
++ .section ".init"
++ .align 2
++ .global _init
++_init:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
++ .section ".fini"
++ .align 2
++ .global _fini
++_fini:
++ addi sp, sp, -48
++ stw ra, 44(sp)
++ stw r23, 40(sp)
++ stw r22, 36(sp)
++ stw r21, 32(sp)
++ stw r20, 28(sp)
++ stw r19, 24(sp)
++ stw r18, 20(sp)
++ stw r17, 16(sp)
++ stw r16, 12(sp)
++ stw fp, 8(sp)
++ mov fp, sp
++
++
+--- gcc-3.4.3/gcc/config/nios2/crtn.asm
++++ gcc-3.4.3-nios2/gcc/config/nios2/crtn.asm
+@@ -0,0 +1,70 @@
++/*
++ Copyright (C) 2003
++ by Jonah Graham (jgraham@altera.com)
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA.
++
++ As a special exception, if you link this library with files
++ compiled with GCC to produce an executable, this does not cause
++ the resulting executable to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License.
++
++
++This file just makes sure that the .fini and .init sections do in
++fact return. Users may put any desired instructions in those sections.
++This file is the last thing linked into any executable.
++*/
++ .file "crtn.asm"
++
++
++
++ .section ".init"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
++ .section ".fini"
++ ldw ra, 44(sp)
++ ldw r23, 40(sp)
++ ldw r22, 36(sp)
++ ldw r21, 32(sp)
++ ldw r20, 28(sp)
++ ldw r19, 24(sp)
++ ldw r18, 20(sp)
++ ldw r17, 16(sp)
++ ldw r16, 12(sp)
++ ldw fp, 8(sp)
++ addi sp, sp, -48
++ ret
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod-hi.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod-hi.c
+@@ -0,0 +1,123 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern HItype __modhi3 (HItype, HItype);
++extern HItype __divhi3 (HItype, HItype);
++extern HItype __umodhi3 (HItype, HItype);
++extern HItype __udivhi3 (HItype, HItype);
++
++static UHItype udivmodhi4(UHItype, UHItype, word_type);
++
++static UHItype
++udivmodhi4(UHItype num, UHItype den, word_type modwanted)
++{
++ UHItype bit = 1;
++ UHItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<15)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++HItype
++__divhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodhi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__modhi3 (HItype a, HItype b)
++{
++ word_type neg = 0;
++ HItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodhi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++HItype
++__udivhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 0);
++}
++
++
++HItype
++__umodhi3 (HItype a, HItype b)
++{
++ return udivmodhi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divmod.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divmod.c
+@@ -0,0 +1,126 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++extern SItype __modsi3 (SItype, SItype);
++extern SItype __divsi3 (SItype, SItype);
++extern SItype __umodsi3 (SItype, SItype);
++extern SItype __udivsi3 (SItype, SItype);
++
++static USItype udivmodsi4(USItype, USItype, word_type);
++
++/* 16-bit SI divide and modulo as used in NIOS */
++
++
++static USItype
++udivmodsi4(USItype num, USItype den, word_type modwanted)
++{
++ USItype bit = 1;
++ USItype res = 0;
++
++ while (den < num && bit && !(den & (1L<<31)))
++ {
++ den <<=1;
++ bit <<=1;
++ }
++ while (bit)
++ {
++ if (num >= den)
++ {
++ num -= den;
++ res |= bit;
++ }
++ bit >>=1;
++ den >>=1;
++ }
++ if (modwanted) return num;
++ return res;
++}
++
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = !neg;
++ }
++
++ if (b < 0)
++ {
++ b = -b;
++ neg = !neg;
++ }
++
++ res = udivmodsi4 (a, b, 0);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__modsi3 (SItype a, SItype b)
++{
++ word_type neg = 0;
++ SItype res;
++
++ if (a < 0)
++ {
++ a = -a;
++ neg = 1;
++ }
++
++ if (b < 0)
++ b = -b;
++
++ res = udivmodsi4 (a, b, 1);
++
++ if (neg)
++ res = -res;
++
++ return res;
++}
++
++
++SItype
++__udivsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 0);
++}
++
++
++SItype
++__umodsi3 (SItype a, SItype b)
++{
++ return udivmodsi4 (a, b, 1);
++}
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-divtable.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-divtable.c
+@@ -0,0 +1,46 @@
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++UQItype __divsi3_table[] =
++{
++ 0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15,
++ 0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15,
++ 0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15,
++ 0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15,
++ 0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15,
++ 0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15,
++ 0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15,
++ 0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15,
++ 0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15,
++ 0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15,
++ 0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15,
++ 0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15,
++ 0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15,
++ 0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15,
++ 0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15,
++ 0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15,
++};
++
+--- gcc-3.4.3/gcc/config/nios2/lib2-mul.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/lib2-mul.c
+@@ -0,0 +1,103 @@
++/* while we are debugging (ie compile outside of gcc build)
++ disable gcc specific headers */
++#ifndef DEBUG_MULSI3
++
++
++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
++ supposedly valid even though this is a "target" file. */
++#include "auto-host.h"
++
++
++#include "tconfig.h"
++#include "tsystem.h"
++#include "coretypes.h"
++#include "tm.h"
++
++
++/* Don't use `fancy_abort' here even if config.h says to use it. */
++#ifdef abort
++#undef abort
++#endif
++
++
++#ifdef HAVE_GAS_HIDDEN
++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
++#else
++#define ATTRIBUTE_HIDDEN
++#endif
++
++#include "libgcc2.h"
++
++#else
++#define SItype int
++#define USItype unsigned int
++#endif
++
++
++extern SItype __mulsi3 (SItype, SItype);
++
++SItype
++__mulsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = a;
++
++ while (cnt)
++ {
++ if (cnt & 1)
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt >>= 1;
++ }
++
++ return res;
++}
++/*
++TODO: Choose best alternative implementation.
++
++SItype
++__divsi3 (SItype a, SItype b)
++{
++ SItype res = 0;
++ USItype cnt = 0;
++
++ while (cnt < 32)
++ {
++ if (a & (1L << cnt))
++ {
++ res += b;
++ }
++ b <<= 1;
++ cnt++;
++ }
++
++ return res;
++}
++*/
++
++
++#ifdef DEBUG_MULSI3
++
++int
++main ()
++{
++ int i, j;
++ int error = 0;
++
++ for (i = -1000; i < 1000; i++)
++ for (j = -1000; j < 1000; j++)
++ {
++ int expect = i * j;
++ int actual = A__divsi3 (i, j);
++ if (expect != actual)
++ {
++ printf ("error: %d * %d = %d not %d\n", i, j, expect, actual);
++ error = 1;
++ }
++ }
++
++ return error;
++}
++#endif
+--- gcc-3.4.3/gcc/config/nios2/nios2-dp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-dp-bit.c
+@@ -0,0 +1,1652 @@
++
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-fp-bit.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-fp-bit.c
+@@ -0,0 +1,1652 @@
++#define FLOAT
++/* This is a software floating point library which can be used
++ for targets without hardware floating point.
++ Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
++
++This file 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 2, or (at your option) any
++later version.
++
++In addition to the permissions in the GNU General Public License, the
++Free Software Foundation gives you unlimited permission to link the
++compiled version of this file with other programs, and to distribute
++those programs without any restriction coming from the use of this
++file. (The General Public License restrictions do apply in other
++respects; for example, they cover modification of the file, and
++distribution when not linked into another program.)
++
++This file 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; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++/* As a special exception, if you link this library with other files,
++ some of which are compiled with GCC, to produce an executable,
++ this library does not by itself cause the resulting executable
++ to be covered by the GNU General Public License.
++ This exception does not however invalidate any other reasons why
++ the executable file might be covered by the GNU General Public License. */
++
++/* This implements IEEE 754 format arithmetic, but does not provide a
++ mechanism for setting the rounding mode, or for generating or handling
++ exceptions.
++
++ The original code by Steve Chamberlain, hacked by Mark Eichin and Jim
++ Wilson, all of Cygnus Support. */
++
++/* The intended way to use this file is to make two copies, add `#define FLOAT'
++ to one copy, then compile both copies and add them to libgcc.a. */
++
++#include "tconfig.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "config/fp-bit.h"
++
++/* The following macros can be defined to change the behavior of this file:
++ FLOAT: Implement a `float', aka SFmode, fp library. If this is not
++ defined, then this file implements a `double', aka DFmode, fp library.
++ FLOAT_ONLY: Used with FLOAT, to implement a `float' only library, i.e.
++ don't include float->double conversion which requires the double library.
++ This is useful only for machines which can't support doubles, e.g. some
++ 8-bit processors.
++ CMPtype: Specify the type that floating point compares should return.
++ This defaults to SItype, aka int.
++ US_SOFTWARE_GOFAST: This makes all entry points use the same names as the
++ US Software goFast library.
++ _DEBUG_BITFLOAT: This makes debugging the code a little easier, by adding
++ two integers to the FLO_union_type.
++ NO_DENORMALS: Disable handling of denormals.
++ NO_NANS: Disable nan and infinity handling
++ SMALL_MACHINE: Useful when operations on QIs and HIs are faster
++ than on an SI */
++
++/* We don't currently support extended floats (long doubles) on machines
++ without hardware to deal with them.
++
++ These stubs are just to keep the linker from complaining about unresolved
++ references which can be pulled in from libio & libstdc++, even if the
++ user isn't using long doubles. However, they may generate an unresolved
++ external to abort if abort is not used by the function, and the stubs
++ are referenced from within libc, since libgcc goes before and after the
++ system library. */
++
++#ifdef DECLARE_LIBRARY_RENAMES
++ DECLARE_LIBRARY_RENAMES
++#endif
++
++#ifdef EXTENDED_FLOAT_STUBS
++extern void abort (void);
++void __extendsfxf2 (void) { abort(); }
++void __extenddfxf2 (void) { abort(); }
++void __truncxfdf2 (void) { abort(); }
++void __truncxfsf2 (void) { abort(); }
++void __fixxfsi (void) { abort(); }
++void __floatsixf (void) { abort(); }
++void __addxf3 (void) { abort(); }
++void __subxf3 (void) { abort(); }
++void __mulxf3 (void) { abort(); }
++void __divxf3 (void) { abort(); }
++void __negxf2 (void) { abort(); }
++void __eqxf2 (void) { abort(); }
++void __nexf2 (void) { abort(); }
++void __gtxf2 (void) { abort(); }
++void __gexf2 (void) { abort(); }
++void __lexf2 (void) { abort(); }
++void __ltxf2 (void) { abort(); }
++
++void __extendsftf2 (void) { abort(); }
++void __extenddftf2 (void) { abort(); }
++void __trunctfdf2 (void) { abort(); }
++void __trunctfsf2 (void) { abort(); }
++void __fixtfsi (void) { abort(); }
++void __floatsitf (void) { abort(); }
++void __addtf3 (void) { abort(); }
++void __subtf3 (void) { abort(); }
++void __multf3 (void) { abort(); }
++void __divtf3 (void) { abort(); }
++void __negtf2 (void) { abort(); }
++void __eqtf2 (void) { abort(); }
++void __netf2 (void) { abort(); }
++void __gttf2 (void) { abort(); }
++void __getf2 (void) { abort(); }
++void __letf2 (void) { abort(); }
++void __lttf2 (void) { abort(); }
++#else /* !EXTENDED_FLOAT_STUBS, rest of file */
++
++/* IEEE "special" number predicates */
++
++#ifdef NO_NANS
++
++#define nan() 0
++#define isnan(x) 0
++#define isinf(x) 0
++#else
++
++#if defined L_thenan_sf
++const fp_number_type __thenan_sf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_df
++const fp_number_type __thenan_df = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined L_thenan_tf
++const fp_number_type __thenan_tf = { CLASS_SNAN, 0, 0, {(fractype) 0} };
++#elif defined TFLOAT
++extern const fp_number_type __thenan_tf;
++#elif defined FLOAT
++extern const fp_number_type __thenan_sf;
++#else
++extern const fp_number_type __thenan_df;
++#endif
++
++INLINE
++static fp_number_type *
++nan (void)
++{
++ /* Discard the const qualifier... */
++#ifdef TFLOAT
++ return (fp_number_type *) (& __thenan_tf);
++#elif defined FLOAT
++ return (fp_number_type *) (& __thenan_sf);
++#else
++ return (fp_number_type *) (& __thenan_df);
++#endif
++}
++
++INLINE
++static int
++isnan ( fp_number_type * x)
++{
++ return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
++}
++
++INLINE
++static int
++isinf ( fp_number_type * x)
++{
++ return x->class == CLASS_INFINITY;
++}
++
++#endif /* NO_NANS */
++
++INLINE
++static int
++iszero ( fp_number_type * x)
++{
++ return x->class == CLASS_ZERO;
++}
++
++INLINE
++static void
++flip_sign ( fp_number_type * x)
++{
++ x->sign = !x->sign;
++}
++
++extern FLO_type pack_d ( fp_number_type * );
++
++#if defined(L_pack_df) || defined(L_pack_sf) || defined(L_pack_tf)
++FLO_type
++pack_d ( fp_number_type * src)
++{
++ FLO_union_type dst;
++ fractype fraction = src->fraction.ll; /* wasn't unsigned before? */
++ int sign = src->sign;
++ int exp = 0;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && (isnan (src) || isinf (src)))
++ {
++ /* We can't represent these values accurately. By using the
++ largest possible magnitude, we guarantee that the conversion
++ of infinity is at least as big as any finite number. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ else if (isnan (src))
++ {
++ exp = EXPMAX;
++ if (src->class == CLASS_QNAN || 1)
++ {
++#ifdef QUIET_NAN_NEGATED
++ fraction |= QUIET_NAN - 1;
++#else
++ fraction |= QUIET_NAN;
++#endif
++ }
++ }
++ else if (isinf (src))
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else if (iszero (src))
++ {
++ exp = 0;
++ fraction = 0;
++ }
++ else if (fraction == 0)
++ {
++ exp = 0;
++ }
++ else
++ {
++ if (src->normal_exp < NORMAL_EXPMIN)
++ {
++#ifdef NO_DENORMALS
++ /* Go straight to a zero representation if denormals are not
++ supported. The denormal handling would be harmless but
++ isn't unnecessary. */
++ exp = 0;
++ fraction = 0;
++#else /* NO_DENORMALS */
++ /* This number's exponent is too low to fit into the bits
++ available in the number, so we'll store 0 in the exponent and
++ shift the fraction to the right to make up for it. */
++
++ int shift = NORMAL_EXPMIN - src->normal_exp;
++
++ exp = 0;
++
++ if (shift > FRAC_NBITS - NGARDS)
++ {
++ /* No point shifting, since it's more that 64 out. */
++ fraction = 0;
++ }
++ else
++ {
++ int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
++ fraction = (fraction >> shift) | lowbit;
++ }
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if ((fraction & (1 << NGARDS)))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add to the guards to round up. */
++ fraction += GARDROUND;
++ }
++ /* Perhaps the rounding means we now need to change the
++ exponent, because the fraction is no longer denormal. */
++ if (fraction >= IMPLICIT_1)
++ {
++ exp += 1;
++ }
++ fraction >>= NGARDS;
++#endif /* NO_DENORMALS */
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS)
++ && src->normal_exp > EXPBIAS)
++ {
++ exp = EXPMAX;
++ fraction = 0;
++ }
++ else
++ {
++ exp = src->normal_exp + EXPBIAS;
++ if (!ROUND_TOWARDS_ZERO)
++ {
++ /* IF the gard bits are the all zero, but the first, then we're
++ half way between two numbers, choose the one which makes the
++ lsb of the answer 0. */
++ if ((fraction & GARDMASK) == GARDMSB)
++ {
++ if (fraction & (1 << NGARDS))
++ fraction += GARDROUND + 1;
++ }
++ else
++ {
++ /* Add a one to the guards to round up */
++ fraction += GARDROUND;
++ }
++ if (fraction >= IMPLICIT_2)
++ {
++ fraction >>= 1;
++ exp += 1;
++ }
++ }
++ fraction >>= NGARDS;
++
++ if (LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp > EXPMAX)
++ {
++ /* Saturate on overflow. */
++ exp = EXPMAX;
++ fraction = ((fractype) 1 << FRACBITS) - 1;
++ }
++ }
++ }
++
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ dst.bits.fraction = fraction;
++ dst.bits.exp = exp;
++ dst.bits.sign = sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low, unity;
++ int lowsign, lowexp;
++
++ unity = (halffractype) 1 << HALFFRACBITS;
++
++ /* Set HIGH to the high double's significand, masking out the implicit 1.
++ Set LOW to the low double's full significand. */
++ high = (fraction >> (FRACBITS - HALFFRACBITS)) & (unity - 1);
++ low = fraction & (unity * 2 - 1);
++
++ /* Get the initial sign and exponent of the low double. */
++ lowexp = exp - HALFFRACBITS - 1;
++ lowsign = sign;
++
++ /* HIGH should be rounded like a normal double, making |LOW| <=
++ 0.5 ULP of HIGH. Assume round-to-nearest. */
++ if (exp < EXPMAX)
++ if (low > unity || (low == unity && (high & 1) == 1))
++ {
++ /* Round HIGH up and adjust LOW to match. */
++ high++;
++ if (high == unity)
++ {
++ /* May make it infinite, but that's OK. */
++ high = 0;
++ exp++;
++ }
++ low = unity * 2 - low;
++ lowsign ^= 1;
++ }
++
++ high |= (halffractype) exp << HALFFRACBITS;
++ high |= (halffractype) sign << (HALFFRACBITS + EXPBITS);
++
++ if (exp == EXPMAX || exp == 0 || low == 0)
++ low = 0;
++ else
++ {
++ while (lowexp > 0 && low < unity)
++ {
++ low <<= 1;
++ lowexp--;
++ }
++
++ if (lowexp <= 0)
++ {
++ halffractype roundmsb, round;
++ int shift;
++
++ shift = 1 - lowexp;
++ roundmsb = (1 << (shift - 1));
++ round = low & ((roundmsb << 1) - 1);
++
++ low >>= shift;
++ lowexp = 0;
++
++ if (round > roundmsb || (round == roundmsb && (low & 1) == 1))
++ {
++ low++;
++ if (low == unity)
++ /* LOW rounds up to the smallest normal number. */
++ lowexp++;
++ }
++ }
++
++ low &= unity - 1;
++ low |= (halffractype) lowexp << HALFFRACBITS;
++ low |= (halffractype) lowsign << (HALFFRACBITS + EXPBITS);
++ }
++ dst.value_raw = ((fractype) high << HALFSHIFT) | low;
++ }
++# else
++ dst.value_raw = fraction & ((((fractype)1) << FRACBITS) - (fractype)1);
++ dst.value_raw |= ((fractype) (exp & ((1 << EXPBITS) - 1))) << FRACBITS;
++ dst.value_raw |= ((fractype) (sign & 1)) << (FRACBITS | EXPBITS);
++# endif
++#endif
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++#ifdef TFLOAT
++ {
++ qrtrfractype tmp1 = dst.words[0];
++ qrtrfractype tmp2 = dst.words[1];
++ dst.words[0] = dst.words[3];
++ dst.words[1] = dst.words[2];
++ dst.words[2] = tmp2;
++ dst.words[3] = tmp1;
++ }
++#else
++ {
++ halffractype tmp = dst.words[0];
++ dst.words[0] = dst.words[1];
++ dst.words[1] = tmp;
++ }
++#endif
++#endif
++
++ return dst.value;
++}
++#endif
++
++#if defined(L_unpack_df) || defined(L_unpack_sf) || defined(L_unpack_tf)
++void
++unpack_d (FLO_union_type * src, fp_number_type * dst)
++{
++ /* We previously used bitfields to store the number, but this doesn't
++ handle little/big endian systems conveniently, so use shifts and
++ masks */
++ fractype fraction;
++ int exp;
++ int sign;
++
++#if defined(FLOAT_WORD_ORDER_MISMATCH) && !defined(FLOAT)
++ FLO_union_type swapped;
++
++#ifdef TFLOAT
++ swapped.words[0] = src->words[3];
++ swapped.words[1] = src->words[2];
++ swapped.words[2] = src->words[1];
++ swapped.words[3] = src->words[0];
++#else
++ swapped.words[0] = src->words[1];
++ swapped.words[1] = src->words[0];
++#endif
++ src = &swapped;
++#endif
++
++#ifdef FLOAT_BIT_ORDER_MISMATCH
++ fraction = src->bits.fraction;
++ exp = src->bits.exp;
++ sign = src->bits.sign;
++#else
++# if defined TFLOAT && defined HALFFRACBITS
++ {
++ halffractype high, low;
++
++ high = src->value_raw >> HALFSHIFT;
++ low = src->value_raw & (((fractype)1 << HALFSHIFT) - 1);
++
++ fraction = high & ((((fractype)1) << HALFFRACBITS) - 1);
++ fraction <<= FRACBITS - HALFFRACBITS;
++ exp = ((int)(high >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(high >> (((HALFFRACBITS + EXPBITS))))) & 1;
++
++ if (exp != EXPMAX && exp != 0 && low != 0)
++ {
++ int lowexp = ((int)(low >> HALFFRACBITS)) & ((1 << EXPBITS) - 1);
++ int lowsign = ((int)(low >> (((HALFFRACBITS + EXPBITS))))) & 1;
++ int shift;
++ fractype xlow;
++
++ xlow = low & ((((fractype)1) << HALFFRACBITS) - 1);
++ if (lowexp)
++ xlow |= (((halffractype)1) << HALFFRACBITS);
++ else
++ lowexp = 1;
++ shift = (FRACBITS - HALFFRACBITS) - (exp - lowexp);
++ if (shift > 0)
++ xlow <<= shift;
++ else if (shift < 0)
++ xlow >>= -shift;
++ if (sign == lowsign)
++ fraction += xlow;
++ else if (fraction >= xlow)
++ fraction -= xlow;
++ else
++ {
++ /* The high part is a power of two but the full number is lower.
++ This code will leave the implicit 1 in FRACTION, but we'd
++ have added that below anyway. */
++ fraction = (((fractype) 1 << FRACBITS) - xlow) << 1;
++ exp--;
++ }
++ }
++ }
++# else
++ fraction = src->value_raw & ((((fractype)1) << FRACBITS) - 1);
++ exp = ((int)(src->value_raw >> FRACBITS)) & ((1 << EXPBITS) - 1);
++ sign = ((int)(src->value_raw >> (FRACBITS + EXPBITS))) & 1;
++# endif
++#endif
++
++ dst->sign = sign;
++ if (exp == 0)
++ {
++ /* Hmm. Looks like 0 */
++ if (fraction == 0
++#ifdef NO_DENORMALS
++ || 1
++#endif
++ )
++ {
++ /* tastes like zero */
++ dst->class = CLASS_ZERO;
++ }
++ else
++ {
++ /* Zero exponent with nonzero fraction - it's denormalized,
++ so there isn't a leading implicit one - we'll shift it so
++ it gets one. */
++ dst->normal_exp = exp - EXPBIAS + 1;
++ fraction <<= NGARDS;
++
++ dst->class = CLASS_NUMBER;
++#if 1
++ while (fraction < IMPLICIT_1)
++ {
++ fraction <<= 1;
++ dst->normal_exp--;
++ }
++#endif
++ dst->fraction.ll = fraction;
++ }
++ }
++ else if (!LARGEST_EXPONENT_IS_NORMAL (FRAC_NBITS) && exp == EXPMAX)
++ {
++ /* Huge exponent*/
++ if (fraction == 0)
++ {
++ /* Attached to a zero fraction - means infinity */
++ dst->class = CLASS_INFINITY;
++ }
++ else
++ {
++ /* Nonzero fraction, means nan */
++#ifdef QUIET_NAN_NEGATED
++ if ((fraction & QUIET_NAN) == 0)
++#else
++ if (fraction & QUIET_NAN)
++#endif
++ {
++ dst->class = CLASS_QNAN;
++ }
++ else
++ {
++ dst->class = CLASS_SNAN;
++ }
++ /* Keep the fraction part as the nan number */
++ dst->fraction.ll = fraction;
++ }
++ }
++ else
++ {
++ /* Nothing strange about this number */
++ dst->normal_exp = exp - EXPBIAS;
++ dst->class = CLASS_NUMBER;
++ dst->fraction.ll = (fraction << NGARDS) | IMPLICIT_1;
++ }
++}
++#endif /* L_unpack_df || L_unpack_sf */
++
++#if defined(L_addsub_sf) || defined(L_addsub_df) || defined(L_addsub_tf)
++static fp_number_type *
++_fpadd_parts (fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ intfrac tfraction;
++
++ /* Put commonly used fields in local variables. */
++ int a_normal_exp;
++ int b_normal_exp;
++ fractype a_fraction;
++ fractype b_fraction;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++ if (isinf (a))
++ {
++ /* Adding infinities with opposite signs yields a NaN. */
++ if (isinf (b) && a->sign != b->sign)
++ return nan ();
++ return a;
++ }
++ if (isinf (b))
++ {
++ return b;
++ }
++ if (iszero (b))
++ {
++ if (iszero (a))
++ {
++ *tmp = *a;
++ tmp->sign = a->sign & b->sign;
++ return tmp;
++ }
++ return a;
++ }
++ if (iszero (a))
++ {
++ return b;
++ }
++
++ /* Got two numbers. shift the smaller and increment the exponent till
++ they're the same */
++ {
++ int diff;
++
++ a_normal_exp = a->normal_exp;
++ b_normal_exp = b->normal_exp;
++ a_fraction = a->fraction.ll;
++ b_fraction = b->fraction.ll;
++
++ diff = a_normal_exp - b_normal_exp;
++
++ if (diff < 0)
++ diff = -diff;
++ if (diff < FRAC_NBITS)
++ {
++ /* ??? This does shifts one bit at a time. Optimize. */
++ while (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp++;
++ LSHIFT (b_fraction);
++ }
++ while (b_normal_exp > a_normal_exp)
++ {
++ a_normal_exp++;
++ LSHIFT (a_fraction);
++ }
++ }
++ else
++ {
++ /* Somethings's up.. choose the biggest */
++ if (a_normal_exp > b_normal_exp)
++ {
++ b_normal_exp = a_normal_exp;
++ b_fraction = 0;
++ }
++ else
++ {
++ a_normal_exp = b_normal_exp;
++ a_fraction = 0;
++ }
++ }
++ }
++
++ if (a->sign != b->sign)
++ {
++ if (a->sign)
++ {
++ tfraction = -a_fraction + b_fraction;
++ }
++ else
++ {
++ tfraction = a_fraction - b_fraction;
++ }
++ if (tfraction >= 0)
++ {
++ tmp->sign = 0;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = tfraction;
++ }
++ else
++ {
++ tmp->sign = 1;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = -tfraction;
++ }
++ /* and renormalize it */
++
++ while (tmp->fraction.ll < IMPLICIT_1 && tmp->fraction.ll)
++ {
++ tmp->fraction.ll <<= 1;
++ tmp->normal_exp--;
++ }
++ }
++ else
++ {
++ tmp->sign = a->sign;
++ tmp->normal_exp = a_normal_exp;
++ tmp->fraction.ll = a_fraction + b_fraction;
++ }
++ tmp->class = CLASS_NUMBER;
++ /* Now the fraction is added, we have to shift down to renormalize the
++ number */
++
++ if (tmp->fraction.ll >= IMPLICIT_2)
++ {
++ LSHIFT (tmp->fraction.ll);
++ tmp->normal_exp++;
++ }
++ return tmp;
++
++}
++
++FLO_type
++add (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++
++FLO_type
++sub (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ b.sign ^= 1;
++
++ res = _fpadd_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_addsub_sf || L_addsub_df */
++
++#if defined(L_mul_sf) || defined(L_mul_df) || defined(L_mul_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpmul_parts ( fp_number_type * a,
++ fp_number_type * b,
++ fp_number_type * tmp)
++{
++ fractype low = 0;
++ fractype high = 0;
++
++ if (isnan (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isnan (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (isinf (a))
++ {
++ if (iszero (b))
++ return nan ();
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (isinf (b))
++ {
++ if (iszero (a))
++ {
++ return nan ();
++ }
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++ if (iszero (a))
++ {
++ a->sign = a->sign != b->sign;
++ return a;
++ }
++ if (iszero (b))
++ {
++ b->sign = a->sign != b->sign;
++ return b;
++ }
++
++ /* Calculate the mantissa by multiplying both numbers to get a
++ twice-as-wide number. */
++ {
++#if defined(NO_DI_MODE) || defined(TFLOAT)
++ {
++ fractype x = a->fraction.ll;
++ fractype ylow = b->fraction.ll;
++ fractype yhigh = 0;
++ int bit;
++
++ /* ??? This does multiplies one bit at a time. Optimize. */
++ for (bit = 0; bit < FRAC_NBITS; bit++)
++ {
++ int carry;
++
++ if (x & 1)
++ {
++ carry = (low += ylow) < ylow;
++ high += yhigh + carry;
++ }
++ yhigh <<= 1;
++ if (ylow & FRACHIGH)
++ {
++ yhigh |= 1;
++ }
++ ylow <<= 1;
++ x >>= 1;
++ }
++ }
++#elif defined(FLOAT)
++ /* Multiplying two USIs to get a UDI, we're safe. */
++ {
++ UDItype answer = (UDItype)a->fraction.ll * (UDItype)b->fraction.ll;
++
++ high = answer >> BITS_PER_SI;
++ low = answer;
++ }
++#else
++ /* fractype is DImode, but we need the result to be twice as wide.
++ Assuming a widening multiply from DImode to TImode is not
++ available, build one by hand. */
++ {
++ USItype nl = a->fraction.ll;
++ USItype nh = a->fraction.ll >> BITS_PER_SI;
++ USItype ml = b->fraction.ll;
++ USItype mh = b->fraction.ll >> BITS_PER_SI;
++ UDItype pp_ll = (UDItype) ml * nl;
++ UDItype pp_hl = (UDItype) mh * nl;
++ UDItype pp_lh = (UDItype) ml * nh;
++ UDItype pp_hh = (UDItype) mh * nh;
++ UDItype res2 = 0;
++ UDItype res0 = 0;
++ UDItype ps_hh__ = pp_hl + pp_lh;
++ if (ps_hh__ < pp_hl)
++ res2 += (UDItype)1 << BITS_PER_SI;
++ pp_hl = (UDItype)(USItype)ps_hh__ << BITS_PER_SI;
++ res0 = pp_ll + pp_hl;
++ if (res0 < pp_ll)
++ res2++;
++ res2 += (ps_hh__ >> BITS_PER_SI) + pp_hh;
++ high = res2;
++ low = res0;
++ }
++#endif
++ }
++
++ tmp->normal_exp = a->normal_exp + b->normal_exp
++ + FRAC_NBITS - (FRACBITS + NGARDS);
++ tmp->sign = a->sign != b->sign;
++ while (high >= IMPLICIT_2)
++ {
++ tmp->normal_exp++;
++ if (high & 1)
++ {
++ low >>= 1;
++ low |= FRACHIGH;
++ }
++ high >>= 1;
++ }
++ while (high < IMPLICIT_1)
++ {
++ tmp->normal_exp--;
++
++ high <<= 1;
++ if (low & FRACHIGH)
++ high |= 1;
++ low <<= 1;
++ }
++ /* rounding is tricky. if we only round if it won't make us round later. */
++#if 0
++ if (low & FRACHIGH2)
++ {
++ if (((high & GARDMASK) != GARDMSB)
++ && (((high + 1) & GARDMASK) == GARDMSB))
++ {
++ /* don't round, it gets done again later. */
++ }
++ else
++ {
++ high++;
++ }
++ }
++#endif
++ if (!ROUND_TOWARDS_ZERO && (high & GARDMASK) == GARDMSB)
++ {
++ if (high & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ high += GARDROUND + 1;
++ }
++ else if (low)
++ {
++ /* but we really weren't half way */
++ high += GARDROUND + 1;
++ }
++ }
++ tmp->fraction.ll = high;
++ tmp->class = CLASS_NUMBER;
++ return tmp;
++}
++
++FLO_type
++multiply (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type tmp;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpmul_parts (&a, &b, &tmp);
++
++ return pack_d (res);
++}
++#endif /* L_mul_sf || L_mul_df */
++
++#if defined(L_div_sf) || defined(L_div_df) || defined(L_div_tf)
++static inline __attribute__ ((__always_inline__)) fp_number_type *
++_fpdiv_parts (fp_number_type * a,
++ fp_number_type * b)
++{
++ fractype bit;
++ fractype numerator;
++ fractype denominator;
++ fractype quotient;
++
++ if (isnan (a))
++ {
++ return a;
++ }
++ if (isnan (b))
++ {
++ return b;
++ }
++
++ a->sign = a->sign ^ b->sign;
++
++ if (isinf (a) || iszero (a))
++ {
++ if (a->class == b->class)
++ return nan ();
++ return a;
++ }
++
++ if (isinf (b))
++ {
++ a->fraction.ll = 0;
++ a->normal_exp = 0;
++ return a;
++ }
++ if (iszero (b))
++ {
++ a->class = CLASS_INFINITY;
++ return a;
++ }
++
++ /* Calculate the mantissa by multiplying both 64bit numbers to get a
++ 128 bit number */
++ {
++ /* quotient =
++ ( numerator / denominator) * 2^(numerator exponent - denominator exponent)
++ */
++
++ a->normal_exp = a->normal_exp - b->normal_exp;
++ numerator = a->fraction.ll;
++ denominator = b->fraction.ll;
++
++ if (numerator < denominator)
++ {
++ /* Fraction will be less than 1.0 */
++ numerator *= 2;
++ a->normal_exp--;
++ }
++ bit = IMPLICIT_1;
++ quotient = 0;
++ /* ??? Does divide one bit at a time. Optimize. */
++ while (bit)
++ {
++ if (numerator >= denominator)
++ {
++ quotient |= bit;
++ numerator -= denominator;
++ }
++ bit >>= 1;
++ numerator *= 2;
++ }
++
++ if (!ROUND_TOWARDS_ZERO && (quotient & GARDMASK) == GARDMSB)
++ {
++ if (quotient & (1 << NGARDS))
++ {
++ /* half way, so round to even */
++ quotient += GARDROUND + 1;
++ }
++ else if (numerator)
++ {
++ /* but we really weren't half way, more bits exist */
++ quotient += GARDROUND + 1;
++ }
++ }
++
++ a->fraction.ll = quotient;
++ return (a);
++ }
++}
++
++FLO_type
++divide (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ fp_number_type *res;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ res = _fpdiv_parts (&a, &b);
++
++ return pack_d (res);
++}
++#endif /* L_div_sf || L_div_df */
++
++#if defined(L_fpcmp_parts_sf) || defined(L_fpcmp_parts_df) \
++ || defined(L_fpcmp_parts_tf)
++/* according to the demo, fpcmp returns a comparison with 0... thus
++ a<b -> -1
++ a==b -> 0
++ a>b -> +1
++ */
++
++int
++__fpcmp_parts (fp_number_type * a, fp_number_type * b)
++{
++#if 0
++ /* either nan -> unordered. Must be checked outside of this routine. */
++ if (isnan (a) && isnan (b))
++ {
++ return 1; /* still unordered! */
++ }
++#endif
++
++ if (isnan (a) || isnan (b))
++ {
++ return 1; /* how to indicate unordered compare? */
++ }
++ if (isinf (a) && isinf (b))
++ {
++ /* +inf > -inf, but +inf != +inf */
++ /* b \a| +inf(0)| -inf(1)
++ ______\+--------+--------
++ +inf(0)| a==b(0)| a<b(-1)
++ -------+--------+--------
++ -inf(1)| a>b(1) | a==b(0)
++ -------+--------+--------
++ So since unordered must be nonzero, just line up the columns...
++ */
++ return b->sign - a->sign;
++ }
++ /* but not both... */
++ if (isinf (a))
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (isinf (b))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (a) && iszero (b))
++ {
++ return 0;
++ }
++ if (iszero (a))
++ {
++ return b->sign ? 1 : -1;
++ }
++ if (iszero (b))
++ {
++ return a->sign ? -1 : 1;
++ }
++ /* now both are "normal". */
++ if (a->sign != b->sign)
++ {
++ /* opposite signs */
++ return a->sign ? -1 : 1;
++ }
++ /* same sign; exponents? */
++ if (a->normal_exp > b->normal_exp)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->normal_exp < b->normal_exp)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* same exponents; check size. */
++ if (a->fraction.ll > b->fraction.ll)
++ {
++ return a->sign ? -1 : 1;
++ }
++ if (a->fraction.ll < b->fraction.ll)
++ {
++ return a->sign ? 1 : -1;
++ }
++ /* after all that, they're equal. */
++ return 0;
++}
++#endif
++
++#if defined(L_compare_sf) || defined(L_compare_df) || defined(L_compoare_tf)
++CMPtype
++compare (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_compare_sf || L_compare_df */
++
++#ifndef US_SOFTWARE_GOFAST
++
++/* These should be optimized for their specific tasks someday. */
++
++#if defined(L_eq_sf) || defined(L_eq_df) || defined(L_eq_tf)
++CMPtype
++_eq_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth == 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_eq_sf || L_eq_df */
++
++#if defined(L_ne_sf) || defined(L_ne_df) || defined(L_ne_tf)
++CMPtype
++_ne_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* true, truth != 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ne_sf || L_ne_df */
++
++#if defined(L_gt_sf) || defined(L_gt_df) || defined(L_gt_tf)
++CMPtype
++_gt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth > 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_gt_sf || L_gt_df */
++
++#if defined(L_ge_sf) || defined(L_ge_df) || defined(L_ge_tf)
++CMPtype
++_ge_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return -1; /* false, truth >= 0 */
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_ge_sf || L_ge_df */
++
++#if defined(L_lt_sf) || defined(L_lt_df) || defined(L_lt_tf)
++CMPtype
++_lt_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth < 0 */
++
++ return __fpcmp_parts (&a, &b);
++}
++#endif /* L_lt_sf || L_lt_df */
++
++#if defined(L_le_sf) || defined(L_le_df) || defined(L_le_tf)
++CMPtype
++_le_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ if (isnan (&a) || isnan (&b))
++ return 1; /* false, truth <= 0 */
++
++ return __fpcmp_parts (&a, &b) ;
++}
++#endif /* L_le_sf || L_le_df */
++
++#endif /* ! US_SOFTWARE_GOFAST */
++
++#if defined(L_unord_sf) || defined(L_unord_df) || defined(L_unord_tf)
++CMPtype
++_unord_f2 (FLO_type arg_a, FLO_type arg_b)
++{
++ fp_number_type a;
++ fp_number_type b;
++ FLO_union_type au, bu;
++
++ au.value = arg_a;
++ bu.value = arg_b;
++
++ unpack_d (&au, &a);
++ unpack_d (&bu, &b);
++
++ return (isnan (&a) || isnan (&b));
++}
++#endif /* L_unord_sf || L_unord_df */
++
++#if defined(L_si_to_sf) || defined(L_si_to_df) || defined(L_si_to_tf)
++FLO_type
++si_to_float (SItype arg_a)
++{
++ fp_number_type in;
++
++ in.class = CLASS_NUMBER;
++ in.sign = arg_a < 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.normal_exp = FRACBITS + NGARDS;
++ if (in.sign)
++ {
++ /* Special case for minint, since there is no +ve integer
++ representation for it */
++ if (arg_a == (- MAX_SI_INT - 1))
++ {
++ return (FLO_type)(- MAX_SI_INT - 1);
++ }
++ in.fraction.ll = (-arg_a);
++ }
++ else
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif /* L_si_to_sf || L_si_to_df */
++
++#if defined(L_usi_to_sf) || defined(L_usi_to_df) || defined(L_usi_to_tf)
++FLO_type
++usi_to_float (USItype arg_a)
++{
++ fp_number_type in;
++
++ in.sign = 0;
++ if (!arg_a)
++ {
++ in.class = CLASS_ZERO;
++ }
++ else
++ {
++ in.class = CLASS_NUMBER;
++ in.normal_exp = FRACBITS + NGARDS;
++ in.fraction.ll = arg_a;
++
++ while (in.fraction.ll > ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll >>= 1;
++ in.normal_exp += 1;
++ }
++ while (in.fraction.ll < ((fractype)1 << (FRACBITS + NGARDS)))
++ {
++ in.fraction.ll <<= 1;
++ in.normal_exp -= 1;
++ }
++ }
++ return pack_d (&in);
++}
++#endif
++
++#if defined(L_sf_to_si) || defined(L_df_to_si) || defined(L_tf_to_si)
++SItype
++float_to_si (FLO_type arg_a)
++{
++ fp_number_type a;
++ SItype tmp;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* get reasonable MAX_SI_INT... */
++ if (isinf (&a))
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 2)
++ return a.sign ? (-MAX_SI_INT)-1 : MAX_SI_INT;
++ tmp = a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++ return a.sign ? (-tmp) : (tmp);
++}
++#endif /* L_sf_to_si || L_df_to_si */
++
++#if defined(L_sf_to_usi) || defined(L_df_to_usi) || defined(L_tf_to_usi)
++#if defined US_SOFTWARE_GOFAST || defined(L_tf_to_usi)
++/* While libgcc2.c defines its own __fixunssfsi and __fixunsdfsi routines,
++ we also define them for GOFAST because the ones in libgcc2.c have the
++ wrong names and I'd rather define these here and keep GOFAST CYG-LOC's
++ out of libgcc2.c. We can't define these here if not GOFAST because then
++ there'd be duplicate copies. */
++
++USItype
++float_to_usi (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ if (iszero (&a))
++ return 0;
++ if (isnan (&a))
++ return 0;
++ /* it is a negative number */
++ if (a.sign)
++ return 0;
++ /* get reasonable MAX_USI_INT... */
++ if (isinf (&a))
++ return MAX_USI_INT;
++ /* it is a number, but a small one */
++ if (a.normal_exp < 0)
++ return 0;
++ if (a.normal_exp > BITS_PER_SI - 1)
++ return MAX_USI_INT;
++ else if (a.normal_exp > (FRACBITS + NGARDS))
++ return a.fraction.ll << (a.normal_exp - (FRACBITS + NGARDS));
++ else
++ return a.fraction.ll >> ((FRACBITS + NGARDS) - a.normal_exp);
++}
++#endif /* US_SOFTWARE_GOFAST */
++#endif /* L_sf_to_usi || L_df_to_usi */
++
++#if defined(L_negate_sf) || defined(L_negate_df) || defined(L_negate_tf)
++FLO_type
++negate (FLO_type arg_a)
++{
++ fp_number_type a;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &a);
++
++ flip_sign (&a);
++ return pack_d (&a);
++}
++#endif /* L_negate_sf || L_negate_df */
++
++#ifdef FLOAT
++
++#if defined(L_make_sf)
++SFtype
++__make_fp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ USItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_sf */
++
++#ifndef FLOAT_ONLY
++
++/* This enables one to build an fp library that supports float but not double.
++ Otherwise, we would get an undefined reference to __make_dp.
++ This is needed for some 8-bit ports that can't handle well values that
++ are 8-bytes in size, so we just don't support double for them at all. */
++
++#if defined(L_sf_to_df)
++DFtype
++sf_to_df (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_dp (in.class, in.sign, in.normal_exp,
++ ((UDItype) in.fraction.ll) << F_D_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#if defined(L_sf_to_tf) && defined(TMODES)
++TFtype
++sf_to_tf (SFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << F_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#endif /* ! FLOAT_ONLY */
++#endif /* FLOAT */
++
++#ifndef FLOAT
++
++extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
++
++#if defined(L_make_df)
++DFtype
++__make_dp (fp_class_type class, unsigned int sign, int exp, UDItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_df */
++
++#if defined(L_df_to_sf)
++SFtype
++df_to_sf (DFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_D_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((USItype) 1 << F_D_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_df_to_sf */
++
++#if defined(L_df_to_tf) && defined(TMODES) \
++ && !defined(FLOAT) && !defined(TFLOAT)
++TFtype
++df_to_tf (DFtype arg_a)
++{
++ fp_number_type in;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ return __make_tp (in.class, in.sign, in.normal_exp,
++ ((UTItype) in.fraction.ll) << D_T_BITOFF);
++}
++#endif /* L_sf_to_df */
++
++#ifdef TFLOAT
++#if defined(L_make_tf)
++TFtype
++__make_tp(fp_class_type class,
++ unsigned int sign,
++ int exp,
++ UTItype frac)
++{
++ fp_number_type in;
++
++ in.class = class;
++ in.sign = sign;
++ in.normal_exp = exp;
++ in.fraction.ll = frac;
++ return pack_d (&in);
++}
++#endif /* L_make_tf */
++
++#if defined(L_tf_to_df)
++DFtype
++tf_to_df (TFtype arg_a)
++{
++ fp_number_type in;
++ UDItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> D_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << D_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_dp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_df */
++
++#if defined(L_tf_to_sf)
++SFtype
++tf_to_sf (TFtype arg_a)
++{
++ fp_number_type in;
++ USItype sffrac;
++ FLO_union_type au;
++
++ au.value = arg_a;
++ unpack_d (&au, &in);
++
++ sffrac = in.fraction.ll >> F_T_BITOFF;
++
++ /* We set the lowest guard bit in SFFRAC if we discarded any non
++ zero bits. */
++ if ((in.fraction.ll & (((UTItype) 1 << F_T_BITOFF) - 1)) != 0)
++ sffrac |= 1;
++
++ return __make_fp (in.class, in.sign, in.normal_exp, sffrac);
++}
++#endif /* L_tf_to_sf */
++#endif /* TFLOAT */
++
++#endif /* ! FLOAT */
++#endif /* !EXTENDED_FLOAT_STUBS */
+--- gcc-3.4.3/gcc/config/nios2/nios2-protos.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2-protos.h
+@@ -0,0 +1,70 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++extern void dump_frame_size (FILE *);
++extern HOST_WIDE_INT compute_frame_size (void);
++extern int nios2_initial_elimination_offset (int, int);
++extern void override_options (void);
++extern void optimization_options (int, int);
++extern int nios2_can_use_return_insn (void);
++extern void expand_prologue (void);
++extern void expand_epilogue (bool);
++extern void function_profiler (FILE *, int);
++
++
++#ifdef RTX_CODE
++extern int nios2_legitimate_address (rtx, enum machine_mode, int);
++extern void nios2_print_operand (FILE *, rtx, int);
++extern void nios2_print_operand_address (FILE *, rtx);
++
++extern int nios2_emit_move_sequence (rtx *, enum machine_mode);
++extern int nios2_emit_expensive_div (rtx *, enum machine_mode);
++
++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx);
++extern void gen_conditional_move (rtx *, enum machine_mode);
++extern const char *asm_output_opcode (FILE *, const char *);
++
++/* predicates */
++extern int arith_operand (rtx, enum machine_mode);
++extern int uns_arith_operand (rtx, enum machine_mode);
++extern int logical_operand (rtx, enum machine_mode);
++extern int shift_operand (rtx, enum machine_mode);
++extern int reg_or_0_operand (rtx, enum machine_mode);
++extern int equality_op (rtx, enum machine_mode);
++extern int custom_insn_opcode (rtx, enum machine_mode);
++extern int rdwrctl_operand (rtx, enum machine_mode);
++
++# ifdef HAVE_MACHINE_MODES
++# if defined TREE_CODE
++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
++extern int nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
++
++# endif /* TREE_CODE */
++# endif /* HAVE_MACHINE_MODES */
++#endif
++
++#ifdef TREE_CODE
++extern int nios2_return_in_memory (tree);
++
++#endif /* TREE_CODE */
+--- gcc-3.4.3/gcc/config/nios2/nios2.c
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.c
+@@ -0,0 +1,2853 @@
++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++#include <stdio.h>
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "rtl.h"
++#include "tree.h"
++#include "tm_p.h"
++#include "regs.h"
++#include "hard-reg-set.h"
++#include "real.h"
++#include "insn-config.h"
++#include "conditions.h"
++#include "output.h"
++#include "insn-attr.h"
++#include "flags.h"
++#include "recog.h"
++#include "expr.h"
++#include "toplev.h"
++#include "basic-block.h"
++#include "function.h"
++#include "ggc.h"
++#include "reload.h"
++#include "debug.h"
++#include "optabs.h"
++#include "target.h"
++#include "target-def.h"
++
++/* local prototypes */
++static bool nios2_rtx_costs (rtx, int, int, int *);
++
++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT);
++static int nios2_use_dfa_pipeline_interface (void);
++static int nios2_issue_rate (void);
++static struct machine_function *nios2_init_machine_status (void);
++static bool nios2_in_small_data_p (tree);
++static rtx save_reg (int, HOST_WIDE_INT, rtx);
++static rtx restore_reg (int, HOST_WIDE_INT);
++static unsigned int nios2_section_type_flags (tree, const char *, int);
++static void nios2_init_builtins (void);
++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
++static bool nios2_function_ok_for_sibcall (tree, tree);
++static void nios2_encode_section_info (tree, rtx, int);
++
++/* Initialize the GCC target structure. */
++#undef TARGET_ASM_FUNCTION_PROLOGUE
++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue
++
++#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
++#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE \
++ nios2_use_dfa_pipeline_interface
++#undef TARGET_SCHED_ISSUE_RATE
++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate
++#undef TARGET_IN_SMALL_DATA_P
++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p
++#undef TARGET_ENCODE_SECTION_INFO
++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info
++#undef TARGET_SECTION_TYPE_FLAGS
++#define TARGET_SECTION_TYPE_FLAGS nios2_section_type_flags
++
++#undef TARGET_INIT_BUILTINS
++#define TARGET_INIT_BUILTINS nios2_init_builtins
++#undef TARGET_EXPAND_BUILTIN
++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin
++
++#undef TARGET_FUNCTION_OK_FOR_SIBCALL
++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall
++
++#undef TARGET_RTX_COSTS
++#define TARGET_RTX_COSTS nios2_rtx_costs
++
++
++struct gcc_target targetm = TARGET_INITIALIZER;
++
++
++
++/* Threshold for data being put into the small data/bss area, instead
++ of the normal data area (references to the small data/bss area take
++ 1 instruction, and use the global pointer, references to the normal
++ data area takes 2 instructions). */
++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE;
++
++
++/* Structure to be filled in by compute_frame_size with register
++ save masks, and offsets for the current function. */
++
++struct nios2_frame_info
++GTY (())
++{
++ long total_size; /* # bytes that the entire frame takes up */
++ long var_size; /* # bytes that variables take up */
++ long args_size; /* # bytes that outgoing arguments take up */
++ int save_reg_size; /* # bytes needed to store gp regs */
++ int save_reg_rounded; /* # bytes needed to store gp regs */
++ long save_regs_offset; /* offset from new sp to store gp registers */
++ int initialized; /* != 0 if frame size already calculated */
++ int num_regs; /* number of gp registers saved */
++};
++
++struct machine_function
++GTY (())
++{
++
++ /* Current frame information, calculated by compute_frame_size. */
++ struct nios2_frame_info frame;
++};
++
++
++/***************************************
++ * Section encodings
++ ***************************************/
++
++
++
++
++
++/***************************************
++ * Stack Layout and Calling Conventions
++ ***************************************/
++
++
++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1))
++#define TEMP_REG_NUM 8
++
++static void
++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
++{
++ if (flag_verbose_asm || flag_debug_asm)
++ {
++ compute_frame_size ();
++ dump_frame_size (file);
++ }
++}
++
++static rtx
++save_reg (int regno, HOST_WIDE_INT offset, rtx cfa_store_reg)
++{
++ rtx insn, stack_slot;
++
++ stack_slot = gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ GEN_INT (offset));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_MEM (SImode, stack_slot),
++ gen_rtx_REG (SImode, regno)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ return insn;
++}
++
++static rtx
++restore_reg (int regno, HOST_WIDE_INT offset)
++{
++ rtx insn, stack_slot;
++
++ if (TOO_BIG_OFFSET (offset))
++ {
++ stack_slot = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ GEN_INT (offset)));
++
++ insn = emit_insn (gen_rtx_SET (SImode,
++ stack_slot,
++ gen_rtx_PLUS (SImode,
++ stack_slot,
++ stack_pointer_rtx)));
++ }
++ else
++ {
++ stack_slot = gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (offset));
++ }
++
++ stack_slot = gen_rtx_MEM (SImode, stack_slot);
++
++ insn = emit_move_insn (gen_rtx_REG (SImode, regno), stack_slot);
++
++ return insn;
++}
++
++
++/* There are two possible paths for prologue expansion,
++- the first is if the total frame size is < 2^15-1. In that
++case all the immediates will fit into the 16-bit immediate
++fields.
++- the second is when the frame size is too big, in that
++case an additional temporary register is used, first
++as a cfa_temp to offset the sp, second as the cfa_store
++register.
++
++See the comment above dwarf2out_frame_debug_expr in
++dwarf2out.c for more explanation of the "rules."
++
++
++Case 1:
++Rule # Example Insn Effect
++2 addi sp, sp, -total_frame_size cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++12 stw ra, offset(sp)
++12 stw r16, offset(sp)
++1 mov fp, sp
++
++Case 2:
++Rule # Example Insn Effect
++6 movi r8, total_frame_size cfa_temp.reg=r8, cfa_temp.offset=total_frame_size
++2 sub sp, sp, r8 cfa.reg=sp, cfa.offset=total_frame_size
++ cfa_store.reg=sp, cfa_store.offset=total_frame_size
++5 add r8, r8, sp cfa_store.reg=r8, cfa_store.offset=0
++12 stw ra, offset(r8)
++12 stw r16, offset(r8)
++1 mov fp, sp
++
++*/
++
++void
++expand_prologue ()
++{
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int cfa_store_offset;
++ rtx insn;
++ rtx cfa_store_reg = 0;
++
++ total_frame_size = compute_frame_size ();
++
++ if (total_frame_size)
++ {
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ /* cfa_temp and cfa_store_reg are the same register,
++ cfa_store_reg overwrites cfa_temp */
++ cfa_store_reg = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ cfa_store_reg,
++ GEN_INT (total_frame_size)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_MINUS (SImode,
++ stack_pointer_rtx,
++ cfa_store_reg));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++
++ /* if there are no registers to save, I don't need to
++ create a cfa_store */
++ if (cfun->machine->frame.save_reg_size)
++ {
++ insn = gen_rtx_SET (SImode,
++ cfa_store_reg,
++ gen_rtx_PLUS (SImode,
++ cfa_store_reg,
++ stack_pointer_rtx));
++
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ cfa_store_offset
++ = total_frame_size
++ - (cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded);
++ }
++ else
++ {
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ GEN_INT (-total_frame_size)));
++ insn = emit_insn (insn);
++ RTX_FRAME_RELATED_P (insn) = 1;
++
++ cfa_store_reg = stack_pointer_rtx;
++ cfa_store_offset
++ = cfun->machine->frame.save_regs_offset
++ + cfun->machine->frame.save_reg_rounded;
++ }
++ }
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (RA_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ cfa_store_offset -= 4;
++ save_reg (FP_REGNO, cfa_store_offset, cfa_store_reg);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ cfa_store_offset -= 4;
++ save_reg (i, cfa_store_offset, cfa_store_reg);
++ }
++ }
++
++ if (frame_pointer_needed)
++ {
++ insn = emit_insn (gen_rtx_SET (SImode,
++ gen_rtx_REG (SImode, FP_REGNO),
++ gen_rtx_REG (SImode, SP_REGNO)));
++
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
++
++ /* If we are profiling, make sure no instructions are scheduled before
++ the call to mcount. */
++ if (current_function_profile)
++ emit_insn (gen_blockage ());
++}
++
++void
++expand_epilogue (bool sibcall_p)
++{
++ rtx insn;
++ int i;
++ HOST_WIDE_INT total_frame_size;
++ int register_store_offset;
++
++ total_frame_size = compute_frame_size ();
++
++ if (!sibcall_p && nios2_can_use_return_insn ())
++ {
++ insn = emit_jump_insn (gen_return ());
++ return;
++ }
++
++ emit_insn (gen_blockage ());
++
++ register_store_offset =
++ cfun->machine->frame.save_regs_offset +
++ cfun->machine->frame.save_reg_rounded;
++
++ if (MUST_SAVE_REGISTER (RA_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (RA_REGNO, register_store_offset);
++ }
++
++ if (MUST_SAVE_REGISTER (FP_REGNO))
++ {
++ register_store_offset -= 4;
++ restore_reg (FP_REGNO, register_store_offset);
++ }
++
++ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
++ {
++ if (MUST_SAVE_REGISTER (i) && i != FP_REGNO && i != RA_REGNO)
++ {
++ register_store_offset -= 4;
++ restore_reg (i, register_store_offset);
++ }
++ }
++
++ if (total_frame_size)
++ {
++ rtx sp_adjust;
++
++ if (TOO_BIG_OFFSET (total_frame_size))
++ {
++ sp_adjust = gen_rtx_REG (SImode, TEMP_REG_NUM);
++ insn = emit_insn (gen_rtx_SET (SImode,
++ sp_adjust,
++ GEN_INT (total_frame_size)));
++
++ }
++ else
++ {
++ sp_adjust = GEN_INT (total_frame_size);
++ }
++
++ insn = gen_rtx_SET (SImode,
++ stack_pointer_rtx,
++ gen_rtx_PLUS (SImode,
++ stack_pointer_rtx,
++ sp_adjust));
++ insn = emit_insn (insn);
++ }
++
++
++ if (!sibcall_p)
++ {
++ insn = emit_jump_insn (gen_return_from_epilogue (gen_rtx (REG, Pmode,
++ RA_REGNO)));
++ }
++}
++
++
++bool
++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
++{
++ return true;
++}
++
++
++
++
++
++/* ----------------------- *
++ * Profiling
++ * ----------------------- */
++
++void
++function_profiler (FILE *file, int labelno)
++{
++ fprintf (file, "\t%s mcount begin, label: .LP%d\n",
++ ASM_COMMENT_START, labelno);
++ fprintf (file, "\tnextpc\tr8\n");
++ fprintf (file, "\tmov\tr9, ra\n");
++ fprintf (file, "\tmovhi\tr10, %%hiadj(.LP%d)\n", labelno);
++ fprintf (file, "\taddi\tr10, r10, %%lo(.LP%d)\n", labelno);
++ fprintf (file, "\tcall\tmcount\n");
++ fprintf (file, "\tmov\tra, r9\n");
++ fprintf (file, "\t%s mcount end\n", ASM_COMMENT_START);
++}
++
++
++/***************************************
++ * Stack Layout
++ ***************************************/
++
++
++void
++dump_frame_size (FILE *file)
++{
++ fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START);
++
++ fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.total_size);
++ fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.var_size);
++ fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.args_size);
++ fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_size);
++ fprintf (file, "\t%s save_reg_rounded = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_reg_rounded);
++ fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.initialized);
++ fprintf (file, "\t%s num_regs = %d\n", ASM_COMMENT_START,
++ cfun->machine->frame.num_regs);
++ fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START,
++ cfun->machine->frame.save_regs_offset);
++ fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START,
++ current_function_is_leaf);
++ fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START,
++ frame_pointer_needed);
++ fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START,
++ current_function_pretend_args_size);
++
++}
++
++
++/* Return the bytes needed to compute the frame pointer from the current
++ stack pointer.
++*/
++
++HOST_WIDE_INT
++compute_frame_size ()
++{
++ unsigned int regno;
++ HOST_WIDE_INT var_size; /* # of var. bytes allocated */
++ HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up */
++ HOST_WIDE_INT save_reg_size; /* # bytes needed to store callee save regs */
++ HOST_WIDE_INT save_reg_rounded;
++ /* # bytes needed to store callee save regs (rounded) */
++ HOST_WIDE_INT out_args_size; /* # bytes needed for outgoing args */
++
++ save_reg_size = 0;
++ var_size = STACK_ALIGN (get_frame_size ());
++ out_args_size = STACK_ALIGN (current_function_outgoing_args_size);
++
++ total_size = var_size + out_args_size;
++
++ /* Calculate space needed for gp registers. */
++ for (regno = 0; regno <= FIRST_PSEUDO_REGISTER; regno++)
++ {
++ if (MUST_SAVE_REGISTER (regno))
++ {
++ save_reg_size += 4;
++ }
++ }
++
++ save_reg_rounded = STACK_ALIGN (save_reg_size);
++ total_size += save_reg_rounded;
++
++ total_size += STACK_ALIGN (current_function_pretend_args_size);
++
++ /* Save other computed information. */
++ cfun->machine->frame.total_size = total_size;
++ cfun->machine->frame.var_size = var_size;
++ cfun->machine->frame.args_size = current_function_outgoing_args_size;
++ cfun->machine->frame.save_reg_size = save_reg_size;
++ cfun->machine->frame.save_reg_rounded = save_reg_rounded;
++ cfun->machine->frame.initialized = reload_completed;
++ cfun->machine->frame.num_regs = save_reg_size / UNITS_PER_WORD;
++
++ cfun->machine->frame.save_regs_offset
++ = save_reg_rounded ? current_function_outgoing_args_size + var_size : 0;
++
++ return total_size;
++}
++
++
++int
++nios2_initial_elimination_offset (int from, int to ATTRIBUTE_UNUSED)
++{
++ int offset;
++
++ /* Set OFFSET to the offset from the stack pointer. */
++ switch (from)
++ {
++ case FRAME_POINTER_REGNUM:
++ offset = 0;
++ break;
++
++ case ARG_POINTER_REGNUM:
++ compute_frame_size ();
++ offset = cfun->machine->frame.total_size;
++ offset -= current_function_pretend_args_size;
++ break;
++
++ case RETURN_ADDRESS_POINTER_REGNUM:
++ compute_frame_size ();
++ /* since the return address is always the first of the
++ saved registers, return the offset to the beginning
++ of the saved registers block */
++ offset = cfun->machine->frame.save_regs_offset;
++ break;
++
++ default:
++ abort ();
++ }
++
++ return offset;
++}
++
++/* Return nonzero if this function is known to have a null epilogue.
++ This allows the optimizer to omit jumps to jumps if no stack
++ was created. */
++int
++nios2_can_use_return_insn ()
++{
++ if (!reload_completed)
++ return 0;
++
++ if (regs_ever_live[RA_REGNO] || current_function_profile)
++ return 0;
++
++ if (cfun->machine->frame.initialized)
++ return cfun->machine->frame.total_size == 0;
++
++ return compute_frame_size () == 0;
++}
++
++
++
++
++
++/***************************************
++ *
++ ***************************************/
++
++const char *nios2_sys_nosys_string; /* for -msys=nosys */
++const char *nios2_sys_lib_string; /* for -msys-lib= */
++const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++void
++override_options ()
++{
++ /* Function to allocate machine-dependent function status. */
++ init_machine_status = &nios2_init_machine_status;
++
++ nios2_section_threshold
++ = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE;
++
++ if (nios2_sys_nosys_string && *nios2_sys_nosys_string)
++ {
++ error ("invalid option '-msys=nosys%s'", nios2_sys_nosys_string);
++ }
++
++ /* If we don't have mul, we don't have mulx either! */
++ if (!TARGET_HAS_MUL && TARGET_HAS_MULX)
++ {
++ target_flags &= ~HAS_MULX_FLAG;
++ }
++
++}
++
++void
++optimization_options (int level, int size)
++{
++ if (level || size)
++ {
++ target_flags |= INLINE_MEMCPY_FLAG;
++ }
++
++ if (level >= 3 && !size)
++ {
++ target_flags |= FAST_SW_DIV_FLAG;
++ }
++}
++
++/* Allocate a chunk of memory for per-function machine-dependent data. */
++static struct machine_function *
++nios2_init_machine_status ()
++{
++ return ((struct machine_function *)
++ ggc_alloc_cleared (sizeof (struct machine_function)));
++}
++
++
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++/* Compute a (partial) cost for rtx X. Return true if the complete
++ cost has been computed, and false if subexpressions should be
++ scanned. In either case, *TOTAL contains the cost result. */
++
++
++
++static bool
++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
++{
++ switch (code)
++ {
++ case CONST_INT:
++ if (INTVAL (x) == 0)
++ {
++ *total = COSTS_N_INSNS (0);
++ return true;
++ }
++ else if (SMALL_INT (INTVAL (x))
++ || SMALL_INT_UNSIGNED (INTVAL (x))
++ || UPPER16_INT (INTVAL (x)))
++ {
++ *total = COSTS_N_INSNS (2);
++ return true;
++ }
++ else
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case LABEL_REF:
++ case SYMBOL_REF:
++ /* ??? gp relative stuff will fit in here */
++ /* fall through */
++ case CONST:
++ case CONST_DOUBLE:
++ {
++ *total = COSTS_N_INSNS (4);
++ return true;
++ }
++
++ case MULT:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++ case SIGN_EXTEND:
++ {
++ *total = COSTS_N_INSNS (3);
++ return false;
++ }
++ case ZERO_EXTEND:
++ {
++ *total = COSTS_N_INSNS (1);
++ return false;
++ }
++
++ default:
++ return false;
++ }
++}
++
++
++/***************************************
++ * INSTRUCTION SUPPORT
++ *
++ * These functions are used within the Machine Description to
++ * handle common or complicated output and expansions from
++ * instructions.
++ ***************************************/
++
++int
++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode)
++{
++ rtx to = operands[0];
++ rtx from = operands[1];
++
++ if (!register_operand (to, mode) && !reg_or_0_operand (from, mode))
++ {
++ if (no_new_pseudos)
++ internal_error ("Trying to force_reg no_new_pseudos == 1");
++ from = copy_to_mode_reg (mode, from);
++ }
++
++ operands[0] = to;
++ operands[1] = from;
++ return 0;
++}
++
++/* Divide Support */
++
++/*
++ If -O3 is used, we want to output a table lookup for
++ divides between small numbers (both num and den >= 0
++ and < 0x10). The overhead of this method in the worse
++ case is 40 bytes in the text section (10 insns) and
++ 256 bytes in the data section. Additional divides do
++ not incur additional penalties in the data section.
++
++ Code speed is improved for small divides by about 5x
++ when using this method in the worse case (~9 cycles
++ vs ~45). And in the worse case divides not within the
++ table are penalized by about 10% (~5 cycles vs ~45).
++ However in the typical case the penalty is not as bad
++ because doing the long divide in only 45 cycles is
++ quite optimistic.
++
++ ??? It would be nice to have some benchmarks other
++ than Dhrystone to back this up.
++
++ This bit of expansion is to create this instruction
++ sequence as rtl.
++ or $8, $4, $5
++ slli $9, $4, 4
++ cmpgeui $3, $8, 16
++ beq $3, $0, .L3
++ or $10, $9, $5
++ add $12, $11, divide_table
++ ldbu $2, 0($12)
++ br .L1
++.L3:
++ call slow_div
++.L1:
++# continue here with result in $2
++
++ ??? Ideally I would like the emit libcall block to contain
++ all of this code, but I don't know how to do that. What it
++ means is that if the divide can be eliminated, it may not
++ completely disappear.
++
++ ??? The __divsi3_table label should ideally be moved out
++ of this block and into a global. If it is placed into the
++ sdata section we can save even more cycles by doing things
++ gp relative.
++*/
++int
++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode)
++{
++ rtx or_result, shift_left_result;
++ rtx lookup_value;
++ rtx lab1, lab3;
++ rtx insns;
++ rtx libfunc;
++ rtx final_result;
++ rtx tmp;
++
++ /* it may look a little generic, but only SImode
++ is supported for now */
++ if (mode != SImode)
++ abort ();
++
++ libfunc = sdiv_optab->handlers[(int) SImode].libfunc;
++
++
++
++ lab1 = gen_label_rtx ();
++ lab3 = gen_label_rtx ();
++
++ or_result = expand_simple_binop (SImode, IOR,
++ operands[1], operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0,
++ GET_MODE (or_result), 0, lab3);
++ JUMP_LABEL (get_last_insn ()) = lab3;
++
++ shift_left_result = expand_simple_binop (SImode, ASHIFT,
++ operands[1], GEN_INT (4),
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ lookup_value = expand_simple_binop (SImode, IOR,
++ shift_left_result, operands[2],
++ 0, 0, OPTAB_LIB_WIDEN);
++
++ convert_move (operands[0],
++ gen_rtx (MEM, QImode,
++ gen_rtx (PLUS, SImode,
++ lookup_value,
++ gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))),
++ 1);
++
++
++ tmp = emit_jump_insn (gen_jump (lab1));
++ JUMP_LABEL (tmp) = lab1;
++ emit_barrier ();
++
++ emit_label (lab3);
++ LABEL_NUSES (lab3) = 1;
++
++ start_sequence ();
++ final_result = emit_library_call_value (libfunc, NULL_RTX,
++ LCT_CONST, SImode, 2,
++ operands[1], SImode,
++ operands[2], SImode);
++
++
++ insns = get_insns ();
++ end_sequence ();
++ emit_libcall_block (insns, operands[0], final_result,
++ gen_rtx (DIV, SImode, operands[1], operands[2]));
++
++ emit_label (lab1);
++ LABEL_NUSES (lab1) = 1;
++ return 1;
++}
++
++/* Branches/Compares */
++
++/* the way of handling branches/compares
++ in gcc is heavily borrowed from MIPS */
++
++enum internal_test
++{
++ ITEST_EQ,
++ ITEST_NE,
++ ITEST_GT,
++ ITEST_GE,
++ ITEST_LT,
++ ITEST_LE,
++ ITEST_GTU,
++ ITEST_GEU,
++ ITEST_LTU,
++ ITEST_LEU,
++ ITEST_MAX
++};
++
++static enum internal_test map_test_to_internal_test (enum rtx_code);
++
++/* Cached operands, and operator to compare for use in set/branch/trap
++ on condition codes. */
++rtx branch_cmp[2];
++enum cmp_type branch_type;
++
++/* Make normal rtx_code into something we can index from an array */
++
++static enum internal_test
++map_test_to_internal_test (enum rtx_code test_code)
++{
++ enum internal_test test = ITEST_MAX;
++
++ switch (test_code)
++ {
++ case EQ:
++ test = ITEST_EQ;
++ break;
++ case NE:
++ test = ITEST_NE;
++ break;
++ case GT:
++ test = ITEST_GT;
++ break;
++ case GE:
++ test = ITEST_GE;
++ break;
++ case LT:
++ test = ITEST_LT;
++ break;
++ case LE:
++ test = ITEST_LE;
++ break;
++ case GTU:
++ test = ITEST_GTU;
++ break;
++ case GEU:
++ test = ITEST_GEU;
++ break;
++ case LTU:
++ test = ITEST_LTU;
++ break;
++ case LEU:
++ test = ITEST_LEU;
++ break;
++ default:
++ break;
++ }
++
++ return test;
++}
++
++/* Generate the code to compare (and possibly branch) two integer values
++ TEST_CODE is the comparison code we are trying to emulate
++ (or implement directly)
++ RESULT is where to store the result of the comparison,
++ or null to emit a branch
++ CMP0 CMP1 are the two comparison operands
++ DESTINATION is the destination of the branch, or null to only compare
++ */
++
++void
++gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */
++ rtx result, /* result to store comp. or 0 if branch */
++ rtx cmp0, /* first operand to compare */
++ rtx cmp1, /* second operand to compare */
++ rtx destination) /* destination of the branch, or 0 if compare */
++{
++ struct cmp_info
++ {
++ /* for register (or 0) compares */
++ enum rtx_code test_code_reg; /* code to use in instruction (LT vs. LTU) */
++ int reverse_regs; /* reverse registers in test */
++
++ /* for immediate compares */
++ enum rtx_code test_code_const;
++ /* code to use in instruction (LT vs. LTU) */
++ int const_low; /* low bound of constant we can accept */
++ int const_high; /* high bound of constant we can accept */
++ int const_add; /* constant to add */
++
++ /* generic info */
++ int unsignedp; /* != 0 for unsigned comparisons. */
++ };
++
++ static const struct cmp_info info[(int) ITEST_MAX] = {
++
++ {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ */
++ {NE, 0, NE, -32768, 32767, 0, 0}, /* NE */
++
++ {LT, 1, GE, -32769, 32766, 1, 0}, /* GT */
++ {GE, 0, GE, -32768, 32767, 0, 0}, /* GE */
++ {LT, 0, LT, -32768, 32767, 0, 0}, /* LT */
++ {GE, 1, LT, -32769, 32766, 1, 0}, /* LE */
++
++ {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */
++ {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */
++ {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */
++ {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */
++ };
++
++ enum internal_test test;
++ enum machine_mode mode;
++ const struct cmp_info *p_info;
++ int branch_p;
++
++
++
++
++ test = map_test_to_internal_test (test_code);
++ if (test == ITEST_MAX)
++ abort ();
++
++ p_info = &info[(int) test];
++
++ mode = GET_MODE (cmp0);
++ if (mode == VOIDmode)
++ mode = GET_MODE (cmp1);
++
++ branch_p = (destination != 0);
++
++ /* We can't, under any circumstances, have const_ints in cmp0
++ ??? Actually we could have const0 */
++ if (GET_CODE (cmp0) == CONST_INT)
++ cmp0 = force_reg (mode, cmp0);
++
++ /* if the comparison is against an int not in legal range
++ move it into a register */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (cmp1);
++
++ if (value < p_info->const_low || value > p_info->const_high)
++ cmp1 = force_reg (mode, cmp1);
++ }
++
++ /* Comparison to constants, may involve adding 1 to change a GT into GE.
++ Comparison between two registers, may involve switching operands. */
++ if (GET_CODE (cmp1) == CONST_INT)
++ {
++ if (p_info->const_add != 0)
++ {
++ HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
++
++ /* If modification of cmp1 caused overflow,
++ we would get the wrong answer if we follow the usual path;
++ thus, x > 0xffffffffU would turn into x > 0U. */
++ if ((p_info->unsignedp
++ ? (unsigned HOST_WIDE_INT) new >
++ (unsigned HOST_WIDE_INT) INTVAL (cmp1)
++ : new > INTVAL (cmp1)) != (p_info->const_add > 0))
++ {
++ /* ??? This case can never happen with the current numbers,
++ but I am paranoid and would rather an abort than
++ a bug I will never find */
++ abort ();
++ }
++ else
++ cmp1 = GEN_INT (new);
++ }
++ }
++
++ else if (p_info->reverse_regs)
++ {
++ rtx temp = cmp0;
++ cmp0 = cmp1;
++ cmp1 = temp;
++ }
++
++
++
++ if (branch_p)
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ rtx insn;
++ rtx cond = gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1);
++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ insn = gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond, label, pc_rtx));
++ emit_jump_insn (insn);
++ }
++ else
++ {
++ rtx cond, label;
++
++ result = gen_reg_rtx (mode);
++
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++
++ cond = gen_rtx (NE, mode, result, const0_rtx);
++ label = gen_rtx_LABEL_REF (VOIDmode, destination);
++
++ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx,
++ gen_rtx_IF_THEN_ELSE (VOIDmode,
++ cond,
++ label, pc_rtx)));
++ }
++ }
++ else
++ {
++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode))
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_reg, mode, cmp0, cmp1));
++ }
++ else
++ {
++ emit_move_insn (result,
++ gen_rtx (p_info->test_code_const, mode, cmp0,
++ cmp1));
++ }
++ }
++
++}
++
++
++/* ??? For now conditional moves are only supported
++ when the mode of the operands being compared are
++ the same as the ones being moved */
++
++void
++gen_conditional_move (rtx *operands, enum machine_mode mode)
++{
++ rtx insn, cond;
++ rtx cmp_reg = gen_reg_rtx (mode);
++ enum rtx_code cmp_code = GET_CODE (operands[1]);
++ enum rtx_code move_code = EQ;
++
++ /* emit a comparison if it is not "simple".
++ Simple comparisons are X eq 0 and X ne 0 */
++ if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[0];
++ move_code = cmp_code;
++ }
++ else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx)
++ {
++ cmp_reg = branch_cmp[1];
++ move_code = cmp_code == EQ ? NE : EQ;
++ }
++ else
++ gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1],
++ NULL_RTX);
++
++ cond = gen_rtx (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode));
++ insn = gen_rtx_SET (mode, operands[0],
++ gen_rtx_IF_THEN_ELSE (mode,
++ cond, operands[2], operands[3]));
++ emit_insn (insn);
++}
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++int
++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int strict)
++{
++ int ret_val = 0;
++
++ switch (GET_CODE (operand))
++ {
++ /* direct. */
++ case SYMBOL_REF:
++ if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand))
++ {
++ ret_val = 1;
++ break;
++ }
++ /* else, fall through */
++ case LABEL_REF:
++ case CONST_INT:
++ case CONST:
++ case CONST_DOUBLE:
++ /* ??? In here I need to add gp addressing */
++ ret_val = 0;
++
++ break;
++
++ /* Register indirect. */
++ case REG:
++ ret_val = REG_OK_FOR_BASE_P2 (operand, strict);
++ break;
++
++ /* Register indirect with displacement */
++ case PLUS:
++ {
++ rtx op0 = XEXP (operand, 0);
++ rtx op1 = XEXP (operand, 1);
++
++ if (REG_P (op0) && REG_P (op1))
++ ret_val = 0;
++ else if (REG_P (op0) && CONSTANT_P (op1))
++ ret_val = REG_OK_FOR_BASE_P2 (op0, strict)
++ && SMALL_INT (INTVAL (op1));
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ ret_val = REG_OK_FOR_BASE_P2 (op1, strict)
++ && SMALL_INT (INTVAL (op0));
++ else
++ ret_val = 0;
++ }
++ break;
++
++ default:
++ ret_val = 0;
++ break;
++ }
++
++ return ret_val;
++}
++
++/* Return true if EXP should be placed in the small data section. */
++
++static bool
++nios2_in_small_data_p (tree exp)
++{
++ /* We want to merge strings, so we never consider them small data. */
++ if (TREE_CODE (exp) == STRING_CST)
++ return false;
++
++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
++ {
++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp));
++ /* ??? these string names need moving into
++ an array in some header file */
++ if (nios2_section_threshold > 0
++ && (strcmp (section, ".sbss") == 0
++ || strncmp (section, ".sbss.", 6) == 0
++ || strcmp (section, ".sdata") == 0
++ || strncmp (section, ".sdata.", 7) == 0))
++ return true;
++ }
++ else if (TREE_CODE (exp) == VAR_DECL)
++ {
++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
++
++ /* If this is an incomplete type with size 0, then we can't put it
++ in sdata because it might be too big when completed. */
++ if (size > 0 && size <= nios2_section_threshold)
++ return true;
++ }
++
++ return false;
++}
++
++static void
++nios2_encode_section_info (tree decl, rtx rtl, int first)
++{
++
++ rtx symbol;
++ int flags;
++
++ default_encode_section_info (decl, rtl, first);
++
++ /* Careful not to prod global register variables. */
++ if (GET_CODE (rtl) != MEM)
++ return;
++ symbol = XEXP (rtl, 0);
++ if (GET_CODE (symbol) != SYMBOL_REF)
++ return;
++
++ flags = SYMBOL_REF_FLAGS (symbol);
++
++ /* We don't want weak variables to be addressed with gp in case they end up with
++ value 0 which is not within 2^15 of $gp */
++ if (DECL_P (decl) && DECL_WEAK (decl))
++ flags |= SYMBOL_FLAG_WEAK_DECL;
++
++ SYMBOL_REF_FLAGS (symbol) = flags;
++}
++
++
++static unsigned int
++nios2_section_type_flags (tree decl, const char *name, int reloc)
++{
++ unsigned int flags;
++
++ flags = default_section_type_flags (decl, name, reloc);
++
++ /* ??? these string names need moving into an array in some header file */
++ if (strcmp (name, ".sbss") == 0
++ || strncmp (name, ".sbss.", 6) == 0
++ || strcmp (name, ".sdata") == 0
++ || strncmp (name, ".sdata.", 7) == 0)
++ flags |= SECTION_SMALL;
++
++ return flags;
++}
++
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++
++/* print the operand OP to file stream
++ FILE modified by LETTER. LETTER
++ can be one of:
++ i: print "i" if OP is an immediate, except 0
++ o: print "io" if OP is volatile
++
++ z: for const0_rtx print $0 instead of 0
++ H: for %hiadj
++ L: for %lo
++ U: for upper half of 32 bit value
++ */
++
++void
++nios2_print_operand (FILE *file, rtx op, int letter)
++{
++
++ switch (letter)
++ {
++ case 'i':
++ if (CONSTANT_P (op) && (op != const0_rtx))
++ fprintf (file, "i");
++ return;
++
++ case 'o':
++ if (GET_CODE (op) == MEM
++ && ((MEM_VOLATILE_P (op) && !TARGET_CACHE_VOLATILE)
++ || TARGET_BYPASS_CACHE))
++ fprintf (file, "io");
++ return;
++
++ default:
++ break;
++ }
++
++ if (comparison_operator (op, VOIDmode))
++ {
++ if (letter == 0)
++ {
++ fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op)));
++ return;
++ }
++ }
++
++
++ switch (GET_CODE (op))
++ {
++ case REG:
++ if (letter == 0 || letter == 'z')
++ {
++ fprintf (file, "%s", reg_names[REGNO (op)]);
++ return;
++ }
++
++ case CONST_INT:
++ if (INTVAL (op) == 0 && letter == 'z')
++ {
++ fprintf (file, "zero");
++ return;
++ }
++ else if (letter == 'U')
++ {
++ HOST_WIDE_INT val = INTVAL (op);
++ rtx new_op;
++ val = (val / 65536) & 0xFFFF;
++ new_op = GEN_INT (val);
++ output_addr_const (file, new_op);
++ return;
++ }
++
++ /* else, fall through */
++ case CONST:
++ case LABEL_REF:
++ case SYMBOL_REF:
++ case CONST_DOUBLE:
++ if (letter == 0 || letter == 'z')
++ {
++ output_addr_const (file, op);
++ return;
++ }
++ else if (letter == 'H')
++ {
++ fprintf (file, "%%hiadj(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++ else if (letter == 'L')
++ {
++ fprintf (file, "%%lo(");
++ output_addr_const (file, op);
++ fprintf (file, ")");
++ return;
++ }
++
++
++ case SUBREG:
++ case MEM:
++ if (letter == 0)
++ {
++ output_address (op);
++ return;
++ }
++
++ case CODE_LABEL:
++ if (letter == 0)
++ {
++ output_addr_const (file, op);
++ return;
++ }
++
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print (%c) ", letter);
++ debug_rtx (op);
++ abort ();
++}
++
++static int gprel_constant (rtx);
++
++static int
++gprel_constant (rtx op)
++{
++ if (GET_CODE (op) == SYMBOL_REF
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op))
++ {
++ return 1;
++ }
++ else if (GET_CODE (op) == CONST
++ && GET_CODE (XEXP (op, 0)) == PLUS)
++ {
++ return gprel_constant (XEXP (XEXP (op, 0), 0));
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++void
++nios2_print_operand_address (FILE *file, rtx op)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST:
++ case CONST_INT:
++ case LABEL_REF:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ if (gprel_constant (op))
++ {
++ fprintf (file, "%%gprel(");
++ output_addr_const (file, op);
++ fprintf (file, ")(%s)", reg_names[GP_REGNO]);
++ return;
++ }
++
++ break;
++
++ case PLUS:
++ {
++ rtx op0 = XEXP (op, 0);
++ rtx op1 = XEXP (op, 1);
++
++ if (REG_P (op0) && CONSTANT_P (op1))
++ {
++ output_addr_const (file, op1);
++ fprintf (file, "(%s)", reg_names[REGNO (op0)]);
++ return;
++ }
++ else if (REG_P (op1) && CONSTANT_P (op0))
++ {
++ output_addr_const (file, op0);
++ fprintf (file, "(%s)", reg_names[REGNO (op1)]);
++ return;
++ }
++ }
++ break;
++
++ case REG:
++ fprintf (file, "0(%s)", reg_names[REGNO (op)]);
++ return;
++
++ case MEM:
++ {
++ rtx base = XEXP (op, 0);
++ PRINT_OPERAND_ADDRESS (file, base);
++ return;
++ }
++ default:
++ break;
++ }
++
++ fprintf (stderr, "Missing way to print address\n");
++ debug_rtx (op);
++ abort ();
++}
++
++
++
++
++
++/****************************
++ * Predicates
++ ****************************/
++
++int
++arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++uns_arith_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++logical_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT
++ && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op))))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++shift_operand (rtx op, enum machine_mode mode)
++{
++ if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op)))
++ return 1;
++
++ return register_operand (op, mode);
++}
++
++int
++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op));
++}
++
++/* Return truth value of whether OP is a register or the constant 0. */
++
++int
++reg_or_0_operand (rtx op, enum machine_mode mode)
++{
++ switch (GET_CODE (op))
++ {
++ case CONST_INT:
++ return INTVAL (op) == 0;
++
++ case CONST_DOUBLE:
++ return op == CONST0_RTX (mode);
++
++ default:
++ break;
++ }
++
++ return register_operand (op, mode);
++}
++
++
++int
++equality_op (rtx op, enum machine_mode mode)
++{
++ if (mode != GET_MODE (op))
++ return 0;
++
++ return GET_CODE (op) == EQ || GET_CODE (op) == NE;
++}
++
++int
++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
++{
++ return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op));
++}
++
++
++
++
++
++
++
++/*****************************************************************************
++**
++** instruction scheduler
++**
++*****************************************************************************/
++static int
++nios2_use_dfa_pipeline_interface ()
++{
++ return 1;
++}
++
++
++static int
++nios2_issue_rate ()
++{
++#ifdef MAX_DFA_ISSUE_RATE
++ return MAX_DFA_ISSUE_RATE;
++#else
++ return 1;
++#endif
++}
++
++
++const char *
++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED,
++ const char *ptr ATTRIBUTE_UNUSED)
++{
++ const char *p;
++
++ p = ptr;
++ return ptr;
++}
++
++
++
++/*****************************************************************************
++**
++** function arguments
++**
++*****************************************************************************/
++
++void
++init_cumulative_args (CUMULATIVE_ARGS *cum,
++ tree fntype ATTRIBUTE_UNUSED,
++ rtx libname ATTRIBUTE_UNUSED,
++ tree fndecl ATTRIBUTE_UNUSED,
++ int n_named_args ATTRIBUTE_UNUSED)
++{
++ cum->regs_used = 0;
++}
++
++
++/* Update the data in CUM to advance over an argument
++ of mode MODE and data type TYPE.
++ (TYPE is null for libcalls where that information may not be available.) */
++
++void
++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ cum->regs_used = NUM_ARG_REGS;
++ }
++ else
++ {
++ cum->regs_used += param_size;
++ }
++
++ return;
++}
++
++/* Define where to put the arguments to a function. Value is zero to
++ push the argument on the stack, or a hard register in which to
++ store the argument.
++
++ MODE is the argument's machine mode.
++ TYPE is the data type of the argument (as a tree).
++ This is null for libcalls where that information may
++ not be available.
++ CUM is a variable of type CUMULATIVE_ARGS which gives info about
++ the preceding args and about the function being called.
++ NAMED is nonzero if this argument is a named parameter
++ (otherwise it is an extra parameter matching an ellipsis). */
++rtx
++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
++{
++ rtx return_rtx = NULL_RTX;
++
++ if (cum->regs_used < NUM_ARG_REGS)
++ {
++ return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used);
++ }
++
++ return return_rtx;
++}
++
++int
++function_arg_partial_nregs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int named ATTRIBUTE_UNUSED)
++{
++ HOST_WIDE_INT param_size;
++
++ if (mode == BLKmode)
++ {
++ param_size = int_size_in_bytes (type);
++ if (param_size < 0)
++ internal_error
++ ("Do not know how to handle large structs or variable length types");
++ }
++ else
++ {
++ param_size = GET_MODE_SIZE (mode);
++ }
++
++ /* convert to words (round up) */
++ param_size = (3 + param_size) / 4;
++
++ if (cum->regs_used < NUM_ARG_REGS
++ && cum->regs_used + param_size > NUM_ARG_REGS)
++ {
++ return NUM_ARG_REGS - cum->regs_used;
++ }
++ else
++ {
++ return 0;
++ }
++}
++
++
++int
++nios2_return_in_memory (tree type)
++{
++ int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD))
++ || (int_size_in_bytes (type) == -1));
++
++ return res;
++}
++
++/* ??? It may be possible to eliminate the copyback and implement
++ my own va_arg type, but that is more work for now. */
++int
++nios2_setup_incoming_varargs (const CUMULATIVE_ARGS *cum,
++ enum machine_mode mode, tree type,
++ int no_rtl)
++{
++ CUMULATIVE_ARGS local_cum;
++ int regs_to_push;
++
++ local_cum = *cum;
++ FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
++
++ regs_to_push = NUM_ARG_REGS - local_cum.regs_used;
++
++ if (!no_rtl)
++ {
++ if (regs_to_push > 0)
++ {
++ rtx ptr, mem;
++
++ ptr = virtual_incoming_args_rtx;
++ mem = gen_rtx_MEM (BLKmode, ptr);
++
++ /* va_arg is an array access in this case, which causes
++ it to get MEM_IN_STRUCT_P set. We must set it here
++ so that the insn scheduler won't assume that these
++ stores can't possibly overlap with the va_arg loads. */
++ MEM_SET_IN_STRUCT_P (mem, 1);
++
++ emit_insn (gen_blockage ());
++ move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem,
++ regs_to_push);
++ emit_insn (gen_blockage ());
++ }
++ }
++
++ return regs_to_push * UNITS_PER_WORD;
++
++}
++
++
++
++/*****************************************************************************
++**
++** builtins
++**
++** This method for handling builtins is from CSP where _many_ more types of
++** expanders have already been written. Check there first before writing
++** new ones.
++**
++*****************************************************************************/
++
++enum nios2_builtins
++{
++ NIOS2_BUILTIN_LDBIO,
++ NIOS2_BUILTIN_LDBUIO,
++ NIOS2_BUILTIN_LDHIO,
++ NIOS2_BUILTIN_LDHUIO,
++ NIOS2_BUILTIN_LDWIO,
++ NIOS2_BUILTIN_STBIO,
++ NIOS2_BUILTIN_STHIO,
++ NIOS2_BUILTIN_STWIO,
++ NIOS2_BUILTIN_SYNC,
++ NIOS2_BUILTIN_RDCTL,
++ NIOS2_BUILTIN_WRCTL,
++
++ NIOS2_BUILTIN_CUSTOM_N,
++ NIOS2_BUILTIN_CUSTOM_NI,
++ NIOS2_BUILTIN_CUSTOM_NF,
++ NIOS2_BUILTIN_CUSTOM_NP,
++ NIOS2_BUILTIN_CUSTOM_NII,
++ NIOS2_BUILTIN_CUSTOM_NIF,
++ NIOS2_BUILTIN_CUSTOM_NIP,
++ NIOS2_BUILTIN_CUSTOM_NFI,
++ NIOS2_BUILTIN_CUSTOM_NFF,
++ NIOS2_BUILTIN_CUSTOM_NFP,
++ NIOS2_BUILTIN_CUSTOM_NPI,
++ NIOS2_BUILTIN_CUSTOM_NPF,
++ NIOS2_BUILTIN_CUSTOM_NPP,
++ NIOS2_BUILTIN_CUSTOM_IN,
++ NIOS2_BUILTIN_CUSTOM_INI,
++ NIOS2_BUILTIN_CUSTOM_INF,
++ NIOS2_BUILTIN_CUSTOM_INP,
++ NIOS2_BUILTIN_CUSTOM_INII,
++ NIOS2_BUILTIN_CUSTOM_INIF,
++ NIOS2_BUILTIN_CUSTOM_INIP,
++ NIOS2_BUILTIN_CUSTOM_INFI,
++ NIOS2_BUILTIN_CUSTOM_INFF,
++ NIOS2_BUILTIN_CUSTOM_INFP,
++ NIOS2_BUILTIN_CUSTOM_INPI,
++ NIOS2_BUILTIN_CUSTOM_INPF,
++ NIOS2_BUILTIN_CUSTOM_INPP,
++ NIOS2_BUILTIN_CUSTOM_FN,
++ NIOS2_BUILTIN_CUSTOM_FNI,
++ NIOS2_BUILTIN_CUSTOM_FNF,
++ NIOS2_BUILTIN_CUSTOM_FNP,
++ NIOS2_BUILTIN_CUSTOM_FNII,
++ NIOS2_BUILTIN_CUSTOM_FNIF,
++ NIOS2_BUILTIN_CUSTOM_FNIP,
++ NIOS2_BUILTIN_CUSTOM_FNFI,
++ NIOS2_BUILTIN_CUSTOM_FNFF,
++ NIOS2_BUILTIN_CUSTOM_FNFP,
++ NIOS2_BUILTIN_CUSTOM_FNPI,
++ NIOS2_BUILTIN_CUSTOM_FNPF,
++ NIOS2_BUILTIN_CUSTOM_FNPP,
++ NIOS2_BUILTIN_CUSTOM_PN,
++ NIOS2_BUILTIN_CUSTOM_PNI,
++ NIOS2_BUILTIN_CUSTOM_PNF,
++ NIOS2_BUILTIN_CUSTOM_PNP,
++ NIOS2_BUILTIN_CUSTOM_PNII,
++ NIOS2_BUILTIN_CUSTOM_PNIF,
++ NIOS2_BUILTIN_CUSTOM_PNIP,
++ NIOS2_BUILTIN_CUSTOM_PNFI,
++ NIOS2_BUILTIN_CUSTOM_PNFF,
++ NIOS2_BUILTIN_CUSTOM_PNFP,
++ NIOS2_BUILTIN_CUSTOM_PNPI,
++ NIOS2_BUILTIN_CUSTOM_PNPF,
++ NIOS2_BUILTIN_CUSTOM_PNPP,
++
++
++ LIM_NIOS2_BUILTINS
++};
++
++struct builtin_description
++{
++ const enum insn_code icode;
++ const char *const name;
++ const enum nios2_builtins code;
++ const tree *type;
++ rtx (* expander) PARAMS ((const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int));
++};
++
++static rtx nios2_expand_STXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_LDXIO (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_sync (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_rdctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_wrctl (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static rtx nios2_expand_custom_n (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_Xn (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_nXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++static rtx nios2_expand_custom_XnXX (const struct builtin_description *,
++ tree, rtx, rtx, enum machine_mode, int);
++
++static tree endlink;
++
++/* int fn (volatile const void *)
++ */
++static tree int_ftype_volatile_const_void_p;
++
++/* int fn (int)
++ */
++static tree int_ftype_int;
++
++/* void fn (int, int)
++ */
++static tree void_ftype_int_int;
++
++/* void fn (volatile void *, int)
++ */
++static tree void_ftype_volatile_void_p_int;
++
++/* void fn (void)
++ */
++static tree void_ftype_void;
++
++static tree custom_n;
++static tree custom_ni;
++static tree custom_nf;
++static tree custom_np;
++static tree custom_nii;
++static tree custom_nif;
++static tree custom_nip;
++static tree custom_nfi;
++static tree custom_nff;
++static tree custom_nfp;
++static tree custom_npi;
++static tree custom_npf;
++static tree custom_npp;
++static tree custom_in;
++static tree custom_ini;
++static tree custom_inf;
++static tree custom_inp;
++static tree custom_inii;
++static tree custom_inif;
++static tree custom_inip;
++static tree custom_infi;
++static tree custom_inff;
++static tree custom_infp;
++static tree custom_inpi;
++static tree custom_inpf;
++static tree custom_inpp;
++static tree custom_fn;
++static tree custom_fni;
++static tree custom_fnf;
++static tree custom_fnp;
++static tree custom_fnii;
++static tree custom_fnif;
++static tree custom_fnip;
++static tree custom_fnfi;
++static tree custom_fnff;
++static tree custom_fnfp;
++static tree custom_fnpi;
++static tree custom_fnpf;
++static tree custom_fnpp;
++static tree custom_pn;
++static tree custom_pni;
++static tree custom_pnf;
++static tree custom_pnp;
++static tree custom_pnii;
++static tree custom_pnif;
++static tree custom_pnip;
++static tree custom_pnfi;
++static tree custom_pnff;
++static tree custom_pnfp;
++static tree custom_pnpi;
++static tree custom_pnpf;
++static tree custom_pnpp;
++
++
++static const struct builtin_description bdesc[] = {
++ {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++ {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, &int_ftype_volatile_const_void_p, nios2_expand_LDXIO},
++
++ {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++ {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, &void_ftype_volatile_void_p_int, nios2_expand_STXIO},
++
++ {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, &void_ftype_void, nios2_expand_sync},
++ {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, &int_ftype_int, nios2_expand_rdctl},
++ {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, &void_ftype_int_int, nios2_expand_wrctl},
++
++ {CODE_FOR_custom_n, "__builtin_custom_n", NIOS2_BUILTIN_CUSTOM_N, &custom_n, nios2_expand_custom_n},
++ {CODE_FOR_custom_ni, "__builtin_custom_ni", NIOS2_BUILTIN_CUSTOM_NI, &custom_ni, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nf, "__builtin_custom_nf", NIOS2_BUILTIN_CUSTOM_NF, &custom_nf, nios2_expand_custom_nX},
++ {CODE_FOR_custom_np, "__builtin_custom_np", NIOS2_BUILTIN_CUSTOM_NP, &custom_np, nios2_expand_custom_nX},
++ {CODE_FOR_custom_nii, "__builtin_custom_nii", NIOS2_BUILTIN_CUSTOM_NII, &custom_nii, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nif, "__builtin_custom_nif", NIOS2_BUILTIN_CUSTOM_NIF, &custom_nif, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nip, "__builtin_custom_nip", NIOS2_BUILTIN_CUSTOM_NIP, &custom_nip, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfi, "__builtin_custom_nfi", NIOS2_BUILTIN_CUSTOM_NFI, &custom_nfi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nff, "__builtin_custom_nff", NIOS2_BUILTIN_CUSTOM_NFF, &custom_nff, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_nfp, "__builtin_custom_nfp", NIOS2_BUILTIN_CUSTOM_NFP, &custom_nfp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npi, "__builtin_custom_npi", NIOS2_BUILTIN_CUSTOM_NPI, &custom_npi, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npf, "__builtin_custom_npf", NIOS2_BUILTIN_CUSTOM_NPF, &custom_npf, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_npp, "__builtin_custom_npp", NIOS2_BUILTIN_CUSTOM_NPP, &custom_npp, nios2_expand_custom_nXX},
++ {CODE_FOR_custom_in, "__builtin_custom_in", NIOS2_BUILTIN_CUSTOM_IN, &custom_in, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_ini, "__builtin_custom_ini", NIOS2_BUILTIN_CUSTOM_INI, &custom_ini, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inf, "__builtin_custom_inf", NIOS2_BUILTIN_CUSTOM_INF, &custom_inf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inp, "__builtin_custom_inp", NIOS2_BUILTIN_CUSTOM_INP, &custom_inp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_inii, "__builtin_custom_inii", NIOS2_BUILTIN_CUSTOM_INII, &custom_inii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inif, "__builtin_custom_inif", NIOS2_BUILTIN_CUSTOM_INIF, &custom_inif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inip, "__builtin_custom_inip", NIOS2_BUILTIN_CUSTOM_INIP, &custom_inip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infi, "__builtin_custom_infi", NIOS2_BUILTIN_CUSTOM_INFI, &custom_infi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inff, "__builtin_custom_inff", NIOS2_BUILTIN_CUSTOM_INFF, &custom_inff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_infp, "__builtin_custom_infp", NIOS2_BUILTIN_CUSTOM_INFP, &custom_infp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpi, "__builtin_custom_inpi", NIOS2_BUILTIN_CUSTOM_INPI, &custom_inpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpf, "__builtin_custom_inpf", NIOS2_BUILTIN_CUSTOM_INPF, &custom_inpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_inpp, "__builtin_custom_inpp", NIOS2_BUILTIN_CUSTOM_INPP, &custom_inpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fn, "__builtin_custom_fn", NIOS2_BUILTIN_CUSTOM_FN, &custom_fn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_fni, "__builtin_custom_fni", NIOS2_BUILTIN_CUSTOM_FNI, &custom_fni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnf, "__builtin_custom_fnf", NIOS2_BUILTIN_CUSTOM_FNF, &custom_fnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnp, "__builtin_custom_fnp", NIOS2_BUILTIN_CUSTOM_FNP, &custom_fnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_fnii, "__builtin_custom_fnii", NIOS2_BUILTIN_CUSTOM_FNII, &custom_fnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnif, "__builtin_custom_fnif", NIOS2_BUILTIN_CUSTOM_FNIF, &custom_fnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnip, "__builtin_custom_fnip", NIOS2_BUILTIN_CUSTOM_FNIP, &custom_fnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfi, "__builtin_custom_fnfi", NIOS2_BUILTIN_CUSTOM_FNFI, &custom_fnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnff, "__builtin_custom_fnff", NIOS2_BUILTIN_CUSTOM_FNFF, &custom_fnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnfp, "__builtin_custom_fnfp", NIOS2_BUILTIN_CUSTOM_FNFP, &custom_fnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpi, "__builtin_custom_fnpi", NIOS2_BUILTIN_CUSTOM_FNPI, &custom_fnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpf, "__builtin_custom_fnpf", NIOS2_BUILTIN_CUSTOM_FNPF, &custom_fnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_fnpp, "__builtin_custom_fnpp", NIOS2_BUILTIN_CUSTOM_FNPP, &custom_fnpp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pn, "__builtin_custom_pn", NIOS2_BUILTIN_CUSTOM_PN, &custom_pn, nios2_expand_custom_Xn},
++ {CODE_FOR_custom_pni, "__builtin_custom_pni", NIOS2_BUILTIN_CUSTOM_PNI, &custom_pni, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnf, "__builtin_custom_pnf", NIOS2_BUILTIN_CUSTOM_PNF, &custom_pnf, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnp, "__builtin_custom_pnp", NIOS2_BUILTIN_CUSTOM_PNP, &custom_pnp, nios2_expand_custom_XnX},
++ {CODE_FOR_custom_pnii, "__builtin_custom_pnii", NIOS2_BUILTIN_CUSTOM_PNII, &custom_pnii, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnif, "__builtin_custom_pnif", NIOS2_BUILTIN_CUSTOM_PNIF, &custom_pnif, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnip, "__builtin_custom_pnip", NIOS2_BUILTIN_CUSTOM_PNIP, &custom_pnip, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfi, "__builtin_custom_pnfi", NIOS2_BUILTIN_CUSTOM_PNFI, &custom_pnfi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnff, "__builtin_custom_pnff", NIOS2_BUILTIN_CUSTOM_PNFF, &custom_pnff, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnfp, "__builtin_custom_pnfp", NIOS2_BUILTIN_CUSTOM_PNFP, &custom_pnfp, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpi, "__builtin_custom_pnpi", NIOS2_BUILTIN_CUSTOM_PNPI, &custom_pnpi, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpf, "__builtin_custom_pnpf", NIOS2_BUILTIN_CUSTOM_PNPF, &custom_pnpf, nios2_expand_custom_XnXX},
++ {CODE_FOR_custom_pnpp, "__builtin_custom_pnpp", NIOS2_BUILTIN_CUSTOM_PNPP, &custom_pnpp, nios2_expand_custom_XnXX},
++
++
++ {0, 0, 0, 0, 0},
++};
++
++/* This does not have a closing bracket on purpose (see use) */
++#define def_param(TYPE) \
++ tree_cons (NULL_TREE, TYPE,
++
++static void
++nios2_init_builtins ()
++{
++ const struct builtin_description *d;
++
++
++ endlink = void_list_node;
++
++ /* Special indenting here because one of the brackets is in def_param */
++ /* *INDENT-OFF* */
++
++ /* int fn (volatile const void *)
++ */
++ int_ftype_volatile_const_void_p
++ = build_function_type (integer_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE))
++ endlink));
++
++
++ /* void fn (volatile void *, int)
++ */
++ void_ftype_volatile_void_p_int
++ = build_function_type (void_type_node,
++ def_param (build_qualified_type (ptr_type_node,
++ TYPE_QUAL_VOLATILE))
++ def_param (integer_type_node)
++ endlink)));
++
++ /* void fn (void)
++ */
++ void_ftype_void
++ = build_function_type (void_type_node,
++ endlink);
++
++ /* int fn (int)
++ */
++ int_ftype_int
++ = build_function_type (integer_type_node,
++ def_param (integer_type_node)
++ endlink));
++
++ /* void fn (int, int)
++ */
++ void_ftype_int_int
++ = build_function_type (void_type_node,
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink)));
++
++
++#define CUSTOM_NUM def_param (integer_type_node)
++
++ custom_n
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ni
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_nf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_np
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_nii
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nif
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nip
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_nfi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_nff
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_nfp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_npi
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_npf
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_npp
++ = build_function_type (void_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_in
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_ini
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_inf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_inp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_inii
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inif
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inip
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_infi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inff
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_infp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_inpi
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_inpf
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_inpp
++ = build_function_type (integer_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++ custom_fn
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_fni
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_fnf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_fnp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_fnii
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnif
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnip
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnfi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnff
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnfp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_fnpi
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_fnpf
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_fnpp
++ = build_function_type (float_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++ custom_pn
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ endlink));
++ custom_pni
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ endlink)));
++ custom_pnf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ endlink)));
++ custom_pnp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ endlink)));
++ custom_pnii
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnif
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnip
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (integer_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnfi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnff
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnfp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (float_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++ custom_pnpi
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (integer_type_node)
++ endlink))));
++ custom_pnpf
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (float_type_node)
++ endlink))));
++ custom_pnpp
++ = build_function_type (ptr_type_node,
++ CUSTOM_NUM
++ def_param (ptr_type_node)
++ def_param (ptr_type_node)
++ endlink))));
++
++
++
++ /* *INDENT-ON* */
++
++
++ for (d = bdesc; d->name; d++)
++ {
++ builtin_function (d->name, *d->type, d->code,
++ BUILT_IN_MD, NULL, NULL);
++ }
++}
++
++/* Expand an expression EXP that calls a built-in function,
++ with result going to TARGET if that's convenient
++ (and in mode MODE if that's convenient).
++ SUBTARGET may be used as the target for computing one of EXP's operands.
++ IGNORE is nonzero if the value is to be ignored. */
++
++static rtx
++nios2_expand_builtin (tree exp, rtx target, rtx subtarget,
++ enum machine_mode mode, int ignore)
++{
++ const struct builtin_description *d;
++ tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
++
++ for (d = bdesc; d->name; d++)
++ if (d->code == fcode)
++ return (d->expander) (d, exp, target, subtarget, mode, ignore);
++
++ /* we should have seen one of the functins we registered */
++ abort ();
++}
++
++static rtx nios2_create_target (const struct builtin_description *, rtx);
++
++
++static rtx
++nios2_create_target (const struct builtin_description *d, rtx target)
++{
++ if (!target
++ || !(*insn_data[d->icode].operand[0].predicate) (target,
++ insn_data[d->icode].operand[0].mode))
++ {
++ target = gen_reg_rtx (insn_data[d->icode].operand[0].mode);
++ }
++
++ return target;
++}
++
++
++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree);
++static rtx nios2_extract_operand (const struct builtin_description *, int, int, tree);
++
++static rtx
++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx opcode = expand_expr (arg, NULL_RTX, mode, 0);
++ opcode = protect_from_queue (opcode, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode))
++ error ("Custom instruction opcode must be compile time constant in the range 0-255 for %s", d->name);
++
++ return opcode;
++}
++
++static rtx
++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, tree arglist)
++{
++ enum machine_mode mode = insn_data[d->icode].operand[op].mode;
++ tree arg = TREE_VALUE (arglist);
++ rtx operand = expand_expr (arg, NULL_RTX, mode, 0);
++ operand = protect_from_queue (operand, 0);
++
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ operand = copy_to_mode_reg (mode, operand);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode))
++ error ("Invalid argument %d to %s", argnum, d->name);
++
++ return operand;
++}
++
++
++static rtx
++nios2_expand_custom_n (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_n should have exactly one operand */
++ if (insn_data[d->icode].n_operands != 1)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++
++ pat = GEN_FCN (d->icode) (opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp,
++ rtx target, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++
++ /* custom_Xn should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ pat = GEN_FCN (d->icode) (target, opcode);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nX (const struct builtin_description *d, tree exp,
++ rtx target ATTRIBUTE_UNUSED, rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++
++ /* custom_nX should have exactly two operands */
++ if (insn_data[d->icode].n_operands != 2)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[1];
++ int i;
++
++ /* custom_Xn should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++
++ for (i = 0; i < 1; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_nX should have exactly three operands */
++ if (insn_data[d->icode].n_operands != 3)
++ abort ();
++
++ opcode = nios2_extract_opcode (d, 0, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++static rtx
++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx opcode;
++ rtx operands[2];
++ int i;
++
++
++ /* custom_XnX should have exactly four operands */
++ if (insn_data[d->icode].n_operands != 4)
++ abort ();
++
++ target = nios2_create_target (d, target);
++ opcode = nios2_extract_opcode (d, 1, arglist);
++ for (i = 0; i < 2; i++)
++ {
++ arglist = TREE_CHAIN (arglist);
++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist);
++ }
++
++ pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]);
++
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++
++static rtx
++nios2_expand_STXIO (const struct builtin_description *d, tree exp, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx store_dest, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ store_dest = protect_from_queue (store_dest, 0);
++
++ store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode))
++ error ("Invalid argument 1 to %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (store_dest, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++static rtx
++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target,
++ rtx subtarget ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx ld_src;
++ enum insn_code icode = d->icode;
++
++ /* loads should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ ld_src = protect_from_queue (ld_src, 0);
++
++ ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src));
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode))
++ {
++ error ("Invalid argument 1 to %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, ld_src);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++
++static rtx
++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ emit_insn (gen_sync ());
++ return 0;
++}
++
++static rtx
++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx rdctl_reg;
++ enum insn_code icode = d->icode;
++
++ /* rdctl should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ target = nios2_create_target (d, target);
++
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (arglist);
++ rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ rdctl_reg = protect_from_queue (rdctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode))
++ {
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++ }
++
++ pat = GEN_FCN (d->icode) (target, rdctl_reg);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return target;
++}
++
++static rtx
++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED,
++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED,
++ rtx subtarget ATTRIBUTE_UNUSED,
++ enum machine_mode mode ATTRIBUTE_UNUSED,
++ int ignore ATTRIBUTE_UNUSED)
++{
++ tree arglist = TREE_OPERAND (exp, 1);
++ rtx pat;
++ rtx wrctl_reg, store_val;
++ enum insn_code icode = d->icode;
++
++ /* stores should have exactly two operands */
++ if (insn_data[icode].n_operands != 2)
++ abort ();
++
++ /* process the destination of the store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[0].mode;
++ tree arg = TREE_VALUE (arglist);
++ wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0);
++ wrctl_reg = protect_from_queue (wrctl_reg, 0);
++
++ if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode))
++ error ("Control register number must be in range 0-31 for %s", d->name);
++ }
++
++
++ /* process the value to store */
++ {
++ enum machine_mode mode = insn_data[icode].operand[1].mode;
++ tree arg = TREE_VALUE (TREE_CHAIN (arglist));
++ store_val = expand_expr (arg, NULL_RTX, mode, 0);
++ store_val = protect_from_queue (store_val, 0);
++
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ store_val = copy_to_mode_reg (mode, store_val);
++
++ /* ??? Better errors would be nice */
++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode))
++ error ("Invalid argument 2 to %s", d->name);
++ }
++
++ pat = GEN_FCN (d->icode) (wrctl_reg, store_val);
++ if (!pat)
++ return 0;
++ emit_insn (pat);
++ return 0;
++}
++
++
++#include "gt-nios2.h"
++
+--- gcc-3.4.3/gcc/config/nios2/nios2.h
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.h
+@@ -0,0 +1,824 @@
++/* Definitions of target machine for Altera NIOS 2G NIOS2 version.
++ Copyright (C) 2003 Altera
++ Contributed by Jonah Graham (jgraham@altera.com).
++
++This file is part of GNU CC.
++
++GNU CC 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 2, or (at your option)
++any later version.
++
++GNU CC 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 GNU CC; see the file COPYING. If not, write to
++the Free Software Foundation, 59 Temple Place - Suite 330,
++Boston, MA 02111-1307, USA. */
++
++
++
++#define TARGET_CPU_CPP_BUILTINS() \
++ do \
++ { \
++ builtin_define_std ("NIOS2"); \
++ builtin_define_std ("nios2"); \
++ builtin_define ("_GNU_SOURCE"); \
++ } \
++ while (0)
++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)")
++
++
++
++
++
++/*********************************
++ * Run-time Target Specification
++ *********************************/
++
++#define HAS_DIV_FLAG 0x0001
++#define HAS_MUL_FLAG 0x0002
++#define HAS_MULX_FLAG 0x0004
++#define FAST_SW_DIV_FLAG 0x0008
++#define INLINE_MEMCPY_FLAG 0x00010
++#define CACHE_VOLATILE_FLAG 0x0020
++#define BYPASS_CACHE_FLAG 0x0040
++
++extern int target_flags;
++#define TARGET_HAS_DIV (target_flags & HAS_DIV_FLAG)
++#define TARGET_HAS_MUL (target_flags & HAS_MUL_FLAG)
++#define TARGET_HAS_MULX (target_flags & HAS_MULX_FLAG)
++#define TARGET_FAST_SW_DIV (target_flags & FAST_SW_DIV_FLAG)
++#define TARGET_INLINE_MEMCPY (target_flags & INLINE_MEMCPY_FLAG)
++#define TARGET_CACHE_VOLATILE (target_flags & CACHE_VOLATILE_FLAG)
++#define TARGET_BYPASS_CACHE (target_flags & BYPASS_CACHE_FLAG)
++
++#define TARGET_SWITCHES \
++{ \
++ { "hw-div", HAS_DIV_FLAG, \
++ N_("Enable DIV, DIVU") }, \
++ { "no-hw-div", -HAS_DIV_FLAG, \
++ N_("Disable DIV, DIVU (default)") }, \
++ { "hw-mul", HAS_MUL_FLAG, \
++ N_("Enable MUL instructions (default)") }, \
++ { "hw-mulx", HAS_MULX_FLAG, \
++ N_("Enable MULX instructions, assume fast shifter") }, \
++ { "no-hw-mul", -HAS_MUL_FLAG, \
++ N_("Disable MUL instructions") }, \
++ { "no-hw-mulx", -HAS_MULX_FLAG, \
++ N_("Disable MULX instructions, assume slow shifter (default and implied by -mno-hw-mul)") }, \
++ { "fast-sw-div", FAST_SW_DIV_FLAG, \
++ N_("Use table based fast divide (default at -O3)") }, \
++ { "no-fast-sw-div", -FAST_SW_DIV_FLAG, \
++ N_("Don't use table based fast divide ever") }, \
++ { "inline-memcpy", INLINE_MEMCPY_FLAG, \
++ N_("Inline small memcpy (default when optimizing)") }, \
++ { "no-inline-memcpy", -INLINE_MEMCPY_FLAG, \
++ N_("Don't Inline small memcpy") }, \
++ { "cache-volatile", CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use non-io variants of instructions (default)") }, \
++ { "no-cache-volatile", -CACHE_VOLATILE_FLAG, \
++ N_("Volatile accesses use io variants of instructions") }, \
++ { "bypass-cache", BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins use io variants") }, \
++ { "no-bypass-cache", -BYPASS_CACHE_FLAG, \
++ N_("All ld/st instructins do not use io variants (default)") }, \
++ { "smallc", 0, \
++ N_("Link with a limited version of the C library") }, \
++ { "ctors-in-init", 0, \
++ "" /* undocumented: N_("Link with static constructors and destructors in init") */ }, \
++ { "", TARGET_DEFAULT, 0 } \
++}
++
++
++extern const char *nios2_sys_nosys_string; /* for -msys=nosys */
++extern const char *nios2_sys_lib_string; /* for -msys-lib= */
++extern const char *nios2_sys_crt0_string; /* for -msys-crt0= */
++
++#define TARGET_OPTIONS \
++{ \
++ { "sys=nosys", &nios2_sys_nosys_string, \
++ N_("Use stub versions of OS library calls (default)"), 0}, \
++ { "sys-lib=", &nios2_sys_lib_string, \
++ N_("Name of System Library to link against. (Converted to a -l option)"), 0}, \
++ { "sys-crt0=", &nios2_sys_crt0_string, \
++ N_("Name of the startfile. (default is a crt0 for the ISS only)"), 0}, \
++}
++
++
++/* Default target_flags if no switches specified. */
++#ifndef TARGET_DEFAULT
++# define TARGET_DEFAULT (HAS_MUL_FLAG | CACHE_VOLATILE_FLAG)
++#endif
++
++/* Switch Recognition by gcc.c. Add -G xx support */
++#undef SWITCH_TAKES_ARG
++#define SWITCH_TAKES_ARG(CHAR) \
++ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
++
++#define OVERRIDE_OPTIONS override_options ()
++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE)
++#define CAN_DEBUG_WITHOUT_FP
++
++#define CC1_SPEC "\
++%{G*}"
++
++#undef LIB_SPEC
++#define LIB_SPEC \
++"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
++ %{msys-lib=*: -l%*} \
++ %{!msys-lib=*: -lc } \
++ --end-group \
++ %{msys-lib=: %eYou need a library name for -msys-lib=} \
++"
++
++
++#undef STARTFILE_SPEC
++#define STARTFILE_SPEC \
++"%{msys-crt0=*: %*} %{!msys-crt0=*: crt1%O%s} \
++ %{msys-crt0=: %eYou need a C startup file for -msys-crt0=} \
++ %{mctors-in-init: crti%O%s crtbegin%O%s} \
++"
++
++#undef ENDFILE_SPEC
++#define ENDFILE_SPEC \
++ "%{mctors-in-init: crtend%O%s crtn%O%s}"
++
++
++/***********************
++ * Storage Layout
++ ***********************/
++
++#define DEFAULT_SIGNED_CHAR 1
++#define BITS_BIG_ENDIAN 0
++#define BYTES_BIG_ENDIAN 0
++#define WORDS_BIG_ENDIAN 0
++#define BITS_PER_UNIT 8
++#define BITS_PER_WORD 32
++#define UNITS_PER_WORD 4
++#define POINTER_SIZE 32
++#define BIGGEST_ALIGNMENT 32
++#define STRICT_ALIGNMENT 1
++#define FUNCTION_BOUNDARY 32
++#define PARM_BOUNDARY 32
++#define STACK_BOUNDARY 32
++#define PREFERRED_STACK_BOUNDARY 32
++#define MAX_FIXED_MODE_SIZE 64
++
++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \
++ ((TREE_CODE (EXP) == STRING_CST) \
++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
++
++
++/**********************
++ * Layout of Source Language Data Types
++ **********************/
++
++#define INT_TYPE_SIZE 32
++#define SHORT_TYPE_SIZE 16
++#define LONG_TYPE_SIZE 32
++#define LONG_LONG_TYPE_SIZE 64
++#define FLOAT_TYPE_SIZE 32
++#define DOUBLE_TYPE_SIZE 64
++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE
++
++
++/*************************
++ * Condition Code Status
++ ************************/
++
++/* comparison type */
++/* ??? currently only CMP_SI is used */
++enum cmp_type {
++ CMP_SI, /* compare four byte integers */
++ CMP_DI, /* compare eight byte integers */
++ CMP_SF, /* compare single precision floats */
++ CMP_DF, /* compare double precision floats */
++ CMP_MAX /* max comparison type */
++};
++
++extern GTY(()) rtx branch_cmp[2]; /* operands for compare */
++extern enum cmp_type branch_type; /* what type of branch to use */
++
++/**********************
++ * Register Usage
++ **********************/
++
++/* ---------------------------------- *
++ * Basic Characteristics of Registers
++ * ---------------------------------- */
++
++/*
++Register Number
++ Register Name
++ Alternate Name
++ Purpose
++0 r0 zero always zero
++1 r1 at Assembler Temporary
++2-3 r2-r3 Return Location
++4-7 r4-r7 Register Arguments
++8-15 r8-r15 Caller Saved Registers
++16-22 r16-r22 Callee Saved Registers
++23 r23 sc Static Chain (Callee Saved)
++ ??? Does $sc want to be caller or callee
++ saved. If caller, 15, else 23.
++24 r24 Exception Temporary
++25 r25 Breakpoint Temporary
++26 r26 gp Global Pointer
++27 r27 sp Stack Pointer
++28 r28 fp Frame Pointer
++29 r29 ea Exception Return Address
++30 r30 ba Breakpoint Return Address
++31 r31 ra Return Address
++
++32 ctl0 status
++33 ctl1 estatus STATUS saved by exception ?
++34 ctl2 bstatus STATUS saved by break ?
++35 ctl3 ipri Interrupt Priority Mask ?
++36 ctl4 ecause Exception Cause ?
++
++37 pc Not an actual register
++
++38 rap Return address pointer, this does not
++ actually exist and will be eliminated
++
++39 fake_fp Fake Frame Pointer which will always be eliminated.
++40 fake_ap Fake Argument Pointer which will always be eliminated.
++
++41 First Pseudo Register
++
++
++The definitions for all the hard register numbers
++are located in nios2.md.
++*/
++
++#define FIRST_PSEUDO_REGISTER 41
++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1)
++
++
++
++/* also see CONDITIONAL_REGISTER_USAGE */
++#define FIXED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++/* call used is the same as caller saved
++ + fixed regs + args + ret vals */
++#define CALL_USED_REGISTERS \
++ { \
++/* +0 1 2 3 4 5 6 7 8 9 */ \
++/* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 10 */ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \
++/* 20 */ 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, \
++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \
++/* 40 */ 1, \
++ }
++
++#define HARD_REGNO_NREGS(REGNO, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++/* --------------------------- *
++ * How Values Fit in Registers
++ * --------------------------- */
++
++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1
++
++#define MODES_TIEABLE_P(MODE1, MODE2) 1
++
++
++/*************************
++ * Register Classes
++ *************************/
++
++enum reg_class
++{
++ NO_REGS,
++ ALL_REGS,
++ LIM_REG_CLASSES
++};
++
++#define N_REG_CLASSES (int) LIM_REG_CLASSES
++
++#define REG_CLASS_NAMES \
++ {"NO_REGS", \
++ "ALL_REGS"}
++
++#define GENERAL_REGS ALL_REGS
++
++#define REG_CLASS_CONTENTS \
++/* NO_REGS */ {{ 0, 0}, \
++/* ALL_REGS */ {~0,~0}} \
++
++#define REGNO_REG_CLASS(REGNO) ALL_REGS
++
++#define BASE_REG_CLASS ALL_REGS
++#define INDEX_REG_CLASS ALL_REGS
++
++/* only one reg class, 'r', is handled automatically */
++#define REG_CLASS_FROM_LETTER(CHAR) NO_REGS
++
++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \
++ ((STRICT) \
++ ? (REGNO) < FIRST_PSEUDO_REGISTER \
++ : (REGNO) < FIRST_PSEUDO_REGISTER || (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
++
++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT))
++
++#define REGNO_OK_FOR_BASE_P(REGNO) \
++ (REGNO_OK_FOR_BASE_P2 (REGNO, 1))
++
++#define REGNO_OK_FOR_INDEX_P(REGNO) \
++ (REGNO_OK_FOR_INDEX_P2 (REGNO, 1))
++
++#define REG_OK_FOR_BASE_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define REG_OK_FOR_INDEX_P2(X, STRICT) \
++ (STRICT \
++ ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) \
++ : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || REGNO(X) >= FIRST_PSEUDO_REGISTER)
++
++#define CLASS_MAX_NREGS(CLASS, MODE) \
++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
++ / UNITS_PER_WORD)
++
++
++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000)
++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000)
++#define UPPER16_INT(X) (((X) & 0xffff) == 0)
++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31)
++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31)
++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255)
++
++#define CONST_OK_FOR_LETTER_P(VALUE, C) \
++ ( \
++ (C) == 'I' ? SMALL_INT (VALUE) : \
++ (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) : \
++ (C) == 'K' ? UPPER16_INT (VALUE) : \
++ (C) == 'L' ? SHIFT_INT (VALUE) : \
++ (C) == 'M' ? (VALUE) == 0 : \
++ (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) : \
++ (C) == 'O' ? RDWRCTL_INT (VALUE) : \
++ 0)
++
++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
++
++#define PREFERRED_RELOAD_CLASS(X, CLASS) \
++ ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS))
++
++/* 'S' matches immediates which are in small data
++ and therefore can be added to gp to create a
++ 32-bit value. */
++#define EXTRA_CONSTRAINT(VALUE, C) \
++ ((C) == 'S' \
++ && (GET_CODE (VALUE) == SYMBOL_REF) \
++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE))
++
++
++
++
++/* Say that the epilogue uses the return address register. Note that
++ in the case of sibcalls, the values "used by the epilogue" are
++ considered live at the start of the called function. */
++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO)
++
++
++#define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
++
++/**********************************
++ * Trampolines for Nested Functions
++ ***********************************/
++
++#define TRAMPOLINE_TEMPLATE(FILE) \
++ error ("trampolines not yet implemented")
++#define TRAMPOLINE_SIZE 20
++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
++ error ("trampolines not yet implemented")
++
++/***************************
++ * Stack Layout and Calling Conventions
++ ***************************/
++
++/* ------------------ *
++ * Basic Stack Layout
++ * ------------------ */
++
++/* The downward variants are used by the compiler,
++ the upward ones serve as documentation */
++#define STACK_GROWS_DOWNWARD
++#define FRAME_GROWS_UPWARD
++#define ARGS_GROW_UPWARD
++
++#define STARTING_FRAME_OFFSET current_function_outgoing_args_size
++#define FIRST_PARM_OFFSET(FUNDECL) 0
++
++/* Before the prologue, RA lives in r31. */
++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO)
++
++/* -------------------------------------- *
++ * Registers That Address the Stack Frame
++ * -------------------------------------- */
++
++#define STACK_POINTER_REGNUM SP_REGNO
++#define STATIC_CHAIN_REGNUM SC_REGNO
++#define PC_REGNUM PC_REGNO
++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO
++
++/* Base register for access to local variables of the function. We
++ pretend that the frame pointer is a non-existent hard register, and
++ then eliminate it to HARD_FRAME_POINTER_REGNUM. */
++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO
++
++#define HARD_FRAME_POINTER_REGNUM FP_REGNO
++#define RETURN_ADDRESS_POINTER_REGNUM RAP_REGNO
++/* the argumnet pointer needs to always be eliminated
++ so it is set to a fake hard register. */
++#define ARG_POINTER_REGNUM FAKE_AP_REGNO
++
++/* ----------------------------------------- *
++ * Eliminating Frame Pointer and Arg Pointer
++ * ----------------------------------------- */
++
++#define FRAME_POINTER_REQUIRED 0
++
++#define ELIMINABLE_REGS \
++{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
++
++#define CAN_ELIMINATE(FROM, TO) 1
++
++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
++ (OFFSET) = nios2_initial_elimination_offset ((FROM), (TO))
++
++#define MUST_SAVE_REGISTER(regno) \
++ ((regs_ever_live[regno] && !call_used_regs[regno]) \
++ || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) \
++ || (regno == RA_REGNO && regs_ever_live[RA_REGNO]))
++
++/* Treat LOC as a byte offset from the stack pointer and round it up
++ to the next fully-aligned offset. */
++#define STACK_ALIGN(LOC) \
++ (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & ~((PREFERRED_STACK_BOUNDARY / 8) - 1))
++
++
++/* ------------------------------ *
++ * Passing Arguments in Registers
++ * ------------------------------ */
++
++/* see nios2.c */
++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
++ (function_arg (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
++ (function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
++
++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0
++
++typedef struct nios2_args
++{
++ int regs_used;
++} CUMULATIVE_ARGS;
++
++/* This is to initialize the above unused CUM data type */
++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \
++ (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS))
++
++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
++ (function_arg_advance (&CUM, MODE, TYPE, NAMED))
++
++#define FUNCTION_ARG_REGNO_P(REGNO) \
++ ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO)
++
++#define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL) \
++ { \
++ int pret_size = nios2_setup_incoming_varargs (&(CUM), (MODE), \
++ (TYPE), (NO_RTL)); \
++ if (pret_size) \
++ (PRETEND_SIZE) = pret_size; \
++ }
++
++/* ----------------------------- *
++ * Generating Code for Profiling
++ * ----------------------------- */
++
++#define PROFILE_BEFORE_PROLOGUE
++
++#define FUNCTION_PROFILER(FILE, LABELNO) \
++ function_profiler ((FILE), (LABELNO))
++
++/* --------------------------------------- *
++ * Passing Function Arguments on the Stack
++ * --------------------------------------- */
++
++#define PROMOTE_PROTOTYPES 1
++
++#define PUSH_ARGS 0
++#define ACCUMULATE_OUTGOING_ARGS 1
++
++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0
++
++/* --------------------------------------- *
++ * How Scalar Function Values Are Returned
++ * --------------------------------------- */
++
++#define FUNCTION_VALUE(VALTYPE, FUNC) \
++ gen_rtx(REG, TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO)
++
++#define LIBCALL_VALUE(MODE) \
++ gen_rtx(REG, MODE, FIRST_RETVAL_REGNO)
++
++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO)
++
++/* ----------------------------- *
++ * How Large Values Are Returned
++ * ----------------------------- */
++
++
++#define RETURN_IN_MEMORY(TYPE) \
++ nios2_return_in_memory (TYPE)
++
++
++#define STRUCT_VALUE 0
++
++#define DEFAULT_PCC_STRUCT_RETURN 0
++
++/*******************
++ * Addressing Modes
++ *******************/
++
++
++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
++
++#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X))
++
++#define MAX_REGS_PER_ADDRESS 1
++
++/* Go to ADDR if X is a valid address. */
++#ifndef REG_OK_STRICT
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 0)) \
++ goto ADDR; \
++ }
++#else
++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
++ { \
++ if (nios2_legitimate_address ((X), (MODE), 1)) \
++ goto ADDR; \
++ }
++#endif
++
++#ifndef REG_OK_STRICT
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 0)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0)
++#else
++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 1)
++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1)
++#endif
++
++#define LEGITIMATE_CONSTANT_P(X) 1
++
++/* Nios II has no mode dependent addresses. */
++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
++
++/* Set if this has a weak declaration */
++#define SYMBOL_FLAG_WEAK_DECL (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
++#define SYMBOL_REF_WEAK_DECL_P(RTX) \
++ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0)
++
++
++/* true if a symbol is both small and not weak. In this case, gp
++ relative access can be used */
++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \
++ (SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX))
++
++/*****************
++ * Describing Relative Costs of Operations
++ *****************/
++
++#define SLOW_BYTE_ACCESS 1
++
++/* It is as good to call a constant function address as to call an address
++ kept in a register.
++ ??? Not true anymore really. Now that call cannot address full range
++ of memory callr may need to be used */
++
++#define NO_FUNCTION_CSE
++#define NO_RECURSIVE_FUNCTION_CSE
++
++
++
++/*****************************************
++ * Defining the Output Assembler Language
++ *****************************************/
++
++/* ------------------------------------------ *
++ * The Overall Framework of an Assembler File
++ * ------------------------------------------ */
++
++#define ASM_APP_ON "#APP\n"
++#define ASM_APP_OFF "#NO_APP\n"
++
++#define ASM_COMMENT_START "# "
++
++/* ------------------------------- *
++ * Output and Generation of Labels
++ * ------------------------------- */
++
++#define GLOBAL_ASM_OP "\t.global\t"
++
++
++/* -------------- *
++ * Output of Data
++ * -------------- */
++
++#define DWARF2_UNWIND_INFO 0
++
++
++/* -------------------------------- *
++ * Assembler Commands for Alignment
++ * -------------------------------- */
++
++#define ASM_OUTPUT_ALIGN(FILE, LOG) \
++ do { \
++ fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \
++ } while (0)
++
++
++/* -------------------------------- *
++ * Output of Assembler Instructions
++ * -------------------------------- */
++
++#define REGISTER_NAMES \
++{ \
++ "zero", \
++ "at", \
++ "r2", \
++ "r3", \
++ "r4", \
++ "r5", \
++ "r6", \
++ "r7", \
++ "r8", \
++ "r9", \
++ "r10", \
++ "r11", \
++ "r12", \
++ "r13", \
++ "r14", \
++ "r15", \
++ "r16", \
++ "r17", \
++ "r18", \
++ "r19", \
++ "r20", \
++ "r21", \
++ "r22", \
++ "r23", \
++ "r24", \
++ "r25", \
++ "gp", \
++ "sp", \
++ "fp", \
++ "ta", \
++ "ba", \
++ "ra", \
++ "status", \
++ "estatus", \
++ "bstatus", \
++ "ipri", \
++ "ecause", \
++ "pc", \
++ "rap", \
++ "fake_fp", \
++ "fake_ap", \
++}
++
++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\
++ (PTR) = asm_output_opcode (STREAM, PTR)
++
++#define PRINT_OPERAND(STREAM, X, CODE) \
++ nios2_print_operand (STREAM, X, CODE)
++
++#define PRINT_OPERAND_ADDRESS(STREAM, X) \
++ nios2_print_operand_address (STREAM, X)
++
++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
++ fprintf (FILE, ".L%u\n", (unsigned) (VALUE)); \
++ } while (0)
++
++
++/* ------------ *
++ * Label Output
++ * ------------ */
++
++
++/* ---------------------------------------------------- *
++ * Dividing the Output into Sections (Texts, Data, ...)
++ * ---------------------------------------------------- */
++
++/* Output before read-only data. */
++#define TEXT_SECTION_ASM_OP ("\t.section\t.text")
++
++/* Output before writable data. */
++#define DATA_SECTION_ASM_OP ("\t.section\t.data")
++
++
++/* Default the definition of "small data" to 8 bytes. */
++/* ??? How come I can't use HOST_WIDE_INT here? */
++extern unsigned long nios2_section_threshold;
++#define NIOS2_DEFAULT_GVALUE 8
++
++
++
++/* This says how to output assembler code to declare an
++ uninitialized external linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef COMMON_ASM_OP
++#define COMMON_ASM_OP "\t.comm\t"
++
++#undef ASM_OUTPUT_ALIGNED_COMMON
++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
++do \
++{ \
++ if ((SIZE) <= nios2_section_threshold) \
++ { \
++ named_section (0, ".sbss", 0); \
++ (*targetm.asm_out.globalize_label) (FILE, NAME); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++ } \
++ else \
++ { \
++ fprintf ((FILE), "%s", COMMON_ASM_OP); \
++ assemble_name ((FILE), (NAME)); \
++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \
++ } \
++} \
++while (0)
++
++
++/* This says how to output assembler code to declare an
++ uninitialized internal linkage data object. Under SVR4,
++ the linker seems to want the alignment of data objects
++ to depend on their types. We do exactly that here. */
++
++#undef ASM_OUTPUT_ALIGNED_LOCAL
++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
++do { \
++ if ((SIZE) <= nios2_section_threshold) \
++ named_section (0, ".sbss", 0); \
++ else \
++ named_section (0, ".bss", 0); \
++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \
++ if (!flag_inhibit_size_directive) \
++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \
++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
++ ASM_OUTPUT_LABEL(FILE, NAME); \
++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
++} while (0)
++
++
++
++/***************************
++ * Miscellaneous Parameters
++ ***************************/
++
++#define MOVE_MAX 4
++
++#define Pmode SImode
++#define FUNCTION_MODE QImode
++
++#define CASE_VECTOR_MODE Pmode
++
++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
++
++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND)
++
++#define WORD_REGISTER_OPERATIONS
+--- gcc-3.4.3/gcc/config/nios2/nios2.md
++++ gcc-3.4.3-nios2/gcc/config/nios2/nios2.md
+@@ -0,0 +1,2078 @@
++;; Machine Description for Altera NIOS 2G NIOS2 version.
++;; Copyright (C) 2003 Altera
++;; Contributed by Jonah Graham (jgraham@altera.com).
++;;
++;; This file is part of GNU CC.
++;;
++;; GNU CC 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 2, or (at your option)
++;; any later version.
++;;
++;; GNU CC 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 GNU CC; see the file COPYING. If not, write to
++;; the Free Software Foundation, 59 Temple Place - Suite 330,
++;; Boston, MA 02111-1307, USA. */
++
++
++
++;*****************************************************************************
++;*
++;* constants
++;*
++;*****************************************************************************
++(define_constants [
++ (GP_REGNO 26)
++ (SP_REGNO 27)
++ (FP_REGNO 28)
++ (RA_REGNO 31)
++ (RAP_REGNO 38)
++ (FIRST_RETVAL_REGNO 2)
++ (LAST_RETVAL_REGNO 3)
++ (FIRST_ARG_REGNO 4)
++ (LAST_ARG_REGNO 7)
++ (SC_REGNO 23)
++ (PC_REGNO 37)
++ (FAKE_FP_REGNO 39)
++ (FAKE_AP_REGNO 40)
++
++
++ (UNSPEC_BLOCKAGE 0)
++ (UNSPEC_LDBIO 1)
++ (UNSPEC_LDBUIO 2)
++ (UNSPEC_LDHIO 3)
++ (UNSPEC_LDHUIO 4)
++ (UNSPEC_LDWIO 5)
++ (UNSPEC_STBIO 6)
++ (UNSPEC_STHIO 7)
++ (UNSPEC_STWIO 8)
++ (UNSPEC_SYNC 9)
++ (UNSPEC_WRCTL 10)
++ (UNSPEC_RDCTL 11)
++
++])
++
++
++
++;*****************************************************************************
++;*
++;* instruction scheduler
++;*
++;*****************************************************************************
++
++; No schedule info is currently available, using an assumption that no
++; instruction can use the results of the previous instruction without
++; incuring a stall.
++
++; length of an instruction (in bytes)
++(define_attr "length" "" (const_int 4))
++(define_attr "type" "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" (const_string "complex"))
++
++(define_asm_attributes
++ [(set_attr "length" "4")
++ (set_attr "type" "complex")])
++
++(define_automaton "nios2")
++(automata_option "v")
++;(automata_option "no-minimization")
++(automata_option "ndfa")
++
++; The nios2 pipeline is fairly straightforward for the fast model.
++; Every alu operation is pipelined so that an instruction can
++; be issued every cycle. However, there are still potential
++; stalls which this description tries to deal with.
++
++(define_cpu_unit "cpu" "nios2")
++
++(define_insn_reservation "complex" 1
++ (eq_attr "type" "complex")
++ "cpu")
++
++(define_insn_reservation "control" 1
++ (eq_attr "type" "control")
++ "cpu")
++
++(define_insn_reservation "alu" 1
++ (eq_attr "type" "alu")
++ "cpu")
++
++(define_insn_reservation "cond_alu" 1
++ (eq_attr "type" "cond_alu")
++ "cpu")
++
++(define_insn_reservation "st" 1
++ (eq_attr "type" "st")
++ "cpu")
++
++(define_insn_reservation "custom" 1
++ (eq_attr "type" "custom")
++ "cpu")
++
++; shifts, muls and lds have three cycle latency
++(define_insn_reservation "ld" 3
++ (eq_attr "type" "ld")
++ "cpu")
++
++(define_insn_reservation "shift" 3
++ (eq_attr "type" "shift")
++ "cpu")
++
++(define_insn_reservation "mul" 3
++ (eq_attr "type" "mul")
++ "cpu")
++
++(define_insn_reservation "div" 1
++ (eq_attr "type" "div")
++ "cpu")
++
++
++;*****************************************************************************
++;*
++;* MOV Instructions
++;*
++;*****************************************************************************
++
++(define_expand "movqi"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "")
++ (match_operand:QI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, QImode))
++ DONE;
++})
++
++(define_insn "movqi_internal"
++ [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r")
++ (match_operand:QI 1 "general_operand" "rM,m,rM,I"))]
++ "(register_operand (operands[0], QImode)
++ || register_operand (operands[1], QImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stb%o0\\t%z1, %0
++ ldbu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu")])
++
++(define_insn "ldbio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldbuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldbuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stbio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)]
++ ""
++ "stbio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++(define_expand "movhi"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "")
++ (match_operand:HI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, HImode))
++ DONE;
++})
++
++(define_insn "movhi_internal"
++ [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r")
++ (match_operand:HI 1 "general_operand" "rM,m,rM,I,J"))]
++ "(register_operand (operands[0], HImode)
++ || register_operand (operands[1], HImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ sth%o0\\t%z1, %0
++ ldhu%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1"
++ [(set_attr "type" "st,ld,alu,alu,alu")])
++
++(define_insn "ldhio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "ldhuio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldhuio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "sthio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)]
++ ""
++ "sthio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++(define_expand "movsi"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "")
++ (match_operand:SI 1 "general_operand" ""))]
++ ""
++{
++ if (nios2_emit_move_sequence (operands, SImode))
++ DONE;
++})
++
++(define_insn "movsi_internal"
++ [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r")
++ (match_operand:SI 1 "general_operand" "rM,m,rM,I,J,S,i"))]
++ "(register_operand (operands[0], SImode)
++ || register_operand (operands[1], SImode)
++ || (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) == 0))"
++ "@
++ stw%o0\\t%z1, %0
++ ldw%o1\\t%0, %1
++ mov\\t%0, %z1
++ movi\\t%0, %1
++ movui\\t%0, %1
++ addi\\t%0, gp, %%gprel(%1)
++ movhi\\t%0, %H1\;addi\\t%0, %0, %L1"
++ [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")])
++
++(define_insn "ldwio"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO))
++ (use (match_operand:SI 1 "memory_operand" "m"))]
++ ""
++ "ldwio\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_insn "stwio"
++ [(set (match_operand:SI 0 "memory_operand" "=m")
++ (match_operand:SI 1 "register_operand" "r"))
++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)]
++ ""
++ "stwio\\t%z1, %0"
++ [(set_attr "type" "st")])
++
++
++
++;*****************************************************************************
++;*
++;* zero extension
++;*
++;*****************************************************************************
++
++
++(define_insn "zero_extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xffff
++ ldhu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "=r,r")
++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++(define_insn "zero_extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))]
++ ""
++ "@
++ andi\\t%0, %1, 0xff
++ ldbu%o1\\t%0, %1"
++ [(set_attr "type" "alu,ld")])
++
++
++
++;*****************************************************************************
++;*
++;* sign extension
++;*
++;*****************************************************************************
++
++(define_expand "extendhisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (16);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendhisi2_internal"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
++ ""
++ "ldh%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++(define_expand "extendqihi2"
++ [(set (match_operand:HI 0 "register_operand" "")
++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op0 = gen_lowpart (SImode, operands[0]);
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (op0, temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqihi2_internal"
++ [(set (match_operand:HI 0 "register_operand" "=r")
++ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++(define_expand "extendqisi2"
++ [(set (match_operand:SI 0 "register_operand" "")
++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))]
++ ""
++{
++ if (optimize && GET_CODE (operands[1]) == MEM)
++ operands[1] = force_not_mem (operands[1]);
++
++ if (GET_CODE (operands[1]) != MEM)
++ {
++ rtx op1 = gen_lowpart (SImode, operands[1]);
++ rtx temp = gen_reg_rtx (SImode);
++ rtx shift = GEN_INT (24);
++
++ emit_insn (gen_ashlsi3 (temp, op1, shift));
++ emit_insn (gen_ashrsi3 (operands[0], temp, shift));
++ DONE;
++ }
++})
++
++(define_insn "extendqisi2_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
++ ""
++ "ldb%o1\\t%0, %1"
++ [(set_attr "type" "ld")])
++
++
++
++;*****************************************************************************
++;*
++;* Arithmetic Operations
++;*
++;*****************************************************************************
++
++(define_insn "addsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (plus:SI (match_operand:SI 1 "register_operand" "%r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ ""
++ "add%i2\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "subsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++ "sub\\t%0, %z1, %2"
++ [(set_attr "type" "alu")])
++
++(define_insn "mulsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (mult:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "arith_operand" "r,I")))]
++ "TARGET_HAS_MUL"
++ "mul%i2\\t%0, %1, %z2"
++ [(set_attr "type" "mul")])
++
++(define_expand "divsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ ""
++{
++ if (!TARGET_HAS_DIV)
++ {
++ if (!TARGET_FAST_SW_DIV)
++ FAIL;
++ else
++ {
++ if (nios2_emit_expensive_div (operands, SImode))
++ DONE;
++ }
++ }
++})
++
++(define_insn "divsi3_insn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (div:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "div\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "udivsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (udiv:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")))]
++ "TARGET_HAS_DIV"
++ "divu\\t%0, %1, %2"
++ [(set_attr "type" "div")])
++
++(define_insn "smulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxss\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++(define_insn "umulsi3_highpart"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (truncate:SI
++ (lshiftrt:DI
++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r"))
++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r")))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "mulxuu\\t%0, %1, %2"
++ [(set_attr "type" "mul")])
++
++
++(define_expand "mulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1))
++ (sign_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++(define_expand "umulsidi3"
++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0)
++ (mult:SI (match_operand:SI 1 "register_operand" "")
++ (match_operand:SI 2 "register_operand" "")))
++ (set (subreg:SI (match_dup 0) 4)
++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1))
++ (zero_extend:DI (match_dup 2)))
++ (const_int 32))))]
++ "TARGET_HAS_MULX"
++ "")
++
++
++
++;*****************************************************************************
++;*
++;* Negate and ones complement
++;*
++;*****************************************************************************
++
++(define_insn "negsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (neg:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "sub\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++(define_insn "one_cmplsi2"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (not:SI (match_operand:SI 1 "register_operand" "r")))]
++ ""
++{
++ operands[2] = const0_rtx;
++ return "nor\\t%0, %z2, %1";
++}
++ [(set_attr "type" "alu")])
++
++
++
++; Logical Operantions
++
++(define_insn "andsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (and:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ and\\t%0, %1, %z2
++ and%i2\\t%0, %1, %2
++ andh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "iorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (ior:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ or\\t%0, %1, %z2
++ or%i2\\t%0, %1, %2
++ orh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++(define_insn "*norsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (and:SI (not:SI (match_operand:SI 1 "register_operand" "%r"))
++ (not:SI (match_operand:SI 2 "reg_or_0_operand" "rM"))))]
++ ""
++ "nor\\t%0, %1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_insn "xorsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r, r,r")
++ (xor:SI (match_operand:SI 1 "register_operand" "%r, r,r")
++ (match_operand:SI 2 "logical_operand" "rM,J,K")))]
++ ""
++ "@
++ xor\\t%0, %1, %z2
++ xor%i2\\t%0, %1, %2
++ xorh%i2\\t%0, %1, %U2"
++ [(set_attr "type" "alu")])
++
++
++
++;*****************************************************************************
++;*
++;* Shifts
++;*
++;*****************************************************************************
++
++(define_insn "ashlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashift:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sll%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "ashrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "sra%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "lshrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "srl%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotlsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotate:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "shift_operand" "r,L")))]
++ ""
++ "rol%i2\\t%0, %1, %z2"
++ [(set_attr "type" "shift")])
++
++(define_insn "rotrsi3"
++ [(set (match_operand:SI 0 "register_operand" "=r,r")
++ (rotatert:SI (match_operand:SI 1 "register_operand" "r,r")
++ (match_operand:SI 2 "register_operand" "r,r")))]
++ ""
++ "ror\\t%0, %1, %2"
++ [(set_attr "type" "shift")])
++
++(define_insn "*shift_mul_constants"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ashift:SI (mult:SI (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "const_int_operand" "I"))
++ (match_operand:SI 3 "const_int_operand" "I")))]
++ "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))"
++{
++ HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]);
++ rtx ops[3];
++
++ ops[0] = operands[0];
++ ops[1] = operands[1];
++ ops[2] = GEN_INT (mul);
++
++ output_asm_insn ("muli\t%0, %1, %2", ops);
++ return "";
++}
++ [(set_attr "type" "mul")])
++
++
++
++
++;*****************************************************************************
++;*
++;* Prologue, Epilogue and Return
++;*
++;*****************************************************************************
++
++(define_expand "prologue"
++ [(const_int 1)]
++ ""
++{
++ expand_prologue ();
++ DONE;
++})
++
++(define_expand "epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (false);
++ DONE;
++})
++
++(define_expand "sibcall_epilogue"
++ [(return)]
++ ""
++{
++ expand_epilogue (true);
++ DONE;
++})
++
++(define_insn "return"
++ [(return)]
++ "reload_completed && nios2_can_use_return_insn ()"
++ "ret\\t"
++)
++
++(define_insn "return_from_epilogue"
++ [(use (match_operand 0 "pmode_register_operand" ""))
++ (return)]
++ "reload_completed"
++ "ret\\t"
++)
++
++;; Block any insns from being moved before this point, since the
++;; profiling call to mcount can use various registers that aren't
++;; saved or used to pass arguments.
++
++(define_insn "blockage"
++ [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)]
++ ""
++ ""
++ [(set_attr "type" "unknown")
++ (set_attr "length" "0")])
++
++
++
++;*****************************************************************************
++;*
++;* Jumps and Calls
++;*
++;*****************************************************************************
++
++(define_insn "indirect_jump"
++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "jump"
++ [(set (pc)
++ (label_ref (match_operand 0 "" "")))]
++ ""
++ "br\\t%0"
++ [(set_attr "type" "control")])
++
++
++(define_insn "indirect_call"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "indirect_call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))]
++ ""
++ "callr\\t%1"
++)
++
++(define_expand "call"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_expand "call_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (clobber (reg:SI RA_REGNO))])]
++ ""
++ "")
++
++(define_insn "*call"
++ [(call (mem:QI (match_operand:SI 0 "immediate_operand" "i"))
++ (match_operand 1 "" ""))
++ (clobber (match_operand:SI 2 "register_operand" "=r"))]
++ ""
++ "call\\t%0"
++ [(set_attr "type" "control")])
++
++(define_insn "*call_value"
++ [(set (match_operand 0 "" "")
++ (call (mem:QI (match_operand:SI 1 "immediate_operand" "i"))
++ (match_operand 2 "" "")))
++ (clobber (match_operand:SI 3 "register_operand" "=r"))]
++ ""
++ "call\\t%1"
++ [(set_attr "type" "control")])
++
++(define_expand "sibcall"
++ [(parallel [(call (match_operand 0 "" "")
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))])]
++ ""
++ {
++ XEXP (operands[0], 0) = copy_to_mode_reg (SImode, XEXP (operands[0], 0));
++
++ if (operands[2] == NULL_RTX)
++ operands[2] = const0_rtx;
++ }
++)
++
++(define_expand "sibcall_value"
++ [(parallel [(set (match_operand 0 "" "")
++ (call (match_operand 1 "" "")
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))])]
++ ""
++ {
++ XEXP (operands[1], 0) = copy_to_mode_reg (SImode, XEXP (operands[1], 0));
++
++ if (operands[3] == NULL_RTX)
++ operands[3] = const0_rtx;
++ }
++)
++
++(define_insn "sibcall_insn"
++ [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
++ (match_operand 1 "" ""))
++ (return)
++ (use (match_operand 2 "" ""))]
++ ""
++ "jmp\\t%0"
++)
++
++(define_insn "sibcall_value_insn"
++ [(set (match_operand 0 "register_operand" "")
++ (call (mem:QI (match_operand:SI 1 "register_operand" "r"))
++ (match_operand 2 "" "")))
++ (return)
++ (use (match_operand 3 "" ""))]
++ ""
++ "jmp\\t%1"
++)
++
++
++
++
++(define_expand "tablejump"
++ [(parallel [(set (pc) (match_operand 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))])]
++ ""
++ ""
++)
++
++(define_insn "*tablejump"
++ [(set (pc)
++ (match_operand:SI 0 "register_operand" "r"))
++ (use (label_ref (match_operand 1 "" "")))]
++ ""
++ "jmp\\t%0"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Comparisons
++;*
++;*****************************************************************************
++;; Flow here is rather complex (based on MIPS):
++;;
++;; 1) The cmp{si,di,sf,df} routine is called. It deposits the
++;; arguments into the branch_cmp array, and the type into
++;; branch_type. No RTL is generated.
++;;
++;; 2) The appropriate branch define_expand is called, which then
++;; creates the appropriate RTL for the comparison and branch.
++;; Different CC modes are used, based on what type of branch is
++;; done, so that we can constrain things appropriately. There
++;; are assumptions in the rest of GCC that break if we fold the
++;; operands into the branchs for integer operations, and use cc0
++;; for floating point, so we use the fp status register instead.
++;; If needed, an appropriate temporary is created to hold the
++;; of the integer compare.
++
++(define_expand "cmpsi"
++ [(set (cc0)
++ (compare:CC (match_operand:SI 0 "register_operand" "")
++ (match_operand:SI 1 "arith_operand" "")))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = operands[1];
++ branch_type = CMP_SI;
++ DONE;
++})
++
++(define_expand "tstsi"
++ [(set (cc0)
++ (match_operand:SI 0 "register_operand" ""))]
++ ""
++{
++ branch_cmp[0] = operands[0];
++ branch_cmp[1] = const0_rtx;
++ branch_type = CMP_SI;
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* setting a register from a comparison
++;*
++;*****************************************************************************
++
++(define_expand "seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*seq"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpeq%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sne"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpne%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmplt\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sge"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ge:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmpge%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sle"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (le:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpge\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*slt"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "arith_operand" "rI")))]
++ ""
++ "cmplt%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgtu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (gtu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpltu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sgeu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (geu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpgeu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++(define_expand "sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sleu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "reg_or_0_operand" "rM")))]
++ ""
++ "cmpgeu\\t%0, %z2, %z1"
++ [(set_attr "type" "alu")])
++
++
++(define_expand "sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_dup 1)
++ (match_dup 2)))]
++ ""
++{
++ if (branch_type != CMP_SI)
++ FAIL;
++
++ /* set up operands from compare. */
++ operands[1] = branch_cmp[0];
++ operands[2] = branch_cmp[1];
++
++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX);
++ DONE;
++})
++
++
++(define_insn "*sltu"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rM")
++ (match_operand:SI 2 "uns_arith_operand" "rJ")))]
++ ""
++ "cmpltu%i2\\t%0, %z1, %z2"
++ [(set_attr "type" "alu")])
++
++
++
++
++;*****************************************************************************
++;*
++;* branches
++;*
++;*****************************************************************************
++
++(define_insn "*cbranch"
++ [(set (pc)
++ (if_then_else
++ (match_operator:SI 0 "comparison_operator"
++ [(match_operand:SI 2 "reg_or_0_operand" "rM")
++ (match_operand:SI 3 "reg_or_0_operand" "rM")])
++ (label_ref (match_operand 1 "" ""))
++ (pc)))]
++ ""
++ "b%0\\t%z2, %z3, %l1"
++ [(set_attr "type" "control")])
++
++
++(define_expand "beq"
++ [(set (pc)
++ (if_then_else (eq:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bne"
++ [(set (pc)
++ (if_then_else (ne:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgt"
++ [(set (pc)
++ (if_then_else (gt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bge"
++ [(set (pc)
++ (if_then_else (ge:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "ble"
++ [(set (pc)
++ (if_then_else (le:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "blt"
++ [(set (pc)
++ (if_then_else (lt:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++(define_expand "bgtu"
++ [(set (pc)
++ (if_then_else (gtu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bgeu"
++ [(set (pc)
++ (if_then_else (geu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bleu"
++ [(set (pc)
++ (if_then_else (leu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++(define_expand "bltu"
++ [(set (pc)
++ (if_then_else (ltu:CC (cc0)
++ (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ ""
++{
++ gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]);
++ DONE;
++})
++
++
++;*****************************************************************************
++;*
++;* String and Block Operations
++;*
++;*****************************************************************************
++
++; ??? This is all really a hack to get Dhrystone to work as fast as possible
++; things to be fixed:
++; * let the compiler core handle all of this, for that to work the extra
++; aliasing needs to be addressed.
++; * we use three temporary registers for loading and storing to ensure no
++; ld use stalls, this is excessive, because after the first ld/st only
++; two are needed. Only two would be needed all the way through if
++; we could schedule with other code. Consider:
++; 1 ld $1, 0($src)
++; 2 ld $2, 4($src)
++; 3 ld $3, 8($src)
++; 4 st $1, 0($dest)
++; 5 ld $1, 12($src)
++; 6 st $2, 4($src)
++; 7 etc.
++; The first store has to wait until 4. If it does not there will be one
++; cycle of stalling. However, if any other instruction could be placed
++; between 1 and 4, $3 would not be needed.
++; * In small we probably don't want to ever do this ourself because there
++; is no ld use stall.
++
++(define_expand "movstrsi"
++ [(parallel [(set (match_operand:BLK 0 "general_operand" "")
++ (match_operand:BLK 1 "general_operand" ""))
++ (use (match_operand:SI 2 "const_int_operand" ""))
++ (use (match_operand:SI 3 "const_int_operand" ""))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))])]
++ "TARGET_INLINE_MEMCPY"
++{
++ rtx ld_addr_reg, st_addr_reg;
++
++ /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr
++ it trys to copy to a register, but does not re-try the predicate.
++ ??? Intead of fixing expr.c, I fix it here. */
++ if (!const_int_operand (operands[2], SImode))
++ FAIL;
++
++ /* ??? there are some magic numbers which need to be sorted out here.
++ the basis for them is not increasing code size hugely or going
++ out of range of offset addressing */
++ if (INTVAL (operands[3]) < 4)
++ FAIL;
++ if (!optimize
++ || (optimize_size && INTVAL (operands[2]) > 12)
++ || (optimize < 3 && INTVAL (operands[2]) > 100)
++ || INTVAL (operands[2]) > 200)
++ FAIL;
++
++ st_addr_reg
++ = replace_equiv_address (operands[0],
++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0)));
++ ld_addr_reg
++ = replace_equiv_address (operands[1],
++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
++ emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg,
++ operands[2], operands[3]));
++
++ DONE;
++})
++
++
++(define_insn "movstrsi_internal"
++ [(set (match_operand:BLK 0 "memory_operand" "=o")
++ (match_operand:BLK 1 "memory_operand" "o"))
++ (use (match_operand:SI 2 "const_int_operand" "i"))
++ (use (match_operand:SI 3 "const_int_operand" "i"))
++ (clobber (match_scratch:SI 4 "=&r"))
++ (clobber (match_scratch:SI 5 "=&r"))
++ (clobber (match_scratch:SI 6 "=&r"))]
++ "TARGET_INLINE_MEMCPY"
++{
++ int ld_offset = INTVAL (operands[2]);
++ int ld_len = INTVAL (operands[2]);
++ int ld_reg = 0;
++ rtx ld_addr_reg = XEXP (operands[1], 0);
++ int st_offset = INTVAL (operands[2]);
++ int st_len = INTVAL (operands[2]);
++ int st_reg = 0;
++ rtx st_addr_reg = XEXP (operands[0], 0);
++ int delay_count = 0;
++
++ /* ops[0] is the address used by the insn
++ ops[1] is the register being loaded or stored */
++ rtx ops[2];
++
++ if (INTVAL (operands[3]) < 4)
++ abort ();
++
++ while (ld_offset >= 4)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldw\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 4;
++ delay_count++;
++ }
++
++ if (ld_offset >= 2)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldh\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 2;
++ delay_count++;
++ }
++
++ if (ld_offset >= 1)
++ {
++ /* if the load use delay has been met, I can start
++ storing */
++ if (delay_count >= 3)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (ld_addr_reg, ld_len - ld_offset));
++ ops[1] = operands[ld_reg + 4];
++ output_asm_insn ("ldb\t%1, %0", ops);
++
++ ld_reg = (ld_reg + 1) % 3;
++ ld_offset -= 1;
++ delay_count++;
++ }
++
++ while (st_offset >= 4)
++ {
++ ops[0] = gen_rtx (MEM, SImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stw\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 4;
++ }
++
++ while (st_offset >= 2)
++ {
++ ops[0] = gen_rtx (MEM, HImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("sth\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 2;
++ }
++
++ while (st_offset >= 1)
++ {
++ ops[0] = gen_rtx (MEM, QImode,
++ plus_constant (st_addr_reg, st_len - st_offset));
++ ops[1] = operands[st_reg + 4];
++ output_asm_insn ("stb\t%1, %0", ops);
++
++ st_reg = (st_reg + 1) % 3;
++ st_offset -= 1;
++ }
++
++ return "";
++}
++; ??? lengths are not being used yet, but I will probably forget
++; to update this once I am using lengths, so set it to something
++; definetely big enough to cover it. 400 allows for 200 bytes
++; of motion.
++ [(set_attr "length" "400")])
++
++
++
++;*****************************************************************************
++;*
++;* Custom instructions
++;*
++;*****************************************************************************
++
++(define_constants [
++ (CUSTOM_N 100)
++ (CUSTOM_NI 101)
++ (CUSTOM_NF 102)
++ (CUSTOM_NP 103)
++ (CUSTOM_NII 104)
++ (CUSTOM_NIF 105)
++ (CUSTOM_NIP 106)
++ (CUSTOM_NFI 107)
++ (CUSTOM_NFF 108)
++ (CUSTOM_NFP 109)
++ (CUSTOM_NPI 110)
++ (CUSTOM_NPF 111)
++ (CUSTOM_NPP 112)
++ (CUSTOM_IN 113)
++ (CUSTOM_INI 114)
++ (CUSTOM_INF 115)
++ (CUSTOM_INP 116)
++ (CUSTOM_INII 117)
++ (CUSTOM_INIF 118)
++ (CUSTOM_INIP 119)
++ (CUSTOM_INFI 120)
++ (CUSTOM_INFF 121)
++ (CUSTOM_INFP 122)
++ (CUSTOM_INPI 123)
++ (CUSTOM_INPF 124)
++ (CUSTOM_INPP 125)
++ (CUSTOM_FN 126)
++ (CUSTOM_FNI 127)
++ (CUSTOM_FNF 128)
++ (CUSTOM_FNP 129)
++ (CUSTOM_FNII 130)
++ (CUSTOM_FNIF 131)
++ (CUSTOM_FNIP 132)
++ (CUSTOM_FNFI 133)
++ (CUSTOM_FNFF 134)
++ (CUSTOM_FNFP 135)
++ (CUSTOM_FNPI 136)
++ (CUSTOM_FNPF 137)
++ (CUSTOM_FNPP 138)
++ (CUSTOM_PN 139)
++ (CUSTOM_PNI 140)
++ (CUSTOM_PNF 141)
++ (CUSTOM_PNP 142)
++ (CUSTOM_PNII 143)
++ (CUSTOM_PNIF 144)
++ (CUSTOM_PNIP 145)
++ (CUSTOM_PNFI 146)
++ (CUSTOM_PNFF 147)
++ (CUSTOM_PNFP 148)
++ (CUSTOM_PNPI 149)
++ (CUSTOM_PNPF 150)
++ (CUSTOM_PNPP 151)
++])
++
++
++(define_insn "custom_n"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)]
++ ""
++ "custom\\t%0, zero, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ni"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NI)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")] CUSTOM_NF)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_np"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NP)]
++ ""
++ "custom\\t%0, zero, %1, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nii"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NII)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nif"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NIF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nip"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NIP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nff"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NFF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_nfp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SF 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npi"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPI)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npf"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NPF)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_npp"
++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")
++ (match_operand:SI 1 "register_operand" "r")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPP)]
++ ""
++ "custom\\t%0, zero, %1, %2"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_in"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_IN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_ini"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_INF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_INP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_infp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_INPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_inpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_INPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++(define_insn "custom_fn"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_FN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fni"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_FNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_FNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnii"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnif"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnip"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnff"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnfp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpi"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpf"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_FNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_fnpp"
++ [(set (match_operand:SF 0 "register_operand" "=r")
++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_FNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++(define_insn "custom_pn"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] CUSTOM_PN))]
++ ""
++ "custom\\t%1, %0, zero, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pni"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNI))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_PNF))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_PNP))]
++ ""
++ "custom\\t%1, %0, %2, zero"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnii"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNII))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnif"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNIF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnip"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNIP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnff"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNFF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnfp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SF 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNFP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpi"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPI))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpf"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SF 3 "register_operand" "r")] CUSTOM_PNPF))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++(define_insn "custom_pnpp"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")
++ (match_operand:SI 2 "register_operand" "r")
++ (match_operand:SI 3 "register_operand" "r")] CUSTOM_PNPP))]
++ ""
++ "custom\\t%1, %0, %2, %3"
++ [(set_attr "type" "custom")])
++
++
++
++
++
++
++;*****************************************************************************
++;*
++;* Misc
++;*
++;*****************************************************************************
++
++(define_insn "nop"
++ [(const_int 0)]
++ ""
++ "nop\\t"
++ [(set_attr "type" "alu")])
++
++(define_insn "sync"
++ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)]
++ ""
++ "sync\\t"
++ [(set_attr "type" "control")])
++
++
++(define_insn "rdctl"
++ [(set (match_operand:SI 0 "register_operand" "=r")
++ (unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] UNSPEC_RDCTL))]
++ ""
++ "rdctl\\t%0, ctl%1"
++ [(set_attr "type" "control")])
++
++(define_insn "wrctl"
++ [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand" "O")
++ (match_operand:SI 1 "register_operand" "r")] UNSPEC_WRCTL)]
++ ""
++ "wrctl\\tctl%0, %1"
++ [(set_attr "type" "control")])
++
++
++
++;*****************************************************************************
++;*
++;* Peepholes
++;*
++;*****************************************************************************
++
++
+--- gcc-3.4.3/gcc/config/nios2/t-nios2
++++ gcc-3.4.3-nios2/gcc/config/nios2/t-nios2
+@@ -0,0 +1,123 @@
++##
++## Compiler flags to use when compiling libgcc2.c.
++##
++## LIB2FUNCS_EXTRA
++## A list of source file names to be compiled or assembled and inserted into libgcc.a.
++
++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \
++ $(srcdir)/config/nios2/lib2-divmod-hi.c \
++ $(srcdir)/config/nios2/lib2-divtable.c \
++ $(srcdir)/config/nios2/lib2-mul.c
++
++##
++## Floating Point Emulation
++## To have GCC include software floating point libraries in libgcc.a define FPBIT
++## and DPBIT along with a few rules as follows:
++##
++## # We want fine grained libraries, so use the new code
++## # to build the floating point emulation libraries.
++FPBIT=$(srcdir)/config/nios2/nios2-fp-bit.c
++DPBIT=$(srcdir)/config/nios2/nios2-dp-bit.c
++
++TARGET_LIBGCC2_CFLAGS = -O2
++
++# FLOAT_ONLY - no doubles
++# SMALL_MACHINE - QI/HI is faster than SI
++# Actually SMALL_MACHINE uses chars and shorts instead of ints
++# since ints (16-bit ones as they are today) are at least as fast
++# as chars and shorts, don't define SMALL_MACHINE
++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code )
++
++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '#define FLOAT' > ${FPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${FPBIT}
++
++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile
++ echo '' > ${DPBIT}
++ cat $(srcdir)/config/fp-bit.c >> ${DPBIT}
++
++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
++
++# Assemble startup files.
++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm
++
++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES)
++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm
++
++
++## You may need to provide additional #defines at the beginning of
++## fp-bit.c and dp-bit.c to control target endianness and other options
++##
++## CRTSTUFF_T_CFLAGS
++## Special flags used when compiling crtstuff.c. See Initialization.
++##
++## CRTSTUFF_T_CFLAGS_S
++## Special flags used when compiling crtstuff.c for shared linking. Used
++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization.
++##
++## MULTILIB_OPTIONS
++## For some targets, invoking GCC in different ways produces objects that
++## can not be linked together. For example, for some targets GCC produces
++## both big and little endian code. For these targets, you must arrange
++## for multiple versions of libgcc.a to be compiled, one for each set of
++## incompatible options. When GCC invokes the linker, it arranges to link
++## in the right version of libgcc.a, based on the command line options
++## used.
++## The MULTILIB_OPTIONS macro lists the set of options for which special
++## versions of libgcc.a must be built. Write options that are mutually
++## incompatible side by side, separated by a slash. Write options that may
++## be used together separated by a space. The build procedure will build
++## all combinations of compatible options.
++##
++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float,
++## Makefile will build special versions of libgcc.a using the following
++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float,
++## and -m68020 -msoft-float.
++
++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx
++
++## MULTILIB_DIRNAMES
++## If MULTILIB_OPTIONS is used, this variable specifies the directory names
++## that should be used to hold the various libraries. Write one element in
++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If
++## MULTILIB_DIRNAMES is not used, the default value will be
++## MULTILIB_OPTIONS, with all slashes treated as spaces.
++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float,
++## then the default value of MULTILIB_DIRNAMES is m68000 m68020
++## msoft-float. You may specify a different value if you desire a
++## different set of directory names.
++
++# MULTILIB_DIRNAMES =
++
++## MULTILIB_MATCHES
++## Sometimes the same option may be written in two different ways. If an
++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any
++## synonyms. In that case, set MULTILIB_MATCHES to a list of items of the
++## form option=option to describe all relevant synonyms. For example,
++## m68000=mc68000 m68020=mc68020.
++##
++## MULTILIB_EXCEPTIONS
++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being
++## specified, there are combinations that should not be built. In that
++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in
++## shell case syntax that should not be built.
++## For example, in the PowerPC embedded ABI support, it is not desirable to
++## build libraries compiled with the -mcall-aix option and either of the
++## -fleading-underscore or -mlittle options at the same time. Therefore
++## MULTILIB_EXCEPTIONS is set to
++##
++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix*
++##
++
++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx*
++
++##
++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building
++## multiple versions of libgcc.a certain options should always be passed on
++## to the compiler. In that case, set MULTILIB_EXTRA_OPTS to be the list
++## of options to be used for all builds.
++##
++
+--- gcc-3.4.3/gcc/config.gcc
++++ gcc-3.4.3-nios2/gcc/config.gcc
+@@ -1321,6 +1321,10 @@ m32rle-*-linux*)
+ thread_file='posix'
+ fi
+ ;;
++# JBG
++nios2-*-* | nios2-*-*)
++ tm_file="elfos.h ${tm_file}"
++ ;;
+ # m68hc11 and m68hc12 share the same machine description.
+ m68hc11-*-*|m6811-*-*)
+ tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
+--- gcc-3.4.3/gcc/cse.c
++++ gcc-3.4.3-nios2/gcc/cse.c
+@@ -3134,6 +3134,10 @@ find_comparison_args (enum rtx_code code
+ #ifdef FLOAT_STORE_FLAG_VALUE
+ REAL_VALUE_TYPE fsfv;
+ #endif
++#ifdef __nios2__
++ if (p->is_const)
++ break;
++#endif
+
+ /* If the entry isn't valid, skip it. */
+ if (! exp_equiv_p (p->exp, p->exp, 1, 0))
+--- gcc-3.4.3/gcc/doc/extend.texi
++++ gcc-3.4.3-nios2/gcc/doc/extend.texi
+@@ -5636,12 +5636,118 @@ to those machines. Generally these gene
+ instructions, but allow the compiler to schedule those calls.
+
+ @menu
++* Altera Nios II Built-in Functions::
+ * Alpha Built-in Functions::
+ * ARM Built-in Functions::
+ * X86 Built-in Functions::
+ * PowerPC AltiVec Built-in Functions::
+ @end menu
+
++@node Altera Nios II Built-in Functions
++@subsection Altera Nios II Built-in Functions
++
++These built-in functions are available for the Altera Nios II
++family of processors.
++
++The following built-in functions are always available. They
++all generate the machine instruction that is part of the name.
++
++@example
++int __builtin_ldbio (volatile const void *)
++int __builtin_ldbuio (volatile const void *)
++int __builtin_ldhio (volatile const void *)
++int __builtin_ldhuio (volatile const void *)
++int __builtin_ldwio (volatile const void *)
++void __builtin_stbio (volatile void *, int)
++void __builtin_sthio (volatile void *, int)
++void __builtin_stwio (volatile void *, int)
++void __builtin_sync (void)
++int __builtin_rdctl (int)
++void __builtin_wrctl (int, int)
++@end example
++
++The following built-in functions are always available. They
++all generate a Nios II Custom Instruction. The name of the
++function represents the types that the function takes and
++returns. The letter before the @code{n} is the return type
++or void if absent. The @code{n} represnts the first parameter
++to all the custom instructions, the custom instruction number.
++The two letters after the @code{n} represent the up to two
++parameters to the function.
++
++The letters reprsent the following data types:
++@table @code
++@item <no letter>
++@code{void} for return type and no parameter for parameter types.
++
++@item i
++@code{int} for return type and parameter type
++
++@item f
++@code{float} for return type and parameter type
++
++@item p
++@code{void *} for return type and parameter type
++
++@end table
++
++And the function names are:
++@example
++void __builtin_custom_n (void)
++void __builtin_custom_ni (int)
++void __builtin_custom_nf (float)
++void __builtin_custom_np (void *)
++void __builtin_custom_nii (int, int)
++void __builtin_custom_nif (int, float)
++void __builtin_custom_nip (int, void *)
++void __builtin_custom_nfi (float, int)
++void __builtin_custom_nff (float, float)
++void __builtin_custom_nfp (float, void *)
++void __builtin_custom_npi (void *, int)
++void __builtin_custom_npf (void *, float)
++void __builtin_custom_npp (void *, void *)
++int __builtin_custom_in (void)
++int __builtin_custom_ini (int)
++int __builtin_custom_inf (float)
++int __builtin_custom_inp (void *)
++int __builtin_custom_inii (int, int)
++int __builtin_custom_inif (int, float)
++int __builtin_custom_inip (int, void *)
++int __builtin_custom_infi (float, int)
++int __builtin_custom_inff (float, float)
++int __builtin_custom_infp (float, void *)
++int __builtin_custom_inpi (void *, int)
++int __builtin_custom_inpf (void *, float)
++int __builtin_custom_inpp (void *, void *)
++float __builtin_custom_fn (void)
++float __builtin_custom_fni (int)
++float __builtin_custom_fnf (float)
++float __builtin_custom_fnp (void *)
++float __builtin_custom_fnii (int, int)
++float __builtin_custom_fnif (int, float)
++float __builtin_custom_fnip (int, void *)
++float __builtin_custom_fnfi (float, int)
++float __builtin_custom_fnff (float, float)
++float __builtin_custom_fnfp (float, void *)
++float __builtin_custom_fnpi (void *, int)
++float __builtin_custom_fnpf (void *, float)
++float __builtin_custom_fnpp (void *, void *)
++void * __builtin_custom_pn (void)
++void * __builtin_custom_pni (int)
++void * __builtin_custom_pnf (float)
++void * __builtin_custom_pnp (void *)
++void * __builtin_custom_pnii (int, int)
++void * __builtin_custom_pnif (int, float)
++void * __builtin_custom_pnip (int, void *)
++void * __builtin_custom_pnfi (float, int)
++void * __builtin_custom_pnff (float, float)
++void * __builtin_custom_pnfp (float, void *)
++void * __builtin_custom_pnpi (void *, int)
++void * __builtin_custom_pnpf (void *, float)
++void * __builtin_custom_pnpp (void *, void *)
++@end example
++
++
+ @node Alpha Built-in Functions
+ @subsection Alpha Built-in Functions
+
+--- gcc-3.4.3/gcc/doc/invoke.texi
++++ gcc-3.4.3-nios2/gcc/doc/invoke.texi
+@@ -337,6 +337,14 @@ in the following sections.
+ @item Machine Dependent Options
+ @xref{Submodel Options,,Hardware Models and Configurations}.
+
++@emph{Altera Nios II Options}
++@gccoptlist{-msmallc -mno-bypass-cache -mbypass-cache @gol
++-mno-cache-volatile -mcache-volatile -mno-inline-memcpy @gol
++-minline-memcpy -mno-fast-sw-div -mfast-sw-div @gol
++-mhw-mul -mno-hw-mul -mhw-mulx -mno-hw-mulx @gol
++-mno-hw-div -mhw-div @gol
++-msys-crt0= -msys-lib= -msys=nosys }
++
+ @emph{M680x0 Options}
+ @gccoptlist{-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 @gol
+ -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 @gol
+@@ -5836,6 +5844,7 @@ machine description. The default for th
+ that macro, which enables you to change the defaults.
+
+ @menu
++* Altera Nios II Options::
+ * M680x0 Options::
+ * M68hc1x Options::
+ * VAX Options::
+@@ -5871,6 +5880,103 @@ that macro, which enables you to change
+ * FRV Options::
+ @end menu
+
++
++@node Altera Nios II Options
++@subsection Altera Nios II Options
++@cindex Altera Nios II options
++
++These are the @samp{-m} options defined for the Altera Nios II
++processor.
++
++@table @gcctabopt
++
++@item -msmallc
++@opindex msmallc
++
++Link with a limited version of the C library, -lsmallc. For more
++information see the C Library Documentation.
++
++
++@item -mbypass-cache
++@itemx -mno-bypass-cache
++@opindex mno-bypass-cache
++@opindex mbypass-cache
++
++Force all load and store instructions to always bypass cache by
++using io variants of the instructions. The default is to not
++bypass the cache.
++
++@item -mno-cache-volatile
++@itemx -mcache-volatile
++@opindex mcache-volatile
++@opindex mno-cache-volatile
++
++Volatile memory access bypass the cache using the io variants of
++the ld and st instructions. The default is to cache volatile
++accesses.
++
++-mno-cache-volatile is deprecated and will be deleted in a
++future GCC release.
++
++
++@item -mno-inline-memcpy
++@itemx -minline-memcpy
++@opindex mno-inline-memcpy
++@opindex minline-memcpy
++
++Do not inline memcpy. The default is to inline when -O is on.
++
++
++@item -mno-fast-sw-div
++@itemx -mfast-sw-div
++@opindex mno-fast-sw-div
++@opindex mfast-sw-div
++
++Do no use table based fast divide for small numbers. The default
++is to use the fast divide at -O3 and above.
++
++
++@item -mno-hw-mul
++@itemx -mhw-mul
++@itemx -mno-hw-mulx
++@itemx -mhw-mulx
++@itemx -mno-hw-div
++@itemx -mhw-div
++@opindex mno-hw-mul
++@opindex mhw-mul
++@opindex mno-hw-mulx
++@opindex mhw-mulx
++@opindex mno-hw-div
++@opindex mhw-div
++
++Enable or disable emitting @code{mul}, @code{mulx} and @code{div} family of
++instructions by the compiler. The default is to emit @code{mul}
++and not emit @code{div} and @code{mulx}.
++
++The different combinations of @code{mul} and @code{mulx} instructions
++generate a different multilib options.
++
++
++@item -msys-crt0=@var{startfile}
++@opindex msys-crt0
++
++@var{startfile} is the file name of the startfile (crt0) to use
++when linking. The default is crt0.o that comes with libgloss
++and is only suitable for use with the instruction set
++simulator.
++
++@item -msys-lib=@var{systemlib}
++@itemx -msys-lib=nosys
++@opindex msys-lib
++
++@var{systemlib} is the library name of the library which provides
++the system calls required by the C library, e.g. @code{read}, @code{write}
++etc. The default is to use nosys, this library provides
++stub implementations of the calls and is part of libgloss.
++
++@end table
++
++
+ @node M680x0 Options
+ @subsection M680x0 Options
+ @cindex M680x0 options
+--- gcc-3.4.3/gcc/doc/md.texi
++++ gcc-3.4.3-nios2/gcc/doc/md.texi
+@@ -1335,6 +1335,49 @@ However, here is a summary of the machin
+ available on some particular machines.
+
+ @table @emph
++
++@item Altera Nios II family---@file{nios2.h}
++@table @code
++
++@item I
++Integer that is valid as an immediate operand in an
++instruction taking a signed 16-bit number. Range
++@minus{}32768 to 32767.
++
++@item J
++Integer that is valid as an immediate operand in an
++instruction taking an unsigned 16-bit number. Range
++0 to 65535.
++
++@item K
++Integer that is valid as an immediate operand in an
++instruction taking only the upper 16-bits of a
++32-bit number. Range 32-bit numbers with the lower
++16-bits being 0.
++
++@item L
++Integer that is valid as an immediate operand for a
++shift instruction. Range 0 to 31.
++
++
++@item M
++Integer that is valid as an immediate operand for
++only the value 0. Can be used in conjunction with
++the format modifier @code{z} to use @code{r0}
++instead of @code{0} in the assembly output.
++
++@item N
++Integer that is valid as an immediate operand for
++a custom instruction opcode. Range 0 to 255.
++
++@item S
++Matches immediates which are addresses in the small
++data section and therefore can be added to @code{gp}
++as a 16-bit immediate to re-create their 32-bit value.
++
++@end table
++
++
+ @item ARM family---@file{arm.h}
+ @table @code
+ @item f
diff --git a/misc/buildroot/toolchain/gcc/3.4.6/arm-softfloat.patch.conditional b/misc/buildroot/toolchain/gcc/3.4.6/arm-softfloat.patch.conditional
new file mode 100644
index 000000000..19d1b90da
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/3.4.6/arm-softfloat.patch.conditional
@@ -0,0 +1,270 @@
+Note... modified my mjn3 to not conflict with the big endian arm patch.
+Warning!!! Only the linux target is aware of TARGET_ENDIAN_DEFAULT.
+Also changed
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{!mcpu=*:-mcpu=xscale} \
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+to
+ #define SUBTARGET_EXTRA_ASM_SPEC "\
+ %{mhard-float:-mfpu=fpa} \
+ %{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+in gcc/config/arm/linux-elf.h.
+#
+# Submitted:
+#
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# Description:
+#
+# Nicholas Pitre released this patch for gcc soft-float support here:
+# http://lists.arm.linux.org.uk/pipermail/linux-arm/2003-October/006436.html
+#
+# This version has been adapted to work with gcc 3.4.0.
+#
+# The original patch doesn't distinguish between softfpa and softvfp modes
+# in the way Nicholas Pitre probably meant. His description is:
+#
+# "Default is to use APCS-32 mode with soft-vfp. The old Linux default for
+# floats can be achieved with -mhard-float or with the configure
+# --with-float=hard option. If -msoft-float or --with-float=soft is used then
+# software float support will be used just like the default but with the legacy
+# big endian word ordering for double float representation instead."
+#
+# Which means the following:
+#
+# * If you compile without -mhard-float or -msoft-float, you should get
+# software floating point, using the VFP format. The produced object file
+# should have these flags in its header:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# * If you compile with -mhard-float, you should get hardware floating point,
+# which always uses the FPA format. Object file header flags should be:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# * If you compile with -msoft-float, you should get software floating point,
+# using the FPA format. This is done for compatibility reasons with many
+# existing distributions. Object file header flags should be:
+#
+# private flags = 200: [APCS-32] [FPA float format] [software FP]
+#
+# The original patch from Nicholas Pitre contained the following constructs:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
+#
+# However, gcc doesn't accept this ";:" notation, used in the 3rd line. This
+# is probably the reason Robert Schwebel modified it to:
+#
+# #define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+# %{mhard-float:-mfpu=fpa} \
+# %{!mhard-float: %{msoft-float:-mfpu=softfpa -mfpu=softvfp}}"
+#
+# But this causes the following behaviour:
+#
+# * If you compile without -mhard-float or -msoft-float, the compiler generates
+# software floating point instructions, but *nothing* is passed to the
+# assembler, which results in an object file which has flags:
+#
+# private flags = 0: [APCS-32] [FPA float format]
+#
+# This is not correct!
+#
+# * If you compile with -mhard-float, the compiler generates hardware floating
+# point instructions, and passes "-mfpu=fpa" to the assembler, which results
+# in an object file which has the same flags as in the previous item, but now
+# those *are* correct.
+#
+# * If you compile with -msoft-float, the compiler generates software floating
+# point instructions, and passes "-mfpu=softfpa -mfpu=softvfp" (in that
+# order) to the assembler, which results in an object file with flags:
+#
+# private flags = 600: [APCS-32] [VFP float format] [software FP]
+#
+# This is not correct, because the last "-mfpu=" option on the assembler
+# command line determines the actual FPU convention used (which should be FPA
+# in this case).
+#
+# Therefore, I modified this patch to get the desired behaviour. Every
+# instance of the notation:
+#
+# %{msoft-float:-mfpu=softfpa -mfpu=softvfp}
+#
+# was changed to:
+#
+# %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}
+#
+# I also did the following:
+#
+# * Modified all TARGET_DEFAULT macros I could find to include ARM_FLAG_VFP, to
+# be consistent with Nicholas' original patch.
+# * Removed any "msoft-float" or "mhard-float" from all MULTILIB_DEFAULTS
+# macros I could find. I think that if you compile without any options, you
+# would like to get the defaults. :)
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+
+diff -urN gcc-3.4.1-old/gcc/config/arm/coff.h gcc-3.4.1/gcc/config/arm/coff.h
+--- gcc-3.4.1-old/gcc/config/arm/coff.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/coff.h 2004-09-02 21:51:15.000000000 -0500
+@@ -31,11 +31,16 @@
+ #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
+ #endif
+
+ /* This is COFF, but prefer stabs. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/elf.h gcc-3.4.1/gcc/config/arm/elf.h
+--- gcc-3.4.1-old/gcc/config/arm/elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -46,7 +46,9 @@
+
+ #ifndef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
++%{mapcs-float:-mfloat} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+ #endif
+
+ #ifndef ASM_SPEC
+@@ -106,12 +108,17 @@
+ #endif
+
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
+ #endif
+
+ #define TARGET_ASM_FILE_START_APP_OFF true
+diff -urN gcc-3.4.1-old/gcc/config/arm/linux-elf.h gcc-3.4.1/gcc/config/arm/linux-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/linux-elf.h 2004-09-02 21:50:52.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/linux-elf.h 2004-09-02 22:00:49.000000000 -0500
+@@ -44,12 +44,26 @@
+ #define TARGET_LINKER_EMULATION "armelf_linux"
+ #endif
+
+-/* Default is to use APCS-32 mode. */
++/*
++ * Default is to use APCS-32 mode with soft-vfp.
++ * The old Linux default for floats can be achieved with -mhard-float
++ * or with the configure --with-float=hard option.
++ * If -msoft-float or --with-float=soft is used then software float
++ * support will be used just like the default but with the legacy
++ * big endian word ordering for double float representation instead.
++ */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT \
+- ( ARM_FLAG_APCS_32 | \
+- ARM_FLAG_MMU_TRAPS | \
+- TARGET_ENDIAN_DEFAULT )
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_APCS_32 \
++ | ARM_FLAG_SOFT_FLOAT \
++ | TARGET_ENDIAN_DEFAULT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_MMU_TRAPS )
++
++#undef SUBTARGET_EXTRA_ASM_SPEC
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+@@ -57,7 +71,7 @@
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
+
+ #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
+
+@@ -72,7 +86,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
+diff -urN gcc-3.4.1-old/gcc/config/arm/t-linux gcc-3.4.1/gcc/config/arm/t-linux
+--- gcc-3.4.1-old/gcc/config/arm/t-linux 2003-09-20 16:09:07.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/t-linux 2004-09-02 21:51:15.000000000 -0500
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+diff -urN gcc-3.4.1-old/gcc/config/arm/unknown-elf.h gcc-3.4.1/gcc/config/arm/unknown-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/unknown-elf.h 2004-02-24 08:25:22.000000000 -0600
++++ gcc-3.4.1/gcc/config/arm/unknown-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -30,7 +30,12 @@
+
+ /* Default to using APCS-32 and software floating point. */
+ #ifndef TARGET_DEFAULT
+-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
++#define TARGET_DEFAULT \
++ ( ARM_FLAG_SOFT_FLOAT \
++ | ARM_FLAG_VFP \
++ | ARM_FLAG_APCS_32 \
++ | ARM_FLAG_APCS_FRAME \
++ | ARM_FLAG_MMU_TRAPS )
+ #endif
+
+ /* Now we define the strings used to build the spec file. */
+diff -urN gcc-3.4.1-old/gcc/config/arm/xscale-elf.h gcc-3.4.1/gcc/config/arm/xscale-elf.h
+--- gcc-3.4.1-old/gcc/config/arm/xscale-elf.h 2003-07-01 18:26:43.000000000 -0500
++++ gcc-3.4.1/gcc/config/arm/xscale-elf.h 2004-09-02 21:51:15.000000000 -0500
+@@ -49,11 +49,12 @@
+ endian, regardless of the endian-ness of the memory
+ system. */
+
+-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
+- %{mhard-float:-mfpu=fpa} \
+- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
++#define SUBTARGET_EXTRA_ASM_SPEC "\
++%{!mcpu=*:-mcpu=xscale} \
++%{mhard-float:-mfpu=fpa} \
++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
+
+ #ifndef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
++ { "mlittle-endian", "mno-thumb-interwork", "marm" }
+ #endif
diff --git a/misc/buildroot/toolchain/gcc/4.0.0/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.0.0/300-libstdc++-pic.patch
new file mode 100644
index 000000000..a9d6e7185
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/300-libstdc++-pic.patch
@@ -0,0 +1,45 @@
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
+@@ -625,7 +625,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -664,7 +664,7 @@
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+- uninstall-toolexeclibLTLIBRARIES
++ uninstall-toolexeclibLTLIBRARIES install-exec-local
+
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@@ -743,6 +743,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.0.0/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.0.0/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.0.0/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.0.0/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.0.0/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.0.0/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.0.0/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/4.0.0/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..c7676ae6a
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
+--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
+@@ -18,5 +18,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
+--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/misc/buildroot/toolchain/gcc/4.0.0/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.0.0/800-arm-bigendian.patch
new file mode 100644
index 000000000..307aea3ea
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.0.3/gcc/config/arm/linux-elf.h
++++ gcc-4.0.3/gcc/config/arm/linux-elf.h
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+--- gcc-4.0.3/gcc/config.gcc
++++ gcc-4.0.3/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/4.0.0/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/4.0.0/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.0/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/4.0.1/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.0.1/300-libstdc++-pic.patch
new file mode 100644
index 000000000..a9d6e7185
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/300-libstdc++-pic.patch
@@ -0,0 +1,45 @@
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
+@@ -625,7 +625,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -664,7 +664,7 @@
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+- uninstall-toolexeclibLTLIBRARIES
++ uninstall-toolexeclibLTLIBRARIES install-exec-local
+
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@@ -743,6 +743,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.0.1/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.0.1/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.0.1/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.0.1/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.0.1/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.0.1/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.0.1/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/4.0.1/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..c7676ae6a
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
+--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
+@@ -18,5 +18,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
+--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/misc/buildroot/toolchain/gcc/4.0.1/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.0.1/800-arm-bigendian.patch
new file mode 100644
index 000000000..307aea3ea
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.0.3/gcc/config/arm/linux-elf.h
++++ gcc-4.0.3/gcc/config/arm/linux-elf.h
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+--- gcc-4.0.3/gcc/config.gcc
++++ gcc-4.0.3/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/4.0.1/830-gcc-bug-num-22167.patch b/misc/buildroot/toolchain/gcc/4.0.1/830-gcc-bug-num-22167.patch
new file mode 100644
index 000000000..c7419af90
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.1/830-gcc-bug-num-22167.patch
@@ -0,0 +1,16 @@
+Index: gcc/gcse.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
+retrieving revision 1.288.2.9
+diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.288.2.9 gcse.c
+--- gcc/gcc/gcse.c 30 Oct 2004 18:02:53 -0000 1.288.2.9
++++ gcc/gcc/gcse.c 14 Jul 2005 13:19:57 -0000
+@@ -6445,7 +6445,7 @@ hoist_code (void)
+ insn_inserted_p = 0;
+
+ /* These tests should be the same as the tests above. */
+- if (TEST_BIT (hoist_vbeout[bb->index], i))
++ if (TEST_BIT (hoist_exprs[bb->index], i))
+ {
+ /* We've found a potentially hoistable expression, now
+ we look at every block BB dominates to see if it
diff --git a/misc/buildroot/toolchain/gcc/4.0.2/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.0.2/300-libstdc++-pic.patch
new file mode 100644
index 000000000..a9d6e7185
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.2/300-libstdc++-pic.patch
@@ -0,0 +1,45 @@
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
+@@ -625,7 +625,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -664,7 +664,7 @@
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+- uninstall-toolexeclibLTLIBRARIES
++ uninstall-toolexeclibLTLIBRARIES install-exec-local
+
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@@ -743,6 +743,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.0.2/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.0.2/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.2/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.0.2/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.0.2/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.2/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.0.2/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.0.2/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.2/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.0.2/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/4.0.2/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..c7676ae6a
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.2/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
+--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
+@@ -18,5 +18,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
+--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/misc/buildroot/toolchain/gcc/4.0.2/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.0.2/800-arm-bigendian.patch
new file mode 100644
index 000000000..307aea3ea
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.2/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.0.3/gcc/config/arm/linux-elf.h
++++ gcc-4.0.3/gcc/config/arm/linux-elf.h
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+--- gcc-4.0.3/gcc/config.gcc
++++ gcc-4.0.3/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/4.0.3/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.0.3/300-libstdc++-pic.patch
new file mode 100644
index 000000000..a9d6e7185
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/300-libstdc++-pic.patch
@@ -0,0 +1,45 @@
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
+@@ -625,7 +625,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -664,7 +664,7 @@
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+- uninstall-toolexeclibLTLIBRARIES
++ uninstall-toolexeclibLTLIBRARIES install-exec-local
+
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@@ -743,6 +743,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.0.3/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.0.3/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.0.3/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.0.3/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.0.3/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.0.3/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.0.3/304-index_macro.patch b/misc/buildroot/toolchain/gcc/4.0.3/304-index_macro.patch
new file mode 100644
index 000000000..1fac112fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx
+ {
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/4.0.3/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/4.0.3/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..c7676ae6a
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
+--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
+@@ -18,5 +18,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
+--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/misc/buildroot/toolchain/gcc/4.0.3/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.0.3/800-arm-bigendian.patch
new file mode 100644
index 000000000..307aea3ea
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.3/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.0.3/gcc/config/arm/linux-elf.h
++++ gcc-4.0.3/gcc/config/arm/linux-elf.h
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+--- gcc-4.0.3/gcc/config.gcc
++++ gcc-4.0.3/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.0.4/300-libstdc++-pic.patch
new file mode 100644
index 000000000..a9d6e7185
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/300-libstdc++-pic.patch
@@ -0,0 +1,45 @@
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
+@@ -625,7 +625,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -664,7 +664,7 @@
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-info-am \
+- uninstall-toolexeclibLTLIBRARIES
++ uninstall-toolexeclibLTLIBRARIES install-exec-local
+
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
+@@ -743,6 +743,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.0.4/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.0.4/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.0.4/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.0.4/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/304-index_macro.patch b/misc/buildroot/toolchain/gcc/4.0.4/304-index_macro.patch
new file mode 100644
index 000000000..1fac112fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx
+ {
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/305-libmudflap-susv3-legacy.patch b/misc/buildroot/toolchain/gcc/4.0.4/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 000000000..374b1f865
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
+@@ -427,7 +427,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -437,7 +437,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -447,7 +447,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -456,7 +456,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -465,7 +465,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* XXX: stpcpy, memccpy */
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/402-libbackend_dep_gcov-iov.h.patch b/misc/buildroot/toolchain/gcc/4.0.4/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 000000000..89196d9fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.4.orig/gcc/Makefile.in 2007-02-12 11:35:43.000000000 +0100
++++ gcc-4.0.4/gcc/Makefile.in 2007-02-12 11:38:04.000000000 +0100
+@@ -2202,7 +2202,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
+ # FIXME: writing proper dependencies for this is a *LOT* of work.
+ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-attr.h
++ insn-attr.h gcov-iov.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DTARGET_NAME=\"$(target_noncanonical)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/602-sdk-libstdc++-includes.patch b/misc/buildroot/toolchain/gcc/4.0.4/602-sdk-libstdc++-includes.patch
new file mode 100644
index 000000000..c7676ae6a
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
+--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
+@@ -18,5 +18,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
+--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/misc/buildroot/toolchain/gcc/4.0.4/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.0.4/800-arm-bigendian.patch
new file mode 100644
index 000000000..307aea3ea
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.0.4/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.0.3/gcc/config/arm/linux-elf.h
++++ gcc-4.0.3/gcc/config/arm/linux-elf.h
+@@ -31,19 +31,33 @@
+ /* Do not assume anything about header files. */
+ #define NO_IMPLICIT_EXTERN_C
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* The GNU C++ standard library requires that these macros be defined. */
+ #undef CPLUSPLUS_CPP_SPEC
+@@ -90,7 +104,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #define TARGET_OS_CPP_BUILTINS() \
+--- gcc-4.0.3/gcc/config.gcc
++++ gcc-4.0.3/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
++ case $target in
++ arm*b-*)
++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
++ ;;
++ esac
+ tmake_file="${tmake_file} arm/t-arm arm/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/110-arm-eabi.patch b/misc/buildroot/toolchain/gcc/4.1.0/110-arm-eabi.patch
new file mode 100644
index 000000000..acebe5308
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/110-arm-eabi.patch
@@ -0,0 +1,27 @@
+--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
+@@ -674,7 +674,7 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
+ case ${target} in
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+
+diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
+--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
+@@ -53,7 +53,11 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
++#ifdef USE_UCLIBC
++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
++#else
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#endif
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.1.0/300-libstdc++-pic.patch
new file mode 100644
index 000000000..7b93855eb
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/300-libstdc++-pic.patch
@@ -0,0 +1,46 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.am
++++ gcc-4.1.0/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.in
++++ gcc-4.1.0/libstdc++-v3/src/Makefile.in
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -745,6 +746,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.1.0/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.1.0/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.1.0/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.1.0/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/304-index_macro.patch b/misc/buildroot/toolchain/gcc/4.1.0/304-index_macro.patch
new file mode 100644
index 000000000..1fac112fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx
+ {
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/740-sh-pr24836.patch b/misc/buildroot/toolchain/gcc/4.1.0/740-sh-pr24836.patch
new file mode 100644
index 000000000..7992282cf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/gcc/configure.ac (revision 106699)
++++ gcc/gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/misc/buildroot/toolchain/gcc/4.1.0/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.1.0/800-arm-bigendian.patch
new file mode 100644
index 000000000..1fa5ae1cd
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.0/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.1.0/gcc/config/arm/linux-elf.h
++++ gcc-4.1.0/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+--- gcc-4.1.0/gcc/config.gcc
++++ gcc-4.1.0/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
++ case $target in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
+ arm*-*-linux-gnueabi)
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/110-arm-eabi.patch b/misc/buildroot/toolchain/gcc/4.1.1/110-arm-eabi.patch
new file mode 100644
index 000000000..acebe5308
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/110-arm-eabi.patch
@@ -0,0 +1,27 @@
+--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
+@@ -674,7 +674,7 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
+ case ${target} in
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+
+diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
+--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
+@@ -53,7 +53,11 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
++#ifdef USE_UCLIBC
++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
++#else
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#endif
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.1.1/300-libstdc++-pic.patch
new file mode 100644
index 000000000..560bcb237
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/300-libstdc++-pic.patch
@@ -0,0 +1,50 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,12 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ifeq ($(enable_shared),yes)
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++endif
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -743,6 +743,13 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ifeq ($(enable_shared),yes)
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++endif
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.1.1/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/304-index_macro.patch b/misc/buildroot/toolchain/gcc/4.1.1/304-index_macro.patch
new file mode 100644
index 000000000..1fac112fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx
+ {
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/740-sh-pr24836.patch b/misc/buildroot/toolchain/gcc/4.1.1/740-sh-pr24836.patch
new file mode 100644
index 000000000..7992282cf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/gcc/configure.ac (revision 106699)
++++ gcc/gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/misc/buildroot/toolchain/gcc/4.1.1/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.1.1/800-arm-bigendian.patch
new file mode 100644
index 000000000..1fa5ae1cd
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.1/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.1.0/gcc/config/arm/linux-elf.h
++++ gcc-4.1.0/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+--- gcc-4.1.0/gcc/config.gcc
++++ gcc-4.1.0/gcc/config.gcc
+@@ -672,6 +672,11 @@
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
++ case $target in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
+ arm*-*-linux-gnueabi)
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/110-arm-eabi.patch b/misc/buildroot/toolchain/gcc/4.1.2/110-arm-eabi.patch
new file mode 100644
index 000000000..acebe5308
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/110-arm-eabi.patch
@@ -0,0 +1,27 @@
+--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
+@@ -674,7 +674,7 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
+ case ${target} in
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+
+diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
+--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
+@@ -53,7 +53,11 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
++#ifdef USE_UCLIBC
++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
++#else
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#endif
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.1.2/300-libstdc++-pic.patch
new file mode 100644
index 000000000..560bcb237
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/300-libstdc++-pic.patch
@@ -0,0 +1,50 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,12 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ifeq ($(enable_shared),yes)
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++endif
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -743,6 +743,13 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ifeq ($(enable_shared),yes)
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++endif
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.1.2/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.1.2/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.1.2/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.1.2/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/304-index_macro.patch b/misc/buildroot/toolchain/gcc/4.1.2/304-index_macro.patch
new file mode 100644
index 000000000..1fac112fa
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ namespace __gnu_cxx
+ {
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/402-libbackend_dep_gcov-iov.h.patch b/misc/buildroot/toolchain/gcc/4.1.2/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 000000000..b7d9bb993
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,12 @@
+# gcc.gnu.org/PR30620
+--- gcc-4.1.2-20070208.orig/gcc/Makefile.in 2006-11-01 15:40:44.000000000 +0100
++++ gcc-4.1.2-20070208/gcc/Makefile.in 2007-02-13 19:23:31.000000000 +0100
+@@ -2522,7 +2522,7 @@
+ # FIXME: writing proper dependencies for this is a *LOT* of work.
+ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
++ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DTARGET_NAME=\"$(target_noncanonical)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/740-sh-pr24836.patch b/misc/buildroot/toolchain/gcc/4.1.2/740-sh-pr24836.patch
new file mode 100644
index 000000000..7992282cf
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/gcc/configure.ac (revision 106699)
++++ gcc/gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/misc/buildroot/toolchain/gcc/4.1.2/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.1.2/800-arm-bigendian.patch
new file mode 100644
index 000000000..0a9417419
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.1.2/800-arm-bigendian.patch
@@ -0,0 +1,127 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+Index: gcc-4.1.1/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/linux-elf.h
++++ gcc-4.1.1/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+Index: gcc-4.1.1/gcc/config.gcc
+===================================================================
+--- gcc-4.1.1.orig/gcc/config.gcc
++++ gcc-4.1.1/gcc/config.gcc
+@@ -672,6 +672,11 @@ arm*-*-netbsd*)
+ ;;
+ arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
++ case $target in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
+ arm*-*-linux-gnueabi)
+Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h
++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h
+@@ -20,6 +20,17 @@
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#undef TARGET_LINKER_EMULATION
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
++#else
++#define TARGET_LINKER_EMULATION "armelf_linux_eabi"
++#endif
++
+ /* On EABI GNU/Linux, we want both the BPABI builtins and the
+ GNU/Linux builtins. */
+ #undef TARGET_OS_CPP_BUILTINS
+@@ -48,7 +59,7 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+Index: gcc-4.1.1/gcc/config/arm/bpabi.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/bpabi.h
++++ gcc-4.1.1/gcc/config/arm/bpabi.h
+@@ -33,9 +33,19 @@
+ #undef FPUTYPE_DEFAULT
+ #define FPUTYPE_DEFAULT FPUTYPE_VFP
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#endif
++
+ /* EABI targets should enable interworking by default. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT MASK_INTERWORK
++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
+
+ /* The ARM BPABI functions return a boolean; they use no special
+ calling convention. */
diff --git a/misc/buildroot/toolchain/gcc/4.2/300-libstdc++-pic.patch b/misc/buildroot/toolchain/gcc/4.2/300-libstdc++-pic.patch
new file mode 100644
index 000000000..560bcb237
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/300-libstdc++-pic.patch
@@ -0,0 +1,50 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc/libstdc++-v3/src/Makefile.am
++++ gcc/libstdc++-v3/src/Makefile.am
+@@ -214,6 +214,12 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ifeq ($(enable_shared),yes)
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++endif
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc/libstdc++-v3/src/Makefile.in
++++ gcc/libstdc++-v3/src/Makefile.in
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -743,6 +743,13 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ifeq ($(enable_shared),yes)
++ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++endif
++
+ # 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 --git a/misc/buildroot/toolchain/gcc/4.2/301-missing-execinfo_h.patch b/misc/buildroot/toolchain/gcc/4.2/301-missing-execinfo_h.patch
new file mode 100644
index 000000000..0e2092f3f
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/misc/buildroot/toolchain/gcc/4.2/302-c99-snprintf.patch b/misc/buildroot/toolchain/gcc/4.2/302-c99-snprintf.patch
new file mode 100644
index 000000000..dfb22d681
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/misc/buildroot/toolchain/gcc/4.2/303-c99-complex-ugly-hack.patch b/misc/buildroot/toolchain/gcc/4.2/303-c99-complex-ugly-hack.patch
new file mode 100644
index 000000000..2ccc80d9b
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/misc/buildroot/toolchain/gcc/4.2/304-index_macro.patch b/misc/buildroot/toolchain/gcc/4.2/304-index_macro.patch
new file mode 100644
index 000000000..d8e476555
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
diff --git a/misc/buildroot/toolchain/gcc/4.2/305-libmudflap-susv3-legacy.patch b/misc/buildroot/toolchain/gcc/4.2/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 000000000..374b1f865
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
+@@ -427,7 +427,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -437,7 +437,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -447,7 +447,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -456,7 +456,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -465,7 +465,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* XXX: stpcpy, memccpy */
diff --git a/misc/buildroot/toolchain/gcc/4.2/306-libstdc++-namespace.patch b/misc/buildroot/toolchain/gcc/4.2/306-libstdc++-namespace.patch
new file mode 100644
index 000000000..69587ca63
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/306-libstdc++-namespace.patch
@@ -0,0 +1,36 @@
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
+@@ -32,7 +32,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+@@ -115,3 +116,4 @@
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
++}
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
+@@ -33,7 +33,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+@@ -74,3 +75,4 @@
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
++}
diff --git a/misc/buildroot/toolchain/gcc/4.2/402-libbackend_dep_gcov-iov.h.patch b/misc/buildroot/toolchain/gcc/4.2/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 000000000..0bf115c45
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.2/gcc/Makefile.in
+===================================================================
+--- gcc-4.2/gcc/Makefile.in (revision 121758)
++++ gcc-4.2/gcc/Makefile.in (working copy)
+@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
+ # FIXME: writing proper dependencies for this is a *LOT* of work.
+ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
++ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DTARGET_NAME=\"$(target_noncanonical)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
diff --git a/misc/buildroot/toolchain/gcc/4.2/800-arm-bigendian.patch b/misc/buildroot/toolchain/gcc/4.2/800-arm-bigendian.patch
new file mode 100644
index 000000000..07c609337
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/4.2/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.2.0/gcc/config/arm/linux-elf.h
++++ gcc-4.2.0/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
++++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
+@@ -696,6 +696,11 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
++ case ${target} in
+ arm*-*-linux-*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
diff --git a/misc/buildroot/toolchain/gcc/Config.in b/misc/buildroot/toolchain/gcc/Config.in
new file mode 100644
index 000000000..898638fce
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/Config.in
@@ -0,0 +1,153 @@
+# Choose gcc version.
+
+comment "Gcc Options"
+
+choice
+ prompt "GCC compiler Version"
+ default BR2_GCC_VERSION_3_4_6
+ help
+ Select the version of gcc you wish to use.
+
+ config BR2_GCC_VERSION_3_3_5
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 3.3.5"
+
+ config BR2_GCC_VERSION_3_3_6
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 3.3.6"
+
+ config BR2_GCC_VERSION_3_4_2
+ depends BR2_DEPRECATED
+ bool "gcc 3.4.2"
+
+ config BR2_GCC_VERSION_3_4_3
+ depends BR2_DEPRECATED
+ bool "gcc 3.4.3"
+
+ config BR2_GCC_VERSION_3_4_4
+ depends BR2_DEPRECATED
+ bool "gcc 3.4.4"
+
+ config BR2_GCC_VERSION_3_4_5
+ depends BR2_DEPRECATED
+ bool "gcc 3.4.5"
+
+ config BR2_GCC_VERSION_3_4_6
+ bool "gcc 3.4.6"
+
+ config BR2_GCC_VERSION_4_0_0
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 4.0.0"
+
+ config BR2_GCC_VERSION_4_0_1
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 4.0.1"
+
+ config BR2_GCC_VERSION_4_0_2
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 4.0.2"
+
+ config BR2_GCC_VERSION_4_0_3
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 4.0.3"
+
+ config BR2_GCC_VERSION_4_0_4
+ depends !BR2_nios2
+ bool "gcc 4.0.4"
+
+ config BR2_GCC_VERSION_4_1_0
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 4.1.0"
+
+ config BR2_GCC_VERSION_4_1_1
+ depends !BR2_nios2 && BR2_DEPRECATED
+ bool "gcc 4.1.1"
+
+ config BR2_GCC_VERSION_4_1_2
+ depends !BR2_nios2
+ bool "gcc 4.1.2"
+
+ config BR2_GCC_VERSION_4_2
+ depends !BR2_nios2
+ select BR2_GCC_IS_SNAP
+ bool "gcc 4.2"
+
+endchoice
+
+config BR2_GCC_IS_SNAP
+ bool
+ default n
+
+config BR2_GCC_SNAP_DATE
+ string "GCC snapshot date"
+ default "20061121"
+ depends BR2_GCC_IS_SNAP
+ help
+ Enter snapshot date to use for gcc. Format is:
+ YYYYMMDD
+
+config BR2_GCC_VERSION
+ string
+ default "3.3.5" if BR2_GCC_VERSION_3_3_5
+ default "3.3.6" if BR2_GCC_VERSION_3_3_6
+ default "3.4.2" if BR2_GCC_VERSION_3_4_2
+ default "3.4.3" if BR2_GCC_VERSION_3_4_3
+ default "3.4.4" if BR2_GCC_VERSION_3_4_4
+ default "3.4.5" if BR2_GCC_VERSION_3_4_5
+ default "3.4.6" if BR2_GCC_VERSION_3_4_6
+ default "4.0.0" if BR2_GCC_VERSION_4_0_0
+ default "4.0.1" if BR2_GCC_VERSION_4_0_1
+ default "4.0.2" if BR2_GCC_VERSION_4_0_2
+ default "4.0.3" if BR2_GCC_VERSION_4_0_3
+ default "4.0.4" if BR2_GCC_VERSION_4_0_4
+ default "4.1.0" if BR2_GCC_VERSION_4_1_0
+ default "4.1.1" if BR2_GCC_VERSION_4_1_1
+ default "4.1.2" if BR2_GCC_VERSION_4_1_2
+ default "4.2" if BR2_GCC_VERSION_4_2
+
+
+config BR2_GCC_USE_SJLJ_EXCEPTIONS
+ bool "Enable setjmp/longjmp exceptions?"
+ default n
+ help
+ For some platforms, proper stack unwinding works perfectly,
+ while other platforms must use setjmp/longjmp exceptions for
+ proper stack unwinding during exception handling. Most people
+ can leave this set to n.
+
+config BR2_EXTRA_GCC_CONFIG_OPTIONS
+ string "Additional gcc options"
+ default ""
+ help
+ Any additional gcc configure options you may want to include....
+
+config BR2_INSTALL_LIBSTDCPP
+ bool "Build/install c++ compiler and libstdc++?"
+ default n
+ # huh? why so? select BR2_LARGEFILE
+ select BR2_LARGEFILE if !BR2_GCC_VERSION_4_2
+ help
+ Build/install c++ compiler and libstdc++?
+
+config BR2_INSTALL_LIBGCJ
+ bool "Build/install java compiler and libgcj?"
+ default n
+ depends on BR2_INSTALL_LIBSTDCPP
+ help
+ Build/install java compiler and libgcj?
+
+config BR2_INSTALL_OBJC
+ bool "Build/install Objective-C compiler and runtime?"
+ default n
+ help
+ Build/install Objective-C compiler and runtime?
+
+config BR2_INSTALL_FORTRAN
+ bool "Build/install Fortran compiler and runtime?"
+ default n
+ select BR2_PACKAGE_LIBMPFR
+ help
+ Build/install Fortran compiler and runtime?
+ Note that it is highly recommended NOT to use gfortran
+ from gcc older than 4.2.0
+
diff --git a/misc/buildroot/toolchain/gcc/Config.in.2 b/misc/buildroot/toolchain/gcc/Config.in.2
new file mode 100644
index 000000000..bb97286c1
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/Config.in.2
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_GCC_TARGET
+ bool "native toolchain in the target filesystem"
+ default n
+ help
+ If you want the target system to be able to run
+ binutils/gcc and compile native code, say Y here.
+
+config BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS
+ string "Additional target gcc options"
+ default ""
+ help
+ Any additional target gcc options you may want to include....
+ Including, but not limited to --disable-checking etc.
+ Refer to */configure in your gcc sources.
diff --git a/misc/buildroot/toolchain/gcc/Makefile.in b/misc/buildroot/toolchain/gcc/Makefile.in
new file mode 100644
index 000000000..51685679e
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/Makefile.in
@@ -0,0 +1,66 @@
+#
+
+GCC_VERSION:=$(strip $(subst ",, $(BR2_GCC_VERSION)))
+#"))
+TARGET_OPTIMIZATION:=$(strip $(subst ",, $(BR2_TARGET_OPTIMIZATION)))
+#"))
+EXTRA_GCC_CONFIG_OPTIONS:=$(strip $(subst ",, $(BR2_EXTRA_GCC_CONFIG_OPTIONS)))
+#"))
+ifeq ($(strip $(subst ",, $(BR2_GCC_IS_SNAP))),y)
+#"))
+GCC_SNAP_DATE:=$(strip $(subst ",, $(BR2_GCC_SNAP_DATE)))
+#"))
+else
+GCC_SNAP_DATE:=
+endif
+#")))
+
+ifeq ($(strip $(BR2_GCC_USE_SJLJ_EXCEPTIONS)),y)
+GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
+endif
+
+ifeq ($(BR2_SOFT_FLOAT),y)
+# gcc 3.4.x soft float configuration is different than previous versions.
+ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.)
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+else
+SOFT_FLOAT_CONFIG_OPTION:=--without-float
+endif
+
+# again... there must be a better way
+ifeq ($(findstring 4.,$(GCC_VERSION)),4.)
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+ifeq ($(BR2_SOFT_FLOAT_FP),y)
+TARGET_SOFT_FLOAT:=-mfloat-abi=softfp
+else # no fp at all
+TARGET_SOFT_FLOAT:=-mfloat-abi=soft
+endif
+else # not gcc-4.x
+TARGET_SOFT_FLOAT:=-msoft-float
+endif
+ARCH_FPU_SUFFIX:=_nofpu
+else # no softfloat support
+SOFT_FLOAT_CONFIG_OPTION:=
+TARGET_SOFT_FLOAT:=
+ARCH_FPU_SUFFIX:=
+endif
+
+TARGET_GCC_FLAGS= CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)" \
+ BOOT_CFLAGS="$(TARGET_CFLAGS) $(TARGET_SOFT_FLOAT)"
+
+ifeq ($(strip $(BR2_PACKAGE_GCC_TARGET)),y)
+# pull in config opts from the user
+EXTRA_TARGET_GCC_CONFIG_OPTIONS:=$(strip $(subst ",, $(BR2_EXTRA_TARGET_GCC_CONFIG_OPTIONS)))
+#"))
+
+ifeq ($(BR2_PREFER_IMA),y)
+# >= 4.x
+ifneq ($(findstring 3.,$(GCC_VERSION)),3.)
+EXTRA_TARGET_GCC_CONFIG_OPTIONS+=--enable-intermodule
+endif
+endif # BR2_PREFER_IMA=y
+
+TARGETS+=gcc_target
+endif
diff --git a/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk b/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk
new file mode 100644
index 000000000..a5d09e50d
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/gcc-nuttx-3.x.mk
@@ -0,0 +1,435 @@
+# Makefile for to build a gcc/nuttx toolchain
+#
+# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
+#
+# 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 2 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ifeq ($(GCC_SNAP_DATE),)
+GCC_OFFICIAL_VER:=$(GCC_VERSION)
+GCC_SITE:=http://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VERSION)
+#GCC_SITE:=ftp://ftp.ibiblio.org/pub/mirrors/gnu/ftp/gnu/gcc/gcc-$(GCC_OFFICIAL_VER)
+else
+GCC_OFFICIAL_VER:=$(GCC_VERSION)-$(GCC_SNAP_DATE)
+GCC_SITE:=ftp://sources.redhat.com/pub/gcc/snapshots/$(GCC_OFFICIAL_VER)
+endif
+
+GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VER).tar.bz2
+GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VER)
+GCC_CAT:=$(BZCAT)
+GCC_STRIP_HOST_BINARIES:=true
+
+
+ifeq ($(findstring 3.,$(GCC_VERSION)),3.)
+GCC_NO_MPFR:=y
+endif
+ifeq ($(findstring 4.0.,$(GCC_VERSION)),4.0.)
+GCC_NO_MPFR:=y
+endif
+#ifeq ($(findstring 4.1.,$(GCC_VERSION)),4.1.)
+#GCC_NO_MPFR:=y
+#endif
+
+#############################################################
+#
+# Setup some initial stuff
+#
+#############################################################
+
+GCC_TARGET_LANGUAGES:=c
+
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),c++
+endif
+
+ifeq ($(BR2_INSTALL_LIBGCJ),y)
+GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),java
+endif
+
+ifeq ($(BR2_INSTALL_OBJC),y)
+GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),objc
+endif
+
+GCC_TARGET_PREREQ =
+GCC_STAGING_PREREQ=
+
+ifndef GCC_NO_MPFR
+GCC_WITH_HOST_GMP=--with-gmp=$(GMP_HOST_DIR)
+GCC_WITH_HOST_MPFR=--with-mpfr=$(MPFR_HOST_DIR)
+
+ifeq ($(BR2_INSTALL_FORTRAN),y)
+GCC_TARGET_LANGUAGES:=$(GCC_TARGET_LANGUAGES),fortran
+#GCC_TARGET_PREREQ += $(TARGET_DIR)/lib/libmpfr.so $(TARGET_DIR)/lib/libgmp.so
+#GCC_STAGING_PREREQ+= $(TOOL_BUILD_DIR)/mpfr/lib/libmpfr.so
+GCC_WITH_TARGET_GMP=--with-gmp="$(GMP_TARGET_DIR)"
+GCC_WITH_TARGET_MPFR=--with-mpfr="$(MPFR_TARGET_DIR)"
+endif
+endif # ifndef GCC_NO_MPFR
+
+GCC_SHARED_LIBGCC:=--disable-shared
+
+ifneq ($(BR2_ENABLE_LOCALE),y)
+GCC_ENABLE_CLOCALE:=--disable-clocale
+endif
+
+
+#############################################################
+#
+# build the first pass gcc compiler
+#
+#############################################################
+GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-initial
+
+$(DL_DIR)/$(GCC_SOURCE):
+ mkdir -p $(DL_DIR)
+ $(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
+
+gcc-unpacked: $(GCC_DIR)/.unpacked
+$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
+ mkdir -p $(TOOL_BUILD_DIR)
+ $(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ $(CONFIG_UPDATE) $(GCC_DIR)
+ touch $@
+
+gcc-patched: $(GCC_DIR)/.patched
+$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
+ # Apply any files named gcc-*.patch from the source directory to gcc
+ifeq ($(GCC_SNAP_DATE),)
+ toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch
+else
+ifneq ($(wildcard toolchain/gcc/$(GCC_OFFICIAL_VER)),)
+ toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_OFFICIAL_VER) \*.patch
+else
+ toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) \*.patch
+endif
+endif
+
+ # Note: The soft float situation has improved considerably with gcc 3.4.x.
+ # We can dispense with the custom spec files, as well as libfloat for the arm case.
+ # However, we still need a patch for arm. There's a similar patch for gcc 3.3.x
+ # which needs to be integrated so we can kill of libfloat for good, except for
+ # anyone (?) who might still be using gcc 2.95. mjn3
+ifeq ($(BR2_SOFT_FLOAT),y)
+ifeq ("$(strip $(ARCH))","arm")
+ toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) arm-softfloat.patch.conditional
+endif
+ifeq ("$(strip $(ARCH))","armeb")
+ toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc/$(GCC_VERSION) arm-softfloat.patch.conditional
+endif
+ # Not yet updated to 3.4.1.
+ #ifeq ("$(strip $(ARCH))","i386")
+ #toolchain/patch-kernel.sh $(GCC_DIR) toolchain/gcc i386-gcc-soft-float.patch
+ #endif
+endif
+ touch $@
+
+# The --without-headers option stopped working with gcc 3.0 and has never been
+# fixed, so we need to actually have working C library header files prior to
+# the step or libgcc will not build...
+
+$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
+ mkdir -p $(GCC_BUILD_DIR1)
+ (cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) \
+ CC="$(HOSTCC)" \
+ $(GCC_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --enable-languages=c \
+ --disable-__cxa_atexit \
+ --enable-target-optspace \
+ --with-gnu-ld \
+ --disable-shared \
+ $(GCC_WITH_HOST_GMP) \
+ $(GCC_WITH_HOST_MPFR) \
+ $(DISABLE_NLS) \
+ $(THREADS) \
+ $(MULTILIB) \
+ $(SOFT_FLOAT_CONFIG_OPTION) \
+ $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(EXTRA_GCC_CONFIG_OPTIONS));
+ touch $@
+
+$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
+ PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc
+ touch $@
+
+$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled
+ PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc
+ #rm -f $(STAGING_DIR)/bin/gccbug $(STAGING_DIR)/bin/gcov
+ #rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc $(STAGING_DIR)/share/locale
+
+gcc_initial: binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
+
+gcc_initial-clean:
+ rm -rf $(GCC_BUILD_DIR1)
+
+gcc_initial-dirclean:
+ rm -rf $(GCC_BUILD_DIR1) $(GCC_DIR)
+
+#############################################################
+#
+# second pass compiler build. Build the compiler targeting
+# the newly built shared library.
+#
+#############################################################
+#
+# Sigh... I had to rework things because using --with-gxx-include-dir
+# causes issues with include dir search order for g++. This seems to
+# have something to do with "path translations" and possibly doesn't
+# affect gcc-target. However, I haven't tested gcc-target yet so no
+# guarantees. mjn3
+
+GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)-final
+$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(GCC_STAGING_PREREQ)
+ mkdir -p $(GCC_BUILD_DIR2)
+ # Important! Required for limits.h to be fixed.
+ ln -snf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
+ (cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) \
+ CC="$(HOSTCC)" \
+ $(GCC_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --enable-languages=$(GCC_TARGET_LANGUAGES) \
+ --disable-__cxa_atexit \
+ --enable-target-optspace \
+ --with-gnu-ld \
+ $(GCC_WITH_HOST_GMP) \
+ $(GCC_WITH_HOST_MPFR) \
+ $(GCC_SHARED_LIBGCC) \
+ $(DISABLE_NLS) \
+ $(THREADS) \
+ $(MULTILIB) \
+ $(SOFT_FLOAT_CONFIG_OPTION) \
+ $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(GCC_USE_SJLJ_EXCEPTIONS) \
+ $(DISABLE_LARGEFILE) \
+ $(EXTRA_GCC_CONFIG_OPTIONS));
+ touch $@
+
+$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
+ PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) all
+ touch $@
+
+$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
+ PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install
+ if [ -d "$(STAGING_DIR)/lib64" ] ; then \
+ if [ ! -e "$(STAGING_DIR)/lib" ] ; then \
+ mkdir "$(STAGING_DIR)/lib" ; \
+ fi ; \
+ mv "$(STAGING_DIR)/lib64/"* "$(STAGING_DIR)/lib/" ; \
+ rmdir "$(STAGING_DIR)/lib64" ; \
+ fi
+ # Strip the host binaries
+ifeq ($(GCC_STRIP_HOST_BINARIES),true)
+ -strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/*
+endif
+ # Make sure we have 'cc'.
+ if [ ! -e $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-cc ] ; then \
+ ln -snf $(REAL_GNU_TARGET_NAME)-gcc \
+ $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-cc ; \
+ fi;
+ if [ ! -e $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/cc ] ; then \
+ ln -snf gcc $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/cc ; \
+ fi;
+ # Set up the symlinks to enable lying about target name.
+ set -e; \
+ (cd $(STAGING_DIR); \
+ ln -snf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
+ cd bin; \
+ for app in $(REAL_GNU_TARGET_NAME)-* ; do \
+ ln -snf $${app} \
+ $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \
+ done; \
+ );
+ #
+ # Now for the ugly 3.3.x soft float hack...
+ #
+ifeq ($(BR2_SOFT_FLOAT),y)
+ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.)
+ # Make sure we have a soft float specs file for this arch
+ if [ ! -f toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float ] ; then \
+ echo soft float configured but no specs file for this arch ; \
+ /bin/false ; \
+ fi;
+ # Replace specs file with one that defaults to soft float mode.
+ if [ ! -f $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \
+ echo staging dir specs file is missing ; \
+ /bin/false ; \
+ fi;
+ cp toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(STAGING_DIR)/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
+endif
+endif
+ #
+ # Ok... that's enough of that.
+ #
+ touch $@
+
+$(GCC_BUILD_DIR2)/.libs_installed: $(GCC_BUILD_DIR2)/.installed
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+ -cp -dpf $(STAGING_DIR)/lib/libstdc++.so* $(TARGET_DIR)/lib/
+endif
+ifeq ($(BR2_INSTALL_LIBGCJ),y)
+ -cp -dpf $(STAGING_DIR)/lib/libgcj.so* $(TARGET_DIR)/lib/
+ -cp -dpf $(STAGING_DIR)/lib/lib-org-w3c-dom.so* $(TARGET_DIR)/lib/
+ -cp -dpf $(STAGING_DIR)/lib/lib-org-xml-sax.so* $(TARGET_DIR)/lib/
+ -mkdir -p $(TARGET_DIR)/usr/lib/security
+ -cp -dpf $(STAGING_DIR)/usr/lib/security/libgcj.security $(TARGET_DIR)/usr/lib/security/
+ -cp -dpf $(STAGING_DIR)/usr/lib/security/classpath.security $(TARGET_DIR)/usr/lib/security/
+endif
+ touch $@
+
+gcc: binutils gcc_initial $(LIBFLOAT_TARGET) \
+ $(GCC_BUILD_DIR2)/.installed $(GCC_BUILD_DIR2)/.libs_installed \
+ $(GCC_TARGETS)
+
+gcc-source: $(DL_DIR)/$(GCC_SOURCE)
+
+gcc-clean:
+ rm -rf $(GCC_BUILD_DIR2)
+ for prog in cpp gcc gcc-[0-9]* protoize unprotoize gcov gccbug cc; do \
+ rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-$$prog \
+ rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-$$prog; \
+ done
+
+gcc-dirclean: gcc_initial-dirclean
+ rm -rf $(GCC_BUILD_DIR2)
+
+#############################################################
+#
+# Next build target gcc compiler
+#
+#############################################################
+GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-$(GCC_VERSION)-target
+
+$(GCC_BUILD_DIR3)/.prepared: $(GCC_BUILD_DIR2)/.libs_installed $(GCC_TARGET_PREREQ)
+ mkdir -p $(GCC_BUILD_DIR3)
+ touch $@
+
+$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
+ (cd $(GCC_BUILD_DIR3); rm -rf config.cache ; \
+ PATH=$(TARGET_PATH) \
+ CC_FOR_BUILD="$(HOSTCC)" \
+ CFLAGS_FOR_BUILD="-g -O2" \
+ $(TARGET_GCC_FLAGS) \
+ $(GCC_DIR)/configure \
+ --prefix=/usr \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(REAL_GNU_TARGET_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --enable-languages=$(GCC_TARGET_LANGUAGES) \
+ --with-gxx-include-dir=/usr/include/c++ \
+ --disable-__cxa_atexit \
+ --with-gnu-ld \
+ $(GCC_SHARED_LIBGCC) \
+ $(GCC_WITH_TARGET_GMP) \
+ $(GCC_WITH_TARGET_MPFR) \
+ $(DISABLE_NLS) \
+ $(THREADS) \
+ $(MULTILIB) \
+ $(SOFT_FLOAT_CONFIG_OPTION) \
+ $(GCC_WITH_CPU) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+ $(GCC_USE_SJLJ_EXCEPTIONS) \
+ $(DISABLE_LARGEFILE) \
+ $(EXTRA_GCC_CONFIG_OPTIONS) \
+ $(EXTRA_TARGET_GCC_CONFIG_OPTIONS));
+ touch $@
+
+$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
+ PATH=$(TARGET_PATH) \
+ $(MAKE) -C $(GCC_BUILD_DIR3) all
+ touch $@
+
+#
+# gcc-lib dir changes names to gcc with 3.4.mumble
+#
+ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.)
+GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)
+else
+GCC_LIB_SUBDIR=lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)
+endif
+# sigh... we need to find a better way
+ifeq ($(findstring 4.0.,$(GCC_VERSION)),4.0.)
+GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)
+endif
+ifeq ($(findstring 4.1.,$(GCC_VERSION)),4.1.)
+GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)
+endif
+ifeq ($(findstring 4.2,$(GCC_VERSION)),4.2)
+ifneq ($(findstring 4.2.,$(GCC_VERSION)),4.2.)
+REAL_GCC_VERSION=$(shell cat $(GCC_DIR)/gcc/BASE-VER)
+GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(REAL_GCC_VERSION)
+else
+GCC_LIB_SUBDIR=lib/gcc/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)
+endif
+#XXX: FIXME: cleanup BR2_ARCH selection and establish BR2_CPU
+#GCC_WITH_ARCH=--with-arch=$(BR2_ARCH)
+#GCC_WITH_TUNE=--with-tune=$(BR2_ARCH)
+#GCC_WITH_CPU=--with-cpu=$(BR2_ARCH)
+endif
+
+$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
+ PATH=$(TARGET_PATH) \
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install
+ # Remove broken specs file (cross compile flag is set).
+ rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs
+ #
+ # Now for the ugly 3.3.x soft float hack...
+ #
+ifeq ($(BR2_SOFT_FLOAT),y)
+ifeq ($(findstring 3.3.,$(GCC_VERSION)),3.3.)
+ # Add a specs file that defaults to soft float mode.
+ cp toolchain/gcc/$(GCC_VERSION)/specs-$(ARCH)-soft-float $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
+ # Make sure gcc does not think we are cross compiling
+ $(SED) "s/^1/0/;" $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
+endif
+endif
+ #
+ # Ok... that's enough of that.
+ #
+ -(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1)
+ -(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1)
+ -(cd $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1)
+ -(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1)
+ -(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s*.so.*.*.* > /dev/null 2>&1)
+ #
+ rm -f $(TARGET_DIR)/usr/lib/*.la*
+ #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+ # Work around problem of missing syslimits.h
+ if [ ! -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/syslimits.h ] ; then \
+ echo "warning: working around missing syslimits.h" ; \
+ cp -f $(STAGING_DIR)/$(GCC_LIB_SUBDIR)/include/syslimits.h \
+ $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/include/ ; \
+ fi
+ # Make sure we have 'cc'.
+ if [ ! -e $(TARGET_DIR)/usr/bin/cc ] ; then \
+ ln -snf gcc $(TARGET_DIR)/usr/bin/cc ; \
+ fi;
+ # These are in /lib, so...
+ #rm -rf $(TARGET_DIR)/usr/lib/libgcc_s*.so*
+ #touch -c $(TARGET_DIR)/usr/bin/gcc
+
+gcc_target: binutils_target $(TARGET_DIR)/usr/bin/gcc
+
+gcc_target-clean:
+ rm -rf $(GCC_BUILD_DIR3)
+ rm -f $(TARGET_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)*
+
+gcc_target-dirclean:
+ rm -rf $(GCC_BUILD_DIR3)
diff --git a/misc/buildroot/toolchain/gcc/i386-gcc-soft-float.patch b/misc/buildroot/toolchain/gcc/i386-gcc-soft-float.patch
new file mode 100644
index 000000000..97501087e
--- /dev/null
+++ b/misc/buildroot/toolchain/gcc/i386-gcc-soft-float.patch
@@ -0,0 +1,61 @@
+diff -urN gcc-3.3.2-orig/gcc/config/i386/i386.h gcc-3.3.2/gcc/config/i386/i386.h
+--- gcc-3.3.2-orig/gcc/config/i386/i386.h 2003-06-25 16:18:31.000000000 -0500
++++ gcc-3.3.2/gcc/config/i386/i386.h 2003-10-22 01:46:57.000000000 -0500
+@@ -653,6 +653,7 @@
+ /* Define for XFmode or TFmode extended real floating point support.
+ The XFmode is specified by i386 ABI, while TFmode may be faster
+ due to alignment and simplifications in the address calculations. */
++#if 0
+ #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)
+ #define MAX_LONG_DOUBLE_TYPE_SIZE 128
+ #ifdef __x86_64__
+@@ -660,6 +661,17 @@
+ #else
+ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
+ #endif
++#else
++ /* Set up for x86 soft float with 64-bit long doubles, since that's
++ * all the soft float emulation supports. */
++#define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : (TARGET_80387 ? 96 : 64))
++#define MAX_LONG_DOUBLE_TYPE_SIZE 128
++#ifdef __x86_64__
++#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
++#else
++#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 96 : 64)
++#endif
++#endif
+
+ /* Set the value of FLT_EVAL_METHOD in float.h. When using only the
+ FPU, assume that the fpcw is set to extended precision; when using
+diff -urN gcc-3.3.2-orig/gcc/config/t-linux gcc-3.3.2/gcc/config/t-linux
+--- gcc-3.3.2-orig/gcc/config/t-linux-uclibc 2003-06-04 11:56:11.000000000 -0500
++++ gcc-3.3.2/gcc/config/t-linux-uclibc 2003-10-22 01:46:39.000000000 -0500
+@@ -21,3 +21,28 @@
+ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
++
++##############################################
++# We want fine grained libraries, so use the new code to build the
++# floating point emulation libraries.
++FPBIT = fp-bit.c
++DPBIT = dp-bit.c
++
++#LIB2FUNCS_EXTRA = xp-bit.c
++
++dp-bit.c: $(srcdir)/config/fp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
++ echo '#endif' >> dp-bit.c
++ cat $(srcdir)/config/fp-bit.c >> dp-bit.c
++
++fp-bit.c: $(srcdir)/config/fp-bit.c
++ echo '#define FLOAT' > fp-bit.c
++ echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
++ echo '#endif' >> fp-bit.c
++ cat $(srcdir)/config/fp-bit.c >> fp-bit.c
++
++#MULTILIB_OPTIONS = msoft-float
++#MULTILIB_DIRNAMES = soft-float
++
diff --git a/misc/buildroot/toolchain/gdb/6.2.1/400-mips-coredump.patch-2.4.23-29 b/misc/buildroot/toolchain/gdb/6.2.1/400-mips-coredump.patch-2.4.23-29
new file mode 100644
index 000000000..4e17ba7be
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.2.1/400-mips-coredump.patch-2.4.23-29
@@ -0,0 +1,28 @@
+Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
+coredump handling by gdb for current kernels. Update the hardcoded constants
+to reflect the change.
+--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
++++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
+@@ -53,12 +53,22 @@
+
+ #define EF_REG0 6
+ #define EF_REG31 37
++
++#if 0
+ #define EF_LO 38
+ #define EF_HI 39
+ #define EF_CP0_EPC 40
+ #define EF_CP0_BADVADDR 41
+ #define EF_CP0_STATUS 42
+ #define EF_CP0_CAUSE 43
++#else
++#define EF_CP0_STATUS 38
++#define EF_LO 39
++#define EF_HI 40
++#define EF_CP0_BADVADDR 41
++#define EF_CP0_CAUSE 42
++#define EF_CP0_EPC 43
++#endif
+
+ #define EF_SIZE 180
+
diff --git a/misc/buildroot/toolchain/gdb/6.2.1/500-thread-timeout.patch b/misc/buildroot/toolchain/gdb/6.2.1/500-thread-timeout.patch
new file mode 100644
index 000000000..410fb21d5
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.2.1/500-thread-timeout.patch
@@ -0,0 +1,34 @@
+--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
++++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
+@@ -21,6 +21,7 @@
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
++#include <unistd.h>
+ #include "server.h"
+
+ #include "linux-low.h"
+@@ -142,6 +143,7 @@
+ td_event_msg_t msg;
+ td_err_e err;
+ struct inferior_linux_data *tdata;
++ int timeout;
+
+ if (debug_threads)
+ fprintf (stderr, "Thread creation event.\n");
+@@ -152,7 +154,13 @@
+ In the LinuxThreads implementation, this is safe,
+ because all events come from the manager thread
+ (except for its own creation, of course). */
+- err = td_ta_event_getmsg (thread_agent, &msg);
++ for (timeout = 0; timeout < 50000; timeout++)
++ {
++ err = td_ta_event_getmsg (thread_agent, &msg);
++ if (err != TD_NOMSG)
++ break;
++ usleep(1000);
++ }
+ if (err != TD_OK)
+ fprintf (stderr, "thread getmsg err: %s\n",
+ thread_db_err_str (err));
+
diff --git a/misc/buildroot/toolchain/gdb/6.3/400-mips-coredump.patch-2.4.23-29 b/misc/buildroot/toolchain/gdb/6.3/400-mips-coredump.patch-2.4.23-29
new file mode 100644
index 000000000..4e17ba7be
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/400-mips-coredump.patch-2.4.23-29
@@ -0,0 +1,28 @@
+Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
+coredump handling by gdb for current kernels. Update the hardcoded constants
+to reflect the change.
+--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
++++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
+@@ -53,12 +53,22 @@
+
+ #define EF_REG0 6
+ #define EF_REG31 37
++
++#if 0
+ #define EF_LO 38
+ #define EF_HI 39
+ #define EF_CP0_EPC 40
+ #define EF_CP0_BADVADDR 41
+ #define EF_CP0_STATUS 42
+ #define EF_CP0_CAUSE 43
++#else
++#define EF_CP0_STATUS 38
++#define EF_LO 39
++#define EF_HI 40
++#define EF_CP0_BADVADDR 41
++#define EF_CP0_CAUSE 42
++#define EF_CP0_EPC 43
++#endif
+
+ #define EF_SIZE 180
+
diff --git a/misc/buildroot/toolchain/gdb/6.3/500-thread-timeout.patch b/misc/buildroot/toolchain/gdb/6.3/500-thread-timeout.patch
new file mode 100644
index 000000000..6db0a7a47
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/500-thread-timeout.patch
@@ -0,0 +1,34 @@
+--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
++++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
+@@ -21,6 +21,7 @@
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
++#include <unistd.h>
+ #include "server.h"
+
+ #include "linux-low.h"
+@@ -142,6 +143,7 @@
+ td_event_msg_t msg;
+ td_err_e err;
+ struct inferior_linux_data *tdata;
++ int timeout;
+
+ if (debug_threads)
+ fprintf (stderr, "Thread creation event.\n");
+@@ -152,7 +154,13 @@
+ In the LinuxThreads implementation, this is safe,
+ because all events come from the manager thread
+ (except for its own creation, of course). */
+- err = td_ta_event_getmsg (thread_agent, &msg);
++ for (timeout = 0; timeout < 50000; timeout++)
++ {
++ err = td_ta_event_getmsg (thread_agent, &msg);
++ if (err != TD_NOMSG)
++ break;
++ usleep(1000);
++ }
+ if (err != TD_OK)
+ fprintf (stderr, "thread getmsg err: %s\n",
+ thread_db_err_str (err));
+
diff --git a/misc/buildroot/toolchain/gdb/6.3/600-debian_10.selected-frame.patch b/misc/buildroot/toolchain/gdb/6.3/600-debian_10.selected-frame.patch
new file mode 100644
index 000000000..5970f9ba4
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/600-debian_10.selected-frame.patch
@@ -0,0 +1,552 @@
+2004-10-11
+
+This patch is not submitted. Many of these functions should be passing
+a frame around rather than calling get_selected_frame, but at least it
+is an improvement over deprecated_selected_frame.
+
+Index: gdb-6.3/gdb/breakpoint.c
+===================================================================
+--- gdb-6.3.orig/gdb/breakpoint.c 2004-10-08 13:30:46.000000000 -0400
++++ gdb-6.3/gdb/breakpoint.c 2004-11-09 22:55:11.231620957 -0500
+@@ -922,7 +922,7 @@ insert_bp_location (struct bp_location *
+ /* FIXME drow/2003-09-09: It would be nice if evaluate_expression
+ took a frame parameter, so that we didn't have to change the
+ selected frame. */
+- saved_frame_id = get_frame_id (deprecated_selected_frame);
++ saved_frame_id = get_frame_id (get_selected_frame ());
+
+ /* Determine if the watchpoint is within scope. */
+ if (bpt->owner->exp_valid_block == NULL)
+@@ -5464,14 +5464,9 @@ break_at_finish_at_depth_command_1 (char
+
+ if (default_breakpoint_valid)
+ {
+- if (deprecated_selected_frame)
+- {
+- selected_pc = get_frame_pc (deprecated_selected_frame);
+- if (arg)
+- if_arg = 1;
+- }
+- else
+- error ("No selected frame.");
++ selected_pc = get_frame_pc (get_selected_frame ());
++ if (arg)
++ if_arg = 1;
+ }
+ else
+ error ("No default breakpoint address now.");
+@@ -5542,15 +5537,10 @@ break_at_finish_command_1 (char *arg, in
+ {
+ if (default_breakpoint_valid)
+ {
+- if (deprecated_selected_frame)
+- {
+- addr_string = xstrprintf ("*0x%s",
+- paddr_nz (get_frame_pc (deprecated_selected_frame)));
+- if (arg)
+- if_arg = 1;
+- }
+- else
+- error ("No selected frame.");
++ addr_string = xstrprintf ("*0x%s",
++ paddr_nz (get_frame_pc (get_selected_frame ())));
++ if (arg)
++ if_arg = 1;
+ }
+ else
+ error ("No default breakpoint address now.");
+@@ -6082,7 +6072,7 @@ until_break_command (char *arg, int from
+ {
+ struct symtabs_and_lines sals;
+ struct symtab_and_line sal;
+- struct frame_info *prev_frame = get_prev_frame (deprecated_selected_frame);
++ struct frame_info *prev_frame = get_prev_frame (get_selected_frame ());
+ struct breakpoint *breakpoint;
+ struct cleanup *old_chain;
+ struct continuation_arg *arg1;
+@@ -6119,7 +6109,7 @@ until_break_command (char *arg, int from
+ /* Otherwise, specify the current frame, because we want to stop only
+ at the very same frame. */
+ breakpoint = set_momentary_breakpoint (sal,
+- get_frame_id (deprecated_selected_frame),
++ get_frame_id (get_selected_frame ()),
+ bp_until);
+
+ if (!target_can_async_p ())
+Index: gdb-6.3/gdb/cli/cli-cmds.c
+===================================================================
+--- gdb-6.3.orig/gdb/cli/cli-cmds.c 2004-09-11 06:24:53.000000000 -0400
++++ gdb-6.3/gdb/cli/cli-cmds.c 2004-11-09 22:51:07.323246218 -0500
+@@ -845,10 +845,7 @@ disassemble_command (char *arg, int from
+ name = NULL;
+ if (!arg)
+ {
+- if (!deprecated_selected_frame)
+- error ("No frame selected.\n");
+-
+- pc = get_frame_pc (deprecated_selected_frame);
++ pc = get_frame_pc (get_selected_frame ());
+ if (find_pc_partial_function (pc, &name, &low, &high) == 0)
+ error ("No function contains program counter for selected frame.\n");
+ #if defined(TUI)
+Index: gdb-6.3/gdb/f-valprint.c
+===================================================================
+--- gdb-6.3.orig/gdb/f-valprint.c 2003-10-14 02:51:14.000000000 -0400
++++ gdb-6.3/gdb/f-valprint.c 2004-11-09 22:51:07.326245632 -0500
+@@ -76,7 +76,7 @@ f77_get_dynamic_lowerbound (struct type
+ switch (TYPE_ARRAY_LOWER_BOUND_TYPE (type))
+ {
+ case BOUND_BY_VALUE_ON_STACK:
+- current_frame_addr = get_frame_base (deprecated_selected_frame);
++ current_frame_addr = get_frame_base (get_selected_frame ());
+ if (current_frame_addr > 0)
+ {
+ *lower_bound =
+@@ -100,7 +100,7 @@ f77_get_dynamic_lowerbound (struct type
+ break;
+
+ case BOUND_BY_REF_ON_STACK:
+- current_frame_addr = get_frame_base (deprecated_selected_frame);
++ current_frame_addr = get_frame_base (get_selected_frame ());
+ if (current_frame_addr > 0)
+ {
+ ptr_to_lower_bound =
+@@ -134,7 +134,7 @@ f77_get_dynamic_upperbound (struct type
+ switch (TYPE_ARRAY_UPPER_BOUND_TYPE (type))
+ {
+ case BOUND_BY_VALUE_ON_STACK:
+- current_frame_addr = get_frame_base (deprecated_selected_frame);
++ current_frame_addr = get_frame_base (get_selected_frame ());
+ if (current_frame_addr > 0)
+ {
+ *upper_bound =
+@@ -163,7 +163,7 @@ f77_get_dynamic_upperbound (struct type
+ break;
+
+ case BOUND_BY_REF_ON_STACK:
+- current_frame_addr = get_frame_base (deprecated_selected_frame);
++ current_frame_addr = get_frame_base (get_selected_frame ());
+ if (current_frame_addr > 0)
+ {
+ ptr_to_upper_bound =
+@@ -630,10 +630,7 @@ info_common_command (char *comname, int
+ first make sure that it is visible and if so, let
+ us display its contents */
+
+- fi = deprecated_selected_frame;
+-
+- if (fi == NULL)
+- error ("No frame selected");
++ fi = get_selected_frame ();
+
+ /* The following is generally ripped off from stack.c's routine
+ print_frame_info() */
+@@ -722,10 +719,7 @@ there_is_a_visible_common_named (char *c
+ if (comname == NULL)
+ error ("Cannot deal with NULL common name!");
+
+- fi = deprecated_selected_frame;
+-
+- if (fi == NULL)
+- error ("No frame selected");
++ fi = get_selected_frame ();
+
+ /* The following is generally ripped off from stack.c's routine
+ print_frame_info() */
+Index: gdb-6.3/gdb/infcmd.c
+===================================================================
+--- gdb-6.3.orig/gdb/infcmd.c 2004-09-13 14:26:28.000000000 -0400
++++ gdb-6.3/gdb/infcmd.c 2004-11-09 22:57:37.274099559 -0500
+@@ -1214,10 +1214,8 @@ finish_command (char *arg, int from_tty)
+ error ("The \"finish\" command does not take any arguments.");
+ if (!target_has_execution)
+ error ("The program is not running.");
+- if (deprecated_selected_frame == NULL)
+- error ("No selected frame.");
+
+- frame = get_prev_frame (deprecated_selected_frame);
++ frame = get_prev_frame (get_selected_frame ());
+ if (frame == 0)
+ error ("\"finish\" not meaningful in the outermost frame.");
+
+@@ -1235,7 +1233,7 @@ finish_command (char *arg, int from_tty)
+
+ /* Find the function we will return from. */
+
+- function = find_pc_function (get_frame_pc (deprecated_selected_frame));
++ function = find_pc_function (get_frame_pc (get_selected_frame ()));
+
+ /* Print info on the selected frame, including level number but not
+ source. */
+@@ -1600,13 +1598,11 @@ registers_info (char *addr_exp, int fpre
+
+ if (!target_has_registers)
+ error ("The program has no registers now.");
+- if (deprecated_selected_frame == NULL)
+- error ("No selected frame.");
+
+ if (!addr_exp)
+ {
+ gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+- deprecated_selected_frame, -1, fpregs);
++ get_selected_frame (), -1, fpregs);
+ return;
+ }
+
+@@ -1644,7 +1640,7 @@ registers_info (char *addr_exp, int fpre
+ if (regnum >= 0)
+ {
+ gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+- deprecated_selected_frame, regnum, fpregs);
++ get_selected_frame (), regnum, fpregs);
+ continue;
+ }
+ }
+@@ -1658,7 +1654,7 @@ registers_info (char *addr_exp, int fpre
+ && regnum < NUM_REGS + NUM_PSEUDO_REGS)
+ {
+ gdbarch_print_registers_info (current_gdbarch, gdb_stdout,
+- deprecated_selected_frame, regnum, fpregs);
++ get_selected_frame (), regnum, fpregs);
+ continue;
+ }
+ }
+@@ -1684,7 +1680,7 @@ registers_info (char *addr_exp, int fpre
+ if (gdbarch_register_reggroup_p (current_gdbarch, regnum,
+ group))
+ gdbarch_print_registers_info (current_gdbarch,
+- gdb_stdout, deprecated_selected_frame,
++ gdb_stdout, get_selected_frame (),
+ regnum, fpregs);
+ }
+ continue;
+@@ -1714,8 +1710,6 @@ print_vector_info (struct gdbarch *gdbar
+ {
+ if (!target_has_registers)
+ error ("The program has no registers now.");
+- if (deprecated_selected_frame == NULL)
+- error ("No selected frame.");
+
+ if (gdbarch_print_vector_info_p (gdbarch))
+ gdbarch_print_vector_info (gdbarch, file, frame, args);
+@@ -1740,7 +1734,7 @@ print_vector_info (struct gdbarch *gdbar
+ static void
+ vector_info (char *args, int from_tty)
+ {
+- print_vector_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
++ print_vector_info (current_gdbarch, gdb_stdout, get_selected_frame (), args);
+ }
+
+
+@@ -1910,8 +1904,6 @@ print_float_info (struct gdbarch *gdbarc
+ {
+ if (!target_has_registers)
+ error ("The program has no registers now.");
+- if (deprecated_selected_frame == NULL)
+- error ("No selected frame.");
+
+ if (gdbarch_print_float_info_p (gdbarch))
+ gdbarch_print_float_info (gdbarch, file, frame, args);
+@@ -1937,7 +1929,7 @@ No floating-point info available for thi
+ static void
+ float_info (char *args, int from_tty)
+ {
+- print_float_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
++ print_float_info (current_gdbarch, gdb_stdout, get_selected_frame (), args);
+ }
+
+ static void
+Index: gdb-6.3/gdb/inflow.c
+===================================================================
+--- gdb-6.3.orig/gdb/inflow.c 2004-08-11 05:00:57.000000000 -0400
++++ gdb-6.3/gdb/inflow.c 2004-11-09 22:58:37.488338883 -0500
+@@ -591,10 +591,7 @@ kill_command (char *arg, int from_tty)
+ if (target_has_stack)
+ {
+ printf_filtered ("In %s,\n", target_longname);
+- if (deprecated_selected_frame == NULL)
+- fputs_filtered ("No selected stack frame.\n", gdb_stdout);
+- else
+- print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
++ print_stack_frame (get_selected_frame (), 1, SRC_AND_LOC);
+ }
+ bfd_cache_close_all ();
+ }
+Index: gdb-6.3/gdb/infrun.c
+===================================================================
+--- gdb-6.3.orig/gdb/infrun.c 2004-09-27 13:58:08.000000000 -0400
++++ gdb-6.3/gdb/infrun.c 2004-11-09 22:51:07.351240752 -0500
+@@ -3485,7 +3485,7 @@ save_inferior_status (int restore_stack_
+
+ inf_status->registers = regcache_dup (current_regcache);
+
+- inf_status->selected_frame_id = get_frame_id (deprecated_selected_frame);
++ inf_status->selected_frame_id = get_frame_id (get_selected_frame ());
+ return inf_status;
+ }
+
+Index: gdb-6.3/gdb/mi/mi-main.c
+===================================================================
+--- gdb-6.3.orig/gdb/mi/mi-main.c 2004-09-12 11:00:42.000000000 -0400
++++ gdb-6.3/gdb/mi/mi-main.c 2004-11-09 22:53:29.998389013 -0500
+@@ -388,7 +388,7 @@ register_changed_p (int regnum)
+ {
+ char raw_buffer[MAX_REGISTER_SIZE];
+
+- if (! frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
++ if (! frame_register_read (get_selected_frame (), regnum, raw_buffer))
+ return -1;
+
+ if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
+@@ -509,7 +509,7 @@ get_register (int regnum, int format)
+ if (format == 'N')
+ format = 0;
+
+- frame_register (deprecated_selected_frame, regnum, &optim, &lval, &addr,
++ frame_register (get_selected_frame (), regnum, &optim, &lval, &addr,
+ &realnum, buffer);
+
+ if (optim)
+Index: gdb-6.3/gdb/mn10300-tdep.c
+===================================================================
+--- gdb-6.3.orig/gdb/mn10300-tdep.c 2004-08-02 22:02:22.000000000 -0400
++++ gdb-6.3/gdb/mn10300-tdep.c 2004-11-09 22:51:07.356239776 -0500
+@@ -1154,7 +1154,7 @@ mn10300_print_register (const char *name
+ printf_filtered ("%s: ", name);
+
+ /* Get the data */
+- if (!frame_register_read (deprecated_selected_frame, regnum, raw_buffer))
++ if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
+ {
+ printf_filtered ("[invalid]");
+ return;
+Index: gdb-6.3/gdb/stack.c
+===================================================================
+--- gdb-6.3.orig/gdb/stack.c 2004-08-02 20:57:26.000000000 -0400
++++ gdb-6.3/gdb/stack.c 2004-11-09 22:51:07.361238800 -0500
+@@ -758,9 +758,7 @@ parse_frame_specification (char *frame_e
+ switch (numargs)
+ {
+ case 0:
+- if (deprecated_selected_frame == NULL)
+- error ("No selected frame.");
+- return deprecated_selected_frame;
++ return get_selected_frame ();
+ /* NOTREACHED */
+ case 1:
+ {
+@@ -902,10 +900,10 @@ frame_info (char *addr_exp, int from_tty
+ }
+ calling_frame_info = get_prev_frame (fi);
+
+- if (!addr_exp && frame_relative_level (deprecated_selected_frame) >= 0)
++ if (!addr_exp && frame_relative_level (get_selected_frame ()) >= 0)
+ {
+ printf_filtered ("Stack level %d, frame at ",
+- frame_relative_level (deprecated_selected_frame));
++ frame_relative_level (get_selected_frame ()));
+ print_address_numeric (get_frame_base (fi), 1, gdb_stdout);
+ printf_filtered (":\n");
+ }
+@@ -1445,9 +1443,7 @@ print_frame_label_vars (struct frame_inf
+ void
+ locals_info (char *args, int from_tty)
+ {
+- if (!deprecated_selected_frame)
+- error ("No frame selected.");
+- print_frame_local_vars (deprecated_selected_frame, 0, gdb_stdout);
++ print_frame_local_vars (get_selected_frame (), 0, gdb_stdout);
+ }
+
+ static void
+@@ -1470,7 +1466,7 @@ catch_info (char *ignore, int from_tty)
+ if (!deprecated_selected_frame)
+ error ("No frame selected.");
+
+- print_frame_label_vars (deprecated_selected_frame, 0, gdb_stdout);
++ print_frame_label_vars (get_selected_frame (), 0, gdb_stdout);
+ }
+ }
+
+@@ -1537,9 +1533,7 @@ print_frame_arg_vars (struct frame_info
+ void
+ args_info (char *ignore, int from_tty)
+ {
+- if (!deprecated_selected_frame)
+- error ("No frame selected.");
+- print_frame_arg_vars (deprecated_selected_frame, gdb_stdout);
++ print_frame_arg_vars (get_selected_frame (), gdb_stdout);
+ }
+
+
+@@ -1724,7 +1718,7 @@ down_silently_base (char *count_exp)
+ if (target_has_stack == 0 || deprecated_selected_frame == 0)
+ error ("No stack.");
+
+- frame = find_relative_frame (deprecated_selected_frame, &count1);
++ frame = find_relative_frame (get_selected_frame (), &count1);
+ if (count1 != 0 && count_exp == 0)
+ {
+
+@@ -1944,7 +1938,7 @@ func_command (char *arg, int from_tty)
+
+ if (!found)
+ printf_filtered ("'%s' not within current stack frame.\n", arg);
+- else if (fp != deprecated_selected_frame)
++ else if (fp != get_selected_frame ())
+ select_and_print_frame (fp);
+ }
+
+@@ -1965,7 +1959,7 @@ get_frame_language (void)
+ instruction of another function. So we rely on
+ get_frame_address_in_block(), it provides us with a PC which is
+ guaranteed to be inside the frame's code block. */
+- s = find_pc_symtab (get_frame_address_in_block (deprecated_selected_frame));
++ s = find_pc_symtab (get_frame_address_in_block (get_selected_frame ()));
+ if (s)
+ flang = s->language;
+ else
+Index: gdb-6.3/gdb/tui/tui-disasm.c
+===================================================================
+--- gdb-6.3.orig/gdb/tui/tui-disasm.c 2004-02-24 20:10:01.000000000 -0500
++++ gdb-6.3/gdb/tui/tui-disasm.c 2004-11-09 22:51:07.370237044 -0500
+@@ -382,7 +382,7 @@ tui_vertical_disassem_scroll (enum tui_s
+
+ content = (tui_win_content) TUI_DISASM_WIN->generic.content;
+ if (cursal.symtab == (struct symtab *) NULL)
+- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
++ s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
+ else
+ s = cursal.symtab;
+
+Index: gdb-6.3/gdb/tui/tui-source.c
+===================================================================
+--- gdb-6.3.orig/gdb/tui/tui-source.c 2004-02-16 16:05:09.000000000 -0500
++++ gdb-6.3/gdb/tui/tui-source.c 2004-11-09 22:51:07.370237044 -0500
+@@ -326,7 +326,7 @@ tui_vertical_source_scroll (enum tui_scr
+ struct symtab_and_line cursal = get_current_source_symtab_and_line ();
+
+ if (cursal.symtab == (struct symtab *) NULL)
+- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
++ s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
+ else
+ s = cursal.symtab;
+
+Index: gdb-6.3/gdb/tui/tui-winsource.c
+===================================================================
+--- gdb-6.3.orig/gdb/tui/tui-winsource.c 2004-02-16 16:05:09.000000000 -0500
++++ gdb-6.3/gdb/tui/tui-winsource.c 2004-11-09 22:51:07.371236848 -0500
+@@ -311,7 +311,7 @@ tui_horizontal_source_scroll (struct tui
+ struct symtab_and_line cursal = get_current_source_symtab_and_line ();
+
+ if (cursal.symtab == (struct symtab *) NULL)
+- s = find_pc_symtab (get_frame_pc (deprecated_selected_frame));
++ s = find_pc_symtab (get_frame_pc (get_selected_frame ()));
+ else
+ s = cursal.symtab;
+
+Index: gdb-6.3/gdb/valops.c
+===================================================================
+--- gdb-6.3.orig/gdb/valops.c 2004-09-13 23:01:48.000000000 -0400
++++ gdb-6.3/gdb/valops.c 2004-11-09 22:51:07.374236263 -0500
+@@ -2663,15 +2663,10 @@ value_of_local (const char *name, int co
+ struct block *b;
+ struct value * ret;
+
+- if (deprecated_selected_frame == 0)
+- {
+- if (complain)
+- error ("no frame selected");
+- else
+- return 0;
+- }
++ if (!complain && deprecated_selected_frame == 0)
++ return 0;
+
+- func = get_frame_function (deprecated_selected_frame);
++ func = get_frame_function (get_selected_frame ());
+ if (!func)
+ {
+ if (complain)
+@@ -2700,7 +2695,7 @@ value_of_local (const char *name, int co
+ return NULL;
+ }
+
+- ret = read_var_value (sym, deprecated_selected_frame);
++ ret = read_var_value (sym, get_selected_frame ());
+ if (ret == 0 && complain)
+ error ("`%s' argument unreadable", name);
+ return ret;
+Index: gdb-6.3/gdb/varobj.c
+===================================================================
+--- gdb-6.3.orig/gdb/varobj.c 2004-07-26 10:53:06.000000000 -0400
++++ gdb-6.3/gdb/varobj.c 2004-11-09 22:51:07.377235677 -0500
+@@ -488,7 +488,7 @@ varobj_create (char *objname,
+ if (fi != NULL)
+ {
+ var->root->frame = get_frame_id (fi);
+- old_fi = deprecated_selected_frame;
++ old_fi = get_selected_frame ();
+ select_frame (fi);
+ }
+
+Index: gdb-6.3/gdb/testsuite/gdb.base/default.exp
+===================================================================
+--- gdb-6.3.orig/gdb/testsuite/gdb.base/default.exp 2003-03-20 09:45:50.000000000 -0500
++++ gdb-6.3/gdb/testsuite/gdb.base/default.exp 2004-11-09 22:51:07.379235287 -0500
+@@ -167,7 +167,7 @@ gdb_test "disable breakpoints" "" "disab
+ #test disable display
+ gdb_test "disable display" "" "disable display"
+ #test disassemble
+-gdb_test "disassemble" "No frame selected." "disassemble"
++gdb_test "disassemble" "No (frame selected|registers)." "disassemble"
+ #test display
+ gdb_test "display" "" "display"
+ #test do
+@@ -229,9 +229,9 @@ gdb_expect {
+ }
+
+ #test frame "f" abbreviation
+-gdb_test "f" "No stack." "frame \"f\" abbreviation"
++gdb_test "f" "No (stack|registers)." "frame \"f\" abbreviation"
+ #test frame
+-gdb_test "frame" "No stack." "frame"
++gdb_test "frame" "No (stack|registers)." "frame"
+ #test fg
+ gdb_test "fg" "The program is not being run." "fg"
+ # FIXME: fg kills the udi connection
+@@ -294,9 +294,9 @@ gdb_test "ignore" "Argument required .a
+ #test info address
+ gdb_test "info address" "Argument required." "info address"
+ #test info all-registers
+-gdb_test "info all-registers" "The program has no registers now." "info all-registers"
++gdb_test "info all-registers" "(The program has no registers now|No registers)." "info all-registers"
+ #test info args
+-gdb_test "info args" "No frame selected." "info args"
++gdb_test "info args" "No (frame selected|registers)." "info args"
+ #test info bogus-gdb-command
+ gdb_test "info bogus-gdb-command" "Undefined info command: \"bogus-gdb-command\". Try \"help info\".*" "info bogus-gdb-command"
+ #test info breakpoints
+@@ -320,11 +320,11 @@ gdb_test "info frame" "No stack.|No sele
+ #test info files
+ gdb_test "info files" "" "info files"
+ #test info float
+-gdb_test "info float" "The program has no registers now." "info float"
++gdb_test "info float" "(The program has no registers now|No registers)." "info float"
+ #test info functions
+ gdb_test "info functions" "All defined functions:" "info functions"
+ #test info locals
+-gdb_test "info locals" "No frame selected." "info locals"
++gdb_test "info locals" "(No frame selected|No registers)." "info locals"
+ #test info program
+ gdb_test "info program" "The program being debugged is not being run." "info program"
+ #test info registers
+@@ -352,7 +352,7 @@ gdb_test "info types" "All defined types
+ #test info variables
+ gdb_test "info variables" "All defined variables:" "info variables"
+ #test info vector
+-gdb_test "info vector" "The program has no registers now." "info vector"
++gdb_test "info vector" "(The program has no registers now|No registers)." "info vector"
+ #test info warranty
+ gdb_test "info warranty" "NO WARRANTY(\[^\r\n\]*\[\r\n\])+ *11. *BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY(\[^\r\n\]*\[\r\n\])+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN(\[^\r\n\]*\[\r\n\])+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES(\[^\r\n\]*\[\r\n\])+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED(\[^\r\n\]*\[\r\n\])+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF(\[^\r\n\]*\[\r\n\])+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS(\[^\r\n\]*\[\r\n\])+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE(\[^\r\n\]*\[\r\n\])+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,(\[^\r\n\]*\[\r\n\])+REPAIR OR CORRECTION.(\[^\r\n\]*\[\r\n\])+ *12. *IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING(\[^\r\n\]*\[\r\n\])+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR(\[^\r\n\]*\[\r\n\])+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,(\[^\r\n\]*\[\r\n\])+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING(\[^\r\n\]*\[\r\n\])+OUT OF THE USE OR INABILITY TO USE THE PROGRAM .INCLUDING BUT NOT LIMITED(\[^\r\n\]*\[\r\n\])+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY(\[^\r\n\]*\[\r\n\])+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER(\[^\r\n\]*\[\r\n\])+PROGRAMS., EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE(\[^\r\n\]*\[\r\n\])+POSSIBILITY OF SUCH DAMAGES.*" "info warranty"
+ #test info watchpoints
diff --git a/misc/buildroot/toolchain/gdb/6.3/620-debian_static-thread-db.patch b/misc/buildroot/toolchain/gdb/6.3/620-debian_static-thread-db.patch
new file mode 100644
index 000000000..c5ac5a623
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/620-debian_static-thread-db.patch
@@ -0,0 +1,156 @@
+Status: submitted similar patch 2004-12-08
+
+This patch cleans up the initialization of thread_db. It works for static
+binaries now. The vsyscall patches hide this problem, since new static
+binaries will load the vsyscall DSO and then trigger thread_db; but
+this is still a good cleanup.
+
+Index: gdb-6.3/gdb/thread-db.c
+===================================================================
+--- gdb-6.3.orig/gdb/thread-db.c 2004-10-08 16:29:56.000000000 -0400
++++ gdb-6.3/gdb/thread-db.c 2004-11-10 00:19:30.626530413 -0500
+@@ -34,6 +34,7 @@
+ #include "target.h"
+ #include "regcache.h"
+ #include "solib-svr4.h"
++#include "observer.h"
+
+ #ifdef HAVE_GNU_LIBC_VERSION_H
+ #include <gnu/libc-version.h>
+@@ -627,59 +628,49 @@ check_thread_signals (void)
+ #endif
+ }
+
++/* Check whether thread_db is usable. This function is called when
++ an inferior is created (or otherwise acquired, e.g. attached to)
++ and when new shared libraries are loaded into a running process. */
++
+ static void
+-thread_db_new_objfile (struct objfile *objfile)
++check_for_thread_db (void)
+ {
+ td_err_e err;
++ static int already_loaded;
+
+ /* First time through, report that libthread_db was successfuly
+ loaded. Can't print this in in thread_db_load as, at that stage,
+- the interpreter and it's console haven't started. The real
+- problem here is that libthread_db is loaded too early - it should
+- only be loaded when there is a program to debug. */
+- {
+- static int dejavu;
+- if (!dejavu)
+- {
+- Dl_info info;
+- const char *library = NULL;
+- /* Try dladdr. */
+- if (dladdr ((*td_ta_new_p), &info) != 0)
+- library = info.dli_fname;
+- /* Try dlinfo? */
+- if (library == NULL)
+- /* Paranoid - don't let a NULL path slip through. */
+- library = LIBTHREAD_DB_SO;
+- printf_unfiltered ("Using host libthread_db library \"%s\".\n",
+- library);
+- dejavu = 1;
+- }
+- }
++ the interpreter and it's console haven't started. */
+
+- /* Don't attempt to use thread_db on targets which can not run
+- (core files). */
+- if (objfile == NULL || !target_has_execution)
++ if (!already_loaded)
+ {
+- /* All symbols have been discarded. If the thread_db target is
+- active, deactivate it now. */
+- if (using_thread_db)
+- {
+- gdb_assert (proc_handle.pid == 0);
+- unpush_target (&thread_db_ops);
+- using_thread_db = 0;
+- }
++ Dl_info info;
++ const char *library = NULL;
++ if (dladdr ((*td_ta_new_p), &info) != 0)
++ library = info.dli_fname;
++
++ /* Try dlinfo? */
+
+- goto quit;
++ if (library == NULL)
++ /* Paranoid - don't let a NULL path slip through. */
++ library = LIBTHREAD_DB_SO;
++
++ printf_unfiltered ("Using host libthread_db library \"%s\".\n",
++ library);
++ already_loaded = 1;
+ }
+
+ if (using_thread_db)
+ /* Nothing to do. The thread library was already detected and the
+ target vector was already activated. */
+- goto quit;
++ return;
++
++ /* Don't attempt to use thread_db on targets which can not run
++ (executables not running yet, core files) for now. */
++ if (!target_has_execution)
++ return;
+
+- /* Initialize the structure that identifies the child process. Note
+- that at this point there is no guarantee that we actually have a
+- child process. */
++ /* Initialize the structure that identifies the child process. */
+ proc_handle.pid = GET_PID (inferior_ptid);
+
+ /* Now attempt to open a connection to the thread library. */
+@@ -706,12 +697,24 @@ thread_db_new_objfile (struct objfile *o
+ thread_db_err_str (err));
+ break;
+ }
++}
++
++static void
++thread_db_new_objfile (struct objfile *objfile)
++{
++ if (objfile != NULL)
++ check_for_thread_db ();
+
+-quit:
+ if (target_new_objfile_chain)
+ target_new_objfile_chain (objfile);
+ }
+
++static void
++check_for_thread_db_observer (struct target_ops *target, int from_tty)
++{
++ check_for_thread_db ();
++}
++
+ /* Attach to a new thread. This function is called when we receive a
+ TD_CREATE event or when we iterate over all threads and find one
+ that wasn't already in our list. */
+@@ -1366,5 +1369,8 @@ _initialize_thread_db (void)
+ /* Add ourselves to objfile event chain. */
+ target_new_objfile_chain = deprecated_target_new_objfile_hook;
+ deprecated_target_new_objfile_hook = thread_db_new_objfile;
++
++ /* Register ourselves for the new inferior observer. */
++ observer_attach_inferior_created (check_for_thread_db_observer);
+ }
+ }
+Index: gdb-6.3/gdb/Makefile.in
+===================================================================
+--- gdb-6.3.orig/gdb/Makefile.in 2004-11-09 23:04:57.000000000 -0500
++++ gdb-6.3/gdb/Makefile.in 2004-11-10 00:19:26.440347022 -0500
+@@ -2626,7 +2626,8 @@ thread.o: thread.c $(defs_h) $(symtab_h)
+ $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h)
+ thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \
+ $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \
+- $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h)
++ $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) \
++ $(observer_h)
+ top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
+ $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \
+ $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \
diff --git a/misc/buildroot/toolchain/gdb/6.3/630-debian_24.tracepoint-segv.patch b/misc/buildroot/toolchain/gdb/6.3/630-debian_24.tracepoint-segv.patch
new file mode 100644
index 000000000..d038ff8ec
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/630-debian_24.tracepoint-segv.patch
@@ -0,0 +1,15 @@
+Trivial. Still need to submit this.
+
+Index: gdb-6.1/gdb/tracepoint.c
+===================================================================
+--- gdb-6.1.orig/gdb/tracepoint.c 2004-04-05 13:26:43.000000000 -0400
++++ gdb-6.1/gdb/tracepoint.c 2004-04-05 13:26:45.000000000 -0400
+@@ -853,6 +853,8 @@ read_actions (struct tracepoint *t)
+ else
+ line = gdb_readline (0);
+
++ if (line == NULL || *line == EOF)
++ break;
+ linetype = validate_actionline (&line, t);
+ if (linetype == BADLINE)
+ continue; /* already warned -- collect another line */
diff --git a/misc/buildroot/toolchain/gdb/6.3/640-debian_dwarf2-frame-signal-unwinder.patch b/misc/buildroot/toolchain/gdb/6.3/640-debian_dwarf2-frame-signal-unwinder.patch
new file mode 100644
index 000000000..246427ee6
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/640-debian_dwarf2-frame-signal-unwinder.patch
@@ -0,0 +1,120 @@
+Status: Checked in to HEAD after 6.3.
+
+2004-11-07 Daniel Jacobowitz <dan@debian.org>
+
+ * dwarf2-frame.c (struct dwarf2_frame_ops): Add signal_frame_p.
+ (dwarf2_frame_set_signal_frame_p, dwarf2_frame_signal_frame_p)
+ (dwarf2_signal_frame_unwind): New.
+ (dwarf2_frame_sniffer): Use dwarf2_frame_signal_frame_p.
+ * dwarf2-frame.h (dwarf2_frame_set_signal_frame_p): New prototype.
+
+Index: src/gdb/dwarf2-frame.c
+===================================================================
+RCS file: /big/fsf/rsync/src-cvs/src/gdb/dwarf2-frame.c,v
+retrieving revision 1.41
+diff -u -p -r1.41 dwarf2-frame.c
+--- src/gdb/dwarf2-frame.c 4 Nov 2004 21:15:15 -0000 1.41
++++ src/gdb/dwarf2-frame.c 7 Nov 2004 17:41:58 -0000
+@@ -471,6 +471,10 @@ struct dwarf2_frame_ops
+ {
+ /* Pre-initialize the register state REG for register REGNUM. */
+ void (*init_reg) (struct gdbarch *, int, struct dwarf2_frame_state_reg *);
++
++ /* Check whether the frame preceding NEXT_FRAME will be a signal
++ trampoline. */
++ int (*signal_frame_p) (struct gdbarch *, struct frame_info *);
+ };
+
+ /* Default architecture-specific register state initialization
+@@ -547,6 +551,33 @@ dwarf2_frame_init_reg (struct gdbarch *g
+
+ ops->init_reg (gdbarch, regnum, reg);
+ }
++
++/* Set the architecture-specific signal trampoline recognition
++ function for GDBARCH to SIGNAL_FRAME_P. */
++
++void
++dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
++ int (*signal_frame_p) (struct gdbarch *,
++ struct frame_info *))
++{
++ struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
++
++ ops->signal_frame_p = signal_frame_p;
++}
++
++/* Query the architecture-specific signal frame recognizer for
++ NEXT_FRAME. */
++
++static int
++dwarf2_frame_signal_frame_p (struct gdbarch *gdbarch,
++ struct frame_info *next_frame)
++{
++ struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
++
++ if (ops->signal_frame_p == NULL)
++ return 0;
++ return ops->signal_frame_p (gdbarch, next_frame);
++}
+
+
+ struct dwarf2_frame_cache
+@@ -841,6 +872,13 @@ static const struct frame_unwind dwarf2_
+ dwarf2_frame_prev_register
+ };
+
++static const struct frame_unwind dwarf2_signal_frame_unwind =
++{
++ SIGTRAMP_FRAME,
++ dwarf2_frame_this_id,
++ dwarf2_frame_prev_register
++};
++
+ const struct frame_unwind *
+ dwarf2_frame_sniffer (struct frame_info *next_frame)
+ {
+@@ -848,10 +886,18 @@ dwarf2_frame_sniffer (struct frame_info
+ function. frame_pc_unwind(), for a no-return next function, can
+ end up returning something past the end of this function's body. */
+ CORE_ADDR block_addr = frame_unwind_address_in_block (next_frame);
+- if (dwarf2_frame_find_fde (&block_addr))
+- return &dwarf2_frame_unwind;
++ if (!dwarf2_frame_find_fde (&block_addr))
++ return NULL;
+
+- return NULL;
++ /* On some targets, signal trampolines may have unwind information.
++ We need to recognize them so that we set the frame type
++ correctly. */
++
++ if (dwarf2_frame_signal_frame_p (get_frame_arch (next_frame),
++ next_frame))
++ return &dwarf2_signal_frame_unwind;
++
++ return &dwarf2_frame_unwind;
+ }
+
+
+Index: src/gdb/dwarf2-frame.h
+===================================================================
+RCS file: /big/fsf/rsync/src-cvs/src/gdb/dwarf2-frame.h,v
+retrieving revision 1.6
+diff -u -p -r1.6 dwarf2-frame.h
+--- src/gdb/dwarf2-frame.h 28 Feb 2004 16:59:32 -0000 1.6
++++ src/gdb/dwarf2-frame.h 7 Nov 2004 17:40:41 -0000
+@@ -79,6 +79,14 @@ extern void dwarf2_frame_set_init_reg (s
+ void (*init_reg) (struct gdbarch *, int,
+ struct dwarf2_frame_state_reg *));
+
++/* Set the architecture-specific signal trampoline recognition
++ function for GDBARCH to SIGNAL_FRAME_P. */
++
++extern void
++ dwarf2_frame_set_signal_frame_p (struct gdbarch *gdbarch,
++ int (*signal_frame_p) (struct gdbarch *,
++ struct frame_info *));
++
+ /* Return the frame unwind methods for the function that contains PC,
+ or NULL if it can't be handled by DWARF CFI frame unwinder. */
+
diff --git a/misc/buildroot/toolchain/gdb/6.3/650-debian_vsyscall-gdb-support.patch b/misc/buildroot/toolchain/gdb/6.3/650-debian_vsyscall-gdb-support.patch
new file mode 100644
index 000000000..e725f9c54
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/650-debian_vsyscall-gdb-support.patch
@@ -0,0 +1,245 @@
+Status: Checked in to HEAD after 6.3.
+
+2004-11-07 Andrew Cagney <cagney@redhat.com>
+ Daniel Jacobowitz <dan@debian.org>
+ Roland McGrath <roland@redhat.com>
+
+ * Makefile.in (symfile-mem.o): Update dependencies.
+ * i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): New.
+ (i386_linux_init_abi): Call dwarf2_frame_set_signal_frame_p.
+ * inf-ptrace.c (inf_ptrace_attach): Call
+ observer_notify_inferior_created.
+ * inftarg.c (child_attach): Likewise.
+ * symfile-mem.c: Include "observer.h", "auxv.h", and "elf/common.h".
+ (symbol_file_add_from_memory): Take NAME argument. Use it for
+ the new BFD's filename.
+ (add_symbol_file_from_memory_command): Update call to
+ symbol_file_add_from_memory.
+ (struct symbol_file_add_from_memory_args, add_vsyscall_page)
+ (symbol_file_add_from_memory_wrapper): New.
+ (_initialize_symfile_mem): Register add_vsyscall_page as an
+ inferior_created observer.
+
+Index: gdb-6.3/gdb/i386-linux-tdep.c
+===================================================================
+--- gdb-6.3.orig/gdb/i386-linux-tdep.c 2004-08-06 16:58:28.000000000 -0400
++++ gdb-6.3/gdb/i386-linux-tdep.c 2004-11-10 00:55:06.669398770 -0500
+@@ -27,6 +27,7 @@
+ #include "inferior.h"
+ #include "osabi.h"
+ #include "reggroups.h"
++#include "dwarf2-frame.h"
+
+ #include "gdb_string.h"
+
+@@ -244,6 +245,27 @@ i386_linux_sigtramp_p (struct frame_info
+ || strcmp ("__restore_rt", name) == 0);
+ }
+
++/* Return one if the unwound PC from NEXT_FRAME is in a signal trampoline
++ which may have DWARF-2 CFI. */
++
++static int
++i386_linux_dwarf_signal_frame_p (struct gdbarch *gdbarch,
++ struct frame_info *next_frame)
++{
++ CORE_ADDR pc = frame_pc_unwind (next_frame);
++ char *name;
++
++ find_pc_partial_function (pc, &name, NULL, NULL);
++
++ /* If a vsyscall DSO is in use, the signal trampolines may have these
++ names. */
++ if (name && (strcmp (name, "__kernel_sigreturn") == 0
++ || strcmp (name, "__kernel_rt_sigreturn") == 0))
++ return 1;
++
++ return 0;
++}
++
+ /* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
+ #define I386_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 20
+
+@@ -414,6 +436,8 @@ i386_linux_init_abi (struct gdbarch_info
+
+ /* GNU/Linux uses the dynamic linker included in the GNU C Library. */
+ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
++
++ dwarf2_frame_set_signal_frame_p (gdbarch, i386_linux_dwarf_signal_frame_p);
+ }
+
+ /* Provide a prototype to silence -Wmissing-prototypes. */
+Index: gdb-6.3/gdb/inf-ptrace.c
+===================================================================
+--- gdb-6.3.orig/gdb/inf-ptrace.c 2004-10-15 09:29:33.000000000 -0400
++++ gdb-6.3/gdb/inf-ptrace.c 2004-11-10 00:53:43.697615843 -0500
+@@ -220,6 +220,10 @@ inf_ptrace_attach (char *args, int from_
+
+ inferior_ptid = pid_to_ptid (pid);
+ push_target (ptrace_ops_hack);
++
++ /* Do this first, before anything has had a chance to query the
++ inferior's symbol table or similar. */
++ observer_notify_inferior_created (&current_target, from_tty);
+ }
+
+ static void
+Index: gdb-6.3/gdb/inftarg.c
+===================================================================
+--- gdb-6.3.orig/gdb/inftarg.c 2004-10-08 16:29:47.000000000 -0400
++++ gdb-6.3/gdb/inftarg.c 2004-11-10 00:53:43.711613107 -0500
+@@ -211,6 +211,10 @@ child_attach (char *args, int from_tty)
+
+ inferior_ptid = pid_to_ptid (pid);
+ push_target (&deprecated_child_ops);
++
++ /* Do this first, before anything has had a chance to query the
++ inferior's symbol table or similar. */
++ observer_notify_inferior_created (&current_target, from_tty);
+ }
+
+ #if !defined(CHILD_POST_ATTACH)
+Index: gdb-6.3/gdb/symfile-mem.c
+===================================================================
+--- gdb-6.3.orig/gdb/symfile-mem.c 2004-07-17 10:24:07.000000000 -0400
++++ gdb-6.3/gdb/symfile-mem.c 2004-11-10 00:53:43.722610958 -0500
+@@ -52,13 +52,19 @@
+ #include "target.h"
+ #include "value.h"
+ #include "symfile.h"
++#include "observer.h"
++#include "auxv.h"
++#include "elf/common.h"
+
+
+ /* Read inferior memory at ADDR to find the header of a loaded object file
+ and read its in-core symbols out of inferior memory. TEMPL is a bfd
+- representing the target's format. */
++ representing the target's format. NAME is the name to use for this
++ symbol file in messages; it can be NULL or a malloc-allocated string
++ which will be attached to the BFD. */
+ static struct objfile *
+-symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, int from_tty)
++symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, char *name,
++ int from_tty)
+ {
+ struct objfile *objf;
+ struct bfd *nbfd;
+@@ -75,7 +81,10 @@ symbol_file_add_from_memory (struct bfd
+ if (nbfd == NULL)
+ error ("Failed to read a valid object file image from memory.");
+
+- nbfd->filename = xstrdup ("shared object read from target memory");
++ if (name == NULL)
++ nbfd->filename = xstrdup ("shared object read from target memory");
++ else
++ nbfd->filename = name;
+
+ if (!bfd_check_format (nbfd, bfd_object))
+ {
+@@ -129,7 +138,73 @@ add_symbol_file_from_memory_command (cha
+ error ("\
+ Must use symbol-file or exec-file before add-symbol-file-from-memory.");
+
+- symbol_file_add_from_memory (templ, addr, from_tty);
++ symbol_file_add_from_memory (templ, addr, NULL, from_tty);
++}
++
++/* Arguments for symbol_file_add_from_memory_wrapper. */
++
++struct symbol_file_add_from_memory_args
++{
++ struct bfd *bfd;
++ CORE_ADDR sysinfo_ehdr;
++ char *name;
++ int from_tty;
++};
++
++/* Wrapper function for symbol_file_add_from_memory, for
++ catch_exceptions. */
++
++static int
++symbol_file_add_from_memory_wrapper (struct ui_out *uiout, void *data)
++{
++ struct symbol_file_add_from_memory_args *args = data;
++
++ symbol_file_add_from_memory (args->bfd, args->sysinfo_ehdr, args->name,
++ args->from_tty);
++ return 0;
++}
++
++/* Try to add the symbols for the vsyscall page, if there is one. This function
++ is called via the inferior_created observer. */
++
++static void
++add_vsyscall_page (struct target_ops *target, int from_tty)
++{
++ CORE_ADDR sysinfo_ehdr;
++
++ if (target_auxv_search (target, AT_SYSINFO_EHDR, &sysinfo_ehdr) > 0
++ && sysinfo_ehdr != (CORE_ADDR) 0)
++ {
++ struct bfd *bfd;
++ struct symbol_file_add_from_memory_args args;
++
++ if (core_bfd != NULL)
++ bfd = core_bfd;
++ else if (exec_bfd != NULL)
++ bfd = exec_bfd;
++ else
++ /* FIXME: cagney/2004-05-06: Should not require an existing
++ BFD when trying to create a run-time BFD of the VSYSCALL
++ page in the inferior. Unfortunately that's the current
++ interface so for the moment bail. Introducing a
++ ``bfd_runtime'' (a BFD created using the loaded image) file
++ format should fix this. */
++ {
++ warning ("could not load vsyscall page because no executable was specified");
++ warning ("try using the \"file\" command first");
++ return;
++ }
++ args.bfd = bfd;
++ args.sysinfo_ehdr = sysinfo_ehdr;
++ xasprintf (&args.name, "system-supplied DSO at 0x%s",
++ paddr_nz (sysinfo_ehdr));
++ /* Pass zero for FROM_TTY, because the action of loading the
++ vsyscall DSO was not triggered by the user, even if the user
++ typed "run" at the TTY. */
++ args.from_tty = 0;
++ catch_exceptions (uiout, symbol_file_add_from_memory_wrapper,
++ &args, NULL, RETURN_MASK_ALL);
++ }
+ }
+
+
+@@ -143,4 +218,7 @@ Load the symbols out of memory from a dy
+ Give an expression for the address of the file's shared object file header.",
+ &cmdlist);
+
++ /* Want to know of each new inferior so that its vsyscall info can
++ be extracted. */
++ observer_attach_inferior_created (add_vsyscall_page);
+ }
+Index: gdb-6.3/gdb/Makefile.in
+===================================================================
+--- gdb-6.3.orig/gdb/Makefile.in 2004-11-10 00:29:00.000000000 -0500
++++ gdb-6.3/gdb/Makefile.in 2004-11-10 00:54:47.728100986 -0500
+@@ -2020,7 +2020,7 @@ i386-linux-nat.o: i386-linux-nat.c $(def
+ i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
+ $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \
+ $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) $(glibc_tdep_h) \
+- $(solib_svr4_h)
++ $(solib_svr4_h) $(dwarf2_frame_h)
+ i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
+ $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h)
+ i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h)
+@@ -2606,7 +2606,8 @@ symfile.o: symfile.c $(defs_h) $(bfdlink
+ $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \
+ $(gdb_string_h) $(gdb_stat_h)
+ symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
+- $(objfiles_h) $(gdbcmd_h) $(target_h) $(value_h) $(symfile_h)
++ $(objfiles_h) $(gdbcmd_h) $(target_h) $(value_h) $(symfile_h) \
++ $(observer_h) $(auxv_h) $(elf_common_h)
+ symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
+ $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
+ $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \
diff --git a/misc/buildroot/toolchain/gdb/6.3/660-debian_dwarf-cfa-restore.patch b/misc/buildroot/toolchain/gdb/6.3/660-debian_dwarf-cfa-restore.patch
new file mode 100644
index 000000000..8b81cca71
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/660-debian_dwarf-cfa-restore.patch
@@ -0,0 +1,23 @@
+Status: Checked in to HEAD after 6.3.
+
+2004-11-09 Daniel Jacobowitz <dan@debian.org>
+
+ * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Correct allocated
+ size.
+
+Index: src/gdb/dwarf2-frame.c
+===================================================================
+RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
+retrieving revision 1.45
+diff -u -p -r1.45 dwarf2-frame.c
+--- src/gdb/dwarf2-frame.c 7 Nov 2004 21:16:11 -0000 1.45
++++ src/gdb/dwarf2-frame.c 9 Nov 2004 14:42:52 -0000
+@@ -162,7 +162,7 @@ dwarf2_frame_state_alloc_regs (struct dw
+ static struct dwarf2_frame_state_reg *
+ dwarf2_frame_state_copy_regs (struct dwarf2_frame_state_reg_info *rs)
+ {
+- size_t size = rs->num_regs * sizeof (struct dwarf2_frame_state_reg_info);
++ size_t size = rs->num_regs * sizeof (struct dwarf2_frame_state_reg);
+ struct dwarf2_frame_state_reg *reg;
+
+ reg = (struct dwarf2_frame_state_reg *) xmalloc (size);
diff --git a/misc/buildroot/toolchain/gdb/6.3/680-debian_sim-destdir.patch b/misc/buildroot/toolchain/gdb/6.3/680-debian_sim-destdir.patch
new file mode 100644
index 000000000..71f60b5c6
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/680-debian_sim-destdir.patch
@@ -0,0 +1,53 @@
+Fix some missing uses of DESTDIR in the sim/ directories. The Debian
+packages use DESTDIR to build.
+
+%patch
+Index: gdb-6.3/sim/Makefile.in
+===================================================================
+--- gdb-6.3.orig/sim/Makefile.in 2003-09-03 14:46:52.000000000 -0400
++++ gdb-6.3/sim/Makefile.in 2004-11-10 00:39:25.381315738 -0500
+@@ -93,6 +93,7 @@ FLAGS_TO_PASS = \
+ "CC=$(CC)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
++ "DESTDIR=$(DESTDIR)" \
+ "RANLIB=$(RANLIB)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "INSTALL=$(INSTALL)" \
+Index: gdb-6.3/sim/common/Make-common.in
+===================================================================
+--- gdb-6.3.orig/sim/common/Make-common.in 2003-09-08 13:24:59.000000000 -0400
++++ gdb-6.3/sim/common/Make-common.in 2004-11-10 00:39:25.383315347 -0500
+@@ -581,14 +581,14 @@ install: install-common $(SIM_EXTRA_INST
+
+ install-common: installdirs
+ n=`echo run | sed '$(program_transform_name)'`; \
+- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
++ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+ n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
+- $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
+- ( cd $(libdir) ; $(RANLIB) $$n )
++ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
++ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
+
+ installdirs:
+- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
+- $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
++ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
++ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
+
+ check:
+ cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
+Index: gdb-6.3/sim/erc32/Makefile.in
+===================================================================
+--- gdb-6.3.orig/sim/erc32/Makefile.in 2000-03-07 10:32:49.000000000 -0500
++++ gdb-6.3/sim/erc32/Makefile.in 2004-11-10 00:39:25.385314957 -0500
+@@ -53,7 +53,7 @@ end.h: end
+ # Copy the files into directories where they will be run.
+ install-sis: installdirs
+ n=`echo sis | sed '$(program_transform_name)'`; \
+- $(INSTALL_PROGRAM) sis$(EXEEXT) $(bindir)/$$n$(EXEEXT)
++ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
+
+ clean-sis:
+ rm -f sis end end.h
diff --git a/misc/buildroot/toolchain/gdb/6.3/690-debian_member-field-symtab.patch b/misc/buildroot/toolchain/gdb/6.3/690-debian_member-field-symtab.patch
new file mode 100644
index 000000000..4f5fb45c3
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/690-debian_member-field-symtab.patch
@@ -0,0 +1,35 @@
+Status: unsubmitted
+
+This patch was for Debian bug #239535. It needs to be tested, and
+submitted.
+
+Index: gdb-6.3/gdb/valops.c
+===================================================================
+--- gdb-6.3.orig/gdb/valops.c 2004-11-09 22:51:07.000000000 -0500
++++ gdb-6.3/gdb/valops.c 2004-11-10 00:43:54.036837699 -0500
+@@ -2314,8 +2314,10 @@ check_field_in (struct type *type, const
+ return 1;
+ }
+
++ /* Check each baseclass. Call check_typedef, which will follow typedefs
++ and do opaque/stub type resolution. */
+ for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
+- if (check_field_in (TYPE_BASECLASS (type, i), name))
++ if (check_field_in (check_typedef (TYPE_BASECLASS (type, i)), name))
+ return 1;
+
+ return 0;
+Index: gdb-6.3/gdb/dwarf2read.c
+===================================================================
+--- gdb-6.3.orig/gdb/dwarf2read.c 2004-10-15 20:41:00.000000000 -0400
++++ gdb-6.3/gdb/dwarf2read.c 2004-11-10 00:46:21.970935829 -0500
+@@ -2099,8 +2099,8 @@ guess_structure_name (struct partial_die
+ strlen (actual_class_name),
+ &cu->comp_unit_obstack);
+ xfree (actual_class_name);
++ break;
+ }
+- break;
+ }
+
+ child_pdi = child_pdi->die_sibling;
diff --git a/misc/buildroot/toolchain/gdb/6.3/700-debian_cp-pass-by-reference.patch b/misc/buildroot/toolchain/gdb/6.3/700-debian_cp-pass-by-reference.patch
new file mode 100644
index 000000000..666d34342
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/700-debian_cp-pass-by-reference.patch
@@ -0,0 +1,464 @@
+This patch needs to be submitted for the FSF. Also, there may be testcases
+already in the GDB testsuite (currently disabled) that it would probably fix.
+
+Index: gdb-6.3/gdb/infcall.c
+===================================================================
+--- gdb-6.3.orig/gdb/infcall.c 2004-10-08 04:15:56.000000000 -0400
++++ gdb-6.3/gdb/infcall.c 2004-11-10 12:30:07.000000000 -0500
+@@ -36,6 +36,7 @@
+ #include "gdb_string.h"
+ #include "infcall.h"
+ #include "dummy-frame.h"
++#include "cp-abi.h"
+
+ /* NOTE: cagney/2003-04-16: What's the future of this code?
+
+@@ -297,8 +298,8 @@ call_function_by_hand (struct value *fun
+ {
+ CORE_ADDR sp;
+ CORE_ADDR dummy_addr;
+- struct type *value_type;
+- unsigned char struct_return;
++ struct type *value_type, *target_value_type;
++ unsigned char struct_return = 0, cp_struct_return = 0;
+ CORE_ADDR struct_addr = 0;
+ struct regcache *retbuf;
+ struct cleanup *retbuf_cleanup;
+@@ -312,6 +313,7 @@ call_function_by_hand (struct value *fun
+ struct regcache *caller_regcache;
+ struct cleanup *caller_regcache_cleanup;
+ struct frame_id dummy_id;
++ struct cleanup *args_cleanup;
+
+ if (!target_has_execution)
+ noprocess ();
+@@ -410,10 +412,31 @@ call_function_by_hand (struct value *fun
+ using_gcc = (b == NULL ? 2 : BLOCK_GCC_COMPILED (b));
+ }
+
+- /* Are we returning a value using a structure return or a normal
+- value return? */
++ /* Are we returning a value using a structure return (passing a
++ hidden argument pointing to storage) or a normal value return?
++ There are two cases: C++ ABI mandated structure return and
++ target ABI structure return. The variable STRUCT_RETURN only
++ describes the latter. The C++ version is handled by passing
++ the return location as the first parameter to the function,
++ even preceding "this". This is different from the target
++ ABI version, which is target-specific; for instance, on ia64
++ the first argument is passed in out0 but the hidden structure
++ return pointer would normally be passed in r8. */
+
+- struct_return = using_struct_return (value_type, using_gcc);
++ if (current_language->la_language == language_cplus
++ && cp_pass_by_reference (value_type))
++ {
++ cp_struct_return = 1;
++
++ /* Tell the target specific argument pushing routine not to
++ expect a value. */
++ target_value_type = builtin_type_void;
++ }
++ else
++ {
++ struct_return = using_struct_return (value_type, using_gcc);
++ target_value_type = value_type;
++ }
+
+ /* Determine the location of the breakpoint (and possibly other
+ stuff) that the called function will return to. The SPARC, for a
+@@ -432,7 +455,7 @@ call_function_by_hand (struct value *fun
+ if (INNER_THAN (1, 2))
+ {
+ sp = push_dummy_code (current_gdbarch, sp, funaddr,
+- using_gcc, args, nargs, value_type,
++ using_gcc, args, nargs, target_value_type,
+ &real_pc, &bp_addr);
+ dummy_addr = sp;
+ }
+@@ -440,7 +463,7 @@ call_function_by_hand (struct value *fun
+ {
+ dummy_addr = sp;
+ sp = push_dummy_code (current_gdbarch, sp, funaddr,
+- using_gcc, args, nargs, value_type,
++ using_gcc, args, nargs, target_value_type,
+ &real_pc, &bp_addr);
+ }
+ break;
+@@ -507,9 +530,15 @@ call_function_by_hand (struct value *fun
+ param_type = TYPE_FIELD_TYPE (ftype, i);
+ else
+ param_type = NULL;
+-
++
+ args[i] = value_arg_coerce (args[i], param_type, prototyped);
+
++ /* FIXME: Is current_language the right language? */
++ if (current_language->la_language == language_cplus
++ && param_type != NULL
++ && cp_pass_by_reference (param_type))
++ args[i] = value_addr (args[i]);
++
+ /* elz: this code is to handle the case in which the function
+ to be called has a pointer to function as parameter and the
+ corresponding actual argument is the address of a function
+@@ -607,7 +636,7 @@ You must use a pointer to function type
+ stack, if necessary. Make certain that the value is correctly
+ aligned. */
+
+- if (struct_return)
++ if (struct_return || cp_struct_return)
+ {
+ int len = TYPE_LENGTH (value_type);
+ if (INNER_THAN (1, 2))
+@@ -632,6 +661,22 @@ You must use a pointer to function type
+ }
+ }
+
++ if (cp_struct_return)
++ {
++ struct value **new_args;
++
++ /* Add the new argument to the front of the argument list. */
++ new_args = xmalloc (sizeof (struct value *) * (nargs + 1));
++ new_args[0] = value_from_pointer (lookup_pointer_type (value_type),
++ struct_addr);
++ memcpy (&new_args[1], &args[0], sizeof (struct value *) * nargs);
++ args = new_args;
++ nargs++;
++ args_cleanup = make_cleanup (xfree, args);
++ }
++ else
++ args_cleanup = make_cleanup (null_cleanup, NULL);
++
+ /* Create the dummy stack frame. Pass in the call dummy address as,
+ presumably, the ABI code knows where, in the call dummy, the
+ return address should be pointed. */
+@@ -649,6 +694,8 @@ You must use a pointer to function type
+ else
+ error ("This target does not support function calls");
+
++ do_cleanups (args_cleanup);
++
+ /* Set up a frame ID for the dummy frame so we can pass it to
+ set_momentary_breakpoint. We need to give the breakpoint a frame
+ ID so that the breakpoint code can correctly re-identify the
+@@ -839,11 +886,7 @@ the function call).", name);
+ /* Figure out the value returned by the function, return that. */
+ {
+ struct value *retval;
+- if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
+- /* If the function returns void, don't bother fetching the
+- return value. */
+- retval = allocate_value (value_type);
+- else if (struct_return)
++ if (struct_return || cp_struct_return)
+ /* NOTE: cagney/2003-09-27: This assumes that PUSH_DUMMY_CALL
+ has correctly stored STRUCT_ADDR in the target. In the past
+ that hasn't been the case, the old MIPS PUSH_ARGUMENTS
+@@ -853,6 +896,10 @@ the function call).", name);
+ "struct return convention", check that PUSH_DUMMY_CALL isn't
+ playing tricks. */
+ retval = value_at (value_type, struct_addr, NULL);
++ else if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
++ /* If the function returns void, don't bother fetching the
++ return value. */
++ retval = allocate_value (value_type);
+ else
+ {
+ /* This code only handles "register convention". */
+Index: gdb-6.3/gdb/cp-abi.h
+===================================================================
+--- gdb-6.3.orig/gdb/cp-abi.h 2003-04-12 13:41:25.000000000 -0400
++++ gdb-6.3/gdb/cp-abi.h 2004-11-10 12:30:07.000000000 -0500
+@@ -1,7 +1,7 @@
+ /* Abstraction of various C++ ABI's we support, and the info we need
+ to get from them.
+ Contributed by Daniel Berlin <dberlin@redhat.com>
+- Copyright 2001 Free Software Foundation, Inc.
++ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -145,6 +145,10 @@ extern struct type *value_rtti_type (str
+ extern int baseclass_offset (struct type *type, int index, char *valaddr,
+ CORE_ADDR address);
+
++/* Return non-zero if an argument of type TYPE should be passed by reference
++ instead of value. */
++extern int cp_pass_by_reference (struct type *type);
++
+ struct cp_abi_ops
+ {
+ const char *shortname;
+@@ -162,6 +166,7 @@ struct cp_abi_ops
+ int *using_enc);
+ int (*baseclass_offset) (struct type *type, int index, char *valaddr,
+ CORE_ADDR address);
++ int (*pass_by_reference) (struct type *type);
+ };
+
+
+Index: gdb-6.3/gdb/cp-abi.c
+===================================================================
+--- gdb-6.3.orig/gdb/cp-abi.c 2003-11-26 17:04:00.000000000 -0500
++++ gdb-6.3/gdb/cp-abi.c 2004-11-10 12:30:07.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* Generic code for supporting multiple C++ ABI's
+- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
++ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -94,6 +94,14 @@ value_rtti_type (struct value *v, int *f
+ return (*current_cp_abi.rtti_type) (v, full, top, using_enc);
+ }
+
++int
++cp_pass_by_reference (struct type *type)
++{
++ if ((current_cp_abi.pass_by_reference) == NULL)
++ return 0;
++ return (*current_cp_abi.pass_by_reference) (type);
++}
++
+ /* Set the current C++ ABI to SHORT_NAME. */
+
+ static int
+Index: gdb-6.3/gdb/gnu-v3-abi.c
+===================================================================
+--- gdb-6.3.orig/gdb/gnu-v3-abi.c 2004-03-15 15:38:08.000000000 -0500
++++ gdb-6.3/gdb/gnu-v3-abi.c 2004-11-10 12:30:07.000000000 -0500
+@@ -1,7 +1,7 @@
+ /* Abstraction of GNU v3 abi.
+ Contributed by Jim Blandy <jimb@redhat.com>
+
+- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
++ Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+@@ -419,6 +419,84 @@ gnuv3_baseclass_offset (struct type *typ
+ return base_offset;
+ }
+
++/* Return nonzero if a type should be passed by reference.
++
++ The rule in the v3 ABI document comes from section 3.1.1. If the
++ type has a non-trivial copy constructor or destructor, then the
++ caller must make a copy (by calling the copy constructor if there
++ is one or perform the copy itself otherwise), pass the address of
++ the copy, and then destroy the temporary (if necessary).
++
++ For return values with non-trivial copy constructors or
++ destructors, space will be allocated in the caller, and a pointer
++ will be passed as the first argument (preceding "this").
++
++ We don't have a bulletproof mechanism for determining whether a
++ constructor or destructor is trivial. For GCC and DWARF2 debug
++ information, we can check the artificial flag.
++
++ We don't do anything with the constructors or destructors yet,
++ but we have to get the argument passing right anyway. */
++static int
++gnuv3_pass_by_reference (struct type *type)
++{
++ int fieldnum, fieldelem, basenum;
++
++ CHECK_TYPEDEF (type);
++
++ /* We're only interested in things that can have methods. */
++ if (TYPE_CODE (type) != TYPE_CODE_STRUCT
++ && TYPE_CODE (type) != TYPE_CODE_CLASS
++ && TYPE_CODE (type) != TYPE_CODE_UNION)
++ return 0;
++
++ for (fieldnum = 0; fieldnum < TYPE_NFN_FIELDS (type); fieldnum++)
++ for (fieldelem = 0; fieldelem < TYPE_FN_FIELDLIST_LENGTH (type, fieldnum);
++ fieldelem++)
++ {
++ struct fn_field *fn = TYPE_FN_FIELDLIST1 (type, fieldnum);
++ char *name = TYPE_FN_FIELDLIST_NAME (type, fieldnum);
++ struct type *fieldtype = TYPE_FN_FIELD_TYPE (fn, fieldelem);
++
++ /* If this function is marked as artificial, it is compiler-generated,
++ and we assume it is trivial. */
++ if (TYPE_FN_FIELD_ARTIFICIAL (fn, fieldelem))
++ continue;
++
++ /* If we've found a destructor, we must pass this by reference. */
++ if (name[0] == '~')
++ return 1;
++
++ /* If the mangled name of this method doesn't indicate that it
++ is a constructor, we're not interested.
++
++ FIXME drow/2004-05-27: We could do this using the name of
++ the method and the name of the class instead of dealing
++ with the mangled name. We don't have a convenient function
++ to strip off both leading scope qualifiers and trailing
++ template arguments yet. */
++ if (!is_constructor_name (TYPE_FN_FIELD_PHYSNAME (fn, fieldelem)))
++ continue;
++
++ /* If this method takes two arguments, and the second argument is
++ a reference to this class, then it is a copy constructor. */
++ if (TYPE_NFIELDS (fieldtype) == 2
++ && TYPE_CODE (TYPE_FIELD_TYPE (fieldtype, 1)) == TYPE_CODE_REF
++ && check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (fieldtype, 1))) == type)
++ return 1;
++ }
++
++ /* Even if all the constructors and destructors were artificial, one
++ of them may have invoked a non-artificial constructor or
++ destructor in a base class. If any base class needs to be passed
++ by reference, so does this class. */
++ for (basenum = 0; basenum < TYPE_N_BASECLASSES (type); basenum++)
++ if (gnuv3_pass_by_reference (TYPE_BASECLASS (type, basenum)))
++ return 1;
++
++ return 0;
++}
++
+ static void
+ init_gnuv3_ops (void)
+ {
+@@ -434,6 +512,7 @@ init_gnuv3_ops (void)
+ gnu_v3_abi_ops.rtti_type = gnuv3_rtti_type;
+ gnu_v3_abi_ops.virtual_fn_field = gnuv3_virtual_fn_field;
+ gnu_v3_abi_ops.baseclass_offset = gnuv3_baseclass_offset;
++ gnu_v3_abi_ops.pass_by_reference = gnuv3_pass_by_reference;
+ }
+
+ extern initialize_file_ftype _initialize_gnu_v3_abi; /* -Wmissing-prototypes */
+Index: gdb-6.3/gdb/hpacc-abi.c
+===================================================================
+--- gdb-6.3.orig/gdb/hpacc-abi.c 2003-06-08 14:27:13.000000000 -0400
++++ gdb-6.3/gdb/hpacc-abi.c 2004-11-10 12:30:07.000000000 -0500
+@@ -3,7 +3,7 @@
+ Most of the real code is from HP, i've just fiddled it to fit in
+ the C++ ABI abstraction framework.
+
+- Copyright 2001 Free Software Foundation, Inc.
++ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+Index: gdb-6.3/gdb/Makefile.in
+===================================================================
+--- gdb-6.3.orig/gdb/Makefile.in 2004-11-10 12:30:06.000000000 -0500
++++ gdb-6.3/gdb/Makefile.in 2004-11-10 12:30:07.000000000 -0500
+@@ -2073,7 +2073,7 @@ ia64-tdep.o: ia64-tdep.c $(defs_h) $(inf
+ infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \
+ $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \
+ $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) \
+- $(dummy_frame_h)
++ $(dummy_frame_h) $(cp_abi_h)
+ inf-child.o: inf-child.c $(defs_h) $(regcache_h) $(memattr_h) $(symtab_h) \
+ $(target_h) $(inferior_h) $(gdb_string_h)
+ infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
+Index: gdb-6.3/gdb/testsuite/gdb.cp/pass-by-ref.exp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.3/gdb/testsuite/gdb.cp/pass-by-ref.exp 2004-11-11 09:48:00.498518899 -0500
+@@ -0,0 +1,38 @@
++# This testcase is part of GDB, the GNU debugger.
++
++# Copyright 2004 Free Software Foundation, Inc.
++
++# 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 2 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, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++# Check that GDB can call C++ functions whose parameters have
++# object type, but are passed by reference.
++
++set testfile "pass-by-ref"
++set srcfile ${testfile}.cc
++set binfile ${objdir}/${subdir}/${testfile}
++if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
++ return -1
++}
++
++gdb_exit
++gdb_start
++gdb_reinitialize_dir $srcdir/$subdir
++gdb_load ${binfile}
++
++if ![runto_main] then {
++ return -1
++}
++
++gdb_test "print foo (global_obj)" " = 3" "call function"
+Index: gdb-6.3/gdb/testsuite/gdb.cp/pass-by-ref.cc
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gdb-6.3/gdb/testsuite/gdb.cp/pass-by-ref.cc 2004-11-11 09:44:17.815014667 -0500
+@@ -0,0 +1,57 @@
++/* This testcase is part of GDB, the GNU debugger.
++
++ Copyright 2004 Free Software Foundation, Inc.
++
++ 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 2 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, write to the Free Software
++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++ USA. */
++
++class Obj {
++public:
++ Obj ();
++ Obj (const Obj &);
++ ~Obj ();
++ int var[2];
++};
++
++int foo (Obj arg)
++{
++ return arg.var[0] + arg.var[1];
++}
++
++Obj::Obj ()
++{
++ var[0] = 1;
++ var[1] = 2;
++}
++
++Obj::Obj (const Obj &obj)
++{
++ var[0] = obj.var[0];
++ var[1] = obj.var[1];
++}
++
++Obj::~Obj ()
++{
++
++}
++
++Obj global_obj;
++
++int
++main ()
++{
++ int bar = foo (global_obj);
++ return bar;
++}
diff --git a/misc/buildroot/toolchain/gdb/6.3/710-debian_thread-db-multiple-libraries.patch b/misc/buildroot/toolchain/gdb/6.3/710-debian_thread-db-multiple-libraries.patch
new file mode 100644
index 000000000..c164bd11a
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/710-debian_thread-db-multiple-libraries.patch
@@ -0,0 +1,593 @@
+Support loading two libthread_db DSOs. In this case, the LinuxThreads
+and NPTL ones.
+
+Index: gdb-6.3/gdb/thread-db.c
+===================================================================
+--- gdb-6.3.orig/gdb/thread-db.c 2004-11-10 10:46:24.000000000 -0500
++++ gdb-6.3/gdb/thread-db.c 2004-11-10 11:22:34.858812426 -0500
+@@ -79,53 +79,63 @@ static td_thragent_t *thread_agent;
+
+ /* Pointers to the libthread_db functions. */
+
+-static td_err_e (*td_init_p) (void);
++struct thread_db_pointers
++{
++ const char *filename;
++
++ td_err_e (*td_init_p) (void);
+
+-static td_err_e (*td_ta_new_p) (struct ps_prochandle * ps,
+- td_thragent_t **ta);
+-static td_err_e (*td_ta_map_id2thr_p) (const td_thragent_t *ta, thread_t pt,
+- td_thrhandle_t *__th);
+-static td_err_e (*td_ta_map_lwp2thr_p) (const td_thragent_t *ta,
+- lwpid_t lwpid, td_thrhandle_t *th);
+-static td_err_e (*td_ta_thr_iter_p) (const td_thragent_t *ta,
+- td_thr_iter_f *callback, void *cbdata_p,
+- td_thr_state_e state, int ti_pri,
+- sigset_t *ti_sigmask_p,
+- unsigned int ti_user_flags);
+-static td_err_e (*td_ta_event_addr_p) (const td_thragent_t *ta,
+- td_event_e event, td_notify_t *ptr);
+-static td_err_e (*td_ta_set_event_p) (const td_thragent_t *ta,
+- td_thr_events_t *event);
+-static td_err_e (*td_ta_event_getmsg_p) (const td_thragent_t *ta,
+- td_event_msg_t *msg);
+-
+-static td_err_e (*td_thr_validate_p) (const td_thrhandle_t *th);
+-static td_err_e (*td_thr_get_info_p) (const td_thrhandle_t *th,
+- td_thrinfo_t *infop);
+-static td_err_e (*td_thr_getfpregs_p) (const td_thrhandle_t *th,
+- gdb_prfpregset_t *regset);
+-static td_err_e (*td_thr_getgregs_p) (const td_thrhandle_t *th,
+- prgregset_t gregs);
+-static td_err_e (*td_thr_setfpregs_p) (const td_thrhandle_t *th,
+- const gdb_prfpregset_t *fpregs);
+-static td_err_e (*td_thr_setgregs_p) (const td_thrhandle_t *th,
+- prgregset_t gregs);
+-static td_err_e (*td_thr_event_enable_p) (const td_thrhandle_t *th,
+- int event);
+-
+-static td_err_e (*td_thr_tls_get_addr_p) (const td_thrhandle_t *th,
+- void *map_address,
+- size_t offset, void **address);
++ td_err_e (*td_ta_new_p) (struct ps_prochandle * ps,
++ td_thragent_t **ta);
++ td_err_e (*td_ta_map_id2thr_p) (const td_thragent_t *ta, thread_t pt,
++ td_thrhandle_t *__th);
++ td_err_e (*td_ta_map_lwp2thr_p) (const td_thragent_t *ta,
++ lwpid_t lwpid, td_thrhandle_t *th);
++
++ td_err_e (*td_ta_thr_iter_p) (const td_thragent_t *ta,
++ td_thr_iter_f *callback, void *cbdata_p,
++ td_thr_state_e state, int ti_pri,
++ sigset_t *ti_sigmask_p,
++ unsigned int ti_user_flags);
++ td_err_e (*td_ta_event_addr_p) (const td_thragent_t *ta,
++ td_event_e event, td_notify_t *ptr);
++ td_err_e (*td_ta_set_event_p) (const td_thragent_t *ta,
++ td_thr_events_t *event);
++ td_err_e (*td_ta_event_getmsg_p) (const td_thragent_t *ta,
++ td_event_msg_t *msg);
++
++ td_err_e (*td_thr_validate_p) (const td_thrhandle_t *th);
++ td_err_e (*td_thr_get_info_p) (const td_thrhandle_t *th,
++ td_thrinfo_t *infop);
++ td_err_e (*td_thr_getfpregs_p) (const td_thrhandle_t *th,
++ gdb_prfpregset_t *regset);
++ td_err_e (*td_thr_getgregs_p) (const td_thrhandle_t *th,
++ prgregset_t gregs);
++ td_err_e (*td_thr_setfpregs_p) (const td_thrhandle_t *th,
++ const gdb_prfpregset_t *fpregs);
++ td_err_e (*td_thr_setgregs_p) (const td_thrhandle_t *th,
++ prgregset_t gregs);
++ td_err_e (*td_thr_event_enable_p) (const td_thrhandle_t *th,
++ int event);
++
++ td_err_e (*td_thr_tls_get_addr_p) (const td_thrhandle_t *th,
++ void *map_address,
++ size_t offset, void **address);
++
++ struct thread_db_pointers *next;
++};
+
+ /* Location of the thread creation event breakpoint. The code at this
+ location in the child process will be called by the pthread library
+ whenever a new thread is created. By setting a special breakpoint
+ at this location, GDB can detect when a new thread is created. We
+ obtain this location via the td_ta_event_addr call. */
+-static CORE_ADDR td_create_bp_addr;
++CORE_ADDR td_create_bp_addr;
+
+ /* Location of the thread death event breakpoint. */
+-static CORE_ADDR td_death_bp_addr;
++CORE_ADDR td_death_bp_addr;
++
++static struct thread_db_pointers *current_pointers, *all_pointers;
+
+ /* Prototypes for local functions. */
+ static void thread_db_find_new_threads (void);
+@@ -262,7 +272,7 @@ thread_get_info_callback (const td_thrha
+ struct thread_info *thread_info;
+ ptid_t thread_ptid;
+
+- err = td_thr_get_info_p (thp, &ti);
++ err = current_pointers->td_thr_get_info_p (thp, &ti);
+ if (err != TD_OK)
+ error ("thread_get_info_callback: cannot get thread info: %s",
+ thread_db_err_str (err));
+@@ -316,8 +326,9 @@ thread_db_map_id2thr (struct thread_info
+ if (thread_info->private->th_valid)
+ return;
+
+- err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (thread_info->ptid),
+- &thread_info->private->th);
++ err = current_pointers->td_ta_map_id2thr_p (thread_agent,
++ GET_THREAD (thread_info->ptid),
++ &thread_info->private->th);
+ if (err != TD_OK)
+ {
+ if (fatal)
+@@ -340,8 +351,8 @@ thread_db_get_info (struct thread_info *
+ if (!thread_info->private->th_valid)
+ thread_db_map_id2thr (thread_info, 1);
+
+- err =
+- td_thr_get_info_p (&thread_info->private->th, &thread_info->private->ti);
++ err = current_pointers->td_thr_get_info_p (&thread_info->private->th,
++ &thread_info->private->ti);
+ if (err != TD_OK)
+ error ("thread_db_get_info: cannot get thread info: %s",
+ thread_db_err_str (err));
+@@ -365,7 +376,8 @@ thread_from_lwp (ptid_t ptid)
+
+ gdb_assert (is_lwp (ptid));
+
+- err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th);
++ err = current_pointers->td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid),
++ &th);
+ if (err != TD_OK)
+ error ("Cannot find user-level thread for LWP %ld: %s",
+ GET_LWP (ptid), thread_db_err_str (err));
+@@ -420,85 +432,102 @@ verbose_dlsym (void *handle, const char
+ return sym;
+ }
+
+-static int
+-thread_db_load (void)
++static struct thread_db_pointers *
++thread_db_load (const char *name)
+ {
++ struct thread_db_pointers *ptrs;
++ Dl_info info;
+ void *handle;
+ td_err_e err;
+
+- handle = dlopen (LIBTHREAD_DB_SO, RTLD_NOW);
++ ptrs = xcalloc (1, sizeof (struct thread_db_pointers));
++
++ handle = dlopen (name, RTLD_NOW);
+ if (handle == NULL)
+ {
+- fprintf_filtered (gdb_stderr, "\n\ndlopen failed on '%s' - %s\n",
+- LIBTHREAD_DB_SO, dlerror ());
+- fprintf_filtered (gdb_stderr,
+- "GDB will not be able to debug pthreads.\n\n");
++ if (all_pointers == NULL)
++ {
++ fprintf_filtered (gdb_stderr, "\n\ndlopen failed on '%s' - %s\n",
++ name, dlerror ());
++ fprintf_filtered (gdb_stderr,
++ "GDB will not be able to debug pthreads.\n\n");
++ }
+ return 0;
+ }
+
+ /* Initialize pointers to the dynamic library functions we will use.
+ Essential functions first. */
+
+- td_init_p = verbose_dlsym (handle, "td_init");
+- if (td_init_p == NULL)
++ ptrs->td_init_p = verbose_dlsym (handle, "td_init");
++ if (ptrs->td_init_p == NULL)
+ return 0;
+
+- td_ta_new_p = verbose_dlsym (handle, "td_ta_new");
+- if (td_ta_new_p == NULL)
++ ptrs->td_ta_new_p = verbose_dlsym (handle, "td_ta_new");
++ if (ptrs->td_ta_new_p == NULL)
+ return 0;
+
+- td_ta_map_id2thr_p = verbose_dlsym (handle, "td_ta_map_id2thr");
+- if (td_ta_map_id2thr_p == NULL)
++ ptrs->td_ta_map_id2thr_p = verbose_dlsym (handle, "td_ta_map_id2thr");
++ if (ptrs->td_ta_map_id2thr_p == NULL)
+ return 0;
+
+- td_ta_map_lwp2thr_p = verbose_dlsym (handle, "td_ta_map_lwp2thr");
+- if (td_ta_map_lwp2thr_p == NULL)
++ ptrs->td_ta_map_lwp2thr_p = verbose_dlsym (handle, "td_ta_map_lwp2thr");
++ if (ptrs->td_ta_map_lwp2thr_p == NULL)
+ return 0;
+
+- td_ta_thr_iter_p = verbose_dlsym (handle, "td_ta_thr_iter");
+- if (td_ta_thr_iter_p == NULL)
++ ptrs->td_ta_thr_iter_p = verbose_dlsym (handle, "td_ta_thr_iter");
++ if (ptrs->td_ta_thr_iter_p == NULL)
+ return 0;
+
+- td_thr_validate_p = verbose_dlsym (handle, "td_thr_validate");
+- if (td_thr_validate_p == NULL)
++ ptrs->td_thr_validate_p = verbose_dlsym (handle, "td_thr_validate");
++ if (ptrs->td_thr_validate_p == NULL)
+ return 0;
+
+- td_thr_get_info_p = verbose_dlsym (handle, "td_thr_get_info");
+- if (td_thr_get_info_p == NULL)
++ ptrs->td_thr_get_info_p = verbose_dlsym (handle, "td_thr_get_info");
++ if (ptrs->td_thr_get_info_p == NULL)
+ return 0;
+
+- td_thr_getfpregs_p = verbose_dlsym (handle, "td_thr_getfpregs");
+- if (td_thr_getfpregs_p == NULL)
++ ptrs->td_thr_getfpregs_p = verbose_dlsym (handle, "td_thr_getfpregs");
++ if (ptrs->td_thr_getfpregs_p == NULL)
+ return 0;
+
+- td_thr_getgregs_p = verbose_dlsym (handle, "td_thr_getgregs");
+- if (td_thr_getgregs_p == NULL)
++ ptrs->td_thr_getgregs_p = verbose_dlsym (handle, "td_thr_getgregs");
++ if (ptrs->td_thr_getgregs_p == NULL)
+ return 0;
+
+- td_thr_setfpregs_p = verbose_dlsym (handle, "td_thr_setfpregs");
+- if (td_thr_setfpregs_p == NULL)
++ ptrs->td_thr_setfpregs_p = verbose_dlsym (handle, "td_thr_setfpregs");
++ if (ptrs->td_thr_setfpregs_p == NULL)
+ return 0;
+
+- td_thr_setgregs_p = verbose_dlsym (handle, "td_thr_setgregs");
+- if (td_thr_setgregs_p == NULL)
++ ptrs->td_thr_setgregs_p = verbose_dlsym (handle, "td_thr_setgregs");
++ if (ptrs->td_thr_setgregs_p == NULL)
+ return 0;
+
+ /* Initialize the library. */
+- err = td_init_p ();
++ err = ptrs->td_init_p ();
+ if (err != TD_OK)
+ {
+ warning ("Cannot initialize libthread_db: %s", thread_db_err_str (err));
++ xfree (ptrs);
+ return 0;
+ }
+
+ /* These are not essential. */
+- td_ta_event_addr_p = dlsym (handle, "td_ta_event_addr");
+- td_ta_set_event_p = dlsym (handle, "td_ta_set_event");
+- td_ta_event_getmsg_p = dlsym (handle, "td_ta_event_getmsg");
+- td_thr_event_enable_p = dlsym (handle, "td_thr_event_enable");
+- td_thr_tls_get_addr_p = dlsym (handle, "td_thr_tls_get_addr");
++ ptrs->td_ta_event_addr_p = dlsym (handle, "td_ta_event_addr");
++ ptrs->td_ta_set_event_p = dlsym (handle, "td_ta_set_event");
++ ptrs->td_ta_event_getmsg_p = dlsym (handle, "td_ta_event_getmsg");
++ ptrs->td_thr_event_enable_p = dlsym (handle, "td_thr_event_enable");
++ ptrs->td_thr_tls_get_addr_p = dlsym (handle, "td_thr_tls_get_addr");
++
++ if (dladdr (ptrs->td_ta_new_p, &info) != 0)
++ ptrs->filename = info.dli_fname;
++
++ /* Try dlinfo? */
++
++ if (ptrs->filename == NULL)
++ /* Paranoid - don't let a NULL path slip through. */
++ ptrs->filename = name;
+
+- return 1;
++ return ptrs;
+ }
+
+ static td_err_e
+@@ -508,7 +537,7 @@ enable_thread_event (td_thragent_t *thre
+ td_err_e err;
+
+ /* Get the breakpoint address for thread EVENT. */
+- err = td_ta_event_addr_p (thread_agent, event, &notify);
++ err = current_pointers->td_ta_event_addr_p (thread_agent, event, &notify);
+ if (err != TD_OK)
+ return err;
+
+@@ -534,8 +563,10 @@ enable_thread_event_reporting (void)
+
+ /* We cannot use the thread event reporting facility if these
+ functions aren't available. */
+- if (td_ta_event_addr_p == NULL || td_ta_set_event_p == NULL
+- || td_ta_event_getmsg_p == NULL || td_thr_event_enable_p == NULL)
++ if (current_pointers->td_ta_event_addr_p == NULL
++ || current_pointers->td_ta_set_event_p == NULL
++ || current_pointers->td_ta_event_getmsg_p == NULL
++ || current_pointers->td_thr_event_enable_p == NULL)
+ return;
+
+ /* Set the process wide mask saying which events we're interested in. */
+@@ -552,7 +583,7 @@ enable_thread_event_reporting (void)
+ #endif
+ td_event_addset (&events, TD_DEATH);
+
+- err = td_ta_set_event_p (thread_agent, &events);
++ err = current_pointers->td_ta_set_event_p (thread_agent, &events);
+ if (err != TD_OK)
+ {
+ warning ("Unable to set global thread event mask: %s",
+@@ -592,7 +623,7 @@ disable_thread_event_reporting (void)
+ /* Set the process wide mask saying we aren't interested in any
+ events anymore. */
+ td_event_emptyset (&events);
+- td_ta_set_event_p (thread_agent, &events);
++ current_pointers->td_ta_set_event_p (thread_agent, &events);
+
+ /* Delete thread event breakpoints, if any. */
+ remove_thread_event_breakpoints ();
+@@ -635,7 +666,6 @@ check_thread_signals (void)
+ static void
+ check_for_thread_db (void)
+ {
+- td_err_e err;
+ static int already_loaded;
+
+ /* First time through, report that libthread_db was successfuly
+@@ -644,19 +674,8 @@ check_for_thread_db (void)
+
+ if (!already_loaded)
+ {
+- Dl_info info;
+- const char *library = NULL;
+- if (dladdr ((*td_ta_new_p), &info) != 0)
+- library = info.dli_fname;
+-
+- /* Try dlinfo? */
+-
+- if (library == NULL)
+- /* Paranoid - don't let a NULL path slip through. */
+- library = LIBTHREAD_DB_SO;
+-
+ printf_unfiltered ("Using host libthread_db library \"%s\".\n",
+- library);
++ all_pointers->filename);
+ already_loaded = 1;
+ }
+
+@@ -674,28 +693,34 @@ check_for_thread_db (void)
+ proc_handle.pid = GET_PID (inferior_ptid);
+
+ /* Now attempt to open a connection to the thread library. */
+- err = td_ta_new_p (&proc_handle, &thread_agent);
+- switch (err)
++ for (current_pointers = all_pointers;
++ current_pointers != NULL;
++ current_pointers = current_pointers->next)
+ {
+- case TD_NOLIBTHREAD:
+- /* No thread library was detected. */
+- break;
+-
+- case TD_OK:
+- printf_unfiltered ("[Thread debugging using libthread_db enabled]\n");
++ td_err_e err;
++ err = current_pointers->td_ta_new_p (&proc_handle, &thread_agent);
++ switch (err)
++ {
++ case TD_NOLIBTHREAD:
++ /* No thread library was detected. */
++ break;
+
+- /* The thread library was detected. Activate the thread_db target. */
+- push_target (&thread_db_ops);
+- using_thread_db = 1;
++ case TD_OK:
++ printf_unfiltered ("[Thread debugging using libthread_db enabled]\n");
+
+- enable_thread_event_reporting ();
+- thread_db_find_new_threads ();
+- break;
++ /* The thread library was detected. Activate the thread_db target. */
++ push_target (&thread_db_ops);
++ using_thread_db = 1;
++
++ enable_thread_event_reporting ();
++ thread_db_find_new_threads ();
++ return;
+
+- default:
+- warning ("Cannot initialize thread debugging library: %s",
+- thread_db_err_str (err));
+- break;
++ default:
++ warning ("Cannot initialize thread debugging library: %s",
++ thread_db_err_str (err));
++ break;
++ }
+ }
+ }
+
+@@ -766,7 +791,7 @@ attach_thread (ptid_t ptid, const td_thr
+ #endif
+
+ /* Enable thread event reporting for this thread. */
+- err = td_thr_event_enable_p (th_p, 1);
++ err = current_pointers->td_thr_event_enable_p (th_p, 1);
+ if (err != TD_OK)
+ error ("Cannot enable thread event reporting for %s: %s",
+ target_pid_to_str (ptid), thread_db_err_str (err));
+@@ -892,7 +917,7 @@ check_event (ptid_t ptid)
+
+ do
+ {
+- err = td_ta_event_getmsg_p (thread_agent, &msg);
++ err = current_pointers->td_ta_event_getmsg_p (thread_agent, &msg);
+ if (err != TD_OK)
+ {
+ if (err == TD_NOMSG)
+@@ -902,7 +927,7 @@ check_event (ptid_t ptid)
+ thread_db_err_str (err));
+ }
+
+- err = td_thr_get_info_p (msg.th_p, &ti);
++ err = current_pointers->td_thr_get_info_p (msg.th_p, &ti);
+ if (err != TD_OK)
+ error ("Cannot get thread info: %s", thread_db_err_str (err));
+
+@@ -1015,12 +1040,14 @@ thread_db_fetch_registers (int regno)
+ thread_info = find_thread_pid (inferior_ptid);
+ thread_db_map_id2thr (thread_info, 1);
+
+- err = td_thr_getgregs_p (&thread_info->private->th, gregset);
++ err = current_pointers->td_thr_getgregs_p (&thread_info->private->th,
++ gregset);
+ if (err != TD_OK)
+ error ("Cannot fetch general-purpose registers for thread %ld: %s",
+ (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+
+- err = td_thr_getfpregs_p (&thread_info->private->th, &fpregset);
++ err = current_pointers->td_thr_getfpregs_p (&thread_info->private->th,
++ &fpregset);
+ if (err != TD_OK)
+ error ("Cannot get floating-point registers for thread %ld: %s",
+ (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+@@ -1062,11 +1089,13 @@ thread_db_store_registers (int regno)
+ fill_gregset ((gdb_gregset_t *) gregset, -1);
+ fill_fpregset (&fpregset, -1);
+
+- err = td_thr_setgregs_p (&thread_info->private->th, gregset);
++ err = current_pointers->td_thr_setgregs_p (&thread_info->private->th,
++ gregset);
+ if (err != TD_OK)
+ error ("Cannot store general-purpose registers for thread %ld: %s",
+ (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+- err = td_thr_setfpregs_p (&thread_info->private->th, &fpregset);
++ err = current_pointers->td_thr_setfpregs_p (&thread_info->private->th,
++ &fpregset);
+ if (err != TD_OK)
+ error ("Cannot store floating-point registers for thread %ld: %s",
+ (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
+@@ -1136,15 +1165,14 @@ thread_db_thread_alive (ptid_t ptid)
+ if (!thread_info->private->th_valid)
+ return 0;
+
+- err = td_thr_validate_p (&thread_info->private->th);
++ err = current_pointers->td_thr_validate_p (&thread_info->private->th);
+ if (err != TD_OK)
+ return 0;
+
+ if (!thread_info->private->ti_valid)
+ {
+- err =
+- td_thr_get_info_p (&thread_info->private->th,
+- &thread_info->private->ti);
++ err = current_pointers->td_thr_get_info_p
++ (&thread_info->private->th, &thread_info->private->ti);
+ if (err != TD_OK)
+ return 0;
+ thread_info->private->ti_valid = 1;
+@@ -1170,7 +1198,7 @@ find_new_threads_callback (const td_thrh
+ td_err_e err;
+ ptid_t ptid;
+
+- err = td_thr_get_info_p (th_p, &ti);
++ err = current_pointers->td_thr_get_info_p (th_p, &ti);
+ if (err != TD_OK)
+ error ("find_new_threads_callback: cannot get thread info: %s",
+ thread_db_err_str (err));
+@@ -1192,9 +1220,10 @@ thread_db_find_new_threads (void)
+ td_err_e err;
+
+ /* Iterate over all user-space threads to discover new threads. */
+- err = td_ta_thr_iter_p (thread_agent, find_new_threads_callback, NULL,
+- TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
+- TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
++ err = current_pointers->td_ta_thr_iter_p
++ (thread_agent, find_new_threads_callback, NULL,
++ TD_THR_ANY_STATE, TD_THR_LOWEST_PRIORITY,
++ TD_SIGNO_MASK, TD_THR_ANY_USER_FLAGS);
+ if (err != TD_OK)
+ error ("Cannot find new threads: %s", thread_db_err_str (err));
+ }
+@@ -1257,7 +1286,7 @@ thread_db_get_thread_local_address (ptid
+ struct thread_info *thread_info;
+
+ /* glibc doesn't provide the needed interface. */
+- if (!td_thr_tls_get_addr_p)
++ if (!current_pointers->td_thr_tls_get_addr_p)
+ error ("Cannot find thread-local variables in this thread library.");
+
+ /* Get the address of the link map for this objfile. */
+@@ -1279,8 +1308,8 @@ thread_db_get_thread_local_address (ptid
+ thread_db_map_id2thr (thread_info, 1);
+
+ /* Finally, get the address of the variable. */
+- err = td_thr_tls_get_addr_p (&thread_info->private->th, (void *) lm,
+- offset, &address);
++ err = current_pointers->td_thr_tls_get_addr_p
++ (&thread_info->private->th, (void *) lm, offset, &address);
+
+ #ifdef THREAD_DB_HAS_TD_NOTALLOC
+ /* The memory hasn't been allocated, yet. */
+@@ -1360,17 +1389,49 @@ init_thread_db_ops (void)
+ void
+ _initialize_thread_db (void)
+ {
++ struct thread_db_pointers *ptrs;
++ const char *p;
++
+ /* Only initialize the module if we can load libthread_db. */
+- if (thread_db_load ())
+- {
+- init_thread_db_ops ();
+- add_target (&thread_db_ops);
++ ptrs = thread_db_load (LIBTHREAD_DB_SO);
++ if (ptrs == NULL)
++ return;
++
++ all_pointers = ptrs;
+
+- /* Add ourselves to objfile event chain. */
+- target_new_objfile_chain = deprecated_target_new_objfile_hook;
+- deprecated_target_new_objfile_hook = thread_db_new_objfile;
++ /* Some GNU/Linux systems have more than one binary-compatible copy
++ of libthread_db. If we can find a second one, load that too.
++ The inferior may force the use of a different threading package
++ than we expect. Our guess for the location is somewhat hokey:
++ strip out anything between /lib (or /lib64) and LIBTHREAD_DB_SO.
++ If we loaded the NPTL libthread_db by default, this may find us
++ the LinuxThreads copy. */
++ p = strrchr (ptrs->filename, '/');
++ while (p != NULL && p > ptrs->filename)
++ {
++ const char *component;
+
+- /* Register ourselves for the new inferior observer. */
+- observer_attach_inferior_created (check_for_thread_db_observer);
++ component = memrchr (ptrs->filename, '/', p - ptrs->filename);
++ if (component != NULL && strncmp (component, "/lib", 4) == 0)
++ {
++ char *new_name = xmalloc (p - ptrs->filename + 2
++ + strlen (LIBTHREAD_DB_SO));
++ memcpy (new_name, ptrs->filename, p - ptrs->filename + 1);
++ strcpy (new_name + (p - ptrs->filename) + 1, LIBTHREAD_DB_SO);
++ ptrs->next = thread_db_load (new_name);
++ xfree (new_name);
++ break;
++ }
++ p = component;
+ }
++
++ init_thread_db_ops ();
++ add_target (&thread_db_ops);
++
++ /* Add ourselves to objfile event chain. */
++ target_new_objfile_chain = deprecated_target_new_objfile_hook;
++ deprecated_target_new_objfile_hook = thread_db_new_objfile;
++
++ /* Register ourselves for the new inferior observer. */
++ observer_attach_inferior_created (check_for_thread_db_observer);
+ }
diff --git a/misc/buildroot/toolchain/gdb/6.3/720-debian_static-threads-test.patch b/misc/buildroot/toolchain/gdb/6.3/720-debian_static-threads-test.patch
new file mode 100644
index 000000000..448c9b1d7
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/720-debian_static-threads-test.patch
@@ -0,0 +1,36 @@
+Update staticthreads.exp to handle debugging info in libpthread.a.
+
+Index: gdb-6.3/gdb/testsuite/gdb.threads/staticthreads.exp
+===================================================================
+--- gdb-6.3.orig/gdb/testsuite/gdb.threads/staticthreads.exp 2004-11-10 10:35:15.000000000 -0500
++++ gdb-6.3/gdb/testsuite/gdb.threads/staticthreads.exp 2004-11-10 11:22:48.671121466 -0500
+@@ -53,6 +53,10 @@ gdb_test_multiple "continue" "$test" {
+ -re " sem_post .*$gdb_prompt " {
+ pass "$test"
+ }
++ -re " (.*_)sem_post .*$gdb_prompt " {
++ # Glibc uses aliases for internal symbols; match __new_sem_post.
++ pass "$test"
++ }
+ -re "Program received signal .*$gdb_prompt " {
+ kfail gdb/1328 "$test"
+ }
+@@ -64,8 +68,16 @@ gdb_test_multiple "continue" "$test" {
+
+ rerun_to_main
+ gdb_test "handle SIG32 nostop noprint pass"
+-set test "Handle SIG32 helps"
+-gdb_test "continue" " sem_post .*" "handle SIG32 helps"
++set test "handle SIG32 helps"
++gdb_test_multiple "continue" "$test" {
++ -re " sem_post .*$gdb_prompt $" {
++ pass "$test"
++ }
++ -re " (.*_)sem_post .*$gdb_prompt $" {
++ # Glibc uses aliases for internal symbols; match __new_sem_post.
++ pass "$test"
++ }
++}
+
+
+ # See if info threads produces anything approaching a thread list.
diff --git a/misc/buildroot/toolchain/gdb/6.3/730-debian_gdb-fix-tracefork-check.patch b/misc/buildroot/toolchain/gdb/6.3/730-debian_gdb-fix-tracefork-check.patch
new file mode 100644
index 000000000..9890d80c3
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/730-debian_gdb-fix-tracefork-check.patch
@@ -0,0 +1,225 @@
+Status: submitted for comments
+
+2004-11-12 Daniel Jacobowitz <dan@debian.org>
+
+ * linux-nat.c (my_waitpid): New function.
+ (linux_test_for_tracefork): Make more robust and verbose. Take
+ an ORIGINAL_PID argument and test for PTRACE_SETOPTIONS first.
+ (linux_supports_tracefork, linux_supports_tracevforkdone): Take a PID
+ argument. Update calls to linux_test_for_tracefork.
+ (linux_enable_event_reporting, child_follow_fork)
+ (child_insert_fork_catchpoint, child_insert_vfork_catchpoint)
+ (child_insert_exec_catchpoint): Update calls to
+ linux_supports_tracefork and linux_supports_tracevforkdone.
+
+Index: gdb-6.3/gdb/linux-nat.c
+===================================================================
+--- gdb-6.3.orig/gdb/linux-nat.c 2004-10-08 16:29:47.000000000 -0400
++++ gdb-6.3/gdb/linux-nat.c 2004-11-13 16:41:51.368720845 -0500
+@@ -150,18 +150,47 @@ linux_tracefork_child (void)
+ exit (0);
+ }
+
+-/* Determine if PTRACE_O_TRACEFORK can be used to follow fork events. We
++/* Wrapper function for waitpid which handles EINTR. */
++
++static int
++my_waitpid (int pid, int *status, int flags)
++{
++ int ret;
++ do
++ {
++ ret = waitpid (pid, status, flags);
++ }
++ while (ret == -1 && errno == EINTR);
++
++ return ret;
++}
++
++/* Determine if PTRACE_O_TRACEFORK can be used to follow fork events.
++
++ First, we try to enable fork tracing on ORIGINAL_PID. If this fails,
++ we know that the feature is not available. This may change the tracing
++ options for ORIGINAL_PID, but we'll be setting them shortly anyway.
++
++ However, if it succeeds, we don't know for sure that the feature is
++ available; old versions of PTRACE_SETOPTIONS ignored unknown options. We
+ create a child process, attach to it, use PTRACE_SETOPTIONS to enable
+- fork tracing, and let it fork. If the process exits, we assume that
+- we can't use TRACEFORK; if we get the fork notification, and we can
+- extract the new child's PID, then we assume that we can. */
++ fork tracing, and let it fork. If the process exits, we assume that we
++ can't use TRACEFORK; if we get the fork notification, and we can extract
++ the new child's PID, then we assume that we can. */
+
+ static void
+-linux_test_for_tracefork (void)
++linux_test_for_tracefork (int original_pid)
+ {
+ int child_pid, ret, status;
+ long second_pid;
+
++ linux_supports_tracefork_flag = 0;
++ linux_supports_tracevforkdone_flag = 0;
++
++ ret = ptrace (PTRACE_SETOPTIONS, original_pid, 0, PTRACE_O_TRACEFORK);
++ if (ret != 0)
++ return;
++
+ child_pid = fork ();
+ if (child_pid == -1)
+ perror_with_name ("linux_test_for_tracefork: fork");
+@@ -169,7 +198,7 @@ linux_test_for_tracefork (void)
+ if (child_pid == 0)
+ linux_tracefork_child ();
+
+- ret = waitpid (child_pid, &status, 0);
++ ret = my_waitpid (child_pid, &status, 0);
+ if (ret == -1)
+ perror_with_name ("linux_test_for_tracefork: waitpid");
+ else if (ret != child_pid)
+@@ -177,13 +206,23 @@ linux_test_for_tracefork (void)
+ if (! WIFSTOPPED (status))
+ error ("linux_test_for_tracefork: waitpid: unexpected status %d.", status);
+
+- linux_supports_tracefork_flag = 0;
+-
+ ret = ptrace (PTRACE_SETOPTIONS, child_pid, 0, PTRACE_O_TRACEFORK);
+ if (ret != 0)
+ {
+- ptrace (PTRACE_KILL, child_pid, 0, 0);
+- waitpid (child_pid, &status, 0);
++ ret = ptrace (PTRACE_KILL, child_pid, 0, 0);
++ if (ret != 0)
++ {
++ warning ("linux_test_for_tracefork: failed to kill child");
++ return;
++ }
++
++ ret = my_waitpid (child_pid, &status, 0);
++ if (ret != child_pid)
++ warning ("linux_test_for_tracefork: failed to wait for killed child");
++ else if (!WIFSIGNALED (status))
++ warning ("linux_test_for_tracefork: unexpected wait status 0x%x from "
++ "killed child", status);
++
+ return;
+ }
+
+@@ -192,8 +231,12 @@ linux_test_for_tracefork (void)
+ PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORKDONE);
+ linux_supports_tracevforkdone_flag = (ret == 0);
+
+- ptrace (PTRACE_CONT, child_pid, 0, 0);
+- ret = waitpid (child_pid, &status, 0);
++ ret = ptrace (PTRACE_CONT, child_pid, 0, 0);
++ if (ret != 0)
++ warning ("linux_test_for_tracefork: failed to resume child");
++
++ ret = my_waitpid (child_pid, &status, 0);
++
+ if (ret == child_pid && WIFSTOPPED (status)
+ && status >> 16 == PTRACE_EVENT_FORK)
+ {
+@@ -204,34 +247,38 @@ linux_test_for_tracefork (void)
+ int second_status;
+
+ linux_supports_tracefork_flag = 1;
+- waitpid (second_pid, &second_status, 0);
+- ptrace (PTRACE_DETACH, second_pid, 0, 0);
++ my_waitpid (second_pid, &second_status, 0);
++ ret = ptrace (PTRACE_KILL, second_pid, 0, 0);
++ if (ret != 0)
++ warning ("linux_test_for_tracefork: failed to kill second child");
+ }
+ }
++ else
++ warning ("linux_test_for_tracefork: unexpected result from waitpid "
++ "(%d, status 0x%x)", ret, status);
+
+- if (WIFSTOPPED (status))
+- {
+- ptrace (PTRACE_DETACH, child_pid, 0, 0);
+- waitpid (child_pid, &status, 0);
+- }
++ ret = ptrace (PTRACE_KILL, child_pid, 0, 0);
++ if (ret != 0)
++ warning ("linux_test_for_tracefork: failed to kill child");
++ my_waitpid (child_pid, &status, 0);
+ }
+
+ /* Return non-zero iff we have tracefork functionality available.
+ This function also sets linux_supports_tracefork_flag. */
+
+ static int
+-linux_supports_tracefork (void)
++linux_supports_tracefork (int pid)
+ {
+ if (linux_supports_tracefork_flag == -1)
+- linux_test_for_tracefork ();
++ linux_test_for_tracefork (pid);
+ return linux_supports_tracefork_flag;
+ }
+
+ static int
+-linux_supports_tracevforkdone (void)
++linux_supports_tracevforkdone (int pid)
+ {
+ if (linux_supports_tracefork_flag == -1)
+- linux_test_for_tracefork ();
++ linux_test_for_tracefork (pid);
+ return linux_supports_tracevforkdone_flag;
+ }
+
+@@ -242,12 +289,12 @@ linux_enable_event_reporting (ptid_t pti
+ int pid = ptid_get_pid (ptid);
+ int options;
+
+- if (! linux_supports_tracefork ())
++ if (! linux_supports_tracefork (pid))
+ return;
+
+ options = PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK | PTRACE_O_TRACEEXEC
+ | PTRACE_O_TRACECLONE;
+- if (linux_supports_tracevforkdone ())
++ if (linux_supports_tracevforkdone (pid))
+ options |= PTRACE_O_TRACEVFORKDONE;
+
+ /* Do not enable PTRACE_O_TRACEEXIT until GDB is more prepared to support
+@@ -308,7 +355,8 @@ child_follow_fork (int follow_child)
+
+ if (has_vforked)
+ {
+- if (linux_supports_tracevforkdone ())
++ gdb_assert (linux_supports_tracefork_flag >= 0);
++ if (linux_supports_tracevforkdone (0))
+ {
+ int status;
+
+@@ -476,7 +524,7 @@ linux_handle_extended_wait (int pid, int
+ int
+ child_insert_fork_catchpoint (int pid)
+ {
+- if (! linux_supports_tracefork ())
++ if (! linux_supports_tracefork (pid))
+ error ("Your system does not support fork catchpoints.");
+
+ return 0;
+@@ -485,7 +533,7 @@ child_insert_fork_catchpoint (int pid)
+ int
+ child_insert_vfork_catchpoint (int pid)
+ {
+- if (!linux_supports_tracefork ())
++ if (!linux_supports_tracefork (pid))
+ error ("Your system does not support vfork catchpoints.");
+
+ return 0;
+@@ -494,7 +542,7 @@ child_insert_vfork_catchpoint (int pid)
+ int
+ child_insert_exec_catchpoint (int pid)
+ {
+- if (!linux_supports_tracefork ())
++ if (!linux_supports_tracefork (pid))
+ error ("Your system does not support exec catchpoints.");
+
+ return 0;
diff --git a/misc/buildroot/toolchain/gdb/6.3/740-debian_make-cv-type-crash.patch b/misc/buildroot/toolchain/gdb/6.3/740-debian_make-cv-type-crash.patch
new file mode 100644
index 000000000..4e0b8cd72
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/740-debian_make-cv-type-crash.patch
@@ -0,0 +1,132 @@
+2004-11-04 Jim Blandy <jimb@redhat.com>
+
+ * gdbtypes.c (make_qualified_type): Doc fix. Add assertion to
+ prevent cross-objfile references.
+ (make_cv_type): Doc fix. Don't create cross-objfile references,
+ even for stub types.
+ (replace_type): Add assertion to prevent cross-objfile references.
+ (check_typedef): Never resolve a stub type by copying over a type
+ from another file.
+
+Index: src/gdb/gdbtypes.c
+===================================================================
+RCS file: /big/fsf/rsync/src-cvs/src/gdb/gdbtypes.c,v
+retrieving revision 1.92
+retrieving revision 1.93
+diff -u -p -r1.92 -r1.93
+--- src/gdb/gdbtypes.c 8 Aug 2004 17:18:16 -0000 1.92
++++ src/gdb/gdbtypes.c 4 Nov 2004 17:50:16 -0000 1.93
+@@ -433,7 +433,9 @@ address_space_int_to_name (int space_fla
+ }
+
+ /* Create a new type with instance flags NEW_FLAGS, based on TYPE.
+- If STORAGE is non-NULL, create the new type instance there. */
++
++ If STORAGE is non-NULL, create the new type instance there.
++ STORAGE must be in the same obstack as TYPE. */
+
+ static struct type *
+ make_qualified_type (struct type *type, int new_flags,
+@@ -453,6 +455,12 @@ make_qualified_type (struct type *type,
+ ntype = alloc_type_instance (type);
+ else
+ {
++ /* If STORAGE was provided, it had better be in the same objfile as
++ TYPE. Otherwise, we can't link it into TYPE's cv chain: if one
++ objfile is freed and the other kept, we'd have dangling
++ pointers. */
++ gdb_assert (TYPE_OBJFILE (type) == TYPE_OBJFILE (storage));
++
+ ntype = storage;
+ TYPE_MAIN_TYPE (ntype) = TYPE_MAIN_TYPE (type);
+ TYPE_CHAIN (ntype) = ntype;
+@@ -501,11 +509,12 @@ make_type_with_address_space (struct typ
+ CNST is a flag for setting the const attribute
+ VOLTL is a flag for setting the volatile attribute
+ TYPE is the base type whose variant we are creating.
+- TYPEPTR, if nonzero, points
+- to a pointer to memory where the reference type should be stored.
+- If *TYPEPTR is zero, update it to point to the reference type we return.
+- We allocate new memory if needed. */
+
++ If TYPEPTR and *TYPEPTR are non-zero, then *TYPEPTR points to
++ storage to hold the new qualified type; *TYPEPTR and TYPE must be
++ in the same objfile. Otherwise, allocate fresh memory for the new
++ type whereever TYPE lives. If TYPEPTR is non-zero, set it to the
++ new type we construct. */
+ struct type *
+ make_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
+ {
+@@ -524,20 +533,19 @@ make_cv_type (int cnst, int voltl, struc
+
+ if (typeptr && *typeptr != NULL)
+ {
+- /* Objfile is per-core-type. This const-qualified type had best
+- belong to the same objfile as the type it is qualifying, unless
+- we are overwriting a stub type, in which case the safest thing
+- to do is to copy the core type into the new objfile. */
+-
+- gdb_assert (TYPE_OBJFILE (*typeptr) == TYPE_OBJFILE (type)
+- || TYPE_STUB (*typeptr));
+- if (TYPE_OBJFILE (*typeptr) != TYPE_OBJFILE (type))
+- {
+- TYPE_MAIN_TYPE (*typeptr)
+- = TYPE_ALLOC (*typeptr, sizeof (struct main_type));
+- *TYPE_MAIN_TYPE (*typeptr)
+- = *TYPE_MAIN_TYPE (type);
+- }
++ /* TYPE and *TYPEPTR must be in the same objfile. We can't have
++ a C-V variant chain that threads across objfiles: if one
++ objfile gets freed, then the other has a broken C-V chain.
++
++ This code used to try to copy over the main type from TYPE to
++ *TYPEPTR if they were in different objfiles, but that's
++ wrong, too: TYPE may have a field list or member function
++ lists, which refer to types of their own, etc. etc. The
++ whole shebang would need to be copied over recursively; you
++ can't have inter-objfile pointers. The only thing to do is
++ to leave stub types as stub types, and look them up afresh by
++ name each time you encounter them. */
++ gdb_assert (TYPE_OBJFILE (*typeptr) == TYPE_OBJFILE (type));
+ }
+
+ ntype = make_qualified_type (type, new_flags, typeptr ? *typeptr : NULL);
+@@ -562,6 +570,12 @@ replace_type (struct type *ntype, struct
+ {
+ struct type *chain;
+
++ /* These two types had better be in the same objfile. Otherwise,
++ the assignment of one type's main type structure to the other
++ will produce a type with references to objects (names; field
++ lists; etc.) allocated on an objfile other than its own. */
++ gdb_assert (TYPE_OBJFILE (ntype) == TYPE_OBJFILE (ntype));
++
+ *TYPE_MAIN_TYPE (ntype) = *TYPE_MAIN_TYPE (type);
+
+ /* The type length is not a part of the main type. Update it for each
+@@ -1416,8 +1430,24 @@ check_typedef (struct type *type)
+ return type;
+ }
+ newtype = lookup_transparent_type (name);
++
+ if (newtype)
+- make_cv_type (is_const, is_volatile, newtype, &type);
++ {
++ /* If the resolved type and the stub are in the same objfile,
++ then replace the stub type with the real deal. But if
++ they're in separate objfiles, leave the stub alone; we'll
++ just look up the transparent type every time we call
++ check_typedef. We can't create pointers between types
++ allocated to different objfiles, since they may have
++ different lifetimes. Trying to copy NEWTYPE over to TYPE's
++ objfile is pointless, too, since you'll have to move over any
++ other types NEWTYPE refers to, which could be an unbounded
++ amount of stuff. */
++ if (TYPE_OBJFILE (newtype) == TYPE_OBJFILE (type))
++ make_cv_type (is_const, is_volatile, newtype, &type);
++ else
++ type = newtype;
++ }
+ }
+ /* Otherwise, rely on the stub flag being set for opaque/stubbed types */
+ else if (TYPE_STUB (type) && !currently_reading_symtab)
diff --git a/misc/buildroot/toolchain/gdb/6.3/750-debian_sparc-singlestep.patch b/misc/buildroot/toolchain/gdb/6.3/750-debian_sparc-singlestep.patch
new file mode 100644
index 000000000..904883c2f
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/750-debian_sparc-singlestep.patch
@@ -0,0 +1,37 @@
+Status: submitted for comments
+
+2004-11-13 Daniel Jacobowitz <dan@debian.org>
+
+ * sparc-tdep.c (sparc_software_single_step): Handle stepping to NULL.
+
+Index: gdb-6.3/gdb/sparc-tdep.c
+===================================================================
+--- gdb-6.3.orig/gdb/sparc-tdep.c 2004-06-06 22:02:55.000000000 -0400
++++ gdb-6.3/gdb/sparc-tdep.c 2004-11-13 17:06:05.000000000 -0500
+@@ -1026,10 +1026,10 @@
+
+ if (insert_breakpoints_p)
+ {
+- CORE_ADDR pc;
++ CORE_ADDR pc, orig_npc;
+
+ pc = sparc_address_from_register (tdep->pc_regnum);
+- npc = sparc_address_from_register (tdep->npc_regnum);
++ orig_npc = npc = sparc_address_from_register (tdep->npc_regnum);
+
+ /* Analyze the instruction at PC. */
+ nnpc = sparc_analyze_control_transfer (pc, &npc);
+@@ -1039,9 +1039,10 @@
+ target_insert_breakpoint (nnpc, nnpc_save);
+
+ /* Assert that we have set at least one breakpoint, and that
+- they're not set at the same spot. */
+- gdb_assert (npc != 0 || nnpc != 0);
+- gdb_assert (nnpc != npc);
++ they're not set at the same spot - unless we're going
++ from here straight to NULL, i.e. a call or jump to 0. */
++ gdb_assert (npc != 0 || nnpc != 0 || orig_npc == 0);
++ gdb_assert (nnpc != npc || orig_npc == 0);
+ }
+ else
+ {
diff --git a/misc/buildroot/toolchain/gdb/6.3/760-debian_vsyscall-bfd-close-result.patch b/misc/buildroot/toolchain/gdb/6.3/760-debian_vsyscall-bfd-close-result.patch
new file mode 100644
index 000000000..56002bed0
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/760-debian_vsyscall-bfd-close-result.patch
@@ -0,0 +1,20 @@
+2004-10-24 Daniel Jacobowitz <dan@debian.org>
+
+ * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
+
+Index: src/bfd/opncls.c
+===================================================================
+RCS file: /big/fsf/rsync/src-cvs/src/bfd/opncls.c,v
+retrieving revision 1.25
+diff -u -p -r1.25 opncls.c
+--- src/bfd/opncls.c 10 Oct 2004 13:58:05 -0000 1.25
++++ src/bfd/opncls.c 24 Oct 2004 17:52:53 -0000
+@@ -598,7 +598,7 @@ bfd_close (bfd *abfd)
+ if (!(abfd->flags & BFD_IN_MEMORY))
+ ret = abfd->iovec->bclose (abfd);
+ else
+- ret = 0;
++ ret = TRUE;
+
+ /* If the file was open for writing and is now executable,
+ make it so. */
diff --git a/misc/buildroot/toolchain/gdb/6.3/770-debian_vfork-done-spelling.patch b/misc/buildroot/toolchain/gdb/6.3/770-debian_vfork-done-spelling.patch
new file mode 100644
index 000000000..f65db8d09
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/770-debian_vfork-done-spelling.patch
@@ -0,0 +1,31 @@
+Index: gdb-6.3/gdb/linux-nat.c
+===================================================================
+--- gdb-6.3.orig/gdb/linux-nat.c 2004-11-14 00:36:41.000000000 -0500
++++ gdb-6.3/gdb/linux-nat.c 2004-11-15 11:51:43.954161476 -0500
+@@ -69,7 +69,7 @@
+ #define PTRACE_EVENT_VFORK 2
+ #define PTRACE_EVENT_CLONE 3
+ #define PTRACE_EVENT_EXEC 4
+-#define PTRACE_EVENT_VFORKDONE 5
++#define PTRACE_EVENT_VFORK_DONE 5
+ #define PTRACE_EVENT_EXIT 6
+
+ #endif /* PTRACE_EVENT_FORK */
+@@ -362,7 +362,7 @@ child_follow_fork (int follow_child)
+
+ ptrace (PTRACE_CONT, parent_pid, 0, 0);
+ waitpid (parent_pid, &status, __WALL);
+- if ((status >> 16) != PTRACE_EVENT_VFORKDONE)
++ if ((status >> 16) != PTRACE_EVENT_VFORK_DONE)
+ warning ("Unexpected waitpid result %06x when waiting for "
+ "vfork-done", status);
+ }
+@@ -434,7 +434,7 @@ child_follow_fork (int follow_child)
+ generally not encounter vfork (vfork is defined to fork
+ in libpthread.so).
+
+- The holding part is very easy if we have VFORKDONE events;
++ The holding part is very easy if we have VFORK_DONE events;
+ but keeping track of both processes is beyond GDB at the
+ moment. So we don't expose the parent to the rest of GDB.
+ Instead we quietly hold onto it until such time as we can
diff --git a/misc/buildroot/toolchain/gdb/6.3/780-debian_gdbserver-rdynamic.patch b/misc/buildroot/toolchain/gdb/6.3/780-debian_gdbserver-rdynamic.patch
new file mode 100644
index 000000000..0311dde39
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/780-debian_gdbserver-rdynamic.patch
@@ -0,0 +1,675 @@
+Status: Commited to GDB after 6.3.
+
+Index: gdb-6.3/gdb/gdbserver/acinclude.m4
+===================================================================
+--- gdb-6.3.orig/gdb/gdbserver/acinclude.m4 2002-06-11 13:32:39.000000000 -0400
++++ gdb-6.3/gdb/gdbserver/acinclude.m4 2004-12-07 17:19:31.115089905 -0500
+@@ -13,6 +13,7 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
++ void ps_get_thread_area() {}
+ void ps_getpid() {}],
+ [td_ta_new();],
+ [srv_cv_thread_db="-lthread_db"],
+@@ -32,10 +33,11 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
++ void ps_get_thread_area() {}
+ void ps_getpid() {}],
+ [td_ta_new();],
+ [srv_cv_thread_db="$thread_db"],
+ [srv_cv_thread_db=no])
++ ]])
+ LIBS="$old_LIBS"
+- ]])
+ )])
+Index: gdb-6.3/gdb/gdbserver/configure
+===================================================================
+--- gdb-6.3.orig/gdb/gdbserver/configure 2004-10-16 12:18:54.000000000 -0400
++++ gdb-6.3/gdb/gdbserver/configure 2004-12-07 17:22:17.343129771 -0500
+@@ -28,6 +28,7 @@ program_suffix=NONE
+ program_transform_name=s,x,x,
+ silent=
+ site=
++sitefile=
+ srcdir=
+ target=NONE
+ verbose=
+@@ -142,6 +143,7 @@ Configuration:
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
++ --site-file=FILE use FILE as the site file
+ --version print the version of autoconf that created configure
+ Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+@@ -312,6 +314,11 @@ EOF
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
++ -site-file | --site-file | --site-fil | --site-fi | --site-f)
++ ac_prev=sitefile ;;
++ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
++ sitefile="$ac_optarg" ;;
++
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+@@ -477,12 +484,16 @@ fi
+ srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+ # 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"
++if test -z "$sitefile"; then
++ 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
+ fi
++else
++ CONFIG_SITE="$sitefile"
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+@@ -526,7 +537,7 @@ fi
+ # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:530: checking for $ac_word" >&5
++echo "configure:541: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -556,7 +567,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:560: checking for $ac_word" >&5
++echo "configure:571: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -607,7 +618,7 @@ fi
+ # Extract the first word of "cl", so it can be a program name with args.
+ set dummy cl; ac_word=$2
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+-echo "configure:611: checking for $ac_word" >&5
++echo "configure:622: checking for $ac_word" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -639,7 +650,7 @@ fi
+ fi
+
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+-echo "configure:643: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ ac_ext=c
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+@@ -650,12 +661,12 @@ cross_compiling=$ac_cv_prog_cc_cross
+
+ cat > conftest.$ac_ext << EOF
+
+-#line 654 "configure"
++#line 665 "configure"
+ #include "confdefs.h"
+
+ main(){return(0);}
+ EOF
+-if { (eval echo configure:659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+@@ -681,12 +692,12 @@ if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+ fi
+ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+-echo "configure:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+ cross_compiling=$ac_cv_prog_cc_cross
+
+ echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+-echo "configure:690: checking whether we are using GNU C" >&5
++echo "configure:701: checking whether we are using GNU C" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -695,7 +706,7 @@ else
+ yes;
+ #endif
+ EOF
+-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+ else
+ ac_cv_prog_gcc=no
+@@ -714,7 +725,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+-echo "configure:718: checking whether ${CC-cc} accepts -g" >&5
++echo "configure:729: checking whether ${CC-cc} accepts -g" >&5
+ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -793,7 +804,7 @@ else { echo "configure: error: can not r
+ fi
+
+ echo $ac_n "checking host system type""... $ac_c" 1>&6
+-echo "configure:797: checking host system type" >&5
++echo "configure:808: checking host system type" >&5
+
+ host_alias=$host
+ case "$host_alias" in
+@@ -814,7 +825,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
+ echo "$ac_t""$host" 1>&6
+
+ echo $ac_n "checking target system type""... $ac_c" 1>&6
+-echo "configure:818: checking target system type" >&5
++echo "configure:829: checking target system type" >&5
+
+ target_alias=$target
+ case "$target_alias" in
+@@ -832,7 +843,7 @@ target_os=`echo $target | sed 's/^\([^-]
+ echo "$ac_t""$target" 1>&6
+
+ echo $ac_n "checking build system type""... $ac_c" 1>&6
+-echo "configure:836: checking build system type" >&5
++echo "configure:847: checking build system type" >&5
+
+ build_alias=$build
+ case "$build_alias" in
+@@ -867,7 +878,7 @@ test "$host_alias" != "$target_alias" &&
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # ./install, which can be erroneously created by make from ./install.sh.
+ echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+-echo "configure:871: checking for a BSD compatible install" >&5
++echo "configure:882: checking for a BSD compatible install" >&5
+ if test -z "$INSTALL"; then
+ if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -921,7 +932,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA=
+
+
+ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+-echo "configure:925: checking how to run the C preprocessor" >&5
++echo "configure:936: checking how to run the C preprocessor" >&5
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+@@ -936,13 +947,13 @@ else
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+-#line 940 "configure"
++#line 951 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -953,13 +964,13 @@ else
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+-#line 957 "configure"
++#line 968 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -970,13 +981,13 @@ else
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+-#line 974 "configure"
++#line 985 "configure"
+ #include "confdefs.h"
+ #include <assert.h>
+ Syntax Error
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ :
+@@ -1001,12 +1012,12 @@ fi
+ echo "$ac_t""$CPP" 1>&6
+
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+-echo "configure:1005: checking for ANSI C header files" >&5
++echo "configure:1016: checking for ANSI C header files" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1010 "configure"
++#line 1021 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ #include <stdarg.h>
+@@ -1014,7 +1025,7 @@ else
+ #include <float.h>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -1031,7 +1042,7 @@ rm -f conftest*
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 1035 "configure"
++#line 1046 "configure"
+ #include "confdefs.h"
+ #include <string.h>
+ EOF
+@@ -1049,7 +1060,7 @@ fi
+ if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat > conftest.$ac_ext <<EOF
+-#line 1053 "configure"
++#line 1064 "configure"
+ #include "confdefs.h"
+ #include <stdlib.h>
+ EOF
+@@ -1070,7 +1081,7 @@ if test "$cross_compiling" = yes; then
+ :
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1074 "configure"
++#line 1085 "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
+ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+@@ -1081,7 +1092,7 @@ if (XOR (islower (i), ISLOWER (i)) || to
+ exit (0); }
+
+ EOF
+-if { (eval echo configure:1085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ :
+ else
+@@ -1109,17 +1120,17 @@ for ac_hdr in sgtty.h termio.h termios.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+-echo "configure:1113: checking for $ac_hdr" >&5
++echo "configure:1124: checking for $ac_hdr" >&5
+ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1118 "configure"
++#line 1129 "configure"
+ #include "confdefs.h"
+ #include <$ac_hdr>
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+-{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+ if test -z "$ac_err"; then
+ rm -rf conftest*
+@@ -1147,12 +1158,12 @@ done
+
+
+ echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
+-echo "configure:1151: checking whether strerror must be declared" >&5
++echo "configure:1162: checking whether strerror must be declared" >&5
+ if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1156 "configure"
++#line 1167 "configure"
+ #include "confdefs.h"
+
+ #include <stdio.h>
+@@ -1173,7 +1184,7 @@ int main() {
+ char *(*pfn) = (char *(*)) strerror
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_decl_needed_strerror=no
+ else
+@@ -1205,19 +1216,19 @@ fi
+
+ if test "${srv_linux_regsets}" = "yes"; then
+ echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
+-echo "configure:1209: checking for PTRACE_GETREGS" >&5
++echo "configure:1220: checking for PTRACE_GETREGS" >&5
+ if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getregs'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1214 "configure"
++#line 1225 "configure"
+ #include "confdefs.h"
+ #include <sys/ptrace.h>
+ int main() {
+ PTRACE_GETREGS;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdbsrv_cv_have_ptrace_getregs=yes
+ else
+@@ -1238,19 +1249,19 @@ EOF
+ fi
+
+ echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
+-echo "configure:1242: checking for PTRACE_GETFPXREGS" >&5
++echo "configure:1253: checking for PTRACE_GETFPXREGS" >&5
+ if eval "test \"`echo '$''{'gdbsrv_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1247 "configure"
++#line 1258 "configure"
+ #include "confdefs.h"
+ #include <sys/ptrace.h>
+ int main() {
+ PTRACE_GETFPXREGS;
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gdbsrv_cv_have_ptrace_getfpxregs=yes
+ else
+@@ -1273,12 +1284,12 @@ fi
+
+ if test "$ac_cv_header_sys_procfs_h" = yes; then
+ echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
+-echo "configure:1277: checking for lwpid_t in sys/procfs.h" >&5
++echo "configure:1288: checking for lwpid_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1282 "configure"
++#line 1293 "configure"
+ #include "confdefs.h"
+
+ #define _SYSCALL32
+@@ -1287,7 +1298,7 @@ int main() {
+ lwpid_t avar
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_lwpid_t=yes
+ else
+@@ -1309,12 +1320,12 @@ EOF
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
+
+ echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
+-echo "configure:1313: checking for psaddr_t in sys/procfs.h" >&5
++echo "configure:1324: checking for psaddr_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1318 "configure"
++#line 1329 "configure"
+ #include "confdefs.h"
+
+ #define _SYSCALL32
+@@ -1323,7 +1334,7 @@ int main() {
+ psaddr_t avar
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_psaddr_t=yes
+ else
+@@ -1345,12 +1356,12 @@ EOF
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
+
+ echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
+-echo "configure:1349: checking for prgregset_t in sys/procfs.h" >&5
++echo "configure:1360: checking for prgregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1354 "configure"
++#line 1365 "configure"
+ #include "confdefs.h"
+
+ #define _SYSCALL32
+@@ -1359,7 +1370,7 @@ int main() {
+ prgregset_t avar
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prgregset_t=yes
+ else
+@@ -1381,12 +1392,12 @@ EOF
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
+
+ echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
+-echo "configure:1385: checking for prfpregset_t in sys/procfs.h" >&5
++echo "configure:1396: checking for prfpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1390 "configure"
++#line 1401 "configure"
+ #include "confdefs.h"
+
+ #define _SYSCALL32
+@@ -1395,7 +1406,7 @@ int main() {
+ prfpregset_t avar
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_prfpregset_t=yes
+ else
+@@ -1421,7 +1432,7 @@ EOF
+
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+ echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
+-echo "configure:1425: checking whether prfpregset_t type is broken" >&5
++echo "configure:1436: checking whether prfpregset_t type is broken" >&5
+ if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -1429,7 +1440,7 @@ else
+ gdb_cv_prfpregset_t_broken=yes
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1433 "configure"
++#line 1444 "configure"
+ #include "confdefs.h"
+ #include <sys/procfs.h>
+ int main ()
+@@ -1439,7 +1450,7 @@ else
+ return 0;
+ }
+ EOF
+-if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+ then
+ gdb_cv_prfpregset_t_broken=no
+ else
+@@ -1463,12 +1474,12 @@ EOF
+ fi
+
+ echo $ac_n "checking for elf_fpregset_t in sys/procfs.h""... $ac_c" 1>&6
+-echo "configure:1467: checking for elf_fpregset_t in sys/procfs.h" >&5
++echo "configure:1478: checking for elf_fpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_elf_fpregset_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ cat > conftest.$ac_ext <<EOF
+-#line 1472 "configure"
++#line 1483 "configure"
+ #include "confdefs.h"
+
+ #define _SYSCALL32
+@@ -1477,7 +1488,7 @@ int main() {
+ elf_fpregset_t avar
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++if { (eval echo configure:1492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
+ else
+@@ -1506,14 +1517,14 @@ USE_THREAD_DB=
+
+ if test "$srv_linux_thread_db" = "yes"; then
+ echo $ac_n "checking for libthread_db""... $ac_c" 1>&6
+-echo "configure:1510: checking for libthread_db" >&5
++echo "configure:1521: checking for libthread_db" >&5
+ if eval "test \"`echo '$''{'srv_cv_thread_db'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ old_LIBS="$LIBS"
+ LIBS="$LIBS -lthread_db"
+ cat > conftest.$ac_ext <<EOF
+-#line 1517 "configure"
++#line 1528 "configure"
+ #include "confdefs.h"
+ void ps_pglobal_lookup() {}
+ void ps_pdread() {}
+@@ -1522,12 +1533,13 @@ void ps_pglobal_lookup() {}
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
++ void ps_get_thread_area() {}
+ void ps_getpid() {}
+ int main() {
+ td_ta_new();
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ srv_cv_thread_db="-lthread_db"
+ else
+@@ -1543,7 +1555,7 @@ else
+ fi
+ LIBS="$old_LIBS `eval echo "$thread_db"`"
+ cat > conftest.$ac_ext <<EOF
+-#line 1547 "configure"
++#line 1559 "configure"
+ #include "confdefs.h"
+ void ps_pglobal_lookup() {}
+ void ps_pdread() {}
+@@ -1552,12 +1564,13 @@ void ps_pglobal_lookup() {}
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
++ void ps_get_thread_area() {}
+ void ps_getpid() {}
+ int main() {
+ td_ta_new();
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ srv_cv_thread_db="$thread_db"
+ else
+@@ -1567,11 +1580,11 @@ else
+ srv_cv_thread_db=no
+ fi
+ rm -f conftest*
+- LIBS="$old_LIBS"
+-
++
+ fi
+
+ echo "$ac_t""$srv_cv_thread_db" 1>&6
++ LIBS="$old_LIBS"
+
+ fi
+ rm -f conftest*
+@@ -1585,14 +1598,14 @@ rm -f conftest*
+ old_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -rdynamic"
+ cat > conftest.$ac_ext <<EOF
+-#line 1589 "configure"
++#line 1602 "configure"
+ #include "confdefs.h"
+
+ int main() {
+
+ ; return 0; }
+ EOF
+-if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++if { (eval echo configure:1609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ RDYNAMIC=-rdynamic
+ else
+Index: gdb-6.3/gdb/gdbserver/aclocal.m4
+===================================================================
+--- gdb-6.3.orig/gdb/gdbserver/aclocal.m4 2002-06-11 13:32:39.000000000 -0400
++++ gdb-6.3/gdb/gdbserver/aclocal.m4 2004-12-07 17:22:00.382495519 -0500
+@@ -1,4 +1,4 @@
+-dnl aclocal.m4 generated automatically by aclocal 1.4-p4
++dnl aclocal.m4 generated automatically by aclocal 1.4
+
+ dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+@@ -25,6 +25,7 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
++ void ps_get_thread_area() {}
+ void ps_getpid() {}],
+ [td_ta_new();],
+ [srv_cv_thread_db="-lthread_db"],
+@@ -44,11 +45,12 @@ AC_DEFUN([SRV_CHECK_THREAD_DB],
+ void ps_lsetregs() {}
+ void ps_lgetfpregs() {}
+ void ps_lsetfpregs() {}
++ void ps_get_thread_area() {}
+ void ps_getpid() {}],
+ [td_ta_new();],
+ [srv_cv_thread_db="$thread_db"],
+ [srv_cv_thread_db=no])
++ ]])
+ LIBS="$old_LIBS"
+- ]])
+ )])
+
diff --git a/misc/buildroot/toolchain/gdb/6.3/790-debian_dwarf2-cfi-warning.patch b/misc/buildroot/toolchain/gdb/6.3/790-debian_dwarf2-cfi-warning.patch
new file mode 100644
index 000000000..cfb3d95de
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/790-debian_dwarf2-cfi-warning.patch
@@ -0,0 +1,39 @@
+Status: Unsuitable for upstream (at least, without a lot of arguing).
+
+GCC does not specify the state of every last register in the CIE. Since
+GCC's focus is on correctness of runtime unwinding, any registers which
+have to be unwound will be specified; but unmodified registers will not
+be explicitly marked. (How about modified, call-clobbered registers?
+I'm not sure if they are marked as unavailable.)
+
+GDB issues a noisy warning about this. The warning is generally not useful,
+and we can get it extremely frequently (any time we load a new CIE).
+
+This patch disables the warning. Alternately we could set the complaints
+threshold to zero, or implement a default frame init-register method for
+every architecture. But someday the compiler will support using different
+calling conventions for internal functions, so that's not much of a stopgap.
+ARM has a complex algorithm for handling this, involving scanning all CIEs -
+benefit not completely clear outside of the ARM context of flexible register
+sets.
+
+Index: gdb-6.3/gdb/dwarf2-frame.c
+===================================================================
+--- gdb-6.3.orig/gdb/dwarf2-frame.c 2004-11-15 11:54:57.000000000 -0500
++++ gdb-6.3/gdb/dwarf2-frame.c 2004-12-08 18:02:23.896409471 -0500
+@@ -705,9 +705,12 @@ dwarf2_frame_cache (struct frame_info *n
+ table. We need a way of iterating through all the valid
+ DWARF2 register numbers. */
+ if (fs->regs.reg[column].how == DWARF2_FRAME_REG_UNSPECIFIED)
+- complaint (&symfile_complaints,
+- "Incomplete CFI data; unspecified registers at 0x%s",
+- paddr (fs->pc));
++ {
++ if (0)
++ complaint (&symfile_complaints,
++ "Incomplete CFI data; unspecified registers at 0x%s",
++ paddr (fs->pc));
++ }
+ else
+ cache->reg[regnum] = fs->regs.reg[column];
+ }
diff --git a/misc/buildroot/toolchain/gdb/6.3/800-debian_linux-use-underscore-exit.patch b/misc/buildroot/toolchain/gdb/6.3/800-debian_linux-use-underscore-exit.patch
new file mode 100644
index 000000000..198918ccc
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/800-debian_linux-use-underscore-exit.patch
@@ -0,0 +1,22 @@
+Status: committed upstream after 6.3. Fixes some terminal mangling in
+gdbtui.
+
+2004-12-04 Daniel Jacobowitz <dan@debian.org>
+
+ PR tui/1703
+ * linux-nat.c (linux_tracefork_child): Use _exit instead of exit.
+ Suggested by Joshua Neuheisel.
+
+Index: gdb-6.3/gdb/linux-nat.c
+===================================================================
+--- gdb-6.3.orig/gdb/linux-nat.c 2004-12-08 18:22:04.996973094 -0500
++++ gdb-6.3/gdb/linux-nat.c 2004-12-08 18:22:20.386956067 -0500
+@@ -147,7 +147,7 @@ linux_tracefork_child (void)
+ ptrace (PTRACE_TRACEME, 0, 0, 0);
+ kill (getpid (), SIGSTOP);
+ fork ();
+- exit (0);
++ _exit (0);
+ }
+
+ /* Wrapper function for waitpid which handles EINTR. */
diff --git a/misc/buildroot/toolchain/gdb/6.3/810-debian_bfd-no-kylix-crash.patch b/misc/buildroot/toolchain/gdb/6.3/810-debian_bfd-no-kylix-crash.patch
new file mode 100644
index 000000000..9aba5ca23
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/810-debian_bfd-no-kylix-crash.patch
@@ -0,0 +1,47 @@
+Status: committed upstream after 6.3.
+
+Fix a crash triggered by Kylix libraries.
+
+2004-12-06 Daniel Jacobowitz <dan@debian.org>
+
+ Suggested by Fergal Daly <fergal@esatclear.ie>:
+ * simple.c (simple_dummy_multiple_definition): New function.
+ (bfd_simple_get_relocated_section_contents): Use it.
+
+Index: src/bfd/simple.c
+===================================================================
+RCS file: /cvs/src/src/bfd/simple.c,v
+retrieving revision 1.19
+retrieving revision 1.20
+Index: gdb-6.3/bfd/simple.c
+===================================================================
+--- gdb-6.3.orig/bfd/simple.c 2004-09-24 03:07:19.000000000 -0400
++++ gdb-6.3/bfd/simple.c 2004-12-08 18:25:58.415216808 -0500
+@@ -78,6 +78,19 @@ simple_dummy_unattached_reloc (struct bf
+ return TRUE;
+ }
+
++static bfd_boolean
++simple_dummy_multiple_definition (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
++ const char *name ATTRIBUTE_UNUSED,
++ bfd *obfd ATTRIBUTE_UNUSED,
++ asection *osec ATTRIBUTE_UNUSED,
++ bfd_vma oval ATTRIBUTE_UNUSED,
++ bfd *nbfd ATTRIBUTE_UNUSED,
++ asection *nsec ATTRIBUTE_UNUSED,
++ bfd_vma nval ATTRIBUTE_UNUSED)
++{
++ return TRUE;
++}
++
+ struct saved_output_info
+ {
+ bfd_vma offset;
+@@ -172,6 +185,7 @@ bfd_simple_get_relocated_section_content
+ callbacks.reloc_overflow = simple_dummy_reloc_overflow;
+ callbacks.reloc_dangerous = simple_dummy_reloc_dangerous;
+ callbacks.unattached_reloc = simple_dummy_unattached_reloc;
++ callbacks.multiple_definition = simple_dummy_multiple_definition;
+
+ memset (&link_order, 0, sizeof (link_order));
+ link_order.next = NULL;
diff --git a/misc/buildroot/toolchain/gdb/6.3/820-debian_disable-linux-fork-messages.patch b/misc/buildroot/toolchain/gdb/6.3/820-debian_disable-linux-fork-messages.patch
new file mode 100644
index 000000000..60730abc1
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.3/820-debian_disable-linux-fork-messages.patch
@@ -0,0 +1,46 @@
+Status: Proposed upstream after 6.3, not yet committed.
+
+2004-12-06 Daniel Jacobowitz <dan@debian.org>
+
+ * linux-nat.c (child_follow_fork): Call target_terminal_ours before
+ printing output. Use fprintf_unfiltered. Only print output when
+ debugging.
+
+Index: gdb-6.3/gdb/linux-nat.c
+===================================================================
+--- gdb-6.3.orig/gdb/linux-nat.c 2004-12-08 18:22:20.386956067 -0500
++++ gdb-6.3/gdb/linux-nat.c 2004-12-08 18:28:49.995585970 -0500
+@@ -347,9 +347,13 @@ child_follow_fork (int follow_child)
+ also, but they'll be reinserted below. */
+ detach_breakpoints (child_pid);
+
+- fprintf_filtered (gdb_stdout,
+- "Detaching after fork from child process %d.\n",
+- child_pid);
++ if (debug_linux_nat)
++ {
++ target_terminal_ours ();
++ fprintf_unfiltered (gdb_stdlog,
++ "Detaching after fork from child process %d.\n",
++ child_pid);
++ }
+
+ ptrace (PTRACE_DETACH, child_pid, 0, 0);
+
+@@ -418,9 +422,13 @@ child_follow_fork (int follow_child)
+ /* Before detaching from the parent, remove all breakpoints from it. */
+ remove_breakpoints ();
+
+- fprintf_filtered (gdb_stdout,
+- "Attaching after fork to child process %d.\n",
+- child_pid);
++ if (debug_linux_nat)
++ {
++ target_terminal_ours ();
++ fprintf_unfiltered (gdb_stdlog,
++ "Attaching after fork to child process %d.\n",
++ child_pid);
++ }
+
+ /* If we're vforking, we may want to hold on to the parent until
+ the child exits or execs. At exec time we can remove the old
diff --git a/misc/buildroot/toolchain/gdb/6.4/400-mips-coredump.patch-2.4.23-29 b/misc/buildroot/toolchain/gdb/6.4/400-mips-coredump.patch-2.4.23-29
new file mode 100644
index 000000000..4e17ba7be
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.4/400-mips-coredump.patch-2.4.23-29
@@ -0,0 +1,28 @@
+Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
+coredump handling by gdb for current kernels. Update the hardcoded constants
+to reflect the change.
+--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
++++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
+@@ -53,12 +53,22 @@
+
+ #define EF_REG0 6
+ #define EF_REG31 37
++
++#if 0
+ #define EF_LO 38
+ #define EF_HI 39
+ #define EF_CP0_EPC 40
+ #define EF_CP0_BADVADDR 41
+ #define EF_CP0_STATUS 42
+ #define EF_CP0_CAUSE 43
++#else
++#define EF_CP0_STATUS 38
++#define EF_LO 39
++#define EF_HI 40
++#define EF_CP0_BADVADDR 41
++#define EF_CP0_CAUSE 42
++#define EF_CP0_EPC 43
++#endif
+
+ #define EF_SIZE 180
+
diff --git a/misc/buildroot/toolchain/gdb/6.4/500-thread-timeout.patch b/misc/buildroot/toolchain/gdb/6.4/500-thread-timeout.patch
new file mode 100644
index 000000000..6db0a7a47
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.4/500-thread-timeout.patch
@@ -0,0 +1,34 @@
+--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
++++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
+@@ -21,6 +21,7 @@
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
++#include <unistd.h>
+ #include "server.h"
+
+ #include "linux-low.h"
+@@ -142,6 +143,7 @@
+ td_event_msg_t msg;
+ td_err_e err;
+ struct inferior_linux_data *tdata;
++ int timeout;
+
+ if (debug_threads)
+ fprintf (stderr, "Thread creation event.\n");
+@@ -152,7 +154,13 @@
+ In the LinuxThreads implementation, this is safe,
+ because all events come from the manager thread
+ (except for its own creation, of course). */
+- err = td_ta_event_getmsg (thread_agent, &msg);
++ for (timeout = 0; timeout < 50000; timeout++)
++ {
++ err = td_ta_event_getmsg (thread_agent, &msg);
++ if (err != TD_NOMSG)
++ break;
++ usleep(1000);
++ }
+ if (err != TD_OK)
+ fprintf (stderr, "thread getmsg err: %s\n",
+ thread_db_err_str (err));
+
diff --git a/misc/buildroot/toolchain/gdb/6.4/600-fix-compile-flag-mismatch.patch b/misc/buildroot/toolchain/gdb/6.4/600-fix-compile-flag-mismatch.patch
new file mode 100644
index 000000000..659a5f03a
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.4/600-fix-compile-flag-mismatch.patch
@@ -0,0 +1,87 @@
+diff -ur gdb-6.4/gdb/configure gdb-6.4-patched/gdb/configure
+--- gdb-6.4/gdb/configure 2005-07-25 10:08:40.000000000 -0500
++++ gdb-6.4-patched/gdb/configure 2007-02-05 13:22:36.000000000 -0600
+@@ -309,7 +309,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subdirs_all="$ac_subdirs_all doc testsuite"
++ac_subdirs_all="$ac_subdirs_all doc"
+ ac_subdirs_all="$ac_subdirs_all gdbtk"
+ ac_subdirs_all="$ac_subdirs_all multi-ice"
+ ac_subdirs_all="$ac_subdirs_all gdbserver"
+@@ -5940,7 +5940,7 @@
+
+
+
+-subdirs="$subdirs doc testsuite"
++subdirs="$subdirs doc"
+
+
+ . $srcdir/configure.host
+diff -ur gdb-6.4/gdb/gdbserver/configure gdb-6.4-patched/gdb/gdbserver/configure
+--- gdb-6.4/gdb/gdbserver/configure 2005-09-17 18:14:37.000000000 -0500
++++ gdb-6.4-patched/gdb/gdbserver/configure 2007-02-05 13:22:58.000000000 -0600
+@@ -1239,7 +1239,7 @@
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+- if test "x$ac_old_val" != "x$ac_new_val"; then
++ if test "`echo $ac_old_val`" != "`echo $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
+diff -ur gdb-6.4/gdb/testsuite/configure gdb-6.4-patched/gdb/testsuite/configure
+--- gdb-6.4/gdb/testsuite/configure 2005-04-11 09:13:12.000000000 -0500
++++ gdb-6.4-patched/gdb/testsuite/configure 2007-02-05 13:22:36.000000000 -0600
+@@ -1248,7 +1248,7 @@
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+- if test "x$ac_old_val" != "x$ac_new_val"; then
++ if test "`echo $ac_old_val" != "`echo $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
+diff -ur gdb-6.4/Makefile.in gdb-6.4-patched/Makefile.in
+--- gdb-6.4/Makefile.in 2005-12-01 23:29:54.000000000 -0600
++++ gdb-6.4-patched/Makefile.in 2007-02-05 13:22:36.000000000 -0600
+@@ -383,7 +383,7 @@
+ # CFLAGS will be just -g. We want to ensure that TARGET libraries
+ # (which we know are built with gcc) are built with optimizations so
+ # prepend -O2 when setting CFLAGS_FOR_TARGET.
+-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
++CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+
+ # If GCC_FOR_TARGET is not overriden on the command line, then this
+@@ -423,7 +423,7 @@
+ fi; \
+ fi`
+
+-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
++CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+
+ GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
+diff -ur gdb-6.4/Makefile.tpl gdb-6.4-patched/Makefile.tpl
+--- gdb-6.4/Makefile.tpl 2005-10-22 05:37:55.000000000 -0500
++++ gdb-6.4-patched/Makefile.tpl 2007-02-05 13:22:36.000000000 -0600
+@@ -386,7 +386,7 @@
+ # CFLAGS will be just -g. We want to ensure that TARGET libraries
+ # (which we know are built with gcc) are built with optimizations so
+ # prepend -O2 when setting CFLAGS_FOR_TARGET.
+-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
++CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+
+ # If GCC_FOR_TARGET is not overriden on the command line, then this
+@@ -426,7 +426,7 @@
+ fi; \
+ fi`
+
+-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
++CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+
+ GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
diff --git a/misc/buildroot/toolchain/gdb/6.5/400-mips-coredump.patch-2.4.23-29 b/misc/buildroot/toolchain/gdb/6.5/400-mips-coredump.patch-2.4.23-29
new file mode 100644
index 000000000..4e17ba7be
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.5/400-mips-coredump.patch-2.4.23-29
@@ -0,0 +1,28 @@
+Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
+coredump handling by gdb for current kernels. Update the hardcoded constants
+to reflect the change.
+--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
++++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
+@@ -53,12 +53,22 @@
+
+ #define EF_REG0 6
+ #define EF_REG31 37
++
++#if 0
+ #define EF_LO 38
+ #define EF_HI 39
+ #define EF_CP0_EPC 40
+ #define EF_CP0_BADVADDR 41
+ #define EF_CP0_STATUS 42
+ #define EF_CP0_CAUSE 43
++#else
++#define EF_CP0_STATUS 38
++#define EF_LO 39
++#define EF_HI 40
++#define EF_CP0_BADVADDR 41
++#define EF_CP0_CAUSE 42
++#define EF_CP0_EPC 43
++#endif
+
+ #define EF_SIZE 180
+
diff --git a/misc/buildroot/toolchain/gdb/6.5/500-thread-timeout.patch b/misc/buildroot/toolchain/gdb/6.5/500-thread-timeout.patch
new file mode 100644
index 000000000..6db0a7a47
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.5/500-thread-timeout.patch
@@ -0,0 +1,34 @@
+--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
++++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
+@@ -21,6 +21,7 @@
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
++#include <unistd.h>
+ #include "server.h"
+
+ #include "linux-low.h"
+@@ -142,6 +143,7 @@
+ td_event_msg_t msg;
+ td_err_e err;
+ struct inferior_linux_data *tdata;
++ int timeout;
+
+ if (debug_threads)
+ fprintf (stderr, "Thread creation event.\n");
+@@ -152,7 +154,13 @@
+ In the LinuxThreads implementation, this is safe,
+ because all events come from the manager thread
+ (except for its own creation, of course). */
+- err = td_ta_event_getmsg (thread_agent, &msg);
++ for (timeout = 0; timeout < 50000; timeout++)
++ {
++ err = td_ta_event_getmsg (thread_agent, &msg);
++ if (err != TD_NOMSG)
++ break;
++ usleep(1000);
++ }
+ if (err != TD_OK)
+ fprintf (stderr, "thread getmsg err: %s\n",
+ thread_db_err_str (err));
+
diff --git a/misc/buildroot/toolchain/gdb/6.5/600-fix-compile-flag-mismatch.patch b/misc/buildroot/toolchain/gdb/6.5/600-fix-compile-flag-mismatch.patch
new file mode 100644
index 000000000..ba98482d8
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/6.5/600-fix-compile-flag-mismatch.patch
@@ -0,0 +1,69 @@
+diff -ur gdb-6.4/gdb/configure gdb-6.4-patched/gdb/configure
+--- gdb-6.4/gdb/configure 2005-07-25 10:08:40.000000000 -0500
++++ gdb-6.4-patched/gdb/configure 2007-02-05 13:22:36.000000000 -0600
+@@ -309,7 +309,7 @@
+ # include <unistd.h>
+ #endif"
+
+-ac_subdirs_all="$ac_subdirs_all doc testsuite"
++ac_subdirs_all="$ac_subdirs_all doc"
+ ac_subdirs_all="$ac_subdirs_all gdbtk"
+ ac_subdirs_all="$ac_subdirs_all multi-ice"
+ ac_subdirs_all="$ac_subdirs_all gdbserver"
+@@ -5940,7 +5940,7 @@
+
+
+
+-subdirs="$subdirs doc testsuite"
++subdirs="$subdirs doc"
+
+
+ . $srcdir/configure.host
+diff -ur gdb-6.4/gdb/gdbserver/configure gdb-6.4-patched/gdb/gdbserver/configure
+--- gdb-6.4/gdb/gdbserver/configure 2005-09-17 18:14:37.000000000 -0500
++++ gdb-6.4-patched/gdb/gdbserver/configure 2007-02-05 13:22:58.000000000 -0600
+@@ -1239,7 +1239,7 @@
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+- if test "x$ac_old_val" != "x$ac_new_val"; then
++ if test "`echo $ac_old_val`" != "`echo $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
+diff -ur gdb-6.4/gdb/testsuite/configure gdb-6.4-patched/gdb/testsuite/configure
+--- gdb-6.4/gdb/testsuite/configure 2005-04-11 09:13:12.000000000 -0500
++++ gdb-6.4-patched/gdb/testsuite/configure 2007-02-05 13:22:36.000000000 -0600
+@@ -1248,7 +1248,7 @@
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+- if test "x$ac_old_val" != "x$ac_new_val"; then
++ if test "`echo $ac_old_val" != "`echo $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
+diff -ur gdb-6.4/Makefile.in gdb-6.4-patched/Makefile.in
+--- gdb-6.4/Makefile.in 2005-12-01 23:29:54.000000000 -0600
++++ gdb-6.4-patched/Makefile.in 2007-02-05 13:22:36.000000000 -0600
+@@ -383,7 +383,7 @@
+ # CFLAGS will be just -g. We want to ensure that TARGET libraries
+ # (which we know are built with gcc) are built with optimizations so
+ # prepend -O2 when setting CFLAGS_FOR_TARGET.
+-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
++CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+
+ # If GCC_FOR_TARGET is not overriden on the command line, then this
+diff -ur gdb-6.4/Makefile.tpl gdb-6.4-patched/Makefile.tpl
+--- gdb-6.4/Makefile.tpl 2005-10-22 05:37:55.000000000 -0500
++++ gdb-6.4-patched/Makefile.tpl 2007-02-05 13:22:36.000000000 -0600
+@@ -386,7 +386,7 @@
+ # CFLAGS will be just -g. We want to ensure that TARGET libraries
+ # (which we know are built with gcc) are built with optimizations so
+ # prepend -O2 when setting CFLAGS_FOR_TARGET.
+-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
++CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
+ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+
+ # If GCC_FOR_TARGET is not overriden on the command line, then this
diff --git a/misc/buildroot/toolchain/gdb/Config.in b/misc/buildroot/toolchain/gdb/Config.in
new file mode 100644
index 000000000..2c61a9b64
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/Config.in
@@ -0,0 +1,53 @@
+comment "Gdb Options"
+
+config BR2_PACKAGE_GDB
+ bool "Build gdb debugger for the Target"
+ default n
+ select BR2_PACKAGE_NCURSES
+ help
+ Build the full gdb debugger to run on the target.
+
+config BR2_PACKAGE_GDB_SERVER
+ bool "Build gdb server for the Target"
+ default n
+ help
+ Build the gdbserver stub to run on the target.
+ A full gdb is needed to debug the progam.
+
+config BR2_PACKAGE_GDB_HOST
+ bool "Build gdb for the Host"
+ default n
+ help
+ Build gdb to run on the host to debug programs run on the target.
+
+choice
+ prompt "GDB debugger Version"
+ default BR2_GDB_VERSION_6_3
+ depends on BR2_PACKAGE_GDB || BR2_PACKAGE_GDB_SERVER || BR2_PACKAGE_GDB_HOST
+ help
+ Select the version of gdb you wish to use.
+
+ config BR2_GDB_VERSION_6_2_1
+ bool "gdb 6.2.1"
+
+ config BR2_GDB_VERSION_6_3
+ bool "gdb 6.3"
+
+ config BR2_GDB_VERSION_6_4
+ bool "gdb 6.4"
+
+ config BR2_GDB_VERSION_6_5
+ bool "gdb 6.5"
+
+ config BR2_GDB_VERSION_SNAPSHOT
+ bool "gdb snapshot"
+
+endchoice
+
+config BR2_GDB_VERSION
+ string
+ default "6.2.1" if BR2_GDB_VERSION_6_2_1
+ default "6.3" if BR2_GDB_VERSION_6_3
+ default "6.4" if BR2_GDB_VERSION_6_4
+ default "6.5" if BR2_GDB_VERSION_6_5
+ default "snapshot" if BR2_GDB_VERSION_SNAPSHOT
diff --git a/misc/buildroot/toolchain/gdb/Config.in.2 b/misc/buildroot/toolchain/gdb/Config.in.2
new file mode 100644
index 000000000..695c5d5ea
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/Config.in.2
@@ -0,0 +1,55 @@
+# Keep this in sync with Config.in
+
+comment "Gdb Options"
+
+config BR2_PACKAGE_GDB
+ bool "Build gdb debugger for the Target"
+ default n
+ select BR2_PACKAGE_NCURSES
+ help
+ Build the full gdb debugger to run on the target.
+
+config BR2_PACKAGE_GDB_SERVER
+ bool "Build gdb server for the Target"
+ default n
+ help
+ Build the gdbserver stub to run on the target.
+ A full gdb is needed to debug the progam.
+
+config BR2_PACKAGE_GDB_HOST
+ bool "Build gdb for the Host"
+ default n
+ help
+ Build gdb to run on the host to debug programs run on the target.
+
+choice
+ prompt "GDB debugger Version"
+ default BR2_GDB_VERSION_6_3
+ depends on BR2_PACKAGE_GDB || BR2_PACKAGE_GDB_SERVER || BR2_PACKAGE_GDB_HOST
+ help
+ Select the version of gdb you wish to use.
+
+ config BR2_EXT_GDB_VERSION_6_2_1
+ bool "gdb 6.2.1"
+
+ config BR2_EXT_GDB_VERSION_6_3
+ bool "gdb 6.3"
+
+ config BR2_EXT_GDB_VERSION_6_4
+ bool "gdb 6.4"
+
+ config BR2_EXT_GDB_VERSION_6_5
+ bool "gdb 6.5"
+
+ config BR2_EXT_GDB_VERSION_SNAPSHOT
+ bool "gdb snapshot"
+
+endchoice
+
+config BR2_EXT_GDB_VERSION
+ string
+ default "6.2.1" if BR2_EXT_GDB_VERSION_6_2_1
+ default "6.3" if BR2_EXT_GDB_VERSION_6_3
+ default "6.4" if BR2_EXT_GDB_VERSION_6_4
+ default "6.5" if BR2_EXT_GDB_VERSION_6_5
+ default "snapshot" if BR2_EXT_GDB_VERSION_SNAPSHOT
diff --git a/misc/buildroot/toolchain/gdb/gdb.mk b/misc/buildroot/toolchain/gdb/gdb.mk
new file mode 100644
index 000000000..853ce51b2
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/gdb.mk
@@ -0,0 +1,226 @@
+######################################################################
+#
+# gdb
+#
+######################################################################
+GDB_VERSION:=$(strip $(subst ",, $(BR2_GDB_VERSION)))
+
+ifeq ($(GDB_VERSION),snapshot)
+# Be aware that this changes daily....
+GDB_SITE:=ftp://sources.redhat.com/pub/gdb/snapshots/current
+GDB_SOURCE:=gdb.tar.bz2
+GDB_CAT:=$(BZCAT)
+GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION)
+else
+GDB_SITE:=http://ftp.gnu.org/gnu/gdb
+GDB_SOURCE:=gdb-$(GDB_VERSION).tar.bz2
+GDB_CAT:=$(BZCAT)
+
+GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_VERSION)
+
+# NOTE: This option should not be used with gdb versions 6.4 and above.
+ifeq ($(GDB_VERSION),6.2.1)
+DISABLE_GDBMI:=--disable-gdbmi
+endif
+
+ifeq ($(GDB_VERSION),6.3)
+DISABLE_GDBMI:=--disable-gdbmi
+endif
+endif
+
+$(DL_DIR)/$(GDB_SOURCE):
+ $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE)
+
+gdb-unpacked: $(GDB_DIR)/.unpacked
+$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
+ $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ifeq ($(GDB_VERSION),snapshot)
+ GDB_REAL_DIR=$(shell \
+ tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
+ ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
+endif
+ toolchain/patch-kernel.sh $(GDB_DIR) toolchain/gdb/$(GDB_VERSION) \*.patch
+ $(CONFIG_UPDATE) $(GDB_DIR)
+ touch $(GDB_DIR)/.unpacked
+
+gdb-dirclean:
+ rm -rf $(GDB_DIR)
+
+######################################################################
+#
+# gdb target
+#
+######################################################################
+
+GDB_TARGET_DIR:=$(BUILD_DIR)/gdb-$(GDB_VERSION)-target
+
+GDB_TARGET_CONFIGURE_VARS:= \
+ ac_cv_type_uintptr_t=yes \
+ gt_cv_func_gettext_libintl=yes \
+ ac_cv_func_dcgettext=yes \
+ gdb_cv_func_sigsetjmp=yes \
+ bash_cv_func_strcoll_broken=no \
+ bash_cv_must_reinstall_sighandlers=no \
+ bash_cv_func_sigsetjmp=present \
+ bash_cv_have_mbstate_t=yes
+
+$(GDB_TARGET_DIR)/.configured: $(GDB_DIR)/.unpacked
+ mkdir -p $(GDB_TARGET_DIR)
+ (cd $(GDB_TARGET_DIR); \
+ gdb_cv_func_sigsetjmp=yes \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS_FOR_TARGET="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
+ CFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
+ $(GDB_TARGET_CONFIGURE_VARS) \
+ $(GDB_DIR)/configure \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(REAL_GNU_TARGET_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --prefix=/usr \
+ $(DISABLE_NLS) \
+ --without-uiout $(DISABLE_GDBMI) \
+ --disable-tui --disable-gdbtk --without-x \
+ --disable-sim --enable-gdbserver \
+ --without-included-gettext \
+ );
+ifeq ($(BR2_ENABLE_LOCALE),y)
+ -$(SED) "s,^INTL *=.*,INTL = -lintl,g;" $(GDB_DIR)/gdb/Makefile
+endif
+ touch $(GDB_TARGET_DIR)/.configured
+
+$(GDB_TARGET_DIR)/gdb/gdb: $(GDB_TARGET_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) MT_CFLAGS="$(TARGET_CFLAGS)" \
+ -C $(GDB_TARGET_DIR)
+ $(STRIP) $(GDB_TARGET_DIR)/gdb/gdb
+
+$(TARGET_DIR)/usr/bin/gdb: $(GDB_TARGET_DIR)/gdb/gdb
+ install -c -D $(GDB_TARGET_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb
+
+gdb_target: ncurses $(TARGET_DIR)/usr/bin/gdb
+
+gdb_target-source: $(DL_DIR)/$(GDB_SOURCE)
+
+gdb_target-clean:
+ @if [ -d $(GDB_DIR)/Makefile ] ; then \
+ $(MAKE) -C $(GDB_DIR) clean ; \
+ fi;
+
+gdb_target-dirclean:
+ rm -rf $(GDB_DIR)
+
+######################################################################
+#
+# gdbserver
+#
+######################################################################
+
+GDB_SERVER_DIR:=$(BUILD_DIR)/gdbserver-$(GDB_VERSION)
+
+$(GDB_SERVER_DIR)/.configured: $(GDB_DIR)/.unpacked
+ mkdir -p $(GDB_SERVER_DIR)
+ (cd $(GDB_SERVER_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ gdb_cv_func_sigsetjmp=yes \
+ $(GDB_DIR)/gdb/gdbserver/configure \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(REAL_GNU_TARGET_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --includedir=$(STAGING_DIR)/include \
+ $(DISABLE_NLS) \
+ --without-uiout $(DISABLE_GDBMI) \
+ --disable-tui --disable-gdbtk --without-x \
+ --without-included-gettext \
+ );
+ touch $(GDB_SERVER_DIR)/.configured
+
+$(GDB_SERVER_DIR)/gdbserver: $(GDB_SERVER_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) MT_CFLAGS="$(TARGET_CFLAGS)" \
+ -C $(GDB_SERVER_DIR)
+ $(STRIP) $(GDB_SERVER_DIR)/gdbserver
+$(TARGET_DIR)/usr/bin/gdbserver: $(GDB_SERVER_DIR)/gdbserver
+ install -c -D $(GDB_SERVER_DIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver
+
+gdbserver: $(TARGET_DIR)/usr/bin/gdbserver
+
+gdbserver-clean:
+ @if [ -d $(GDB_SERVER_DIR)/Makefile ] ; then \
+ $(MAKE) -C $(GDB_SERVER_DIR) clean ; \
+ fi;
+
+gdbserver-dirclean:
+ rm -rf $(GDB_SERVER_DIR)
+
+######################################################################
+#
+# gdb on host
+#
+######################################################################
+
+GDB_HOST_DIR:=$(TOOL_BUILD_DIR)/gdbhost-$(GDB_VERSION)
+
+$(GDB_HOST_DIR)/.configured: $(GDB_DIR)/.unpacked
+ mkdir -p $(GDB_HOST_DIR)
+ (cd $(GDB_HOST_DIR); \
+ gdb_cv_func_sigsetjmp=yes \
+ $(GDB_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ $(DISABLE_NLS) \
+ --without-uiout $(DISABLE_GDBMI) \
+ --disable-tui --disable-gdbtk --without-x \
+ --without-included-gettext \
+ --enable-threads \
+ );
+ touch $(GDB_HOST_DIR)/.configured
+
+$(GDB_HOST_DIR)/gdb/gdb: $(GDB_HOST_DIR)/.configured
+ $(MAKE) -C $(GDB_HOST_DIR)
+ strip $(GDB_HOST_DIR)/gdb/gdb
+
+$(TARGET_CROSS)gdb: $(GDB_HOST_DIR)/gdb/gdb
+ install -c $(GDB_HOST_DIR)/gdb/gdb $(TARGET_CROSS)gdb
+ ln -snf ../../bin/$(REAL_GNU_TARGET_NAME)-gdb \
+ $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/gdb
+ ln -snf $(REAL_GNU_TARGET_NAME)-gdb \
+ $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gdb
+
+gdbhost: $(TARGET_CROSS)gdb
+
+gdbhost-clean:
+ @if [ -d $(GDB_HOST_DIR)/Makefile ] ; then \
+ $(MAKE) -C $(GDB_HOST_DIR) clean ; \
+ fi;
+
+gdbhost-dirclean:
+ rm -rf $(GDB_HOST_DIR)
+
+
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_GDB)),y)
+TARGETS+=gdb_target
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_GDB_SERVER)),y)
+TARGETS+=gdbserver
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_GDB_HOST)),y)
+TARGETS+=gdbhost
+endif
diff --git a/misc/buildroot/toolchain/gdb/snapshot/400-mips-coredump.patch-2.4.23-29 b/misc/buildroot/toolchain/gdb/snapshot/400-mips-coredump.patch-2.4.23-29
new file mode 100644
index 000000000..b7136bf8a
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/snapshot/400-mips-coredump.patch-2.4.23-29
@@ -0,0 +1,30 @@
+Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
+coredump handling by gdb for current kernels. Update the hardcoded constants
+to reflect the change.
+--
+diff -urN gdb-6.3.50.20050915/gdb/mips-linux-tdep.c gdb-6.3.50.20050915-patched/gdb/mips-linux-tdep.c
+--- gdb-6.3.50.20050915/gdb/mips-linux-tdep.c 2005-04-02 16:59:34.000000000 -0600
++++ gdb-6.3.50.20050915-patched/gdb/mips-linux-tdep.c 2005-09-15 22:33:13.000000000 -0500
+@@ -54,12 +54,22 @@
+
+ #define EF_REG0 6
+ #define EF_REG31 37
++
++#if 0
+ #define EF_LO 38
+ #define EF_HI 39
+ #define EF_CP0_EPC 40
+ #define EF_CP0_BADVADDR 41
+ #define EF_CP0_STATUS 42
+ #define EF_CP0_CAUSE 43
++#else
++#define EF_CP0_STATUS 38
++#define EF_LO 39
++#define EF_HI 40
++#define EF_CP0_BADVADDR 41
++#define EF_CP0_CAUSE 42
++#define EF_CP0_EPC 43
++#endif
+
+ #define EF_SIZE 180
+
diff --git a/misc/buildroot/toolchain/gdb/snapshot/400-mips-nptl-support.patch b/misc/buildroot/toolchain/gdb/snapshot/400-mips-nptl-support.patch
new file mode 100644
index 000000000..50be6ac41
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/snapshot/400-mips-nptl-support.patch
@@ -0,0 +1,143 @@
+2005-03-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-mips-low.c: Include "gdb_proc_service.h".
+ (PTRACE_GET_THREAD_AREA): Define.
+ (ps_get_thread_area): New function.
+ * Makefile.in: Update dependencies for linux-mips-low.o,
+ linux-i386-low.o, and linux-x86-64-low.o.
+
+2005-03-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-mips-low.c: Include "gdb_proc_service.h".
+ (PTRACE_GET_THREAD_AREA): Define.
+ (ps_get_thread_area): New function.
+ * Makefile.in (mips-linux-nat.o): Update dependencies.
+--
+diff -urN gdb-6.3.50.20050915/gdb/Makefile.in gdb-6.3.50.20050915-patched/gdb/Makefile.in
+--- gdb-6.3.50.20050915/gdb/Makefile.in 2005-09-10 13:11:01.000000000 -0500
++++ gdb-6.3.50.20050915-patched/gdb/Makefile.in 2005-09-15 19:24:39.000000000 -0500
+@@ -2282,7 +2282,7 @@
+ $(gdb_string_h) $(mips_tdep_h) $(solib_svr4_h)
+ mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h)
+ mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) $(target_h) \
+- $(linux_nat_h)
++ $(linux_nat_h) $(gdb_proc_service_h)
+ mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \
+ $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \
+ $(gdb_assert_h) $(frame_h) $(regcache_h) $(trad_frame_h) \
+diff -urN gdb-6.3.50.20050915/gdb/gdbserver/Makefile.in gdb-6.3.50.20050915-patched/gdb/gdbserver/Makefile.in
+--- gdb-6.3.50.20050915/gdb/gdbserver/Makefile.in 2005-05-28 17:09:04.000000000 -0500
++++ gdb-6.3.50.20050915-patched/gdb/gdbserver/Makefile.in 2005-09-15 19:20:01.000000000 -0500
+@@ -267,15 +267,18 @@
+ linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h)
+ linux-cris-low.o: linux-cris-low.c $(linux_low_h) $(server_h)
+ linux-crisv32-low.o: linux-crisv32-low.c $(linux_low_h) $(server_h)
+-linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h)
++linux-i386-low.o: linux-i386-low.c $(linux_low_h) $(server_h) \
++ $(gdb_proc_service_h)
+ linux-ia64-low.o: linux-ia64-low.c $(linux_low_h) $(server_h)
+ linux-m32r-low.o: linux-m32r-low.c $(linux_low_h) $(server_h)
+-linux-mips-low.o: linux-mips-low.c $(linux_low_h) $(server_h)
++linux-mips-low.o: linux-mips-low.c $(linux_low_h) $(server_h) \
++ $(gdb_proc_service_h)
+ linux-ppc-low.o: linux-ppc-low.c $(linux_low_h) $(server_h)
+ linux-ppc64-low.o: linux-ppc64-low.c $(linux_low_h) $(server_h)
+ linux-s390-low.o: linux-s390-low.c $(linux_low_h) $(server_h)
+ linux-sh-low.o: linux-sh-low.c $(linux_low_h) $(server_h)
+-linux-x86-64-low.o: linux-x86-64-low.c $(linux_low_h) $(server_h)
++linux-x86-64-low.o: linux-x86-64-low.c $(linux_low_h) $(server_h) \
++ $(gdb_proc_service_h)
+
+ reg-arm.o : reg-arm.c $(regdef_h)
+ reg-arm.c : $(srcdir)/../regformats/reg-arm.dat $(regdat_sh)
+diff -urN gdb-6.3.50.20050915/gdb/gdbserver/linux-mips-low.c gdb-6.3.50.20050915-patched/gdb/gdbserver/linux-mips-low.c
+--- gdb-6.3.50.20050915/gdb/gdbserver/linux-mips-low.c 2005-06-12 20:59:22.000000000 -0500
++++ gdb-6.3.50.20050915-patched/gdb/gdbserver/linux-mips-low.c 2005-09-15 19:16:54.000000000 -0500
+@@ -22,6 +22,26 @@
+ #include "server.h"
+ #include "linux-low.h"
+
++#include <sys/ptrace.h>
++
++/* Correct for all GNU/Linux targets (for quite some time). */
++#define GDB_GREGSET_T elf_gregset_t
++#define GDB_FPREGSET_T elf_fpregset_t
++
++#ifndef HAVE_ELF_FPREGSET_T
++/* Make sure we have said types. Not all platforms bring in <linux/elf.h>
++ via <sys/procfs.h>. */
++#ifdef HAVE_LINUX_ELF_H
++#include <linux/elf.h>
++#endif
++#endif
++
++#include "../gdb_proc_service.h"
++
++#ifndef PTRACE_GET_THREAD_AREA
++#define PTRACE_GET_THREAD_AREA 25
++#endif
++
+ #ifdef HAVE_SYS_REG_H
+ #include <sys/reg.h>
+ #endif
+@@ -140,6 +160,23 @@
+ return 0;
+ }
+
++/* Fetch the thread-local storage pointer for libthread_db. */
++
++ps_err_e
++ps_get_thread_area (const struct ps_prochandle *ph,
++ lwpid_t lwpid, int idx, void **base)
++{
++ if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
++ return PS_ERR;
++
++ /* IDX is the bias from the thread pointer to the beginning of the
++ thread descriptor. It has to be subtracted due to implementation
++ quirks in libthread_db. */
++ *base = (void *) ((char *)*base - idx);
++
++ return PS_OK;
++}
++
+ struct linux_target_ops the_low_target = {
+ mips_num_regs,
+ mips_regmap,
+diff -urN gdb-6.3.50.20050915/gdb/mips-linux-nat.c gdb-6.3.50.20050915-patched/gdb/mips-linux-nat.c
+--- gdb-6.3.50.20050915/gdb/mips-linux-nat.c 2005-09-10 13:11:04.000000000 -0500
++++ gdb-6.3.50.20050915-patched/gdb/mips-linux-nat.c 2005-09-15 19:16:54.000000000 -0500
+@@ -24,6 +24,12 @@
+ #include "target.h"
+ #include "linux-nat.h"
+
++#include "gdb_proc_service.h"
++
++#ifndef PTRACE_GET_THREAD_AREA
++#define PTRACE_GET_THREAD_AREA 25
++#endif
++
+ /* Pseudo registers can not be read. ptrace does not provide a way to
+ read (or set) MIPS_PS_REGNUM, and there's no point in reading or
+ setting MIPS_ZERO_REGNUM. We also can not set BADVADDR, CAUSE, or
+@@ -72,3 +78,20 @@
+ {
+ add_target (linux_target ());
+ }
++
++/* Fetch the thread-local storage pointer for libthread_db. */
++
++ps_err_e
++ps_get_thread_area (const struct ps_prochandle *ph,
++ lwpid_t lwpid, int idx, void **base)
++{
++ if (ptrace (PTRACE_GET_THREAD_AREA, lwpid, NULL, base) != 0)
++ return PS_ERR;
++
++ /* IDX is the bias from the thread pointer to the beginning of the
++ thread descriptor. It has to be subtracted due to implementation
++ quirks in libthread_db. */
++ *base = (void *) ((char *)*base - idx);
++
++ return PS_OK;
++}
diff --git a/misc/buildroot/toolchain/gdb/snapshot/500-thread-timeout.patch b/misc/buildroot/toolchain/gdb/snapshot/500-thread-timeout.patch
new file mode 100644
index 000000000..6db0a7a47
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/snapshot/500-thread-timeout.patch
@@ -0,0 +1,34 @@
+--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
++++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
+@@ -21,6 +21,7 @@
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
++#include <unistd.h>
+ #include "server.h"
+
+ #include "linux-low.h"
+@@ -142,6 +143,7 @@
+ td_event_msg_t msg;
+ td_err_e err;
+ struct inferior_linux_data *tdata;
++ int timeout;
+
+ if (debug_threads)
+ fprintf (stderr, "Thread creation event.\n");
+@@ -152,7 +154,13 @@
+ In the LinuxThreads implementation, this is safe,
+ because all events come from the manager thread
+ (except for its own creation, of course). */
+- err = td_ta_event_getmsg (thread_agent, &msg);
++ for (timeout = 0; timeout < 50000; timeout++)
++ {
++ err = td_ta_event_getmsg (thread_agent, &msg);
++ if (err != TD_NOMSG)
++ break;
++ usleep(1000);
++ }
+ if (err != TD_OK)
+ fprintf (stderr, "thread getmsg err: %s\n",
+ thread_db_err_str (err));
+
diff --git a/misc/buildroot/toolchain/gdb/snapshot/680-debian_sim-destdir.patch b/misc/buildroot/toolchain/gdb/snapshot/680-debian_sim-destdir.patch
new file mode 100644
index 000000000..1663f5505
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/snapshot/680-debian_sim-destdir.patch
@@ -0,0 +1,14 @@
+Fix some missing uses of DESTDIR in the sim/ directories. The Debian
+packages use DESTDIR to build.
+--
+diff -ur gdb-6.3.50.20050915/sim/Makefile.in gdb-6.3.50.20050915-patched/sim/Makefile.in
+--- gdb-6.3.50.20050915/sim/Makefile.in 2005-01-28 18:53:13.000000000 -0600
++++ gdb-6.3.50.20050915-patched/sim/Makefile.in 2005-09-15 23:17:42.000000000 -0500
+@@ -93,6 +93,7 @@
+ "CC=$(CC)" \
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS=$(CFLAGS)" \
++ "DESTDIR=$(DESTDIR)" \
+ "CHILLFLAGS=$(CHILLFLAGS)" \
+ "CHILL=$(CHILL_FOR_TARGET)" \
+ "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
diff --git a/misc/buildroot/toolchain/gdb/snapshot/690-debian_member-field-symtab.patch b/misc/buildroot/toolchain/gdb/snapshot/690-debian_member-field-symtab.patch
new file mode 100644
index 000000000..54d43ad64
--- /dev/null
+++ b/misc/buildroot/toolchain/gdb/snapshot/690-debian_member-field-symtab.patch
@@ -0,0 +1,20 @@
+Status: unsubmitted
+
+This patch was for Debian bug #239535. It needs to be tested, and
+submitted.
+--
+diff -ur gdb-6.3.50.20050915/gdb/valops.c gdb-6.3.50.20050915-patched/gdb/valops.c
+--- gdb-6.3.50.20050915/gdb/valops.c 2005-05-26 23:39:32.000000000 -0500
++++ gdb-6.3.50.20050915-patched/gdb/valops.c 2005-09-15 23:21:49.000000000 -0500
+@@ -2256,8 +2256,10 @@
+ return 1;
+ }
+
++ /* Check each baseclass. Call check_typedef, which will follow typedefs
++ and do opaque/stub type resolution. */
+ for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
+- if (check_field_in (TYPE_BASECLASS (type, i), name))
++ if (check_field_in (check_typedef (TYPE_BASECLASS (type, i)), name))
+ return 1;
+
+ return 0;
diff --git a/misc/buildroot/toolchain/patch-kernel.sh b/misc/buildroot/toolchain/patch-kernel.sh
new file mode 100755
index 000000000..b6722cecd
--- /dev/null
+++ b/misc/buildroot/toolchain/patch-kernel.sh
@@ -0,0 +1,54 @@
+#! /bin/sh
+# A little script I whipped up to make it easy to
+# patch source trees and have sane error handling
+# -Erik
+#
+# (c) 2002 Erik Andersen <andersen@codepoet.org>
+
+# Set directories from arguments, or use defaults.
+targetdir=${1-.}
+patchdir=${2-../kernel-patches}
+shift 2
+patchpattern=${@-*}
+
+if [ ! -d "${targetdir}" ] ; then
+ echo "Aborting. '${targetdir}' is not a directory."
+ exit 1
+fi
+if [ ! -d "${patchdir}" ] ; then
+ echo "Aborting. '${patchdir}' is not a directory."
+ exit 1
+fi
+
+for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
+ case "$i" in
+ *.gz)
+ type="gzip"; uncomp="gunzip -dc"; ;;
+ *.bz)
+ type="bzip"; uncomp="bunzip -dc"; ;;
+ *.bz2)
+ type="bzip2"; uncomp="bunzip2 -dc"; ;;
+ *.zip)
+ type="zip"; uncomp="unzip -d"; ;;
+ *.Z)
+ type="compress"; uncomp="uncompress -c"; ;;
+ *)
+ type="plaintext"; uncomp="cat"; ;;
+ esac
+ echo ""
+ echo "Applying ${i} using ${type}: "
+ ${uncomp} ${patchdir}/${i} | patch -p1 -E -d ${targetdir}
+ if [ $? != 0 ] ; then
+ echo "Patch failed! Please fix $i!"
+ exit 1
+ fi
+done
+
+# Check for rejects...
+if [ "`find $targetdir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then
+ echo "Aborting. Reject files found."
+ exit 1
+fi
+
+# Remove backup files
+find $targetdir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \;
diff --git a/misc/buildroot/toolchain/sstrip/Config.in b/misc/buildroot/toolchain/sstrip/Config.in
new file mode 100644
index 000000000..f6fe458e2
--- /dev/null
+++ b/misc/buildroot/toolchain/sstrip/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_SSTRIP_TARGET
+ bool "Install sstrip for the target system"
+ default n
+ help
+ Maximal 'strip'ing utility.
+
+config BR2_PACKAGE_SSTRIP_HOST
+ bool "Install sstrip for the host/build system"
+ default n
+ help
+ Maximal 'strip'ing utility.
diff --git a/misc/buildroot/toolchain/sstrip/sstrip.c b/misc/buildroot/toolchain/sstrip/sstrip.c
new file mode 100644
index 000000000..1842f053c
--- /dev/null
+++ b/misc/buildroot/toolchain/sstrip/sstrip.c
@@ -0,0 +1,468 @@
+/* http://www.muppetlabs.com/~breadbox/software/elfkickers.html */
+
+/* sstrip: Copyright (C) 1999-2001 by Brian Raiter, under the GNU
+ * General Public License. No warranty. See COPYING for details.
+ *
+ * Aug 23, 2004 Hacked by Manuel Novoa III <mjn3@codepoet.org> to
+ * handle targets of different endianness and/or elf class, making
+ * it more useful in a cross-devel environment.
+ */
+
+/* ============== original README ===================
+ *
+ * sstrip is a small utility that removes the contents at the end of an
+ * ELF file that are not part of the program's memory image.
+ *
+ * Most ELF executables are built with both a program header table and a
+ * section header table. However, only the former is required in order
+ * for the OS to load, link and execute a program. sstrip attempts to
+ * extract the ELF header, the program header table, and its contents,
+ * leaving everything else in the bit bucket. It can only remove parts of
+ * the file that occur at the end, after the parts to be saved. However,
+ * this almost always includes the section header table, and occasionally
+ * a few random sections that are not used when running a program.
+ *
+ * It should be noted that the GNU bfd library is (understandably)
+ * dependent on the section header table as an index to the file's
+ * contents. Thus, an executable file that has no section header table
+ * cannot be used with gdb, objdump, or any other program based upon the
+ * bfd library, at all. In fact, the program will not even recognize the
+ * file as a valid executable. (This limitation is noted in the source
+ * code comments for bfd, and is marked "FIXME", so this may change at
+ * some future date. However, I would imagine that it is a pretty
+ * low-priority item, as executables without a section header table are
+ * rare in the extreme.) This probably also explains why strip doesn't
+ * offer the option to do this.
+ *
+ * Shared library files may also have their section header table removed.
+ * Such a library will still function; however, it will no longer be
+ * possible for a compiler to link a new program against it.
+ *
+ * As an added bonus, sstrip also tries to removes trailing zero bytes
+ * from the end of the file. (This normally cannot be done with an
+ * executable that has a section header table.)
+ *
+ * sstrip is a very simplistic program. It depends upon the common
+ * practice of putting the parts of the file that contribute to the
+ * memory image at the front, and the remaining material at the end. This
+ * permits it to discard the latter material without affecting file
+ * offsets and memory addresses in what remains. Of course, the ELF
+ * standard permits files to be organized in almost any order, so if a
+ * pathological linker decided to put its section headers at the top,
+ * sstrip would be useless on such executables.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <elf.h>
+#include <endian.h>
+#include <byteswap.h>
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+/* The name of the program.
+ */
+static char const *progname;
+
+/* The name of the current file.
+ */
+static char const *filename;
+
+
+/* A simple error-handling function. FALSE is always returned for the
+ * convenience of the caller.
+ */
+static int err(char const *errmsg)
+{
+ fprintf(stderr, "%s: %s: %s\n", progname, filename, errmsg);
+ return FALSE;
+}
+
+/* A flag to signal the need for endian reversal.
+ */
+static int do_reverse_endian;
+
+/* Get a value from the elf header, compensating for endianness.
+ */
+#define EGET(X) \
+ (__extension__ ({ \
+ uint64_t __res; \
+ if (!do_reverse_endian) { \
+ __res = (X); \
+ } else if (sizeof(X) == 1) { \
+ __res = (X); \
+ } else if (sizeof(X) == 2) { \
+ __res = bswap_16((X)); \
+ } else if (sizeof(X) == 4) { \
+ __res = bswap_32((X)); \
+ } else if (sizeof(X) == 8) { \
+ __res = bswap_64((X)); \
+ } else { \
+ fprintf(stderr, "%s: %s: EGET failed for size %d\n", \
+ progname, filename, sizeof(X)); \
+ exit(EXIT_FAILURE); \
+ } \
+ __res; \
+ }))
+
+/* Set a value 'Y' in the elf header to 'X', compensating for endianness.
+ */
+#define ESET(Y,X) \
+ do if (!do_reverse_endian) { \
+ Y = (X); \
+ } else if (sizeof(Y) == 1) { \
+ Y = (X); \
+ } else if (sizeof(Y) == 2) { \
+ Y = bswap_16((uint16_t)(X)); \
+ } else if (sizeof(Y) == 4) { \
+ Y = bswap_32((uint32_t)(X)); \
+ } else if (sizeof(Y) == 8) { \
+ Y = bswap_64((uint64_t)(X)); \
+ } else { \
+ fprintf(stderr, "%s: %s: ESET failed for size %d\n", \
+ progname, filename, sizeof(Y)); \
+ exit(EXIT_FAILURE); \
+ } while (0)
+
+
+/* A macro for I/O errors: The given error message is used only when
+ * errno is not set.
+ */
+#define ferr(msg) (err(errno ? strerror(errno) : (msg)))
+
+
+
+#define HEADER_FUNCTIONS(CLASS) \
+ \
+/* readelfheader() reads the ELF header into our global variable, and \
+ * checks to make sure that this is in fact a file that we should be \
+ * munging. \
+ */ \
+static int readelfheader ## CLASS (int fd, Elf ## CLASS ## _Ehdr *ehdr) \
+{ \
+ if (read(fd, ((char *)ehdr)+EI_NIDENT, sizeof(*ehdr) - EI_NIDENT) \
+ != sizeof(*ehdr) - EI_NIDENT) \
+ return ferr("missing or incomplete ELF header."); \
+ \
+ /* Verify the sizes of the ELF header and the program segment \
+ * header table entries. \
+ */ \
+ if (EGET(ehdr->e_ehsize) != sizeof(Elf ## CLASS ## _Ehdr)) \
+ return err("unrecognized ELF header size."); \
+ if (EGET(ehdr->e_phentsize) != sizeof(Elf ## CLASS ## _Phdr)) \
+ return err("unrecognized program segment header size."); \
+ \
+ /* Finally, check the file type. \
+ */ \
+ if (EGET(ehdr->e_type) != ET_EXEC && EGET(ehdr->e_type) != ET_DYN) \
+ return err("not an executable or shared-object library."); \
+ \
+ return TRUE; \
+} \
+ \
+/* readphdrtable() loads the program segment header table into memory. \
+ */ \
+static int readphdrtable ## CLASS (int fd, Elf ## CLASS ## _Ehdr const *ehdr, \
+ Elf ## CLASS ## _Phdr **phdrs) \
+{ \
+ size_t size; \
+ \
+ if (!EGET(ehdr->e_phoff) || !EGET(ehdr->e_phnum) \
+) return err("ELF file has no program header table."); \
+ \
+ size = EGET(ehdr->e_phnum) * sizeof **phdrs; \
+ if (!(*phdrs = malloc(size))) \
+ return err("Out of memory!"); \
+ \
+ errno = 0; \
+ if (read(fd, *phdrs, size) != (ssize_t)size) \
+ return ferr("missing or incomplete program segment header table."); \
+ \
+ return TRUE; \
+} \
+ \
+/* getmemorysize() determines the offset of the last byte of the file \
+ * that is referenced by an entry in the program segment header table. \
+ * (Anything in the file after that point is not used when the program \
+ * is executing, and thus can be safely discarded.) \
+ */ \
+static int getmemorysize ## CLASS (Elf ## CLASS ## _Ehdr const *ehdr, \
+ Elf ## CLASS ## _Phdr const *phdrs, \
+ unsigned long *newsize) \
+{ \
+ Elf ## CLASS ## _Phdr const *phdr; \
+ unsigned long size, n; \
+ int i; \
+ \
+ /* Start by setting the size to include the ELF header and the \
+ * complete program segment header table. \
+ */ \
+ size = EGET(ehdr->e_phoff) + EGET(ehdr->e_phnum) * sizeof *phdrs; \
+ if (size < sizeof *ehdr) \
+ size = sizeof *ehdr; \
+ \
+ /* Then keep extending the size to include whatever data the \
+ * program segment header table references. \
+ */ \
+ for (i = 0, phdr = phdrs ; i < EGET(ehdr->e_phnum) ; ++i, ++phdr) { \
+ if (EGET(phdr->p_type) != PT_NULL) { \
+ n = EGET(phdr->p_offset) + EGET(phdr->p_filesz); \
+ if (n > size) \
+ size = n; \
+ } \
+ } \
+ \
+ *newsize = size; \
+ return TRUE; \
+} \
+ \
+/* modifyheaders() removes references to the section header table if \
+ * it was stripped, and reduces program header table entries that \
+ * included truncated bytes at the end of the file. \
+ */ \
+static int modifyheaders ## CLASS (Elf ## CLASS ## _Ehdr *ehdr, \
+ Elf ## CLASS ## _Phdr *phdrs, \
+ unsigned long newsize) \
+{ \
+ Elf ## CLASS ## _Phdr *phdr; \
+ int i; \
+ \
+ /* If the section header table is gone, then remove all references \
+ * to it in the ELF header. \
+ */ \
+ if (EGET(ehdr->e_shoff) >= newsize) { \
+ ESET(ehdr->e_shoff,0); \
+ ESET(ehdr->e_shnum,0); \
+ ESET(ehdr->e_shentsize,0); \
+ ESET(ehdr->e_shstrndx,0); \
+ } \
+ \
+ /* The program adjusts the file size of any segment that was \
+ * truncated. The case of a segment being completely stripped out \
+ * is handled separately. \
+ */ \
+ for (i = 0, phdr = phdrs ; i < EGET(ehdr->e_phnum) ; ++i, ++phdr) { \
+ if (EGET(phdr->p_offset) >= newsize) { \
+ ESET(phdr->p_offset,newsize); \
+ ESET(phdr->p_filesz,0); \
+ } else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \
+ newsize -= EGET(phdr->p_offset); \
+ ESET(phdr->p_filesz, newsize); \
+ } \
+ } \
+ \
+ return TRUE; \
+} \
+ \
+/* commitchanges() writes the new headers back to the original file \
+ * and sets the file to its new size. \
+ */ \
+static int commitchanges ## CLASS (int fd, Elf ## CLASS ## _Ehdr const *ehdr, \
+ Elf ## CLASS ## _Phdr *phdrs, \
+ unsigned long newsize) \
+{ \
+ size_t n; \
+ \
+ /* Save the changes to the ELF header, if any. \
+ */ \
+ if (lseek(fd, 0, SEEK_SET)) \
+ return ferr("could not rewind file"); \
+ errno = 0; \
+ if (write(fd, ehdr, sizeof *ehdr) != sizeof *ehdr) \
+ return err("could not modify file"); \
+ \
+ /* Save the changes to the program segment header table, if any. \
+ */ \
+ if (lseek(fd, EGET(ehdr->e_phoff), SEEK_SET) == (off_t)-1) { \
+ err("could not seek in file."); \
+ goto warning; \
+ } \
+ n = EGET(ehdr->e_phnum) * sizeof *phdrs; \
+ if (write(fd, phdrs, n) != (ssize_t)n) { \
+ err("could not write to file"); \
+ goto warning; \
+ } \
+ \
+ /* Eleventh-hour sanity check: don't truncate before the end of \
+ * the program segment header table. \
+ */ \
+ if (newsize < EGET(ehdr->e_phoff) + n) \
+ newsize = EGET(ehdr->e_phoff) + n; \
+ \
+ /* Chop off the end of the file. \
+ */ \
+ if (ftruncate(fd, newsize)) { \
+ err("could not resize file"); \
+ goto warning; \
+ } \
+ \
+ return TRUE; \
+ \
+ warning: \
+ return err("ELF file may have been corrupted!"); \
+}
+
+
+/* First elements of Elf32_Ehdr and Elf64_Ehdr are common.
+ */
+static int readelfheaderident(int fd, Elf32_Ehdr *ehdr)
+{
+ errno = 0;
+ if (read(fd, ehdr, EI_NIDENT) != EI_NIDENT)
+ return ferr("missing or incomplete ELF header.");
+
+ /* Check the ELF signature.
+ */
+ if (!(ehdr->e_ident[EI_MAG0] == ELFMAG0 &&
+ ehdr->e_ident[EI_MAG1] == ELFMAG1 &&
+ ehdr->e_ident[EI_MAG2] == ELFMAG2 &&
+ ehdr->e_ident[EI_MAG3] == ELFMAG3))
+ {
+ err("missing ELF signature.");
+ return -1;
+ }
+
+ /* Compare the file's class and endianness with the program's.
+ */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) {
+ do_reverse_endian = 0;
+ } else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) {
+/* fprintf(stderr, "ELF file has different endianness.\n"); */
+ do_reverse_endian = 1;
+ }
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) {
+/* fprintf(stderr, "ELF file has different endianness.\n"); */
+ do_reverse_endian = 1;
+ } else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) {
+ do_reverse_endian = 0;
+ }
+#else
+#error unkown endianness
+#endif
+ else {
+ err("Unsupported endianness");
+ return -1;
+ }
+
+ /* Check the target architecture.
+ */
+/* if (EGET(ehdr->e_machine) != ELF_ARCH) { */
+/* /\* return err("ELF file created for different architecture."); *\/ */
+/* fprintf(stderr, "ELF file created for different architecture.\n"); */
+/* } */
+ return ehdr->e_ident[EI_CLASS];
+}
+
+
+HEADER_FUNCTIONS(32)
+
+HEADER_FUNCTIONS(64)
+
+/* truncatezeros() examines the bytes at the end of the file's
+ * size-to-be, and reduces the size to exclude any trailing zero
+ * bytes.
+ */
+static int truncatezeros(int fd, unsigned long *newsize)
+{
+ unsigned char contents[1024];
+ unsigned long size, n;
+
+ size = *newsize;
+ do {
+ n = sizeof contents;
+ if (n > size)
+ n = size;
+ if (lseek(fd, size - n, SEEK_SET) == (off_t)-1)
+ return ferr("cannot seek in file.");
+ if (read(fd, contents, n) != (ssize_t)n)
+ return ferr("cannot read file contents");
+ while (n && !contents[--n])
+ --size;
+ } while (size && !n);
+
+ /* Sanity check.
+ */
+ if (!size)
+ return err("ELF file is completely blank!");
+
+ *newsize = size;
+ return TRUE;
+}
+
+/* main() loops over the cmdline arguments, leaving all the real work
+ * to the other functions.
+ */
+int main(int argc, char *argv[])
+{
+ int fd;
+ union {
+ Elf32_Ehdr ehdr32;
+ Elf64_Ehdr ehdr64;
+ } e;
+ union {
+ Elf32_Phdr *phdrs32;
+ Elf64_Phdr *phdrs64;
+ } p;
+ unsigned long newsize;
+ char **arg;
+ int failures = 0;
+
+ if (argc < 2 || argv[1][0] == '-') {
+ printf("Usage: sstrip FILE...\n"
+ "sstrip discards all nonessential bytes from an executable.\n\n"
+ "Version 2.0-X Copyright (C) 2000,2001 Brian Raiter.\n"
+ "Cross-devel hacks Copyright (C) 2004 Manuel Novoa III.\n"
+ "This program is free software, licensed under the GNU\n"
+ "General Public License. There is absolutely no warranty.\n");
+ return EXIT_SUCCESS;
+ }
+
+ progname = argv[0];
+
+ for (arg = argv + 1 ; *arg != NULL ; ++arg) {
+ filename = *arg;
+
+ fd = open(*arg, O_RDWR);
+ if (fd < 0) {
+ ferr("can't open");
+ ++failures;
+ continue;
+ }
+
+ switch (readelfheaderident(fd, &e.ehdr32)) {
+ case ELFCLASS32:
+ if (!(readelfheader32(fd, &e.ehdr32) &&
+ readphdrtable32(fd, &e.ehdr32, &p.phdrs32) &&
+ getmemorysize32(&e.ehdr32, p.phdrs32, &newsize) &&
+ truncatezeros(fd, &newsize) &&
+ modifyheaders32(&e.ehdr32, p.phdrs32, newsize) &&
+ commitchanges32(fd, &e.ehdr32, p.phdrs32, newsize)))
+ ++failures;
+ break;
+ case ELFCLASS64:
+ if (!(readelfheader64(fd, &e.ehdr64) &&
+ readphdrtable64(fd, &e.ehdr64, &p.phdrs64) &&
+ getmemorysize64(&e.ehdr64, p.phdrs64, &newsize) &&
+ truncatezeros(fd, &newsize) &&
+ modifyheaders64(&e.ehdr64, p.phdrs64, newsize) &&
+ commitchanges64(fd, &e.ehdr64, p.phdrs64, newsize)))
+ ++failures;
+ break;
+ default:
+ ++failures;
+ break;
+ }
+ close(fd);
+ }
+
+ return failures ? EXIT_FAILURE : EXIT_SUCCESS;
+}
diff --git a/misc/buildroot/toolchain/sstrip/sstrip.mk b/misc/buildroot/toolchain/sstrip/sstrip.mk
new file mode 100644
index 000000000..d18853118
--- /dev/null
+++ b/misc/buildroot/toolchain/sstrip/sstrip.mk
@@ -0,0 +1,69 @@
+######################################################################
+#
+# sstrip
+#
+######################################################################
+
+SSTRIP_SOURCE_FILE:=$(TOPDIR)/toolchain/sstrip/sstrip.c
+
+######################################################################
+#
+# sstrip host
+#
+######################################################################
+
+SSTRIP_HOST:=$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-sstrip
+
+$(SSTRIP_HOST): $(SSTRIP_SOURCE_FILE)
+ ln -snf ../../bin/$(REAL_GNU_TARGET_NAME)-sstrip \
+ $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/sstrip
+ ln -snf $(REAL_GNU_TARGET_NAME)-sstrip \
+ $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-sstrip
+ $(HOSTCC) $(SSTRIP_SOURCE_FILE) -o $(SSTRIP_HOST)
+
+sstrip_host: $(SSTRIP_HOST)
+
+sstrip_host-source: $(SSTRIP_SOURCE_FILE)
+
+sstrip_host-clean:
+ rm -f $(SSTRIP_HOST)
+ rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/sstrip
+ rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-sstrip
+
+sstrip_host-dirclean:
+ true
+
+######################################################################
+#
+# sstrip target
+#
+######################################################################
+
+SSTRIP_TARGET:=$(TARGET_DIR)/usr/bin/sstrip
+
+$(SSTRIP_TARGET): $(SSTRIP_SOURCE_FILE)
+ $(TARGET_CC) $(TARGET_CFLAGS) $(SSTRIP_SOURCE_FILE) -o $(SSTRIP_TARGET)
+
+sstrip_target: $(SSTRIP_TARGET)
+
+sstrip_target-source: $(SSTRIP_SOURCE_FILE)
+
+sstrip_target-clean:
+ rm -f $(SSTRIP_TARGET)
+
+sstrip_target-dirclean:
+ true
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+
+ifeq ($(strip $(BR2_PACKAGE_SSTRIP_HOST)),y)
+TARGETS+=sstrip_host
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_SSTRIP_TARGET)),y)
+TARGETS+=sstrip_target
+endif