Linux Kernel Patch v2.3, patch-2.3.4 (00/50)

20 views
Skip to first unread message

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part00

lines added deleted
linux/CREDITS : 23 3 6
linux/Documentation/Configure.help : 128 108 0
linux/Documentation/filesystems/isofs.txt : 5 2 0
linux/Documentation/isdn/HiSax.cert : 76 76 0
linux/Documentation/isdn/INTERFACE : 31 12 2
linux/Documentation/isdn/README : 426 102 82
linux/Documentation/isdn/README.HiSax : 355 112 60
linux/Documentation/isdn/README.act2000 : 14 2 2
linux/Documentation/isdn/README.audio : 39 10 8
linux/Documentation/isdn/README.concap : 4 1 0
linux/Documentation/isdn/README.eicon : 92 92 0
linux/Documentation/isdn/README.icn : 5 1 1
linux/Documentation/isdn/README.x25 : 266 69 116
linux/Documentation/networking/decnet.txt : 146 146 0
linux/Documentation/sound/CMI8330 : 104 33 21
linux/Documentation/sound/CMI8338 : 32 32 0
linux/Makefile : 7 1 1
linux/README : 31 4 4
linux/arch/alpha/kernel/process.c : 12 2 2
linux/arch/alpha/kernel/ptrace.c : 9 2 1
linux/arch/arm/kernel/ptrace.c : 7 1 0
linux/arch/i386/defconfig : 10 2 0
linux/arch/mips/kernel/ptrace.c : 7 1 0
linux/arch/ppc/Makefile : 10 4 0
linux/arch/ppc/boot/Makefile : 17 8 2
linux/arch/ppc/boot/misc.c : 17 2 2
linux/arch/ppc/chrpboot/Makefile : 23 8 2
linux/arch/ppc/coffboot/Makefile : 18 8 2
linux/arch/ppc/common_defconfig : 207 30 52
linux/arch/ppc/config.in : 28 8 3
linux/arch/ppc/defconfig : 207 30 52
linux/arch/ppc/kernel/Makefile : 8 1 1
linux/arch/ppc/kernel/chrp_pci.c : 7 1 0
linux/arch/ppc/kernel/chrp_setup.c : 29 0 23
linux/arch/ppc/kernel/head.S : 215 89 12
linux/arch/ppc/kernel/mbx_setup.c : 6 1 1
linux/arch/ppc/kernel/misc.S : 15 0 9
linux/arch/ppc/kernel/pmac_setup.c : 29 5 3
linux/arch/ppc/kernel/prep_pci.c : 24 5 1
linux/arch/ppc/kernel/prep_setup.c : 29 4 5
linux/arch/ppc/kernel/process.c : 42 3 21
linux/arch/ppc/kernel/ptrace.c : 13 5 1
linux/arch/ppc/kernel/residual.c : 6 1 1
linux/arch/ppc/kernel/setup.c : 6 1 1
linux/arch/ppc/kernel/softemu8xx.c : 20 7 0
linux/arch/ppc/kernel/syscalls.c : 16 1 4
linux/arch/ppc/kernel/traps.c : 23 0 3
linux/arch/ppc/mm/fault.c : 15 0 2
linux/arch/ppc/mm/init.c : 15 2 2
linux/arch/ppc/xmon/Makefile : 6 6 0
linux/arch/ppc/xmon/adb.c : 212 212 0
linux/arch/ppc/xmon/ansidecl.h : 141 141 0
linux/arch/ppc/xmon/nonstdio.h : 22 22 0
linux/arch/ppc/xmon/ppc-dis.c : 190 190 0
linux/arch/ppc/xmon/ppc-opc.c : 2816 2816 0
linux/arch/ppc/xmon/ppc.h : 240 240 0
linux/arch/ppc/xmon/privinst.h : 73 73 0
linux/arch/ppc/xmon/setjmp.c : 29 29 0
linux/arch/ppc/xmon/start.c : 298 298 0
linux/arch/ppc/xmon/subr_prf.c : 47 47 0
linux/arch/ppc/xmon/xmon.c : 1323 1323 0
linux/arch/sparc/defconfig : 26 6 0
linux/arch/sparc/kernel/irq.c : 32 3 5
linux/arch/sparc/kernel/ptrace.c : 7 1 0
linux/arch/sparc/kernel/setup.c : 13 2 1
linux/arch/sparc/kernel/sys_sunos.c : 14 2 2
linux/arch/sparc/math-emu/Makefile : 16 3 3
linux/arch/sparc/math-emu/fabss.c : 13 7 1
linux/arch/sparc/math-emu/fcmpd.c : 42 24 9
linux/arch/sparc/math-emu/fcmped.c : 42 24 9
linux/arch/sparc/math-emu/fcmpeq.c : 40 22 7
linux/arch/sparc/math-emu/fcmpes.c : 42 24 9
linux/arch/sparc/math-emu/fcmpq.c : 40 22 7
linux/arch/sparc/math-emu/fcmps.c : 42 24 9
linux/arch/sparc/math-emu/fdmulq.c : 29 14 3
linux/arch/sparc/math-emu/fdtoq.c : 25 13 2
linux/arch/sparc/math-emu/fdtos.c : 25 13 2
linux/arch/sparc/math-emu/fmovs.c : 10 7 0
linux/arch/sparc/math-emu/fnegs.c : 10 7 0
linux/arch/sparc/math-emu/fqtod.c : 25 13 2
linux/arch/sparc/math-emu/fqtos.c : 25 13 2
linux/arch/sparc/math-emu/fsmuld.c : 29 14 3
linux/arch/sparc/math-emu/fstod.c : 25 13 2
linux/arch/sparc/math-emu/fstoq.c : 25 13 2
linux/arch/sparc/math-emu/math.c : 659 235 324
linux/arch/sparc/math-emu/sfp-machine.h : 545 156 350
linux/arch/sparc/math-emu/sfp-util.h : 115 115 0
linux/arch/sparc64/defconfig : 26 6 0
linux/arch/sparc64/kernel/etrap.S : 34 4 6
linux/arch/sparc64/kernel/head.S : 13 2 1
linux/arch/sparc64/kernel/process.c : 5 1 1
linux/arch/sparc64/kernel/ptrace.c : 7 1 0
linux/arch/sparc64/kernel/rtrap.S : 13 1 2
linux/arch/sparc64/kernel/setup.c : 15 3 1
linux/arch/sparc64/kernel/smp.c : 35 10 9
linux/arch/sparc64/kernel/sys_sunos32.c : 14 2 2
linux/arch/sparc64/kernel/trampoline.S : 14 3 1
linux/arch/sparc64/kernel/traps.c : 76 30 7
linux/arch/sparc64/kernel/unaligned.c : 44 8 5
linux/arch/sparc64/lib/VIS.h : 51 19 4
linux/arch/sparc64/lib/VISbzero.S : 72 21 7
linux/arch/sparc64/lib/VIScopy.S : 219 73 32
linux/arch/sparc64/lib/VIScsum.S : 27 6 1
linux/arch/sparc64/lib/VIScsumcopy.S : 77 20 10
linux/arch/sparc64/lib/VISmemset.S : 23 4 2
linux/arch/sparc64/lib/blockops.S : 21 3 1
linux/arch/sparc64/lib/checksum.S : 20 3 0
linux/arch/sparc64/lib/strlen_user.S : 40 6 6
linux/arch/sparc64/lib/strncpy_from_user.S : 100 28 26
linux/arch/sparc64/math-emu/Makefile : 8 1 1
linux/arch/sparc64/math-emu/double.h : 161 87 19
linux/arch/sparc64/math-emu/extended.h : 388 388 0
linux/arch/sparc64/math-emu/fabsq.c : 10 7 0
linux/arch/sparc64/math-emu/faddd.c : 26 14 3
linux/arch/sparc64/math-emu/faddq.c : 26 14 3
linux/arch/sparc64/math-emu/fadds.c : 26 14 3
linux/arch/sparc64/math-emu/fcmpeq.c : 52 27 13
linux/arch/sparc64/math-emu/fcmpq.c : 52 27 13
linux/arch/sparc64/math-emu/fdivd.c : 33 14 10
linux/arch/sparc64/math-emu/fdivq.c : 33 14 10
linux/arch/sparc64/math-emu/fdivs.c : 34 14 10
linux/arch/sparc64/math-emu/fdmulq.c : 29 14 3
linux/arch/sparc64/math-emu/fdtoi.c : 30 17 5
linux/arch/sparc64/math-emu/fdtoq.c : 25 13 2
linux/arch/sparc64/math-emu/fdtos.c : 25 13 2
linux/arch/sparc64/math-emu/fdtox.c : 30 17 5
linux/arch/sparc64/math-emu/fitoq.c : 23 12 1
linux/arch/sparc64/math-emu/fmovq.c : 10 7 0
linux/arch/sparc64/math-emu/fmuld.c : 26 14 3
linux/arch/sparc64/math-emu/fmulq.c : 26 14 3
linux/arch/sparc64/math-emu/fmuls.c : 26 14 3
linux/arch/sparc64/math-emu/fnegq.c : 14 7 1
linux/arch/sparc64/math-emu/fqtod.c : 25 13 2
linux/arch/sparc64/math-emu/fqtoi.c : 30 17 5
linux/arch/sparc64/math-emu/fqtos.c : 25 13 2
linux/arch/sparc64/math-emu/fqtox.c : 30 17 5
linux/arch/sparc64/math-emu/fsmuld.c : 29 14 3
linux/arch/sparc64/math-emu/fsqrtd.c : 24 13 2
linux/arch/sparc64/math-emu/fsqrtq.c : 24 13 2
linux/arch/sparc64/math-emu/fsqrts.c : 24 13 2
linux/arch/sparc64/math-emu/fstod.c : 25 13 2
linux/arch/sparc64/math-emu/fstoi.c : 30 17 5
linux/arch/sparc64/math-emu/fstoq.c : 25 13 2
linux/arch/sparc64/math-emu/fstox.c : 30 17 5
linux/arch/sparc64/math-emu/fsubd.c : 28 14 3
linux/arch/sparc64/math-emu/fsubq.c : 28 14 3
linux/arch/sparc64/math-emu/fsubs.c : 28 14 3
linux/arch/sparc64/math-emu/fxtoq.c : 23 12 1
linux/arch/sparc64/math-emu/math.c : 88 19 28
linux/arch/sparc64/math-emu/op-1.h : 116 58 6
linux/arch/sparc64/math-emu/op-2.h : 519 214 134
linux/arch/sparc64/math-emu/op-4.h : 799 527 163
linux/arch/sparc64/math-emu/op-8.h : 103 103 0
linux/arch/sparc64/math-emu/op-common.h : 410 133 66
linux/arch/sparc64/math-emu/quad.h : 168 86 19
linux/arch/sparc64/math-emu/sfp-machine.h : 282 46 203
linux/arch/sparc64/math-emu/sfp-util.h : 120 120 0
linux/arch/sparc64/math-emu/single.h : 91 55 11
linux/arch/sparc64/math-emu/soft-fp.h : 177 103 21
linux/arch/sparc64/math-emu/udivmodti4.c : 191 0 191
linux/arch/sparc64/mm/init.c : 23 5 1
linux/arch/sparc64/solaris/ioctl.c : 16 4 1
linux/drivers/block/Makefile : 12 2 2
linux/drivers/block/aec6210.c : 7 0 1
linux/drivers/block/alim15x3.c : 7 1 0
linux/drivers/block/blkpg.c : 12 2 0
linux/drivers/block/cmd646.c : 21 7 5
linux/drivers/block/cy82c693.c : 8 1 1
linux/drivers/block/hpt343.c : 7 0 1
linux/drivers/block/ide-cd.c : 15 2 0
linux/drivers/block/ide-disk.c : 50 8 18
linux/drivers/block/ide-probe.c : 13 4 3
linux/drivers/block/ide.c : 92 25 11
linux/drivers/block/loop.c : 8 2 0
linux/drivers/block/ns87415.c : 25 17 0
linux/drivers/block/paride/paride.c : 17 2 2
linux/drivers/block/pdc202xx.c : 7 0 1
linux/drivers/block/pdc4030.c : 265 123 34
linux/drivers/block/via82c586.c : 7 1 0
linux/drivers/cdrom/sonycd535.c : 8 1 1
linux/drivers/char/Config.in : 7 1 0
linux/drivers/char/Makefile : 16 10 0
linux/drivers/char/bttv.c : 60 40 0
linux/drivers/char/bttv.h : 21 9 0
linux/drivers/char/cyclades.c : 775 211 152
linux/drivers/char/i2c-parport.c : 149 149 0
linux/drivers/char/keyboard.c : 20 3 3
linux/drivers/char/stallion.c : 8 1 1
linux/drivers/isdn/Config.in : 44 10 5
linux/drivers/isdn/Makefile : 32 12 1
linux/drivers/isdn/act2000/act2000.h : 32 8 4
linux/drivers/isdn/act2000/act2000_isa.c : 28 13 2
linux/drivers/isdn/act2000/act2000_isa.h : 20 5 2
linux/drivers/isdn/act2000/capi.c : 21 5 2
linux/drivers/isdn/act2000/capi.h : 20 5 2
linux/drivers/isdn/act2000/module.c : 105 20 14
linux/drivers/isdn/avmb1/b1capi.c : 384 155 29
linux/drivers/isdn/avmb1/b1lli.c : 705 377 52
linux/drivers/isdn/avmb1/b1pci.c : 55 22 4
linux/drivers/isdn/avmb1/capi.c : 70 29 2
linux/drivers/isdn/avmb1/capidev.h : 11 4 0
linux/drivers/isdn/avmb1/capidrv.c : 863 234 148
linux/drivers/isdn/avmb1/capidrv.h : 106 60 13
linux/drivers/isdn/avmb1/compat.h : 23 5 1
linux/drivers/isdn/eicon/Makefile : 13 13 0
linux/drivers/isdn/eicon/eicon.h : 528 528 0
linux/drivers/isdn/eicon/eicon_dsp.h : 304 304 0
linux/drivers/isdn/eicon/eicon_idi.c : 1479 1479 0
linux/drivers/isdn/eicon/eicon_idi.h : 248 248 0
linux/drivers/isdn/eicon/eicon_io.c : 755 755 0
linux/drivers/isdn/eicon/eicon_isa.c : 432 432 0
linux/drivers/isdn/eicon/eicon_isa.h : 144 144 0
linux/drivers/isdn/eicon/eicon_mod.c : 1210 1210 0
linux/drivers/isdn/eicon/eicon_pci.c : 952 952 0
linux/drivers/isdn/eicon/eicon_pci.h : 188 188 0
linux/drivers/isdn/hisax/Makefile : 107 42 6
linux/drivers/isdn/hisax/arcofi.c : 83 39 10
linux/drivers/isdn/hisax/arcofi.h : 25 9 2
linux/drivers/isdn/hisax/asuscom.c : 271 147 33
linux/drivers/isdn/hisax/avm_a1.c : 75 18 13
linux/drivers/isdn/hisax/avm_a1p.c : 334 334 0
linux/drivers/isdn/hisax/avm_pci.c : 865 865 0
linux/drivers/isdn/hisax/callc.c : 2275 638 788
linux/drivers/isdn/hisax/cert.c : 55 55 0
linux/drivers/isdn/hisax/config.c : 1311 971 67
linux/drivers/isdn/hisax/diva.c : 515 224 92
linux/drivers/isdn/hisax/elsa.c : 700 279 144
linux/drivers/isdn/hisax/elsa_ser.c : 749 749 0
linux/drivers/isdn/hisax/fsm.c : 204 42 73
linux/drivers/isdn/hisax/hfc_2bds0.c : 778 139 215
linux/drivers/isdn/hisax/hfc_2bs0.c : 369 80 98
linux/drivers/isdn/hisax/hisax.h : 866 312 196
linux/drivers/isdn/hisax/hscx.c : 348 125 80
linux/drivers/isdn/hisax/hscx.h : 20 5 1
linux/drivers/isdn/hisax/hscx_irq.c : 263 62 70
linux/drivers/isdn/hisax/ipac.h : 23 5 1
linux/drivers/isdn/hisax/isac.c : 586 152 155
linux/drivers/isdn/hisax/isac.h : 45 10 2
linux/drivers/isdn/hisax/isar.c : 937 937 0
linux/drivers/isdn/hisax/isar.h : 91 91 0
linux/drivers/isdn/hisax/isdnl1.c : 1420 298 796
linux/drivers/isdn/hisax/isdnl1.h : 55 15 19
linux/drivers/isdn/hisax/isdnl2.c : 1052 280 192
linux/drivers/isdn/hisax/isdnl3.c : 305 222 22
linux/drivers/isdn/hisax/isdnl3.h : 38 16 3
linux/drivers/isdn/hisax/ix1_micro.c : 36 6 6
linux/drivers/isdn/hisax/l3_1tr6.c : 638 199 133
linux/drivers/isdn/hisax/l3_1tr6.h : 20 5 1
linux/drivers/isdn/hisax/l3dss1.c : 1960 813 526
linux/drivers/isdn/hisax/l3dss1.h : 24 7 2
linux/drivers/isdn/hisax/lmgr.c : 56 19 11
linux/drivers/isdn/hisax/md5sums.asc : 29 29 0
linux/drivers/isdn/hisax/mic.c : 36 6 6
linux/drivers/isdn/hisax/netjet.c : 837 217 204
linux/drivers/isdn/hisax/niccy.c : 230 77 44
linux/drivers/isdn/hisax/q931.c : 261 94 40
linux/drivers/isdn/hisax/rawhdlc.c : 5 1 1
linux/drivers/isdn/hisax/s0box.c : 277 277 0
linux/drivers/isdn/hisax/sedlbauer.c : 670 469 79
linux/drivers/isdn/hisax/sportster.c : 42 10 6
linux/drivers/isdn/hisax/tei.c : 387 108 98
linux/drivers/isdn/hisax/teleint.c : 125 38 29
linux/drivers/isdn/hisax/teles0.c : 113 23 18
linux/drivers/isdn/hisax/teles3.c : 130 21 19
linux/drivers/isdn/hisax/teles3c.c : 69 12 18
linux/drivers/isdn/hisax/telespci.c : 371 371 0
linux/drivers/isdn/icn/icn.c : 127 65 7
linux/drivers/isdn/icn/icn.h : 11 2 2
linux/drivers/isdn/isdn_audio.c : 140 103 4
linux/drivers/isdn/isdn_audio.h : 42 16 2
linux/drivers/isdn/isdn_bsdcomp.c : 934 934 0
linux/drivers/isdn/isdn_budget.c : 206 206 0
linux/drivers/isdn/isdn_cards.c : 43 15 2
linux/drivers/isdn/isdn_cards.h : 20 5 2
linux/drivers/isdn/isdn_common.c : 1155 453 304
linux/drivers/isdn/isdn_common.h : 68 37 6
linux/drivers/isdn/isdn_concap.c : 50 15 9
linux/drivers/isdn/isdn_net.c : 1072 359 194
linux/drivers/isdn/isdn_net.h : 40 14 2
linux/drivers/isdn/isdn_ppp.c : 1586 949 143
linux/drivers/isdn/isdn_ppp.h : 25 7 1
linux/drivers/isdn/isdn_tty.c : 1097 562 117
linux/drivers/isdn/isdn_tty.h : 48 22 2
linux/drivers/isdn/isdn_x25iface.c : 37 18 2
linux/drivers/isdn/isdnloop/isdnloop.c : 44 17 3
linux/drivers/isdn/isdnloop/isdnloop.h : 15 4 1
linux/drivers/isdn/pcbit/callbacks.c : 42 23 4
linux/drivers/isdn/pcbit/drv.c : 9 3 0
linux/drivers/isdn/pcbit/pcbit.h : 11 4 0
linux/drivers/isdn/sc/message.c : 6 1 1
linux/drivers/misc/parport_init.c : 28 5 1
linux/drivers/misc/parport_pc.c : 133 86 4
linux/drivers/misc/parport_share.c : 125 84 11
linux/drivers/net/Space.c : 4 1 0
linux/drivers/net/arcnet.c : 22 4 0
linux/drivers/net/cosa.c : 28 6 2
linux/drivers/net/eexpress.c : 59 20 4
linux/drivers/net/hamradio/bpqether.c : 18 7 2
linux/drivers/net/irda/Config.in : 37 19 13
linux/drivers/net/irda/Makefile : 44 24 0
linux/drivers/net/irda/actisys.c : 266 56 91
linux/drivers/net/irda/esi.c : 153 27 45
linux/drivers/net/irda/girbil.c : 185 18 57
linux/drivers/net/irda/irport.c : 418 299 42
linux/drivers/net/irda/irtty.c : 270 43 124
linux/drivers/net/irda/litelink.c : 209 209 0
linux/drivers/net/irda/pc87108.c : 133 25 18
linux/drivers/net/irda/tekram.c : 185 23 64
linux/drivers/net/irda/toshoboe.c : 901 901 0
linux/drivers/net/irda/uircc.c : 75 11 7
linux/drivers/net/irda/w83977af_ir.c : 1126 291 238
linux/drivers/net/lapbether.c : 16 6 1
linux/drivers/net/net_init.c : 65 15 3
linux/drivers/net/smc-ultra.c : 10 1 1
linux/drivers/net/strip.c : 23 5 1
linux/drivers/net/sunhme.c : 24 5 5
linux/drivers/sbus/char/Config.in : 5 1 0
linux/drivers/sbus/char/Makefile : 14 8 0
linux/drivers/sbus/char/aurora.c : 2373 2373 0
linux/drivers/sbus/char/aurora.h : 278 278 0
linux/drivers/sbus/char/cd180.h : 240 240 0
linux/drivers/sbus/sbus.c : 25 7 1
linux/drivers/scsi/README.st : 24 1 10
linux/drivers/scsi/scsi.c : 31 11 0
linux/drivers/scsi/st.c : 33 2 4
linux/drivers/scsi/st.h : 7 0 1
linux/drivers/sound/Config.in : 7 1 0
linux/drivers/sound/Makefile : 7 1 0
linux/drivers/sound/cmpci.c : 2391 2391 0
linux/drivers/sound/es1370.c : 157 39 14
linux/drivers/sound/lowlevel/awe_wave.c : 12 2 2
linux/drivers/sound/sb_common.c : 101 38 15
linux/drivers/sound/sb_ess.c : 1428 428 592
linux/drivers/sound/sound_core.c : 9 3 0
linux/drivers/usb/Config.in : 46 16 15
linux/drivers/usb/Makefile : 176 87 49
linux/drivers/usb/acm.c : 184 96 23
linux/drivers/usb/audio.c : 25 15 0
linux/drivers/usb/cpia.c : 23 12 0
linux/drivers/usb/hub.c : 50 13 8
linux/drivers/usb/inits.h : 10 3 3
linux/drivers/usb/keyboard.c : 33 17 2
linux/drivers/usb/keymap.c : 15 2 2
linux/drivers/usb/maps/fixup.map : 16 1 2
linux/drivers/usb/mouse.c : 63 39 0
linux/drivers/usb/ohci-hcd.c : 325 98 55
linux/drivers/usb/ohci-hcd.h : 7 0 1
linux/drivers/usb/ohci.c : 252 50 43
linux/drivers/usb/ohci.h : 7 0 1
linux/drivers/usb/printer.c : 412 412 0
linux/drivers/usb/uhci-debug.c : 74 24 7
linux/drivers/usb/uhci.c : 568 155 81
linux/drivers/usb/uhci.h : 8 0 2
linux/drivers/usb/usb-core.c : 93 93 0
linux/drivers/usb/usb-debug.c : 9 5 1
linux/drivers/usb/usb.c : 471 247 61
linux/drivers/usb/usb.h : 131 28 7
linux/drivers/video/cgsixfb.c : 55 20 5
linux/drivers/video/vga16fb.c : 7 0 1
linux/fs/Config.in : 7 1 0
linux/fs/binfmt_aout.c : 40 26 1
linux/fs/binfmt_elf.c : 18 6 6
linux/fs/block_dev.c : 8 2 0
linux/fs/efs/.cvsignore : 2 0 2
linux/fs/efs/super.c : 29 5 1
linux/fs/exec.c : 14 2 3
linux/fs/isofs/inode.c : 110 38 5
linux/fs/ncpfs/ioctl.c : 8 1 1
linux/fs/open.c : 8 1 1
linux/fs/select.c : 13 5 1
linux/fs/stat.c : 35 4 4
linux/include/asm-alpha/processor.h : 12 6 0
linux/include/asm-alpha/semaphore.h : 118 70 8
linux/include/asm-arm/processor.h : 12 6 0
linux/include/asm-i386/processor.h : 21 8 0
linux/include/asm-i386/softirq.h : 23 10 0
linux/include/asm-i386/spinlock.h : 135 29 58
linux/include/asm-i386/system.h : 11 5 0
linux/include/asm-m68k/processor.h : 12 6 0
linux/include/asm-mips/processor.h : 12 6 0
linux/include/asm-ppc/ide.h : 54 20 7
linux/include/asm-ppc/mmu.h : 49 19 0
linux/include/asm-ppc/pgtable.h : 11 5 0
linux/include/asm-ppc/processor.h : 22 10 0
linux/include/asm-ppc/ptrace.h : 43 21 14
linux/include/asm-ppc/semaphore.h : 83 51 12
linux/include/asm-ppc/system.h : 7 0 1
linux/include/asm-sparc/pgtable.h : 5 1 1
linux/include/asm-sparc/processor.h : 18 7 1
linux/include/asm-sparc/softirq.h : 29 8 1
linux/include/asm-sparc/spinlock.h : 94 21 0
linux/include/asm-sparc64/asm_offsets.h : 1011 334 340
linux/include/asm-sparc64/checksum.h : 31 9 6
linux/include/asm-sparc64/fpumacro.h : 44 0 40
linux/include/asm-sparc64/md.h : 14 2 2
linux/include/asm-sparc64/mmu_context.h : 68 15 17
linux/include/asm-sparc64/pgtable.h : 5 1 1
linux/include/asm-sparc64/processor.h : 93 25 19
linux/include/asm-sparc64/softirq.h : 19 5 1
linux/include/asm-sparc64/spinlock.h : 117 47 0
linux/include/asm-sparc64/uaccess.h : 139 18 29
linux/include/linux/b1lli.h : 134 51 24
linux/include/linux/blkpg.h : 8 1 1
linux/include/linux/cyclades.h : 9 2 1
linux/include/linux/dn.h : 161 161 0
linux/include/linux/i2c.h : 16 3 0
linux/include/linux/ide.h : 12 0 8
linux/include/linux/if_arp.h : 7 1 0
linux/include/linux/interrupt.h : 7 1 0
linux/include/linux/isdn.h : 553 234 143
linux/include/linux/isdn_budget.h : 62 62 0
linux/include/linux/isdn_lzscomp.h : 26 26 0
linux/include/linux/isdn_ppp.h : 264 196 25
linux/include/linux/isdn_timru.h : 119 119 0
linux/include/linux/isdnif.h : 101 41 9
linux/include/linux/lp.h : 35 10 6
linux/include/linux/major.h : 8 2 0
linux/include/linux/netdevice.h : 18 4 1
linux/include/linux/pagemap.h : 8 1 1
linux/include/linux/parport.h : 50 22 1
linux/include/linux/proc_fs.h : 14 3 3
linux/include/linux/rtnetlink.h : 20 6 1
linux/include/linux/sched.h : 32 7 3
linux/include/linux/skbuff.h : 166 34 31
linux/include/linux/sysctl.h : 49 35 7
linux/include/linux/wait.h : 33 6 4
linux/include/net/decnet_call.h : 2 2 0
linux/include/net/dn.h : 206 206 0
linux/include/net/dn_dev.h : 194 194 0
linux/include/net/dn_fib.h : 83 83 0
linux/include/net/dn_neigh.h : 29 29 0
linux/include/net/dn_nsp.h : 194 194 0
linux/include/net/dn_raw.h : 17 17 0
linux/include/net/dn_route.h : 74 74 0
linux/include/net/dst.h : 9 0 3
linux/include/net/ip.h : 7 0 1
linux/include/net/ip_masq.h : 24 0 18
linux/include/net/irda/crc.h : 34 9 6
linux/include/net/irda/dongle.h : 31 5 3
linux/include/net/irda/ircomm_common.h : 54 5 8
linux/include/net/irda/irda.h : 34 6 4
linux/include/net/irda/irda_device.h : 121 46 12
linux/include/net/irda/iriap.h : 30 4 4
linux/include/net/irda/irlan_common.h : 101 25 16
linux/include/net/irda/irlan_provider.h : 26 2 8
linux/include/net/irda/irlap.h : 56 11 7
linux/include/net/irda/irlmp.h : 21 3 3
linux/include/net/irda/irlpt_common.h : 9 2 1
linux/include/net/irda/irport.h : 31 7 7
linux/include/net/irda/irttp.h : 50 7 7
linux/include/net/irda/irtty.h : 57 9 18
linux/include/net/irda/toshoboe.h : 165 165 0
linux/include/net/irda/w83977af_ir.h : 42 25 2
linux/include/net/irda/wrapper.h : 43 10 8
linux/include/net/route.h : 8 0 2
linux/include/net/sock.h : 206 91 38
linux/include/net/tcp.h : 50 7 8
linux/kernel/fork.c : 11 4 1
linux/kernel/signal.c : 14 2 2
linux/kernel/time.c : 16 3 1
linux/mm/filemap.c : 20 2 11
linux/mm/memory.c : 23 7 9
linux/mm/mmap.c : 9 3 0
linux/mm/slab.c : 8 1 1
linux/mm/swapfile.c : 86 25 9
linux/net/Config.in : 14 4 4
linux/net/Makefile : 8 1 1
linux/net/core/datagram.c : 18 3 3
linux/net/core/dev.c : 383 82 43
linux/net/core/dev_mcast.c : 18 2 3
linux/net/core/dst.c : 68 22 5
linux/net/core/rtnetlink.c : 14 2 0
linux/net/core/skbuff.c : 20 1 6
linux/net/core/sock.c : 89 38 19
linux/net/decnet/Config.in : 13 13 0
linux/net/decnet/Makefile : 30 30 0
linux/net/decnet/README : 18 3 10
linux/net/decnet/TODO : 59 59 0
linux/net/decnet/af_decnet.c : 2192 2192 0
linux/net/decnet/dn_dev.c : 1390 1390 0
linux/net/decnet/dn_fib.c : 805 805 0
linux/net/decnet/dn_neigh.c : 627 627 0
linux/net/decnet/dn_nsp_in.c : 703 703 0
linux/net/decnet/dn_nsp_out.c : 640 640 0
linux/net/decnet/dn_raw.c : 383 383 0
linux/net/decnet/dn_route.c : 1028 1028 0
linux/net/decnet/dn_timer.c : 164 164 0
linux/net/decnet/sysctl_net_decnet.c : 473 473 0
linux/net/ethernet/eth.c : 21 4 1
linux/net/ipv4/af_inet.c : 112 25 28
linux/net/ipv4/devinet.c : 59 10 2
linux/net/ipv4/fib_hash.c : 279 48 18
linux/net/ipv4/fib_rules.c : 147 27 7
linux/net/ipv4/icmp.c : 21 7 2
linux/net/ipv4/igmp.c : 28 5 3
linux/net/ipv4/ip_fragment.c : 107 18 9
linux/net/ipv4/ip_input.c : 330 85 167
linux/net/ipv4/ip_masq_mfw.c : 8 1 1
linux/net/ipv4/ipconfig.c : 26 6 2
linux/net/ipv4/proc.c : 49 5 10
linux/net/ipv4/raw.c : 160 82 12
linux/net/ipv4/route.c : 345 60 32
linux/net/ipv4/tcp.c : 279 69 27
linux/net/ipv4/tcp_input.c : 124 46 9
linux/net/ipv4/tcp_ipv4.c : 583 140 78
linux/net/ipv4/tcp_output.c : 33 5 1
linux/net/ipv4/tcp_timer.c : 315 93 68
linux/net/ipv4/timer.c : 54 11 6
linux/net/ipv4/udp.c : 181 18 42
linux/net/ipv6/addrconf.c : 60 9 2
linux/net/ipv6/exthdrs.c : 8 1 1
linux/net/ipv6/icmp.c : 24 3 1
linux/net/ipv6/mcast.c : 25 4 1
linux/net/ipv6/proc.c : 56 6 9
linux/net/ipv6/raw.c : 67 9 7
linux/net/ipv6/tcp_ipv6.c : 363 83 45
linux/net/ipv6/udp.c : 101 13 9
linux/net/irda/af_irda.c : 460 269 30
linux/net/irda/crc.c : 19 4 4
linux/net/irda/discovery.c : 71 35 12
linux/net/irda/ircomm/ircomm_common.c : 511 109 106
linux/net/irda/ircomm/irvtd_driver.c : 112 15 13
linux/net/irda/irda_device.c : 383 264 14
linux/net/irda/iriap.c : 225 42 38
linux/net/irda/iriap_event.c : 24 4 4
linux/net/irda/irlan/irlan_client.c : 191 36 40
linux/net/irda/irlan/irlan_client_event.c : 48 6 6
linux/net/irda/irlan/irlan_common.c : 363 86 65
linux/net/irda/irlan/irlan_eth.c : 184 48 64
linux/net/irda/irlan/irlan_event.c : 41 8 8
linux/net/irda/irlan/irlan_filter.c : 70 14 9
linux/net/irda/irlan/irlan_provider.c : 211 86 35
linux/net/irda/irlan/irlan_provider_event.c : 50 4 10
linux/net/irda/irlap_comp.c : 27 4 4
linux/net/irda/irlap_event.c : 212 52 44
linux/net/irda/irlap_frame.c : 41 6 6
linux/net/irda/irlmp.c : 261 79 57
linux/net/irda/irlmp_frame.c : 132 27 25
linux/net/irda/irlpt/irlpt_cli.c : 79 12 12
linux/net/irda/irlpt/irlpt_cli_fsm.c : 27 6 6
linux/net/irda/irlpt/irlpt_common.c : 32 6 6
linux/net/irda/irlpt/irlpt_srvr.c : 115 25 4
linux/net/irda/irmod.c : 78 23 7
linux/net/irda/irproc.c : 104 26 21
linux/net/irda/irsysctl.c : 19 4 4
linux/net/irda/irttp.c : 221 38 36
linux/net/irda/qos.c : 27 6 5
linux/net/irda/wrapper.c : 408 174 158
linux/net/netrom/nr_route.c : 33 11 5
linux/net/netsyms.c : 63 12 5
linux/net/rose/rose_route.c : 33 11 5
linux/net/sched/sch_api.c : 16 3 0
linux/net/sched/sch_generic.c : 22 5 0
linux/net/socket.c : 21 7 1
linux/net/unix/af_unix.c : 42 7 5
linux/net/x25/af_x25.c : 24 10 4
--
Thomas Koenig, Thomas...@ciw.uni-karlsruhe.de, ig...@dkauni2.bitnet.
The joy of engineering is to find a straight line on a double
logarithmic diagram.

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part02

#!/bin/sh
# this is part 02 of a 50 - part archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 02; then
echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&
+work with every existing HL driver. I was able to successfully open X.25
X connections on top of the isdnloop driver and the hisax driver.
X "x25iface"-encapsulation bypasses demand dialing. Dialing will be
-initiated when the upper (x25 packet) layer requests the lapb datalink to
-be established. But hangup timeout is still active. The connection
-will not automatically be re-established by the isdn_net module
-itself when new data arrives after the hangup timeout. But
-the x25 network code will re-establish the datalink connection
-(resulting in re-dialing and an x25 protocol reset) when new data is
-to be transmitted. (This currently does not work properly with the
-isdnloop driver, see "known problems" below)
+initiated when the upper (X.25 packet) layer requests the lapb datalink to
+be established. But hangup timeout is still active. Whenever a hangup
+occurs, all existing X.25 connections on that link will be cleared
+It is recommended to use sufficiently large hangup-timeouts for the
+isdn interfaces.
X
X
X In order to set up a conforming protocol stack you also need to
@@ -114,104 +107,64 @@
X isdnctrl l2_prot <iface-name> x25dce
X
X However, x25dte or x25dce is currently not supported by any real HL
-level driver. The main difference between x75 and x25dte/dce is that
+level driver. The main difference between x75i and x25dte/dce is that
X x25d[tc]e uses fixed lap_b addresses. With x75i, the side which
X initiates the isdn connection uses the DTE's lap_b address while the
-called side used the DCE's lap_b address. Thus, l2_prot x75i will
-probably work if you access a public x25 network as long as the
-corresponding isdn connection is set up by you. However, I've never
-tested this.
-
-
+called side used the DCE's lap_b address. Thus, l2_prot x75i might
+probably work if you access a public X.25 network as long as the
+corresponding isdn connection is set up by you. At least one test
+was successful to connect via isdn4linux to an X.25 switch using this
+trick. At the switch side, a terminal adapter X.21 was used to connect
+it to the isdn.
X
-How to use the test installation?
X
+How to set up a test installation?
+==================================
X
-To test x25 on top of isdn, you need to get
+To test X.25 on top of isdn, you need to get
X
-- a patched version of the "isdnctrl" program that supports setting the new
- x25 specific parameters.
+- a recent version of the "isdnctrl" program that supports setting the new
+ X.25 specific parameters.
X
-- the x25-utils-2.1.x package from ftp.pspt.fi/pub/ham/linux/ax25
- or any mirror site (i.e. ftp://ftp.gwdg.de/pub/linux/misc/ax25/).
+- the x25-utils-2.X package from
+ ftp://ftp.hes.iki.fi/pub/ham/linux/ax25/x25utils-*
+ (don't confuse the x25-utils with the ax25-utils)
X
-- a kernel patch that enhances isdn4linux to provide x25 network
- interface support. (This file is part of that kernel patch).
-
-- an application that uses linux AF_X25 sockets program.
+- an application program that uses linux PF_X25 sockets (some are
+ contained in the x25-util package).
X
X Before compiling the user level utilities make sure that the compiler/
-preprocessor will fetch the proper (patched) kernel header files. Either make
-/usr/include/linux a symbolic link pointing to your developer kernel's
-include/linux directory or set the appropriate compiler flags.
-
-It is recommended that all isdn drivers and the x25 PLP protocol
-are compiled as loadable modules. Like this, you can recover
-from certain errors by simply unloading and reloading the modules.
+preprocessor will fetch the proper kernel header files of this kernel
+source tree. Either make /usr/include/linux a symbolic link pointing to
+this kernel's include/linux directory or set the appropriate compiler flags.
X
X When all drivers and interfaces are loaded and configured you need to
-ifconfig the network interfaces up and add x25-routes to them. Use
+ifconfig the network interfaces up and add X.25-routes to them. Use
X the usual ifconfig tool.
X
X ifconfig <iface-name> up
X
X But a special x25route tool (distributed with the x25-util package)
-is needed to set up x25 routes. I.e.
+is needed to set up X.25 routes. I.e.
X
X x25route add 01 <iface-name>
X
-will cause all x.25 connections to the destination x.25-address
+will cause all x.25 connections to the destination X.25-address
X "01" to be routed to your created isdn network interface.
X
-
-There are currently no real x25 applications available. However, for
+There are currently no real X.25 applications available. However, for
X tests, the x25-utils package contains a modified version of telnet
-and telnetd that uses x25 sockets instead of tcp/ip sockets. Use
-this for your first tests. Furthermore, there is an x25.echod and a client
-named "eftp" (which contains some experimental code to download files
-from a remote eft server using the EUROfile transfer protocol).
-It available at ftp://ftp.hamburg.pop.de/pub/LOCAL/linux/i4l-eft/eftp4linux-*
+and telnetd that uses X.25 sockets instead of tcp/ip sockets. You can
+use those for your first tests. Furthermore, you might check
+ftp://ftp.hamburg.pop.de/pub/LOCAL/linux/i4l-eft/ which contains some
+alpha-test implementation ("eftp4linux") of the EUROfile transfer
+protocol.
+
+The scripts distributed with the eftp4linux test releases might also
+provide useful examples for setting up X.25 on top of isdn.
X
X The x25-utility package also contains an x25trace tool that can be
-used to monitor x25 packets received by the network interfaces.
+used to monitor X.25 packets received by the network interfaces.
X The /proc/net/x25* files also contain useful information.
X
-The eftp4linux test release also contains an "ix25test" script that can
-be used for testing x25 on top of isdn4linux. Edit
-this script according to your local needs and then call it as
-
-ix25test start
-
-This will set up a sample configuration using the isdnloop and hisax
-driver and create some isdn network interfaces.
-It is recommended that all other isdn drivers and the
-x25 module are unloaded before calling this script.
-
-
-
-Known problems and deficiencies:
-
-The isdnloop HL driver apparently has problems to re-establish a
-connection that has been hung up from the outgoing device. You have to
-unload the isdnloop driver after the faked isdn-connection is closed
-and insmod it again. With the Hisax driver, this problem is not present.
-
-Sometimes the x25 module cannot be unloaded (decrementation of its use
-count seems to get lost occasionally).
-
-Using the x25 based telnet and telnetd programm to establish connection
-from your own to your own computer repeatedly sometimes totally locked
-up my system. However, this kernel patch also modifies
-net/x25/af_x25.c to include a workaround. With this workaround
-enabled, my system is stable. (If you want to disable the
-workaround, just undefine ISDN_X25_FIXES in af_x25.c).
-
-The latter problem could be reproduced by using hisax as well as the
-isdnloop driver. It seems that it is not caused by the isdn code.
-Somehow, the inode of a socket is freed while a process still refers
-the socket's wait queue. This causes problems when the process tries to
-remove itself from the wait queue (referred by the dangling
-sock->sleep pointer) before returning from a select() system call.
-
X - Henner
-
diff -u --recursive --new-file v2.3.3/linux/Documentation/networking/decnet.txt linux/Documentation/networking/decnet.txt
--- v2.3.3/linux/Documentation/networking/decnet.txt Wed Dec 31 16:00:00 1969
+++ linux/Documentation/networking/decnet.txt Wed May 26 09:36:36 1999
@@ -0,0 +1,146 @@
+ Linux DECnet Networking Layer Information
+ ===========================================
+
+1) Other documentation....
+
+ o Project Home Pages
+ http://www.sucs.swan.ac.uk/~rohan/DECnet/index.html - Kernel info
+ http://linux.dreamtime.org/decnet/ - Userland tools
+
+ o FTP sites
+ ftp://ftp.sucs.swan.ac.uk/pub/Linux/DECnet/
+ - Swansea University Computer Society DECnet Archive
+ (contains kernel patches and info)
+ - Mirror of userland tools on ftp.dreamtime.org
+
+ ftp://ftp.dreamtime.org/pub/linux/decnet/
+ - Patrick Caulfield's archive of userland tools and
+ Eduardo Serrat's kernel patches
+
+2) Configuring the kernel
+
+Be sure to turn on the following options:
+
+ CONFIG_DECNET (obviously)
+ CONFIG_PROCFS (to see what's going on)
+ CONFIG_SYSCTL (for easy configuration)
+
+if you want to try out router support (not properly debugged and not
+complete yet), you'll need the following options as well...
+
+ CONFIG_DECNET_RAW (to receive routing packets)
+ CONFIG_DECNET_ROUTER (to be able to add/delete routes)
+ CONFIG_NETLINK (to allow rtnetlink)
+ CONFIG_RTNETLINK (for communication with the kernel routing layer)
+
+3) Command line options
+
+The kernel command line takes options looking like the following:
+
+ decnet=1,2,1
+
+the first two numbers are the node address 1,2 = 1.2 (yes, you must use
+commas when specifying them). The third number is the level number for routers
+and is optional. It is probably a good idea to set the DECnet address on boot
+like this rather than trying to do it later.
+
+There are also equivalent options for modules. The node address and type can
+also be set through the /proc/sys/net/decnet/ files, as can other system
+parameters.
+
+Currently the only supported device is ethernet. You'll have to set the
+ethernet address of your ethernet card according to the DECnet address
+of the node in order for it to be recognised (and thus appear in
+/proc/net/decnet_dev). There is a utility available at the above
+FTP sites called dn2ethaddr which can compute the correct ethernet
+address to use. The address can be set by ifconfig either before at
+at the time the device is brought up. If you are using RedHat you can
+add the line:
+
+ MACADDR=AA:00:04:00:03:04
+
+or something similar, to /etc/sysconfig/network-scripts/ifcfg-eth0 or
+wherever your network card's configuration lives.
+
+You will also need to set /proc/sys/net/decnet/default_device to the
+device you want DECnet to route packets out of when no specific route
+is available. Usually this will be eth0, for example:
+
+ echo -n "eth0" >/proc/sys/net/decnet/default_device
+
+There is a list of what the other files under /proc/sys/net/decnet/ do
+on the kernel patch web site (shown above).
+
+4) How can I tell if its working ?
+
+Here is a quick guide of what to look for in order to know if your DECnet
+kernel subsystem is working.
+
+ - Is the node address set (see /proc/sys/net/decnet/node_address)
+ - Is the node of the correct type (see /proc/sys/net/decnet/node_type)
+ - Is the Ethernet MAC address of each Ethernet card set to match
+ the DECnet address. If in doubt use the dn2ethaddr utility available
+ at the ftp archive.
+ - If the previous two steps are satisfied, and the Ethernet card is up,
+ you should find that it is listed in /proc/net/decnet_dev and also
+ that it appears as a directory in /proc/sys/net/decnet/conf/. The
+ loopback device (lo) should also appear and is required to communicate
+ within a node.
+ - If you have any DECnet routers on your network, they should appear
+ in /proc/net/decnet_neigh, otherwise this file will only contain the
+ entry for the node itself (if it doesn't check to see if lo is up).
+ - If you want to send to any node which is not listed in the
+ /proc/net/decnet_neigh file, you'll need to set the default device
+ to point to an Ethernet card with connection to a router. This is
+ again done with the /proc/sys/net/decnet/default_device file.
+ - Try starting a simple server and client, like the dnping/dnmirror
+ over the loopback interface. With luck they should communicate.
+ For this step and those after, you'll need the DECnet library
+ which can be obtained from the above ftp sites as well as the
+ actual utilities themselves.
+ - If this seems to work, then try talking to a node on your local
+ network, and see if you can obtain the same results.
+ - At this point you are on your own... :-)
+
+5) How to send a bug report
+
+If you've found a bug and want to report it, then there are several things
+you can do to help me work out exactly what it is that is wrong. Useful
+information (a lot of which is essential) includes:
+
+ - What kernel version are you running ?
+ - What version of the patch are you running ?
+ - How far though the above set of tests can you get ?
+ - What is in the /proc/decnet* files and /proc/sys/net/decnet/* files ?
+ - Which services are you running ?
+ - Which client caused the problem ?
+ - How much data was being transfered ?
+ - Was the network congested ?
+ - If there was a kernel panic, please run the output through ksymoops
+ before sending it to me, otherwise its _useless_.
+ - How can the problem be reproduced ?
+ - Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of
+ tcpdump don't understand how to dump DECnet properly, so including
+ the hex listing of the packet contents is essential, usually the -x flag.
+ You may also need to increase the length grabbed with the -s flag)
+
+6) Mailing list
+
+If you are keen to get involved in development, or want to ask questions
+about configuration, or even just report bugs, then there is a mailing
+list that you can join: send mail to majo...@dreamtime.org with
+
+subscribe linux-decnet
+
+as the body of the message.
+
+7) Legal Info
+
+The Linux DECnet project team have placed their code under the GPL. The
+software is provided "as is" and without warranty express or implied.
+DECnet is a trademark of Compaq. This software is not a product of
+Compaq. We acknowledge the help of people at Compaq in providing extra
+documentation above and beyond what was previously publicly available.
+
+Steve Whitehouse <Ste...@ACM.org>
+
diff -u --recursive --new-file v2.3.3/linux/Documentation/sound/CMI8330 linux/Documentation/sound/CMI8330
--- v2.3.3/linux/Documentation/sound/CMI8330 Sun Mar 7 15:22:06 1999
+++ linux/Documentation/sound/CMI8330 Wed May 26 09:29:34 1999
@@ -1,46 +1,48 @@
-How to enable CMI 8330 soundchip on Linux
+How to enable CMI 8330 (SOUNDPRO) soundchip on Linux
X ------------------------------------------
X Stefan Laudat <Stefan...@asit.ro>
X
-Hello folks,
-
- The CMI8330 soundchip is a very small chip found on many recent
- motherboards. In order to use it you just have to use a proper
- isapnp.conf and a little bit of patience.
+[Note: The CMI 8338 is unrelated and right now unsupported]
+
X
- Of course you will have to compile kernel sound support as module,
- as shown below:
+ In order to use CMI8330 under Linux you just have to use a proper isapnp.conf, a good isapnp and a little bit of patience. I use isapnp 1.17, but
+you may get a better one I guess at http://www.roestock.demon.co.uk/isapnptools/.
+
+ Of course you will have to compile kernel sound support as module, as shown below:
X
X CONFIG_SOUND=m
X CONFIG_SOUND_OSS=m
X CONFIG_SOUND_SB=m
X CONFIG_SOUND_ADLIB=m
X CONFIG_SOUND_MPU401=m
-# Just for fun :)
+# Mikro$chaft sound system (kinda useful here ;))
X CONFIG_SOUND_MSS=m
X
X The /etc/isapnp.conf file will be:
X
X <snip below>
X
+
X (READPORT 0x0203)
X (ISOLATE PRESERVE)
X (IDENTIFY *)
X (VERBOSITY 2)
X (CONFLICT (IO FATAL)(IRQ FATAL)(DMA FATAL)(MEM FATAL)) # or WARNING
X (VERIFYLD N)
+
+
X # WSS
X
X (CONFIGURE CMI0001/16777472 (LD 0
X (IO 0 (SIZE 8) (BASE 0x0530))
X (IO 1 (SIZE 8) (BASE 0x0388))
-(INT 0 (IRQ 5 (MODE +E)))
+(INT 0 (IRQ 7 (MODE +E)))
X (DMA 0 (CHANNEL 0))
X (NAME "CMI0001/16777472[0]{CMI8330/C3D Audio Adapter}")
X (ACT Y)
X ))
X
-# Control device ?
+# MPU
X
X (CONFIGURE CMI0001/16777472 (LD 1
X (IO 0 (SIZE 2) (BASE 0x0330))
@@ -57,10 +59,11 @@
X (ACT Y)
X ))
X
-# SB...
+# SoundBlaster
+
X (CONFIGURE CMI0001/16777472 (LD 3
X (IO 0 (SIZE 16) (BASE 0x0220))
-(INT 0 (IRQ 7 (MODE +E)))
+(INT 0 (IRQ 5 (MODE +E)))
X (DMA 0 (CHANNEL 1))
X (DMA 1 (CHANNEL 5))
X (NAME "CMI0001/16777472[3]{CMI8330/C3D Audio Adapter}")
@@ -74,13 +77,22 @@
X
X The module sequence is trivial:
X
-/sbin/modprobe sound
-# You need to load the ad1848 module first. That matters, otherwise the
-# chip falls into soundblaster compatibility and you won't get it back out
-/sbin/insmod ad1848 io=0x530 dma=0 irq=5 soundpro=1
+/sbin/insmod soundcore
+/sbin/insmod sound
X /sbin/insmod uart401
-/sbin/insmod sb io=0x220 irq=5 dma=1 dma16=-1
-/sbin/insmod mpu401 io=0x330
-/sbin/insmod opl3 io=0x388
+# insert this first
+/sbin/insmod ad1848 io=0x530 irq=7 dma=0 soundpro=1
+# The sb module is an alternative to the ad1848 (Microsoft Sound System)
+# Anyhow, this is full duplex and has MIDI
+/sbin/insmod sb io=0x220 dma=1 dma16=5 irq=5 mpu_io=0x330
+
+
X
- The soundchip is now fully initialized. Enjoy it.
+Alma Chao <ely...@ethereal.torsion.org> suggests the following /etc/conf.modules:
+
+alias sound ad1848
+alias synth0 opl3
+options ad1848 io=0x530 irq=7 dma=0 soundpro=1
+options opl3 io=0x388
+
+
diff -u --recursive --new-file v2.3.3/linux/Documentation/sound/CMI8338 linux/Documentation/sound/CMI8338
--- v2.3.3/linux/Documentation/sound/CMI8338 Wed Dec 31 16:00:00 1969
+++ linux/Documentation/sound/CMI8338 Wed May 26 09:36:36 1999
@@ -0,0 +1,32 @@
+Audio driver for CM8338/CM8738 chips by Chen-Li Tien
+
+ Be aware: C-Media Electronics Inc. is basically an IC design house,
+ and whose development of software drivers is mainly for use by its OEM
+ customers in their products. C-Media Electronics Inc. itself does not
+ manufacture end-user products, such as PC or sound cards, so it can
+ not fully control the drivers provided to consumers. Drivers provided
+ at this site, therefore, MAY NOT BE APPLICABLE to all sound cards.
+ Drivers you download from this site may function well at certain
+ situation, but C-Media Electronics Inc. does not give any guarantee or
+ assurances. Please be aware that these drivers might cause some
+ technical difficulties when installed
+
+
+1. Config cm8338 driver by 'make menuconfig' or 'make config' command.
+
+2. Please select Sound Card (CONFIG_SOUND=m) support and CMPCI driver (CONFIG_SOUND_CMPCI=m) as modules. Resident mode not tested.
+
+3. Compile the kernel if necessary.
+
+4. Compile the modules by 'make modules'.
+
+5. Install the modules by 'make modules_install'
+
+6. Before first time to run the driver, create module dependency by 'depmod -a'
+
+7. To install the driver, enter 'modprobe cmpci'.
+
+
+Bugs:
+
+1. Real player cannot be run (the same as es1371).
diff -u --recursive --new-file v2.3.3/linux/Makefile linux/Makefile
--- v2.3.3/linux/Makefile Sat May 15 23:46:02 1999
+++ linux/Makefile Mon May 17 09:55:04 1999
@@ -1,6 +1,6 @@
X VERSION = 2
X PATCHLEVEL = 3
-SUBLEVEL = 2
+SUBLEVEL = 4
X EXTRAVERSION =
X
X ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
diff -u --recursive --new-file v2.3.3/linux/README linux/README
--- v2.3.3/linux/README Fri May 14 18:55:11 1999
+++ linux/README Sun May 30 10:17:43 1999
@@ -46,11 +46,11 @@
X - There is a lot of documentation available both in electronic form on
X the Internet and in books, both Linux-specific and pertaining to
X general UNIX questions. I'd recommend looking into the documentation
- subdirectories on any Linux ftp site for the LDP (Linux Documentation
+ subdirectories on any Linux FTP site for the LDP (Linux Documentation
X Project) books. This README is not meant to be documentation on the
X system: there are much better sources available.
X
- - There are various readme's in the kernel Documentation/ subdirectory:
+ - There are various README files in the Documentation/ subdirectory:
X these typically contain kernel-specific installation notes for some
X drivers for example. See ./Documentation/00-INDEX for a list of what
X is contained in each file. Please read the Changes file, as it
@@ -62,7 +62,7 @@
X - If you install the full sources, do a
X
X cd /usr/src
- gzip -cd linux-2.3.XX.tar.gz | tar xfv -
+ gzip -cd linux-2.3.XX.tar.gz | tar xvf -
X
X to get it all put in place. Replace "XX" with the version number of the
X latest kernel.
@@ -233,7 +233,7 @@
X isn't anyone listed there, then the second best thing is to mail
X them to me (torv...@transmeta.com), and possibly to any other
X relevant mailing-list or to the newsgroup. The mailing-lists are
- useful especially for SCSI and NETworking problems, as I can't test
+ useful especially for SCSI and networking problems, as I can't test
X either of those personally anyway.
X
X - In all bug-reports, *please* tell what kernel you are talking about,
diff -u --recursive --new-file v2.3.3/linux/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
--- v2.3.3/linux/arch/alpha/kernel/process.c Sat May 15 23:46:03 1999
+++ linux/arch/alpha/kernel/process.c Sat May 22 13:46:08 1999
@@ -58,10 +58,10 @@
X static struct file * init_fd_array[NR_OPEN] = { NULL, };
X static struct files_struct init_files = INIT_FILES;
X static struct signal_struct init_signals = INIT_SIGNALS;
-struct mm_struct init_mm = INIT_MM;
+struct mm_struct init_mm = INIT_MM(init_mm);
X
X union task_union init_task_union __attribute__((section("init_task")))
- = { task: INIT_TASK };
+ = { task: INIT_TASK(init_task_union.task) };
X
X /*
X * No need to acquire the kernel lock, we're entirely local..
diff -u --recursive --new-file v2.3.3/linux/arch/alpha/kernel/ptrace.c linux/arch/alpha/kernel/ptrace.c
--- v2.3.3/linux/arch/alpha/kernel/ptrace.c Tue Dec 29 16:17:00 1998
+++ linux/arch/alpha/kernel/ptrace.c Sat May 22 12:42:04 1999
@@ -506,7 +506,8 @@
X (current->uid != child->uid) ||
X (current->gid != child->egid) ||
X (current->gid != child->sgid) ||
- (current->gid != child->gid))
+ (current->gid != child->gid) ||
+ (!cap_issubset(child->cap_permitted, current->cap_permitted)))
X && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
diff -u --recursive --new-file v2.3.3/linux/arch/arm/kernel/ptrace.c linux/arch/arm/kernel/ptrace.c
--- v2.3.3/linux/arch/arm/kernel/ptrace.c Wed Sep 9 08:56:58 1998
+++ linux/arch/arm/kernel/ptrace.c Sat May 22 12:42:04 1999
@@ -580,6 +580,7 @@
X (current->uid != child->uid) ||
X (current->gid != child->egid) ||
X (current->gid != child->sgid) ||
+ (!cap_issubset(child->cap_permitted, current->cap_permitted)) ||
X (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
diff -u --recursive --new-file v2.3.3/linux/arch/i386/defconfig linux/arch/i386/defconfig
--- v2.3.3/linux/arch/i386/defconfig Sat May 15 23:46:03 1999
+++ linux/arch/i386/defconfig Mon May 31 09:01:50 1999
@@ -304,8 +304,10 @@
X # CONFIG_USB_OHCI_HCD is not set
X CONFIG_USB_MOUSE=y
X CONFIG_USB_KBD=y
+CONFIG_USB_HUB=y
X # CONFIG_USB_AUDIO is not set
X # CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
X
X #
X # Filesystems
diff -u --recursive --new-file v2.3.3/linux/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c
--- v2.3.3/linux/arch/mips/kernel/ptrace.c Tue Oct 20 13:52:54 1998
+++ linux/arch/mips/kernel/ptrace.c Sat May 22 12:42:04 1999
@@ -297,6 +297,7 @@
X (current->uid != child->uid) ||
X (current->gid != child->egid) ||
X (current->gid != child->sgid) ||
+ (!cap_issubset(child->cap_permitted, current->cap_permitted)) ||
X (current->gid != child->gid)) &&
X !capable(CAP_SYS_PTRACE)) {
X res = -EPERM;
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/Makefile linux/arch/ppc/Makefile
--- v2.3.3/linux/arch/ppc/Makefile Fri Mar 19 10:50:03 1999
+++ linux/arch/ppc/Makefile Sat May 22 13:03:00 1999
@@ -29,6 +29,10 @@
X CFLAGS := $(CFLAGS) -mcpu=860
X endif
X
+ifdef CONFIG_PPC64
+CFLAGS := $(CFLAGS) -Wa,-mppc64bridge #-Wa,-mppc64
+#CFLAGS := $(CFLAGS) -Wa,-mppc64 -mpowerpc64
+endif
X
X HEAD := arch/ppc/kernel/head.o
X
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/boot/Makefile linux/arch/ppc/boot/Makefile
--- v2.3.3/linux/arch/ppc/boot/Makefile Thu Apr 29 12:39:01 1999
+++ linux/arch/ppc/boot/Makefile Sat May 22 13:03:00 1999
@@ -26,9 +26,15 @@
X ISZ = 0
X
X ifeq ($(CONFIG_SMP),y)
-TFTPIMAGE=/tftpboot/zImage.prep.smp
+TFTPIMAGE=/tftpboot/zImage.prep.smp$(MSIZE)
X else
-TFTPIMAGE=/tftpboot/zImage.prep
+TFTPIMAGE=/tftpboot/zImage.prep$(MSIZE)
+endif
+
+ifeq ($(CONFIG_PPC64),y)
+MSIZE=.64
+else
+MSIZE=
X endif
X
X ZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00800000
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/boot/misc.c linux/arch/ppc/boot/misc.c
--- v2.3.3/linux/arch/ppc/boot/misc.c Tue May 11 08:24:32 1999
+++ linux/arch/ppc/boot/misc.c Sat May 22 13:03:00 1999
@@ -1,7 +1,7 @@
X /*
X * misc.c
X *
- * $Id: misc.c,v 1.64 1999/04/30 05:52:46 cort Exp $
+ * $Id: misc.c,v 1.65 1999/05/17 19:11:13 cort Exp $
X *
X * Adapted for PowerPC by Gary Thomas
X *
@@ -363,7 +363,7 @@
X if (board_type == 0xe0) {
X base_mod = inb(0x803);
X /* if a MVME2300/2400 or a Sitka then no keyboard */
- if((base_mod == 0x9) || (base_mod == 0xF9) ||
+ if((base_mod == 0xFA) || (base_mod == 0xF9) ||
X (base_mod == 0xE1)) {
X keyb_present = 0; /* no keyboard */
X }
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/chrpboot/Makefile linux/arch/ppc/chrpboot/Makefile
--- v2.3.3/linux/arch/ppc/chrpboot/Makefile Fri Mar 19 10:50:03 1999
+++ linux/arch/ppc/chrpboot/Makefile Sat May 22 13:03:00 1999
@@ -23,15 +23,21 @@
X OBJS = crt0.o start.o main.o misc.o ../coffboot/string.o ../coffboot/zlib.o image.o # initrd.o
X LIBS = $(TOPDIR)/lib/lib.a
X
+ifeq ($(CONFIG_PPC64),y)
+MSIZE=.64
+else
+MSIZE=
+endif
+
X ifeq ($(CONFIG_ALL_PPC),y)
X # yes, we want to build chrp stuff
X CONFIG_CHRP = y
X endif
X
X ifeq ($(CONFIG_SMP),y)
-TFTPIMAGE=/tftpboot/zImage.chrp.smp
+TFTPIMAGE=/tftpboot/zImage.chrp.smp$(MSIZE)
X else
-TFTPIMAGE=/tftpboot/zImage.chrp
+TFTPIMAGE=/tftpboot/zImage.chrp$(MSIZE)
X endif
X
X all: $(TOPDIR)/zImage
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/coffboot/Makefile linux/arch/ppc/coffboot/Makefile
--- v2.3.3/linux/arch/ppc/coffboot/Makefile Fri Mar 19 10:50:03 1999
+++ linux/arch/ppc/coffboot/Makefile Sat May 22 13:03:00 1999
@@ -23,10 +23,16 @@
X CONFIG_PMAC = y
X endif
X
+ifeq ($(CONFIG_PPC64),y)
+MSIZE=.64
+else
+MSIZE=
+endif
+
X ifeq ($(CONFIG_SMP),y)
-TFTPIMAGE=/tftpboot/zImage.pmac.smp
+TFTPIMAGE=/tftpboot/zImage.pmac.smp$(MSIZE)
X else
-TFTPIMAGE=/tftpboot/zImage.pmac
+TFTPIMAGE=/tftpboot/zImage.pmac$(MSIZE)
X endif
X
X ifeq ($(CONFIG_PMAC),y)
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/common_defconfig linux/arch/ppc/common_defconfig
--- v2.3.3/linux/arch/ppc/common_defconfig Tue May 11 08:24:32 1999
+++ linux/arch/ppc/common_defconfig Sat May 22 13:03:00 1999
@@ -7,21 +7,24 @@
X #
X CONFIG_PPC=y
X CONFIG_6xx=y
+# CONFIG_PPC64 is not set
X # CONFIG_8xx is not set
-# CONFIG_PMAC is not set
+CONFIG_PMAC=y
X # CONFIG_PREP is not set
X # CONFIG_CHRP is not set
-CONFIG_ALL_PPC=y
+# CONFIG_ALL_PPC is not set
X # CONFIG_APUS is not set
X # CONFIG_MBX is not set
X # CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_6xx=y
X
X #
X # General setup
X #
X CONFIG_EXPERIMENTAL=y
X CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODVERSIONS=y
X CONFIG_KMOD=y
X CONFIG_PCI=y
X # CONFIG_PCI_QUIRKS is not set
@@ -32,7 +35,7 @@
X # CONFIG_BSD_PROCESS_ACCT is not set
X CONFIG_BINFMT_ELF=y
X CONFIG_KERNEL_ELF=y
-CONFIG_BINFMT_MISC=m
+# CONFIG_BINFMT_MISC is not set
X # CONFIG_BINFMT_JAVA is not set
X # CONFIG_PARPORT is not set
X CONFIG_VGA_CONSOLE=y
@@ -48,7 +51,6 @@
X # CONFIG_TOTALMP is not set
X CONFIG_BOOTX_TEXT=y
X # CONFIG_MOTOROLA_HOTSWAP is not set
-# CONFIG_CMDLINE_BOOL is not set
X
X #
X # Plug and Play support
@@ -66,7 +68,9 @@
X #
X # CONFIG_BLK_DEV_HD_IDE is not set
X CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
X CONFIG_BLK_DEV_IDECD=y
+# CONFIG_IDECD_SLOTS is not set
X # CONFIG_BLK_DEV_IDETAPE is not set
X CONFIG_BLK_DEV_IDEFLOPPY=y
X # CONFIG_BLK_DEV_IDESCSI is not set
@@ -75,13 +79,15 @@
X # CONFIG_BLK_DEV_IDEPCI is not set
X # CONFIG_BLK_DEV_SL82C105 is not set
X CONFIG_BLK_DEV_IDE_PMAC=y
-# CONFIG_BLK_DEV_IDEDMA_PMAC is not set
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_PMAC_IDEDMA_AUTO=y
X # CONFIG_IDE_CHIPSETS is not set
X
X #
X # Additional Block Devices
X #
-CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_LOOP is not set
X # CONFIG_BLK_DEV_NBD is not set
X # CONFIG_BLK_DEV_MD is not set
X CONFIG_BLK_DEV_RAM=y
@@ -89,6 +95,7 @@
X # CONFIG_BLK_DEV_XD is not set
X CONFIG_PARIDE_PARPORT=y
X # CONFIG_PARIDE is not set
+CONFIG_BLK_DEV_IDE_MODES=y
X # CONFIG_BLK_DEV_HD is not set
X
X #
@@ -151,12 +158,12 @@
X CONFIG_CHR_DEV_ST=y
X CONFIG_BLK_DEV_SR=y
X CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SG is not set
X
X #
X # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
X #
-CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_MULTI_LUN is not set
X CONFIG_SCSI_CONSTANTS=y
X # CONFIG_SCSI_LOGGING is not set
X
@@ -191,14 +198,8 @@
X # CONFIG_SCSI_NCR53C406A is not set
X # CONFIG_SCSI_SYM53C416 is not set
X # CONFIG_SCSI_NCR53C7xx is not set
-CONFIG_SCSI_NCR53C8XX=y
+# CONFIG_SCSI_NCR53C8XX is not set
X # CONFIG_SCSI_SYM53C8XX is not set
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
-CONFIG_SCSI_NCR53C8XX_SYNC=20
-# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
-# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
X # CONFIG_SCSI_PAS16 is not set
X # CONFIG_SCSI_PCI2000 is not set
X # CONFIG_SCSI_PCI2220I is not set
@@ -236,7 +237,7 @@
X # CONFIG_ACENIC is not set
X # CONFIG_NET_ISA is not set
X CONFIG_NET_EISA=y
-CONFIG_PCNET32=y
+# CONFIG_PCNET32 is not set
X # CONFIG_AC3200 is not set
X # CONFIG_APRICOT is not set
X # CONFIG_CS89x0 is not set
@@ -296,32 +297,18 @@
X CONFIG_FB_CONTROL=y
X CONFIG_FB_PLATINUM=y
X CONFIG_FB_VALKYRIE=y
-# CONFIG_FB_ATY is not set
+CONFIG_FB_ATY=y
X CONFIG_FB_IMSTT=y
X CONFIG_FB_CT65550=y
X # CONFIG_FB_S3TRIO is not set
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G100=y
-# CONFIG_FB_MATROX_MULTIHEAD is not set
-# CONFIG_FB_ATY is not set
+# CONFIG_FB_MATROX is not set
+CONFIG_FB_ATY=y
X # CONFIG_FB_VIRTUAL is not set
-CONFIG_FBCON_ADVANCED=y
-# CONFIG_FBCON_MFB is not set
-# CONFIG_FBCON_CFB2 is not set
-# CONFIG_FBCON_CFB4 is not set
+# CONFIG_FBCON_ADVANCED is not set
X CONFIG_FBCON_CFB8=y
X CONFIG_FBCON_CFB16=y
X CONFIG_FBCON_CFB24=y
X CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_AFB is not set
-# CONFIG_FBCON_ILBM is not set
-# CONFIG_FBCON_IPLAN2P2 is not set
-# CONFIG_FBCON_IPLAN2P4 is not set
-# CONFIG_FBCON_IPLAN2P8 is not set
-# CONFIG_FBCON_MAC is not set
-# CONFIG_FBCON_VGA is not set
X # CONFIG_FBCON_FONTWIDTH8_ONLY is not set
X CONFIG_FBCON_FONTS=y
X # CONFIG_FONT_8x8 is not set
@@ -337,25 +324,15 @@
X #
X CONFIG_VT=y
X CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=m
+# CONFIG_SERIAL is not set
X # CONFIG_SERIAL_EXTENDED is not set
X # CONFIG_SERIAL_NONSTANDARD is not set
X CONFIG_UNIX98_PTYS=y
X CONFIG_UNIX98_PTY_COUNT=256
-CONFIG_MOUSE=y
-
-#
-# Mice
-#
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
+# CONFIG_MOUSE is not set
X # CONFIG_QIC02_TAPE is not set
X # CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
+CONFIG_NVRAM=y
X # CONFIG_RTC is not set
X
X #
@@ -390,10 +367,11 @@
X # CONFIG_ADFS_FS is not set
X # CONFIG_AFFS_FS is not set
X CONFIG_HFS_FS=y
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
X # CONFIG_UMSDOS_FS is not set
-CONFIG_VFAT_FS=m
+CONFIG_VFAT_FS=y
+# CONFIG_EFS_FS is not set
X CONFIG_ISO9660_FS=y
X # CONFIG_JOLIET is not set
X # CONFIG_MINIX_FS is not set
@@ -477,4 +455,4 @@
X #
X CONFIG_MAGIC_SYSRQ=y
X # CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+CONFIG_XMON=y
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/config.in linux/arch/ppc/config.in
--- v2.3.3/linux/arch/ppc/config.in Tue May 11 08:24:32 1999
+++ linux/arch/ppc/config.in Sat May 22 13:03:00 1999
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.92 1999/04/30 05:41:43 cort Exp $
+# $Id: config.in,v 1.93 1999/05/14 22:36:58 cort Exp $
X # For a description of the syntax of this configuration file,
X # see the Configure script.
X #
@@ -8,8 +8,9 @@
X comment 'Platform support'
X define_bool CONFIG_PPC y
X choice 'Processor type' \
- "6xx/7xx CONFIG_6xx \
- 860/821 CONFIG_8xx" 6xx/7xx
+ "6xx/7xx CONFIG_6xx \
+ 630/Power3(64-Bit) CONFIG_PPC64 \
+ 860/821 CONFIG_8xx" 6xx/7xx
X
X choice 'Machine Type' \
X "PowerMac CONFIG_PMAC \
@@ -22,6 +23,10 @@
X bool 'Symmetric multi-processing support' CONFIG_SMP
X if [ "$CONFIG_ALL_PPC" != "y" ];then
X define_bool CONFIG_MACH_SPECIFIC y
+fi
+
+if [ "$CONFIG_PPC64" != "y" ];then
+ define_bool CONFIG_6xx y
X fi
X endmenu
X
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/defconfig linux/arch/ppc/defconfig
--- v2.3.3/linux/arch/ppc/defconfig Tue May 11 08:24:32 1999
+++ linux/arch/ppc/defconfig Sat May 22 13:03:00 1999
@@ -7,21 +7,24 @@
X #
X CONFIG_PPC=y
X CONFIG_6xx=y
+# CONFIG_PPC64 is not set
X # CONFIG_8xx is not set
-# CONFIG_PMAC is not set
+CONFIG_PMAC=y
X # CONFIG_PREP is not set
X # CONFIG_CHRP is not set
-CONFIG_ALL_PPC=y
+# CONFIG_ALL_PPC is not set
X # CONFIG_APUS is not set
X # CONFIG_MBX is not set
X # CONFIG_SMP is not set
+CONFIG_MACH_SPECIFIC=y
+CONFIG_6xx=y
X
X #
X # General setup
X #
X CONFIG_EXPERIMENTAL=y
X CONFIG_MODULES=y
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODVERSIONS=y
X CONFIG_KMOD=y
X CONFIG_PCI=y
X # CONFIG_PCI_QUIRKS is not set
@@ -32,7 +35,7 @@
X # CONFIG_BSD_PROCESS_ACCT is not set
X CONFIG_BINFMT_ELF=y
X CONFIG_KERNEL_ELF=y
-CONFIG_BINFMT_MISC=m
+# CONFIG_BINFMT_MISC is not set
X # CONFIG_BINFMT_JAVA is not set
X # CONFIG_PARPORT is not set
X CONFIG_VGA_CONSOLE=y
@@ -48,7 +51,6 @@
X # CONFIG_TOTALMP is not set
X CONFIG_BOOTX_TEXT=y
X # CONFIG_MOTOROLA_HOTSWAP is not set
-# CONFIG_CMDLINE_BOOL is not set
X
X #
X # Plug and Play support
@@ -66,7 +68,9 @@
X #
X # CONFIG_BLK_DEV_HD_IDE is not set
X CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
X CONFIG_BLK_DEV_IDECD=y
+# CONFIG_IDECD_SLOTS is not set
X # CONFIG_BLK_DEV_IDETAPE is not set
X CONFIG_BLK_DEV_IDEFLOPPY=y
X # CONFIG_BLK_DEV_IDESCSI is not set
@@ -75,13 +79,15 @@
X # CONFIG_BLK_DEV_IDEPCI is not set
X # CONFIG_BLK_DEV_SL82C105 is not set
X CONFIG_BLK_DEV_IDE_PMAC=y
-# CONFIG_BLK_DEV_IDEDMA_PMAC is not set
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_PMAC_IDEDMA_AUTO=y
X # CONFIG_IDE_CHIPSETS is not set
X
X #
X # Additional Block Devices
X #
-CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_LOOP is not set
X # CONFIG_BLK_DEV_NBD is not set
X # CONFIG_BLK_DEV_MD is not set
X CONFIG_BLK_DEV_RAM=y
@@ -89,6 +95,7 @@
X # CONFIG_BLK_DEV_XD is not set
X CONFIG_PARIDE_PARPORT=y
X # CONFIG_PARIDE is not set
+CONFIG_BLK_DEV_IDE_MODES=y
X # CONFIG_BLK_DEV_HD is not set
X
X #
@@ -151,12 +158,12 @@
X CONFIG_CHR_DEV_ST=y
X CONFIG_BLK_DEV_SR=y
X CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
+# CONFIG_CHR_DEV_SG is not set
X
X #
X # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
X #
-CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_MULTI_LUN is not set
X CONFIG_SCSI_CONSTANTS=y
X # CONFIG_SCSI_LOGGING is not set
X
@@ -191,14 +198,8 @@
X # CONFIG_SCSI_NCR53C406A is not set
X # CONFIG_SCSI_SYM53C416 is not set
X # CONFIG_SCSI_NCR53C7xx is not set
-CONFIG_SCSI_NCR53C8XX=y
+# CONFIG_SCSI_NCR53C8XX is not set
X # CONFIG_SCSI_SYM53C8XX is not set
-CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
-CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
-CONFIG_SCSI_NCR53C8XX_SYNC=20
-# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
-# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
X # CONFIG_SCSI_PAS16 is not set
X # CONFIG_SCSI_PCI2000 is not set
X # CONFIG_SCSI_PCI2220I is not set
@@ -236,7 +237,7 @@
X # CONFIG_ACENIC is not set
X # CONFIG_NET_ISA is not set
X CONFIG_NET_EISA=y
-CONFIG_PCNET32=y
+# CONFIG_PCNET32 is not set
X # CONFIG_AC3200 is not set
X # CONFIG_APRICOT is not set
X # CONFIG_CS89x0 is not set
@@ -296,32 +297,18 @@
X CONFIG_FB_CONTROL=y
X CONFIG_FB_PLATINUM=y
X CONFIG_FB_VALKYRIE=y
-# CONFIG_FB_ATY is not set
+CONFIG_FB_ATY=y
X CONFIG_FB_IMSTT=y
X CONFIG_FB_CT65550=y
X # CONFIG_FB_S3TRIO is not set
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G100=y
-# CONFIG_FB_MATROX_MULTIHEAD is not set
-# CONFIG_FB_ATY is not set
+# CONFIG_FB_MATROX is not set
+CONFIG_FB_ATY=y
X # CONFIG_FB_VIRTUAL is not set
-CONFIG_FBCON_ADVANCED=y
-# CONFIG_FBCON_MFB is not set
-# CONFIG_FBCON_CFB2 is not set
-# CONFIG_FBCON_CFB4 is not set
+# CONFIG_FBCON_ADVANCED is not set
X CONFIG_FBCON_CFB8=y
X CONFIG_FBCON_CFB16=y
X CONFIG_FBCON_CFB24=y
X CONFIG_FBCON_CFB32=y
-# CONFIG_FBCON_AFB is not set
-# CONFIG_FBCON_ILBM is not set
-# CONFIG_FBCON_IPLAN2P2 is not set
-# CONFIG_FBCON_IPLAN2P4 is not set
-# CONFIG_FBCON_IPLAN2P8 is not set
-# CONFIG_FBCON_MAC is not set
-# CONFIG_FBCON_VGA is not set
X # CONFIG_FBCON_FONTWIDTH8_ONLY is not set
X CONFIG_FBCON_FONTS=y
X # CONFIG_FONT_8x8 is not set
@@ -337,25 +324,15 @@
X #
X CONFIG_VT=y
X CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=m
+# CONFIG_SERIAL is not set
X # CONFIG_SERIAL_EXTENDED is not set
X # CONFIG_SERIAL_NONSTANDARD is not set
X CONFIG_UNIX98_PTYS=y
X CONFIG_UNIX98_PTY_COUNT=256
-CONFIG_MOUSE=y
-
-#
-# Mice
-#
-# CONFIG_ATIXL_BUSMOUSE is not set
-# CONFIG_BUSMOUSE is not set
-# CONFIG_MS_BUSMOUSE is not set
-CONFIG_PSMOUSE=y
-# CONFIG_82C710_MOUSE is not set
-# CONFIG_PC110_PAD is not set
+# CONFIG_MOUSE is not set
X # CONFIG_QIC02_TAPE is not set
X # CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
+CONFIG_NVRAM=y
X # CONFIG_RTC is not set
X
X #
@@ -390,10 +367,11 @@
X # CONFIG_ADFS_FS is not set
X # CONFIG_AFFS_FS is not set
X CONFIG_HFS_FS=y
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
X # CONFIG_UMSDOS_FS is not set
-CONFIG_VFAT_FS=m
+CONFIG_VFAT_FS=y
+# CONFIG_EFS_FS is not set
X CONFIG_ISO9660_FS=y
X # CONFIG_JOLIET is not set
X # CONFIG_MINIX_FS is not set
@@ -477,4 +455,4 @@
X #
X CONFIG_MAGIC_SYSRQ=y
X # CONFIG_KGDB is not set
-# CONFIG_XMON is not set
+CONFIG_XMON=y
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/Makefile linux/arch/ppc/kernel/Makefile
--- v2.3.3/linux/arch/ppc/kernel/Makefile Thu Apr 29 12:39:01 1999
+++ linux/arch/ppc/kernel/Makefile Sat May 22 13:03:00 1999
@@ -65,7 +65,7 @@
X $(HOSTCC) -o find_name find_name.c
X
X checks: checks.c
- $(HOSTCC) -fno-builtin -I$(TOPDIR)/include -D__KERNEL__ -o checks checks.c
+ $(HOSTCC) ${CFLAGS} -D__KERNEL__ -o checks checks.c
X ./checks
X
X include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/chrp_pci.c linux/arch/ppc/kernel/chrp_pci.c
--- v2.3.3/linux/arch/ppc/kernel/chrp_pci.c Tue May 11 08:24:32 1999
+++ linux/arch/ppc/kernel/chrp_pci.c Sat May 22 13:03:00 1999
@@ -8,6 +8,7 @@
X #include <linux/string.h>
X #include <linux/init.h>
X #include <linux/openpic.h>
+#include <linux/ide.h>
X
X #include <asm/io.h>
X #include <asm/pgtable.h>
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c
--- v2.3.3/linux/arch/ppc/kernel/chrp_setup.c Fri May 14 18:55:12 1999
+++ linux/arch/ppc/kernel/chrp_setup.c Sat May 22 13:03:00 1999
@@ -286,29 +286,6 @@
X if ( !strncmp("MOT", get_property(find_path_device("/"),
X "model", NULL),3) )
X *memory_start_p = pmac_find_bridges(*memory_start_p, *memory_end_p);
- /*
- * The f50 has a lot of IO space - we need to map some in that
- * isn't covered by the BAT mappings in MMU_init() -- Cort
- */
- if ( !strncmp("F5", get_property(find_path_device("/"),
- "ibm,model-class", NULL),2) )
- {
-#if 0
- /*
- * This ugly hack allows us to force ioremap() to
- * create a 1-to-1 mapping for us, even though
- * the address is < ioremap_base. This is necessary
- * since we want our PCI IO space to have contiguous
- * virtual addresses and I think it's worse to have
- * calls to map_page() here.
- * -- Cort
- */
- unsigned long hold = ioremap_base;
- ioremap_base = 0;
- __ioremap(0x90000000, 0x10000000, _PAGE_NO_CACHE);
- ioremap_base = hold;
-#endif
- }
X }
X
X void
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S
--- v2.3.3/linux/arch/ppc/kernel/head.S Tue May 11 08:24:32 1999
+++ linux/arch/ppc/kernel/head.S Sat May 22 13:03:00 1999
@@ -1,7 +1,7 @@
X /*
X * arch/ppc/kernel/head.S
X *
- * $Id: head.S,v 1.130 1999/05/09 19:16:43 cort Exp $
+ * $Id: head.S,v 1.131 1999/05/14 22:37:21 cort Exp $
X *
X * PowerPC version
X * Copyright (C) 1995-1996 Gary Thomas (g...@linuxppc.org)
@@ -97,18 +97,32 @@
X bdnz 0b
X #endif
X
+#ifdef CONFIG_PPC64
+#define LOAD_BAT(n, offset, reg, RA, RB) \
+ ld RA,offset+0(reg); \
+ ld RB,offset+8(reg); \
+ mtspr IBAT##n##U,RA; \
+ mtspr IBAT##n##L,RB; \
+ ld RA,offset+16(reg); \
+ ld RB,offset+24(reg); \
+ mtspr DBAT##n##U,RA; \
+ mtspr DBAT##n##L,RB; \
+
+#else /* CONFIG_PPC64 */
+
X /* 601 only have IBAT cr0.eq is set on 601 when using this macro */
X #define LOAD_BAT(n, offset, reg, RA, RB) \
- lwz RA,offset+0(reg); \
+ lwz RA,offset+0(reg); \
X lwz RB,offset+4(reg); \
- mtspr IBAT##n##U,RA; \
- mtspr IBAT##n##L,RB; \
- beq 1f; \
+ mtspr IBAT##n##U,RA; \
+ mtspr IBAT##n##L,RB; \
+ beq 1f; \
X lwz RA,offset+8(reg); \
X lwz RB,offset+12(reg); \
- mtspr DBAT##n##U,RA; \
- mtspr DBAT##n##L,RB; \
-1:
+ mtspr DBAT##n##U,RA; \
+ mtspr DBAT##n##L,RB; \
+1:
+#endif /* CONFIG_PPC64 */
X
X #ifndef CONFIG_APUS
X #define tophys(rd,rs,rt) addis rd,rs,-KERNELBASE@h
@@ -206,6 +220,16 @@
X
X .globl __start
X __start:
+#ifdef CONFIG_PPC64
+/*
+ * Go into 32-bit mode to boot. OF should do this for
+ * us already but just in case...
+ * -- Cort
+ */
+ mfmsr r10
+ clrldi r10,r10,3
+ mtmsr r10
+#endif
X /*
X * We have to do any OF calls before we map ourselves to KERNELBASE,
X * because OF may have I/O devices mapped in in that area
@@ -226,10 +250,11 @@
X * of RAM to KERNELBASE. From this point on we can't safely
X * call OF any more.
X */
+ lis r11,KERNELBASE@h
+#ifndef CONFIG_PPC64
X mfspr r9,PVR
X rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */
X cmpi 0,r9,1
- lis r11,KERNELBASE@h
X bne 4f
X ori r11,r11,4 /* set up BAT registers for 601 */
X li r8,0x7f /* valid, block length = 8MB */
@@ -240,6 +265,7 @@
X mtspr IBAT1U,r9
X mtspr IBAT1L,r10
X b 5f
+#endif /* CONFIG_PPC64 */
X 4:
X #ifdef CONFIG_APUS
X ori r11,r11,BL_8M<<2|0x2 /* set up an 8MB mapping */
@@ -248,9 +274,17 @@
X lwz r8,0(r8)
X addis r8,r8,KERNELBASE@h
X addi r8,r8,2
-#else
+#else
X ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */
X li r8,2 /* R/W access */
+#ifdef CONFIG_PPC64
+ /* clear out the high 32 bits in the BAT */
+ clrldi r11,r11,32
+ clrldi r8,r8,32
+ /* turn off the pagetable mappings just in case */
+ clrldi r16,r16,63
+ mtsdr1 r16
+#else /* CONFIG_PPC64 */
X /*
X * allow secondary cpus to get at all of ram in early bootup
X * since their init_task may be up there -- Cort
@@ -268,6 +302,7 @@
X mtspr DBAT2U,r21 /* bit in upper BAT register */
X mtspr IBAT2L,r28
X mtspr IBAT2U,r21
+#endif /* CONFIG_PPC64 */
X #endif
X mtspr DBAT0L,r8 /* N.B. 6xx (not 601) have valid */
X mtspr DBAT0U,r11 /* bit in upper BAT register */
@@ -1246,7 +1281,7 @@
X eieio
X lis r2,hash_table_lock@h
X ori r2,r2,hash_table_lock@l
- tophys(r2,r2,r6)
+ tophys(r2,r2,r6)
X lis r6,100000000@h
X mtctr r6
X lwz r0,PROCESSOR-TSS(r5)
@@ -1294,6 +1329,11 @@
X stw r6,0(r2) /* update PTE (accessed/dirty bits) */
X
X /* Convert linux-style PTE to low word of PPC-style PTE */
+#ifdef CONFIG_PPC64
+ /* clear the high 32 bits just in case */
+ clrldi r6,r6,32
+ clrldi r4,r4,32
+#endif /* CONFIG_PPC64 */
X rlwinm r4,r6,32-9,31,31 /* _PAGE_HWWRITE -> PP lsb */
X rlwimi r6,r6,32-1,31,31 /* _PAGE_USER -> PP (both bits now) */
X ori r4,r4,0xe04 /* clear out reserved bits */
@@ -1301,16 +1341,34 @@
X
X /* Construct the high word of the PPC-style PTE */
X mfsrin r5,r3 /* get segment reg for segment */
+#ifdef CONFIG_PPC64
+ sldi r5,r5,12
+#else /* CONFIG_PPC64 */
X rlwinm r5,r5,7,1,24 /* put VSID in 0x7fffff80 bits */
+#endif /* CONFIG_PPC64 */
+
X #ifndef __SMP__ /* do this later for SMP */
+#ifdef CONFIG_PPC64
+ ori r5,r5,1 /* set V (valid) bit */
+#else /* CONFIG_PPC64 */
X oris r5,r5,0x8000 /* set V (valid) bit */
+#endif /* CONFIG_PPC64 */
X #endif
+
+#ifdef CONFIG_PPC64
+/* XXX: does this insert the api correctly? -- Cort */
+ rlwimi r5,r3,17,21,25 /* put in API (abbrev page index) */
+#else /* CONFIG_PPC64 */
X rlwimi r5,r3,10,26,31 /* put in API (abbrev page index) */
-
+#endif /* CONFIG_PPC64 */
X /* Get the address of the primary PTE group in the hash table */
X .globl hash_page_patch_A
X hash_page_patch_A:
X lis r4,Hash_base@h /* base address of hash table */
+#ifdef CONFIG_PPC64
+ /* just in case */
+ clrldi r4,r4,32
+#endif
X rlwimi r4,r5,32-1,26-Hash_bits,25 /* (VSID & hash_mask) << 6 */
X rlwinm r0,r3,32-6,26-Hash_bits,25 /* (PI & hash_mask) << 6 */
X xor r4,r4,r0 /* make primary hash */
@@ -1799,7 +1857,11 @@
X */
X #ifndef CONFIG_8xx
X lis r6,_SDR1@ha
+#ifdef CONFIG_PPC64
+ ld r6,_SDR1@l(r6)
+#else
X lwz r6,_SDR1@l(r6)
+#endif
X #else
X /* The right way to do this would be to track it down through
X * init's TSS like the context switch code does, but this is
@@ -1828,6 +1890,14 @@
X #endif
X #ifndef CONFIG_8xx
X mtspr SDR1,r6
+#ifdef CONFIG_PPC64
+ /* clear the v bit in the ASR so we can
+ * behave as if we have segment registers
+ * -- Cort
+ */
+ clrldi r6,r6,63
+ mtasr r6
+#endif /* CONFIG_PPC64 */
X li r0,16 /* load up segment register values */
X mtctr r0 /* for context 0 */
X lis r3,0x2000 /* Ku = 1, VSID = 0 */
@@ -1844,10 +1914,17 @@
X lis r3,BATS@ha
X addi r3,r3,BATS@l
X tophys(r3,r3,r4)
+#ifdef CONFIG_PPC64
+ LOAD_BAT(0,0,r3,r4,r5)
+ LOAD_BAT(1,32,r3,r4,r5)
+ LOAD_BAT(2,64,r3,r4,r5)
+ LOAD_BAT(3,96,r3,r4,r5)
+#else /* CONFIG_PPC64 */
X LOAD_BAT(0,0,r3,r4,r5)
X LOAD_BAT(1,16,r3,r4,r5)
X LOAD_BAT(2,32,r3,r4,r5)
X LOAD_BAT(3,48,r3,r4,r5)
+#endif /* CONFIG_PPC64 */
X #endif /* CONFIG_8xx */
X /* Set up for using our exception vectors */
X /* ptr to phys current tss */
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/mbx_setup.c linux/arch/ppc/kernel/mbx_setup.c
--- v2.3.3/linux/arch/ppc/kernel/mbx_setup.c Fri May 14 18:55:12 1999
+++ linux/arch/ppc/kernel/mbx_setup.c Sat May 22 13:03:00 1999
@@ -1,5 +1,5 @@
X /*
- * $Id: mbx_setup.c,v 1.9 1999/04/28 11:54:09 davem Exp $
+ * $Id: mbx_setup.c,v 1.10 1999/05/14 07:24:19 davem Exp $
X *
X * linux/arch/ppc/kernel/setup.c
X *
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S
--- v2.3.3/linux/arch/ppc/kernel/misc.S Thu Apr 29 12:39:01 1999
+++ linux/arch/ppc/kernel/misc.S Sat May 22 13:03:00 1999
@@ -649,15 +649,6 @@
X blr
X
X /*
- * Fetch the current SR register
- * get_SR(int index)
- */
-_GLOBAL(get_SR)
- mfsrin r4,r3
- mr r3,r4
- blr
-
-/*
X * Create a kernel thread
X * __kernel_thread(flags, fn, arg)
X */
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/pmac_setup.c linux/arch/ppc/kernel/pmac_setup.c
--- v2.3.3/linux/arch/ppc/kernel/pmac_setup.c Fri May 14 18:55:12 1999
+++ linux/arch/ppc/kernel/pmac_setup.c Sat May 22 13:03:00 1999
@@ -41,6 +41,7 @@
X #include <linux/blk.h>
X #include <linux/vt_kern.h>
X #include <linux/console.h>
+#include <linux/ide.h>
X #include <asm/prom.h>
X #include <asm/system.h>
X #include <asm/pgtable.h>
@@ -543,17 +544,18 @@
X ppc_generic_ide_fix_driveid(id);
X }
X
+#if defined(CONFIG_BLK_DEV_IDE_PMAC)
X /* This is declared in drivers/block/ide-pmac.c */
X void pmac_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq);
-
+#else
X /*
X * This registers the standard ports for this architecture with the IDE
X * driver.
X */
-void
-ide_init_default_hwifs(void)
+void pmac_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
X {
X }
+#endif
X #endif
X
X __initfunc(void
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/prep_pci.c linux/arch/ppc/kernel/prep_pci.c
--- v2.3.3/linux/arch/ppc/kernel/prep_pci.c Tue May 11 08:24:32 1999
+++ linux/arch/ppc/kernel/prep_pci.c Sat May 22 13:03:00 1999
@@ -1,5 +1,5 @@
X /*
- * $Id: prep_pci.c,v 1.33 1999/05/09 20:15:54 cort Exp $
+ * $Id: prep_pci.c,v 1.35 1999/05/10 23:31:03 cort Exp $
X * PReP pci functions.
X * Originally by Gary Thomas
X * rewritten and updated by Cort Dougan (co...@cs.nmt.edu)
@@ -38,6 +38,8 @@
X /* Used for Motorola to store system config register */
X static unsigned long *ProcInfo;
X
+extern void chrp_do_IRQ(struct pt_regs *,int , int);
+
X /* Tables for known hardware */
X
X /* Motorola PowerStackII - Utah */
@@ -731,6 +733,8 @@
X OpenPIC_InitSenses = mvme2600_openpic_initsenses;
X OpenPIC_NumInitSenses = sizeof(mvme2600_openpic_initsenses);
X
+ ppc_md.do_IRQ = chrp_do_IRQ;
+
X /* If raven is present on Motorola store the system config register
X * for later use.
X */
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/prep_setup.c linux/arch/ppc/kernel/prep_setup.c
--- v2.3.3/linux/arch/ppc/kernel/prep_setup.c Fri May 14 18:55:12 1999
+++ linux/arch/ppc/kernel/prep_setup.c Sat May 22 13:03:00 1999
@@ -33,6 +33,7 @@
X #include <linux/timex.h>
X #include <linux/pci.h>
X #include <linux/openpic.h>
+#include <linux/ide.h>
X
X #include <asm/mmu.h>
X #include <asm/processor.h>
@@ -247,7 +248,7 @@
X case _PREP_Motorola:
X /* Enable L2. Assume we don't need to flush -- Cort*/
X *(unsigned char *)(0x8000081c) |= 3;
- ROOT_DEV = to_kdev_t(0x0801); /* sda1 */
+ ROOT_DEV = to_kdev_t(0x0802); /* sda2 */
X break;
X case _PREP_Radstone:
X ROOT_DEV = to_kdev_t(0x0801); /* sda1 */
@@ -774,10 +775,8 @@
X ppc_md.get_cpuinfo = prep_get_cpuinfo;
X ppc_md.irq_cannonicalize = prep_irq_cannonicalize;
X ppc_md.init_IRQ = prep_init_IRQ;
- if ( !OpenPIC )
- ppc_md.do_IRQ = prep_do_IRQ;
- else
- ppc_md.do_IRQ = chrp_do_IRQ;
+ /* this gets changed later on if we have an OpenPIC -- Cort */
+ ppc_md.do_IRQ = prep_do_IRQ;
X ppc_md.init = NULL;
X
X ppc_md.restart = prep_restart;
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/process.c linux/arch/ppc/kernel/process.c
--- v2.3.3/linux/arch/ppc/kernel/process.c Tue May 11 08:24:32 1999
+++ linux/arch/ppc/kernel/process.c Sat May 22 13:03:00 1999
@@ -1,5 +1,5 @@
X /*
- * $Id: process.c,v 1.83 1999/05/10 04:43:43 cort Exp $
+ * $Id: process.c,v 1.85 1999/05/16 21:27:08 cort Exp $
X *
X * linux/arch/ppc/kernel/process.c
X *
@@ -51,8 +51,8 @@
X static struct file * init_fd_array[NR_OPEN] = { NULL, };
X static struct files_struct init_files = INIT_FILES;
X static struct signal_struct init_signals = INIT_SIGNALS;
-struct mm_struct init_mm = INIT_MM;
-union task_union init_task_union = { INIT_TASK };
+struct mm_struct init_mm = INIT_MM(init_mm);
+union task_union init_task_union = { INIT_TASK(init_task_union.task) };
X /* only used to get secondary processor up */
X struct task_struct *current_set[NR_CPUS] = {&init_task, };
X
@@ -233,24 +233,6 @@
X }
X }
X out:
-}
-
-void instruction_dump (unsigned long *pc)
-{
- int i;
-
- if((((unsigned long) pc) & 3))
- return;
-
- printk("Instruction DUMP:");
- for(i = -3; i < 6; i++)
- {
- unsigned long p;
- if (__get_user( p, &pc[i] ))
- break;
- printk("%c%08lx%c",i?' ':'<',p,i?' ':'>');
- }
- printk("\n");
X }
X
X void exit_thread(void)
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/ptrace.c linux/arch/ppc/kernel/ptrace.c
--- v2.3.3/linux/arch/ppc/kernel/ptrace.c Thu Apr 29 12:39:01 1999
+++ linux/arch/ppc/kernel/ptrace.c Sat May 22 12:42:04 1999
@@ -330,8 +330,12 @@
X if ((!child->dumpable ||
X (current->uid != child->euid) ||
X (current->uid != child->uid) ||
+ (current->uid != child->suid) ||
X (current->gid != child->egid) ||
- (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE))
+ (current->gid != child->gid) ||
+ (current->gid != child->sgid) ||
+ (!cap_issubset(child->cap_permitted, current->cap_permitted)))
+ && !capable(CAP_SYS_PTRACE))
X goto out;
X /* the same process cannot be attached many times */
X if (child->flags & PF_PTRACED)
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/residual.c linux/arch/ppc/kernel/residual.c
--- v2.3.3/linux/arch/ppc/kernel/residual.c Fri May 14 18:55:12 1999
+++ linux/arch/ppc/kernel/residual.c Sat May 22 13:03:00 1999
@@ -1,5 +1,5 @@
X /*
- * $Id: residual.c,v 1.14 1998/10/11 17:38:10 cort Exp $
+ * $Id: residual.c,v 1.15 1999/05/14 07:24:27 davem Exp $
X *
X * Code to deal with the PReP residual data.
X *
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/setup.c linux/arch/ppc/kernel/setup.c
--- v2.3.3/linux/arch/ppc/kernel/setup.c Fri May 14 18:55:12 1999
+++ linux/arch/ppc/kernel/setup.c Sat May 22 13:03:00 1999
@@ -1,5 +1,5 @@
X /*
- * $Id: setup.c,v 1.132 1999/03/24 00:32:19 cort Exp $
+ * $Id: setup.c,v 1.133 1999/05/14 07:24:30 davem Exp $
X * Common prep/pmac/chrp boot and setup code.
X */
X
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/softemu8xx.c linux/arch/ppc/kernel/softemu8xx.c
--- v2.3.3/linux/arch/ppc/kernel/softemu8xx.c Wed Mar 10 21:30:32 1999
+++ linux/arch/ppc/kernel/softemu8xx.c Sat May 22 13:03:00 1999
@@ -34,6 +34,7 @@
X
X /* Eventually we may need a look-up table, but this works for now.
X */
+#define LFS 48
X #define LFD 50
X #define LFDU 51
X #define STFD 54
@@ -82,6 +83,12 @@
X retval = EFAULT;
X else
X regs->gpr[idxreg] = (uint)ea;
+ break;
+ case LFS:
+ sdisp = (instword & 0xffff);
+ ea = (uint *)(regs->gpr[idxreg] + sdisp);
+ if (copy_from_user(ip, ea, sizeof(float)))
+ retval = EFAULT;
X break;
X case STFD:
X /* this is a 16 bit quantity that is sign extended
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/syscalls.c linux/arch/ppc/kernel/syscalls.c
--- v2.3.3/linux/arch/ppc/kernel/syscalls.c Sat May 8 11:14:01 1999
+++ linux/arch/ppc/kernel/syscalls.c Sat May 22 13:03:00 1999
@@ -205,15 +205,12 @@
X
X lock_kernel();
X if (!(flags & MAP_ANONYMOUS)) {
- file = fget(fd);
- if (!file)
+ if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
X goto out;
X }
X
X flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
X ret = do_mmap(file, addr, len, prot, flags, offset);
- if (file)
- fput(file);
X out:
X unlock_kernel();
X return ret;
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
--- v2.3.3/linux/arch/ppc/kernel/traps.c Thu Apr 29 12:39:01 1999
+++ linux/arch/ppc/kernel/traps.c Sat May 22 13:03:00 1999
@@ -79,7 +79,6 @@
X debugger(regs);
X #endif
X print_backtrace((unsigned long *)regs->gpr[1]);
- instruction_dump((unsigned long *)regs->nip);
X panic("Exception in kernel pc %lx signal %d",regs->nip,signr);
X }
X force_sig(signr, current);
@@ -127,7 +126,6 @@
X debugger(regs);
X #endif
X print_backtrace((unsigned long *)regs->gpr[1]);
- instruction_dump((unsigned long *)regs->nip);
X panic("machine check");
X }
X _exception(SIGSEGV, regs);
@@ -216,7 +214,6 @@
X #endif
X show_regs(regs);
X print_backtrace((unsigned long *)regs->gpr[1]);
- instruction_dump((unsigned long *)regs->nip);
X panic("kernel stack overflow");
X }
X
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/mm/fault.c linux/arch/ppc/mm/fault.c
--- v2.3.3/linux/arch/ppc/mm/fault.c Tue May 11 08:24:32 1999
+++ linux/arch/ppc/mm/fault.c Sat May 22 13:03:00 1999
@@ -89,7 +89,6 @@
X printk("page fault in interrupt handler, addr=%lx\n",
X address);
X show_regs(regs);
- instruction_dump((unsigned long *)regs->nip);
X #if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
X if (debugger_kernel_faults)
X debugger(regs);
@@ -176,7 +175,6 @@
X /* kernel has accessed a bad area */
X show_regs(regs);
X print_backtrace( (unsigned long *)regs->gpr[1] );
- instruction_dump((unsigned long *)regs->nip);
X #if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
X if (debugger_kernel_faults)
X debugger(regs);
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/mm/init.c linux/arch/ppc/mm/init.c
--- v2.3.3/linux/arch/ppc/mm/init.c Tue May 11 08:24:32 1999
+++ linux/arch/ppc/mm/init.c Sat May 22 13:03:00 1999
@@ -1,5 +1,5 @@
X /*
- * $Id: init.c,v 1.164 1999/05/05 17:33:55 cort Exp $
+ * $Id: init.c,v 1.165 1999/05/14 22:37:29 cort Exp $
X *
X * PowerPC version
X * Copyright (C) 1995-1996 Gary Thomas (g...@linuxppc.org)
@@ -1510,7 +1510,7 @@
X for (h = 256<<10; h < ramsize / 256 && h < 4<<20; h *= 2, Hash_mask++)
X ;
X Hash_size = h;
- Hash_mask << 10; /* so setting _SDR1 works the same -- Cort */
+ Hash_mask <<= 10; /* so setting _SDR1 works the same -- Cort */
X #else
X for (h = 64<<10; h < ramsize / 256 && h < 2<<20; h *= 2)
X ;
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/Makefile linux/arch/ppc/xmon/Makefile
--- v2.3.3/linux/arch/ppc/xmon/Makefile Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/Makefile Sat May 22 13:03:00 1999
@@ -0,0 +1,6 @@
+# Makefile for xmon
+
+O_TARGET = x.o
+O_OBJS = start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi
echo 'End of part 02'
echo 'File patch-2.3.4 is continued in part 03'
echo 03 > _shar_seq_.tmp
exit 0

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part04

#!/bin/sh
# this is part 04 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 04; then


echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&

+{ "bdnza-", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdnza+", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdnza", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPC, { BDA } },
+{ "bdna", BBO(16,BODNZ,1,0), BBOYBI_MASK, POWER, { BDA } },
+{ "bdnzla-", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdnzla+", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdnzla", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPC, { BDA } },
+{ "bdnla", BBO(16,BODNZ,1,1), BBOYBI_MASK, POWER, { BDA } },
+{ "bdz-", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC, { BDM } },
+{ "bdz+", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC, { BDP } },
+{ "bdz", BBO(16,BODZ,0,0), BBOYBI_MASK, PPC|POWER, { BD } },
+{ "bdzl-", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC, { BDM } },
+{ "bdzl+", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC, { BDP } },
+{ "bdzl", BBO(16,BODZ,0,1), BBOYBI_MASK, PPC|POWER, { BD } },
+{ "bdza-", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdza+", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdza", BBO(16,BODZ,1,0), BBOYBI_MASK, PPC|POWER, { BDA } },
+{ "bdzla-", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC, { BDMA } },
+{ "bdzla+", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC, { BDPA } },
+{ "bdzla", BBO(16,BODZ,1,1), BBOYBI_MASK, PPC|POWER, { BDA } },
+{ "blt-", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "blt+", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "blt", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bltl-", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bltl+", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bltl", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "blta-", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "blta+", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "blta", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bltla-", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bltla+", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bltla", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bgt-", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bgt+", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bgt", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bgtl-", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bgtl+", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bgtl", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bgta-", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgta+", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgta", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bgtla-", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgtla+", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgtla", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "beq-", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "beq+", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "beq", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "beql-", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "beql+", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "beql", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "beqa-", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "beqa+", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "beqa", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "beqla-", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "beqla+", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "beqla", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bso-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bso+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bso", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bsol-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bsol+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bsol", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bsoa-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bsoa+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bsoa", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bsola-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bsola+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bsola", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bun-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bun+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bun", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BD } },
+{ "bunl-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bunl+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bunl", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BD } },
+{ "buna-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "buna+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "buna", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDA } },
+{ "bunla-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bunla+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bunla", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDA } },
+{ "bge-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bge+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bge", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bgel-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bgel+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bgel", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bgea-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgea+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgea", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bgela-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bgela+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bgela", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bnl-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnl+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnl", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnll-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnll+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnll", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnla-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnla+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnla", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bnlla-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnlla+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnlla", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "ble-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "ble+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "ble", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "blel-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "blel+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "blel", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "blea-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "blea+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "blea", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "blela-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "blela+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "blela", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bng-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bng+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bng", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bngl-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bngl+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bngl", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnga-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnga+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnga", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bngla-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bngla+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bngla", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bne-", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bne+", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bne", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnel-", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnel+", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnel", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnea-", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnea+", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnea", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bnela-", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnela+", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnela", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bns-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bns+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bns", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnsl-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnsl+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnsl", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC|POWER, { CR, BD } },
+{ "bnsa-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnsa+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnsa", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bnsla-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnsla+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnsla", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC|POWER, { CR, BDA } },
+{ "bnu-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnu+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnu", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPC, { CR, BD } },
+{ "bnul-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDM } },
+{ "bnul+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BDP } },
+{ "bnul", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPC, { CR, BD } },
+{ "bnua-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnua+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnua", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPC, { CR, BDA } },
+{ "bnula-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDMA } },
+{ "bnula+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDPA } },
+{ "bnula", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPC, { CR, BDA } },
+{ "bdnzt-", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnzt+", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzt", BBO(16,BODNZT,0,0), BBOY_MASK, PPC, { BI, BD } },
+{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnztl", BBO(16,BODNZT,0,1), BBOY_MASK, PPC, { BI, BD } },
+{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzta", BBO(16,BODNZT,1,0), BBOY_MASK, PPC, { BI, BDA } },
+{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnztla", BBO(16,BODNZT,1,1), BBOY_MASK, PPC, { BI, BDA } },
+{ "bdnzf-", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnzf+", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzf", BBO(16,BODNZF,0,0), BBOY_MASK, PPC, { BI, BD } },
+{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdnzfl", BBO(16,BODNZF,0,1), BBOY_MASK, PPC, { BI, BD } },
+{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzfa", BBO(16,BODNZF,1,0), BBOY_MASK, PPC, { BI, BDA } },
+{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdnzfla", BBO(16,BODNZF,1,1), BBOY_MASK, PPC, { BI, BDA } },
+{ "bt-", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bt+", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bt", BBO(16,BOT,0,0), BBOY_MASK, PPC, { BI, BD } },
+{ "bbt", BBO(16,BOT,0,0), BBOY_MASK, POWER, { BI, BD } },
+{ "btl-", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "btl+", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "btl", BBO(16,BOT,0,1), BBOY_MASK, PPC, { BI, BD } },
+{ "bbtl", BBO(16,BOT,0,1), BBOY_MASK, POWER, { BI, BD } },
+{ "bta-", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bta+", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bta", BBO(16,BOT,1,0), BBOY_MASK, PPC, { BI, BDA } },
+{ "bbta", BBO(16,BOT,1,0), BBOY_MASK, POWER, { BI, BDA } },
+{ "btla-", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "btla+", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "btla", BBO(16,BOT,1,1), BBOY_MASK, PPC, { BI, BDA } },
+{ "bbtla", BBO(16,BOT,1,1), BBOY_MASK, POWER, { BI, BDA } },
+{ "bf-", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bf+", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bf", BBO(16,BOF,0,0), BBOY_MASK, PPC, { BI, BD } },
+{ "bbf", BBO(16,BOF,0,0), BBOY_MASK, POWER, { BI, BD } },
+{ "bfl-", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bfl+", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bfl", BBO(16,BOF,0,1), BBOY_MASK, PPC, { BI, BD } },
+{ "bbfl", BBO(16,BOF,0,1), BBOY_MASK, POWER, { BI, BD } },
+{ "bfa-", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bfa+", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bfa", BBO(16,BOF,1,0), BBOY_MASK, PPC, { BI, BDA } },
+{ "bbfa", BBO(16,BOF,1,0), BBOY_MASK, POWER, { BI, BDA } },
+{ "bfla-", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bfla+", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bfla", BBO(16,BOF,1,1), BBOY_MASK, PPC, { BI, BDA } },
+{ "bbfla", BBO(16,BOF,1,1), BBOY_MASK, POWER, { BI, BDA } },
+{ "bdzt-", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdzt+", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzt", BBO(16,BODZT,0,0), BBOY_MASK, PPC, { BI, BD } },
+{ "bdztl-", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdztl+", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdztl", BBO(16,BODZT,0,1), BBOY_MASK, PPC, { BI, BD } },
+{ "bdzta-", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdzta+", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzta", BBO(16,BODZT,1,0), BBOY_MASK, PPC, { BI, BDA } },
+{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdztla", BBO(16,BODZT,1,1), BBOY_MASK, PPC, { BI, BDA } },
+{ "bdzf-", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdzf+", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzf", BBO(16,BODZF,0,0), BBOY_MASK, PPC, { BI, BD } },
+{ "bdzfl-", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BDM } },
+{ "bdzfl+", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BDP } },
+{ "bdzfl", BBO(16,BODZF,0,1), BBOY_MASK, PPC, { BI, BD } },
+{ "bdzfa-", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdzfa+", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzfa", BBO(16,BODZF,1,0), BBOY_MASK, PPC, { BI, BDA } },
+{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDMA } },
+{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDPA } },
+{ "bdzfla", BBO(16,BODZF,1,1), BBOY_MASK, PPC, { BI, BDA } },
+{ "bc-", B(16,0,0), B_MASK, PPC, { BOE, BI, BDM } },
+{ "bc+", B(16,0,0), B_MASK, PPC, { BOE, BI, BDP } },
+{ "bc", B(16,0,0), B_MASK, PPC|POWER, { BO, BI, BD } },
+{ "bcl-", B(16,0,1), B_MASK, PPC, { BOE, BI, BDM } },
+{ "bcl+", B(16,0,1), B_MASK, PPC, { BOE, BI, BDP } },
+{ "bcl", B(16,0,1), B_MASK, PPC|POWER, { BO, BI, BD } },
+{ "bca-", B(16,1,0), B_MASK, PPC, { BOE, BI, BDMA } },
+{ "bca+", B(16,1,0), B_MASK, PPC, { BOE, BI, BDPA } },
+{ "bca", B(16,1,0), B_MASK, PPC|POWER, { BO, BI, BDA } },
+{ "bcla-", B(16,1,1), B_MASK, PPC, { BOE, BI, BDMA } },
+{ "bcla+", B(16,1,1), B_MASK, PPC, { BOE, BI, BDPA } },
+{ "bcla", B(16,1,1), B_MASK, PPC|POWER, { BO, BI, BDA } },
+
+{ "sc", SC(17,1,0), 0xffffffff, PPC, { 0 } },
+{ "svc", SC(17,0,0), SC_MASK, POWER, { LEV, FL1, FL2 } },
+{ "svcl", SC(17,0,1), SC_MASK, POWER, { LEV, FL1, FL2 } },
+{ "svca", SC(17,1,0), SC_MASK, POWER, { SV } },
+{ "svcla", SC(17,1,1), SC_MASK, POWER, { SV } },
+
+{ "b", B(18,0,0), B_MASK, PPC|POWER, { LI } },
+{ "bl", B(18,0,1), B_MASK, PPC|POWER, { LI } },
+{ "ba", B(18,1,0), B_MASK, PPC|POWER, { LIA } },
+{ "bla", B(18,1,1), B_MASK, PPC|POWER, { LIA } },
+
+{ "mcrf", XL(19,0), XLBB_MASK|(3<<21)|(3<<16), PPC|POWER, { BF, BFA } },
+
+{ "blr", XLO(19,BOU,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "br", XLO(19,BOU,16,0), XLBOBIBB_MASK, POWER, { 0 } },
+{ "blrl", XLO(19,BOU,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "brl", XLO(19,BOU,16,1), XLBOBIBB_MASK, POWER, { 0 } },
+{ "bdnzlr", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlrl", XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlr", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlrl", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPC, { 0 } },
+{ "bltlr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bltlrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltrl", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bgtlr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlr-", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtr", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bgtlrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtrl", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "beqlr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlr-", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqr", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "beqlrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqrl", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bsolr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsor", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bsolrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsorl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bunlr", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bger", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bgelrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgerl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnllr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnllrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlrl", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "blelr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bler", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "blelrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blerl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnglr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngr", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnglrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngrl", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnelr", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelr-", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bner", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnelrl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnerl", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnslr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnslrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, POWER, { CR } },
+{ "bnulr", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "btlr", XLO(19,BOT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bbtr", XLO(19,BOT,16,0), XLBOBB_MASK, POWER, { BI } },
+{ "btlrl", XLO(19,BOT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "btlrl-", XLO(19,BOT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bbtrl", XLO(19,BOT,16,1), XLBOBB_MASK, POWER, { BI } },
+{ "bflr", XLO(19,BOF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bflr-", XLO(19,BOF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bbfr", XLO(19,BOF,16,0), XLBOBB_MASK, POWER, { BI } },
+{ "bflrl", XLO(19,BOF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bflrl-", XLO(19,BOF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bbfrl", XLO(19,BOF,16,1), XLBOBB_MASK, POWER, { BI } },
+{ "bdnztlr", XLO(19,BODNZT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlr-",XLO(19,BODNZT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlrl",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflr", XLO(19,BODNZF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflrl",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlr", XLO(19,BODZT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlrl", XLO(19,BODZT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflr", XLO(19,BODZF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPC, { BI } },
+{ "bclr", XLLK(19,16,0), XLYBB_MASK, PPC, { BO, BI } },
+{ "bclrl", XLLK(19,16,1), XLYBB_MASK, PPC, { BO, BI } },
+{ "bclr+", XLYLK(19,16,1,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bclrl+", XLYLK(19,16,1,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bclr-", XLYLK(19,16,0,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bclrl-", XLYLK(19,16,0,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcr", XLLK(19,16,0), XLBB_MASK, POWER, { BO, BI } },
+{ "bcrl", XLLK(19,16,1), XLBB_MASK, POWER, { BO, BI } },
+
+{ "crnot", XL(19,33), XL_MASK, PPC, { BT, BA, BBA } },
+{ "crnor", XL(19,33), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "rfi", XL(19,50), 0xffffffff, PPC|POWER, { 0 } },
+{ "rfci", XL(19,51), 0xffffffff, PPC, { 0 } },
+
+{ "rfsvc", XL(19,82), 0xffffffff, POWER, { 0 } },
+
+{ "crandc", XL(19,129), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "isync", XL(19,150), 0xffffffff, PPC, { 0 } },
+{ "ics", XL(19,150), 0xffffffff, POWER, { 0 } },
+
+{ "crclr", XL(19,193), XL_MASK, PPC, { BT, BAT, BBA } },
+{ "crxor", XL(19,193), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "crnand", XL(19,225), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "crand", XL(19,257), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "crset", XL(19,289), XL_MASK, PPC, { BT, BAT, BBA } },
+{ "creqv", XL(19,289), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "crorc", XL(19,417), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "crmove", XL(19,449), XL_MASK, PPC, { BT, BA, BBA } },
+{ "cror", XL(19,449), XL_MASK, PPC|POWER, { BT, BA, BB } },
+
+{ "bctr", XLO(19,BOU,528,0), XLBOBIBB_MASK, PPC|POWER, { 0 } },
+{ "bctrl", XLO(19,BOU,528,1), XLBOBIBB_MASK, PPC|POWER, { 0 } },
+{ "bltctr", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctr-", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctrl", XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctr", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctrl", XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctr", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctrl", XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectr", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectrl", XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPC, { CR } },
+{ "btctr", XLO(19,BOT,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "btctrl", XLO(19,BOT,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bfctr", XLO(19,BOF,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, PPC, { BI } },
+{ "bfctrl", XLO(19,BOF,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPC, { BI } },
+{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPC, { BO, BI } },
+{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctr+", XLYLK(19,528,1,0), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctrl", XLLK(19,528,1), XLYBB_MASK, PPC, { BO, BI } },
+{ "bcctrl-", XLYLK(19,528,0,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPC, { BOE, BI } },
+{ "bcc", XLLK(19,528,0), XLBB_MASK, POWER, { BO, BI } },
+{ "bccl", XLLK(19,528,1), XLBB_MASK, POWER, { BO, BI } },
+
+{ "rlwimi", M(20,0), M_MASK, PPC, { RA,RS,SH,MBE,ME } },
+{ "rlimi", M(20,0), M_MASK, POWER, { RA,RS,SH,MBE,ME } },
+
+{ "rlwimi.", M(20,1), M_MASK, PPC, { RA,RS,SH,MBE,ME } },
+{ "rlimi.", M(20,1), M_MASK, POWER, { RA,RS,SH,MBE,ME } },
+
+{ "rotlwi", MME(21,31,0), MMBME_MASK, PPC, { RA, RS, SH } },
+{ "clrlwi", MME(21,31,0), MSHME_MASK, PPC, { RA, RS, MB } },
+{ "rlwinm", M(21,0), M_MASK, PPC, { RA,RS,SH,MBE,ME } },
+{ "rlinm", M(21,0), M_MASK, POWER, { RA,RS,SH,MBE,ME } },
+{ "rotlwi.", MME(21,31,1), MMBME_MASK, PPC, { RA,RS,SH } },
+{ "clrlwi.", MME(21,31,1), MSHME_MASK, PPC, { RA, RS, MB } },
+{ "rlwinm.", M(21,1), M_MASK, PPC, { RA,RS,SH,MBE,ME } },
+{ "rlinm.", M(21,1), M_MASK, POWER, { RA,RS,SH,MBE,ME } },
+
+{ "rlmi", M(22,0), M_MASK, POWER|M601, { RA,RS,RB,MBE,ME } },
+{ "rlmi.", M(22,1), M_MASK, POWER|M601, { RA,RS,RB,MBE,ME } },
+
+{ "rotlw", MME(23,31,0), MMBME_MASK, PPC, { RA, RS, RB } },
+{ "rlwnm", M(23,0), M_MASK, PPC, { RA,RS,RB,MBE,ME } },
+{ "rlnm", M(23,0), M_MASK, POWER, { RA,RS,RB,MBE,ME } },
+{ "rotlw.", MME(23,31,1), MMBME_MASK, PPC, { RA, RS, RB } },
+{ "rlwnm.", M(23,1), M_MASK, PPC, { RA,RS,RB,MBE,ME } },
+{ "rlnm.", M(23,1), M_MASK, POWER, { RA,RS,RB,MBE,ME } },
+
+{ "nop", OP(24), 0xffffffff, PPC, { 0 } },
+{ "ori", OP(24), OP_MASK, PPC, { RA, RS, UI } },
+{ "oril", OP(24), OP_MASK, POWER, { RA, RS, UI } },
+
+{ "oris", OP(25), OP_MASK, PPC, { RA, RS, UI } },
+{ "oriu", OP(25), OP_MASK, POWER, { RA, RS, UI } },
+
+{ "xori", OP(26), OP_MASK, PPC, { RA, RS, UI } },
+{ "xoril", OP(26), OP_MASK, POWER, { RA, RS, UI } },
+
+{ "xoris", OP(27), OP_MASK, PPC, { RA, RS, UI } },
+{ "xoriu", OP(27), OP_MASK, POWER, { RA, RS, UI } },
+
+{ "andi.", OP(28), OP_MASK, PPC, { RA, RS, UI } },
+{ "andil.", OP(28), OP_MASK, POWER, { RA, RS, UI } },
+
+{ "andis.", OP(29), OP_MASK, PPC, { RA, RS, UI } },
+{ "andiu.", OP(29), OP_MASK, POWER, { RA, RS, UI } },
+
+{ "rotldi", MD(30,0,0), MDMB_MASK, PPC|B64, { RA, RS, SH6 } },
+{ "clrldi", MD(30,0,0), MDSH_MASK, PPC|B64, { RA, RS, MB6 } },
+{ "rldicl", MD(30,0,0), MD_MASK, PPC|B64, { RA, RS, SH6, MB6 } },
+{ "rotldi.", MD(30,0,1), MDMB_MASK, PPC|B64, { RA, RS, SH6 } },
+{ "clrldi.", MD(30,0,1), MDSH_MASK, PPC|B64, { RA, RS, MB6 } },
+{ "rldicl.", MD(30,0,1), MD_MASK, PPC|B64, { RA, RS, SH6, MB6 } },
+
+{ "rldicr", MD(30,1,0), MD_MASK, PPC|B64, { RA, RS, SH6, ME6 } },
+{ "rldicr.", MD(30,1,1), MD_MASK, PPC|B64, { RA, RS, SH6, ME6 } },
+
+{ "rldic", MD(30,2,0), MD_MASK, PPC|B64, { RA, RS, SH6, MB6 } },
+{ "rldic.", MD(30,2,1), MD_MASK, PPC|B64, { RA, RS, SH6, MB6 } },
+
+{ "rldimi", MD(30,3,0), MD_MASK, PPC|B64, { RA, RS, SH6, MB6 } },
+{ "rldimi.", MD(30,3,1), MD_MASK, PPC|B64, { RA, RS, SH6, MB6 } },
+
+{ "rotld", MDS(30,8,0), MDSMB_MASK, PPC|B64, { RA, RS, RB } },
+{ "rldcl", MDS(30,8,0), MDS_MASK, PPC|B64, { RA, RS, RB, MB6 } },
+{ "rotld.", MDS(30,8,1), MDSMB_MASK, PPC|B64, { RA, RS, RB } },
+{ "rldcl.", MDS(30,8,1), MDS_MASK, PPC|B64, { RA, RS, RB, MB6 } },
+
+{ "rldcr", MDS(30,9,0), MDS_MASK, PPC|B64, { RA, RS, RB, ME6 } },
+{ "rldcr.", MDS(30,9,1), MDS_MASK, PPC|B64, { RA, RS, RB, ME6 } },
+
+{ "cmpw", XCMPL(31,0,0), XCMPL_MASK, PPC, { OBF, RA, RB } },
+{ "cmpd", XCMPL(31,0,1), XCMPL_MASK, PPC|B64, { OBF, RA, RB } },
+{ "cmp", X(31,0), XCMP_MASK, PPC, { BF, L, RA, RB } },
+{ "cmp", X(31,0), XCMPL_MASK, POWER, { BF, RA, RB } },
+
+{ "twlgt", XTO(31,4,TOLGT), XTO_MASK, PPC, { RA, RB } },
+{ "tlgt", XTO(31,4,TOLGT), XTO_MASK, POWER, { RA, RB } },
+{ "twllt", XTO(31,4,TOLLT), XTO_MASK, PPC, { RA, RB } },
+{ "tllt", XTO(31,4,TOLLT), XTO_MASK, POWER, { RA, RB } },
+{ "tweq", XTO(31,4,TOEQ), XTO_MASK, PPC, { RA, RB } },
+{ "teq", XTO(31,4,TOEQ), XTO_MASK, POWER, { RA, RB } },
+{ "twlge", XTO(31,4,TOLGE), XTO_MASK, PPC, { RA, RB } },
+{ "tlge", XTO(31,4,TOLGE), XTO_MASK, POWER, { RA, RB } },
+{ "twlnl", XTO(31,4,TOLNL), XTO_MASK, PPC, { RA, RB } },
+{ "tlnl", XTO(31,4,TOLNL), XTO_MASK, POWER, { RA, RB } },
+{ "twlle", XTO(31,4,TOLLE), XTO_MASK, PPC, { RA, RB } },
+{ "tlle", XTO(31,4,TOLLE), XTO_MASK, POWER, { RA, RB } },
+{ "twlng", XTO(31,4,TOLNG), XTO_MASK, PPC, { RA, RB } },
+{ "tlng", XTO(31,4,TOLNG), XTO_MASK, POWER, { RA, RB } },
+{ "twgt", XTO(31,4,TOGT), XTO_MASK, PPC, { RA, RB } },
+{ "tgt", XTO(31,4,TOGT), XTO_MASK, POWER, { RA, RB } },
+{ "twge", XTO(31,4,TOGE), XTO_MASK, PPC, { RA, RB } },
+{ "tge", XTO(31,4,TOGE), XTO_MASK, POWER, { RA, RB } },
+{ "twnl", XTO(31,4,TONL), XTO_MASK, PPC, { RA, RB } },
+{ "tnl", XTO(31,4,TONL), XTO_MASK, POWER, { RA, RB } },
+{ "twlt", XTO(31,4,TOLT), XTO_MASK, PPC, { RA, RB } },
+{ "tlt", XTO(31,4,TOLT), XTO_MASK, POWER, { RA, RB } },
+{ "twle", XTO(31,4,TOLE), XTO_MASK, PPC, { RA, RB } },
+{ "tle", XTO(31,4,TOLE), XTO_MASK, POWER, { RA, RB } },
+{ "twng", XTO(31,4,TONG), XTO_MASK, PPC, { RA, RB } },
+{ "tng", XTO(31,4,TONG), XTO_MASK, POWER, { RA, RB } },
+{ "twne", XTO(31,4,TONE), XTO_MASK, PPC, { RA, RB } },
+{ "tne", XTO(31,4,TONE), XTO_MASK, POWER, { RA, RB } },
+{ "trap", XTO(31,4,TOU), 0xffffffff, PPC, { 0 } },
+{ "tw", X(31,4), X_MASK, PPC, { TO, RA, RB } },
+{ "t", X(31,4), X_MASK, POWER, { TO, RA, RB } },
+
+{ "subfc", XO(31,8,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "sf", XO(31,8,0,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "subc", XO(31,8,0,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfc.", XO(31,8,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "sf.", XO(31,8,0,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "subc.", XO(31,8,0,1), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfco", XO(31,8,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "sfo", XO(31,8,1,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "subco", XO(31,8,1,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfco.", XO(31,8,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "sfo.", XO(31,8,1,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "subco.", XO(31,8,1,1), XO_MASK, PPC, { RT, RB, RA } },
+
+{ "mulhdu", XO(31,9,0,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "mulhdu.", XO(31,9,0,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "addc", XO(31,10,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "a", XO(31,10,0,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "addc.", XO(31,10,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "a.", XO(31,10,0,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "addco", XO(31,10,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "ao", XO(31,10,1,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "addco.", XO(31,10,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "ao.", XO(31,10,1,1), XO_MASK, POWER, { RT, RA, RB } },
+
+{ "mulhwu", XO(31,11,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "mulhwu.", XO(31,11,0,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "mfcr", X(31,19), XRARB_MASK, POWER|PPC, { RT } },
+
+{ "lwarx", X(31,20), X_MASK, PPC, { RT, RA, RB } },
+
+{ "ldx", X(31,21), X_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "lwzx", X(31,23), X_MASK, PPC, { RT, RA, RB } },
+{ "lx", X(31,23), X_MASK, POWER, { RT, RA, RB } },
+
+{ "slw", XRC(31,24,0), X_MASK, PPC, { RA, RS, RB } },
+{ "sl", XRC(31,24,0), X_MASK, POWER, { RA, RS, RB } },
+{ "slw.", XRC(31,24,1), X_MASK, PPC, { RA, RS, RB } },
+{ "sl.", XRC(31,24,1), X_MASK, POWER, { RA, RS, RB } },
+
+{ "cntlzw", XRC(31,26,0), XRB_MASK, PPC, { RA, RS } },
+{ "cntlz", XRC(31,26,0), XRB_MASK, POWER, { RA, RS } },
+{ "cntlzw.", XRC(31,26,1), XRB_MASK, PPC, { RA, RS } },
+{ "cntlz.", XRC(31,26,1), XRB_MASK, POWER, { RA, RS } },
+
+{ "sld", XRC(31,27,0), X_MASK, PPC|B64, { RA, RS, RB } },
+{ "sld.", XRC(31,27,1), X_MASK, PPC|B64, { RA, RS, RB } },
+
+{ "and", XRC(31,28,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "and.", XRC(31,28,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "maskg", XRC(31,29,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "maskg.", XRC(31,29,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "cmplw", XCMPL(31,32,0), XCMPL_MASK, PPC, { OBF, RA, RB } },
+{ "cmpld", XCMPL(31,32,1), XCMPL_MASK, PPC|B64, { OBF, RA, RB } },
+{ "cmpl", X(31,32), XCMP_MASK, PPC, { BF, L, RA, RB } },
+{ "cmpl", X(31,32), XCMPL_MASK, POWER, { BF, RA, RB } },
+
+{ "subf", XO(31,40,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "sub", XO(31,40,0,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subf.", XO(31,40,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "sub.", XO(31,40,0,1), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfo", XO(31,40,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "subo", XO(31,40,1,0), XO_MASK, PPC, { RT, RB, RA } },
+{ "subfo.", XO(31,40,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "subo.", XO(31,40,1,1), XO_MASK, PPC, { RT, RB, RA } },
+
+{ "ldux", X(31,53), X_MASK, PPC|B64, { RT, RAL, RB } },
+
+{ "dcbst", X(31,54), XRT_MASK, PPC, { RA, RB } },
+
+{ "lwzux", X(31,55), X_MASK, PPC, { RT, RAL, RB } },
+{ "lux", X(31,55), X_MASK, POWER, { RT, RA, RB } },
+
+{ "cntlzd", XRC(31,58,0), XRB_MASK, PPC|B64, { RA, RS } },
+{ "cntlzd.", XRC(31,58,1), XRB_MASK, PPC|B64, { RA, RS } },
+
+{ "andc", XRC(31,60,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "andc.", XRC(31,60,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "tdlgt", XTO(31,68,TOLGT), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdllt", XTO(31,68,TOLLT), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdeq", XTO(31,68,TOEQ), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdlge", XTO(31,68,TOLGE), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdlnl", XTO(31,68,TOLNL), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdlle", XTO(31,68,TOLLE), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdlng", XTO(31,68,TOLNG), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdgt", XTO(31,68,TOGT), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdge", XTO(31,68,TOGE), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdnl", XTO(31,68,TONL), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdlt", XTO(31,68,TOLT), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdle", XTO(31,68,TOLE), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdng", XTO(31,68,TONG), XTO_MASK, PPC|B64, { RA, RB } },
+{ "tdne", XTO(31,68,TONE), XTO_MASK, PPC|B64, { RA, RB } },
+{ "td", X(31,68), X_MASK, PPC|B64, { TO, RA, RB } },
+
+{ "mulhd", XO(31,73,0,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "mulhd.", XO(31,73,0,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "mulhw", XO(31,75,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "mulhw.", XO(31,75,0,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "mfmsr", X(31,83), XRARB_MASK, PPC|POWER, { RT } },
+
+{ "ldarx", X(31,84), X_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "dcbf", X(31,86), XRT_MASK, PPC, { RA, RB } },
+
+{ "lbzx", X(31,87), X_MASK, PPC|POWER, { RT, RA, RB } },
+
+{ "neg", XO(31,104,0,0), XORB_MASK, PPC|POWER, { RT, RA } },
+{ "neg.", XO(31,104,0,1), XORB_MASK, PPC|POWER, { RT, RA } },
+{ "nego", XO(31,104,1,0), XORB_MASK, PPC|POWER, { RT, RA } },
+{ "nego.", XO(31,104,1,1), XORB_MASK, PPC|POWER, { RT, RA } },
+
+{ "mul", XO(31,107,0,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "mul.", XO(31,107,0,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "mulo", XO(31,107,1,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "mulo.", XO(31,107,1,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+
+{ "clf", X(31,118), XRB_MASK, POWER, { RT, RA } },
+
+{ "lbzux", X(31,119), X_MASK, PPC|POWER, { RT, RAL, RB } },
+
+{ "not", XRC(31,124,0), X_MASK, PPC|POWER, { RA, RS, RBS } },
+{ "nor", XRC(31,124,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "not.", XRC(31,124,1), X_MASK, PPC|POWER, { RA, RS, RBS } },
+{ "nor.", XRC(31,124,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "subfe", XO(31,136,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "sfe", XO(31,136,0,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "subfe.", XO(31,136,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "sfe.", XO(31,136,0,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "subfeo", XO(31,136,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "sfeo", XO(31,136,1,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "subfeo.", XO(31,136,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "sfeo.", XO(31,136,1,1), XO_MASK, POWER, { RT, RA, RB } },
+
+{ "adde", XO(31,138,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "ae", XO(31,138,0,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "adde.", XO(31,138,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "ae.", XO(31,138,0,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "addeo", XO(31,138,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "aeo", XO(31,138,1,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "addeo.", XO(31,138,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "aeo.", XO(31,138,1,1), XO_MASK, POWER, { RT, RA, RB } },
+
+{ "mtcr", XFXM(31,144,0xff), XFXFXM_MASK|FXM_MASK, PPC|POWER, { RS }},
+{ "mtcrf", X(31,144), XFXFXM_MASK, PPC|POWER, { FXM, RS } },
+
+{ "mtmsr", X(31,146), XRARB_MASK, PPC|POWER, { RS } },
+
+{ "stdx", X(31,149), X_MASK, PPC|B64, { RS, RA, RB } },
+
+{ "stwcx.", XRC(31,150,1), X_MASK, PPC, { RS, RA, RB } },
+
+{ "stwx", X(31,151), X_MASK, PPC, { RS, RA, RB } },
+{ "stx", X(31,151), X_MASK, POWER, { RS, RA, RB } },
+
+{ "slq", XRC(31,152,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "slq.", XRC(31,152,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "sle", XRC(31,153,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "sle.", XRC(31,153,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "stdux", X(31,181), X_MASK, PPC|B64, { RS, RAS, RB } },
+
+{ "stwux", X(31,183), X_MASK, PPC, { RS, RAS, RB } },
+{ "stux", X(31,183), X_MASK, POWER, { RS, RA, RB } },
+
+{ "sliq", XRC(31,184,0), X_MASK, POWER|M601, { RA, RS, SH } },
+{ "sliq.", XRC(31,184,1), X_MASK, POWER|M601, { RA, RS, SH } },
+
+{ "subfze", XO(31,200,0,0), XORB_MASK, PPC, { RT, RA } },
+{ "sfze", XO(31,200,0,0), XORB_MASK, POWER, { RT, RA } },
+{ "subfze.", XO(31,200,0,1), XORB_MASK, PPC, { RT, RA } },
+{ "sfze.", XO(31,200,0,1), XORB_MASK, POWER, { RT, RA } },
+{ "subfzeo", XO(31,200,1,0), XORB_MASK, PPC, { RT, RA } },
+{ "sfzeo", XO(31,200,1,0), XORB_MASK, POWER, { RT, RA } },
+{ "subfzeo.",XO(31,200,1,1), XORB_MASK, PPC, { RT, RA } },
+{ "sfzeo.", XO(31,200,1,1), XORB_MASK, POWER, { RT, RA } },
+
+{ "addze", XO(31,202,0,0), XORB_MASK, PPC, { RT, RA } },
+{ "aze", XO(31,202,0,0), XORB_MASK, POWER, { RT, RA } },
+{ "addze.", XO(31,202,0,1), XORB_MASK, PPC, { RT, RA } },
+{ "aze.", XO(31,202,0,1), XORB_MASK, POWER, { RT, RA } },
+{ "addzeo", XO(31,202,1,0), XORB_MASK, PPC, { RT, RA } },
+{ "azeo", XO(31,202,1,0), XORB_MASK, POWER, { RT, RA } },
+{ "addzeo.", XO(31,202,1,1), XORB_MASK, PPC, { RT, RA } },
+{ "azeo.", XO(31,202,1,1), XORB_MASK, POWER, { RT, RA } },
+
+{ "mtsr", X(31,210), XRB_MASK|(1<<20), PPC|POWER|B32, { SR, RS } },
+
+{ "stdcx.", XRC(31,214,1), X_MASK, PPC|B64, { RS, RA, RB } },
+
+{ "stbx", X(31,215), X_MASK, PPC|POWER, { RS, RA, RB } },
+
+{ "sllq", XRC(31,216,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "sllq.", XRC(31,216,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "sleq", XRC(31,217,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "sleq.", XRC(31,217,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "subfme", XO(31,232,0,0), XORB_MASK, PPC, { RT, RA } },
+{ "sfme", XO(31,232,0,0), XORB_MASK, POWER, { RT, RA } },
+{ "subfme.", XO(31,232,0,1), XORB_MASK, PPC, { RT, RA } },
+{ "sfme.", XO(31,232,0,1), XORB_MASK, POWER, { RT, RA } },
+{ "subfmeo", XO(31,232,1,0), XORB_MASK, PPC, { RT, RA } },
+{ "sfmeo", XO(31,232,1,0), XORB_MASK, POWER, { RT, RA } },
+{ "subfmeo.",XO(31,232,1,1), XORB_MASK, PPC, { RT, RA } },
+{ "sfmeo.", XO(31,232,1,1), XORB_MASK, POWER, { RT, RA } },
+
+{ "mulld", XO(31,233,0,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "mulld.", XO(31,233,0,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "mulldo", XO(31,233,1,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "mulldo.", XO(31,233,1,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "addme", XO(31,234,0,0), XORB_MASK, PPC, { RT, RA } },
+{ "ame", XO(31,234,0,0), XORB_MASK, POWER, { RT, RA } },
+{ "addme.", XO(31,234,0,1), XORB_MASK, PPC, { RT, RA } },
+{ "ame.", XO(31,234,0,1), XORB_MASK, POWER, { RT, RA } },
+{ "addmeo", XO(31,234,1,0), XORB_MASK, PPC, { RT, RA } },
+{ "ameo", XO(31,234,1,0), XORB_MASK, POWER, { RT, RA } },
+{ "addmeo.", XO(31,234,1,1), XORB_MASK, PPC, { RT, RA } },
+{ "ameo.", XO(31,234,1,1), XORB_MASK, POWER, { RT, RA } },
+
+{ "mullw", XO(31,235,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "muls", XO(31,235,0,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "mullw.", XO(31,235,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "muls.", XO(31,235,0,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "mullwo", XO(31,235,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "mulso", XO(31,235,1,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "mullwo.", XO(31,235,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "mulso.", XO(31,235,1,1), XO_MASK, POWER, { RT, RA, RB } },
+
+{ "mtsrin", X(31,242), XRA_MASK, PPC|B32, { RS, RB } },
+{ "mtsri", X(31,242), XRA_MASK, POWER|B32, { RS, RB } },
+
+{ "dcbtst", X(31,246), XRT_MASK, PPC, { RA, RB } },
+
+{ "stbux", X(31,247), X_MASK, PPC|POWER, { RS, RAS, RB } },
+
+{ "slliq", XRC(31,248,0), X_MASK, POWER|M601, { RA, RS, SH } },
+{ "slliq.", XRC(31,248,1), X_MASK, POWER|M601, { RA, RS, SH } },
+
+{ "doz", XO(31,264,0,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "doz.", XO(31,264,0,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "dozo", XO(31,264,1,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "dozo.", XO(31,264,1,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+
+{ "add", XO(31,266,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "cax", XO(31,266,0,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "add.", XO(31,266,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "cax.", XO(31,266,0,1), XO_MASK, POWER, { RT, RA, RB } },
+{ "addo", XO(31,266,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "caxo", XO(31,266,1,0), XO_MASK, POWER, { RT, RA, RB } },
+{ "addo.", XO(31,266,1,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "caxo.", XO(31,266,1,1), XO_MASK, POWER, { RT, RA, RB } },
+
+{ "lscbx", XRC(31,277,0), X_MASK, POWER|M601, { RT, RA, RB } },
+{ "lscbx.", XRC(31,277,1), X_MASK, POWER|M601, { RT, RA, RB } },
+
+{ "dcbt", X(31,278), XRT_MASK, PPC, { RA, RB } },
+
+{ "lhzx", X(31,279), X_MASK, PPC|POWER, { RT, RA, RB } },
+
+{ "icbt", X(31,262), XRT_MASK, PPC, { RA, RB } },
+
+{ "eqv", XRC(31,284,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "eqv.", XRC(31,284,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "tlbie", X(31,306), XRTRA_MASK, PPC, { RB } },
+{ "tlbi", X(31,306), XRTRA_MASK, POWER, { RB } },
+
+{ "eciwx", X(31,310), X_MASK, PPC, { RT, RA, RB } },
+
+{ "lhzux", X(31,311), X_MASK, PPC|POWER, { RT, RAL, RB } },
+
+{ "xor", XRC(31,316,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "xor.", XRC(31,316,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "mfdcr", X(31,323), X_MASK, PPC, { RT, SPR } },
+
+{ "div", XO(31,331,0,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "div.", XO(31,331,0,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "divo", XO(31,331,1,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "divo.", XO(31,331,1,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+
+{ "mfmq", XSPR(31,339,0), XSPR_MASK, POWER|M601, { RT } },
+{ "mfxer", XSPR(31,339,1), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfrtcu", XSPR(31,339,4), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfrtcl", XSPR(31,339,5), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfdec", XSPR(31,339,6), XSPR_MASK, POWER|M601, { RT } },
+{ "mflr", XSPR(31,339,8), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfctr", XSPR(31,339,9), XSPR_MASK, PPC|POWER, { RT } },
+{ "mftid", XSPR(31,339,17), XSPR_MASK, POWER, { RT } },
+{ "mfdsisr", XSPR(31,339,18), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfdar", XSPR(31,339,19), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfdec", XSPR(31,339,22), XSPR_MASK, PPC, { RT } },
+{ "mfsdr0", XSPR(31,339,24), XSPR_MASK, POWER, { RT } },
+{ "mfsdr1", XSPR(31,339,25), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfsrr0", XSPR(31,339,26), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfsrr1", XSPR(31,339,27), XSPR_MASK, PPC|POWER, { RT } },
+{ "mfsprg", XSPR(31,339,272), XSPRG_MASK, PPC, { RT, SPRG } },
+{ "mfasr", XSPR(31,339,280), XSPR_MASK, PPC|B64, { RT } },
+{ "mfear", XSPR(31,339,282), XSPR_MASK, PPC, { RT } },
+{ "mfpvr", XSPR(31,339,287), XSPR_MASK, PPC, { RT } },
+{ "mfibatu", XSPR(31,339,528), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfibatl", XSPR(31,339,529), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfdbatu", XSPR(31,339,536), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfdbatl", XSPR(31,339,537), XSPRBAT_MASK, PPC, { RT, SPRBAT } },
+{ "mfspr", X(31,339), X_MASK, PPC|POWER, { RT, SPR } },
+
+{ "lwax", X(31,341), X_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "lhax", X(31,343), X_MASK, PPC|POWER, { RT, RA, RB } },
+
+{ "dccci", X(31,454), XRT_MASK, PPC, { RA, RB } },
+
+{ "abs", XO(31,360,0,0), XORB_MASK, POWER|M601, { RT, RA } },
+{ "abs.", XO(31,360,0,1), XORB_MASK, POWER|M601, { RT, RA } },
+{ "abso", XO(31,360,1,0), XORB_MASK, POWER|M601, { RT, RA } },
+{ "abso.", XO(31,360,1,1), XORB_MASK, POWER|M601, { RT, RA } },
+
+{ "divs", XO(31,363,0,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "divs.", XO(31,363,0,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "divso", XO(31,363,1,0), XO_MASK, POWER|M601, { RT, RA, RB } },
+{ "divso.", XO(31,363,1,1), XO_MASK, POWER|M601, { RT, RA, RB } },
+
+{ "tlbia", X(31,370), 0xffffffff, PPC, { 0 } },
+
+{ "mftbu", XSPR(31,371,269), XSPR_MASK, PPC, { RT } },
+{ "mftb", X(31,371), X_MASK, PPC, { RT, TBR } },
+
+{ "lwaux", X(31,373), X_MASK, PPC|B64, { RT, RAL, RB } },
+
+{ "lhaux", X(31,375), X_MASK, PPC|POWER, { RT, RAL, RB } },


SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi

echo 'End of part 04'
echo 'File patch-2.3.4 is continued in part 05'
echo 05 > _shar_seq_.tmp
exit 0

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part03

#!/bin/sh
# this is part 03 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 03; then


echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&
+

+include $(TOPDIR)/Rules.make
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/adb.c linux/arch/ppc/xmon/adb.c
--- v2.3.3/linux/arch/ppc/xmon/adb.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/adb.c Sat May 22 13:03:00 1999
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 1996 Paul Mackerras.
+ */
+#include "nonstdio.h"
+#include "privinst.h"
+
+#define scanhex xmon_scanhex
+#define skipbl xmon_skipbl
+
+#define ADB_B (*(volatile unsigned char *)0xf3016000)
+#define ADB_SR (*(volatile unsigned char *)0xf3017400)
+#define ADB_ACR (*(volatile unsigned char *)0xf3017600)
+#define ADB_IFR (*(volatile unsigned char *)0xf3017a00)
+
+static inline void eieio(void) { asm volatile ("eieio" : :); }
+
+#define N_ADB_LOG 1000
+struct adb_log {
+ unsigned char b;
+ unsigned char ifr;
+ unsigned char acr;
+ unsigned int time;
+} adb_log[N_ADB_LOG];
+int n_adb_log;
+
+void
+init_adb_log(void)
+{
+ adb_log[0].b = ADB_B;
+ adb_log[0].ifr = ADB_IFR;
+ adb_log[0].acr = ADB_ACR;
+ adb_log[0].time = get_dec();
+ n_adb_log = 0;
+}
+
+void
+dump_adb_log(void)
+{
+ unsigned t, t0;
+ struct adb_log *ap;
+ int i;
+
+ ap = adb_log;
+ t0 = ap->time;
+ for (i = 0; i <= n_adb_log; ++i, ++ap) {
+ t = t0 - ap->time;
+ printf("b=%x ifr=%x acr=%x at %d.%.7d\n", ap->b, ap->ifr, ap->acr,
+ t / 1000000000, (t % 1000000000) / 100);
+ }
+}
+
+void
+adb_chklog(void)
+{
+ struct adb_log *ap = &adb_log[n_adb_log + 1];
+
+ ap->b = ADB_B;
+ ap->ifr = ADB_IFR;
+ ap->acr = ADB_ACR;
+ if (ap->b != ap[-1].b || (ap->ifr & 4) != (ap[-1].ifr & 4)
+ || ap->acr != ap[-1].acr) {
+ ap->time = get_dec();
+ ++n_adb_log;
+ }
+}
+
+int
+adb_bitwait(int bmask, int bval, int fmask, int fval)
+{
+ int i;
+ struct adb_log *ap;
+
+ for (i = 10000; i > 0; --i) {
+ adb_chklog();
+ ap = &adb_log[n_adb_log];
+ if ((ap->b & bmask) == bval && (ap->ifr & fmask) == fval)
+ return 0;
+ }
+ return -1;
+}
+
+int
+adb_wait(void)
+{
+ if (adb_bitwait(0, 0, 4, 4) < 0) {
+ printf("adb: ready wait timeout\n");
+ return -1;
+ }
+ return 0;
+}
+
+void
+adb_readin(void)
+{
+ int i, j;
+ unsigned char d[64];
+
+ if (ADB_B & 8) {
+ printf("ADB_B: %x\n", ADB_B);
+ return;
+ }
+ i = 0;
+ adb_wait();
+ j = ADB_SR;
+ eieio();
+ ADB_B &= ~0x20;
+ eieio();
+ for (;;) {
+ if (adb_wait() < 0)
+ break;
+ d[i++] = ADB_SR;
+ eieio();
+ if (ADB_B & 8)
+ break;
+ ADB_B ^= 0x10;
+ eieio();
+ }
+ ADB_B |= 0x30;
+ if (adb_wait() == 0)
+ j = ADB_SR;
+ for (j = 0; j < i; ++j)
+ printf("%.2x ", d[j]);
+ printf("\n");
+}
+
+int
+adb_write(unsigned char *d, int i)
+{
+ int j;
+ unsigned x;
+
+ if ((ADB_B & 8) == 0) {
+ printf("r: ");
+ adb_readin();
+ }
+ for (;;) {
+ ADB_ACR = 0x1c;
+ eieio();
+ ADB_SR = d[0];
+ eieio();
+ ADB_B &= ~0x20;
+ eieio();
+ if (ADB_B & 8)
+ break;
+ ADB_ACR = 0xc;
+ eieio();
+ ADB_B |= 0x20;
+ eieio();
+ adb_readin();
+ }
+ adb_wait();
+ for (j = 1; j < i; ++j) {
+ ADB_SR = d[j];
+ eieio();
+ ADB_B ^= 0x10;
+ eieio();
+ if (adb_wait() < 0)
+ break;
+ }
+ ADB_ACR = 0xc;
+ eieio();
+ x = ADB_SR;
+ eieio();
+ ADB_B |= 0x30;
+ return j;
+}
+
+void
+adbcmds(void)
+{
+ char cmd;
+ unsigned rtcu, rtcl, dec, pdec, x;
+ int i, j;
+ unsigned char d[64];
+
+ cmd = skipbl();
+ switch (cmd) {
+ case 't':
+ for (;;) {
+ rtcl = get_rtcl();
+ rtcu = get_rtcu();
+ dec = get_dec();
+ printf("rtc u=%u l=%u dec=%x (%d = %d.%.7d)\n",
+ rtcu, rtcl, dec, pdec - dec, (pdec - dec) / 1000000000,
+ ((pdec - dec) % 1000000000) / 100);
+ pdec = dec;
+ if (cmd == 'x')
+ break;
+ while (xmon_read(stdin, &cmd, 1) != 1)
+ ;
+ }
+ break;
+ case 'r':
+ init_adb_log();
+ while (adb_bitwait(8, 0, 0, 0) == 0)
+ adb_readin();
+ break;
+ case 'w':
+ i = 0;
+ while (scanhex(&x))
+ d[i++] = x;
+ init_adb_log();
+ j = adb_write(d, i);
+ printf("sent %d bytes\n", j);
+ while (adb_bitwait(8, 0, 0, 0) == 0)
+ adb_readin();
+ break;
+ case 'l':
+ dump_adb_log();
+ break;
+ }
+}
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/ansidecl.h linux/arch/ppc/xmon/ansidecl.h
--- v2.3.3/linux/arch/ppc/xmon/ansidecl.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/ansidecl.h Sat May 22 13:03:00 1999
@@ -0,0 +1,141 @@
+/* ANSI and traditional C compatability macros
+ Copyright 1991, 1992 Free Software Foundation, Inc.
+ This file is part of the GNU C 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. */
+
+/* ANSI and traditional C compatibility macros
+
+ ANSI C is assumed if __STDC__ is #defined.
+
+ Macro ANSI C definition Traditional C definition
+ ----- ---- - ---------- ----------- - ----------
+ PTR `void *' `char *'
+ LONG_DOUBLE `long double' `double'
+ VOLATILE `volatile' `'
+ SIGNED `signed' `'
+ PTRCONST `void *const' `char *'
+ ANSI_PROTOTYPES 1 not defined
+
+ CONST is also defined, but is obsolete. Just use const.
+
+ DEFUN (name, arglist, args)
+
+ Defines function NAME.
+
+ ARGLIST lists the arguments, separated by commas and enclosed in
+ parentheses. ARGLIST becomes the argument list in traditional C.
+
+ ARGS list the arguments with their types. It becomes a prototype in
+ ANSI C, and the type declarations in traditional C. Arguments should
+ be separated with `AND'. For functions with a variable number of
+ arguments, the last thing listed should be `DOTS'.
+
+ DEFUN_VOID (name)
+
+ Defines a function NAME, which takes no arguments.
+
+ obsolete -- EXFUN (name, (prototype)) -- obsolete.
+
+ Replaced by PARAMS. Do not use; will disappear someday soon.
+ Was used in external function declarations.
+ In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
+ parentheses). In traditional C it is `NAME()'.
+ For a function that takes no arguments, PROTOTYPE should be `(void)'.
+
+ PARAMS ((args))
+
+ We could use the EXFUN macro to handle prototype declarations, but
+ the name is misleading and the result is ugly. So we just define a
+ simple macro to handle the parameter lists, as in:
+
+ static int foo PARAMS ((int, char));
+
+ This produces: `static int foo();' or `static int foo (int, char);'
+
+ EXFUN would have done it like this:
+
+ static int EXFUN (foo, (int, char));
+
+ but the function is not external...and it's hard to visually parse
+ the function name out of the mess. EXFUN should be considered
+ obsolete; new code should be written to use PARAMS.
+
+ For example:
+ extern int printf PARAMS ((CONST char *format DOTS));
+ int DEFUN(fprintf, (stream, format),
+ FILE *stream AND CONST char *format DOTS) { ... }
+ void DEFUN_VOID(abort) { ... }
+*/
+
+#ifndef _ANSIDECL_H
+
+#define _ANSIDECL_H 1
+
+
+/* Every source file includes this file,
+ so they will all get the switch for lint. */
+/* LINTLIBRARY */
+
+
+#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32)
+/* All known AIX compilers implement these things (but don't always
+ define __STDC__). The RISC/OS MIPS compiler defines these things
+ in SVR4 mode, but does not define __STDC__. */
+
+#define PTR void *
+#define PTRCONST void *CONST
+#define LONG_DOUBLE long double
+
+#define AND ,
+#define NOARGS void
+#define CONST const
+#define VOLATILE volatile
+#define SIGNED signed
+#define DOTS , ...
+
+#define EXFUN(name, proto) name proto
+#define DEFUN(name, arglist, args) name(args)
+#define DEFUN_VOID(name) name(void)
+
+#define PROTO(type, name, arglist) type name arglist
+#define PARAMS(paramlist) paramlist
+#define ANSI_PROTOTYPES 1
+
+#else /* Not ANSI C. */
+
+#define PTR char *
+#define PTRCONST PTR
+#define LONG_DOUBLE double
+
+#define AND ;
+#define NOARGS
+#define CONST
+#ifndef const /* some systems define it in header files for non-ansi mode */
+#define const
+#endif
+#define VOLATILE
+#define SIGNED
+#define DOTS
+
+#define EXFUN(name, proto) name()
+#define DEFUN(name, arglist, args) name arglist args;
+#define DEFUN_VOID(name) name()
+#define PROTO(type, name, arglist) type name ()
+#define PARAMS(paramlist) ()
+
+#endif /* ANSI C. */
+
+#endif /* ansidecl.h */
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/nonstdio.h linux/arch/ppc/xmon/nonstdio.h
--- v2.3.3/linux/arch/ppc/xmon/nonstdio.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/nonstdio.h Sat May 22 13:03:00 1999
@@ -0,0 +1,22 @@
+typedef int FILE;
+extern FILE *xmon_stdin, *xmon_stdout;
+#define EOF (-1)
+#define stdin xmon_stdin
+#define stdout xmon_stdout
+#define printf xmon_printf
+#define fprintf xmon_fprintf
+#define fputs xmon_fputs
+#define fgets xmon_fgets
+#define putchar xmon_putchar
+#define getchar xmon_getchar
+#define putc xmon_putc
+#define getc xmon_getc
+#define fopen(n, m) NULL
+#define fflush(f) do {} while (0)
+#define fclose(f) do {} while (0)
+extern char *fgets(char *, int, void *);
+extern void xmon_printf(const char *, ...);
+extern void xmon_fprintf(void *, const char *, ...);
+extern void xmon_sprintf(char *, const char *, ...);
+
+#define perror(s) printf("%s: no files!\n", (s))
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/ppc-dis.c linux/arch/ppc/xmon/ppc-dis.c
--- v2.3.3/linux/arch/ppc/xmon/ppc-dis.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/ppc-dis.c Sat May 22 13:03:00 1999
@@ -0,0 +1,190 @@
+/* ppc-dis.c -- Disassemble PowerPC instructions
+ Copyright 1994 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support
+
+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
+2, 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 "nonstdio.h"
+#include "ansidecl.h"
+#include "ppc.h"
+
+static int print_insn_powerpc PARAMS ((FILE *, unsigned long insn,
+ unsigned memaddr, int dialect));
+
+extern void print_address PARAMS((unsigned memaddr));
+
+/* Print a big endian PowerPC instruction. For convenience, also
+ disassemble instructions supported by the Motorola PowerPC 601. */
+
+int
+print_insn_big_powerpc (FILE *out, unsigned long insn, unsigned memaddr)
+{
+ return print_insn_powerpc (out, insn, memaddr,
+ PPC_OPCODE_PPC | PPC_OPCODE_601);
+}
+
+/* Print a PowerPC or POWER instruction. */
+
+static int
+print_insn_powerpc (FILE *out, unsigned long insn, unsigned memaddr,
+ int dialect)
+{
+ const struct powerpc_opcode *opcode;
+ const struct powerpc_opcode *opcode_end;
+ unsigned long op;
+
+ /* Get the major opcode of the instruction. */
+ op = PPC_OP (insn);
+
+ /* Find the first match in the opcode table. We could speed this up
+ a bit by doing a binary search on the major opcode. */
+ opcode_end = powerpc_opcodes + powerpc_num_opcodes;
+ for (opcode = powerpc_opcodes; opcode < opcode_end; opcode++)
+ {
+ unsigned long table_op;
+ const unsigned char *opindex;
+ const struct powerpc_operand *operand;
+ int invalid;
+ int need_comma;
+ int need_paren;
+
+ table_op = PPC_OP (opcode->opcode);
+ if (op < table_op)
+ break;
+ if (op > table_op)
+ continue;
+
+ if ((insn & opcode->mask) != opcode->opcode
+ || (opcode->flags & dialect) == 0)
+ continue;
+
+ /* Make two passes over the operands. First see if any of them
+ have extraction functions, and, if they do, make sure the
+ instruction is valid. */
+ invalid = 0;
+ for (opindex = opcode->operands; *opindex != 0; opindex++)
+ {
+ operand = powerpc_operands + *opindex;
+ if (operand->extract)
+ (*operand->extract) (insn, &invalid);
+ }
+ if (invalid)
+ continue;
+
+ /* The instruction is valid. */
+ fprintf(out, "%s", opcode->name);
+ if (opcode->operands[0] != 0)
+ fprintf(out, "\t");
+
+ /* Now extract and print the operands. */
+ need_comma = 0;
+ need_paren = 0;
+ for (opindex = opcode->operands; *opindex != 0; opindex++)
+ {
+ long value;
+
+ operand = powerpc_operands + *opindex;
+
+ /* Operands that are marked FAKE are simply ignored. We
+ already made sure that the extract function considered
+ the instruction to be valid. */
+ if ((operand->flags & PPC_OPERAND_FAKE) != 0)
+ continue;
+
+ /* Extract the value from the instruction. */
+ if (operand->extract)
+ value = (*operand->extract) (insn, (int *) 0);
+ else
+ {
+ value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0
+ && (value & (1 << (operand->bits - 1))) != 0)
+ value -= 1 << operand->bits;
+ }
+
+ /* If the operand is optional, and the value is zero, don't
+ print anything. */
+ if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
+ && (operand->flags & PPC_OPERAND_NEXT) == 0
+ && value == 0)
+ continue;
+
+ if (need_comma)
+ {
+ fprintf(out, ",");
+ need_comma = 0;
+ }
+
+ /* Print the operand as directed by the flags. */
+ if ((operand->flags & PPC_OPERAND_GPR) != 0)
+ fprintf(out, "r%ld", value);
+ else if ((operand->flags & PPC_OPERAND_FPR) != 0)
+ fprintf(out, "f%ld", value);
+ else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0)
+ print_address (memaddr + value);
+ else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
+ print_address (value & 0xffffffff);
+ else if ((operand->flags & PPC_OPERAND_CR) == 0
+ || (dialect & PPC_OPCODE_PPC) == 0)
+ fprintf(out, "%ld", value);
+ else
+ {
+ if (operand->bits == 3)
+ fprintf(out, "cr%d", value);
+ else
+ {
+ static const char *cbnames[4] = { "lt", "gt", "eq", "so" };
+ int cr;
+ int cc;
+
+ cr = value >> 2;
+ if (cr != 0)
+ fprintf(out, "4*cr%d", cr);
+ cc = value & 3;
+ if (cc != 0)
+ {
+ if (cr != 0)
+ fprintf(out, "+");
+ fprintf(out, "%s", cbnames[cc]);
+ }
+ }
+ }
+
+ if (need_paren)
+ {
+ fprintf(out, ")");
+ need_paren = 0;
+ }
+
+ if ((operand->flags & PPC_OPERAND_PARENS) == 0)
+ need_comma = 1;
+ else
+ {
+ fprintf(out, "(");
+ need_paren = 1;
+ }
+ }
+
+ /* We have found and printed an instruction; return. */
+ return 4;
+ }
+
+ /* We could not find a match. */
+ fprintf(out, ".long 0x%lx", insn);
+
+ return 4;
+}
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/ppc-opc.c linux/arch/ppc/xmon/ppc-opc.c
--- v2.3.3/linux/arch/ppc/xmon/ppc-opc.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/ppc-opc.c Sat May 22 13:03:00 1999
@@ -0,0 +1,2816 @@
+/* ppc-opc.c -- PowerPC opcode list
+ Copyright 1994 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support
+
+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
+2, 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 <linux/posix_types.h>
+#include "ansidecl.h"
+#include "ppc.h"
+
+/* This file holds the PowerPC opcode table. The opcode table
+ includes almost all of the extended instruction mnemonics. This
+ permits the disassembler to use them, and simplifies the assembler
+ logic, at the cost of increasing the table size. The table is
+ strictly constant data, so the compiler should be able to put it in
+ the .text section.
+
+ This file also holds the operand table. All knowledge about
+ inserting operands into instructions and vice-versa is kept in this
+ file. */
+
+/* Local insertion and extraction functions. */
+
+static unsigned long insert_bat PARAMS ((unsigned long, long, const char **));
+static long extract_bat PARAMS ((unsigned long, int *));
+static unsigned long insert_bba PARAMS ((unsigned long, long, const char **));
+static long extract_bba PARAMS ((unsigned long, int *));
+static unsigned long insert_bd PARAMS ((unsigned long, long, const char **));
+static long extract_bd PARAMS ((unsigned long, int *));
+static unsigned long insert_bdm PARAMS ((unsigned long, long, const char **));
+static long extract_bdm PARAMS ((unsigned long, int *));
+static unsigned long insert_bdp PARAMS ((unsigned long, long, const char **));
+static long extract_bdp PARAMS ((unsigned long, int *));
+static unsigned long insert_bo PARAMS ((unsigned long, long, const char **));
+static long extract_bo PARAMS ((unsigned long, int *));
+static unsigned long insert_boe PARAMS ((unsigned long, long, const char **));
+static long extract_boe PARAMS ((unsigned long, int *));
+static unsigned long insert_ds PARAMS ((unsigned long, long, const char **));
+static long extract_ds PARAMS ((unsigned long, int *));
+static unsigned long insert_li PARAMS ((unsigned long, long, const char **));
+static long extract_li PARAMS ((unsigned long, int *));
+static unsigned long insert_mbe PARAMS ((unsigned long, long, const char **));
+static long extract_mbe PARAMS ((unsigned long, int *));
+static unsigned long insert_mb6 PARAMS ((unsigned long, long, const char **));
+static long extract_mb6 PARAMS ((unsigned long, int *));
+static unsigned long insert_nb PARAMS ((unsigned long, long, const char **));
+static long extract_nb PARAMS ((unsigned long, int *));
+static unsigned long insert_nsi PARAMS ((unsigned long, long, const char **));
+static long extract_nsi PARAMS ((unsigned long, int *));
+static unsigned long insert_ral PARAMS ((unsigned long, long, const char **));
+static unsigned long insert_ram PARAMS ((unsigned long, long, const char **));
+static unsigned long insert_ras PARAMS ((unsigned long, long, const char **));
+static unsigned long insert_rbs PARAMS ((unsigned long, long, const char **));
+static long extract_rbs PARAMS ((unsigned long, int *));
+static unsigned long insert_sh6 PARAMS ((unsigned long, long, const char **));
+static long extract_sh6 PARAMS ((unsigned long, int *));
+static unsigned long insert_spr PARAMS ((unsigned long, long, const char **));
+static long extract_spr PARAMS ((unsigned long, int *));
+static unsigned long insert_tbr PARAMS ((unsigned long, long, const char **));
+static long extract_tbr PARAMS ((unsigned long, int *));
+
+/* The operands table.
+
+ The fields are bits, shift, signed, insert, extract, flags. */
+
+const struct powerpc_operand powerpc_operands[] =
+{
+ /* The zero index is used to indicate the end of the list of
+ operands. */
+#define UNUSED (0)
+ { 0, 0, 0, 0, 0 },
+
+ /* The BA field in an XL form instruction. */
+#define BA (1)
+#define BA_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_CR },
+
+ /* The BA field in an XL form instruction when it must be the same
+ as the BT field in the same instruction. */
+#define BAT (2)
+ { 5, 16, insert_bat, extract_bat, PPC_OPERAND_FAKE },
+
+ /* The BB field in an XL form instruction. */
+#define BB (3)
+#define BB_MASK (0x1f << 11)
+ { 5, 11, 0, 0, PPC_OPERAND_CR },
+
+ /* The BB field in an XL form instruction when it must be the same
+ as the BA field in the same instruction. */
+#define BBA (4)
+ { 5, 11, insert_bba, extract_bba, PPC_OPERAND_FAKE },
+
+ /* The BD field in a B form instruction. The lower two bits are
+ forced to zero. */
+#define BD (5)
+ { 16, 0, insert_bd, extract_bd, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when absolute addressing is
+ used. */
+#define BDA (6)
+ { 16, 0, insert_bd, extract_bd, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the - modifier is used.
+ This sets the y bit of the BO field appropriately. */
+#define BDM (7)
+ { 16, 0, insert_bdm, extract_bdm,
+ PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the - modifier is used
+ and absolute address is used. */
+#define BDMA (8)
+ { 16, 0, insert_bdm, extract_bdm,
+ PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the + modifier is used.
+ This sets the y bit of the BO field appropriately. */
+#define BDP (9)
+ { 16, 0, insert_bdp, extract_bdp,
+ PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The BD field in a B form instruction when the + modifier is used
+ and absolute addressing is used. */
+#define BDPA (10)
+ { 16, 0, insert_bdp, extract_bdp,
+ PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The BF field in an X or XL form instruction. */
+#define BF (11)
+ { 3, 23, 0, 0, PPC_OPERAND_CR },
+
+ /* An optional BF field. This is used for comparison instructions,
+ in which an omitted BF field is taken as zero. */
+#define OBF (12)
+ { 3, 23, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+
+ /* The BFA field in an X or XL form instruction. */
+#define BFA (13)
+ { 3, 18, 0, 0, PPC_OPERAND_CR },
+
+ /* The BI field in a B form or XL form instruction. */
+#define BI (14)
+#define BI_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_CR },
+
+ /* The BO field in a B form instruction. Certain values are
+ illegal. */
+#define BO (15)
+#define BO_MASK (0x1f << 21)
+ { 5, 21, insert_bo, extract_bo, 0 },
+
+ /* The BO field in a B form instruction when the + or - modifier is
+ used. This is like the BO field, but it must be even. */
+#define BOE (16)
+ { 5, 21, insert_boe, extract_boe, 0 },
+
+ /* The BT field in an X or XL form instruction. */
+#define BT (17)
+ { 5, 21, 0, 0, PPC_OPERAND_CR },
+
+ /* The condition register number portion of the BI field in a B form
+ or XL form instruction. This is used for the extended
+ conditional branch mnemonics, which set the lower two bits of the
+ BI field. This field is optional. */
+#define CR (18)
+ { 3, 18, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+
+ /* The D field in a D form instruction. This is a displacement off
+ a register, and implies that the next operand is a register in
+ parentheses. */
+#define D (19)
+ { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+
+ /* The DS field in a DS form instruction. This is like D, but the
+ lower two bits are forced to zero. */
+#define DS (20)
+ { 16, 0, insert_ds, extract_ds, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+
+ /* The FL1 field in a POWER SC form instruction. */
+#define FL1 (21)
+ { 4, 12, 0, 0, 0 },
+
+ /* The FL2 field in a POWER SC form instruction. */
+#define FL2 (22)
+ { 3, 2, 0, 0, 0 },
+
+ /* The FLM field in an XFL form instruction. */
+#define FLM (23)
+ { 8, 17, 0, 0, 0 },
+
+ /* The FRA field in an X or A form instruction. */
+#define FRA (24)
+#define FRA_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FRB field in an X or A form instruction. */
+#define FRB (25)
+#define FRB_MASK (0x1f << 11)
+ { 5, 11, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FRC field in an A form instruction. */
+#define FRC (26)
+#define FRC_MASK (0x1f << 6)
+ { 5, 6, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FRS field in an X form instruction or the FRT field in a D, X
+ or A form instruction. */
+#define FRS (27)
+#define FRT (FRS)
+ { 5, 21, 0, 0, PPC_OPERAND_FPR },
+
+ /* The FXM field in an XFX instruction. */
+#define FXM (28)
+#define FXM_MASK (0xff << 12)
+ { 8, 12, 0, 0, 0 },
+
+ /* The L field in a D or X form instruction. */
+#define L (29)
+ { 1, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+
+ /* The LEV field in a POWER SC form instruction. */
+#define LEV (30)
+ { 7, 5, 0, 0, 0 },
+
+ /* The LI field in an I form instruction. The lower two bits are
+ forced to zero. */
+#define LI (31)
+ { 26, 0, insert_li, extract_li, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+
+ /* The LI field in an I form instruction when used as an absolute
+ address. */
+#define LIA (32)
+ { 26, 0, insert_li, extract_li, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+
+ /* The MB field in an M form instruction. */
+#define MB (33)
+#define MB_MASK (0x1f << 6)
+ { 5, 6, 0, 0, 0 },
+
+ /* The ME field in an M form instruction. */
+#define ME (34)
+#define ME_MASK (0x1f << 1)
+ { 5, 1, 0, 0, 0 },
+
+ /* The MB and ME fields in an M form instruction expressed a single
+ operand which is a bitmask indicating which bits to select. This
+ is a two operand form using PPC_OPERAND_NEXT. See the
+ description in opcode/ppc.h for what this means. */
+#define MBE (35)
+ { 5, 6, 0, 0, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
+ { 32, 0, insert_mbe, extract_mbe, 0 },
+
+ /* The MB or ME field in an MD or MDS form instruction. The high
+ bit is wrapped to the low end. */
+#define MB6 (37)
+#define ME6 (MB6)
+#define MB6_MASK (0x3f << 5)
+ { 6, 5, insert_mb6, extract_mb6, 0 },
+
+ /* The NB field in an X form instruction. The value 32 is stored as
+ 0. */
+#define NB (38)
+ { 6, 11, insert_nb, extract_nb, 0 },
+
+ /* The NSI field in a D form instruction. This is the same as the
+ SI field, only negated. */
+#define NSI (39)
+ { 16, 0, insert_nsi, extract_nsi,
+ PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
+
+ /* The RA field in an D, DS, X, XO, M, or MDS form instruction. */
+#define RA (40)
+#define RA_MASK (0x1f << 16)
+ { 5, 16, 0, 0, PPC_OPERAND_GPR },
+
+ /* The RA field in a D or X form instruction which is an updating
+ load, which means that the RA field may not be zero and may not
+ equal the RT field. */
+#define RAL (41)
+ { 5, 16, insert_ral, 0, PPC_OPERAND_GPR },
+
+ /* The RA field in an lmw instruction, which has special value
+ restrictions. */
+#define RAM (42)
+ { 5, 16, insert_ram, 0, PPC_OPERAND_GPR },
+
+ /* The RA field in a D or X form instruction which is an updating
+ store or an updating floating point load, which means that the RA
+ field may not be zero. */
+#define RAS (43)
+ { 5, 16, insert_ras, 0, PPC_OPERAND_GPR },
+
+ /* The RB field in an X, XO, M, or MDS form instruction. */
+#define RB (44)
+#define RB_MASK (0x1f << 11)
+ { 5, 11, 0, 0, PPC_OPERAND_GPR },
+
+ /* The RB field in an X form instruction when it must be the same as
+ the RS field in the instruction. This is used for extended
+ mnemonics like mr. */
+#define RBS (45)
+ { 5, 1, insert_rbs, extract_rbs, PPC_OPERAND_FAKE },
+
+ /* The RS field in a D, DS, X, XFX, XS, M, MD or MDS form
+ instruction or the RT field in a D, DS, X, XFX or XO form
+ instruction. */
+#define RS (46)
+#define RT (RS)
+#define RT_MASK (0x1f << 21)
+ { 5, 21, 0, 0, PPC_OPERAND_GPR },
+
+ /* The SH field in an X or M form instruction. */
+#define SH (47)
+#define SH_MASK (0x1f << 11)
+ { 5, 11, 0, 0, 0 },
+
+ /* The SH field in an MD form instruction. This is split. */
+#define SH6 (48)
+#define SH6_MASK ((0x1f << 11) | (1 << 1))
+ { 6, 1, insert_sh6, extract_sh6, 0 },
+
+ /* The SI field in a D form instruction. */
+#define SI (49)
+ { 16, 0, 0, 0, PPC_OPERAND_SIGNED },
+
+ /* The SI field in a D form instruction when we accept a wide range
+ of positive values. */
+#define SISIGNOPT (50)
+ { 16, 0, 0, 0, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
+
+ /* The SPR field in an XFX form instruction. This is flipped--the
+ lower 5 bits are stored in the upper 5 and vice- versa. */
+#define SPR (51)
+#define SPR_MASK (0x3ff << 11)
+ { 10, 11, insert_spr, extract_spr, 0 },
+
+ /* The BAT index number in an XFX form m[ft]ibat[lu] instruction. */
+#define SPRBAT (52)
+#define SPRBAT_MASK (0x3 << 17)
+ { 2, 17, 0, 0, 0 },
+
+ /* The SPRG register number in an XFX form m[ft]sprg instruction. */
+#define SPRG (53)
+#define SPRG_MASK (0x3 << 16)
+ { 2, 16, 0, 0, 0 },
+
+ /* The SR field in an X form instruction. */
+#define SR (54)
+ { 4, 16, 0, 0, 0 },
+
+ /* The SV field in a POWER SC form instruction. */
+#define SV (55)
+ { 14, 2, 0, 0, 0 },
+
+ /* The TBR field in an XFX form instruction. This is like the SPR
+ field, but it is optional. */
+#define TBR (56)
+ { 10, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL },
+
+ /* The TO field in a D or X form instruction. */
+#define TO (57)
+#define TO_MASK (0x1f << 21)
+ { 5, 21, 0, 0, 0 },
+
+ /* The U field in an X form instruction. */
+#define U (58)
+ { 4, 12, 0, 0, 0 },
+
+ /* The UI field in a D form instruction. */
+#define UI (59)
+ { 16, 0, 0, 0, 0 },
+};
+
+/* The functions used to insert and extract complicated operands. */
+
+/* The BA field in an XL form instruction when it must be the same as
+ the BT field in the same instruction. This operand is marked FAKE.
+ The insertion function just copies the BT field into the BA field,
+ and the extraction function just checks that the fields are the
+ same. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bat (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | (((insn >> 21) & 0x1f) << 16);
+}
+
+static long
+extract_bat (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The BB field in an XL form instruction when it must be the same as
+ the BA field in the same instruction. This operand is marked FAKE.
+ The insertion function just copies the BA field into the BB field,
+ and the extraction function just checks that the fields are the
+ same. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bba (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | (((insn >> 16) & 0x1f) << 11);
+}
+
+static long
+extract_bba (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The BD field in a B form instruction. The lower two bits are
+ forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bd (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | (value & 0xfffc);
+}
+
+/*ARGSUSED*/
+static long
+extract_bd (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* The BD field in a B form instruction when the - modifier is used.
+ This modifier means that the branch is not expected to be taken.
+ We must set the y bit of the BO field to 1 if the offset is
+ negative. When extracting, we require that the y bit be 1 and that
+ the offset be positive, since if the y bit is 0 we just want to
+ print the normal form of the instruction. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bdm (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if ((value & 0x8000) != 0)
+ insn |= 1 << 21;
+ return insn | (value & 0xfffc);
+}
+
+static long
+extract_bdm (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn & (1 << 21)) == 0
+ || (insn & (1 << 15)) == 0))
+ *invalid = 1;
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* The BD field in a B form instruction when the + modifier is used.
+ This is like BDM, above, except that the branch is expected to be
+ taken. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_bdp (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if ((value & 0x8000) == 0)
+ insn |= 1 << 21;
+ return insn | (value & 0xfffc);
+}
+
+static long
+extract_bdp (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn & (1 << 21)) == 0
+ || (insn & (1 << 15)) != 0))
+ *invalid = 1;
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* Check for legal values of a BO field. */
+
+static int
+valid_bo (value)
+ long value;
+{
+ /* Certain encodings have bits that are required to be zero. These
+ are (z must be zero, y may be anything):
+ 001zy
+ 011zy
+ 1z00y
+ 1z01y
+ 1z1zz
+ */
+ switch (value & 0x14)
+ {
+ default:
+ case 0:
+ return 1;
+ case 0x4:
+ return (value & 0x2) == 0;
+ case 0x10:
+ return (value & 0x8) == 0;
+ case 0x14:
+ return value == 0x14;
+ }
+}
+
+/* The BO field in a B form instruction. Warn about attempts to set
+ the field to an illegal value. */
+
+static unsigned long
+insert_bo (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (errmsg != (const char **) NULL
+ && ! valid_bo (value))
+ *errmsg = "invalid conditional option";
+ return insn | ((value & 0x1f) << 21);
+}
+
+static long
+extract_bo (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long value;
+
+ value = (insn >> 21) & 0x1f;
+ if (invalid != (int *) NULL
+ && ! valid_bo (value))
+ *invalid = 1;
+ return value;
+}
+
+/* The BO field in a B form instruction when the + or - modifier is
+ used. This is like the BO field, but it must be even. When
+ extracting it, we force it to be even. */
+
+static unsigned long
+insert_boe (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (errmsg != (const char **) NULL)
+ {
+ if (! valid_bo (value))
+ *errmsg = "invalid conditional option";
+ else if ((value & 1) != 0)
+ *errmsg = "attempt to set y bit when using + or - modifier";
+ }
+ return insn | ((value & 0x1f) << 21);
+}
+
+static long
+extract_boe (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long value;
+
+ value = (insn >> 21) & 0x1f;
+ if (invalid != (int *) NULL
+ && ! valid_bo (value))
+ *invalid = 1;
+ return value & 0x1e;
+}
+
+/* The DS field in a DS form instruction. This is like D, but the
+ lower two bits are forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_ds (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | (value & 0xfffc);
+}
+
+/*ARGSUSED*/
+static long
+extract_ds (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if ((insn & 0x8000) != 0)
+ return (insn & 0xfffc) - 0x10000;
+ else
+ return insn & 0xfffc;
+}
+
+/* The LI field in an I form instruction. The lower two bits are
+ forced to zero. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_li (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | (value & 0x3fffffc);
+}
+
+/*ARGSUSED*/
+static long
+extract_li (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if ((insn & 0x2000000) != 0)
+ return (insn & 0x3fffffc) - 0x4000000;
+ else
+ return insn & 0x3fffffc;
+}
+
+/* The MB and ME fields in an M form instruction expressed as a single
+ operand which is itself a bitmask. The extraction function always
+ marks it as invalid, since we never want to recognize an
+ instruction which uses a field of this type. */
+
+static unsigned long
+insert_mbe (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ unsigned long uval;
+ int mb, me;
+
+ uval = value;
+
+ if (uval == 0)
+ {
+ if (errmsg != (const char **) NULL)
+ *errmsg = "illegal bitmask";
+ return insn;
+ }
+
+ me = 31;
+ while ((uval & 1) == 0)
+ {
+ uval >>= 1;
+ --me;
+ }
+
+ mb = me;
+ uval >>= 1;
+ while ((uval & 1) != 0)
+ {
+ uval >>= 1;
+ --mb;
+ }
+
+ if (uval != 0)
+ {
+ if (errmsg != (const char **) NULL)
+ *errmsg = "illegal bitmask";
+ }
+
+ return insn | (mb << 6) | (me << 1);
+}
+
+static long
+extract_mbe (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long ret;
+ int mb, me;
+ int i;
+
+ if (invalid != (int *) NULL)
+ *invalid = 1;
+
+ ret = 0;
+ mb = (insn >> 6) & 0x1f;
+ me = (insn >> 1) & 0x1f;
+ for (i = mb; i < me; i++)
+ ret |= 1 << (31 - i);
+ return ret;
+}
+
+/* The MB or ME field in an MD or MDS form instruction. The high bit
+ is wrapped to the low end. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_mb6 (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | ((value & 0x1f) << 6) | (value & 0x20);
+}
+
+/*ARGSUSED*/
+static long
+extract_mb6 (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ return ((insn >> 6) & 0x1f) | (insn & 0x20);
+}
+
+/* The NB field in an X form instruction. The value 32 is stored as
+ 0. */
+
+static unsigned long
+insert_nb (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value < 0 || value > 32)
+ *errmsg = "value out of range";
+ if (value == 32)
+ value = 0;
+ return insn | ((value & 0x1f) << 11);
+}
+
+/*ARGSUSED*/
+static long
+extract_nb (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long ret;
+
+ ret = (insn >> 11) & 0x1f;
+ if (ret == 0)
+ ret = 32;
+ return ret;
+}
+
+/* The NSI field in a D form instruction. This is the same as the SI
+ field, only negated. The extraction function always marks it as
+ invalid, since we never want to recognize an instruction which uses
+ a field of this type. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_nsi (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | ((- value) & 0xffff);
+}
+
+static long
+extract_nsi (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL)
+ *invalid = 1;
+ if ((insn & 0x8000) != 0)
+ return - ((insn & 0xffff) - 0x10000);
+ else
+ return - (insn & 0xffff);
+}
+
+/* The RA field in a D or X form instruction which is an updating
+ load, which means that the RA field may not be zero and may not
+ equal the RT field. */
+
+static unsigned long
+insert_ral (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value == 0
+ || value == ((insn >> 21) & 0x1f))
+ *errmsg = "invalid register operand when updating";
+ return insn | ((value & 0x1f) << 16);
+}
+
+/* The RA field in an lmw instruction, which has special value
+ restrictions. */
+
+static unsigned long
+insert_ram (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value >= ((insn >> 21) & 0x1f))
+ *errmsg = "index register in load range";
+ return insn | ((value & 0x1f) << 16);
+}
+
+/* The RA field in a D or X form instruction which is an updating
+ store or an updating floating point load, which means that the RA
+ field may not be zero. */
+
+static unsigned long
+insert_ras (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value == 0)
+ *errmsg = "invalid register operand when updating";
+ return insn | ((value & 0x1f) << 16);
+}
+
+/* The RB field in an X form instruction when it must be the same as
+ the RS field in the instruction. This is used for extended
+ mnemonics like mr. This operand is marked FAKE. The insertion
+ function just copies the BT field into the BA field, and the
+ extraction function just checks that the fields are the same. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_rbs (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | (((insn >> 21) & 0x1f) << 11);
+}
+
+static long
+extract_rbs (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ if (invalid != (int *) NULL
+ && ((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f))
+ *invalid = 1;
+ return 0;
+}
+
+/* The SH field in an MD form instruction. This is split. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_sh6 (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
+}
+
+/*ARGSUSED*/
+static long
+extract_sh6 (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20);
+}
+
+/* The SPR field in an XFX form instruction. This is flipped--the
+ lower 5 bits are stored in the upper 5 and vice- versa. */
+
+static unsigned long
+insert_spr (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
+}
+
+static long
+extract_spr (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
+}
+
+/* The TBR field in an XFX instruction. This is just like SPR, but it
+ is optional. When TBR is omitted, it must be inserted as 268 (the
+ magic number of the TB register). These functions treat 0
+ (indicating an omitted optional operand) as 268. This means that
+ ``mftb 4,0'' is not handled correctly. This does not matter very
+ much, since the architecture manual does not define mftb as
+ accepting any values other than 268 or 269. */
+
+#define TB (268)
+
+static unsigned long
+insert_tbr (insn, value, errmsg)
+ unsigned long insn;
+ long value;
+ const char **errmsg;
+{
+ if (value == 0)
+ value = TB;
+ return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
+}
+
+static long
+extract_tbr (insn, invalid)
+ unsigned long insn;
+ int *invalid;
+{
+ long ret;
+
+ ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
+ if (ret == TB)
+ ret = 0;
+ return ret;
+}
+
+/* Macros used to form opcodes. */
+
+/* The main opcode. */
+#define OP(x) (((x) & 0x3f) << 26)
+#define OP_MASK OP (0x3f)
+
+/* The main opcode combined with a trap code in the TO field of a D
+ form instruction. Used for extended mnemonics for the trap
+ instructions. */
+#define OPTO(x,to) (OP (x) | (((to) & 0x1f) << 21))
+#define OPTO_MASK (OP_MASK | TO_MASK)
+
+/* The main opcode combined with a comparison size bit in the L field
+ of a D form or X form instruction. Used for extended mnemonics for
+ the comparison instructions. */
+#define OPL(x,l) (OP (x) | (((l) & 1) << 21))
+#define OPL_MASK OPL (0x3f,1)
+
+/* An A form instruction. */
+#define A(op, xop, rc) (OP (op) | (((xop) & 0x1f) << 1) | ((rc) & 1))
+#define A_MASK A (0x3f, 0x1f, 1)
+
+/* An A_MASK with the FRB field fixed. */
+#define AFRB_MASK (A_MASK | FRB_MASK)
+
+/* An A_MASK with the FRC field fixed. */
+#define AFRC_MASK (A_MASK | FRC_MASK)
+
+/* An A_MASK with the FRA and FRC fields fixed. */
+#define AFRAFRC_MASK (A_MASK | FRA_MASK | FRC_MASK)
+
+/* A B form instruction. */
+#define B(op, aa, lk) (OP (op) | (((aa) & 1) << 1) | ((lk) & 1))
+#define B_MASK B (0x3f, 1, 1)
+
+/* A B form instruction setting the BO field. */
+#define BBO(op, bo, aa, lk) (B ((op), (aa), (lk)) | (((bo) & 0x1f) << 21))
+#define BBO_MASK BBO (0x3f, 0x1f, 1, 1)
+
+/* A BBO_MASK with the y bit of the BO field removed. This permits
+ matching a conditional branch regardless of the setting of the y
+ bit. */
+#define Y_MASK (1 << 21)
+#define BBOY_MASK (BBO_MASK &~ Y_MASK)
+
+/* A B form instruction setting the BO field and the condition bits of
+ the BI field. */
+#define BBOCB(op, bo, cb, aa, lk) \
+ (BBO ((op), (bo), (aa), (lk)) | (((cb) & 0x3) << 16))
+#define BBOCB_MASK BBOCB (0x3f, 0x1f, 0x3, 1, 1)
+
+/* A BBOCB_MASK with the y bit of the BO field removed. */
+#define BBOYCB_MASK (BBOCB_MASK &~ Y_MASK)
+
+/* A BBOYCB_MASK in which the BI field is fixed. */
+#define BBOYBI_MASK (BBOYCB_MASK | BI_MASK)
+
+/* The main opcode mask with the RA field clear. */
+#define DRA_MASK (OP_MASK | RA_MASK)
+
+/* A DS form instruction. */
+#define DSO(op, xop) (OP (op) | ((xop) & 0x3))
+#define DS_MASK DSO (0x3f, 3)
+
+/* An M form instruction. */
+#define M(op, rc) (OP (op) | ((rc) & 1))
+#define M_MASK M (0x3f, 1)
+
+/* An M form instruction with the ME field specified. */
+#define MME(op, me, rc) (M ((op), (rc)) | (((me) & 0x1f) << 1))
+
+/* An M_MASK with the MB and ME fields fixed. */
+#define MMBME_MASK (M_MASK | MB_MASK | ME_MASK)
+
+/* An M_MASK with the SH and ME fields fixed. */
+#define MSHME_MASK (M_MASK | SH_MASK | ME_MASK)
+
+/* An MD form instruction. */
+#define MD(op, xop, rc) (OP (op) | (((xop) & 0x7) << 2) | ((rc) & 1))
+#define MD_MASK MD (0x3f, 0x7, 1)
+
+/* An MD_MASK with the MB field fixed. */
+#define MDMB_MASK (MD_MASK | MB6_MASK)
+
+/* An MD_MASK with the SH field fixed. */
+#define MDSH_MASK (MD_MASK | SH6_MASK)
+
+/* An MDS form instruction. */
+#define MDS(op, xop, rc) (OP (op) | (((xop) & 0xf) << 1) | ((rc) & 1))
+#define MDS_MASK MDS (0x3f, 0xf, 1)
+
+/* An MDS_MASK with the MB field fixed. */
+#define MDSMB_MASK (MDS_MASK | MB6_MASK)
+
+/* An SC form instruction. */
+#define SC(op, sa, lk) (OP (op) | (((sa) & 1) << 1) | ((lk) & 1))
+#define SC_MASK (OP_MASK | (0x3ff << 16) | (1 << 1) | 1)
+
+/* An X form instruction. */
+#define X(op, xop) (OP (op) | (((xop) & 0x3ff) << 1))
+
+/* An X form instruction with the RC bit specified. */
+#define XRC(op, xop, rc) (X ((op), (xop)) | ((rc) & 1))
+
+/* The mask for an X form instruction. */
+#define X_MASK XRC (0x3f, 0x3ff, 1)
+
+/* An X_MASK with the RA field fixed. */
+#define XRA_MASK (X_MASK | RA_MASK)
+
+/* An X_MASK with the RB field fixed. */
+#define XRB_MASK (X_MASK | RB_MASK)
+
+/* An X_MASK with the RT field fixed. */
+#define XRT_MASK (X_MASK | RT_MASK)
+
+/* An X_MASK with the RA and RB fields fixed. */
+#define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
+
+/* An X_MASK with the RT and RA fields fixed. */
+#define XRTRA_MASK (X_MASK | RT_MASK | RA_MASK)
+
+/* An X form comparison instruction. */
+#define XCMPL(op, xop, l) (X ((op), (xop)) | (((l) & 1) << 21))
+
+/* The mask for an X form comparison instruction. */
+#define XCMP_MASK (X_MASK | (1 << 22))
+
+/* The mask for an X form comparison instruction with the L field
+ fixed. */
+#define XCMPL_MASK (XCMP_MASK | (1 << 21))
+
+/* An X form trap instruction with the TO field specified. */
+#define XTO(op, xop, to) (X ((op), (xop)) | (((to) & 0x1f) << 21))
+#define XTO_MASK (X_MASK | TO_MASK)
+
+/* An XFL form instruction. */
+#define XFL(op, xop, rc) (OP (op) | (((xop) & 0x3ff) << 1) | ((rc) & 1))
+#define XFL_MASK (XFL (0x3f, 0x3ff, 1) | (1 << 25) | (1 << 16))
+
+/* An XL form instruction with the LK field set to 0. */
+#define XL(op, xop) (OP (op) | (((xop) & 0x3ff) << 1))
+
+/* An XL form instruction which uses the LK field. */
+#define XLLK(op, xop, lk) (XL ((op), (xop)) | ((lk) & 1))
+
+/* The mask for an XL form instruction. */
+#define XL_MASK XLLK (0x3f, 0x3ff, 1)
+
+/* An XL form instruction which explicitly sets the BO field. */
+#define XLO(op, bo, xop, lk) \
+ (XLLK ((op), (xop), (lk)) | (((bo) & 0x1f) << 21))
+#define XLO_MASK (XL_MASK | BO_MASK)
+
+/* An XL form instruction which explicitly sets the y bit of the BO
+ field. */
+#define XLYLK(op, xop, y, lk) (XLLK ((op), (xop), (lk)) | (((y) & 1) << 21))
+#define XLYLK_MASK (XL_MASK | Y_MASK)
+
+/* An XL form instruction which sets the BO field and the condition
+ bits of the BI field. */
+#define XLOCB(op, bo, cb, xop, lk) \
+ (XLO ((op), (bo), (xop), (lk)) | (((cb) & 3) << 16))
+#define XLOCB_MASK XLOCB (0x3f, 0x1f, 0x3, 0x3ff, 1)
+
+/* An XL_MASK or XLYLK_MASK or XLOCB_MASK with the BB field fixed. */
+#define XLBB_MASK (XL_MASK | BB_MASK)
+#define XLYBB_MASK (XLYLK_MASK | BB_MASK)
+#define XLBOCBBB_MASK (XLOCB_MASK | BB_MASK)
+
+/* An XL_MASK with the BO and BB fields fixed. */
+#define XLBOBB_MASK (XL_MASK | BO_MASK | BB_MASK)
+
+/* An XL_MASK with the BO, BI and BB fields fixed. */
+#define XLBOBIBB_MASK (XL_MASK | BO_MASK | BI_MASK | BB_MASK)
+
+/* An XO form instruction. */
+#define XO(op, xop, oe, rc) \
+ (OP (op) | (((xop) & 0x1ff) << 1) | (((oe) & 1) << 10) | ((rc) & 1))
+#define XO_MASK XO (0x3f, 0x1ff, 1, 1)
+
+/* An XO_MASK with the RB field fixed. */
+#define XORB_MASK (XO_MASK | RB_MASK)
+
+/* An XS form instruction. */
+#define XS(op, xop, rc) (OP (op) | (((xop) & 0x1ff) << 2) | ((rc) & 1))
+#define XS_MASK XS (0x3f, 0x1ff, 1)
+
+/* A mask for the FXM version of an XFX form instruction. */
+#define XFXFXM_MASK (X_MASK | (1 << 20) | (1 << 11))
+
+/* An XFX form instruction with the FXM field filled in. */
+#define XFXM(op, xop, fxm) \
+ (X ((op), (xop)) | (((fxm) & 0xff) << 12))
+
+/* An XFX form instruction with the SPR field filled in. */
+#define XSPR(op, xop, spr) \
+ (X ((op), (xop)) | (((spr) & 0x1f) << 16) | (((spr) & 0x3e0) << 6))
+#define XSPR_MASK (X_MASK | SPR_MASK)
+
+/* An XFX form instruction with the SPR field filled in except for the
+ SPRBAT field. */
+#define XSPRBAT_MASK (XSPR_MASK &~ SPRBAT_MASK)
+
+/* An XFX form instruction with the SPR field filled in except for the
+ SPRG field. */
+#define XSPRG_MASK (XSPR_MASK &~ SPRG_MASK)
+
+/* The BO encodings used in extended conditional branch mnemonics. */
+#define BODNZF (0x0)
+#define BODNZFP (0x1)
+#define BODZF (0x2)
+#define BODZFP (0x3)
+#define BOF (0x4)
+#define BOFP (0x5)
+#define BODNZT (0x8)
+#define BODNZTP (0x9)
+#define BODZT (0xa)
+#define BODZTP (0xb)
+#define BOT (0xc)
+#define BOTP (0xd)
+#define BODNZ (0x10)
+#define BODNZP (0x11)
+#define BODZ (0x12)
+#define BODZP (0x13)
+#define BOU (0x14)
+
+/* The BI condition bit encodings used in extended conditional branch
+ mnemonics. */
+#define CBLT (0)
+#define CBGT (1)
+#define CBEQ (2)
+#define CBSO (3)
+
+/* The TO encodings used in extended trap mnemonics. */
+#define TOLGT (0x1)
+#define TOLLT (0x2)
+#define TOEQ (0x4)
+#define TOLGE (0x5)
+#define TOLNL (0x5)
+#define TOLLE (0x6)
+#define TOLNG (0x6)
+#define TOGT (0x8)
+#define TOGE (0xc)
+#define TONL (0xc)
+#define TOLT (0x10)
+#define TOLE (0x14)
+#define TONG (0x14)
+#define TONE (0x18)
+#define TOU (0x1f)
+
+/* Smaller names for the flags so each entry in the opcodes table will
+ fit on a single line. */
+#undef PPC
+#define PPC PPC_OPCODE_PPC
+#define POWER PPC_OPCODE_POWER
+#define POWER2 PPC_OPCODE_POWER2
+#define B32 PPC_OPCODE_32
+#define B64 PPC_OPCODE_64
+#define M601 PPC_OPCODE_601
+
+/* The opcode table.
+
+ The format of the opcode table is:
+
+ NAME OPCODE MASK FLAGS { OPERANDS }
+
+ NAME is the name of the instruction.
+ OPCODE is the instruction opcode.
+ MASK is the opcode mask; this is used to tell the disassembler
+ which bits in the actual opcode must match OPCODE.
+ FLAGS are flags indicated what processors support the instruction.
+ OPERANDS is the list of operands.
+
+ The disassembler reads the table in order and prints the first
+ instruction which matches, so this table is sorted to put more
+ specific instructions before more general instructions. It is also
+ sorted by major opcode. */
+
+const struct powerpc_opcode powerpc_opcodes[] = {
+{ "tdlgti", OPTO(2,TOLGT), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdllti", OPTO(2,TOLLT), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdeqi", OPTO(2,TOEQ), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdlgei", OPTO(2,TOLGE), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdlnli", OPTO(2,TOLNL), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdllei", OPTO(2,TOLLE), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdlngi", OPTO(2,TOLNG), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdgti", OPTO(2,TOGT), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdgei", OPTO(2,TOGE), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdnli", OPTO(2,TONL), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdlti", OPTO(2,TOLT), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdlei", OPTO(2,TOLE), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdngi", OPTO(2,TONG), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdnei", OPTO(2,TONE), OPTO_MASK, PPC|B64, { RA, SI } },
+{ "tdi", OP(2), OP_MASK, PPC|B64, { TO, RA, SI } },
+
+{ "twlgti", OPTO(3,TOLGT), OPTO_MASK, PPC, { RA, SI } },
+{ "tlgti", OPTO(3,TOLGT), OPTO_MASK, POWER, { RA, SI } },
+{ "twllti", OPTO(3,TOLLT), OPTO_MASK, PPC, { RA, SI } },
+{ "tllti", OPTO(3,TOLLT), OPTO_MASK, POWER, { RA, SI } },
+{ "tweqi", OPTO(3,TOEQ), OPTO_MASK, PPC, { RA, SI } },
+{ "teqi", OPTO(3,TOEQ), OPTO_MASK, POWER, { RA, SI } },
+{ "twlgei", OPTO(3,TOLGE), OPTO_MASK, PPC, { RA, SI } },
+{ "tlgei", OPTO(3,TOLGE), OPTO_MASK, POWER, { RA, SI } },
+{ "twlnli", OPTO(3,TOLNL), OPTO_MASK, PPC, { RA, SI } },
+{ "tlnli", OPTO(3,TOLNL), OPTO_MASK, POWER, { RA, SI } },
+{ "twllei", OPTO(3,TOLLE), OPTO_MASK, PPC, { RA, SI } },
+{ "tllei", OPTO(3,TOLLE), OPTO_MASK, POWER, { RA, SI } },
+{ "twlngi", OPTO(3,TOLNG), OPTO_MASK, PPC, { RA, SI } },
+{ "tlngi", OPTO(3,TOLNG), OPTO_MASK, POWER, { RA, SI } },
+{ "twgti", OPTO(3,TOGT), OPTO_MASK, PPC, { RA, SI } },
+{ "tgti", OPTO(3,TOGT), OPTO_MASK, POWER, { RA, SI } },
+{ "twgei", OPTO(3,TOGE), OPTO_MASK, PPC, { RA, SI } },
+{ "tgei", OPTO(3,TOGE), OPTO_MASK, POWER, { RA, SI } },
+{ "twnli", OPTO(3,TONL), OPTO_MASK, PPC, { RA, SI } },
+{ "tnli", OPTO(3,TONL), OPTO_MASK, POWER, { RA, SI } },
+{ "twlti", OPTO(3,TOLT), OPTO_MASK, PPC, { RA, SI } },
+{ "tlti", OPTO(3,TOLT), OPTO_MASK, POWER, { RA, SI } },
+{ "twlei", OPTO(3,TOLE), OPTO_MASK, PPC, { RA, SI } },
+{ "tlei", OPTO(3,TOLE), OPTO_MASK, POWER, { RA, SI } },
+{ "twngi", OPTO(3,TONG), OPTO_MASK, PPC, { RA, SI } },
+{ "tngi", OPTO(3,TONG), OPTO_MASK, POWER, { RA, SI } },
+{ "twnei", OPTO(3,TONE), OPTO_MASK, PPC, { RA, SI } },
+{ "tnei", OPTO(3,TONE), OPTO_MASK, POWER, { RA, SI } },
+{ "twi", OP(3), OP_MASK, PPC, { TO, RA, SI } },
+{ "ti", OP(3), OP_MASK, POWER, { TO, RA, SI } },
+
+{ "mulli", OP(7), OP_MASK, PPC, { RT, RA, SI } },
+{ "muli", OP(7), OP_MASK, POWER, { RT, RA, SI } },
+
+{ "subfic", OP(8), OP_MASK, PPC, { RT, RA, SI } },
+{ "sfi", OP(8), OP_MASK, POWER, { RT, RA, SI } },
+
+{ "dozi", OP(9), OP_MASK, POWER|M601, { RT, RA, SI } },
+
+{ "cmplwi", OPL(10,0), OPL_MASK, PPC, { OBF, RA, UI } },
+{ "cmpldi", OPL(10,1), OPL_MASK, PPC|B64, { OBF, RA, UI } },
+{ "cmpli", OP(10), OP_MASK, PPC, { BF, L, RA, UI } },
+{ "cmpli", OP(10), OP_MASK, POWER, { BF, RA, UI } },
+
+{ "cmpwi", OPL(11,0), OPL_MASK, PPC, { OBF, RA, SI } },
+{ "cmpdi", OPL(11,1), OPL_MASK, PPC|B64, { OBF, RA, SI } },
+{ "cmpi", OP(11), OP_MASK, PPC, { BF, L, RA, SI } },
+{ "cmpi", OP(11), OP_MASK, POWER, { BF, RA, SI } },
+
+{ "addic", OP(12), OP_MASK, PPC, { RT, RA, SI } },
+{ "ai", OP(12), OP_MASK, POWER, { RT, RA, SI } },
+{ "subic", OP(12), OP_MASK, PPC, { RT, RA, NSI } },
+
+{ "addic.", OP(13), OP_MASK, PPC, { RT, RA, SI } },
+{ "ai.", OP(13), OP_MASK, POWER, { RT, RA, SI } },
+{ "subic.", OP(13), OP_MASK, PPC, { RT, RA, NSI } },
+
+{ "li", OP(14), DRA_MASK, PPC, { RT, SI } },
+{ "lil", OP(14), DRA_MASK, POWER, { RT, SI } },
+{ "addi", OP(14), OP_MASK, PPC, { RT, RA, SI } },
+{ "cal", OP(14), OP_MASK, POWER, { RT, D, RA } },
+{ "subi", OP(14), OP_MASK, PPC, { RT, RA, NSI } },
+{ "la", OP(14), OP_MASK, PPC, { RT, D, RA } },
+
+{ "lis", OP(15), DRA_MASK, PPC, { RT, SISIGNOPT } },
+{ "liu", OP(15), DRA_MASK, POWER, { RT, SISIGNOPT } },
+{ "addis", OP(15), OP_MASK, PPC, { RT,RA,SISIGNOPT } },
+{ "cau", OP(15), OP_MASK, POWER, { RT,RA,SISIGNOPT } },
+{ "subis", OP(15), OP_MASK, PPC, { RT, RA, NSI } },
+
+{ "bdnz-", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BDM } },
+{ "bdnz+", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BDP } },
+{ "bdnz", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPC, { BD } },
+{ "bdn", BBO(16,BODNZ,0,0), BBOYBI_MASK, POWER, { BD } },
+{ "bdnzl-", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BDM } },
+{ "bdnzl+", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BDP } },
+{ "bdnzl", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPC, { BD } },
+{ "bdnl", BBO(16,BODNZ,0,1), BBOYBI_MASK, POWER, { BD } },


SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi

echo 'End of part 03'
echo 'File patch-2.3.4 is continued in part 04'
echo 04 > _shar_seq_.tmp

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part05

#!/bin/sh
# this is part 05 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 05; then


echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&
+

+{ "sthx", X(31,407), X_MASK, PPC|POWER, { RS, RA, RB } },
+
+{ "lfqx", X(31,791), X_MASK, POWER2, { FRT, RA, RB } },
+
+{ "lfqux", X(31,823), X_MASK, POWER2, { FRT, RA, RB } },
+
+{ "stfqx", X(31,919), X_MASK, POWER2, { FRS, RA, RB } },
+
+{ "stfqux", X(31,951), X_MASK, POWER2, { FRS, RA, RB } },
+
+{ "orc", XRC(31,412,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "orc.", XRC(31,412,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "sradi", XS(31,413,0), XS_MASK, PPC|B64, { RA, RS, SH6 } },
+{ "sradi.", XS(31,413,1), XS_MASK, PPC|B64, { RA, RS, SH6 } },
+
+{ "slbie", X(31,434), XRTRA_MASK, PPC|B64, { RB } },
+
+{ "ecowx", X(31,438), X_MASK, PPC, { RT, RA, RB } },
+
+{ "sthux", X(31,439), X_MASK, PPC|POWER, { RS, RAS, RB } },
+
+{ "mr", XRC(31,444,0), X_MASK, PPC|POWER, { RA, RS, RBS } },
+{ "or", XRC(31,444,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "mr.", XRC(31,444,1), X_MASK, PPC|POWER, { RA, RS, RBS } },
+{ "or.", XRC(31,444,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "mtdcr", X(31,451), X_MASK, PPC, { SPR, RS } },
+
+{ "divdu", XO(31,457,0,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "divdu.", XO(31,457,0,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "divduo", XO(31,457,1,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "divduo.", XO(31,457,1,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "divwu", XO(31,459,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwu.", XO(31,459,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwuo", XO(31,459,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwuo.", XO(31,459,1,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "mtmq", XSPR(31,467,0), XSPR_MASK, POWER|M601, { RS } },
+{ "mtxer", XSPR(31,467,1), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtlr", XSPR(31,467,8), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtctr", XSPR(31,467,9), XSPR_MASK, PPC|POWER, { RS } },
+{ "mttid", XSPR(31,467,17), XSPR_MASK, POWER, { RS } },
+{ "mtdsisr", XSPR(31,467,18), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtdar", XSPR(31,467,19), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtrtcu", XSPR(31,467,20), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtrtcl", XSPR(31,467,21), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtdec", XSPR(31,467,22), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtsdr0", XSPR(31,467,24), XSPR_MASK, POWER, { RS } },
+{ "mtsdr1", XSPR(31,467,25), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtsrr0", XSPR(31,467,26), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtsrr1", XSPR(31,467,27), XSPR_MASK, PPC|POWER, { RS } },
+{ "mtsprg", XSPR(31,467,272), XSPRG_MASK, PPC, { SPRG, RS } },
+{ "mtasr", XSPR(31,467,280), XSPR_MASK, PPC|B64, { RS } },
+{ "mtear", XSPR(31,467,282), XSPR_MASK, PPC, { RS } },
+{ "mttbl", XSPR(31,467,284), XSPR_MASK, PPC, { RS } },
+{ "mttbu", XSPR(31,467,285), XSPR_MASK, PPC, { RS } },
+{ "mtibatu", XSPR(31,467,528), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtibatl", XSPR(31,467,529), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtdbatu", XSPR(31,467,536), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtdbatl", XSPR(31,467,537), XSPRBAT_MASK, PPC, { SPRBAT, RS } },
+{ "mtspr", X(31,467), X_MASK, PPC|POWER, { SPR, RS } },
+
+{ "dcbi", X(31,470), XRT_MASK, PPC, { RA, RB } },
+
+{ "nand", XRC(31,476,0), X_MASK, PPC|POWER, { RA, RS, RB } },
+{ "nand.", XRC(31,476,1), X_MASK, PPC|POWER, { RA, RS, RB } },
+
+{ "nabs", XO(31,488,0,0), XORB_MASK, POWER|M601, { RT, RA } },
+{ "nabs.", XO(31,488,0,1), XORB_MASK, POWER|M601, { RT, RA } },
+{ "nabso", XO(31,488,1,0), XORB_MASK, POWER|M601, { RT, RA } },
+{ "nabso.", XO(31,488,1,1), XORB_MASK, POWER|M601, { RT, RA } },
+
+{ "divd", XO(31,489,0,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "divd.", XO(31,489,0,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "divdo", XO(31,489,1,0), XO_MASK, PPC|B64, { RT, RA, RB } },
+{ "divdo.", XO(31,489,1,1), XO_MASK, PPC|B64, { RT, RA, RB } },
+
+{ "divw", XO(31,491,0,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divw.", XO(31,491,0,1), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwo", XO(31,491,1,0), XO_MASK, PPC, { RT, RA, RB } },
+{ "divwo.", XO(31,491,1,1), XO_MASK, PPC, { RT, RA, RB } },
+
+{ "slbia", X(31,498), 0xffffffff, PPC|B64, { 0 } },
+
+{ "cli", X(31,502), XRB_MASK, POWER, { RT, RA } },
+
+{ "mcrxr", X(31,512), XRARB_MASK|(3<<21), PPC|POWER, { BF } },
+
+{ "clcs", X(31,531), XRB_MASK, POWER|M601, { RT, RA } },
+
+{ "lswx", X(31,533), X_MASK, PPC, { RT, RA, RB } },
+{ "lsx", X(31,533), X_MASK, POWER, { RT, RA, RB } },
+
+{ "lwbrx", X(31,534), X_MASK, PPC, { RT, RA, RB } },
+{ "lbrx", X(31,534), X_MASK, POWER, { RT, RA, RB } },
+
+{ "lfsx", X(31,535), X_MASK, PPC|POWER, { FRT, RA, RB } },
+
+{ "srw", XRC(31,536,0), X_MASK, PPC, { RA, RS, RB } },
+{ "sr", XRC(31,536,0), X_MASK, POWER, { RA, RS, RB } },
+{ "srw.", XRC(31,536,1), X_MASK, PPC, { RA, RS, RB } },
+{ "sr.", XRC(31,536,1), X_MASK, POWER, { RA, RS, RB } },
+
+{ "rrib", XRC(31,537,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "rrib.", XRC(31,537,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "srd", XRC(31,539,0), X_MASK, PPC|B64, { RA, RS, RB } },
+{ "srd.", XRC(31,539,1), X_MASK, PPC|B64, { RA, RS, RB } },
+
+{ "maskir", XRC(31,541,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "maskir.", XRC(31,541,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "tlbsync", X(31,566), 0xffffffff, PPC, { 0 } },
+
+{ "lfsux", X(31,567), X_MASK, PPC|POWER, { FRT, RAS, RB } },
+
+{ "mfsr", X(31,595), XRB_MASK|(1<<20), PPC|POWER|B32, { RT, SR } },
+
+{ "lswi", X(31,597), X_MASK, PPC, { RT, RA, NB } },
+{ "lsi", X(31,597), X_MASK, POWER, { RT, RA, NB } },
+
+{ "sync", X(31,598), 0xffffffff, PPC, { 0 } },
+{ "dcs", X(31,598), 0xffffffff, POWER, { 0 } },
+
+{ "lfdx", X(31,599), X_MASK, PPC|POWER, { FRT, RA, RB } },
+
+{ "mfsri", X(31,627), X_MASK, POWER, { RT, RA, RB } },
+
+{ "dclst", X(31,630), XRB_MASK, POWER, { RS, RA } },
+
+{ "lfdux", X(31,631), X_MASK, PPC|POWER, { FRT, RAS, RB } },
+
+{ "mfsrin", X(31,659), XRA_MASK, PPC|B32, { RT, RB } },
+
+{ "stswx", X(31,661), X_MASK, PPC, { RS, RA, RB } },
+{ "stsx", X(31,661), X_MASK, POWER, { RS, RA, RB } },
+
+{ "stwbrx", X(31,662), X_MASK, PPC, { RS, RA, RB } },
+{ "stbrx", X(31,662), X_MASK, POWER, { RS, RA, RB } },
+
+{ "stfsx", X(31,663), X_MASK, PPC|POWER, { FRS, RA, RB } },
+
+{ "srq", XRC(31,664,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "srq.", XRC(31,664,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "sre", XRC(31,665,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "sre.", XRC(31,665,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "stfsux", X(31,695), X_MASK, PPC|POWER, { FRS, RAS, RB } },
+
+{ "sriq", XRC(31,696,0), X_MASK, POWER|M601, { RA, RS, SH } },
+{ "sriq.", XRC(31,696,1), X_MASK, POWER|M601, { RA, RS, SH } },
+
+{ "stswi", X(31,725), X_MASK, PPC, { RS, RA, NB } },
+{ "stsi", X(31,725), X_MASK, POWER, { RS, RA, NB } },
+
+{ "stfdx", X(31,727), X_MASK, PPC|POWER, { FRS, RA, RB } },
+
+{ "srlq", XRC(31,728,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "srlq.", XRC(31,728,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "sreq", XRC(31,729,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "sreq.", XRC(31,729,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "stfdux", X(31,759), X_MASK, PPC|POWER, { FRS, RAS, RB } },
+
+{ "srliq", XRC(31,760,0), X_MASK, POWER|M601, { RA, RS, SH } },
+{ "srliq.", XRC(31,760,1), X_MASK, POWER|M601, { RA, RS, SH } },
+
+{ "lhbrx", X(31,790), X_MASK, PPC|POWER, { RT, RA, RB } },
+
+{ "sraw", XRC(31,792,0), X_MASK, PPC, { RA, RS, RB } },
+{ "sra", XRC(31,792,0), X_MASK, POWER, { RA, RS, RB } },
+{ "sraw.", XRC(31,792,1), X_MASK, PPC, { RA, RS, RB } },
+{ "sra.", XRC(31,792,1), X_MASK, POWER, { RA, RS, RB } },
+
+{ "srad", XRC(31,794,0), X_MASK, PPC|B64, { RA, RS, RB } },
+{ "srad.", XRC(31,794,1), X_MASK, PPC|B64, { RA, RS, RB } },
+
+{ "rac", X(31,818), X_MASK, POWER, { RT, RA, RB } },
+
+{ "srawi", XRC(31,824,0), X_MASK, PPC, { RA, RS, SH } },
+{ "srai", XRC(31,824,0), X_MASK, POWER, { RA, RS, SH } },
+{ "srawi.", XRC(31,824,1), X_MASK, PPC, { RA, RS, SH } },
+{ "srai.", XRC(31,824,1), X_MASK, POWER, { RA, RS, SH } },
+
+{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
+
+{ "sthbrx", X(31,918), X_MASK, PPC|POWER, { RS, RA, RB } },
+
+{ "sraq", XRC(31,920,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "sraq.", XRC(31,920,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "srea", XRC(31,921,0), X_MASK, POWER|M601, { RA, RS, RB } },
+{ "srea.", XRC(31,921,1), X_MASK, POWER|M601, { RA, RS, RB } },
+
+{ "extsh", XRC(31,922,0), XRB_MASK, PPC, { RA, RS } },
+{ "exts", XRC(31,922,0), XRB_MASK, POWER, { RA, RS } },
+{ "extsh.", XRC(31,922,1), XRB_MASK, PPC, { RA, RS } },
+{ "exts.", XRC(31,922,1), XRB_MASK, POWER, { RA, RS } },
+
+{ "sraiq", XRC(31,952,0), X_MASK, POWER|M601, { RA, RS, SH } },
+{ "sraiq.", XRC(31,952,1), X_MASK, POWER|M601, { RA, RS, SH } },
+
+{ "extsb", XRC(31,954,0), XRB_MASK, PPC, { RA, RS} },
+{ "extsb.", XRC(31,954,1), XRB_MASK, PPC, { RA, RS} },
+
+{ "iccci", X(31,966), XRT_MASK, PPC, { RA, RB } },
+
+{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
+
+{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA, RB } },
+
+{ "extsw", XRC(31,986,0), XRB_MASK, PPC, { RA, RS } },
+{ "extsw.", XRC(31,986,1), XRB_MASK, PPC, { RA, RS } },
+
+{ "dcbz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
+{ "dclz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
+
+{ "lwz", OP(32), OP_MASK, PPC, { RT, D, RA } },
+{ "l", OP(32), OP_MASK, POWER, { RT, D, RA } },
+
+{ "lwzu", OP(33), OP_MASK, PPC, { RT, D, RAL } },
+{ "lu", OP(33), OP_MASK, POWER, { RT, D, RA } },
+
+{ "lbz", OP(34), OP_MASK, PPC|POWER, { RT, D, RA } },
+
+{ "lbzu", OP(35), OP_MASK, PPC|POWER, { RT, D, RAL } },
+
+{ "stw", OP(36), OP_MASK, PPC, { RS, D, RA } },
+{ "st", OP(36), OP_MASK, POWER, { RS, D, RA } },
+
+{ "stwu", OP(37), OP_MASK, PPC, { RS, D, RAS } },
+{ "stu", OP(37), OP_MASK, POWER, { RS, D, RA } },
+
+{ "stb", OP(38), OP_MASK, PPC|POWER, { RS, D, RA } },
+
+{ "stbu", OP(39), OP_MASK, PPC|POWER, { RS, D, RAS } },
+
+{ "lhz", OP(40), OP_MASK, PPC|POWER, { RT, D, RA } },
+
+{ "lhzu", OP(41), OP_MASK, PPC|POWER, { RT, D, RAL } },
+
+{ "lha", OP(42), OP_MASK, PPC|POWER, { RT, D, RA } },
+
+{ "lhau", OP(43), OP_MASK, PPC|POWER, { RT, D, RAL } },
+
+{ "sth", OP(44), OP_MASK, PPC|POWER, { RS, D, RA } },
+
+{ "sthu", OP(45), OP_MASK, PPC|POWER, { RS, D, RAS } },
+
+{ "lmw", OP(46), OP_MASK, PPC, { RT, D, RAM } },
+{ "lm", OP(46), OP_MASK, POWER, { RT, D, RA } },
+
+{ "stmw", OP(47), OP_MASK, PPC, { RS, D, RA } },
+{ "stm", OP(47), OP_MASK, POWER, { RS, D, RA } },
+
+{ "lfs", OP(48), OP_MASK, PPC|POWER, { FRT, D, RA } },
+
+{ "lfsu", OP(49), OP_MASK, PPC|POWER, { FRT, D, RAS } },
+
+{ "lfd", OP(50), OP_MASK, PPC|POWER, { FRT, D, RA } },
+
+{ "lfdu", OP(51), OP_MASK, PPC|POWER, { FRT, D, RAS } },
+
+{ "stfs", OP(52), OP_MASK, PPC|POWER, { FRS, D, RA } },
+
+{ "stfsu", OP(53), OP_MASK, PPC|POWER, { FRS, D, RAS } },
+
+{ "stfd", OP(54), OP_MASK, PPC|POWER, { FRS, D, RA } },
+
+{ "stfdu", OP(55), OP_MASK, PPC|POWER, { FRS, D, RAS } },
+
+{ "lfq", OP(56), OP_MASK, POWER2, { FRT, D, RA } },
+
+{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA } },
+
+{ "ld", DSO(58,0), DS_MASK, PPC|B64, { RT, DS, RA } },
+
+{ "ldu", DSO(58,1), DS_MASK, PPC|B64, { RT, DS, RAL } },
+
+{ "lwa", DSO(58,2), DS_MASK, PPC|B64, { RT, DS, RA } },
+
+{ "fdivs", A(59,18,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fdivs.", A(59,18,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+
+{ "fsubs", A(59,20,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fsubs.", A(59,20,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+
+{ "fadds", A(59,21,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fadds.", A(59,21,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+
+{ "fsqrts", A(59,22,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "fsqrts.", A(59,22,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+
+{ "fres", A(59,24,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "fres.", A(59,24,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+
+{ "fmuls", A(59,25,0), AFRB_MASK, PPC, { FRT, FRA, FRC } },
+{ "fmuls.", A(59,25,1), AFRB_MASK, PPC, { FRT, FRA, FRC } },
+
+{ "fmsubs", A(59,28,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fmsubs.", A(59,28,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fmadds", A(59,29,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fmadds.", A(59,29,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fnmsubs", A(59,30,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnmsubs.",A(59,30,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fnmadds", A(59,31,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnmadds.",A(59,31,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "stfq", OP(60), OP_MASK, POWER2, { FRS, D, RA } },
+
+{ "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } },
+
+{ "std", DSO(62,0), DS_MASK, PPC|B64, { RS, DS, RA } },
+
+{ "stdu", DSO(62,1), DS_MASK, PPC|B64, { RS, DS, RAS } },
+
+{ "fcmpu", X(63,0), X_MASK|(3<<21), PPC|POWER, { BF, FRA, FRB } },
+
+{ "frsp", XRC(63,12,0), XRA_MASK, PPC|POWER, { FRT, FRB } },
+{ "frsp.", XRC(63,12,1), XRA_MASK, PPC|POWER, { FRT, FRB } },
+
+{ "fctiw", XRC(63,14,0), XRA_MASK, PPC, { FRT, FRB } },
+{ "fcir", XRC(63,14,0), XRA_MASK, POWER2, { FRT, FRB } },
+{ "fctiw.", XRC(63,14,1), XRA_MASK, PPC, { FRT, FRB } },
+{ "fcir.", XRC(63,14,1), XRA_MASK, POWER2, { FRT, FRB } },
+
+{ "fctiwz", XRC(63,15,0), XRA_MASK, PPC, { FRT, FRB } },
+{ "fcirz", XRC(63,15,0), XRA_MASK, POWER2, { FRT, FRB } },
+{ "fctiwz.", XRC(63,15,1), XRA_MASK, PPC, { FRT, FRB } },
+{ "fcirz.", XRC(63,15,1), XRA_MASK, POWER2, { FRT, FRB } },
+
+{ "fdiv", A(63,18,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fd", A(63,18,0), AFRC_MASK, POWER, { FRT, FRA, FRB } },
+{ "fdiv.", A(63,18,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fd.", A(63,18,1), AFRC_MASK, POWER, { FRT, FRA, FRB } },
+
+{ "fsub", A(63,20,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fs", A(63,20,0), AFRC_MASK, POWER, { FRT, FRA, FRB } },
+{ "fsub.", A(63,20,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fs.", A(63,20,1), AFRC_MASK, POWER, { FRT, FRA, FRB } },
+
+{ "fadd", A(63,21,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fa", A(63,21,0), AFRC_MASK, POWER, { FRT, FRA, FRB } },
+{ "fadd.", A(63,21,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
+{ "fa.", A(63,21,1), AFRC_MASK, POWER, { FRT, FRA, FRB } },
+
+{ "fsqrt", A(63,22,0), AFRAFRC_MASK, PPC|POWER2, { FRT, FRB } },
+{ "fsqrt.", A(63,22,1), AFRAFRC_MASK, PPC|POWER2, { FRT, FRB } },
+
+{ "fsel", A(63,23,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fsel.", A(63,23,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+
+{ "fmul", A(63,25,0), AFRB_MASK, PPC, { FRT, FRA, FRC } },
+{ "fm", A(63,25,0), AFRB_MASK, POWER, { FRT, FRA, FRC } },
+{ "fmul.", A(63,25,1), AFRB_MASK, PPC, { FRT, FRA, FRC } },
+{ "fm.", A(63,25,1), AFRB_MASK, POWER, { FRT, FRA, FRC } },
+
+{ "frsqrte", A(63,26,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "frsqrte.",A(63,26,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+
+{ "fmsub", A(63,28,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fms", A(63,28,0), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+{ "fmsub.", A(63,28,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fms.", A(63,28,1), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+
+{ "fmadd", A(63,29,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fma", A(63,29,0), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+{ "fmadd.", A(63,29,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fma.", A(63,29,1), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+
+{ "fnmsub", A(63,30,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnms", A(63,30,0), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+{ "fnmsub.", A(63,30,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnms.", A(63,30,1), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+
+{ "fnmadd", A(63,31,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnma", A(63,31,0), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+{ "fnmadd.", A(63,31,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "fnma.", A(63,31,1), A_MASK, POWER, { FRT,FRA,FRC,FRB } },
+
+{ "fcmpo", X(63,30), X_MASK|(3<<21), PPC|POWER, { BF, FRA, FRB } },
+
+{ "mtfsb1", XRC(63,38,0), XRARB_MASK, PPC|POWER, { BT } },
+{ "mtfsb1.", XRC(63,38,1), XRARB_MASK, PPC|POWER, { BT } },
+
+{ "fneg", XRC(63,40,0), XRA_MASK, PPC|POWER, { FRT, FRB } },
+{ "fneg.", XRC(63,40,1), XRA_MASK, PPC|POWER, { FRT, FRB } },
+
+{ "mcrfs", X(63,64), XRB_MASK|(3<<21)|(3<<16), PPC|POWER, { BF, BFA } },
+
+{ "mtfsb0", XRC(63,70,0), XRARB_MASK, PPC|POWER, { BT } },
+{ "mtfsb0.", XRC(63,70,1), XRARB_MASK, PPC|POWER, { BT } },
+
+{ "fmr", XRC(63,72,0), XRA_MASK, PPC|POWER, { FRT, FRB } },
+{ "fmr.", XRC(63,72,1), XRA_MASK, PPC|POWER, { FRT, FRB } },
+
+{ "mtfsfi", XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), PPC|POWER, { BF, U } },
+{ "mtfsfi.", XRC(63,134,1), XRA_MASK|(3<<21)|(1<<11), PPC|POWER, { BF, U } },
+
+{ "fnabs", XRC(63,136,0), XRA_MASK, PPC|POWER, { FRT, FRB } },
+{ "fnabs.", XRC(63,136,1), XRA_MASK, PPC|POWER, { FRT, FRB } },
+
+{ "fabs", XRC(63,264,0), XRA_MASK, PPC|POWER, { FRT, FRB } },
+{ "fabs.", XRC(63,264,1), XRA_MASK, PPC|POWER, { FRT, FRB } },
+
+{ "mffs", XRC(63,583,0), XRARB_MASK, PPC|POWER, { FRT } },
+{ "mffs.", XRC(63,583,1), XRARB_MASK, PPC|POWER, { FRT } },
+
+{ "mtfsf", XFL(63,711,0), XFL_MASK, PPC|POWER, { FLM, FRB } },
+{ "mtfsf.", XFL(63,711,1), XFL_MASK, PPC|POWER, { FLM, FRB } },
+
+{ "fctid", XRC(63,814,0), XRA_MASK, PPC|B64, { FRT, FRB } },
+{ "fctid.", XRC(63,814,1), XRA_MASK, PPC|B64, { FRT, FRB } },
+
+{ "fctidz", XRC(63,815,0), XRA_MASK, PPC|B64, { FRT, FRB } },
+{ "fctidz.", XRC(63,815,1), XRA_MASK, PPC|B64, { FRT, FRB } },
+
+{ "fcfid", XRC(63,846,0), XRA_MASK, PPC|B64, { FRT, FRB } },
+{ "fcfid.", XRC(63,846,1), XRA_MASK, PPC|B64, { FRT, FRB } },
+
+};
+
+const int powerpc_num_opcodes =
+ sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
+
+/* The macro table. This is only used by the assembler. */
+
+const struct powerpc_macro powerpc_macros[] = {
+{ "extldi", 4, PPC|B64, "rldicr %0,%1,%3,(%2)-1" },
+{ "extldi.", 4, PPC|B64, "rldicr. %0,%1,%3,(%2)-1" },
+{ "extrdi", 4, PPC|B64, "rldicl %0,%1,(%2)+(%3),64-(%2)" },
+{ "extrdi.", 4, PPC|B64, "rldicl. %0,%1,(%2)+(%3),64-(%2)" },
+{ "insrdi", 4, PPC|B64, "rldimi %0,%1,64-((%2)+(%3)),%3" },
+{ "insrdi.", 4, PPC|B64, "rldimi. %0,%1,64-((%2)+(%3)),%3" },
+{ "rotrdi", 3, PPC|B64, "rldicl %0,%1,64-(%2),0" },
+{ "rotrdi.", 3, PPC|B64, "rldicl. %0,%1,64-(%2),0" },
+{ "sldi", 3, PPC|B64, "rldicr %0,%1,%2,63-(%2)" },
+{ "sldi.", 3, PPC|B64, "rldicr. %0,%1,%2,63-(%2)" },
+{ "srdi", 3, PPC|B64, "rldicl %0,%1,64-(%2),%2" },
+{ "srdi.", 3, PPC|B64, "rldicl. %0,%1,64-(%2),%2" },
+{ "clrrdi", 3, PPC|B64, "rldicr %0,%1,0,63-(%2)" },
+{ "clrrdi.", 3, PPC|B64, "rldicr. %0,%1,0,63-(%2)" },
+{ "clrlsldi",4, PPC|B64, "rldic %0,%1,%3,(%2)-(%3)" },
+{ "clrlsldi.",4, PPC|B64, "rldic. %0,%1,%3,(%2)-(%3)" },
+
+{ "extlwi", 4, PPC, "rlwinm %0,%1,%3,0,(%2)-1" },
+{ "extlwi.", 4, PPC, "rlwinm. %0,%1,%3,0,(%2)-1" },
+{ "extrwi", 4, PPC, "rlwinm %0,%1,(%2)+(%3),32-(%2),31" },
+{ "extrwi.", 4, PPC, "rlwinm. %0,%1,(%2)+(%3),32-(%2),31" },
+{ "inslwi", 4, PPC, "rlwimi %0,%1,32-(%3),%3,(%2)+(%3)-1" },
+{ "inslwi.", 4, PPC, "rlwimi. %0,%1,32-(%3),%3,(%2)+(%3)-1" },
+{ "insrwi", 4, PPC, "rlwimi %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1" },
+{ "insrwi.", 4, PPC, "rlwimi. %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1"},
+{ "rotrwi", 3, PPC, "rlwinm %0,%1,32-(%2),0,31" },
+{ "rotrwi.", 3, PPC, "rlwinm. %0,%1,32-(%2),0,31" },
+{ "slwi", 3, PPC, "rlwinm %0,%1,%2,0,31-(%2)" },
+{ "sli", 3, POWER, "rlinm %0,%1,%2,0,31-(%2)" },
+{ "slwi.", 3, PPC, "rlwinm. %0,%1,%2,0,31-(%2)" },
+{ "sli.", 3, POWER, "rlinm. %0,%1,%2,0,31-(%2)" },
+{ "srwi", 3, PPC, "rlwinm %0,%1,32-(%2),%2,31" },
+{ "sri", 3, POWER, "rlinm %0,%1,32-(%2),%2,31" },
+{ "srwi.", 3, PPC, "rlwinm. %0,%1,32-(%2),%2,31" },
+{ "sri.", 3, POWER, "rlinm. %0,%1,32-(%2),%2,31" },
+{ "clrrwi", 3, PPC, "rlwinm %0,%1,0,0,31-(%2)" },
+{ "clrrwi.", 3, PPC, "rlwinm. %0,%1,0,0,31-(%2)" },
+{ "clrlslwi",4, PPC, "rlwinm %0,%1,%3,(%2)-(%3),31-(%3)" },
+{ "clrlslwi.",4, PPC, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" },
+
+};
+
+const int powerpc_num_macros =
+ sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/ppc.h linux/arch/ppc/xmon/ppc.h
--- v2.3.3/linux/arch/ppc/xmon/ppc.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/ppc.h Sat May 22 13:03:00 1999
@@ -0,0 +1,240 @@
+/* ppc.h -- Header file for PowerPC opcode table


+ Copyright 1994 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor, Cygnus Support
+
+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 PPC_H
+#define PPC_H
+
+/* The opcode table is an array of struct powerpc_opcode. */
+
+struct powerpc_opcode
+{
+ /* The opcode name. */
+ const char *name;
+
+ /* The opcode itself. Those bits which will be filled in with
+ operands are zeroes. */
+ unsigned long opcode;
+
+ /* The opcode mask. This is used by the disassembler. This is a
+ mask containing ones indicating those bits which must match the
+ opcode field, and zeroes indicating those bits which need not
+ match (and are presumably filled in by operands). */
+ unsigned long mask;
+
+ /* One bit flags for the opcode. These are used to indicate which
+ specific processors support the instructions. The defined values
+ are listed below. */
+ unsigned long flags;
+
+ /* An array of operand codes. Each code is an index into the
+ operand table. They appear in the order which the operands must
+ appear in assembly code, and are terminated by a zero. */
+ unsigned char operands[8];
+};
+
+/* The table itself is sorted by major opcode number, and is otherwise
+ in the order in which the disassembler should consider
+ instructions. */
+extern const struct powerpc_opcode powerpc_opcodes[];
+extern const int powerpc_num_opcodes;
+
+/* Values defined for the flags field of a struct powerpc_opcode. */
+
+/* Opcode is defined for the PowerPC architecture. */
+#define PPC_OPCODE_PPC (01)
+
+/* Opcode is defined for the POWER (RS/6000) architecture. */
+#define PPC_OPCODE_POWER (02)
+
+/* Opcode is defined for the POWER2 (Rios 2) architecture. */
+#define PPC_OPCODE_POWER2 (04)
+
+/* Opcode is only defined on 32 bit architectures. */
+#define PPC_OPCODE_32 (010)
+
+/* Opcode is only defined on 64 bit architectures. */
+#define PPC_OPCODE_64 (020)
+
+/* Opcode is supported by the Motorola PowerPC 601 processor. The 601
+ is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
+ but it also supports many additional POWER instructions. */
+#define PPC_OPCODE_601 (040)
+
+/* A macro to extract the major opcode from an instruction. */
+#define PPC_OP(i) (((i) >> 26) & 0x3f)
+
+/* The operands table is an array of struct powerpc_operand. */
+
+struct powerpc_operand
+{
+ /* The number of bits in the operand. */
+ int bits;
+
+ /* How far the operand is left shifted in the instruction. */
+ int shift;
+
+ /* Insertion function. This is used by the assembler. To insert an
+ operand value into an instruction, check this field.
+
+ If it is NULL, execute
+ i |= (op & ((1 << o->bits) - 1)) << o->shift;
+ (i is the instruction which we are filling in, o is a pointer to
+ this structure, and op is the opcode value; this assumes twos
+ complement arithmetic).
+
+ If this field is not NULL, then simply call it with the
+ instruction and the operand value. It will return the new value
+ of the instruction. If the ERRMSG argument is not NULL, then if
+ the operand value is illegal, *ERRMSG will be set to a warning
+ string (the operand will be inserted in any case). If the
+ operand value is legal, *ERRMSG will be unchanged (most operands
+ can accept any value). */
+ unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
+ const char **errmsg));
+
+ /* Extraction function. This is used by the disassembler. To
+ extract this operand type from an instruction, check this field.
+
+ If it is NULL, compute
+ op = ((i) >> o->shift) & ((1 << o->bits) - 1);
+ if ((o->flags & PPC_OPERAND_SIGNED) != 0
+ && (op & (1 << (o->bits - 1))) != 0)
+ op -= 1 << o->bits;
+ (i is the instruction, o is a pointer to this structure, and op
+ is the result; this assumes twos complement arithmetic).
+
+ If this field is not NULL, then simply call it with the
+ instruction value. It will return the value of the operand. If
+ the INVALID argument is not NULL, *INVALID will be set to
+ non-zero if this operand type can not actually be extracted from
+ this operand (i.e., the instruction does not match). If the
+ operand is valid, *INVALID will not be changed. */
+ long (*extract) PARAMS ((unsigned long instruction, int *invalid));
+
+ /* One bit syntax flags. */
+ unsigned long flags;
+};
+
+/* Elements in the table are retrieved by indexing with values from
+ the operands field of the powerpc_opcodes table. */
+
+extern const struct powerpc_operand powerpc_operands[];
+
+/* Values defined for the flags field of a struct powerpc_operand. */
+
+/* This operand takes signed values. */
+#define PPC_OPERAND_SIGNED (01)
+
+/* This operand takes signed values, but also accepts a full positive
+ range of values when running in 32 bit mode. That is, if bits is
+ 16, it takes any value from -0x8000 to 0xffff. In 64 bit mode,
+ this flag is ignored. */
+#define PPC_OPERAND_SIGNOPT (02)
+
+/* This operand does not actually exist in the assembler input. This
+ is used to support extended mnemonics such as mr, for which two
+ operands fields are identical. The assembler should call the
+ insert function with any op value. The disassembler should call
+ the extract function, ignore the return value, and check the value
+ placed in the valid argument. */
+#define PPC_OPERAND_FAKE (04)
+
+/* The next operand should be wrapped in parentheses rather than
+ separated from this one by a comma. This is used for the load and
+ store instructions which want their operands to look like
+ reg,displacement(reg)
+ */
+#define PPC_OPERAND_PARENS (010)
+
+/* This operand may use the symbolic names for the CR fields, which
+ are
+ lt 0 gt 1 eq 2 so 3 un 3
+ cr0 0 cr1 1 cr2 2 cr3 3
+ cr4 4 cr5 5 cr6 6 cr7 7
+ These may be combined arithmetically, as in cr2*4+gt. These are
+ only supported on the PowerPC, not the POWER. */
+#define PPC_OPERAND_CR (020)
+
+/* This operand names a register. The disassembler uses this to print
+ register names with a leading 'r'. */
+#define PPC_OPERAND_GPR (040)
+
+/* This operand names a floating point register. The disassembler
+ prints these with a leading 'f'. */
+#define PPC_OPERAND_FPR (0100)
+
+/* This operand is a relative branch displacement. The disassembler
+ prints these symbolically if possible. */
+#define PPC_OPERAND_RELATIVE (0200)
+
+/* This operand is an absolute branch address. The disassembler
+ prints these symbolically if possible. */
+#define PPC_OPERAND_ABSOLUTE (0400)
+
+/* This operand is optional, and is zero if omitted. This is used for
+ the optional BF and L fields in the comparison instructions. The
+ assembler must count the number of operands remaining on the line,
+ and the number of operands remaining for the opcode, and decide
+ whether this operand is present or not. The disassembler should
+ print this operand out only if it is not zero. */
+#define PPC_OPERAND_OPTIONAL (01000)
+
+/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand
+ is omitted, then for the next operand use this operand value plus
+ 1, ignoring the next operand field for the opcode. This wretched
+ hack is needed because the Power rotate instructions can take
+ either 4 or 5 operands. The disassembler should print this operand
+ out regardless of the PPC_OPERAND_OPTIONAL field. */
+#define PPC_OPERAND_NEXT (02000)
+
+/* This operand should be regarded as a negative number for the
+ purposes of overflow checking (i.e., the normal most negative
+ number is disallowed and one more than the normal most positive
+ number is allowed). This flag will only be set for a signed
+ operand. */
+#define PPC_OPERAND_NEGATIVE (04000)
+
+/* The POWER and PowerPC assemblers use a few macros. We keep them
+ with the operands table for simplicity. The macro table is an
+ array of struct powerpc_macro. */
+
+struct powerpc_macro
+{
+ /* The macro name. */
+ const char *name;
+
+ /* The number of operands the macro takes. */
+ unsigned int operands;
+
+ /* One bit flags for the opcode. These are used to indicate which
+ specific processors support the instructions. The values are the
+ same as those for the struct powerpc_opcode flags field. */
+ unsigned long flags;
+
+ /* A format string to turn the macro into a normal instruction.
+ Each %N in the string is replaced with operand number N (zero
+ based). */
+ const char *format;
+};
+
+extern const struct powerpc_macro powerpc_macros[];
+extern const int powerpc_num_macros;
+
+#endif /* PPC_H */
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/privinst.h linux/arch/ppc/xmon/privinst.h
--- v2.3.3/linux/arch/ppc/xmon/privinst.h Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/privinst.h Sat May 22 13:03:00 1999
@@ -0,0 +1,73 @@


+/*
+ * Copyright (C) 1996 Paul Mackerras.
+ */
+

+#define GETREG(reg) \
+ static inline int get_ ## reg (void) \
+ { int ret; asm volatile ("mf" #reg " %0" : "=r" (ret) :); return ret; }
+
+#define SETREG(reg) \
+ static inline void set_ ## reg (int val) \
+ { asm volatile ("mt" #reg " %0" : : "r" (val)); }
+
+GETREG(msr)
+SETREG(msr)
+GETREG(cr)
+
+#define GSETSPR(n, name) \
+ static inline int get_ ## name (void) \
+ { int ret; asm volatile ("mfspr %0," #n : "=r" (ret) : ); return ret; } \
+ static inline void set_ ## name (int val) \
+ { asm volatile ("mtspr " #n ",%0" : : "r" (val)); }
+
+GSETSPR(0, mq)
+GSETSPR(1, xer)
+GSETSPR(4, rtcu)
+GSETSPR(5, rtcl)
+GSETSPR(8, lr)
+GSETSPR(9, ctr)
+GSETSPR(18, dsisr)
+GSETSPR(19, dar)
+GSETSPR(22, dec)
+GSETSPR(25, sdr1)
+GSETSPR(26, srr0)
+GSETSPR(27, srr1)
+GSETSPR(272, sprg0)
+GSETSPR(273, sprg1)
+GSETSPR(274, sprg2)
+GSETSPR(275, sprg3)
+GSETSPR(282, ear)
+GSETSPR(287, pvr)
+GSETSPR(528, bat0u)
+GSETSPR(529, bat0l)
+GSETSPR(530, bat1u)
+GSETSPR(531, bat1l)
+GSETSPR(532, bat2u)
+GSETSPR(533, bat2l)
+GSETSPR(534, bat3u)
+GSETSPR(535, bat3l)
+GSETSPR(1008, hid0)
+GSETSPR(1009, hid1)
+GSETSPR(1010, iabr)
+GSETSPR(1013, dabr)
+GSETSPR(1023, pir)
+
+static inline int get_sr(int n)
+{
+ int ret;
+
+ asm (" mfsrin %0,%1" : "=r" (ret) : "r" (n << 28));


+ return ret;
+}
+

+static inline void set_sr(int n, int val)
+{
+ asm ("mtsrin %0,%1" : : "r" (val), "r" (n << 28));
+}
+
+static inline void store_inst(void *p)
+{
+ asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p));
+}
+
+
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/setjmp.c linux/arch/ppc/xmon/setjmp.c
--- v2.3.3/linux/arch/ppc/xmon/setjmp.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/setjmp.c Sat May 22 13:03:00 1999
@@ -0,0 +1,29 @@


+/*
+ * Copyright (C) 1996 Paul Mackerras.
+ *

+ * NB this file must be compiled with -O2.
+ */
+
+int
+xmon_setjmp(long *buf)
+{
+ asm ("mflr 0; stw 0,0(%0);"
+ "stw 1,4(%0); stw 2,8(%0);"
+ "mfcr 0; stw 0,12(%0);"
+ "stmw 13,16(%0)"
+ : : "r" (buf));
+ /* XXX should save fp regs as well */


+ return 0;
+}
+
+void

+xmon_longjmp(long *buf, int val)
+{
+ if (val == 0)
+ val = 1;
+ asm ("lmw 13,16(%0);"
+ "lwz 0,12(%0); mtcrf 0x38,0;"
+ "lwz 0,0(%0); lwz 1,4(%0); lwz 2,8(%0);"
+ "mtlr 0; mr 3,%1"
+ : : "r" (buf), "r" (val));
+}
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/start.c linux/arch/ppc/xmon/start.c
--- v2.3.3/linux/arch/ppc/xmon/start.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/start.c Wed May 26 16:55:40 1999
@@ -0,0 +1,298 @@


+/*
+ * Copyright (C) 1996 Paul Mackerras.
+ */

+#include <linux/string.h>
+#include <asm/machdep.h>
+#include <asm/io.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/adb.h>
+#include <asm/prom.h>
+
+static volatile unsigned char *sccc, *sccd;
+unsigned long TXRDY, RXRDY;
+extern void xmon_printf(const char *fmt, ...);
+
+static int console = 0;
+
+void buf_access(void)
+{
+ if ( _machine == _MACH_chrp )
+ sccd[3] &= ~0x80; /* reset DLAB */
+}
+
+void
+xmon_map_scc(void)
+{
+ volatile unsigned char *base;
+
+ if ( _machine == _MACH_Pmac )
+ {
+ struct device_node *np;
+#ifdef CHRP_ESCC
+ unsigned long addr = 0xc1013020;
+#else
+ unsigned long addr = 0xf3013030;
+#endif
+ TXRDY = 4;
+ RXRDY = 1;
+
+ np = find_devices("mac-io");
+ if (np && np->n_addrs) {
+ addr = np->addrs[0].address + 0x13000;
+ /* use the B channel on the iMac, A channel on others */
+ if (addr >= 0xf0000000)
+ addr += 0x20; /* use A channel */
+ }
+ base = (volatile unsigned char *) ioremap(addr & PAGE_MASK, PAGE_SIZE);
+ sccc = base + (addr & ~PAGE_MASK);
+#ifdef CHRP_ESCC
+ sccd = sccc + (0xc1013030 - 0xc1013020);
+#else
+ sccd = sccc + (0xf3013030 - 0xf3013020);
+#endif
+ }
+ else
+ {
+ /* should already be mapped by the kernel boot */
+ sccc = (volatile unsigned char *) (isa_io_base + 0x3fd);
+ sccd = (volatile unsigned char *) (isa_io_base + 0x3f8);
+ TXRDY = 0x20;
+ RXRDY = 1;
+ }
+}
+
+static int scc_initialized = 0;
+
+void xmon_init_scc(void);
+extern void pmu_poll(void);
+
+int
+xmon_write(void *handle, void *ptr, int nb)
+{
+ char *p = ptr;
+ int i, ct;
+
+ if (!scc_initialized)
+ xmon_init_scc();
+ for (i = 0; i < nb; ++i) {
+ while ((*sccc & TXRDY) == 0)
+ if (adb_hardware == ADB_VIAPMU)
+ pmu_poll();
+ buf_access();
+ if ( console && (*p != '\r'))
+ printk("%c", *p);
+ ct = 0;
+ if ( *p == '\n')
+ ct = 1;
+ *sccd = *p++;
+ if ( ct )
+ xmon_write(handle, "\r", 1);
+ }
+ return i;
+}
+
+int
+xmon_read(void *handle, void *ptr, int nb)
+{
+ char *p = ptr;
+ int i;
+
+ if (!scc_initialized)
+ xmon_init_scc();
+ for (i = 0; i < nb; ++i) {
+ while ((*sccc & RXRDY) == 0)
+ if (adb_hardware == ADB_VIAPMU)
+ pmu_poll();
+ buf_access();
+#if 0
+ if ( 0/*console*/ )
+ *p++ = ppc_md.kbd_getkeycode();
+ else
+#endif
+ *p++ = *sccd;
+ }
+ return i;
+}
+
+static unsigned char scc_inittab[] = {
+ 13, 0, /* set baud rate divisor */
+ 12, 1,
+ 14, 1, /* baud rate gen enable, src=rtxc */
+ 11, 0x50, /* clocks = br gen */
+ 5, 0x6a, /* tx 8 bits, assert RTS */
+ 4, 0x44, /* x16 clock, 1 stop */
+ 3, 0xc1, /* rx enable, 8 bits */
+};
+
+void
+xmon_init_scc()
+{
+ if ( _machine == _MACH_chrp )
+ {
+ sccd[3] = 0x83; eieio(); /* LCR = 8N1 + DLAB */
+ sccd[0] = 3; eieio(); /* DLL = 38400 baud */
+ sccd[1] = 0; eieio();
+ sccd[2] = 0; eieio(); /* FCR = 0 */
+ sccd[3] = 3; eieio(); /* LCR = 8N1 */
+ sccd[1] = 0; eieio(); /* IER = 0 */
+ }
+ else
+ {
+ int i, x;
+
+ for (i = 20000; i != 0; --i) {
+ x = *sccc; eieio();
+ }
+ *sccc = 9; eieio(); /* reset A or B side */
+ *sccc = ((unsigned long)sccc & 0x20)? 0x80: 0x40; eieio();
+ for (i = 0; i < sizeof(scc_inittab); ++i) {
+ *sccc = scc_inittab[i];
+ eieio();
+ }
+ }
+ scc_initialized = 1;
+}
+
+#if 0
+extern int (*prom_entry)(void *);
+
+int
+xmon_exit(void)
+{
+ struct prom_args {
+ char *service;
+ } args;


+
+ for (;;) {

+ args.service = "exit";
+ (*prom_entry)(&args);
+ }
+}
+#endif
+
+void *xmon_stdin;
+void *xmon_stdout;
+void *xmon_stderr;
+
+void
+xmon_init(void)
+{
+}
+
+int
+xmon_putc(int c, void *f)
+{
+ char ch = c;
+
+ if (c == '\n')
+ xmon_putc('\r', f);
+ return xmon_write(f, &ch, 1) == 1? c: -1;
+}
+
+int
+xmon_putchar(int c)
+{
+ return xmon_putc(c, xmon_stdout);
+}
+
+int
+xmon_fputs(char *str, void *f)
+{
+ int n = strlen(str);
+
+ return xmon_write(f, str, n) == n? 0: -1;
+}
+
+int
+xmon_readchar(void)
+{
+ char ch;


+
+ for (;;) {

+ switch (xmon_read(xmon_stdin, &ch, 1)) {
+ case 1:
+ return ch;
+ case -1:
+ xmon_printf("read(stdin) returned -1\r\n", 0, 0);


+ return -1;
+ }
+ }
+}

+
+static char line[256];
+static char *lineptr;
+static int lineleft;
+
+int
+xmon_getchar(void)
+{
+ int c;
+
+ if (lineleft == 0) {
+ lineptr = line;
+ for (;;) {
+ c = xmon_readchar();
+ if (c == -1 || c == 4)
+ break;
+ if (c == '\r' || c == '\n') {
+ *lineptr++ = '\n';
+ xmon_putchar('\n');
+ break;
+ }
+ switch (c) {
+ case 0177:
+ case '\b':
+ if (lineptr > line) {
+ xmon_putchar('\b');
+ xmon_putchar(' ');
+ xmon_putchar('\b');
+ --lineptr;
+ }
+ break;
+ case 'U' & 0x1F:
+ while (lineptr > line) {
+ xmon_putchar('\b');
+ xmon_putchar(' ');
+ xmon_putchar('\b');
+ --lineptr;
+ }
+ break;
+ default:
+ if (lineptr >= &line[sizeof(line) - 1])
+ xmon_putchar('\a');
+ else {
+ xmon_putchar(c);
+ *lineptr++ = c;
+ }
+ }
+ }
+ lineleft = lineptr - line;
+ lineptr = line;
+ }
+ if (lineleft == 0)
+ return -1;
+ --lineleft;
+ return *lineptr++;
+}
+
+char *
+xmon_fgets(char *str, int nb, void *f)
+{
+ char *p;
+ int c;
+
+ for (p = str; p < str + nb - 1; ) {
+ c = xmon_getchar();
+ if (c == -1) {
+ if (p == str)
+ return 0;
+ break;
+ }
+ *p++ = c;
+ if (c == '\n')
+ break;
+ }
+ *p = 0;
+ return str;
+}
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/subr_prf.c linux/arch/ppc/xmon/subr_prf.c
--- v2.3.3/linux/arch/ppc/xmon/subr_prf.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/subr_prf.c Sat May 22 13:03:00 1999
@@ -0,0 +1,47 @@
+/*
+ * Written by Cort Dougan to replace the version written by
+ * Paul Mackerras that had copyright conflicts with Linux.
+ *
+ * This file makes liberal use of the standard linux utility
+ * routines to reduce the size of the binary. We assume we can
+ * trust some parts of Linux inside the debugger.
+ * -- Cort (co...@cs.nmt.edu)
+ *
+ * Copyright (C) 1999 Cort Dougan.
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <stdarg.h>
+#include "nonstdio.h"
+
+extern int xmon_write(void *, void *, int);
+
+void
+xmon_vfprintf(void *f, const char *fmt, va_list ap)
+{
+ char buf[2048];
+ vsprintf( buf, fmt, ap );
+ xmon_write( f, buf, strlen(buf) );
+}
+
+void
+xmon_printf(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ xmon_vfprintf(stdout, fmt, ap);
+ va_end(ap);
+}
+
+void
+xmon_fprintf(void *f, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ xmon_vfprintf(f, fmt, ap);
+ va_end(ap);
+}
+
diff -u --recursive --new-file v2.3.3/linux/arch/ppc/xmon/xmon.c linux/arch/ppc/xmon/xmon.c
--- v2.3.3/linux/arch/ppc/xmon/xmon.c Wed Dec 31 16:00:00 1969
+++ linux/arch/ppc/xmon/xmon.c Sat May 22 13:03:00 1999
@@ -0,0 +1,1323 @@
+/*
+ * Routines providing a simple monitor for use on the PowerMac.
+ *


+ * Copyright (C) 1996 Paul Mackerras.
+ */

+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <asm/ptrace.h>
+#include <asm/string.h>


+#include "nonstdio.h"
+#include "privinst.h"
+
+#define scanhex xmon_scanhex
+#define skipbl xmon_skipbl
+

+static unsigned adrs;
+static int size = 1;
+static unsigned ndump = 64;
+static unsigned nidump = 16;
+static int termch;
+
+static u_int bus_error_jmp[100];
+#define setjmp xmon_setjmp
+#define longjmp xmon_longjmp
+
+/* Breakpoint stuff */
+struct bpt {
+ unsigned address;
+ unsigned instr;
+ unsigned count;
+ unsigned char enabled;
+};
+
+#define NBPTS 16
+static struct bpt bpts[NBPTS];
+static struct bpt dabr;
+static struct bpt iabr;
+static unsigned bpinstr = 0x7fe00008; /* trap */
+
+/* Prototypes */
+extern void (*debugger_fault_handler)(struct pt_regs *);
+static int cmds(struct pt_regs *);
+static int mread(unsigned, void *, int);
+static int mwrite(unsigned, void *, int);
+static void handle_fault(struct pt_regs *);
+static void byterev(unsigned char *, int);
+static void memex(void);
+static int bsesc(void);
+static void dump(void);
+static void prdump(unsigned, int);
+#ifdef __MWERKS__
+static void prndump(unsigned, int);
+static int nvreadb(unsigned);
+#endif
+static int ppc_inst_dump(unsigned, int);
+void print_address(unsigned);
+static int getsp(void);
+static void dump_hash_table(void);
+static void backtrace(struct pt_regs *);
+static void excprint(struct pt_regs *);
+static void prregs(struct pt_regs *);
+static void memops(int);
+static void memlocate(void);
+static void memzcan(void);
+static void memdiffs(unsigned char *, unsigned char *, unsigned, unsigned);
+int skipbl(void);
+int scanhex(unsigned *valp);
+static void scannl(void);
+static int hexdigit(int);
+void getstring(char *, int);
+static void flush_input(void);
+static int inchar(void);
+static void take_input(char *);
+/* static void openforth(void); */
+static unsigned read_spr(int);
+static void write_spr(int, unsigned);
+static void super_regs(void);
+static void remove_bpts(void);
+static void insert_bpts(void);
+static struct bpt *at_breakpoint(unsigned pc);
+static void bpt_cmds(void);
+
+extern int print_insn_big_powerpc(FILE *, unsigned long, unsigned);
+extern void printf(const char *fmt, ...);
+extern int putchar(int ch);
+extern int setjmp(u_int *);
+extern void longjmp(u_int *, int);
+
+#define GETWORD(v) (((v)[0] << 24) + ((v)[1] << 16) + ((v)[2] << 8) + (v)[3])
+
+static char *help_string = "\
+Commands:\n\
+ d dump bytes\n\
+ dc dump characters\n\
+ di dump instructions\n\
+ df dump float values\n\
+ dd dump double values\n\
+ e print exception information\n\
+ h dump hash table\n\
+ m examine/change memory\n\
+ mm move a block of memory\n\
+ ms set a block of memory\n\
+ md compare two blocks of memory\n\
+ r print registers\n\
+ S print special registers\n\
+ t print backtrace\n\
+ x exit monitor\n\
+";
+
+static int xmon_trace;
+#define SSTEP 1 /* stepping because of 's' command */
+#define BRSTEP 2 /* stepping over breakpoint */
+
+void
+xmon(struct pt_regs *excp)
+{
+ struct pt_regs regs;
+ int msr, cmd;
+
+ printk("Entering xmon kernel debugger.\n");
+
+ if (excp == NULL) {
+ asm volatile ("stw 0,0(%0)\n\
+ lwz 0,0(1)\n\
+ stw 0,4(%0)\n\
+ stmw 2,8(%0)" : : "r" (&regs));
+ regs.nip = regs.link = ((unsigned long *)regs.gpr[1])[1];
+ regs.msr = get_msr();
+ regs.ctr = get_ctr();
+ regs.xer = get_xer();
+ regs.ccr = get_cr();
+ regs.trap = 0;
+ excp = &regs;
+ }
+
+ msr = get_msr();
+ set_msr(msr & ~0x8000); /* disable interrupts */
+ remove_bpts();
+ excprint(excp);
+ cmd = cmds(excp);
+ if (cmd == 's') {
+ xmon_trace = SSTEP;
+ excp->msr |= 0x400;
+ } else if (at_breakpoint(excp->nip)) {
+ xmon_trace = BRSTEP;
+ excp->msr |= 0x400;
+ } else {
+ xmon_trace = 0;
+ insert_bpts();
+ }
+ set_msr(msr); /* restore interrupt enable */
+}
+
+void
+xmon_irq(int irq, void *d, struct pt_regs *regs)
+{
+ printf("Keyboard interrupt\n");
+ xmon(regs);
+}
+
+int
+xmon_bpt(struct pt_regs *regs)
+{
+ struct bpt *bp;
+
+ bp = at_breakpoint(regs->nip);
+ if (!bp)
+ return 0;
+ if (bp->count) {
+ --bp->count;
+ remove_bpts();
+ excprint(regs);
+ xmon_trace = BRSTEP;
+ regs->msr |= 0x400;
+ } else {
+ xmon(regs);
+ }
+ return 1;
+}
+
+int
+xmon_sstep(struct pt_regs *regs)
+{
+ if (!xmon_trace)
+ return 0;
+ if (xmon_trace == BRSTEP) {
+ xmon_trace = 0;
+ insert_bpts();
+ } else {
+ xmon(regs);
+ }
+ return 1;
+}
+
+int
+xmon_dabr_match(struct pt_regs *regs)
+{
+ if (dabr.enabled && dabr.count) {
+ --dabr.count;
+ remove_bpts();
+ excprint(regs);
+ xmon_trace = BRSTEP;
+ regs->msr |= 0x400;
+ } else {
+ dabr.instr = regs->nip;
+ xmon(regs);
+ }
+ return 1;
+}
+
+int
+xmon_iabr_match(struct pt_regs *regs)
+{
+ if (iabr.enabled && iabr.count) {
+ --iabr.count;
+ remove_bpts();
+ excprint(regs);
+ xmon_trace = BRSTEP;
+ regs->msr |= 0x400;
+ } else {
+ xmon(regs);
+ }
+ return 1;
+}
+
+static struct bpt *
+at_breakpoint(unsigned pc)
+{
+ int i;
+ struct bpt *bp;
+
+ if (dabr.enabled && pc == dabr.instr)
+ return &dabr;
+ if (iabr.enabled && pc == iabr.address)
+ return &iabr;
+ bp = bpts;
+ for (i = 0; i < NBPTS; ++i, ++bp)
+ if (bp->enabled && pc == bp->address)
+ return bp;


+ return 0;
+}
+

+static void
+insert_bpts()
+{
+ int i;
+ struct bpt *bp;
+
+ bp = bpts;
+ for (i = 0; i < NBPTS; ++i, ++bp) {
+ if (!bp->enabled)
+ continue;
+ if (mread(bp->address, &bp->instr, 4) != 4
+ || mwrite(bp->address, &bpinstr, 4) != 4) {
+ printf("Couldn't insert breakpoint at %x, disabling\n",
+ bp->address);
+ bp->enabled = 0;
+ }
+ }
+ if (dabr.enabled)
+ set_dabr(dabr.address);
+ if (iabr.enabled)
+ set_iabr(iabr.address);
+}
+
+static void
+remove_bpts()
+{
+ int i;
+ struct bpt *bp;
+ unsigned instr;
+
+ set_dabr(0);
+ set_iabr(0);
+ bp = bpts;
+ for (i = 0; i < NBPTS; ++i, ++bp) {
+ if (!bp->enabled)
+ continue;
+ if (mread(bp->address, &instr, 4) == 4
+ && instr == bpinstr
+ && mwrite(bp->address, &bp->instr, 4) != 4)
+ printf("Couldn't remove breakpoint at %x\n",
+ bp->address);
+ }
+}
+
+static char *last_cmd;
+
+/* Command interpreting routine */
+static int
+cmds(struct pt_regs *excp)
+{
+ int cmd;
+
+ last_cmd = NULL;
+ for(;;) {
+ printf("mon> ");
+ fflush(stdout);
+ flush_input();
+ termch = 0;
+ cmd = skipbl();
+ if( cmd == '\n' ) {
+ if (last_cmd == NULL)
+ continue;
+ take_input(last_cmd);
+ last_cmd = NULL;
+ cmd = inchar();
+ }
+ switch (cmd) {
+ case 'm':
+ cmd = inchar();
+ switch (cmd) {
+ case 'm':
+ case 's':
+ case 'd':
+ memops(cmd);


+ break;
+ case 'l':

+ memlocate();
+ break;
+ case 'z':
+ memzcan();
+ break;
+ default:
+ termch = cmd;
+ memex();
+ }
+ break;
+ case 'd':
+ dump();


+ break;
+ case 'r':

+ if (excp != NULL)
+ prregs(excp); /* print regs */
+ break;
+ case 'e':
+ if (excp == NULL)
+ printf("No exception information\n");
+ else
+ excprint(excp);
+ break;
+ case 'S':
+ super_regs();
+ break;
+ case 't':
+ backtrace(excp);
+ break;
+#if 0
+ case 'f':
+ openforth();
+ break;
+#endif
+ case 'h':
+ dump_hash_table();
+ break;
+ case 's':
+ case 'x':
+ case EOF:
+ return cmd;
+ case '?':
+ printf(help_string);
+ break;
+ default:
+ printf("Unrecognized command: ");
+ if( ' ' < cmd && cmd <= '~' )
+ putchar(cmd);
+ else
+ printf("\\x%x", cmd);
+ printf(" (type ? for help)\n");
+ break;
+ case 'b':
+ bpt_cmds();
+ break;
+ }
+ }
+}
+
+static void
+bpt_cmds(void)
+{
+ int cmd;
+ unsigned a;
+ int mode, i;
+ struct bpt *bp;
+
+ cmd = inchar();
+ switch (cmd) {
+ case 'd':
+ mode = 7;
+ cmd = inchar();
+ if (cmd == 'r')
+ mode = 5;
+ else if (cmd == 'w')
+ mode = 6;
+ else
+ termch = cmd;
+ dabr.address = 0;
+ dabr.count = 0;
+ dabr.enabled = scanhex(&dabr.address);
+ scanhex(&dabr.count);
+ if (dabr.enabled)
+ dabr.address = (dabr.address & ~7) | mode;
+ break;
+ case 'i':
+ iabr.address = 0;
+ iabr.count = 0;
+ iabr.enabled = scanhex(&iabr.address);
+ if (iabr.enabled)
+ iabr.address |= 3;
+ scanhex(&iabr.count);
+ break;
+ case 'c':
+ if (!scanhex(&a)) {
+ /* clear all breakpoints */
+ for (i = 0; i < NBPTS; ++i)
+ bpts[i].enabled = 0;
+ iabr.enabled = 0;
+ dabr.enabled = 0;
+ printf("All breakpoints cleared\n");
+ } else {
+ bp = at_breakpoint(a);
+ if (bp == 0) {
+ printf("No breakpoint at %x\n", a);
+ } else {
+ bp->enabled = 0;
+ }
+ }
+ break;
+ default:
+ termch = cmd;
+ if (!scanhex(&a)) {
+ /* print all breakpoints */
+ printf("type address count\n");
+ if (dabr.enabled) {
+ printf("data %.8x %8x [", dabr.address & ~7,
+ dabr.count);
+ if (dabr.address & 1)
+ printf("r");
+ if (dabr.address & 2)
+ printf("w");


+ printf("]\n");
+ }

+ if (iabr.enabled)
+ printf("inst %.8x %8x\n", iabr.address & ~3,
+ iabr.count);
+ for (bp = bpts; bp < &bpts[NBPTS]; ++bp)
+ if (bp->enabled)
+ printf("trap %.8x %8x\n", bp->address,
+ bp->count);
+ break;
+ }
+ bp = at_breakpoint(a);
+ if (bp == 0) {
+ for (bp = bpts; bp < &bpts[NBPTS]; ++bp)
+ if (!bp->enabled)
+ break;
+ if (bp >= &bpts[NBPTS]) {
+ printf("Sorry, no free breakpoints\n");
+ break;
+ }
+ }
+ bp->enabled = 1;
+ bp->address = a;
+ bp->count = 0;
+ scanhex(&bp->count);
+ break;
+ }
+}
+
+static void
+backtrace(struct pt_regs *excp)
+{
+ unsigned sp;
+ unsigned stack[2];
+ struct pt_regs regs;
+ extern char int_return, syscall_ret_1, syscall_ret_2;
+ extern char lost_irq_ret, do_bottom_half_ret, do_signal_ret;
+
+ if (excp != NULL)
+ sp = excp->gpr[1];
+ else
+ sp = getsp();
+ scanhex(&sp);
+ scannl();
+ for (; sp != 0; sp = stack[0]) {
+ if (mread(sp, stack, sizeof(stack)) != sizeof(stack))
+ break;
+ printf("%x ", stack[1]);
+ if (stack[1] == (unsigned) &int_return
+ || stack[1] == (unsigned) &syscall_ret_1
+ || stack[1] == (unsigned) &syscall_ret_2
+ || stack[1] == (unsigned) &lost_irq_ret
+ || stack[1] == (unsigned) &do_bottom_half_ret
+ || stack[1] == (unsigned) &do_signal_ret) {
+ if (mread(sp+16, &regs, sizeof(regs)) != sizeof(regs))
+ break;
+ printf("\nexception:%x [%x] %x ", regs.trap, sp+16,
+ regs.nip);
+ sp = regs.gpr[1];
+ if (mread(sp, stack, sizeof(stack)) != sizeof(stack))
+ break;
+ }
+ }


+ printf("\n");
+}
+
+int

+getsp()
+{
+ int x;
+
+ asm("mr %0,1" : "=r" (x) :);
+ return x;
+}
+
+void
+excprint(struct pt_regs *fp)
+{
+ printf("vector: %x at pc = %x, msr = %x, sp = %x [%x]\n",
+ fp->trap, fp->nip, fp->msr, fp->gpr[1], fp);
+ if ((fp->trap == 0x300) || (fp->trap == 0x600) || (fp->trap == 0x200))
+ printf("dar = %x, dsisr = %x\n", fp->dar, fp->dsisr);
+ if (current)
+ printf("current = %x, pid = %d, comm = %s\n",
+ current, current->pid, current->comm);
+}
+
+void
+prregs(struct pt_regs *fp)
+{
+ int n;
+ unsigned base;
+
+ if (scanhex(&base))
+ fp = (struct pt_regs *) base;
+ for (n = 0; n < 32; ++n)
+ printf("R%.2d = %.8x%s", n, fp->gpr[n],
+ (n & 3) == 3? "\n": " ");
+ printf("pc = %.8x msr = %.8x lr = %.8x cr = %.8x\n",
+ fp->nip, fp->msr, fp->link, fp->ccr);
+ printf("ctr = %.8x xer = %.8x trap = %4x\n",
+ fp->ctr, fp->xer, fp->trap);
+}
+
+unsigned int
+read_spr(int n)
+{
+ unsigned int instrs[2];
+ int (*code)(void);
+
+ instrs[0] = 0x7c6002a6 + ((n & 0x1F) << 16) + ((n & 0x3e0) << 6);
+ instrs[1] = 0x4e800020;
+ store_inst(instrs);
+ store_inst(instrs+1);
+ code = (int (*)(void)) instrs;
+ return code();
+}
+
+void
+write_spr(int n, unsigned int val)
+{
+ unsigned int instrs[2];
+ int (*code)(unsigned int);
+
+ instrs[0] = 0x7c6003a6 + ((n & 0x1F) << 16) + ((n & 0x3e0) << 6);
+ instrs[1] = 0x4e800020;
+ store_inst(instrs);
+ store_inst(instrs+1);
+ code = (int (*)(unsigned int)) instrs;
+ code(val);
+}
+
+static unsigned int regno;
+extern char exc_prolog;
+extern char dec_exc;
+
+void
+super_regs()
+{
+ int i, cmd;
+ unsigned val;


+
+ cmd = skipbl();

+ if (cmd == '\n') {
+ printf("msr = %x, pvr = %x\n", get_msr(), get_pvr());
+ printf("sprg0-3 = %x %x %x %x\n", get_sprg0(), get_sprg1(),
+ get_sprg2(), get_sprg3());
+ printf("srr0 = %x, srr1 = %x\n", get_srr0(), get_srr1());
+ printf("sr0-15 =");
+ for (i = 0; i < 16; ++i)
+ printf(" %x", get_sr(i));
+ printf("\n");
+ asm("mr %0,1" : "=r" (i) :);
+ printf("sp = %x ", i);
+ asm("mr %0,2" : "=r" (i) :);
+ printf("toc = %x\n", i);
+ return;
+ }
+
+ scanhex(&regno);
+ switch (cmd) {
+ case 'w':
+ val = read_spr(regno);
+ scanhex(&val);
+ write_spr(regno, val);
+ /* fall through */
+ case 'r':
+ printf("spr %x = %x\n", regno, read_spr(regno));
+ break;
+ case 's':
+ val = get_sr(regno);
+ scanhex(&val);
+ set_sr(regno, val);
+ break;
+ case 'm':
+ val = get_msr();
+ scanhex(&val);
+ set_msr(val);
+ break;
+ }
+ scannl();
+}
+
+#if 0
+static void
+openforth()
+{
+ int c;
+ char *p;
+ char cmd[1024];
+ int args[5];
+ extern int (*prom_entry)(int *);
+
+ p = cmd;
+ c = skipbl();
+ while (c != '\n') {
+ *p++ = c;
+ c = inchar();
+ }
+ *p = 0;
+ args[0] = (int) "interpret";
+ args[1] = 1;
+ args[2] = 1;
+ args[3] = (int) cmd;
+ (*prom_entry)(args);
+ printf("\n");
+ if (args[4] != 0)
+ printf("error %x\n", args[4]);
+}
+#endif
+
+static void
+dump_hash_table_seg(unsigned seg, unsigned start, unsigned end)
+{
+ extern void *Hash;
+ extern unsigned long Hash_size;
+ unsigned *htab = Hash;
+ unsigned hsize = Hash_size;
+ unsigned v, hmask, va, last_va;
+ int found, last_found, i;
+ unsigned *hg, w1, last_w2, last_va0;
+
+ last_found = 0;
+ hmask = hsize / 64 - 1;
+ va = start;
+ start = (start >> 12) & 0xffff;
+ end = (end >> 12) & 0xffff;
+ for (v = start; v < end; ++v) {
+ found = 0;
+ hg = htab + (((v ^ seg) & hmask) * 16);
+ w1 = 0x80000000 | (seg << 7) | (v >> 10);
+ for (i = 0; i < 8; ++i, hg += 2) {
+ if (*hg == w1) {
+ found = 1;
+ break;
+ }
+ }
+ if (!found) {
+ w1 ^= 0x40;
+ hg = htab + ((~(v ^ seg) & hmask) * 16);
+ for (i = 0; i < 8; ++i, hg += 2) {
+ if (*hg == w1) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (!(last_found && found && (hg[1] & ~0x180) == last_w2 + 4096)) {
+ if (last_found) {
+ if (last_va != last_va0)
+ printf(" ... %x", last_va);


+ printf("\n");
+ }

+ if (found) {
+ printf("%x to %x", va, hg[1]);
+ last_va0 = va;
+ }
+ last_found = found;
+ }
+ if (found) {
+ last_w2 = hg[1] & ~0x180;
+ last_va = va;
+ }
+ va += 4096;
+ }
+ if (last_found)
+ printf(" ... %x\n", last_va);
+}
+static unsigned hash_ctx;
+static unsigned hash_start;
+static unsigned hash_end;
+
+static void
+dump_hash_table()
+{
+ int seg;
+ unsigned seg_start, seg_end;
+
+ hash_ctx = 0;
+ hash_start = 0;
+ hash_end = 0xfffff000;
+ scanhex(&hash_ctx);
+ scanhex(&hash_start);
+ scanhex(&hash_end);
+ printf("Mappings for context %x\n", hash_ctx);
+ seg_start = hash_start;
+ for (seg = hash_start >> 28; seg <= hash_end >> 28; ++seg) {
+ seg_end = (seg << 28) | 0x0ffff000;
+ if (seg_end > hash_end)
+ seg_end = hash_end;
+ dump_hash_table_seg((hash_ctx << 4) + seg, seg_start, seg_end);
+ seg_start = seg_end + 0x1000;
+ }
+}
+
+/*
+ * Stuff for reading and writing memory safely
+ */
+extern inline void sync(void)
+{
+ asm volatile("sync; isync");
+}
+
+extern inline void __delay(unsigned int loops)
+{
+ if (loops != 0)
+ __asm__ __volatile__("mtctr %0; 1: bdnz 1b" : :
+ "r" (loops) : "ctr");
+}
+
+int
+mread(unsigned adrs, void *buf, int size)
+{
+ volatile int n;
+ char *p, *q;
+
+ n = 0;
+ if( setjmp(bus_error_jmp) == 0 ){
+ debugger_fault_handler = handle_fault;
+ sync();
+ p = (char *) adrs;
+ q = (char *) buf;
+ switch (size) {
+ case 2: *(short *)q = *(short *)p; break;
+ case 4: *(int *)q = *(int *)p; break;
+ default:
+ for( ; n < size; ++n ) {
+ *q++ = *p++;
+ sync();
+ }
+ }
+ sync();
+ /* wait a little while to see if we get a machine check */
+ __delay(200);
+ n = size;
+ }
+ debugger_fault_handler = 0;
+ return n;
+}
+
+int
+mwrite(unsigned adrs, void *buf, int size)
+{
+ volatile int n;
+ char *p, *q;
+
+ n = 0;
+ if( setjmp(bus_error_jmp) == 0 ){
+ debugger_fault_handler = handle_fault;
+ sync();
+ p = (char *) adrs;
+ q = (char *) buf;
+ switch (size) {
+ case 2: *(short *)p = *(short *)q; break;
+ case 4: *(int *)p = *(int *)q; break;
+ default:
+ for( ; n < size; ++n ) {
+ *p++ = *q++;
+ sync();
+ }
+ }
+ sync();
+ n = size;
+ } else {
+ printf("*** Error writing address %x\n", adrs + n);
+ }
+ debugger_fault_handler = 0;
+ return n;
+}
+
+static int fault_type;
+static char *fault_chars[] = { "--", "**", "##" };
+
+static void
+handle_fault(struct pt_regs *regs)
+{
+ fault_type = regs->trap == 0x200? 0: regs->trap == 0x300? 1: 2;
+ longjmp(bus_error_jmp, 1);
+}
+
+#define SWAP(a, b, t) ((t) = (a), (a) = (b), (b) = (t))
+
+void
+byterev(unsigned char *val, int size)
+{
+ int t;
+
+ switch (size) {
+ case 2:
+ SWAP(val[0], val[1], t);
+ break;
+ case 4:
+ SWAP(val[0], val[3], t);
+ SWAP(val[1], val[2], t);
+ break;
+ }
+}
+
+static int brev;
+static int mnoread;
+
+void
+memex()
+{
+ int cmd, inc, i, nslash;
+ unsigned n;
+ unsigned char val[4];
+
+ last_cmd = "m\n";
+ scanhex(&adrs);
+ while ((cmd = skipbl()) != '\n') {
+ switch( cmd ){
+ case 'b': size = 1; break;
+ case 'w': size = 2; break;
+ case 'l': size = 4; break;
+ case 'r': brev = !brev; break;
+ case 'n': mnoread = 1; break;


SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi

echo 'End of part 05'
echo 'File patch-2.3.4 is continued in part 06'
echo 06 > _shar_seq_.tmp

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part01

#!/bin/sh
# This is a shell archive
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
# existing files will NOT be overwritten unless -c is specified
#
# This is part 01 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
#

if test -r _shar_seq_.tmp; then
echo 'Must unpack archives in sequence!'
echo Please unpack part `cat _shar_seq_.tmp` next
exit 1
fi
# ============= patch-2.3.4 ==============
if test -f 'patch-2.3.4' -a X"$1" != X"-c"; then
echo 'x - skipping patch-2.3.4 (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting patch-2.3.4 (Text)'


sed 's/^X//' << 'SHAR_EOF' > 'patch-2.3.4' &&

diff -u --recursive --new-file v2.3.3/linux/CREDITS linux/CREDITS
--- v2.3.3/linux/CREDITS Mon May 17 09:55:20 1999
+++ linux/CREDITS Mon May 24 22:47:43 1999
@@ -767,11 +767,8 @@
X S: The Netherlands
X
X N: Kai Harrekilde-Petersen
-E: k...@dolphinics.no
+E: k...@olicom.dk
X D: Original author of the ftape-HOWTO, i82078 fdc detection code.
-S: Peder Holters vei 13
-S: 1168 Oslo
-S: Norway
X
X N: Andrew Haylett
X E: a...@primag.co.uk
@@ -1439,8 +1436,8 @@
X S: Germany
X
X N: David Mosberger-Tang
-E: David.M...@acm.org
-D: Linux/Alpha
+E: dav...@hpl.hp.com if IA-64 related, else David.M...@acm.org
+D: Linux/Alpha and Linux/ia64
X S: 35706 Runckel Lane
X S: Fremont, California 94536
X S: USA
diff -u --recursive --new-file v2.3.3/linux/Documentation/Configure.help linux/Documentation/Configure.help
--- v2.3.3/linux/Documentation/Configure.help Mon May 17 09:55:20 1999
+++ linux/Documentation/Configure.help Wed May 26 10:01:43 1999
@@ -3110,6 +3110,44 @@
X The module will be called af_spx.o. If you want to compile it as a
X module, say M here and read Documentation/modules.txt.
X
+DECnet networking
+CONFIG_DECNET
+ The DECnet networking protocol was used in many products made by
+ Digital (now Compaq). It provides reliable stream and sequenced
+ packet communications over which run a variety of services similar
+ to those which run over TCP/IP.
+
+ To find some tools to use with the kernel layer support, please
+ look at Patrick Caulfield's web site:
+ http://linux.dreamtime.org/decnet/
+
+ More detailed documentation is available in the
+ Documentation/networking/decnet.txt file.
+
+ Be sure to turn on the CONFIG_PROCFS and CONFIG_SYSCTL options
+ when using DECnet, since you will need sysctl support to aid in
+ configuration at run time.
+
+DECnet SIOCFIGCONF support
+CONFIG_DECNET_SIOCGIFCONF
+ This option should only be turned on if you are really sure that
+ you know what you are doing. It can break other applications which
+ use this system call and the proper way to get the information
+ provided by this call is to use rtnetlink.
+
+DECnet Router Support
+CONFIG_DECNET_ROUTER
+ Add support for turning your DECnet Endnode into a level 1 or 2
+ router. This is an unfinished option for developers only. If you
+ do turn it on, then make sure you also have rtnetlink configured
+ in, since thats the only current method of configuration.
+
+DECnet Raw Socket Support
+CONFIG_DECNET_RAW
+ Add support for the SOCK_RAW type under DECnet. Used by userland
+ routing programs to receive routing messages from the kernel and
+ also as a general debugging aid to see whats going on "under the hood".
+
X AppleTalk DDP
X CONFIG_ATALK
X AppleTalk is the way Apple computers speak to each other on a
@@ -7525,6 +7563,18 @@
X Say Y here if you want to try writing to UFS partitions. This is
X experimental, so you should back up your UFS partitions beforehand.
X
+EFS filesystem support (experimental)
+CONFIG_EFS_FS
+ EFS is the filesystem used for CDROMs and filesystems by SGI's IRIX.
+ This implementation only offers read-only access. If you don't know
+ what all this is about, it's safe to say N. For more information
+ about EFS see its homepage at http://aeschi.ch.eu.org/efs/.
+
+SGI disklabel support
+CONFIG_SGI_DISKLABEL
+ Say Y to this only if you plan on mounting disks with SGI disklabels.
+ This is not required to mount EFS-format CDROMs.
+
X BSD disklabel (FreeBSD partition tables) support
X CONFIG_BSD_DISKLABEL
X FreeBSD uses its own hard disk partition scheme on your PC. It
@@ -11559,6 +11609,64 @@
X This is the driver for the serial ports on the BVME4000 and BVME6000
X boards from BVM Ltd. Everyone using one of these boards should say
X Y here.
+
+Universal Serial Bus (USB) Support (Experimental)
+CONFIG_USB
+ This will enable support for the Universal Serial Bus (USB). USB
+ allows you to connect up to 127 external devices such as keyboards,
+ mice, printers and modems to your computer through a USB connector.
+ This code can also be built as a module (i.e. code outside the
+ kernel that can be added and removed at runtime), consult
+ Documentation/modules.txt for more information.
+
+UHCI (intel PIIX4 and others) support
+CONFIG_USB_UHCI
+ The UHCI is the USB host controller for many computers, and is built
+ into all recent boards with intel PCI chipsets. This driver is
+ needed for these motherboards to support USB.
+
+OHCI (compaq and some others) support
+CONFIG_USB_OHCI
+ The OHCI (Open Host Controller Interface) is the USB host controller
+ on most non-Intel architectures, several USB-adding PCI cards, and
+ is on several x86 compatibles with non-Intel chipsets. This driver
+ is needed for these motherboards to support USB. There is presently
+ two OHCI drivers in development. Say 'N' here if you would like to
+ compile the other OHCI driver into the linux kernel.
+
+OHCI-HCD (other OHCI opt. Virt. Root Hub) support
+CONFIG_USB_OHCI_HCD
+ The OHCI (Open Host Controller Interface) is the USB host controller
+ on most non-Intel architectures, several USB-adding PCI cards, and
+ is on several x86 compatibles with non-Intel chipsets. This driver
+ is needed for these motherboards to support USB. There is presently
+ two OHCI drivers in development.
+
+USB hub support
+CONFIG_USB_HUB
+ To expand beyond the USB ports on the computer, a device called a
+ hub is used. This driver supports hubs, allowing them to be used.
+ Say 'Y'
+
+USB mouse support
+CONFIG_USB_MOUSE
+ This driver allows mice to work under the USB stack. It currently
+ patches into /dev/ps2aux, although it does not require the ps2
+ mouse code to be included in the kernel as well.
+
+USB keyboard support
+CONFIG_USB_KBD
+ This driver allows usb keyboards to work under the USB stack.
+
+USB audio parsing support (Preliminary)
+CONFIG_USB_AUDIO
+ This driver will eventually handle audio devices, such
+ as USB speakers.
+
+USB Abstract Control Model support (Preliminary)
+CONFIG_USB_ACM
+ This driver allows for devices which support the Abstract Control Model,
+ including many USB-based modems, ISDN adapters, and network adapters.
X
X #
X # A couple of things I keep forgetting:
diff -u --recursive --new-file v2.3.3/linux/Documentation/filesystems/isofs.txt linux/Documentation/filesystems/isofs.txt
--- v2.3.3/linux/Documentation/filesystems/isofs.txt Wed Jun 24 14:30:07 1998
+++ linux/Documentation/filesystems/isofs.txt Wed May 26 10:01:43 1999
@@ -27,3 +27,5 @@
X nojoliet Ignore Joliet extensions if they are present.
X norock Ignore Rock Ridge extensions if they are present.
X unhide Show hidden files.
+ session=x Select number of session on multisession CD
+ sbsector=xxx Session begins from sector xxx
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/HiSax.cert linux/Documentation/isdn/HiSax.cert
--- v2.3.3/linux/Documentation/isdn/HiSax.cert Wed Dec 31 16:00:00 1969
+++ linux/Documentation/isdn/HiSax.cert Sun May 23 10:03:41 1999
@@ -0,0 +1,76 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+
+First:
+
+ HiSax 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.
+
+However, if you wish to modify the HiSax sources, please note the following:
+
+HiSax has passed the ITU approval test suite with ELSA Quickstep ISDN cards.
+The certification is only valid for the combination of the tested software
+version and the tested hardware. Any changes to the HiSax source code may
+therefore affect the certification.
+
+If you change the main files of the HiSax ISDN stack, the certification will
+become invalid. Because in most countries it is illegal to connect
+unapproved ISDN equipment to the public network, I have to guarantee that
+changes in HiSax do not affect the certification.
+
+In order to make a valid certification apparent to the user, I have built in
+some validation checks that are made during the make process. The HiSax main
+files are protected by md5 checksums and the md5sum file is pgp signed by
+myself:
+
+KeyID 1024/FF992F6D 1997/01/16 Karsten Keil <ke...@temic-ech.spacenet.de>
+Key fingerprint = 92 6B F7 58 EE 86 28 C8 C4 1A E6 DC 39 89 F2 AA
+
+Only if the checksums are OK, and the signature of the file
+"drivers/isdn/hisax/md5sums.asc" match, is the certification valid; a
+message confirming this is then displayed during the hisax init process.
+
+The affected files are:
+
+drivers/isdn/hisax/isac.c
+drivers/isdn/hisax/isdnl1.c
+drivers/isdn/hisax/isdnl2.c
+drivers/isdn/hisax/isdnl3.c
+drivers/isdn/hisax/tei.c
+drivers/isdn/hisax/callc.c
+drivers/isdn/hisax/l3dss1.c
+drivers/isdn/hisax/l3_1tr6.c
+drivers/isdn/hisax/cert.c
+drivers/isdn/hisax/elsa.c
+
+Please send any changes, bugfixes and patches to me rather than implementing
+them directly into the HiSax sources.
+
+This does not reduce your rights granted by the GNU General Public License.
+If you wish to change the sources, go ahead; but note that then the
+certification is invalid even if you use ELSA Quickstep cards.
+
+Here are the certification registration numbers for ELSA Quickstep cards:
+German D133361J CETECOM ICT Services GmbH 0682
+European D133362J CETECOM ICT Services GmbH 0682
+
+
+Karsten Keil
+ke...@isdn4linux.de
+
+-----BEGIN PGP SIGNATURE-----
+Version: 2.6.3i
+Charset: noconv
+
+iQCVAwUBNj5OKDpxHvX/mS9tAQFHuQP/WeImlqCcDZ2d132yAvRBWFULlJoSf1P/
+c1lVTeaWvsSaY5Cu9hrKhXXhPzeEaitUbcUBPXdpzFWCA5CE902lnz7AhgRC+HF1
+0qiKgkZZyc/5HKasFymR1+IWSLw30GesP3Di/ZMR3NJi8SlY9PIjx7hnEMunGSRO
+1ufPvfWWuu8=
+=nGJk
+-----END PGP SIGNATURE-----
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/INTERFACE linux/Documentation/isdn/INTERFACE
--- v2.3.3/linux/Documentation/isdn/INTERFACE Tue Apr 28 14:22:04 1998
+++ linux/Documentation/isdn/INTERFACE Sun May 23 10:03:41 1999
@@ -1,4 +1,4 @@
-$Id: INTERFACE,v 1.8 1998/02/20 17:38:20 fritz Exp $
+$Id: INTERFACE,v 1.11 1999/03/02 12:14:51 armin Exp $
X
X Description of the Interface between Linklevel and Hardwarelevel
X of isdn4linux:
@@ -478,6 +478,14 @@
X 1 = At least one device matching this call (RING on ttyI).
X HL-driver may send ALERTING on the D-channel in this case.
X 2 = Call will be rejected.
+ 3 = Incomplete number.
+ The CalledNumber would match, if more digits are appended.
+ This feature is needed for Number-Blocks assigned to
+ a line. In this case, the LL driver should assemble the
+ CalledNumber by handling keypad protocol and try again
+ later with a longer CalledNumber.
+ HL drivers serving ordinary lines should interpret this
+ return code like 0 (nothing matches).
X -1 = An error happened. (Invalid parameters for example.)
X
X ISDN_STAT_RUN:
@@ -526,7 +534,9 @@
X driver = driver-Id
X command = ISDN_STAT_BCONN
X arg = channel-number, locally to the driver. (starting with 0)
- para = unused.
+ para.num = ASCII-String, containing type of connection (for analog
+ modem only). This will be appended to the CONNECT message
+ e.g. 14400/V.32bis
X
X ISDN_STAT_DHUP:
X
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README linux/Documentation/isdn/README
--- v2.3.3/linux/Documentation/isdn/README Wed May 20 18:54:34 1998
+++ linux/Documentation/isdn/README Sun May 23 10:03:41 1999
@@ -31,7 +31,7 @@
X This mailinglist is bidirectionally gated to the newsgroup
X
X de.alt.comm.isdn4linux
-
+
X There is also a well maintained FAQ (both english and german) available
X at ftp.franken.de in /pub/isdn4linux/FAQ/
X This FAQ is also available at http://www.lrz-muenchen.de/~ui161ab/www/isdn/
@@ -41,11 +41,11 @@
X In the following Text, the terms MSN and EAZ are used.
X
X MSN is the abbreviation for (M)ultiple(S)ubscriber(N)umber, and applies
- to Euro(EDSS1)-type lines. Usually it is simply the phone-number.
+ to Euro(EDSS1)-type lines. Usually it is simply the phone number.
X
X EAZ is the abbreviation of (E)ndgeraete(A)uswahl(Z)iffer and
X applies to German 1TR6-type lines. This is a one-digit string,
- simply appended to the base phone-number
+ simply appended to the base phone number
X
X The internal handling is nearly identical, so replace the appropriate
X term to that one, which applies to your local ISDN-environment.
@@ -56,13 +56,13 @@
X A low-level-driver can register itself through an interface (which is
X defined in isdnif.h) and gets assigned a slot.
X The following char-devices are made available for each channel:
-
+
X A raw-control-device with the following functions:
X write: raw D-channel-messages (format: depends on driver).
X read: raw D-channel-messages (format: depends on driver).
X ioctl: depends on driver, i.e. for the ICN-driver, the base-address of
X the ports and the shared memory on the card can be set and read
- also the boot-code and the protocol software can be loaded into
+ also the boot-code and the protocol software can be loaded into
X the card.
X
X O N L Y !!! for debugging (no locking against other devices):
@@ -74,38 +74,38 @@
X
X 128 tty-devices (64 cuix and 64 ttyIx) with integrated modem-emulator:
X The functionality is almost the same as that of a serial device
- (the line-discs are handled by the kernel), which lets you run
- SLIP, CSLIP and asynchronous PPP through the devices. We have tested
+ (the line-discs are handled by the kernel), which lets you run
+ SLIP, CSLIP and asynchronous PPP through the devices. We have tested
X Seyon, minicom, CSLIP (uri-dip) PPP and mgetty (compiled with NO_FAX),
X XCept.
X
X The modem-emulation supports the following:
X 1.3.1 Commands:
X
- ATA Answer incoming call.
- ATD<No.> Dial, the number may contain:
+ ATA Answer incoming call.
+ ATD<No.> Dial, the number may contain:
X [0-9] and [,#.*WPT-S]
X the latter are ignored until 'S'.
- The 'S' must precede the number, if
+ The 'S' must precede the number, if
X the line is a SPV (German 1TR6).
- ATE0 Echo off.
- ATE1 Echo on (default).
+ ATE0 Echo off.
+ ATE1 Echo on (default).
X ATH Hang-up.
- ATH1 Off hook (ignored).
+ ATH1 Off hook (ignored).
X ATH0 Hang-up.
- ATI Return "ISDN for Linux...".
+ ATI Return "ISDN for Linux...".
X ATI0 "
X ATI1 "
- ATI2 Report of last connection.
+ ATI2 Report of last connection.
X ATO On line (data mode).
X ATQ0 Enable result codes (default).
X ATQ1 Disable result codes (default).
- ATSx=y Set register x to y.
- ATSx? Show contents of register x.
+ ATSx=y Set register x to y.
+ ATSx? Show contents of register x.
X ATV0 Numeric responses.
X ATV1 English responses (default).
- ATZ Load registers and EAZ/MSN from Profile.
- AT&Bx Set Send-Packet-size to x (max. 4000)
+ ATZ Load registers and EAZ/MSN from Profile.
+ AT&Bx Set Send-Packet-size to x (max. 4000)
X The real packet-size may be limited by the
X low-level-driver used. e.g. the HiSax-Module-
X limit is 2000. You will get NO Error-Message,
@@ -114,13 +114,13 @@
X driver may not be selected (see "Automatic
X Assignment") however the size of outgoing packets
X will be limited correctly.
- AT&D0 Ignore DTR
- AT&D2 DTR-low-edge: Hang up and return to
+ AT&D0 Ignore DTR
+ AT&D2 DTR-low-edge: Hang up and return to
X command mode (default).
X AT&D3 Same as AT&D2 but also resets all registers.
- AT&Ex Set the EAZ/MSN for this channel to x.
- AT&F Reset all registers and profile to "factory-defaults"
- AT&Rx Select V.110 bitrate adaption.
+ AT&Ex Set the EAZ/MSN for this channel to x.
+ AT&F Reset all registers and profile to "factory-defaults"
+ AT&Rx Select V.110 bitrate adaption.
X This command enables V.110 protocol with 9600 baud
X (x=9600), 19200 baud (x=19200) or 38400 baud
X (x=38400). A value of x=0 disables V.110 switching
@@ -142,24 +142,24 @@
X The value 198 is choosen arbitrarily. Users
X _MUST_ negotiate this value before establishing
X a connection.
- AT&Sx Set window-size (x = 1..8) (not yet implemented)
- AT&V Show all settings.
+ AT&Sx Set window-size (x = 1..8) (not yet implemented)
+ AT&V Show all settings.
X AT&W0 Write registers and EAZ/MSN to profile. See also
X iprofd (5.c in this README).
- AT&X0 BTX-mode and T.70-mode off (default)
- AT&X1 BTX-mode on. (S13.1=1, S13.5=0 S14=0, S16=7, S18=7, S19=0)
- AT&X2 T.70-mode on. (S13.1=1, S13.5=1, S14=0, S16=7, S18=7, S19=0)
+ AT&X0 BTX-mode and T.70-mode off (default)
+ AT&X1 BTX-mode on. (S13.1=1, S13.5=0 S14=0, S16=7, S18=7, S19=0)
+ AT&X2 T.70-mode on. (S13.1=1, S13.5=1, S14=0, S16=7, S18=7, S19=0)
X
X For voice-mode commands refer to README.audio
X
- 1.3.2 Escape sequence:
+ 1.3.2 Escape sequence:
X During a connection, the emulation reacts just like
X a normal modem to the escape sequence <DELAY>+++<DELAY>.
- (The escape character - default '+' - can be set in the
+ (The escape character - default '+' - can be set in the
X register 2).
- The DELAY must at least be 1.5 seconds long and delay
+ The DELAY must at least be 1.5 seconds long and delay
X between the escape characters must not exceed 0.5 seconds.
-
+
X 1.3.3 Registers:
X
X Nr. Default Description
@@ -172,7 +172,7 @@
X 4 10 Line feed character (ASCII).
X 5 8 Backspace character (ASCII).
X 6 3 Delay in seconds before dialing.
- 7 60 Wait for carrier (ignored).
+ 7 60 Wait for carrier.
X 8 2 Pause time for comma (ignored)
X 9 6 Carrier detect time (ignored)
X 10 7 Carrier loss to disconnect time (ignored).
@@ -203,8 +203,8 @@
X 1 = T.70 protocol (Only for BTX!) on
X Bit 2: 0 = Don't hangup on DTR low.
X 1 = Hangup on DTR low.
- Bit 3: 0 = Standard response messages
- 1 = Extended response messages
+ Bit 3: 0 = Standard response messages
+ 1 = Extended response messages
X Bit 4: 0 = CALLER NUMBER before every RING.
X 1 = CALLER NUMBER after first RING.
X Bit 5: 0 = T.70 extended protocol off
@@ -215,18 +215,19 @@
X an incoming call happened (RING) and
X the remote party hung up before any
X local ATA was given.
- 14 0 Layer-2 protocol:
- 0 = X75/LAPB with I-frames
- 1 = X75/LAPB with UI-frames
+ 14 0 Layer-2 protocol:
+ 0 = X75/LAPB with I-frames
+ 1 = X75/LAPB with UI-frames
X 2 = X75/LAPB with BUI-frames
X 3 = HDLC
X 4 = Transparent (audio)
X 7 = V.110, 9600 baud
X 8 = V.110, 19200 baud
X 9 = V.110, 38400 baud
+ 10 = Analog Modem (only if hardware supports this)
X 15 0 Layer-3 protocol: (at the moment always 0)
X 0 = transparent
- 16 250 Send-Packet-size/16
+ 16 250 Send-Packet-size/16
X 17 8 Window-size (not yet implemented)
X 18 4 Bit coded register, Service-Octet-1 to accept,
X or to be used on dialout:
@@ -262,7 +263,7 @@
X
X All inactive physical lines are listening to all EAZs for incoming
X calls and are NOT assigned to a specific tty or network interface.
- When an incoming call is detected, the driver looks first for a network
+ When an incoming call is detected, the driver looks first for a network
X interface and then for an opened tty which:
X
X 1. is configured for the same EAZ.
@@ -270,7 +271,7 @@
X 3. (only for network interfaces if the security flag is set)
X contains the caller number in its access list.
X 4. Either the channel is not bound exclusively to another Net-interface, or
- it is bound AND the other checks apply to exactly this Interface.
+ it is bound AND the other checks apply to exactly this interface.
X (For usage of the bind-features, refer to the isdnctrl-man-page)
X
X Only when a matching interface or tty is found is the call accepted
@@ -301,7 +302,7 @@
X Always use the latest module utilities. The current version is
X named in Documentation/Changes. Some old versions of insmod
X are not capable of setting the driver-Ids correctly.
-
+
X 3. Lowlevel-driver configuration.
X
X Configuration depends on how the drivers are built. See the
@@ -310,7 +311,7 @@
X 4. Device-inodes
X
X The major and minor numbers and their names are described in
- Documentation/devices.txt. The major-numbers are:
+ Documentation/devices.txt. The major numbers are:
X
X 43 for the ISDN-tty's.
X 44 for the ISDN-callout-tty's.
@@ -350,45 +351,64 @@
X g) Set the timeout for hang-up:
X isdnctrl huptimeout isdn0 <timeout_in_seconds>
X
- h) additionally you may activate charge-hang-up (= Hang up before
+ h) additionally you may activate charge-hang-up (= Hang up before
X next charge-info, this only works, if your isdn-provider transmits
X the charge-info during and after the connection):
X isdnctrl chargehup isdn0 on
X
- i) Setup the interface with ifconfig as usual, and set a route to it.
+ i) Set the dial mode of the interface:
+ isdnctrl dialmode isdn0 auto
+ "off" means that you (or the system) cannot make any connection
+ (neither incoming or outgoing connections are possible). Use
+ this if you want to be sure that no connections will be made.
+ "auto" means that the interface is in auto-dial mode, and will
+ attempt to make a connection whenever a network data packet needs
+ the interface's link. Note that this can cause unexpected dialouts,
+ and lead to a high phone bill! Some daemons or other pc's that use
+ this interface can cause this.
+ Incoming connections are also possible.
+ "manual" is a dial mode created to prevent the unexpected dialouts.
+ In this mode, the interface will never make any connections on its
+ own. You must explicitly initiate a connection with "isdnctrl dial
+ isdn0". However, after an idle time of no traffic as configured for
+ the huptimeout value with isdnctrl, the connection _will_ be ended.
+ If you don't want any automatic hangup, set the huptimeout value to 0.
+ "manual" is the default.
X
- j) (optional) If you run X11 and have Tcl/Tk-wish Version 4.0, you can use
+ j) Setup the interface with ifconfig as usual, and set a route to it.
+
+ k) (optional) If you run X11 and have Tcl/Tk-wish version 4.0, you can use
X the script tools/tcltk/isdnmon. You can add actions for line-status
X changes. See the comments at the beginning of the script for how to
X do that. There are other tty-based tools in the tools-subdirectory
X contributed by Michael Knigge (imon), Volker Götz (imontty) and
X Andreas Kool (isdnmon).
X
- k) For initial testing, you can set the verbose-level to 2 (default: 0).
+ l) For initial testing, you can set the verbose-level to 2 (default: 0).
X Then all incoming calls are logged, even if they are not addressed
X to one of the configured net-interfaces:
X isdnctrl verbose 2
X
- Now you are ready! A ping to the set address should now result in a
- dial-out (look at syslog kernel-messages).
- The phone-numbers and EAZs can be assigned at any time with isdnctrl.
+ Now you are ready! A ping to the set address should now result in an
+ automatic dial-out (look at syslog kernel-messages).
+ The phone numbers and EAZs can be assigned at any time with isdnctrl.
X You can add as many interfaces as you like with addif following the
- directions above. Of course, there may be some limitations. But we have
- tested as many as 20 interfaces without any problem. However, if you
- don't give an interface name to addif, the kernel will assign a name
+ directions above. Of course, there may be some limitations. But we have
+ tested as many as 20 interfaces without any problem. However, if you
+ don't give an interface name to addif, the kernel will assign a name
X which starts with "eth". The number of "eth"-interfaces is limited by
X the kernel.
X
X 5. Additional options for isdnctrl:
X
- "isdnctrl secure <InterfaceName> on"
+ "isdnctrl secure <InterfaceName> on"
X Only incoming calls, for which the caller-id is listed in the access
X list of the interface are accepted. You can add caller-id's With the
X command "isdnctrl addphone <InterfaceName> in <caller-id>"
X Euro-ISDN does not transmit the leading '0' of the caller-id for an
X incoming call, therefore you should configure it accordingly.
X If the real number for the dialout e.g. is "09311234567" the number
- to configure here is "9311234567". The pattern-match function
+ to configure here is "9311234567". The pattern-match function
X works similar to the shell mechanism.
X
X ? one arbitrary digit
@@ -398,23 +418,23 @@
X a '^' as the first character in a list inverts the list
X
X
- "isdnctrl secure <InterfaceName> off"
+ "isdnctrl secure <InterfaceName> off"
X Switch off secure operation (default).
X
- "isdnctrl ihup <InterfaceName> [on|off]"
+ "isdnctrl ihup <InterfaceName> [on|off]"
X Switch the hang-up-timer for incoming calls on or off.
X
- "isdnctrl eaz <InterfaceName>"
+ "isdnctrl eaz <InterfaceName>"
X Returns the EAZ of an interface.
X
- "isdnctrl delphone <InterfaceName> in|out <number>"
+ "isdnctrl delphone <InterfaceName> in|out <number>"
X Deletes a number from one of the access-lists of the interface.
X
- "isdnctrl delif <InterfaceName>"
+ "isdnctrl delif <InterfaceName>"
X Removes the interface (and possible slaves) from the kernel.
X (You have to unregister it with "ifconfig <InterfaceName> down" before).
X
- "isdnctrl callback <InterfaceName> [on|off]"
+ "isdnctrl callback <InterfaceName> [on|off]"
X Switches an interface to callback-mode. In this mode, an incoming call
X will be rejected and after this the remote-station will be called. If
X you test this feature by using ping, some routers will re-dial very
@@ -435,14 +455,14 @@
X only while an interface is down.
X
X At the moment the following values are supported:
-
+
X rawip (Default) Selects raw-IP-encapsulation. This means, MAC-headers
- are stripped off.
+ are stripped off.
X ip IP with type-field. Same as IP but the type-field of the MAC-header
X is preserved.
X x25iface X.25 interface encapsulation (first byte semantics as defined in
- ../networking/x25-iface.txt). Use this for running the linux
- X.25 network protocol stack (AF_X25 sockets) on top of isdn.
+ ../networking/x25-iface.txt). Use this for running the linux
+ X.25 network protocol stack (AF_X25 sockets) on top of isdn.
X cisco-h A special-mode for communicating with a Cisco, which is configured
X to do "hdlc"
X ethernet No stripping. Packets are sent with full MAC-header.
@@ -454,7 +474,7 @@
X
X
X NOTE: x25iface encapsulation is currently experimental. Please
- read README.x25 for further details
+ read README.x25 for further details
X
X
X Watching packets, using standard-tcpdump will fail for all encapsulations
@@ -462,16 +482,16 @@
X without MAC-header. A patch for tcpdump is included in the utility-package
X mentioned above.
X
- "isdnctrl l2_prot <InterfaceName> <L2-ProtocolName>"
- Selects a layer-2-protocol.
+ "isdnctrl l2_prot <InterfaceName> <L2-ProtocolName>"
+ Selects a layer-2-protocol.
X (With the ICN-driver and the HiSax-driver, "x75i" and "hdlc" is available.
X With other drivers, "x75ui", "x75bui", "x25dte", "x25dce" may be
X possible too. See README.x25 for x25 related l2 protocols.)
X
- isdnctrl l3_prot <InterfaceName> <L3-ProtocolName>
+ isdnctrl l3_prot <InterfaceName> <L3-ProtocolName>
X The same for layer-3. (At the moment only "trans" is allowed)
X
- "isdnctrl list <InterfaceName>"
+ "isdnctrl list <InterfaceName>"
X Shows all parameters of an interface and the charge-info.
X Try "all" as the interface name.
X
@@ -479,13 +499,13 @@
X Forces hangup of an interface.
X
X "isdnctrl bind <InterfaceName> <DriverId>,<ChannelNumber> [exclusive]"
- If you are using more than one ISDN-Card, it is sometimes necessary to
- dial out using a specific Card or even preserve a specific Channel for
- Dialout of a specific net-interface. This can be done with the above
+ If you are using more than one ISDN card, it is sometimes necessary to
+ dial out using a specific card or even preserve a specific channel for
+ dialout of a specific net-interface. This can be done with the above
X command. Replace <DriverId> by whatever you assigned while loading the
- module. The <ChannelNumber> is counting from zero. The upper Limit
- depends on the card used. At the Moment no card supports more than
- 2 Channels, so the upper limit is one.
+ module. The <ChannelNumber> is counted from zero. The upper limit
+ depends on the card used. At the moment no card supports more than
+ 2 channels, so the upper limit is one.
X
X "isdnctrl unbind <InterfaceName>"
X unbinds a previously bound interface.
@@ -494,10 +514,10 @@
X If switched on, isdn4linux replies a REJECT to incoming calls, it
X cannot match to any configured interface.
X If switched off, nothing happens in this case.
- You normally should NOT enable this feature, if the ISDN-adaptor is not
- the only device, connected to the S0-bus. Otherwise it could happen, that
+ You normally should NOT enable this feature, if the ISDN adapter is not
+ the only device connected to the S0-bus. Otherwise it could happen that
X isdn4linux rejects an incoming call, which belongs to another device on
- the bus.
+ the bus.
X
X "isdnctrl addslave <InterfaceName> <SlaveName>
X Creates a slave interface for channel-bundling. Slave interfaces are
@@ -539,9 +559,9 @@
X isdnctrl eaz isdn1 4 # listen on 12345674(1tr6) only.
X ...
X isdnctrl eaz isdn2 987654 # listen on 987654(euro) only.
-
+
X Same scheme is used with AT&E... at the tty's.
-
+
X 6. If you want to write a new low-level-driver, you are welcome.
X The interface to the link-level-module is described in the file INTERFACE.
X If the interface should be expanded for any reason, don't do it
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.HiSax linux/Documentation/isdn/README.HiSax
--- v2.3.3/linux/Documentation/isdn/README.HiSax Tue Apr 28 14:22:04 1998
+++ linux/Documentation/isdn/README.HiSax Sun May 23 10:03:41 1999
@@ -1,7 +1,7 @@
X HiSax is a Linux hardware-level driver for passive ISDN cards with Siemens
X chipset (ISAC_S 2085/2086/2186, HSCX SAB 82525). It is based on the Teles
X driver from Jan den Ouden.
-It is meant to be used with isdn4linux, an ISDN link-level module for Linux
+It is meant to be used with isdn4linux, an ISDN link-level module for Linux
X written by Fritz Elfert.
X
X This program is free software; you can redistribute it and/or modify
@@ -25,24 +25,33 @@
X Teles 8.0/16.0/16.3 and compatible ones
X Teles 16.3c
X Teles S0/PCMCIA
-Creatix PnP S0
+Teles PCI
+Teles S0Box
+Creatix S0Box
+Creatix PnP S0
X Compaq ISDN S0 ISA card
X AVM A1 (Fritz, Teledat 150)
+AVM Fritz PCMCIA
+AVM Fritz PnP
+AVM Fritz PCI
X ELSA Microlink PCC-16, PCF, PCF-Pro, PCC-8
X ELSA Quickstep 1000
X ELSA Quickstep 1000PCI
X ELSA Quickstep 3000 (same settings as QS1000)
+ELSA Quickstep 3000PCI
X ELSA PCMCIA
X ITK ix1-micro Rev.2
X Eicon.Diehl Diva 2.0 ISA and PCI (S0 and U interface, no PRO version)
X Eicon.Diehl Diva Piccola
X ASUSCOM NETWORK INC. ISDNLink 128K PC adapter (order code I-IN100-ST-D)
X Dynalink IS64PH (OEM version of ASUSCOM NETWORK INC. ISDNLink 128K adapter)
+PCBIT-DP (OEM version of ASUSCOM NETWORK INC. ISDNLink)
X HFC-2BS0 based cards (TeleInt SA1)
-Sedlbauer Speed Card (Speed Win, Teledat 100)
-Sedlbauer Speed Star (PCMCIA)
+Sedlbauer Speed Card (Speed Win, Teledat 100, PCI, Fax+)
+Sedlbauer Speed Star/Speed Star2 (PCMCIA)
+Sedlbauer ISDN-Controller PC/104
X USR Sportster internal TA (compatible Stollmann tina-pp V3)
-ith Kommunikationstechnik GmbH MIC 16 ISA card
+ith Kommunikationstechnik GmbH MIC 16 ISA card
X Traverse Technologie NETjet PCI S0 card
X Dr. Neuhaus Niccy PnP/PCI
X
@@ -50,6 +59,8 @@
X PCC-8: not tested yet
X Teles PCMCIA is EXPERIMENTAL
X Teles 16.3c is EXPERIMENTAL
+ Teles PCI is EXPERIMENTAL
+ Teles S0Box is EXPERIMENTAL
X Eicon.Diehl Diva U interface not tested
X
X If you know other passive cards with the Siemens chipset, please let me know.
@@ -113,7 +124,7 @@
X correct one during kernel config. Valid values are "1" for German 1TR6,
X "2" for EDSS1 (Euro ISDN) and "3" for leased lines (no D-Channel).
X
-The Creatix/Teles PnP cards use io1= and io2= instead of io= for specifying
+The Creatix/Teles PnP cards use io1= and io2= instead of io= for specifying
X the I/O addresses of the ISAC and HSCX chips, respectively.
X
X Card types:
@@ -135,24 +146,29 @@
X 11 Eicon.Diehl Diva ISA PnP irq, io
X 11 Eicon.Diehl Diva PCI no parameter
X 12 ASUS COM ISDNLink irq, io (from isapnp setup)
- 13 HFC-2BS0 based cards irq, io
+ 13 HFC-2BS0 based cards irq, io
X 14 Teles 16.3c PnP irq, io
- 15 Sedlbauer Speed Card irq, io
- 16 USR Sportster internal irq, io
- 17 MIC card irq, io
+ 15 Sedlbauer Speed Card irq, io
+ 15 Sedlbauer PC/104 irq, io
+ 15 Sedlbauer Speed PCI no parameter
+ 16 USR Sportster internal irq, io
+ 17 MIC card irq, io
X 18 ELSA Quickstep 1000PCI no parameter
X 19 Compaq ISDN S0 ISA card irq, io0, io1, io (from isapnp setup io=IO2)
X 20 NETjet PCI card no parameter
+ 21 Teles PCI no parameter
X 22 Sedlbauer Speed Star (PCMCIA) irq, io (set with card manager)
X 24 Dr. Neuhaus Niccy PnP irq, io0, io1 (from isapnp setup)
X 24 Dr. Neuhaus Niccy PCI no parameter
+ 25 Teles S0Box irq, io (of the used lpt port)
+ 26 AVM A1 PCMCIA (Fritz!) irq, io (set with card manager)
+ 27 AVM PnP (Fritz!PnP) irq, io (from isapnp setup)
+ 27 AVM PCI (Fritz!PCI) no parameter
+ 28 Sedlbauer Speed Fax+ irq, io (from isapnp setup)
X
X
-
-At the moment IRQ sharing is not possible. Please make sure that your IRQ
-is free and enabled for ISA use.
-Note: For using the ELSA PCMCIA you need the cardmanager under MSDOS for
-enabling at the moment, then boot linux with loadlin.
+At the moment IRQ sharing is only possible with PCI cards. Please make sure
+that your IRQ is free and enabled for ISA use.
X
X
X Examples for module loading
@@ -169,7 +185,7 @@
X 4. Any ELSA PCC/PCF card, Euro ISDN
X modprobe hisax type=6 protocol=2
X
-5. Teles 16.3 PnP, Euro ISDN, with isapnp configured
+5. Teles 16.3 PnP, Euro ISDN, with isapnp configured
X isapnp config: (INT 0 (IRQ 10 (MODE +E)))
X (IO 0 (BASE 0x0580))
X (IO 1 (BASE 0x0180))
@@ -210,8 +226,8 @@
X Note: the ID string must start with an alphabetical character!
X
X Card types:
-
- type
+
+type
X 1 Teles 16.0 pa=irq pb=membase pc=iobase
X 2 Teles 8.0 pa=irq pb=membase
X 3 Teles 16.3 pa=irq pb=iobase
@@ -227,22 +243,33 @@
X 12 ASUS COM ISDNLink ONLY WORKS AS A MODULE !
X 13 HFC-2BS0 based cards pa=irq pb=io
X 14 Teles 16.3c PnP ONLY WORKS AS A MODULE !
- 15 Sedlbauer Speed Card pa=irq pb=io (Speed Win only as module !)
+ 15 Sedlbauer Speed Card pa=irq pb=io (Speed Win only as module !)
+ 15 Sedlbauer PC/104 pa=irq pb=io
+ 15 Sedlbauer Speed PCI no parameter
X 16 USR Sportster internal pa=irq pb=io
X 17 MIC card pa=irq pb=io
X 18 ELSA Quickstep 1000PCI no parameter
X 19 Compaq ISDN S0 ISA card ONLY WORKS AS A MODULE !
X 20 NETjet PCI card no parameter
- 21 Sedlbauer Speed Star (PCMCIA) pa=irq, pb=io (set with card manager)
+ 21 Teles PCI no parameter
+ 22 Sedlbauer Speed Star (PCMCIA) pa=irq, pb=io (set with card manager)
+ 24 Dr. Neuhaus Niccy PnP ONLY WORKS AS A MODULE !
+ 24 Dr. Neuhaus Niccy PCI no parameter
+ 25 Teles S0Box irq, io (of the used lpt port)
+ 26 AVM A1 PCMCIA (Fritz!) irq, io (set with card manager)
+ 27 AVM PnP (Fritz!PnP) ONLY WORKS AS A MODULE !
+ 27 AVM PCI (Fritz!PCI) no parameter
+ 28 Sedlbauer Speed Fax+ ONLY WORKS AS A MODULE !
+
X
X Running the driver
X ------------------
X
-When you insmod isdn.o and hisax.o (or with the in-kernel version, during
+When you insmod isdn.o and hisax.o (or with the in-kernel version, during
X boot time), a few lines should appear in your syslog. Look for something like:
X
X Apr 13 21:01:59 kke01 kernel: HiSax: Driver for Siemens chip set ISDN cards
-Apr 13 21:01:59 kke01 kernel: HiSax: Version 2.1
+Apr 13 21:01:59 kke01 kernel: HiSax: Version 2.9
X Apr 13 21:01:59 kke01 kernel: HiSax: Revisions 1.14/1.9/1.10/1.25/1.8
X Apr 13 21:01:59 kke01 kernel: HiSax: Total 1 card defined
X Apr 13 21:01:59 kke01 kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax1 (0)
@@ -257,7 +284,7 @@
X Apr 13 21:01:59 kke01 kernel: HiSax: 2 channels added
X
X This means that the card is ready for use.
-Cabling problems or line-downs are not detected, and only some ELSA cards can
+Cabling problems or line-downs are not detected, and only some ELSA cards can
X detect the S0 power.
X
X Remember that, according to the new strategy for accessing low-level drivers
@@ -265,8 +292,7 @@
X insmod: Simply append hisax_id=<SomeString> to the insmod command line. This
X string MUST NOT start with a digit or a small 'x'!
X
-At this point you can run a 'cat /dev/isdnctrl0' and view debugging
-messages.
+At this point you can run a 'cat /dev/isdnctrl0' and view debugging messages.
X
X At the moment, debugging messages are enabled with the hisaxctrl tool:
X
@@ -283,28 +309,35 @@
X
X With DebugCmd set to 1:
X
- 1 Link-level <--> hardware-level communication
- 2 Top state machine
- 4 D-Channel Q.931 (call control messages)
- 8 D-Channel Q.921
- 16 B-Channel X.75
- 32 D-Channel l2
- 64 B-Channel l2
- 128 D-Channel link state debugging
- 256 B-Channel link state debugging
- 512 TEI debug
- 1024 LOCK debug in callc.c
- 2048 More paranoid debug in callc.c (not for normal use)
+ 0x0001 Link-level <--> hardware-level communication
+ 0x0002 Top state machine
+ 0x0004 D-Channel Frames for isdnlog
+ 0x0008 D-Channel Q.921
+ 0x0010 B-Channel X.75
+ 0x0020 D-Channel l2
+ 0x0040 B-Channel l2
+ 0x0080 D-Channel link state debugging
+ 0x0100 B-Channel link state debugging
+ 0x0200 TEI debug
+ 0x0400 LOCK debug in callc.c
+ 0x0800 More paranoid debug in callc.c (not for normal use)
+ 0x1000 D-Channel l1 state debugging
+ 0x2000 B-Channel l1 state debugging
X
X With DebugCmd set to 11:
X
- 1 Warnings (default: on)
- 2 IRQ status
- 4 ISAC
- 8 ISAC FIFO
- 16 HSCX
- 32 HSCX FIFO (attention: full B-Channel output!)
- 64 D-Channel LAPD frame types
+ 0x0001 Warnings (default: on)
+ 0x0002 IRQ status
+ 0x0004 ISAC
+ 0x0008 ISAC FIFO
+ 0x0010 HSCX
+ 0x0020 HSCX FIFO (attention: full B-Channel output!)
+ 0x0040 D-Channel LAPD frame types
+ 0x0080 IPAC debug
+ 0x0100 HFC receive debug
+ 0x0200 ISAC monitor debug
+ 0x0400 D-Channel frames for isdnlog (set with 1 0x4 too)
+ 0x0800 D-Channel message verbose
X
X With DebugCmd set to 13:
X
@@ -317,27 +350,39 @@
X
X Because of some obscure problems with some switch equipment, the delay
X between the CONNECT message and sending the first data on the B-channel is now
-configurable with
+configurable with
X
X hisaxctrl <DriverId> 2 <delay>
X <delay> in ms Value between 50 and 800 ms is recommended.
X
+Downloading Firmware
+--------------------
+At the moment, the Sedlbauer speed fax+ is the only card, which
+needs to download firmware.
+The firmware is downloaded with the hisaxctrl tool:
+
+ hisaxctrl <DriverId> 9 <firmware_filename>
+
+<DriverId> default is HiSax, if you didn't specify one,
+
+where <firmware_filename> is the filename of the firmware file.
+
+For example, 'hisaxctrl HiSax 9 ISAR.BIN' downloads the firmware for
+ISAR based cards (like the Sedlbauer speed fax+).
X
X Warning
X -------
-HiSax is a work in progress and may crash your machine. It has not been
-certified and therefore operation on your PTT's ISDN network is probably
-illegal.
-
+HiSax is a work in progress and may crash your machine.
+For certification look at HiSax.cert file.
X
X Limitations
X -----------
X At this time, HiSax only works on Euro ISDN lines and German 1TR6 lines.
-For leased lines see appendix.
+For leased lines see appendix.
X
-Bugs
+Bugs
X ----
-If you find any, please let me know.
+If you find any, please let me know.
X
X
X Thanks
@@ -354,8 +399,10 @@
X Stephan von Krawczynski
X Juergen Quade for the Leased Line part
X Klaus Lichtenwalder (Klaus.Lic...@WebForum.DE), for ELSA PCMCIA support
+ Enrik Berkhan (en...@starfleet.inka.de) for S0BOX specific stuff
+ Ton van Rosmalen for Teles PCI
X and more people who are hunting bugs. (If I forgot somebody, please
- send me a mail).
+ send me a mail).
X
X Firma ELSA GmbH
X Firma Eicon.Diehl GmbH
@@ -364,20 +411,23 @@
X Firma S.u.S.E
X Firma ith Kommunikationstechnik GmbH
X Firma Traverse Technologie Australia
-
+ Firma Medusa GmbH (www.medusa.de).
+ Firma Quant-X Austria for sponsoring a DEC Alpha board+CPU
+ Firma Cologne Chip Designs GmbH
+
X My girl friend and partner in life Ute for her patience with me.
X
X
X Enjoy,
X
-Karsten Keil
-ke...@temic-ech.spacenet.de
+Karsten Keil
+ke...@isdn4linux.de
X
X
X Appendix: Teles PCMCIA driver
X -----------------------------
X
-See
+See
X http://www.stud.uni-wuppertal.de/~ea0141/pcmcia.html
X for instructions.
X
@@ -451,7 +501,7 @@
X /sbin/isdnctrl l2_prot isdn0 hdlc
X # Attention you must not set an outgoing number !!! This won't work !!!
X # The incomming number is LEASED0 for the first card, LEASED1 for the
- # second and so on.
+ # second and so on.
X /sbin/isdnctrl addphone isdn0 in LEASED0
X # Here is no need to bind the channel.
X c) in case the remote partner is a CISCO:
@@ -461,11 +511,12 @@
X e) set the routes
X /sbin/route add -host ${REMOTE_IP} isdn0
X /sbin/route add default gw ${REMOTE_IP}
- f) switch the card into leased mode for each used B-channel
+ f) switch the card into leased mode for each used B-channel
X /sbin/hisaxctrl HiSax 5 1
-
+
X Remarks:
X a) If you have a CISCO don't forget to switch off the KEEP ALIVE option!
+b) Use state of the art isdn4k-utils
X
X Here an example script:
X #!/bin/sh
@@ -517,6 +568,7 @@
X /sbin/isdnctrl encap isdn0s cisco-h
X fi
X fi
+ /sbin/isdnctrl dialmode isdn0 auto
X # configure tcp/ip
X /sbin/ifconfig isdn0 ${LOCAL_IP} pointopoint ${REMOTE_IP}
X /sbin/route add -host ${REMOTE_IP} isdn0
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.act2000 linux/Documentation/isdn/README.act2000
--- v2.3.3/linux/Documentation/isdn/README.act2000 Thu Jan 7 08:41:54 1999
+++ linux/Documentation/isdn/README.act2000 Sun May 23 10:03:41 1999
@@ -1,4 +1,4 @@
-$Id: README.act2000,v 1.1 1997/09/24 23:50:16 fritz Exp $
+$Id: README.act2000,v 1.2 1998/04/29 19:49:06 he Exp $
X
X This document describes the ACT2000 driver for the
X IBM Active 2000 ISDN card.
@@ -7,7 +7,7 @@
X Version. Currently, only the ISA-Bus version of the card is supported.
X However MCA and PCMCIA will follow soon.
X
-The ISA-Bus Version uses 8 IO-ports. The base port address has to be set
+The ISA-Bus Version uses 8 IO-ports. The base port adress has to be set
X manually using the DIP switches.
X
X Setting up the DIP switches for the IBM Active 2000 ISDN card:
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.audio linux/Documentation/isdn/README.audio
--- v2.3.3/linux/Documentation/isdn/README.audio Tue Apr 28 14:22:04 1998
+++ linux/Documentation/isdn/README.audio Sun May 23 10:03:41 1999
@@ -1,4 +1,4 @@
-$Id: README.audio,v 1.5 1997/02/23 23:53:46 fritz Exp $
+$Id: README.audio,v 1.7 1998/07/26 18:45:34 armin Exp $
X
X ISDN subsystem for Linux.
X Description of audio mode.
@@ -50,10 +50,11 @@
X the application. See below for data format
X
X AT+VSD=x,y Set silence-detection parameters.
- NO EFFECT, supported for compatibility
- only. Possible parameters:
- x = 0 ... 31
- y = 0 ... 255
+ Possible parameters:
+ x = 0 ... 31 sensitivity threshold level.
+ (default 0 , deactivated)
+ y = 0 ... 255 range of interval in units
+ of 0.1 second. (default 70)
X AT+VSD=? Report possible parameters.
X AT+VSD? Show current parameters.
X
@@ -102,13 +103,14 @@
X <DLE>C Touchtone "C" received.
X <DLE>D Touchtone "D" received.
X
+ <DLE>q quiet. Silence detected after non-silence.
+ <DLE>s silence. Silence detected from the
+ start of recording.
+
X Currently unsupported DLE sequences:
X
X <DLE>c FAX calling tone received.
X <DLE>b busy tone received.
- <DLE>q quiet. Silence detected after non-silence.
- <DLE>s silence. Silence detected from the
- start of recording.
X
X Audio playback.
X
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.concap linux/Documentation/isdn/README.concap
--- v2.3.3/linux/Documentation/isdn/README.concap Thu Jan 7 08:41:54 1999
+++ linux/Documentation/isdn/README.concap Sun May 23 10:03:41 1999
@@ -256,3 +256,4 @@
X of the concap interface when a trivial concap protocol is used.
X Nevertheless, the device remains able to support encapsulation
X protocol configuration.
+
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.eicon linux/Documentation/isdn/README.eicon
--- v2.3.3/linux/Documentation/isdn/README.eicon Wed Dec 31 16:00:00 1969
+++ linux/Documentation/isdn/README.eicon Sun May 23 10:03:41 1999
@@ -0,0 +1,92 @@
+$Id: README.eicon,v 1.3 1999/03/29 11:10:04 armin Exp $
+
+(c) 1999 Cytronics & Melware
+
+This document describes the eicon driver for the
+Eicon.Diehl active ISDN cards.
+
+It is meant to be used with isdn4linux, an ISDN link-level module for Linux.
+
+ 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.
+
+NOTE : Since the eicon driver is still experimental, this README file
+ may be incomplete and not up to date.
+
+
+However, the driver should work under following conditions :
+
+Supported Cards
+---------------
+
+- S-Card ISA
+- SX-Card ISA
+- SXn-Card ISA
+- SCOM-Card ISA
+- Quadro-Card ISA
+- S2M-Card ISA
+- DIVA Server BRI/PCI 2M
+- DIVA Server PRI/PCI 2M (9M 23M 30M)
+ (Only analog modem functions of the DSPs are currently implemented)
+
+ISDN D-Channel Protocols
+------------------------
+
+- ETSI (Euro-DSS1)
+- 1TR6 (German ISDN) *not testet*
+
+
+
+You can load the module simply by using the insmod or modprobe function :
+
+ insmod eicon [id=driverid] [membase=<membase>] [irq=<irq>]
+
+
+The module will automatically probe the PCI-cards. If the id-options
+is omitted, the driver will assume 'eicon0' for the first pci card and
+increases the digit with each further card. With a given driver-id
+the module appends a number starting with '0'.
+
+For ISA-cards you have to specify membase, irq and id. If id or
+membase is missing/invalid, the driver will not be loaded except
+PCI-cards were found. Additional ISA-cards and irq/membase changes
+can be done with the eiconctrl utility.
+
+After loading the module, you have to download the protocol and
+dsp-code by using the eiconctrl utility of isdn4k-utils.
+
+
+Example for loading and starting a BRI card with E-DSS1 Protocol.
+
+ eiconctrl [-d DriverId] load etsi
+
+
+Example for loading and starting a PRI card with E-DSS1 Protocol.
+
+ eiconctrl [-d DriverId] load etsi -s2 -n
+
+
+Details about using the eiconctrl utility are in 'man eiconctrl'
+or will be printed by starting eiconctrl without any parameters.
+
+
+
+Any reports about bugs, errors and even wishes are welcome.
+
+
+Have fun !
+
+Armin Schindler
+m...@melware.de
+http://www.melware.de
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.icn linux/Documentation/isdn/README.icn
--- v2.3.3/linux/Documentation/isdn/README.icn Tue Apr 28 14:22:04 1998
+++ linux/Documentation/isdn/README.icn Sun May 23 10:03:41 1999
@@ -1,4 +1,4 @@
-$Id: README.icn,v 1.5 1997/04/23 18:55:55 fritz Exp $
+$Id: README.icn,v 1.6 1998/04/29 19:49:08 he Exp $
X
X You can get the ICN-ISDN-card from:
X
diff -u --recursive --new-file v2.3.3/linux/Documentation/isdn/README.x25 linux/Documentation/isdn/README.x25
--- v2.3.3/linux/Documentation/isdn/README.x25 Thu Jan 7 08:41:54 1999
+++ linux/Documentation/isdn/README.x25 Sun May 23 10:03:41 1999
@@ -1,29 +1,24 @@
-
-X25 support within isdn4linux
-
-
-This is experimental code and should be used with linux version 2.1.72.
-or later. Use it completely at your own risk.
-
+
+X.25 support within isdn4linux
+==============================
X
+This is alpha/beta test code. Use it completely at your own risk.
X As new versions appear, the stuff described here might suddenly change
X or become invalid without notice.
X
X Keep in mind:
X
-You are using an experimental kernel (2.1.x series) with an experimental
-x25 protocol implementation and experimental x25-on-top-of-isdn extensions.
-Thus, be prepared to face problems related therefrom.
+You are using several new parts of the 2.2.x kernel series which
+have not been tested in a large scale. Therefore, you might encounter
+more bugs as usual.
X
-- If you connect to an x25 neighbour not operated by yourself, ASK the
+- If you connect to an X.25 neighbour not operated by yourself, ASK the
X other side first. Be prepared that bugs in the protocol implementation
- might result in problems (even crashing the peer, however such ugly events
- should only happen if your peer's protocol implementation has serious bugs).
+ might result in problems.
X
X - This implementation has never wiped out my whole hard disk yet. But as
- this is experimental code, don't blame me if that happened to you. Take
- appropriate actions (such as backing up important data) before
- trying this code.
+ this is experimental code, don't blame me if that happened to you.
+ Backing up important data will never harm.
X
X - Monitor your isdn connections while using this software. This should
X prevent you from undesired phone bills in case of driver problems.
@@ -32,7 +27,7 @@
X
X
X How to configure the kernel
-
+===========================
X
X The ITU-T (former CCITT) X.25 network protocol layer has been implemented
X in the Linux source tree since version 2.1.16. The isdn subsystem might be
@@ -48,32 +43,33 @@
X compilation. You currently also need to enable
X "Prompt for development and/or incomplete code/drivers" from the
X "Code maturity level options" menu. For the x25trace utility to work
-you also need to enable "Packet socket" (I recommend to choose "y",
-not "m" for testing) from the networking options.
+you also need to enable "Packet socket".
X
+For local testing it is also recommended to enable the isdnloop driver
+from the isdn subsystem's configuration menu.
X
-For testing you should also select the isdnloop driver from the
-isdn subsystem's configuration menu.
+For testing, it is recommended that all isdn drivers and the X.25 PLP
+protocol are compiled as loadable modules. Like this, you can recover
+from certain errors by simply unloading and reloading the modules.
X
X
X
X What's it for? How to use it?
+=============================
X
-
-X25 on top of isdn might be useful with two different scenarios:
+X.25 on top of isdn might be useful with two different scenarios:
X
X - You might want to access a public X.25 data network from your Linux box.
X You can use i4l if you were physically connected to the X.25 switch
- by an ISDN line (leased line as well as dial up connection should work,
- but connecting to x.25 network switches is currently untested. Testing
- needs to be done by somebody with access to such a switch.)
-
-- Or you might want to operate certain ISDN teleservices on
- your linux box. A lot of those teleservices run on top of the ISO-8208
- network layer protocol. ISO-8208 is essentially the same as ITU-T X.25.
+ by an ISDN line (leased line as well as dial up connection should work)
+
+- Or you might want to operate certain ISDN teleservices on your linux
+ box. A lot of those teleservices run on top of the ISO-8208
+ (DTE-DTE mode) network layer protocol. ISO-8208 is essentially the
+ same as ITU-T X.25.
X
- Popular candidates of such teleservices are EUROFILE transfer or any
- teleservice applying ITU-T recommendation T.90 (i.e., AFAIK, G4 Fax).
+ Popular candidates of such teleservices are EUROfile transfer or any
+ teleservice applying ITU-T recommendation T.90.
X
X To use the X.25 protocol on top of isdn, just create an isdn network
X interface as usual, configure your own and/or peer's ISDN numbers,
@@ -81,21 +77,18 @@
X
X isdnctrl encap <iface-name> x25iface.
X
-Once encap is set like this, the device can be used by the x25 packet layer.
+Once encap is set like this, the device can be used by the X.25 packet layer.
X
-All the stuff needed for x25 is implemented inside the isdn link
+All the stuff needed for X.25 is implemented inside the isdn link
X level (mainly isdn_net.c and some new source files). Thus, it should
-work with every existing HL driver. I was able to successfully open x25


SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi

echo 'End of part 01'
echo 'File patch-2.3.4 is continued in part 02'
echo 02 > _shar_seq_.tmp
exit 0

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part08

#!/bin/sh
# this is part 08 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh

# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 08; then


echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'

sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&

+ 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
X
X #if _FP_W_TYPE_SIZE < 32
X #error "Here's a nickel kid. Go buy yourself a real computer."
@@ -49,7 +69,13 @@
X
X #define FP_DECL_D(X) _FP_DECL(2,X)
X #define FP_UNPACK_RAW_D(X,val) _FP_UNPACK_RAW_2(D,X,val)
+#define FP_UNPACK_RAW_DP(X,val) _FP_UNPACK_RAW_2_P(D,X,val)
X #define FP_PACK_RAW_D(val,X) _FP_PACK_RAW_2(D,val,X)
+#define FP_PACK_RAW_DP(val,X) \
+ do { \
+ if (!FP_INHIBIT_RESULTS) \
+ _FP_PACK_RAW_2_P(D,val,X); \
+ } while (0)
X
X #define FP_UNPACK_D(X,val) \
X do { \
@@ -57,24 +83,42 @@
X _FP_UNPACK_CANONICAL(D,2,X); \
X } while (0)
X
+#define FP_UNPACK_DP(X,val) \
+ do { \
+ _FP_UNPACK_RAW_2_P(D,X,val); \
+ _FP_UNPACK_CANONICAL(D,2,X); \
+ } while (0)
+
X #define FP_PACK_D(val,X) \
X do { \
X _FP_PACK_CANONICAL(D,2,X); \
X _FP_PACK_RAW_2(D,val,X); \
X } while (0)
X
-#define FP_NEG_D(R,X) _FP_NEG(D,2,R,X)
-#define FP_ADD_D(R,X,Y) _FP_ADD(D,2,R,X,Y)
-#define FP_SUB_D(R,X,Y) _FP_SUB(D,2,R,X,Y)
-#define FP_MUL_D(R,X,Y) _FP_MUL(D,2,R,X,Y)
-#define FP_DIV_D(R,X,Y) _FP_DIV(D,2,R,X,Y)
-#define FP_SQRT_D(R,X) _FP_SQRT(D,2,R,X)
+#define FP_PACK_DP(val,X) \
+ do { \
+ _FP_PACK_CANONICAL(D,2,X); \
+ if (!FP_INHIBIT_RESULTS) \
+ _FP_PACK_RAW_2_P(D,val,X); \
+ } while (0)
+
+#define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,2,X)
+#define FP_NEG_D(R,X) _FP_NEG(D,2,R,X)
+#define FP_ADD_D(R,X,Y) _FP_ADD(D,2,R,X,Y)
+#define FP_SUB_D(R,X,Y) _FP_SUB(D,2,R,X,Y)
+#define FP_MUL_D(R,X,Y) _FP_MUL(D,2,R,X,Y)
+#define FP_DIV_D(R,X,Y) _FP_DIV(D,2,R,X,Y)
+#define FP_SQRT_D(R,X) _FP_SQRT(D,2,R,X)
+#define _FP_SQRT_MEAT_D(R,S,T,X,Q) _FP_SQRT_MEAT_2(R,S,T,X,Q)
X
X #define FP_CMP_D(r,X,Y,un) _FP_CMP(D,2,r,X,Y,un)
X #define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,2,r,X,Y)
X
-#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,2,r,X,rsz,rsg)
-#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,2,X,r,rs,rt)
+#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,2,r,X,rsz,rsg)
+#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,2,X,r,rs,rt)
+
+#define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_2(X)
+#define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_2(X)
X
X #else
X
@@ -96,7 +140,13 @@
X
X #define FP_DECL_D(X) _FP_DECL(1,X)
X #define FP_UNPACK_RAW_D(X,val) _FP_UNPACK_RAW_1(D,X,val)
+#define FP_UNPACK_RAW_DP(X,val) _FP_UNPACK_RAW_1_P(D,X,val)
X #define FP_PACK_RAW_D(val,X) _FP_PACK_RAW_1(D,val,X)
+#define FP_PACK_RAW_DP(val,X) \
+ do { \
+ if (!FP_INHIBIT_RESULTS) \
+ _FP_PACK_RAW_1_P(D,val,X); \
+ } while (0)
X
X #define FP_UNPACK_D(X,val) \
X do { \
@@ -104,18 +154,33 @@
X _FP_UNPACK_CANONICAL(D,1,X); \
X } while (0)
X
+#define FP_UNPACK_DP(X,val) \
+ do { \
+ _FP_UNPACK_RAW_1_P(D,X,val); \
+ _FP_UNPACK_CANONICAL(D,1,X); \
+ } while (0)
+
X #define FP_PACK_D(val,X) \
X do { \
X _FP_PACK_CANONICAL(D,1,X); \
X _FP_PACK_RAW_1(D,val,X); \
X } while (0)
X
-#define FP_NEG_D(R,X) _FP_NEG(D,1,R,X)
-#define FP_ADD_D(R,X,Y) _FP_ADD(D,1,R,X,Y)
-#define FP_SUB_D(R,X,Y) _FP_SUB(D,1,R,X,Y)
-#define FP_MUL_D(R,X,Y) _FP_MUL(D,1,R,X,Y)
-#define FP_DIV_D(R,X,Y) _FP_DIV(D,1,R,X,Y)
-#define FP_SQRT_D(R,X) _FP_SQRT(D,1,R,X)
+#define FP_PACK_DP(val,X) \
+ do { \
+ _FP_PACK_CANONICAL(D,1,X); \
+ if (!FP_INHIBIT_RESULTS) \
+ _FP_PACK_RAW_1_P(D,val,X); \
+ } while (0)
+
+#define FP_ISSIGNAN_D(X) _FP_ISSIGNAN(D,1,X)
+#define FP_NEG_D(R,X) _FP_NEG(D,1,R,X)
+#define FP_ADD_D(R,X,Y) _FP_ADD(D,1,R,X,Y)
+#define FP_SUB_D(R,X,Y) _FP_SUB(D,1,R,X,Y)
+#define FP_MUL_D(R,X,Y) _FP_MUL(D,1,R,X,Y)
+#define FP_DIV_D(R,X,Y) _FP_DIV(D,1,R,X,Y)
+#define FP_SQRT_D(R,X) _FP_SQRT(D,1,R,X)
+#define _FP_SQRT_MEAT_D(R,S,T,X,Q) _FP_SQRT_MEAT_1(R,S,T,X,Q)
X
X /* The implementation of _FP_MUL_D and _FP_DIV_D should be chosen by
X the target machine. */
@@ -123,7 +188,10 @@
X #define FP_CMP_D(r,X,Y,un) _FP_CMP(D,1,r,X,Y,un)
X #define FP_CMP_EQ_D(r,X,Y) _FP_CMP_EQ(D,1,r,X,Y)
X
-#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,1,r,X,rsz,rsg)
-#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,1,X,r,rs,rt)
+#define FP_TO_INT_D(r,X,rsz,rsg) _FP_TO_INT(D,1,r,X,rsz,rsg)
+#define FP_FROM_INT_D(X,r,rs,rt) _FP_FROM_INT(D,1,X,r,rs,rt)
+
+#define _FP_FRAC_HIGH_D(X) _FP_FRAC_HIGH_1(X)
+#define _FP_FRAC_HIGH_RAW_D(X) _FP_FRAC_HIGH_1(X)
X
X #endif /* W_TYPE_SIZE < 64 */
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/extended.h linux/arch/sparc64/math-emu/extended.h
--- v2.3.3/linux/arch/sparc64/math-emu/extended.h Wed Dec 31 16:00:00 1969
+++ linux/arch/sparc64/math-emu/extended.h Sat May 29 11:09:04 1999
@@ -0,0 +1,388 @@
+/* Software floating-point emulation.
+ Definitions for IEEE Extended Precision.
+ Copyright (C) 1999 Free Software Foundation, Inc.


+ This file is part of the GNU C Library.

+ Contributed by Jakub Jelinek (j...@ultra.linux.cz).
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#if _FP_W_TYPE_SIZE < 32
+#error "Here's a nickel, kid. Go buy yourself a real computer."
+#endif
+
+#if _FP_W_TYPE_SIZE < 64
+#define _FP_FRACTBITS_E (4*_FP_W_TYPE_SIZE)
+#else
+#define _FP_FRACTBITS_E (2*_FP_W_TYPE_SIZE)
+#endif
+
+#define _FP_FRACBITS_E 64
+#define _FP_FRACXBITS_E (_FP_FRACTBITS_E - _FP_FRACBITS_E)
+#define _FP_WFRACBITS_E (_FP_WORKBITS + _FP_FRACBITS_E)
+#define _FP_WFRACXBITS_E (_FP_FRACTBITS_E - _FP_WFRACBITS_E)
+#define _FP_EXPBITS_E 15
+#define _FP_EXPBIAS_E 16383
+#define _FP_EXPMAX_E 32767
+
+#define _FP_QNANBIT_E \
+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-2) % _FP_W_TYPE_SIZE)
+#define _FP_IMPLBIT_E \
+ ((_FP_W_TYPE)1 << (_FP_FRACBITS_E-1) % _FP_W_TYPE_SIZE)
+#define _FP_OVERFLOW_E \
+ ((_FP_W_TYPE)1 << (_FP_WFRACBITS_E % _FP_W_TYPE_SIZE))
+
+#if _FP_W_TYPE_SIZE < 64
+
+union _FP_UNION_E
+{
+ long double flt;
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned long pad1 : _FP_W_TYPE_SIZE;
+ unsigned long pad2 : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
+ unsigned long sign : 1;
+ unsigned long exp : _FP_EXPBITS_E;
+ unsigned long frac1 : _FP_W_TYPE_SIZE;
+ unsigned long frac0 : _FP_W_TYPE_SIZE;
+#else
+ unsigned long frac0 : _FP_W_TYPE_SIZE;
+ unsigned long frac1 : _FP_W_TYPE_SIZE;
+ unsigned exp : _FP_EXPBITS_E;
+ unsigned sign : 1;
+#endif /* not bigendian */
+ } bits __attribute__((packed));
+};
+
+
+#define FP_DECL_E(X) _FP_DECL(4,X)
+
+#define FP_UNPACK_RAW_E(X, val) \
+ do { \
+ union _FP_UNION_E _flo; _flo.flt = (val); \
+ \
+ X##_f[2] = 0; X##_f[3] = 0; \
+ X##_f[0] = _flo.bits.frac0; \
+ X##_f[1] = _flo.bits.frac1; \
+ X##_e = _flo.bits.exp; \
+ X##_s = _flo.bits.sign; \
+ if (!X##_e && (X##_f[1] || X##_f[0]) \
+ && !(X##_f[1] & _FP_IMPLBIT_E)) \
+ { \
+ X##_e++; \
+ FP_SET_EXCEPTION(FP_EX_DENORM); \
+ } \
+ } while (0)
+
+#define FP_UNPACK_RAW_EP(X, val) \
+ do { \
+ union _FP_UNION_E *_flo = \
+ (union _FP_UNION_E *)(val); \
+ \
+ X##_f[2] = 0; X##_f[3] = 0; \
+ X##_f[0] = _flo->bits.frac0; \
+ X##_f[1] = _flo->bits.frac1; \
+ X##_e = _flo->bits.exp; \
+ X##_s = _flo->bits.sign; \
+ if (!X##_e && (X##_f[1] || X##_f[0]) \
+ && !(X##_f[1] & _FP_IMPLBIT_E)) \
+ { \
+ X##_e++; \
+ FP_SET_EXCEPTION(FP_EX_DENORM); \
+ } \
+ } while (0)
+
+#define FP_PACK_RAW_E(val, X) \
+ do { \
+ union _FP_UNION_E _flo; \
+ \
+ if (X##_e) X##_f[1] |= _FP_IMPLBIT_E; \
+ else X##_f[1] &= ~(_FP_IMPLBIT_E); \
+ _flo.bits.frac0 = X##_f[0]; \
+ _flo.bits.frac1 = X##_f[1]; \
+ _flo.bits.exp = X##_e; \
+ _flo.bits.sign = X##_s; \
+ \
+ (val) = _flo.flt; \
+ } while (0)
+
+#define FP_PACK_RAW_EP(val, X) \
+ do { \
+ if (!FP_INHIBIT_RESULTS) \
+ { \
+ union _FP_UNION_E *_flo = \
+ (union _FP_UNION_E *)(val); \
+ \
+ if (X##_e) X##_f[1] |= _FP_IMPLBIT_E; \
+ else X##_f[1] &= ~(_FP_IMPLBIT_E); \
+ _flo->bits.frac0 = X##_f[0]; \
+ _flo->bits.frac1 = X##_f[1]; \
+ _flo->bits.exp = X##_e; \
+ _flo->bits.sign = X##_s; \
+ } \
+ } while (0)
+
+#define FP_UNPACK_E(X,val) \
+ do { \
+ FP_UNPACK_RAW_E(X,val); \
+ _FP_UNPACK_CANONICAL(E,4,X); \
+ } while (0)
+
+#define FP_UNPACK_EP(X,val) \
+ do { \
+ FP_UNPACK_RAW_2_P(X,val); \
+ _FP_UNPACK_CANONICAL(E,4,X); \
+ } while (0)
+
+#define FP_PACK_E(val,X) \
+ do { \
+ _FP_PACK_CANONICAL(E,4,X); \
+ FP_PACK_RAW_E(val,X); \
+ } while (0)
+
+#define FP_PACK_EP(val,X) \
+ do { \
+ _FP_PACK_CANONICAL(E,4,X); \
+ FP_PACK_RAW_EP(val,X); \
+ } while (0)
+
+#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,4,X)
+#define FP_NEG_E(R,X) _FP_NEG(E,4,R,X)
+#define FP_ADD_E(R,X,Y) _FP_ADD(E,4,R,X,Y)
+#define FP_SUB_E(R,X,Y) _FP_SUB(E,4,R,X,Y)
+#define FP_MUL_E(R,X,Y) _FP_MUL(E,4,R,X,Y)
+#define FP_DIV_E(R,X,Y) _FP_DIV(E,4,R,X,Y)
+#define FP_SQRT_E(R,X) _FP_SQRT(E,4,R,X)
+
+/*
+ * Square root algorithms:
+ * We have just one right now, maybe Newton approximation
+ * should be added for those machines where division is fast.
+ * This has special _E version because standard _4 square
+ * root would not work (it has to start normally with the
+ * second word and not the first), but as we have to do it
+ * anyway, we optimize it by doing most of the calculations
+ * in two UWtype registers instead of four.
+ */
+
+#define _FP_SQRT_MEAT_E(R, S, T, X, q) \
+ do { \
+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \
+ _FP_FRAC_SRL_4(X, (_FP_WORKBITS)); \
+ while (q) \
+ { \
+ T##_f[1] = S##_f[1] + q; \
+ if (T##_f[1] <= X##_f[1]) \
+ { \
+ S##_f[1] = T##_f[1] + q; \
+ X##_f[1] -= T##_f[1]; \
+ R##_f[1] += q; \
+ } \
+ _FP_FRAC_SLL_2(X, 1); \
+ q >>= 1; \
+ } \
+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \
+ while (q) \
+ { \
+ T##_f[0] = S##_f[0] + q; \
+ T##_f[1] = S##_f[1]; \
+ if (T##_f[1] < X##_f[1] || \
+ (T##_f[1] == X##_f[1] && \
+ T##_f[0] <= X##_f[0])) \
+ { \
+ S##_f[0] = T##_f[0] + q; \
+ S##_f[1] += (T##_f[0] > S##_f[0]); \
+ _FP_FRAC_DEC_2(X, T); \
+ R##_f[0] += q; \
+ } \
+ _FP_FRAC_SLL_2(X, 1); \
+ q >>= 1; \
+ } \
+ _FP_FRAC_SLL_4(R, (_FP_WORKBITS)); \
+ if (X##_f[0] | X##_f[1]) \
+ { \
+ if (S##_f[1] < X##_f[1] || \
+ (S##_f[1] == X##_f[1] && \
+ S##_f[0] < X##_f[0])) \
+ R##_f[0] |= _FP_WORK_ROUND; \
+ R##_f[0] |= _FP_WORK_STICKY; \
+ } \
+ } while (0)
+
+#define FP_CMP_E(r,X,Y,un) _FP_CMP(E,4,r,X,Y,un)
+#define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,4,r,X,Y)
+
+#define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,4,r,X,rsz,rsg)
+#define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,4,X,r,rs,rt)
+
+#define _FP_FRAC_HIGH_E(X) (X##_f[2])
+#define _FP_FRAC_HIGH_RAW_E(X) (X##_f[1])
+
+#else /* not _FP_W_TYPE_SIZE < 64 */
+union _FP_UNION_E
+{
+ long double flt /* __attribute__((mode(TF))) */ ;
+ struct {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned long pad : (_FP_W_TYPE_SIZE - 1 - _FP_EXPBITS_E);
+ unsigned sign : 1;
+ unsigned exp : _FP_EXPBITS_E;
+ unsigned long frac : _FP_W_TYPE_SIZE;
+#else
+ unsigned long frac : _FP_W_TYPE_SIZE;
+ unsigned exp : _FP_EXPBITS_E;
+ unsigned sign : 1;
+#endif
+ } bits;
+};
+
+#define FP_DECL_E(X) _FP_DECL(2,X)
+
+#define FP_UNPACK_RAW_E(X, val) \
+ do { \
+ union _FP_UNION_E _flo; _flo.flt = (val); \
+ \
+ X##_f0 = _flo.bits.frac; \
+ X##_f1 = 0; \
+ X##_e = _flo.bits.exp; \
+ X##_s = _flo.bits.sign; \
+ if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \
+ { \
+ X##_e++; \
+ FP_SET_EXCEPTION(FP_EX_DENORM); \
+ } \
+ } while (0)
+
+#define FP_UNPACK_RAW_EP(X, val) \
+ do { \
+ union _FP_UNION_E *_flo = \
+ (union _FP_UNION_E *)(val); \
+ \
+ X##_f0 = _flo->bits.frac; \
+ X##_f1 = 0; \
+ X##_e = _flo->bits.exp; \
+ X##_s = _flo->bits.sign; \
+ if (!X##_e && X##_f0 && !(X##_f0 & _FP_IMPLBIT_E)) \
+ { \
+ X##_e++; \
+ FP_SET_EXCEPTION(FP_EX_DENORM); \
+ } \
+ } while (0)
+
+#define FP_PACK_RAW_E(val, X) \
+ do { \
+ union _FP_UNION_E _flo; \
+ \
+ if (X##_e) X##_f0 |= _FP_IMPLBIT_E; \
+ else X##_f0 &= ~(_FP_IMPLBIT_E); \
+ _flo.bits.frac = X##_f0; \
+ _flo.bits.exp = X##_e; \
+ _flo.bits.sign = X##_s; \
+ \
+ (val) = _flo.flt; \
+ } while (0)
+
+#define FP_PACK_RAW_EP(fs, val, X) \
+ do { \
+ if (!FP_INHIBIT_RESULTS) \
+ { \
+ union _FP_UNION_E *_flo = \
+ (union _FP_UNION_E *)(val); \
+ \
+ if (X##_e) X##_f0 |= _FP_IMPLBIT_E; \
+ else X##_f0 &= ~(_FP_IMPLBIT_E); \
+ _flo->bits.frac = X##_f0; \
+ _flo->bits.exp = X##_e; \
+ _flo->bits.sign = X##_s; \
+ } \
+ } while (0)
+
+
+#define FP_UNPACK_E(X,val) \
+ do { \
+ FP_UNPACK_RAW_E(X,val); \
+ _FP_UNPACK_CANONICAL(E,2,X); \
+ } while (0)
+
+#define FP_UNPACK_EP(X,val) \
+ do { \
+ FP_UNPACK_RAW_EP(X,val); \
+ _FP_UNPACK_CANONICAL(E,2,X); \
+ } while (0)
+
+#define FP_PACK_E(val,X) \
+ do { \
+ _FP_PACK_CANONICAL(E,2,X); \
+ FP_PACK_RAW_E(val,X); \
+ } while (0)
+
+#define FP_PACK_EP(val,X) \
+ do { \
+ _FP_PACK_CANONICAL(E,2,X); \
+ FP_PACK_RAW_EP(val,X); \
+ } while (0)
+
+#define FP_ISSIGNAN_E(X) _FP_ISSIGNAN(E,2,X)
+#define FP_NEG_E(R,X) _FP_NEG(E,2,R,X)
+#define FP_ADD_E(R,X,Y) _FP_ADD(E,2,R,X,Y)
+#define FP_SUB_E(R,X,Y) _FP_SUB(E,2,R,X,Y)
+#define FP_MUL_E(R,X,Y) _FP_MUL(E,2,R,X,Y)
+#define FP_DIV_E(R,X,Y) _FP_DIV(E,2,R,X,Y)
+#define FP_SQRT_E(R,X) _FP_SQRT(E,2,R,X)
+
+/*
+ * Square root algorithms:
+ * We have just one right now, maybe Newton approximation
+ * should be added for those machines where division is fast.
+ * We optimize it by doing most of the calculations
+ * in one UWtype registers instead of two, although we don't
+ * have to.
+ */
+#define _FP_SQRT_MEAT_E(R, S, T, X, q) \
+ do { \
+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \
+ _FP_FRAC_SRL_2(X, (_FP_WORKBITS)); \
+ while (q) \
+ { \
+ T##_f0 = S##_f0 + q; \
+ if (T##_f0 <= X##_f0) \
+ { \
+ S##_f0 = T##_f0 + q; \
+ X##_f0 -= T##_f0; \
+ R##_f0 += q; \
+ } \
+ _FP_FRAC_SLL_1(X, 1); \
+ q >>= 1; \
+ } \
+ _FP_FRAC_SLL_2(R, (_FP_WORKBITS)); \
+ if (X##_f0) \
+ { \
+ if (S##_f0 < X##_f0) \
+ R##_f0 |= _FP_WORK_ROUND; \
+ R##_f0 |= _FP_WORK_STICKY; \
+ } \
+ } while (0)
+
+#define FP_CMP_E(r,X,Y,un) _FP_CMP(E,2,r,X,Y,un)
+#define FP_CMP_EQ_E(r,X,Y) _FP_CMP_EQ(E,2,r,X,Y)
+
+#define FP_TO_INT_E(r,X,rsz,rsg) _FP_TO_INT(E,2,r,X,rsz,rsg)
+#define FP_FROM_INT_E(X,r,rs,rt) _FP_FROM_INT(E,2,X,r,rs,rt)
+
+#define _FP_FRAC_HIGH_E(X) (X##_f1)
+#define _FP_FRAC_HIGH_RAW_E(X) (X##_f0)
+
+#endif /* not _FP_W_TYPE_SIZE < 64 */
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fabsq.c linux/arch/sparc64/math-emu/fabsq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fabsq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fabsq.c Sat May 29 11:09:04 1999
@@ -1,3 +1,10 @@
+/* $Id: fabsq.c,v 1.5 1999/05/28 13:42:27 jj Exp $
+ * arch/sparc64/math-emu/fabsq.c
+ *
+ * Copyright (C) 1997 Jakub Jelinek (j...@ultra.linux.cz)
+ *
+ */
+
X int FABSQ(unsigned long *rd, unsigned long *rs2)
X {
X rd[0] = rs2[0] & 0x7fffffffffffffffUL;
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/faddd.c linux/arch/sparc64/math-emu/faddd.c
--- v2.3.3/linux/arch/sparc64/math-emu/faddd.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/faddd.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: faddd.c,v 1.4 1999/05/28 13:43:17 jj Exp $
+ * arch/sparc64/math-emu/faddd.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
X int FADDD(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
X
- __FP_UNPACK_D(A, rs1);
- __FP_UNPACK_D(B, rs2);
+ FP_UNPACK_DP(A, rs1);
+ FP_UNPACK_DP(B, rs2);
X FP_ADD_D(R, A, B);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/faddq.c linux/arch/sparc64/math-emu/faddq.c
--- v2.3.3/linux/arch/sparc64/math-emu/faddq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/faddq.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: faddq.c,v 1.4 1999/05/28 13:43:19 jj Exp $
+ * arch/sparc64/math-emu/faddq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FADDQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R);
X
- __FP_UNPACK_Q(A, rs1);
- __FP_UNPACK_Q(B, rs2);
+ FP_UNPACK_QP(A, rs1);
+ FP_UNPACK_QP(B, rs2);
X FP_ADD_Q(R, A, B);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fadds.c linux/arch/sparc64/math-emu/fadds.c
--- v2.3.3/linux/arch/sparc64/math-emu/fadds.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fadds.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fadds.c,v 1.4 1999/05/28 13:43:25 jj Exp $
+ * arch/sparc64/math-emu/fadds.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
X int FADDS(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
X
- __FP_UNPACK_S(A, rs1);
- __FP_UNPACK_S(B, rs2);
+ FP_UNPACK_SP(A, rs1);
+ FP_UNPACK_SP(B, rs2);
X FP_ADD_S(R, A, B);
- return __FP_PACK_S(rd, R);
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fcmpeq.c linux/arch/sparc64/math-emu/fcmpeq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fcmpeq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fcmpeq.c Sat May 29 11:09:04 1999
@@ -1,25 +1,39 @@
+/* $Id: fcmpeq.c,v 1.5 1999/05/28 13:43:29 jj Exp $
+ * arch/sparc64/math-emu/fcmpeq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FCMPEQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(B);
X long ret;
- int fccno = ((long)rd) & 3;
+ long fccno = (long)rd;
X unsigned long fsr;
X
- rd = (void *)(((long)rd)&~3);
- __FP_UNPACK_Q(A, rs1);
- __FP_UNPACK_Q(B, rs2);
+ FP_UNPACK_RAW_QP(A, rs1);
+ FP_UNPACK_RAW_QP(B, rs2);
X FP_CMP_Q(ret, B, A, 3);
- if (ret == -1) ret = 2;
- fsr = *(unsigned long *)rd;
- switch (fccno) {
- case 0: fsr &= ~0xc00; fsr |= (ret << 10); break;
- case 1: fsr &= ~0x300000000UL; fsr |= (ret << 32); break;
- case 2: fsr &= ~0xc00000000UL; fsr |= (ret << 34); break;
- case 3: fsr &= ~0x3000000000UL; fsr |= (ret << 36); break;
+ if (ret == 3)
+ FP_SET_EXCEPTION(FP_EX_INVALID);
+ if (!FP_INHIBIT_RESULTS) {
+ rd = (void *)(((long)rd)&~3);
+ if (ret == -1) ret = 2;
+ fsr = current->tss.xfsr[0];
+ switch (fccno) {
+ case 0: fsr &= ~0xc00; fsr |= (ret << 10); break;
+ case 1: fsr &= ~0x300000000UL; fsr |= (ret << 32); break;
+ case 2: fsr &= ~0xc00000000UL; fsr |= (ret << 34); break;
+ case 3: fsr &= ~0x3000000000UL; fsr |= (ret << 36); break;
+ }
+ current->tss.xfsr[0] = fsr;
X }
- *(unsigned long *)rd = fsr;
- return 0;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fcmpq.c linux/arch/sparc64/math-emu/fcmpq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fcmpq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fcmpq.c Sat May 29 11:09:04 1999
@@ -1,25 +1,39 @@
+/* $Id: fcmpq.c,v 1.5 1999/05/28 13:43:33 jj Exp $
+ * arch/sparc64/math-emu/fcmpq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FCMPQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(B);
X long ret;
- int fccno = ((long)rd) & 3;
+ long fccno = (long)rd;
X unsigned long fsr;
X
- rd = (void *)(((long)rd)&~3);
- __FP_UNPACK_Q(A, rs1);
- __FP_UNPACK_Q(B, rs2);
+ FP_UNPACK_RAW_QP(A, rs1);
+ FP_UNPACK_RAW_QP(B, rs2);
X FP_CMP_Q(ret, B, A, 3);
- if (ret == -1) ret = 2;
- fsr = *(unsigned long *)rd;
- switch (fccno) {
- case 0: fsr &= ~0xc00; fsr |= (ret << 10); break;
- case 1: fsr &= ~0x300000000UL; fsr |= (ret << 32); break;
- case 2: fsr &= ~0xc00000000UL; fsr |= (ret << 34); break;
- case 3: fsr &= ~0x3000000000UL; fsr |= (ret << 36); break;
+ if (ret == 3 && (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B)))
+ FP_SET_EXCEPTION(FP_EX_INVALID);
+ if (!FP_INHIBIT_RESULTS) {
+ rd = (void *)(((long)rd)&~3);
+ if (ret == -1) ret = 2;
+ fsr = current->tss.xfsr[0];
+ switch (fccno) {
+ case 0: fsr &= ~0xc00; fsr |= (ret << 10); break;
+ case 1: fsr &= ~0x300000000UL; fsr |= (ret << 32); break;
+ case 2: fsr &= ~0xc00000000UL; fsr |= (ret << 34); break;
+ case 3: fsr &= ~0x3000000000UL; fsr |= (ret << 36); break;
+ }
+ current->tss.xfsr[0] = fsr;
X }
- *(unsigned long *)rd = fsr;
- return 0;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdivd.c linux/arch/sparc64/math-emu/fdivd.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdivd.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdivd.c Sat May 29 11:09:04 1999
@@ -1,19 +1,23 @@
+/* $Id: fdivd.c,v 1.4 1999/05/28 13:43:36 jj Exp $
+ * arch/sparc64/math-emu/fdivd.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
X int FDIVD(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
- int ret = 0;
X
- __FP_UNPACK_D(A, rs1);
- __FP_UNPACK_D(B, rs2);
- if(B_c == FP_CLS_ZERO &&
- A_c != FP_CLS_ZERO) {
- ret |= EFLAG_DIVZERO;
- if(__FPU_TRAP_P(EFLAG_DIVZERO))
- return ret;
- }
+ FP_UNPACK_DP(A, rs1);
+ FP_UNPACK_DP(B, rs2);
X FP_DIV_D(R, A, B);
- return (ret | __FP_PACK_D(rd, R));
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdivq.c linux/arch/sparc64/math-emu/fdivq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdivq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdivq.c Sat May 29 11:09:04 1999
@@ -1,19 +1,23 @@
+/* $Id: fdivq.c,v 1.4 1999/05/28 13:43:41 jj Exp $
+ * arch/sparc64/math-emu/fdivq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FDIVQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R);
- int ret;
X
- __FP_UNPACK_Q(A, rs1);
- __FP_UNPACK_Q(B, rs2);
- if(B_c == FP_CLS_ZERO &&
- A_c != FP_CLS_ZERO) {
- ret |= EFLAG_DIVZERO;
- if(__FPU_TRAP_P(EFLAG_DIVZERO))
- return ret;
- }
+ FP_UNPACK_QP(A, rs1);
+ FP_UNPACK_QP(B, rs2);
X FP_DIV_Q(R, A, B);
- return (ret | __FP_PACK_Q(rd, R));
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdivs.c linux/arch/sparc64/math-emu/fdivs.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdivs.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdivs.c Sat May 29 11:09:04 1999
@@ -1,20 +1,24 @@
+/* $Id: fdivs.c,v 1.4 1999/05/28 13:43:45 jj Exp $
+ * arch/sparc64/math-emu/fdivs.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
X int FDIVS(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
- int ret = 0;
X
- __FP_UNPACK_S(A, rs1);
- __FP_UNPACK_S(B, rs2);
- if(B_c == FP_CLS_ZERO &&
- A_c != FP_CLS_ZERO) {
- ret |= EFLAG_DIVZERO;
- if(__FPU_TRAP_P(EFLAG_DIVZERO))
- return ret;
- }
+ FP_UNPACK_SP(A, rs1);
+ FP_UNPACK_SP(B, rs2);
X FP_DIV_S(R, A, B);
- return (ret | __FP_PACK_S(rd, R));
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
X
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdmulq.c linux/arch/sparc64/math-emu/fdmulq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdmulq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdmulq.c Sat May 29 11:09:04 1999
@@ -1,15 +1,26 @@
+/* $Id: fdmulq.c,v 1.4 1999/05/28 13:43:48 jj Exp $
+ * arch/sparc64/math-emu/fdmulq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X #include "double.h"
X
X int FDMULQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_D(IN); FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R);
X
- __FP_UNPACK_D(IN, rs1);
+ FP_UNPACK_DP(IN, rs1);
X FP_CONV(Q,D,2,1,A,IN);
- __FP_UNPACK_D(IN, rs2);
+ FP_UNPACK_DP(IN, rs2);
X FP_CONV(Q,D,2,1,B,IN);
X FP_MUL_Q(R, A, B);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdtoi.c linux/arch/sparc64/math-emu/fdtoi.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdtoi.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdtoi.c Sat May 29 11:09:04 1999
@@ -1,13 +1,25 @@
+/* $Id: fdtoi.c,v 1.3 1999/05/28 13:43:52 jj Exp $
+ * arch/sparc64/math-emu/fdtoi.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
-int FDTOI(unsigned *rd, void *rs2)
+int FDTOI(int *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_D(A);
- unsigned r;
+ int r;
X
- __FP_UNPACK_D(A, rs2);
+ FP_UNPACK_DP(A, rs2);
X FP_TO_INT_D(r, A, 32, 1);
- *rd = r;
- return 0;
+ if (!FP_INHIBIT_RESULTS)
+ *rd = r;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdtoq.c linux/arch/sparc64/math-emu/fdtoq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdtoq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdtoq.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fdtoq.c,v 1.4 1999/05/28 13:43:56 jj Exp $
+ * arch/sparc64/math-emu/fdtoq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X #include "double.h"
X
X int FDTOQ(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_Q(R);
X
- __FP_UNPACK_D(A, rs2);
+ FP_UNPACK_DP(A, rs2);
X FP_CONV(Q,D,2,1,R,A);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdtos.c linux/arch/sparc64/math-emu/fdtos.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdtos.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdtos.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fdtos.c,v 1.4 1999/05/28 13:43:58 jj Exp $
+ * arch/sparc64/math-emu/fdtos.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X #include "single.h"
X
X int FDTOS(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_S(R);
X
- __FP_UNPACK_D(A, rs2);
+ FP_UNPACK_DP(A, rs2);
X FP_CONV(S,D,1,1,R,A);
- return __FP_PACK_S(rd, R);
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fdtox.c linux/arch/sparc64/math-emu/fdtox.c
--- v2.3.3/linux/arch/sparc64/math-emu/fdtox.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fdtox.c Sat May 29 11:09:04 1999
@@ -1,13 +1,25 @@
+/* $Id: fdtox.c,v 1.3 1999/05/28 13:44:02 jj Exp $
+ * arch/sparc64/math-emu/fdtox.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
-int FDTOX(unsigned long *rd, void *rs2)
+int FDTOX(long *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_D(A);
- unsigned long r;
+ long r;
X
- __FP_UNPACK_D(A, rs2);
+ FP_UNPACK_DP(A, rs2);
X FP_TO_INT_D(r, A, 64, 1);
- *rd = r;
- return 0;
+ if (!FP_INHIBIT_RESULTS)
+ *rd = r;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fitoq.c linux/arch/sparc64/math-emu/fitoq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fitoq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fitoq.c Sat May 29 11:09:04 1999
@@ -1,11 +1,22 @@
+/* $Id: fitoq.c,v 1.5 1999/05/28 13:44:06 jj Exp $
+ * arch/sparc64/math-emu/fitoq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FITOQ(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(R);
X int a = *(int *)rs2;
X
X FP_FROM_INT_Q(R, a, 32, int);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ return 0;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fmovq.c linux/arch/sparc64/math-emu/fmovq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fmovq.c Mon Jan 12 15:15:44 1998
+++ linux/arch/sparc64/math-emu/fmovq.c Sat May 29 11:09:04 1999
@@ -1,3 +1,10 @@
+/* $Id: fmovq.c,v 1.2 1999/05/28 13:44:09 jj Exp $
+ * arch/sparc64/math-emu/fmovq.c
+ *
+ * Copyright (C) 1997 Jakub Jelinek (j...@ultra.linux.cz)
+ *
+ */
+
X int FMOVQ(unsigned long *rd, unsigned long *rs2)
X {
X rd[0] = rs2[0];
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fmuld.c linux/arch/sparc64/math-emu/fmuld.c
--- v2.3.3/linux/arch/sparc64/math-emu/fmuld.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fmuld.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fmuld.c,v 1.4 1999/05/28 13:44:11 jj Exp $
+ * arch/sparc64/math-emu/fmuld.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
X int FMULD(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
X
- __FP_UNPACK_D(A, rs1);
- __FP_UNPACK_D(B, rs2);
+ FP_UNPACK_DP(A, rs1);
+ FP_UNPACK_DP(B, rs2);
X FP_MUL_D(R, A, B);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fmulq.c linux/arch/sparc64/math-emu/fmulq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fmulq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fmulq.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fmulq.c,v 1.4 1999/05/28 13:44:14 jj Exp $
+ * arch/sparc64/math-emu/fmulq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FMULQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R);
X
- __FP_UNPACK_Q(A, rs1);
- __FP_UNPACK_Q(B, rs2);
+ FP_UNPACK_QP(A, rs1);
+ FP_UNPACK_QP(B, rs2);
X FP_MUL_Q(R, A, B);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fmuls.c linux/arch/sparc64/math-emu/fmuls.c
--- v2.3.3/linux/arch/sparc64/math-emu/fmuls.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fmuls.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fmuls.c,v 1.4 1999/05/28 13:44:18 jj Exp $
+ * arch/sparc64/math-emu/fmuls.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
X int FMULS(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
X
- __FP_UNPACK_S(A, rs1);
- __FP_UNPACK_S(B, rs2);
+ FP_UNPACK_SP(A, rs1);
+ FP_UNPACK_SP(B, rs2);
X FP_MUL_S(R, A, B);
- return __FP_PACK_S(rd, R);
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fnegq.c linux/arch/sparc64/math-emu/fnegq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fnegq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fnegq.c Sat May 29 11:09:04 1999
@@ -1,7 +1,13 @@
+/* $Id: fnegq.c,v 1.6 1999/05/28 13:44:21 jj Exp $
+ * arch/sparc64/math-emu/fnegq.c
+ *
+ * Copyright (C) 1997 Jakub Jelinek (j...@ultra.linux.cz)
+ *
+ */
+
X int FNEGQ(unsigned long *rd, unsigned long *rs2)
X {
X rd[0] = rs2[0] ^ 0x8000000000000000UL;
X rd[1] = rs2[1];
X return 0;
X }
-
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fqtod.c linux/arch/sparc64/math-emu/fqtod.c
--- v2.3.3/linux/arch/sparc64/math-emu/fqtod.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fqtod.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fqtod.c,v 1.4 1999/05/28 13:44:24 jj Exp $
+ * arch/sparc64/math-emu/fqtod.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X #include "double.h"
X
X int FQTOD(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_D(R);
X
- __FP_UNPACK_Q(A, rs2);
+ FP_UNPACK_QP(A, rs2);
X FP_CONV(D,Q,1,2,R,A);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fqtoi.c linux/arch/sparc64/math-emu/fqtoi.c
--- v2.3.3/linux/arch/sparc64/math-emu/fqtoi.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fqtoi.c Sat May 29 11:09:04 1999
@@ -1,13 +1,25 @@
+/* $Id: fqtoi.c,v 1.4 1999/05/28 13:44:26 jj Exp $
+ * arch/sparc64/math-emu/fqtoi.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
-int FQTOI(unsigned *rd, void *rs2)
+int FQTOI(int *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A);
- unsigned r;
+ int r;
X
- __FP_UNPACK_Q(A, rs2);
+ FP_UNPACK_QP(A, rs2);
X FP_TO_INT_Q(r, A, 32, 1);
- *rd = r;
- return 0;
+ if (!FP_INHIBIT_RESULTS)
+ *rd = r;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fqtos.c linux/arch/sparc64/math-emu/fqtos.c
--- v2.3.3/linux/arch/sparc64/math-emu/fqtos.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fqtos.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fqtos.c,v 1.4 1999/05/28 13:44:30 jj Exp $
+ * arch/sparc64/math-emu/fqtos.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X #include "single.h"
X
X int FQTOS(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_S(R);
X
- __FP_UNPACK_Q(A, rs2);
+ FP_UNPACK_QP(A, rs2);
X FP_CONV(S,Q,1,2,R,A);
- return __FP_PACK_S(rd, R);
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fqtox.c linux/arch/sparc64/math-emu/fqtox.c
--- v2.3.3/linux/arch/sparc64/math-emu/fqtox.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fqtox.c Sat May 29 11:09:04 1999
@@ -1,13 +1,25 @@
+/* $Id: fqtox.c,v 1.4 1999/05/28 13:44:34 jj Exp $
+ * arch/sparc64/math-emu/fqtox.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
-int FQTOX(unsigned long *rd, void *rs2)
+int FQTOX(long *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A);
- unsigned long r;
+ long r;
X
- __FP_UNPACK_Q(A, rs2);
+ FP_UNPACK_QP(A, rs2);
X FP_TO_INT_Q(r, A, 64, 1);
- *rd = r;
- return 0;
+ if (!FP_INHIBIT_RESULTS)
+ *rd = r;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsmuld.c linux/arch/sparc64/math-emu/fsmuld.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsmuld.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsmuld.c Sat May 29 11:09:04 1999
@@ -1,15 +1,26 @@
+/* $Id: fsmuld.c,v 1.4 1999/05/28 13:44:37 jj Exp $
+ * arch/sparc64/math-emu/fsmuld.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X #include "single.h"
X
X int FSMULD(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_S(IN); FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
X
- __FP_UNPACK_S(IN, rs1);
+ FP_UNPACK_SP(IN, rs1);
X FP_CONV(D,S,1,1,A,IN);
- __FP_UNPACK_S(IN, rs2);
+ FP_UNPACK_SP(IN, rs2);
X FP_CONV(D,S,1,1,B,IN);
X FP_MUL_D(R, A, B);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsqrtd.c linux/arch/sparc64/math-emu/fsqrtd.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsqrtd.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsqrtd.c Sat May 29 11:09:04 1999
@@ -1,11 +1,22 @@
+/* $Id: fsqrtd.c,v 1.4 1999/05/28 13:44:39 jj Exp $
+ * arch/sparc64/math-emu/fsqrtd.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
X int FSQRTD(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_D(R);
X
- __FP_UNPACK_D(A, rs2);
+ FP_UNPACK_DP(A, rs2);
X FP_SQRT_D(R, A);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsqrtq.c linux/arch/sparc64/math-emu/fsqrtq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsqrtq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsqrtq.c Sat May 29 11:09:04 1999
@@ -1,11 +1,22 @@
+/* $Id: fsqrtq.c,v 1.5 1999/05/28 13:44:44 jj Exp $
+ * arch/sparc64/math-emu/fsqrtq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FSQRTQ(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(R);
X
- __FP_UNPACK_Q(A, rs2);
+ FP_UNPACK_QP(A, rs2);
X FP_SQRT_Q(R, A);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsqrts.c linux/arch/sparc64/math-emu/fsqrts.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsqrts.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsqrts.c Sat May 29 11:09:04 1999
@@ -1,11 +1,22 @@
+/* $Id: fsqrts.c,v 1.4 1999/05/28 13:44:48 jj Exp $
+ * arch/sparc64/math-emu/fsqrts.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
X int FSQRTS(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_S(R);
X
- __FP_UNPACK_S(A, rs2);
+ FP_UNPACK_SP(A, rs2);
X FP_SQRT_S(R, A);
- return __FP_PACK_S(rd, R);
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fstod.c linux/arch/sparc64/math-emu/fstod.c
--- v2.3.3/linux/arch/sparc64/math-emu/fstod.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fstod.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fstod.c,v 1.4 1999/05/28 13:44:51 jj Exp $
+ * arch/sparc64/math-emu/fstod.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X #include "single.h"
X
X int FSTOD(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_D(R);
X
- __FP_UNPACK_S(A, rs2);
+ FP_UNPACK_SP(A, rs2);
X FP_CONV(D,S,1,1,R,A);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fstoi.c linux/arch/sparc64/math-emu/fstoi.c
--- v2.3.3/linux/arch/sparc64/math-emu/fstoi.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fstoi.c Sat May 29 11:09:04 1999
@@ -1,13 +1,25 @@
+/* $Id: fstoi.c,v 1.3 1999/05/28 13:44:54 jj Exp $
+ * arch/sparc64/math-emu/fstoi.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
-int FSTOI(unsigned *rd, void *rs2)
+int FSTOI(int *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_S(A);
- unsigned r;
+ int r;
X
- __FP_UNPACK_S(A, rs2);
+ FP_UNPACK_SP(A, rs2);
X FP_TO_INT_S(r, A, 32, 1);
- *rd = r;
- return 0;
+ if (!FP_INHIBIT_RESULTS)
+ *rd = r;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fstoq.c linux/arch/sparc64/math-emu/fstoq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fstoq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fstoq.c Sat May 29 11:09:04 1999
@@ -1,12 +1,23 @@
+/* $Id: fstoq.c,v 1.4 1999/05/28 13:44:58 jj Exp $
+ * arch/sparc64/math-emu/fstoq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X #include "single.h"
X
X int FSTOQ(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_Q(R);
X
- __FP_UNPACK_S(A, rs2);
+ FP_UNPACK_SP(A, rs2);
X FP_CONV(Q,S,2,1,R,A);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fstox.c linux/arch/sparc64/math-emu/fstox.c
--- v2.3.3/linux/arch/sparc64/math-emu/fstox.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fstox.c Sat May 29 11:09:04 1999
@@ -1,13 +1,25 @@
+/* $Id: fstox.c,v 1.3 1999/05/28 13:45:01 jj Exp $
+ * arch/sparc64/math-emu/fstox.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
-int FSTOX(unsigned long *rd, void *rs2)
+int FSTOX(long *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_S(A);
- unsigned long r;
+ long r;
X
- __FP_UNPACK_S(A, rs2);
+ FP_UNPACK_SP(A, rs2);
X FP_TO_INT_S(r, A, 64, 1);
- *rd = r;
- return 0;
+ if (!FP_INHIBIT_RESULTS)
+ *rd = r;
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsubd.c linux/arch/sparc64/math-emu/fsubd.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsubd.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsubd.c Sat May 29 11:09:04 1999
@@ -1,14 +1,25 @@
+/* $Id: fsubd.c,v 1.4 1999/05/28 13:45:04 jj Exp $
+ * arch/sparc64/math-emu/fsubd.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "double.h"
X
X int FSUBD(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_D(A); FP_DECL_D(B); FP_DECL_D(R);
X
- __FP_UNPACK_D(A, rs1);
- __FP_UNPACK_D(B, rs2);
+ FP_UNPACK_DP(A, rs1);
+ FP_UNPACK_DP(B, rs2);
X if (B_c != FP_CLS_NAN)
X B_s ^= 1;
X FP_ADD_D(R, A, B);
- return __FP_PACK_D(rd, R);
+ FP_PACK_DP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsubq.c linux/arch/sparc64/math-emu/fsubq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsubq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsubq.c Sat May 29 11:09:04 1999
@@ -1,14 +1,25 @@
+/* $Id: fsubq.c,v 1.4 1999/05/28 13:45:09 jj Exp $
+ * arch/sparc64/math-emu/fsubq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FSUBQ(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(R);
X
- __FP_UNPACK_Q(A, rs1);
- __FP_UNPACK_Q(B, rs2);
+ FP_UNPACK_QP(A, rs1);
+ FP_UNPACK_QP(B, rs2);
X if (B_c != FP_CLS_NAN)
X B_s ^= 1;
X FP_ADD_Q(R, A, B);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fsubs.c linux/arch/sparc64/math-emu/fsubs.c
--- v2.3.3/linux/arch/sparc64/math-emu/fsubs.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fsubs.c Sat May 29 11:09:04 1999
@@ -1,14 +1,25 @@
+/* $Id: fsubs.c,v 1.4 1999/05/28 13:45:12 jj Exp $
+ * arch/sparc64/math-emu/fsubs.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "single.h"
X
X int FSUBS(void *rd, void *rs2, void *rs1)
X {
+ FP_DECL_EX;
X FP_DECL_S(A); FP_DECL_S(B); FP_DECL_S(R);
X
- __FP_UNPACK_S(A, rs1);
- __FP_UNPACK_S(B, rs2);
+ FP_UNPACK_SP(A, rs1);
+ FP_UNPACK_SP(B, rs2);
X if (B_c != FP_CLS_NAN)
X B_s ^= 1;
X FP_ADD_S(R, A, B);
- return __FP_PACK_S(rd, R);
+ FP_PACK_SP(rd, R);
+ FP_HANDLE_EXCEPTIONS;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/fxtoq.c linux/arch/sparc64/math-emu/fxtoq.c
--- v2.3.3/linux/arch/sparc64/math-emu/fxtoq.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/fxtoq.c Sat May 29 11:09:04 1999
@@ -1,11 +1,22 @@
+/* $Id: fxtoq.c,v 1.5 1999/05/28 13:45:15 jj Exp $
+ * arch/sparc64/math-emu/fxtoq.c
+ *
+ * Copyright (C) 1997, 1999 Jakub Jelinek (j...@ultra.linux.cz)
+ * Copyright (C) 1999 David S. Miller (da...@redhat.com)
+ *
+ */
+
+#include "sfp-util.h"
X #include "soft-fp.h"
X #include "quad.h"
X
X int FXTOQ(void *rd, void *rs2)
X {
+ FP_DECL_EX;
X FP_DECL_Q(R);
X long a = *(long *)rs2;
X
X FP_FROM_INT_Q(R, a, 64, long);
- return __FP_PACK_Q(rd, R);
+ FP_PACK_QP(rd, R);
+ return 0;
X }
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/math.c linux/arch/sparc64/math-emu/math.c
--- v2.3.3/linux/arch/sparc64/math-emu/math.c Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/math.c Sat May 29 11:09:04 1999
@@ -1,7 +1,7 @@
-/* $Id: math.c,v 1.7 1999/02/10 14:16:26 davem Exp $
+/* $Id: math.c,v 1.8 1999/05/28 13:43:11 jj Exp $
X * arch/sparc64/math-emu/math.c
X *
- * Copyright (C) 1997 Jakub Jelinek (j...@sunsite.mff.cuni.cz)
+ * Copyright (C) 1997,1999 Jakub Jelinek (j...@ultra.linux.cz)
X * Copyright (C) 1999 David S. Miller (da...@redhat.com)
X *
X * Emulation routines originate from soft-fp package, which is part
@@ -15,6 +15,7 @@
X #include <asm/ptrace.h>
X #include <asm/uaccess.h>
X
+#include "sfp-util.h"
X #include "soft-fp.h"
X
X #define FLOATFUNC(x) extern int x(void *,void *,void *);
@@ -84,46 +85,36 @@
X if(would_trap != 0) {
X eflag &= ((fsr & FSR_TEM_MASK) >> FSR_TEM_SHIFT);
X if((eflag & (eflag - 1)) != 0) {
- if(eflag & EFLAG_INVALID)
- eflag = EFLAG_INVALID;
- else if(eflag & EFLAG_DIVZERO)
- eflag = EFLAG_DIVZERO;
- else if(eflag & EFLAG_INEXACT)
- eflag = EFLAG_INEXACT;
+ if(eflag & FP_EX_INVALID)
+ eflag = FP_EX_INVALID;
+ else if(eflag & FP_EX_OVERFLOW)
+ eflag = FP_EX_OVERFLOW;
+ else if(eflag & FP_EX_UNDERFLOW)
+ eflag = FP_EX_UNDERFLOW;
+ else if(eflag & FP_EX_DIVZERO)
+ eflag = FP_EX_DIVZERO;
+ else if(eflag & FP_EX_INEXACT)
+ eflag = FP_EX_INEXACT;
X }
X }
X
- /* Set CEXC, here are the rules:
+ /* Set CEXC, here is the rule:
X *
- * 1) In general all FPU ops will set one and only one
+ * In general all FPU ops will set one and only one
X * bit in the CEXC field, this is always the case
X * when the IEEE exception trap is enabled in TEM.
- *
- * 2) As a special case, if an overflow or underflow
- * is being signalled, AND the trap is not enabled
- * in TEM, then the inexact field shall also be set.
X */
X fsr &= ~(FSR_CEXC_MASK);
- if(would_trap ||
- (eflag & (EFLAG_OVERFLOW | EFLAG_UNDERFLOW)) == 0) {
- fsr |= ((long)eflag << FSR_CEXC_SHIFT);
- } else {
- fsr |= (((long)eflag << FSR_CEXC_SHIFT) |
- (EFLAG_INEXACT << FSR_CEXC_SHIFT));
- }
+ fsr |= ((long)eflag << FSR_CEXC_SHIFT);
X
- /* Set the AEXC field, rules are:
+ /* Set the AEXC field, rule is:
X *
- * 1) If a trap would not be generated, the
+ * If a trap would not be generated, the
X * CEXC just generated is OR'd into the
X * existing value of AEXC.
- *
- * 2) When a trap is generated, AEXC is cleared.
X */
X if(would_trap == 0)
X fsr |= ((long)eflag << FSR_AEXC_SHIFT);
- else
- fsr &= ~(FSR_AEXC_MASK);
X
X /* If trapping, indicate fault trap type IEEE. */
X if(would_trap != 0)
@@ -242,7 +233,7 @@
X }
X freg = ((insn >> 25) & 0x1f);
X switch ((type >> 4) & 0x3) {
- case 0: rd = (void *)(((long)&current->tss.xfsr[0]) | (freg & 3)); break;
+ case 0: rd = (void *)(long)(freg & 3); break;
X case 3: if (freg & 2) {
X current->tss.xfsr[0] |= (6 << 14) /* invalid_fp_register */;
X goto err;
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/op-1.h linux/arch/sparc64/math-emu/op-1.h
--- v2.3.3/linux/arch/sparc64/math-emu/op-1.h Mon Jan 12 15:15:44 1998
+++ linux/arch/sparc64/math-emu/op-1.h Sat May 29 11:09:04 1999
@@ -1,6 +1,26 @@
-/*
- * Basic one-word fraction declaration and manipulation.
- */
+/* Software floating-point emulation.
+ Basic one-word fraction declaration and manipulation.
+ Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.


+ This file is part of the GNU C Library.

+ Contributed by Richard Henderson (r...@cygnus.com),
+ Jakub Jelinek (j...@ultra.linux.cz),
+ David S. Miller (da...@redhat.com) and
+ Peter Maydell (pmay...@chiark.greenend.org.uk).
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
X
X #define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f
X #define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f)
@@ -28,6 +48,7 @@
X
X #define _FP_FRAC_ADD_1(R,X,Y) (R##_f = X##_f + Y##_f)
X #define _FP_FRAC_SUB_1(R,X,Y) (R##_f = X##_f - Y##_f)
+#define _FP_FRAC_DEC_1(X,Y) (X##_f -= Y##_f)
X #define _FP_FRAC_CLZ_1(z, X) __FP_CLZ(z, X##_f)
X
X /* Predicates */
@@ -40,6 +61,7 @@
X
X #define _FP_ZEROFRAC_1 0
X #define _FP_MINFRAC_1 1
+#define _FP_MAXFRAC_1 (~(_FP_WS_TYPE)0)
X
X /*
X * Unpack the raw bits of a native fp value. Do not classify or
@@ -55,6 +77,15 @@
X X##_s = _flo.bits.sign; \
X } while (0)
X
+#define _FP_UNPACK_RAW_1_P(fs, X, val) \
+ do { \
+ union _FP_UNION_##fs *_flo = \
+ (union _FP_UNION_##fs *)(val); \
+ \
+ X##_f = _flo->bits.frac; \
+ X##_e = _flo->bits.exp; \
+ X##_s = _flo->bits.sign; \
+ } while (0)
X
X /*
X * Repack the raw bits of a native fp value.
@@ -71,6 +102,16 @@
X (val) = _flo.flt; \
X } while (0)
X
+#define _FP_PACK_RAW_1_P(fs, val, X) \
+ do { \
+ union _FP_UNION_##fs *_flo = \
+ (union _FP_UNION_##fs *)(val); \
+ \
+ _flo->bits.frac = X##_f; \
+ _flo->bits.exp = X##_e; \
+ _flo->bits.sign = X##_s; \
+ } while (0)
+
X
X /*
X * Multiplication algorithms:
@@ -207,7 +248,7 @@
X
X #define _FP_SQRT_MEAT_1(R, S, T, X, q) \
X do { \
- while (q) \
+ while (q != _FP_WORK_ROUND) \
X { \
X T##_f = S##_f + q; \
X if (T##_f <= X##_f) \
@@ -219,6 +260,12 @@
X _FP_FRAC_SLL_1(X, 1); \
X q >>= 1; \
X } \
+ if (X##_f) \
+ { \
+ if (S##_f < X##_f) \
+ R##_f |= _FP_WORK_ROUND; \
+ R##_f |= _FP_WORK_STICKY; \
+ } \
X } while (0)
X
X /*
@@ -238,8 +285,13 @@
X do { \
X D##_f = S##_f; \
X if (_FP_WFRACBITS_##sfs > _FP_WFRACBITS_##dfs) \
- _FP_FRAC_SRS_1(D, (_FP_WFRACBITS_##sfs-_FP_WFRACBITS_##dfs), \
- _FP_WFRACBITS_##sfs); \
+ { \
+ if (S##_c != FP_CLS_NAN) \
+ _FP_FRAC_SRS_1(D, (_FP_WFRACBITS_##sfs-_FP_WFRACBITS_##dfs), \
+ _FP_WFRACBITS_##sfs); \
+ else \
+ _FP_FRAC_SRL_1(D, (_FP_WFRACBITS_##sfs-_FP_WFRACBITS_##dfs)); \
+ } \
X else \
X D##_f <<= _FP_WFRACBITS_##dfs - _FP_WFRACBITS_##sfs; \
X } while (0)
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/op-2.h linux/arch/sparc64/math-emu/op-2.h
--- v2.3.3/linux/arch/sparc64/math-emu/op-2.h Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/op-2.h Sat May 29 11:09:04 1999
@@ -1,6 +1,26 @@
-/*
- * Basic two-word fraction declaration and manipulation.
- */
+/* Software floating-point emulation.
+ Basic two-word fraction declaration and manipulation.
+ Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.


+ This file is part of the GNU C Library.

+ Contributed by Richard Henderson (r...@cygnus.com),
+ Jakub Jelinek (j...@ultra.linux.cz),
+ David S. Miller (da...@redhat.com) and
+ Peter Maydell (pmay...@chiark.greenend.org.uk).
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
X
X #define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1
X #define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1)
@@ -13,13 +33,13 @@
X do { \
X if ((N) < _FP_W_TYPE_SIZE) \
X { \
- if (__builtin_constant_p(N) && (N) == 1) \
- { \
- X##_f1 = X##_f1 + X##_f1 + (((_FP_WS_TYPE)(X##_f0)) < 0); \
- X##_f0 += X##_f0; \
- } \
- else \
- { \
+ if (__builtin_constant_p(N) && (N) == 1) \
+ { \
+ X##_f1 = X##_f1 + X##_f1 + (((_FP_WS_TYPE)(X##_f0)) < 0); \
+ X##_f0 += X##_f0; \
+ } \
+ else \
+ { \


SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi

echo 'End of part 08'
echo 'File patch-2.3.4 is continued in part 09'
echo 09 > _shar_seq_.tmp
exit 0

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part09

#!/bin/sh
# this is part 09 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 09; then


echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&

X X##_f1 = X##_f1 << (N) | X##_f0 >> (_FP_W_TYPE_SIZE - (N)); \
X X##_f0 <<= (N); \
X } \
@@ -59,20 +79,23 @@
X else \
X { \
X X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) | \
- (((X##_f1 << (sz - (N))) | X##_f0) != 0)); \
+ (((X##_f1 << (sz - (N))) | X##_f0) != 0)); \
X X##_f1 = 0; \
X } \
X } while (0)
X
-#define _FP_FRAC_ADDI_2(X,I) \
+#define _FP_FRAC_ADDI_2(X,I) \
X __FP_FRAC_ADDI_2(X##_f1, X##_f0, I)
X
-#define _FP_FRAC_ADD_2(R,X,Y) \
+#define _FP_FRAC_ADD_2(R,X,Y) \
X __FP_FRAC_ADD_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0)
X
-#define _FP_FRAC_SUB_2(R,X,Y) \
+#define _FP_FRAC_SUB_2(R,X,Y) \
X __FP_FRAC_SUB_2(R##_f1, R##_f0, X##_f1, X##_f0, Y##_f1, Y##_f0)
X
+#define _FP_FRAC_DEC_2(X,Y) \
+ __FP_FRAC_DEC_2(X##_f1, X##_f0, Y##_f1, Y##_f0)
+
X #define _FP_FRAC_CLZ_2(R,X) \
X do { \
X if (X##_f1) \
@@ -87,7 +110,7 @@
X /* Predicates */
X #define _FP_FRAC_NEGP_2(X) ((_FP_WS_TYPE)X##_f1 < 0)
X #define _FP_FRAC_ZEROP_2(X) ((X##_f1 | X##_f0) == 0)
-#define _FP_FRAC_OVERP_2(fs,X) (X##_f1 & _FP_OVERFLOW_##fs)
+#define _FP_FRAC_OVERP_2(fs,X) (_FP_FRAC_HIGH_##fs(X) & _FP_OVERFLOW_##fs)
X #define _FP_FRAC_EQ_2(X, Y) (X##_f1 == Y##_f1 && X##_f0 == Y##_f0)
X #define _FP_FRAC_GT_2(X, Y) \
X (X##_f1 > Y##_f1 || X##_f1 == Y##_f1 && X##_f0 > Y##_f0)
@@ -96,6 +119,7 @@
X
X #define _FP_ZEROFRAC_2 0, 0
X #define _FP_MINFRAC_2 0, 1
+#define _FP_MAXFRAC_2 (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0)
X
X /*
X * Internals
@@ -106,7 +130,7 @@
X #define __FP_CLZ_2(R, xh, xl) \
X do { \
X if (xh) \
- __FP_CLZ(R,xl); \
+ __FP_CLZ(R,xh); \
X else \
X { \
X __FP_CLZ(R,xl); \
@@ -117,17 +141,24 @@
X #if 0
X
X #ifndef __FP_FRAC_ADDI_2
-#define __FP_FRAC_ADDI_2(xh, xl, i) \
+#define __FP_FRAC_ADDI_2(xh, xl, i) \
X (xh += ((xl += i) < i))
X #endif
X #ifndef __FP_FRAC_ADD_2
-#define __FP_FRAC_ADD_2(rh, rl, xh, xl, yh, yl) \
+#define __FP_FRAC_ADD_2(rh, rl, xh, xl, yh, yl) \
X (rh = xh + yh + ((rl = xl + yl) < xl))
X #endif
X #ifndef __FP_FRAC_SUB_2
-#define __FP_FRAC_SUB_2(rh, rl, xh, xl, yh, yl) \
+#define __FP_FRAC_SUB_2(rh, rl, xh, xl, yh, yl) \
X (rh = xh - yh - ((rl = xl - yl) > xl))
X #endif
+#ifndef __FP_FRAC_DEC_2
+#define __FP_FRAC_DEC_2(xh, xl, yh, yl) \
+ do { \
+ UWtype _t = xl; \
+ xh -= yh + ((xl -= yl) > _t); \
+ } while (0)
+#endif
X
X #else
X
@@ -137,6 +168,8 @@
X #define __FP_FRAC_ADD_2 add_ssaaaa
X #undef __FP_FRAC_SUB_2
X #define __FP_FRAC_SUB_2 sub_ddmmss
+#undef __FP_FRAC_DEC_2
+#define __FP_FRAC_DEC_2(xh, xl, yh, yl) sub_ddmmss(xh, xl, xh, xl, yh, yl)
X
X #endif
X
@@ -155,6 +188,17 @@


X X##_s = _flo.bits.sign; \
X } while (0)
X

+#define _FP_UNPACK_RAW_2_P(fs, X, val) \


+ do { \
+ union _FP_UNION_##fs *_flo = \
+ (union _FP_UNION_##fs *)(val); \
+ \

+ X##_f0 = _flo->bits.frac0; \
+ X##_f1 = _flo->bits.frac1; \


+ X##_e = _flo->bits.exp; \
+ X##_s = _flo->bits.sign; \

+ } while (0)
+
X
X /*

X * Repack the raw bits of a native fp value.

@@ -172,6 +216,17 @@


X (val) = _flo.flt; \
X } while (0)
X

+#define _FP_PACK_RAW_2_P(fs, val, X) \


+ do { \
+ union _FP_UNION_##fs *_flo = \
+ (union _FP_UNION_##fs *)(val); \
+ \

+ _flo->bits.frac0 = X##_f0; \
+ _flo->bits.frac1 = X##_f1; \


+ _flo->bits.exp = X##_e; \
+ _flo->bits.sign = X##_s; \
+ } while (0)
+
X
X /*
X * Multiplication algorithms:

@@ -183,21 +238,63 @@
X do { \
X _FP_FRAC_DECL_4(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \
X \
- doit(_FP_FRAC_WORD_4(_z,1), _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \
+ doit(_FP_FRAC_WORD_4(_z,1), _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \
X doit(_b_f1, _b_f0, X##_f0, Y##_f1); \
X doit(_c_f1, _c_f0, X##_f1, Y##_f0); \
- doit(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), X##_f1, Y##_f1); \
+ doit(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), X##_f1, Y##_f1); \
X \
- __FP_FRAC_ADD_4(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
- _FP_FRAC_WORD_4(_z,1),_FP_FRAC_WORD_4(_z,0), \
- 0, _b_f1, _b_f0, 0, \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _FP_FRAC_WORD_4(_z,1), 0, _b_f1, _b_f0, \
X _FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
- _FP_FRAC_WORD_4(_z,1),_FP_FRAC_WORD_4(_z,0)); \
- __FP_FRAC_ADD_4(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
- _FP_FRAC_WORD_4(_z,1),_FP_FRAC_WORD_4(_z,0), \
- 0, _c_f1, _c_f0, 0, \
+ _FP_FRAC_WORD_4(_z,1)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _FP_FRAC_WORD_4(_z,1), 0, _c_f1, _c_f0, \
X _FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
- _FP_FRAC_WORD_4(_z,1),_FP_FRAC_WORD_4(_z,0)); \
+ _FP_FRAC_WORD_4(_z,1)); \
+ \
+ /* Normalize since we know where the msb of the multiplicands \
+ were (bit B), we know that the msb of the of the product is \
+ at either 2B or 2B-1. */ \
+ _FP_FRAC_SRS_4(_z, _FP_WFRACBITS_##fs-1, 2*_FP_WFRACBITS_##fs); \
+ R##_f0 = _FP_FRAC_WORD_4(_z,0); \
+ R##_f1 = _FP_FRAC_WORD_4(_z,1); \
+ } while (0)
+
+/* Given a 1W * 1W => 2W primitive, do the extended multiplication.
+ Do only 3 multiplications instead of four. This one is for machines
+ where multiplication is much more expensive than subtraction. */
+
+#define _FP_MUL_MEAT_2_wide_3mul(fs, R, X, Y, doit) \
+ do { \
+ _FP_FRAC_DECL_4(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \
+ _FP_W_TYPE _d; \
+ int _c1, _c2; \
+ \
+ _b_f0 = X##_f0 + X##_f1; \
+ _c1 = _b_f0 < X##_f0; \
+ _b_f1 = Y##_f0 + Y##_f1; \
+ _c2 = _b_f1 < Y##_f0; \
+ doit(_d, _FP_FRAC_WORD_4(_z,0), X##_f0, Y##_f0); \
+ doit(_FP_FRAC_WORD_4(_z,2), _FP_FRAC_WORD_4(_z,1), _b_f0, _b_f1); \
+ doit(_c_f1, _c_f0, X##_f1, Y##_f1); \
+ \
+ _b_f0 &= -_c2; \
+ _b_f1 &= -_c1; \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _FP_FRAC_WORD_4(_z,1), (_c1 & _c2), 0, _d, \
+ 0, _FP_FRAC_WORD_4(_z,2), _FP_FRAC_WORD_4(_z,1)); \
+ __FP_FRAC_ADDI_2(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _b_f0); \
+ __FP_FRAC_ADDI_2(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _b_f1); \
+ __FP_FRAC_DEC_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _FP_FRAC_WORD_4(_z,1), \
+ 0, _d, _FP_FRAC_WORD_4(_z,0)); \
+ __FP_FRAC_DEC_3(_FP_FRAC_WORD_4(_z,3),_FP_FRAC_WORD_4(_z,2), \
+ _FP_FRAC_WORD_4(_z,1), 0, _c_f1, _c_f0); \
+ __FP_FRAC_ADD_2(_FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2), \
+ _c_f1, _c_f0, \
+ _FP_FRAC_WORD_4(_z,3), _FP_FRAC_WORD_4(_z,2)); \
X \
X /* Normalize since we know where the msb of the multiplicands \
X were (bit B), we know that the msb of the of the product is \
@@ -207,118 +304,93 @@
X R##_f1 = _FP_FRAC_WORD_4(_z,1); \
X } while (0)
X
-/* This next macro appears to be totally broken. Fortunately nowhere
- * seems to use it :-> The problem is that we define _z[4] but
- * then use it in _FP_FRAC_SRS_4, which will attempt to access
- * _z_f[n] which will cause an error. The fix probably involves
- * declaring it with _FP_FRAC_DECL_4, see previous macro. -- PMM 02/1998
- */
X #define _FP_MUL_MEAT_2_gmp(fs, R, X, Y) \
X do { \
- _FP_W_TYPE _x[2], _y[2], _z[4]; \
+ _FP_FRAC_DECL_4(_z); \
+ _FP_W_TYPE _x[2], _y[2]; \
X _x[0] = X##_f0; _x[1] = X##_f1; \
X _y[0] = Y##_f0; _y[1] = Y##_f1; \
X \
- mpn_mul_n(_z, _x, _y, 2); \
+ mpn_mul_n(_z_f, _x, _y, 2); \
X \
X /* Normalize since we know where the msb of the multiplicands \
X were (bit B), we know that the msb of the of the product is \
X at either 2B or 2B-1. */ \
X _FP_FRAC_SRS_4(_z, _FP_WFRACBITS##_fs-1, 2*_FP_WFRACBITS_##fs); \
- R##_f0 = _z[0]; \
- R##_f1 = _z[1]; \
+ R##_f0 = _z_f[0]; \
+ R##_f1 = _z_f[1]; \


X } while (0)
X
X

X /*
X * Division algorithms:
- * This seems to be giving me difficulties -- PMM
- * Look, NetBSD seems to be able to comment algorithms. Can't you?
- * I've thrown printks at the problem.
- * This now appears to work, but I still don't really know why.
- * Also, I don't think the result is properly normalised...
X */
X
-#define _FP_DIV_MEAT_2_udiv_64(fs, R, X, Y) \
+#define _FP_DIV_MEAT_2_udiv(fs, R, X, Y) \
X do { \
- extern void _fp_udivmodti4(_FP_W_TYPE q[2], _FP_W_TYPE r[2], \
- _FP_W_TYPE n1, _FP_W_TYPE n0, \
- _FP_W_TYPE d1, _FP_W_TYPE d0); \
- _FP_W_TYPE _n_f3, _n_f2, _n_f1, _n_f0, _r_f1, _r_f0; \
- _FP_W_TYPE _q_f1, _q_f0, _m_f1, _m_f0; \
- _FP_W_TYPE _rmem[2], _qmem[2]; \
- /* I think this check is to ensure that the result is normalised. \
- * Assuming X,Y normalised (ie in [1.0,2.0)) X/Y will be in \
- * [0.5,2.0). Furthermore, it will be less than 1.0 iff X < Y. \
- * In this case we tweak things. (this is based on comments in \
- * the NetBSD FPU emulation code. ) \
- * We know X,Y are normalised because we ensure this as part of \
- * the unpacking process. -- PMM \
- */ \
+ _FP_W_TYPE _n_f2, _n_f1, _n_f0, _r_f1, _r_f0, _m_f1, _m_f0; \
X if (_FP_FRAC_GT_2(X, Y)) \
X { \
-/* R##_e++; */ \
- _n_f3 = X##_f1 >> 1; \
- _n_f2 = X##_f1 << (_FP_W_TYPE_SIZE - 1) | X##_f0 >> 1; \
- _n_f1 = X##_f0 << (_FP_W_TYPE_SIZE - 1); \
- _n_f0 = 0; \
+ _n_f2 = X##_f1 >> 1; \
+ _n_f1 = X##_f1 << (_FP_W_TYPE_SIZE - 1) | X##_f0 >> 1; \
+ _n_f0 = X##_f0 << (_FP_W_TYPE_SIZE - 1); \
X } \
X else \
X { \
X R##_e--; \
- _n_f3 = X##_f1; \
- _n_f2 = X##_f0; \
- _n_f1 = _n_f0 = 0; \
+ _n_f2 = X##_f1; \
+ _n_f1 = X##_f0; \
+ _n_f0 = 0; \
X } \
X \
X /* Normalize, i.e. make the most significant bit of the \
- denominator set. CHANGED: - 1 to nothing -- PMM */ \
- _FP_FRAC_SLL_2(Y, _FP_WFRACXBITS_##fs /* -1 */); \
- \
- /* Do the 256/128 bit division given the 128-bit _fp_udivmodtf4 \
- primitive snagged from libgcc2.c. */ \
+ denominator set. */ \
+ _FP_FRAC_SLL_2(Y, _FP_WFRACXBITS_##fs); \
X \
- _fp_udivmodti4(_qmem, _rmem, _n_f3, _n_f2, 0, Y##_f1); \
- _q_f1 = _qmem[0]; \
- umul_ppmm(_m_f1, _m_f0, _q_f1, Y##_f0); \
- _r_f1 = _rmem[0]; \
- _r_f0 = _n_f1; \
+ udiv_qrnnd(R##_f1, _r_f1, _n_f2, _n_f1, Y##_f1); \
+ umul_ppmm(_m_f1, _m_f0, R##_f1, Y##_f0); \
+ _r_f0 = _n_f0; \
X if (_FP_FRAC_GT_2(_m, _r)) \
X { \
- _q_f1--; \
- _FP_FRAC_ADD_2(_r, _r, Y); \
+ R##_f1--; \
+ _FP_FRAC_ADD_2(_r, Y, _r); \
X if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \
X { \
- _q_f1--; \
- _FP_FRAC_ADD_2(_r, _r, Y); \
+ R##_f1--; \
+ _FP_FRAC_ADD_2(_r, Y, _r); \
X } \
X } \
- _FP_FRAC_SUB_2(_r, _r, _m); \
+ _FP_FRAC_DEC_2(_r, _m); \
X \
- _fp_udivmodti4(_qmem, _rmem, _r_f1, _r_f0, 0, Y##_f1); \
- _q_f0 = _qmem[0]; \
- umul_ppmm(_m_f1, _m_f0, _q_f0, Y##_f0); \
- _r_f1 = _rmem[0]; \
- _r_f0 = _n_f0; \
- if (_FP_FRAC_GT_2(_m, _r)) \
+ if (_r_f1 == Y##_f1) \
X { \
- _q_f0--; \
- _FP_FRAC_ADD_2(_r, _r, Y); \
- if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \
+ /* This is a special case, not an optimization \
+ (_r/Y##_f1 would not fit into UWtype). \
+ As _r is guaranteed to be < Y, R##_f0 can be either \
+ (UWtype)-1 or (UWtype)-2. But as we know what kind \
+ of bits it is (sticky, guard, round), we don't care. \
+ We also don't care what the reminder is, because the \
+ guard bit will be set anyway. -jj */ \
+ R##_f0 = -1; \
+ } \
+ else \
+ { \
+ udiv_qrnnd(R##_f0, _r_f1, _r_f1, _r_f0, Y##_f1); \
+ umul_ppmm(_m_f1, _m_f0, R##_f0, Y##_f0); \
+ _r_f0 = 0; \
+ if (_FP_FRAC_GT_2(_m, _r)) \
X { \
- _q_f0--; \
- _FP_FRAC_ADD_2(_r, _r, Y); \
+ R##_f0--; \
+ _FP_FRAC_ADD_2(_r, Y, _r); \
+ if (_FP_FRAC_GE_2(_r, Y) && _FP_FRAC_GT_2(_m, _r)) \
+ { \
+ R##_f0--; \
+ _FP_FRAC_ADD_2(_r, Y, _r); \
+ } \
X } \
+ if (!_FP_FRAC_EQ_2(_r, _m)) \
+ R##_f0 |= _FP_WORK_STICKY; \
X } \
- _FP_FRAC_SUB_2(_r, _r, _m); \
- \
- R##_f1 = _q_f1; \
- R##_f0 = _q_f0 | ((_r_f1 | _r_f0) != 0); \
- /* adjust so answer is normalized again. I'm not sure what the \
- * final sz param should be. In practice it's never used since \
- * N is 1 which is always going to be < _FP_W_TYPE_SIZE... \
- */ \
- /* _FP_FRAC_SRS_2(R,1,_FP_WFRACBITS_##fs); */ \


X } while (0)
X
X

@@ -330,17 +402,17 @@
X if (_FP_FRAC_GT_2(X, Y)) \
X { \
X R##_e++; \
- _x[1] = (X##_f0 << (_FP_WFRACBITS-1 - _FP_W_TYPE_SIZE) | \
+ _x[1] = (X##_f0 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE) | \
X X##_f1 >> (_FP_W_TYPE_SIZE - \
- (_FP_WFRACBITS-1 - _FP_W_TYPE_SIZE))); \
- _x[2] = X##_f1 << (_FP_WFRACBITS-1 - _FP_W_TYPE_SIZE); \
+ (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE))); \
+ _x[2] = X##_f1 << (_FP_WFRACBITS_##fs-1 - _FP_W_TYPE_SIZE); \
X } \
X else \
X { \
- _x[1] = (X##_f0 << (_FP_WFRACBITS - _FP_W_TYPE_SIZE) | \
+ _x[1] = (X##_f0 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE) | \
X X##_f1 >> (_FP_W_TYPE_SIZE - \
- (_FP_WFRACBITS - _FP_W_TYPE_SIZE))); \
- _x[2] = X##_f1 << (_FP_WFRACBITS - _FP_W_TYPE_SIZE); \
+ (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE))); \
+ _x[2] = X##_f1 << (_FP_WFRACBITS_##fs - _FP_W_TYPE_SIZE); \
X } \
X \
X (void) mpn_divrem (_z, 0, _x, 4, _y, 2); \
@@ -359,33 +431,38 @@
X do { \
X while (q) \
X { \
- T##_f1 = S##_f1 + q; \
- if (T##_f1 <= X##_f1) \
- { \
- S##_f1 = T##_f1 + q; \
- X##_f1 -= T##_f1; \
- R##_f1 += q; \
- } \
- _FP_FRAC_SLL_2(X, 1); \
- q >>= 1; \
+ T##_f1 = S##_f1 + q; \
+ if (T##_f1 <= X##_f1) \
+ { \
+ S##_f1 = T##_f1 + q; \
+ X##_f1 -= T##_f1; \
+ R##_f1 += q; \


+ } \
+ _FP_FRAC_SLL_2(X, 1); \
+ q >>= 1; \

X } \
X q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \


- while (q) \
+ while (q != _FP_WORK_ROUND) \
X { \

- T##_f0 = S##_f0 + q; \
- T##_f1 = S##_f1; \
- if (T##_f1 < X##_f1 || \
- (T##_f1 == X##_f1 && T##_f0 < X##_f0)) \
- { \
- S##_f0 = T##_f0 + q; \
- if (((_FP_WS_TYPE)T##_f0) < 0 && \
- ((_FP_WS_TYPE)S##_f0) >= 0) \
- S##_f1++; \
- _FP_FRAC_SUB_2(X, X, T); \
- R##_f0 += q; \
- } \
- _FP_FRAC_SLL_2(X, 1); \
- q >>= 1; \


+ T##_f0 = S##_f0 + q; \

+ T##_f1 = S##_f1; \
+ if (T##_f1 < X##_f1 || \
+ (T##_f1 == X##_f1 && T##_f0 <= X##_f0)) \


+ { \
+ S##_f0 = T##_f0 + q; \

+ S##_f1 += (T##_f0 > S##_f0); \
+ _FP_FRAC_DEC_2(X, T); \


+ R##_f0 += q; \
+ } \

+ _FP_FRAC_SLL_2(X, 1); \
+ q >>= 1; \
+ } \

+ if (X##_f0 | X##_f1) \
+ { \
+ if (S##_f1 < X##_f1 || \
+ (S##_f1 == X##_f1 && S##_f0 < X##_f0)) \


+ R##_f0 |= _FP_WORK_ROUND; \
+ R##_f0 |= _FP_WORK_STICKY; \

X } \
X } while (0)
X
@@ -419,8 +496,11 @@
X
X #define _FP_FRAC_CONV_1_2(dfs, sfs, D, S) \
X do { \
- _FP_FRAC_SRS_2(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs), \
- _FP_WFRACBITS_##sfs); \


+ if (S##_c != FP_CLS_NAN) \

+ _FP_FRAC_SRS_2(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs), \
+ _FP_WFRACBITS_##sfs); \
+ else \
+ _FP_FRAC_SRL_2(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs)); \
X D##_f = S##_f0; \
X } while (0)
X
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/op-4.h linux/arch/sparc64/math-emu/op-4.h
--- v2.3.3/linux/arch/sparc64/math-emu/op-4.h Tue Apr 14 17:44:21 1998
+++ linux/arch/sparc64/math-emu/op-4.h Sat May 29 11:09:04 1999
@@ -1,41 +1,31 @@
-/*
- * Basic four-word fraction declaration and manipulation.
- *
- * When adding quadword support for 32 bit machines, we need
- * to be a little careful as double multiply uses some of these
- * macros: (in op-2.h)
- * _FP_MUL_MEAT_2_wide() uses _FP_FRAC_DECL_4, _FP_FRAC_WORD_4,
- * _FP_FRAC_ADD_4, _FP_FRAC_SRS_4
- * _FP_MUL_MEAT_2_gmp() uses _FP_FRAC_SRS_4 (and should use
- * _FP_FRAC_DECL_4: it appears to be broken and is not used
- * anywhere anyway. )
- *
- * I've now fixed all the macros that were here from the sparc64 code.
- * [*none* of the shift macros were correct!] -- PMM 02/1998
- *
- * The only quadword stuff that remains to be coded is:
- * 1) the conversion to/from ints, which requires
- * that we check (in op-common.h) that the following do the right thing
- * for quadwords: _FP_TO_INT(Q,4,r,X,rsz,rsg), _FP_FROM_INT(Q,4,X,r,rs,rt)
- * 2) multiply, divide and sqrt, which require:
- * _FP_MUL_MEAT_4_*(R,X,Y), _FP_DIV_MEAT_4_*(R,X,Y), _FP_SQRT_MEAT_4(R,S,T,X,q),
- * This also needs _FP_MUL_MEAT_Q and _FP_DIV_MEAT_Q to be defined to
- * some suitable _FP_MUL_MEAT_4_* macros in sfp-machine.h.
- * [we're free to choose whatever FP_MUL_MEAT_4_* macros we need for
- * these; they are used nowhere else. ]


- */
+/* Software floating-point emulation.

+ Basic four-word fraction declaration and manipulation.


+ Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (r...@cygnus.com),
+ Jakub Jelinek (j...@ultra.linux.cz),
+ David S. Miller (da...@redhat.com) and
+ Peter Maydell (pmay...@chiark.greenend.org.uk).
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
X

X #define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4]
X #define _FP_FRAC_COPY_4(D,S) \
X (D##_f[0] = S##_f[0], D##_f[1] = S##_f[1], \
X D##_f[2] = S##_f[2], D##_f[3] = S##_f[3])
-/* The _FP_FRAC_SET_n(X,I) macro is intended for use with another
- * macro such as _FP_ZEROFRAC_n which returns n comma separated values.
- * The result is that we get an expansion of __FP_FRAC_SET_n(X,I0,I1,I2,I3)
- * which just assigns the In values to the array X##_f[].
- * This is why the number of parameters doesn't appear to match
- * at first glance... -- PMM
- */
X #define _FP_FRAC_SET_4(X,I) __FP_FRAC_SET_4(X, I)
X #define _FP_FRAC_HIGH_4(X) (X##_f[3])
X #define _FP_FRAC_LOW_4(X) (X##_f[0])
@@ -47,11 +37,17 @@
X _skip = (N) / _FP_W_TYPE_SIZE; \
X _up = (N) % _FP_W_TYPE_SIZE; \
X _down = _FP_W_TYPE_SIZE - _up; \
- for (_i = 3; _i > _skip; --_i) \
- X##_f[_i] = X##_f[_i-_skip] << _up | X##_f[_i-_skip-1] >> _down; \
-/* bugfixed: was X##_f[_i] <<= _up; -- PMM 02/1998 */ \
- X##_f[_i] = X##_f[0] << _up; \
- for (--_i; _i >= 0; --_i) \
+ if (!_up) \
+ for (_i = 3; _i >= _skip; --_i) \
+ X##_f[_i] = X##_f[_i-_skip]; \
+ else \
+ { \
+ for (_i = 3; _i > _skip; --_i) \
+ X##_f[_i] = X##_f[_i-_skip] << _up \
+ | X##_f[_i-_skip-1] >> _down; \
+ X##_f[_i--] = X##_f[0] << _up; \
+ } \
+ for (; _i >= 0; --_i) \
X X##_f[_i] = 0; \
X } while (0)
X
@@ -62,10 +58,17 @@
X _skip = (N) / _FP_W_TYPE_SIZE; \
X _down = (N) % _FP_W_TYPE_SIZE; \
X _up = _FP_W_TYPE_SIZE - _down; \
- for (_i = 0; _i < 3-_skip; ++_i) \
- X##_f[_i] = X##_f[_i+_skip] >> _down | X##_f[_i+_skip+1] << _up; \
- X##_f[_i] = X##_f[3] >> _down; \
- for (++_i; _i < 4; ++_i) \
+ if (!_down) \
+ for (_i = 0; _i <= 3-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip]; \
+ else \
+ { \
+ for (_i = 0; _i < 3-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip] >> _down \
+ | X##_f[_i+_skip+1] << _up; \
+ X##_f[_i++] = X##_f[3] >> _down; \
+ } \
+ for (; _i < 4; ++_i) \
X X##_f[_i] = 0; \
X } while (0)
X
@@ -85,14 +88,21 @@
X for (_s = _i = 0; _i < _skip; ++_i) \
X _s |= X##_f[_i]; \
X _s |= X##_f[_i] << _up; \
-/* s is now != 0 if we want to set the LSbit */ \
- for (_i = 0; _i < 3-_skip; ++_i) \
- X##_f[_i] = X##_f[_i+_skip] >> _down | X##_f[_i+_skip+1] << _up; \
- X##_f[_i] = X##_f[3] >> _down; \
- for (++_i; _i < 4; ++_i) \
+/* s is now != 0 if we want to set the LSbit */ \
+ if (!_down) \
+ for (_i = 0; _i <= 3-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip]; \
+ else \
+ { \
+ for (_i = 0; _i < 3-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip] >> _down \
+ | X##_f[_i+_skip+1] << _up; \
+ X##_f[_i++] = X##_f[3] >> _down; \
+ } \
+ for (; _i < 4; ++_i) \
X X##_f[_i] = 0; \
- /* don't fix the LSB until the very end when we're sure f[0] is stable */ \
- X##_f[0] |= (_s != 0); \
+ /* don't fix the LSB until the very end when we're sure f[0] is stable */ \
+ X##_f[0] |= (_s != 0); \
X } while (0)
X
X #define _FP_FRAC_ADD_4(R,X,Y) \
@@ -100,89 +110,394 @@
X X##_f[3], X##_f[2], X##_f[1], X##_f[0], \
X Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0])
X
-#define _FP_FRAC_SUB_4(R,X,Y) \
+#define _FP_FRAC_SUB_4(R,X,Y) \
X __FP_FRAC_SUB_4(R##_f[3], R##_f[2], R##_f[1], R##_f[0], \
X X##_f[3], X##_f[2], X##_f[1], X##_f[0], \
X Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0])
X
-#define _FP_FRAC_ADDI_4(X,I) \
+#define _FP_FRAC_DEC_4(X,Y) \
+ __FP_FRAC_DEC_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], \
+ Y##_f[3], Y##_f[2], Y##_f[1], Y##_f[0])
+
+#define _FP_FRAC_ADDI_4(X,I) \
X __FP_FRAC_ADDI_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], I)
X
X #define _FP_ZEROFRAC_4 0,0,0,0
X #define _FP_MINFRAC_4 0,0,0,1
+#define _FP_MAXFRAC_4 (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0), (~(_FP_WS_TYPE)0)
X
X #define _FP_FRAC_ZEROP_4(X) ((X##_f[0] | X##_f[1] | X##_f[2] | X##_f[3]) == 0)
X #define _FP_FRAC_NEGP_4(X) ((_FP_WS_TYPE)X##_f[3] < 0)
-#define _FP_FRAC_OVERP_4(fs,X) (X##_f[0] & _FP_OVERFLOW_##fs)
+#define _FP_FRAC_OVERP_4(fs,X) (_FP_FRAC_HIGH_##fs(X) & _FP_OVERFLOW_##fs)
X
-#define _FP_FRAC_EQ_4(X,Y) \
- (X##_f[0] == Y##_f[0] && X##_f[1] == Y##_f[1] \
+#define _FP_FRAC_EQ_4(X,Y) \
+ (X##_f[0] == Y##_f[0] && X##_f[1] == Y##_f[1] \
X && X##_f[2] == Y##_f[2] && X##_f[3] == Y##_f[3])
X
-#define _FP_FRAC_GT_4(X,Y) \
- (X##_f[3] > Y##_f[3] || \
- (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \
- (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \
- (X##_f[1] == Y##_f[1] && X##_f[0] > Y##_f[0]) \
- )) \
- )) \
+#define _FP_FRAC_GT_4(X,Y) \
+ (X##_f[3] > Y##_f[3] || \
+ (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \
+ (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \
+ (X##_f[1] == Y##_f[1] && X##_f[0] > Y##_f[0]) \
+ )) \
+ )) \
X )
X
-#define _FP_FRAC_GE_4(X,Y) \
- (X##_f[3] > Y##_f[3] || \
- (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \
- (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \
- (X##_f[1] == Y##_f[1] && X##_f[0] >= Y##_f[0]) \
- )) \
- )) \
+#define _FP_FRAC_GE_4(X,Y) \
+ (X##_f[3] > Y##_f[3] || \
+ (X##_f[3] == Y##_f[3] && (X##_f[2] > Y##_f[2] || \
+ (X##_f[2] == Y##_f[2] && (X##_f[1] > Y##_f[1] || \
+ (X##_f[1] == Y##_f[1] && X##_f[0] >= Y##_f[0]) \
+ )) \
+ )) \
X )
X
X
-#define _FP_FRAC_CLZ_4(R,X) \
- do { \
- if (X##_f[3]) \
- { \
- __FP_CLZ(R,X##_f[3]); \
- } \
- else if (X##_f[2]) \
- { \
- __FP_CLZ(R,X##_f[2]); \
- R += _FP_W_TYPE_SIZE; \
- } \
- else if (X##_f[1]) \
- { \
- __FP_CLZ(R,X##_f[2]); \
- R += _FP_W_TYPE_SIZE*2; \
- } \
- else \
- { \
- __FP_CLZ(R,X##_f[0]); \
- R += _FP_W_TYPE_SIZE*3; \
- } \
+#define _FP_FRAC_CLZ_4(R,X) \
+ do { \
+ if (X##_f[3]) \
+ { \
+ __FP_CLZ(R,X##_f[3]); \
+ } \
+ else if (X##_f[2]) \
+ { \
+ __FP_CLZ(R,X##_f[2]); \
+ R += _FP_W_TYPE_SIZE; \
+ } \
+ else if (X##_f[1]) \
+ { \
+ __FP_CLZ(R,X##_f[2]); \
+ R += _FP_W_TYPE_SIZE*2; \
+ } \
+ else \
+ { \
+ __FP_CLZ(R,X##_f[0]); \
+ R += _FP_W_TYPE_SIZE*3; \
+ } \
X } while(0)
X
X
-#define _FP_UNPACK_RAW_4(fs, X, val) \
- do { \
- union _FP_UNION_##fs _flo; _flo.flt = (val); \
- X##_f[0] = _flo.bits.frac0; \
- X##_f[1] = _flo.bits.frac1; \
- X##_f[2] = _flo.bits.frac2; \
- X##_f[3] = _flo.bits.frac3; \
- X##_e = _flo.bits.exp; \
- X##_s = _flo.bits.sign; \
+#define _FP_UNPACK_RAW_4(fs, X, val) \
+ do { \
+ union _FP_UNION_##fs _flo; _flo.flt = (val); \


+ X##_f[0] = _flo.bits.frac0; \
+ X##_f[1] = _flo.bits.frac1; \

+ X##_f[2] = _flo.bits.frac2; \
+ X##_f[3] = _flo.bits.frac3; \


+ X##_e = _flo.bits.exp; \
+ X##_s = _flo.bits.sign; \

+ } while (0)
+
+#define _FP_UNPACK_RAW_4_P(fs, X, val) \


+ do { \
+ union _FP_UNION_##fs *_flo = \
+ (union _FP_UNION_##fs *)(val); \
+ \

+ X##_f[0] = _flo->bits.frac0; \
+ X##_f[1] = _flo->bits.frac1; \

+ X##_f[2] = _flo->bits.frac2; \
+ X##_f[3] = _flo->bits.frac3; \


+ X##_e = _flo->bits.exp; \
+ X##_s = _flo->bits.sign; \

X } while (0)
X
-#define _FP_PACK_RAW_4(fs, val, X) \
- do { \
+#define _FP_PACK_RAW_4(fs, val, X) \
+ do { \
X union _FP_UNION_##fs _flo; \
- _flo.bits.frac0 = X##_f[0]; \
- _flo.bits.frac1 = X##_f[1]; \
- _flo.bits.frac2 = X##_f[2]; \
- _flo.bits.frac3 = X##_f[3]; \
- _flo.bits.exp = X##_e; \
- _flo.bits.sign = X##_s; \
- (val) = _flo.flt; \


+ _flo.bits.frac0 = X##_f[0]; \
+ _flo.bits.frac1 = X##_f[1]; \

+ _flo.bits.frac2 = X##_f[2]; \
+ _flo.bits.frac3 = X##_f[3]; \


+ _flo.bits.exp = X##_e; \
+ _flo.bits.sign = X##_s; \

+ (val) = _flo.flt; \
+ } while (0)
+

+#define _FP_PACK_RAW_4_P(fs, val, X) \


+ do { \
+ union _FP_UNION_##fs *_flo = \
+ (union _FP_UNION_##fs *)(val); \
+ \

+ _flo->bits.frac0 = X##_f[0]; \
+ _flo->bits.frac1 = X##_f[1]; \

+ _flo->bits.frac2 = X##_f[2]; \
+ _flo->bits.frac3 = X##_f[3]; \


+ _flo->bits.exp = X##_e; \
+ _flo->bits.sign = X##_s; \
+ } while (0)
+

+/*
+ * Multiplication algorithms:
+ */
+
+/* Given a 1W * 1W => 2W primitive, do the extended multiplication. */
+
+#define _FP_MUL_MEAT_4_wide(fs, R, X, Y, doit) \
+ do { \
+ _FP_FRAC_DECL_8(_z); _FP_FRAC_DECL_2(_b); _FP_FRAC_DECL_2(_c); \
+ _FP_FRAC_DECL_2(_d); _FP_FRAC_DECL_2(_e); _FP_FRAC_DECL_2(_f); \
+ \
+ doit(_FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0), X##_f[0], Y##_f[0]); \
+ doit(_b_f1, _b_f0, X##_f[0], Y##_f[1]); \
+ doit(_c_f1, _c_f0, X##_f[1], Y##_f[0]); \
+ doit(_d_f1, _d_f0, X##_f[1], Y##_f[1]); \
+ doit(_e_f1, _e_f0, X##_f[0], Y##_f[2]); \
+ doit(_f_f1, _f_f0, X##_f[2], Y##_f[0]); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \
+ _FP_FRAC_WORD_8(_z,1), 0,_b_f1,_b_f0, \
+ 0,0,_FP_FRAC_WORD_8(_z,1)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \
+ _FP_FRAC_WORD_8(_z,1), 0,_c_f1,_c_f0, \
+ _FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2), \
+ _FP_FRAC_WORD_8(_z,1)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \
+ _FP_FRAC_WORD_8(_z,2), 0,_d_f1,_d_f0, \
+ 0,_FP_FRAC_WORD_8(_z,3),_FP_FRAC_WORD_8(_z,2)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \
+ _FP_FRAC_WORD_8(_z,2), 0,_e_f1,_e_f0, \
+ _FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \
+ _FP_FRAC_WORD_8(_z,2)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \
+ _FP_FRAC_WORD_8(_z,2), 0,_f_f1,_f_f0, \
+ _FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3), \
+ _FP_FRAC_WORD_8(_z,2)); \
+ doit(_b_f1, _b_f0, X##_f[0], Y##_f[3]); \
+ doit(_c_f1, _c_f0, X##_f[3], Y##_f[0]); \
+ doit(_d_f1, _d_f0, X##_f[1], Y##_f[2]); \
+ doit(_e_f1, _e_f0, X##_f[2], Y##_f[1]); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3), 0,_b_f1,_b_f0, \
+ 0,_FP_FRAC_WORD_8(_z,4),_FP_FRAC_WORD_8(_z,3)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3), 0,_c_f1,_c_f0, \
+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3), 0,_d_f1,_d_f0, \
+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3), 0,_e_f1,_e_f0, \
+ _FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4), \
+ _FP_FRAC_WORD_8(_z,3)); \
+ doit(_b_f1, _b_f0, X##_f[2], Y##_f[2]); \
+ doit(_c_f1, _c_f0, X##_f[1], Y##_f[3]); \
+ doit(_d_f1, _d_f0, X##_f[3], Y##_f[1]); \
+ doit(_e_f1, _e_f0, X##_f[2], Y##_f[3]); \
+ doit(_f_f1, _f_f0, X##_f[3], Y##_f[2]); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \
+ _FP_FRAC_WORD_8(_z,4), 0,_b_f1,_b_f0, \
+ 0,_FP_FRAC_WORD_8(_z,5),_FP_FRAC_WORD_8(_z,4)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \
+ _FP_FRAC_WORD_8(_z,4), 0,_c_f1,_c_f0, \
+ _FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \
+ _FP_FRAC_WORD_8(_z,4)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \
+ _FP_FRAC_WORD_8(_z,4), 0,_d_f1,_d_f0, \
+ _FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5), \
+ _FP_FRAC_WORD_8(_z,4)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \
+ _FP_FRAC_WORD_8(_z,5), 0,_e_f1,_e_f0, \
+ 0,_FP_FRAC_WORD_8(_z,6),_FP_FRAC_WORD_8(_z,5)); \
+ __FP_FRAC_ADD_3(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \
+ _FP_FRAC_WORD_8(_z,5), 0,_f_f1,_f_f0, \
+ _FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \
+ _FP_FRAC_WORD_8(_z,5)); \
+ doit(_b_f1, _b_f0, X##_f[3], Y##_f[3]); \
+ __FP_FRAC_ADD_2(_FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6), \
+ _b_f1,_b_f0, \
+ _FP_FRAC_WORD_8(_z,7),_FP_FRAC_WORD_8(_z,6)); \
+ \
+ /* Normalize since we know where the msb of the multiplicands \
+ were (bit B), we know that the msb of the of the product is \
+ at either 2B or 2B-1. */ \
+ _FP_FRAC_SRS_8(_z, _FP_WFRACBITS_##fs-1, 2*_FP_WFRACBITS_##fs); \
+ __FP_FRAC_SET_4(R, _FP_FRAC_WORD_8(_z,3), _FP_FRAC_WORD_8(_z,2), \
+ _FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0)); \
+ } while (0)
+
+#define _FP_MUL_MEAT_4_gmp(fs, R, X, Y) \
+ do { \
+ _FP_FRAC_DECL_8(_z); \
+ \
+ mpn_mul_n(_z_f, _x_f, _y_f, 4); \
+ \
+ /* Normalize since we know where the msb of the multiplicands \
+ were (bit B), we know that the msb of the of the product is \
+ at either 2B or 2B-1. */ \
+ _FP_FRAC_SRS_8(_z, _FP_WFRACBITS_##fs-1, 2*_FP_WFRACBITS_##fs); \
+ __FP_FRAC_SET_4(R, _FP_FRAC_WORD_8(_z,3), _FP_FRAC_WORD_8(_z,2), \
+ _FP_FRAC_WORD_8(_z,1), _FP_FRAC_WORD_8(_z,0)); \
+ } while (0)
+
+/*
+ * Helper utility for _FP_DIV_MEAT_4_udiv:
+ * pppp = m * nnn
+ */
+#define umul_ppppmnnn(p3,p2,p1,p0,m,n2,n1,n0) \
+ do { \
+ UWtype _t; \
+ umul_ppmm(p1,p0,m,n0); \
+ umul_ppmm(p2,_t,m,n1); \
+ __FP_FRAC_ADDI_2(p2,p1,_t); \
+ umul_ppmm(p3,_t,m,n2); \
+ __FP_FRAC_ADDI_2(p3,p2,_t); \
+ } while (0)
+
+/*
+ * Division algorithms:
+ */
+
+#define _FP_DIV_MEAT_4_udiv(fs, R, X, Y) \
+ do { \
+ int _i; \
+ _FP_FRAC_DECL_4(_n); _FP_FRAC_DECL_4(_m); \
+ _FP_FRAC_SET_4(_n, _FP_ZEROFRAC_4); \
+ if (_FP_FRAC_GT_4(X, Y)) \
+ { \
+ _n_f[3] = X##_f[0] << (_FP_W_TYPE_SIZE - 1); \
+ _FP_FRAC_SRL_4(X, 1); \
+ } \
+ else \
+ R##_e--; \
+ \
+ /* Normalize, i.e. make the most significant bit of the \
+ denominator set. */ \
+ _FP_FRAC_SLL_4(Y, _FP_WFRACXBITS_##fs); \
+ \
+ for (_i = 3; ; _i--) \
+ { \
+ if (X##_f[3] == Y##_f[3]) \
+ { \
+ /* This is a special case, not an optimization \
+ (X##_f[3]/Y##_f[3] would not fit into UWtype). \
+ As X## is guaranteed to be < Y, R##_f[_i] can be either \
+ (UWtype)-1 or (UWtype)-2. */ \
+ R##_f[_i] = -1; \
+ if (!_i) \
+ break; \
+ __FP_FRAC_SUB_4(X##_f[3], X##_f[2], X##_f[1], X##_f[0], \
+ Y##_f[2], Y##_f[1], Y##_f[0], 0, \
+ X##_f[2], X##_f[1], X##_f[0], _n_f[_i]); \
+ _FP_FRAC_SUB_4(X, Y, X); \
+ if (X##_f[3] > Y##_f[3]) \
+ { \
+ R##_f[_i] = -2; \
+ _FP_FRAC_ADD_4(X, Y, X); \
+ } \
+ } \
+ else \
+ { \
+ udiv_qrnnd(R##_f[_i], X##_f[3], X##_f[3], X##_f[2], Y##_f[3]); \
+ umul_ppppmnnn(_m_f[3], _m_f[2], _m_f[1], _m_f[0], \
+ R##_f[_i], Y##_f[2], Y##_f[1], Y##_f[0]); \
+ X##_f[2] = X##_f[1]; \
+ X##_f[1] = X##_f[0]; \
+ X##_f[0] = _n_f[_i]; \
+ if (_FP_FRAC_GT_4(_m, X)) \
+ { \
+ R##_f[_i]--; \
+ _FP_FRAC_ADD_4(X, Y, X); \
+ if (_FP_FRAC_GE_4(X, Y) && _FP_FRAC_GT_4(_m, X)) \
+ { \
+ R##_f[_i]--; \
+ _FP_FRAC_ADD_4(X, Y, X); \
+ } \
+ } \
+ _FP_FRAC_DEC_4(X, _m); \
+ if (!_i) \
+ { \
+ if (!_FP_FRAC_EQ_4(X, _m)) \


+ R##_f[0] |= _FP_WORK_STICKY; \

+ break; \
+ } \
+ } \


+ } \
+ } while (0)
+
+

+/*
+ * Square root algorithms:
+ * We have just one right now, maybe Newton approximation
+ * should be added for those machines where division is fast.

+ */
+
+#define _FP_SQRT_MEAT_4(R, S, T, X, q) \
+ do { \
+ while (q) \
+ { \
+ T##_f[3] = S##_f[3] + q; \
+ if (T##_f[3] <= X##_f[3]) \
+ { \
+ S##_f[3] = T##_f[3] + q; \
+ X##_f[3] -= T##_f[3]; \
+ R##_f[3] += q; \
+ } \
+ _FP_FRAC_SLL_4(X, 1); \


+ q >>= 1; \
+ } \
+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \
+ while (q) \
+ { \

+ T##_f[2] = S##_f[2] + q; \
+ T##_f[3] = S##_f[3]; \
+ if (T##_f[3] < X##_f[3] || \
+ (T##_f[3] == X##_f[3] && T##_f[2] <= X##_f[2])) \
+ { \
+ S##_f[2] = T##_f[2] + q; \
+ S##_f[3] += (T##_f[2] > S##_f[2]); \
+ __FP_FRAC_DEC_2(X##_f[3], X##_f[2], \
+ T##_f[3], T##_f[2]); \
+ R##_f[2] += q; \
+ } \
+ _FP_FRAC_SLL_4(X, 1); \


+ q >>= 1; \
+ } \
+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \
+ while (q) \
+ { \

+ T##_f[1] = S##_f[1] + q; \

+ T##_f[2] = S##_f[2]; \
+ T##_f[3] = S##_f[3]; \
+ if (T##_f[3] < X##_f[3] || \
+ (T##_f[3] == X##_f[3] && (T##_f[2] < X##_f[2] || \
+ (T##_f[2] == X##_f[2] && T##_f[1] <= X##_f[1])))) \


+ { \
+ S##_f[1] = T##_f[1] + q; \

+ S##_f[2] += (T##_f[1] > S##_f[1]); \
+ S##_f[3] += (T##_f[2] > S##_f[2]); \
+ __FP_FRAC_DEC_3(X##_f[3], X##_f[2], X##_f[1], \
+ T##_f[3], T##_f[2], T##_f[1]); \


+ R##_f[1] += q; \
+ } \

+ _FP_FRAC_SLL_4(X, 1); \


+ q >>= 1; \
+ } \
+ q = (_FP_W_TYPE)1 << (_FP_W_TYPE_SIZE - 1); \

+ while (q != _FP_WORK_ROUND) \


+ { \
+ T##_f[0] = S##_f[0] + q; \
+ T##_f[1] = S##_f[1]; \

+ T##_f[2] = S##_f[2]; \
+ T##_f[3] = S##_f[3]; \
+ if (_FP_FRAC_GE_4(X,T)) \


+ { \
+ S##_f[0] = T##_f[0] + q; \
+ S##_f[1] += (T##_f[0] > S##_f[0]); \

+ S##_f[2] += (T##_f[1] > S##_f[1]); \
+ S##_f[3] += (T##_f[2] > S##_f[2]); \
+ _FP_FRAC_DEC_4(X, T); \


+ R##_f[0] += q; \
+ } \

+ _FP_FRAC_SLL_4(X, 1); \


+ q >>= 1; \
+ } \

+ if (!_FP_FRAC_ZEROP_4(X)) \
+ { \
+ if (_FP_FRAC_GT_4(X,S)) \


+ R##_f[0] |= _FP_WORK_ROUND; \
+ R##_f[0] |= _FP_WORK_STICKY; \
+ } \

X } while (0)
X
X

@@ -193,6 +508,13 @@
X #define __FP_FRAC_SET_4(X,I3,I2,I1,I0) \
X (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0)
X
+#ifndef __FP_FRAC_ADD_3
+#define __FP_FRAC_ADD_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \
+ (r0 = x0 + y0, \
+ r1 = x1 + y1 + (r0 < x0), \
+ r2 = x2 + y2 + (r1 < x1))
+#endif
+
X #ifndef __FP_FRAC_ADD_4
X #define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
X (r0 = x0 + y0, \
@@ -201,18 +523,56 @@
X r3 = x3 + y3 + (r2 < x2))
X #endif
X
+#ifndef __FP_FRAC_SUB_3
+#define __FP_FRAC_SUB_3(r2,r1,r0,x2,x1,x0,y2,y1,y0) \
+ (r0 = x0 - y0, \
+ r1 = x1 - y1 - (r0 > x0), \
+ r2 = x2 - y2 - (r1 > x1))
+#endif
+
X #ifndef __FP_FRAC_SUB_4
X #define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
- (r0 = x0 - y0, \
- r1 = x1 - y1 - (r0 > x0), \
- r2 = x2 - y2 - (r1 > x1), \
+ (r0 = x0 - y0, \
+ r1 = x1 - y1 - (r0 > x0), \
+ r2 = x2 - y2 - (r1 > x1), \
X r3 = x3 - y3 - (r2 > x2))
X #endif
X
+#ifndef __FP_FRAC_DEC_3
+#define __FP_FRAC_DEC_3(x2,x1,x0,y2,y1,y0) \
+ do { \
+ UWtype _t0, _t1; \
+ _t0 = x0; \
+ x0 -= y0; \
+ _t1 = x1; \
+ x1 -= y1 + (x0 > _t0); \
+ x2 -= y2 + (x1 > _t1); \
+ } while (0)
+#endif
+
+#ifndef __FP_FRAC_DEC_4
+#define __FP_FRAC_DEC_4(x3,x2,x1,x0,y3,y2,y1,y0) \
+ do { \
+ UWtype _t0, _t1; \
+ _t0 = x0; \
+ x0 -= y0; \
+ _t1 = x1; \
+ x1 -= y1 + (x0 > _t0); \
+ _t0 = x2; \
+ x2 -= y2 + (x1 > _t1); \
+ x3 -= y3 + (x2 > _t0); \
+ } while (0)
+#endif
+
X #ifndef __FP_FRAC_ADDI_4
-/* I always wanted to be a lisp programmer :-> */
-#define __FP_FRAC_ADDI_4(x3,x2,x1,x0,i) \
- (x3 += ((x2 += ((x1 += ((x0 += i) < x0)) < x1) < x2)))
+#define __FP_FRAC_ADDI_4(x3,x2,x1,x0,i) \
+ do { \
+ UWtype _t; \
+ _t = ((x0 += i) < i); \
+ x1 += _t; _t = (x1 < _t); \
+ x2 += _t; _t = (x2 < _t); \
+ x3 += _t; \
+ } while (0)
X #endif
X
X /* Convert FP values between word sizes. This appears to be more
@@ -222,47 +582,53 @@
X * internally [eg, that 2 word vars are X_f0 and x_f1]. But so do
X * the ones in op-2.h and op-1.h.
X */
-#define _FP_FRAC_CONV_1_4(dfs, sfs, D, S) \
- do { \
- _FP_FRAC_SRS_4(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs), \
- _FP_WFRACBITS_##sfs); \
- D##_f = S##_f[0]; \
+#define _FP_FRAC_CONV_1_4(dfs, sfs, D, S) \
+ do { \


+ if (S##_c != FP_CLS_NAN) \

+ _FP_FRAC_SRS_4(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs), \
+ _FP_WFRACBITS_##sfs); \
+ else \
+ _FP_FRAC_SRL_4(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs)); \
+ D##_f = S##_f[0]; \
X } while (0)
X
-#define _FP_FRAC_CONV_2_4(dfs, sfs, D, S) \
- do { \
- _FP_FRAC_SRS_4(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs), \
- _FP_WFRACBITS_##sfs); \
- D##_f0 = S##_f[0]; \
- D##_f1 = S##_f[1]; \
+#define _FP_FRAC_CONV_2_4(dfs, sfs, D, S) \
+ do { \


+ if (S##_c != FP_CLS_NAN) \

+ _FP_FRAC_SRS_4(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs), \
+ _FP_WFRACBITS_##sfs); \
+ else \
+ _FP_FRAC_SRL_4(S, (_FP_WFRACBITS_##sfs - _FP_WFRACBITS_##dfs)); \
+ D##_f0 = S##_f[0]; \
+ D##_f1 = S##_f[1]; \
X } while (0)
X
X /* Assembly/disassembly for converting to/from integral types.
X * No shifting or overflow handled here.
X */
X /* Put the FP value X into r, which is an integer of size rsize. */
-#define _FP_FRAC_ASSEMBLE_4(r, X, rsize) \
- do { \
- if (rsize <= _FP_W_TYPE_SIZE) \
- r = X##_f[0]; \
- else if (rsize <= 2*_FP_W_TYPE_SIZE) \
- { \
- r = X##_f[1]; \
- r <<= _FP_W_TYPE_SIZE; \
- r += X##_f[0]; \
- } \
- else \
- { \
- /* I'm feeling lazy so we deal with int == 3words (implausible)*/ \
- /* and int == 4words as a single case. */ \
- r = X##_f[3]; \
- r <<= _FP_W_TYPE_SIZE; \
- r += X##_f[2]; \
- r <<= _FP_W_TYPE_SIZE; \
- r += X##_f[1]; \
- r <<= _FP_W_TYPE_SIZE; \
- r += X##_f[0]; \
- } \
+#define _FP_FRAC_ASSEMBLE_4(r, X, rsize) \
+ do { \
+ if (rsize <= _FP_W_TYPE_SIZE) \
+ r = X##_f[0]; \
+ else if (rsize <= 2*_FP_W_TYPE_SIZE) \
+ { \
+ r = X##_f[1]; \
+ r <<= _FP_W_TYPE_SIZE; \
+ r += X##_f[0]; \
+ } \
+ else \
+ { \
+ /* I'm feeling lazy so we deal with int == 3words (implausible)*/ \
+ /* and int == 4words as a single case. */ \
+ r = X##_f[3]; \
+ r <<= _FP_W_TYPE_SIZE; \
+ r += X##_f[2]; \
+ r <<= _FP_W_TYPE_SIZE; \
+ r += X##_f[1]; \
+ r <<= _FP_W_TYPE_SIZE; \
+ r += X##_f[0]; \


+ } \
X } while (0)
X

X /* "No disassemble Number Five!" */
@@ -270,28 +636,26 @@
X * the _f[] array consisting of words of size _FP_W_TYPE_SIZE to avoid
X * having to mask the values we store into it.
X */
-#define _FP_FRAC_DISASSEMBLE_4(X, r, rsize) \
- do { \
- X##_f[0] = r; \
- X##_f[1] = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \
+#define _FP_FRAC_DISASSEMBLE_4(X, r, rsize) \
+ do { \
+ X##_f[0] = r; \
+ X##_f[1] = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE); \
X X##_f[2] = (rsize <= 2*_FP_W_TYPE_SIZE ? 0 : r >> 2*_FP_W_TYPE_SIZE); \
X X##_f[3] = (rsize <= 3*_FP_W_TYPE_SIZE ? 0 : r >> 3*_FP_W_TYPE_SIZE); \
X } while (0);
X
-#define _FP_FRAC_CONV_4_1(dfs, sfs, D, S) \
- do { \
- D##_f[0] = S##_f; \
- D##_f[1] = D##_f[2] = D##_f[3] = 0; \
- _FP_FRAC_SLL_4(D, (_FP_WFRACBITS_##dfs - _FP_WFRACBITS_##sfs)); \
+#define _FP_FRAC_CONV_4_1(dfs, sfs, D, S) \
+ do { \
+ D##_f[0] = S##_f; \
+ D##_f[1] = D##_f[2] = D##_f[3] = 0; \
+ _FP_FRAC_SLL_4(D, (_FP_WFRACBITS_##dfs - _FP_WFRACBITS_##sfs)); \
X } while (0)
X
-#define _FP_FRAC_CONV_4_2(dfs, sfs, D, S) \
- do { \
- D##_f[0] = S##_f0; \
- D##_f[1] = S##_f1; \
- D##_f[2] = D##_f[3] = 0; \
- _FP_FRAC_SLL_4(D, (_FP_WFRACBITS_##dfs - _FP_WFRACBITS_##sfs)); \
+#define _FP_FRAC_CONV_4_2(dfs, sfs, D, S) \
+ do { \
+ D##_f[0] = S##_f0; \
+ D##_f[1] = S##_f1; \
+ D##_f[2] = D##_f[3] = 0; \
+ _FP_FRAC_SLL_4(D, (_FP_WFRACBITS_##dfs - _FP_WFRACBITS_##sfs)); \
X } while (0)
X
-/* FIXME! This has to be written */
-#define _FP_SQRT_MEAT_4(R, S, T, X, q)
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/op-8.h linux/arch/sparc64/math-emu/op-8.h
--- v2.3.3/linux/arch/sparc64/math-emu/op-8.h Wed Dec 31 16:00:00 1969
+++ linux/arch/sparc64/math-emu/op-8.h Sat May 29 11:09:04 1999
@@ -0,0 +1,103 @@
+/* Software floating-point emulation.
+ Basic eight-word fraction declaration and manipulation.


+ Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (r...@cygnus.com),

+ Jakub Jelinek (j...@ultra.linux.cz) and


+ Peter Maydell (pmay...@chiark.greenend.org.uk).
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

+
+/* We need just a few things from here for op-4, if we ever need some
+ other macros, they can be added. */
+#define _FP_FRAC_DECL_8(X) _FP_W_TYPE X##_f[8]
+#define _FP_FRAC_HIGH_8(X) (X##_f[7])
+#define _FP_FRAC_LOW_8(X) (X##_f[0])
+#define _FP_FRAC_WORD_8(X,w) (X##_f[w])
+
+#define _FP_FRAC_SLL_8(X,N) \
+ do { \
+ _FP_I_TYPE _up, _down, _skip, _i; \
+ _skip = (N) / _FP_W_TYPE_SIZE; \
+ _up = (N) % _FP_W_TYPE_SIZE; \
+ _down = _FP_W_TYPE_SIZE - _up; \
+ if (!_up) \
+ for (_i = 7; _i >= _skip; --_i) \
+ X##_f[_i] = X##_f[_i-_skip]; \
+ else \
+ { \
+ for (_i = 7; _i > _skip; --_i) \
+ X##_f[_i] = X##_f[_i-_skip] << _up \
+ | X##_f[_i-_skip-1] >> _down; \
+ X##_f[_i--] = X##_f[0] << _up; \
+ } \
+ for (; _i >= 0; --_i) \
+ X##_f[_i] = 0; \
+ } while (0)
+
+#define _FP_FRAC_SRL_8(X,N) \
+ do { \
+ _FP_I_TYPE _up, _down, _skip, _i; \
+ _skip = (N) / _FP_W_TYPE_SIZE; \
+ _down = (N) % _FP_W_TYPE_SIZE; \
+ _up = _FP_W_TYPE_SIZE - _down; \
+ if (!_down) \
+ for (_i = 0; _i <= 7-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip]; \
+ else \
+ { \
+ for (_i = 0; _i < 7-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip] >> _down \
+ | X##_f[_i+_skip+1] << _up; \
+ X##_f[_i++] = X##_f[7] >> _down; \
+ } \
+ for (; _i < 8; ++_i) \
+ X##_f[_i] = 0; \


+ } while (0)
+
+

+/* Right shift with sticky-lsb.
+ * What this actually means is that we do a standard right-shift,
+ * but that if any of the bits that fall off the right hand side
+ * were one then we always set the LSbit.
+ */
+#define _FP_FRAC_SRS_8(X,N,size) \
+ do { \
+ _FP_I_TYPE _up, _down, _skip, _i; \
+ _FP_W_TYPE _s; \
+ _skip = (N) / _FP_W_TYPE_SIZE; \
+ _down = (N) % _FP_W_TYPE_SIZE; \
+ _up = _FP_W_TYPE_SIZE - _down; \
+ for (_s = _i = 0; _i < _skip; ++_i) \
+ _s |= X##_f[_i]; \
+ _s |= X##_f[_i] << _up; \
+/* s is now != 0 if we want to set the LSbit */ \
+ if (!_down) \
+ for (_i = 0; _i <= 7-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip]; \
+ else \
+ { \
+ for (_i = 0; _i < 7-_skip; ++_i) \
+ X##_f[_i] = X##_f[_i+_skip] >> _down \
+ | X##_f[_i+_skip+1] << _up; \
+ X##_f[_i++] = X##_f[7] >> _down; \
+ } \
+ for (; _i < 8; ++_i) \
+ X##_f[_i] = 0; \
+ /* don't fix the LSB until the very end when we're sure f[0] is stable */ \
+ X##_f[0] |= (_s != 0); \
+ } while (0)
+
diff -u --recursive --new-file v2.3.3/linux/arch/sparc64/math-emu/op-common.h linux/arch/sparc64/math-emu/op-common.h
--- v2.3.3/linux/arch/sparc64/math-emu/op-common.h Wed Mar 10 16:53:37 1999
+++ linux/arch/sparc64/math-emu/op-common.h Sat May 29 11:09:04 1999
@@ -1,3 +1,25 @@
+/* Software floating-point emulation. Common operations.


+ Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (r...@cygnus.com),
+ Jakub Jelinek (j...@ultra.linux.cz),
+ David S. Miller (da...@redhat.com) and
+ Peter Maydell (pmay...@chiark.greenend.org.uk).
+
+ The GNU C Library 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.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
X

X #define _FP_DECL(wc, X) \
X _FP_I_TYPE X##_c, X##_s, X##_e; \
@@ -13,7 +35,7 @@
X switch (X##_e) \
X { \
X default: \
- _FP_FRAC_HIGH_##wc(X) |= _FP_IMPLBIT_##fs; \
+ _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_IMPLBIT_##fs; \
X _FP_FRAC_SLL_##wc(X, _FP_WORKBITS); \
X X##_e -= _FP_EXPBIAS_##fs; \
X X##_c = FP_CLS_NORMAL; \
@@ -31,6 +53,7 @@
X _FP_FRAC_SLL_##wc(X, (_shift+_FP_WORKBITS)); \
X X##_e -= _FP_EXPBIAS_##fs - 1 + _shift; \
X X##_c = FP_CLS_NORMAL; \
+ FP_SET_EXCEPTION(FP_EX_DENORM); \
X } \
X break; \
X \
@@ -38,13 +61,16 @@
X if (_FP_FRAC_ZEROP_##wc(X)) \
X X##_c = FP_CLS_INF; \
X else \
- /* we don't differentiate between signaling and quiet nans */ \
- X##_c = FP_CLS_NAN; \
+ { \
+ X##_c = FP_CLS_NAN; \
+ /* Check for signaling NaN */ \
+ if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \
+ FP_SET_EXCEPTION(FP_EX_INVALID); \
+ } \
X break; \
X } \
X } while (0)
X
-
X /*
X * Before packing the bits back into the native fp result, take care
X * of such mundane things as rounding and overflow. Also, for some
@@ -53,14 +79,14 @@
X */
X
X #define _FP_PACK_CANONICAL(fs, wc, X) \
-({int __ret = 0; \
+do { \
X switch (X##_c) \
X { \
X case FP_CLS_NORMAL: \
X X##_e += _FP_EXPBIAS_##fs; \
X if (X##_e > 0) \
X { \
- __ret |= _FP_ROUND(wc, X); \
+ _FP_ROUND(wc, X); \
X if (_FP_FRAC_OVERP_##wc(fs, X)) \
X { \
X _FP_FRAC_SRL_##wc(X, (_FP_WORKBITS+1)); \
@@ -70,10 +96,33 @@
X _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
X if (X##_e >= _FP_EXPMAX_##fs) \
X { \
- /* overflow to infinity */ \
- X##_e = _FP_EXPMAX_##fs; \
- _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
- __ret |= EFLAG_OVERFLOW; \
+ /* overflow */ \
+ switch (FP_ROUNDMODE) \
+ { \
+ case FP_RND_NEAREST: \
+ X##_c = FP_CLS_INF; \
+ break; \
+ case FP_RND_PINF: \
+ if (!X##_s) X##_c = FP_CLS_INF; \
+ break; \
+ case FP_RND_MINF: \
+ if (X##_s) X##_c = FP_CLS_INF; \
+ break; \
+ } \
+ if (X##_c == FP_CLS_INF) \
+ { \
+ /* Overflow to infinity */ \
+ X##_e = _FP_EXPMAX_##fs; \
+ _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
+ } \
+ else \
+ { \
+ /* Overflow to maximum normal */ \
+ X##_e = _FP_EXPMAX_##fs - 1; \
+ _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \
+ } \
+ FP_SET_EXCEPTION(FP_EX_OVERFLOW); \
+ FP_SET_EXCEPTION(FP_EX_INEXACT); \


SHAR_EOF
true || echo 'restore of patch-2.3.4 failed'
fi

echo 'End of part 09'
echo 'File patch-2.3.4 is continued in part 10'
echo 10 > _shar_seq_.tmp

Thomas...@ciw.uni-karlsruhe.de

unread,
Jun 1, 1999, 3:00:00 AM6/1/99
to
Archive-name: v2.3/patch-2.3.4/part12

#!/bin/sh
# this is part 12 of a 50 - part archive


# do not concatenate these parts, unpack them in order with /bin/sh
# file patch-2.3.4 continued
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck

if test "$Scheck" != 12; then


echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
echo 'x - still skipping patch-2.3.4'
else
echo 'x - continuing with patch-2.3.4'
sed 's/^X//' << 'SHAR_EOF' >> 'patch-2.3.4' &&

X {
X switch (cardtype) {
X default:
- case AVM_CARDTYPE_B1: return "B1";
- case AVM_CARDTYPE_M1: return "M1";
- case AVM_CARDTYPE_M2: return "M2";
- case AVM_CARDTYPE_T1: return "T1";
+ case AVM_CARDTYPE_B1: return "B1-ISA";
+ case AVM_CARDTYPE_B1PCI: return "B1-PCI";
+ case AVM_CARDTYPE_M1: return "M1";
+ case AVM_CARDTYPE_M2: return "M2";
+ case AVM_CARDTYPE_T1: return "T1";
X }
X }
X
@@ -300,7 +339,7 @@
X }
X }
X APPL(appl)->releasing--;
- if (APPL(appl)->releasing == 0) {
+ if (APPL(appl)->releasing <= 0) {
X APPL(appl)->signal = 0;
X APPL_MARK_FREE(appl);
X printk(KERN_INFO "b1capi: appl %d down\n", appl);
@@ -433,6 +472,7 @@
X
X /* -------- card ready callback ------------------------------- */
X
+
X void avmb1_card_ready(avmb1_card * card)
X {
X struct capi_profile *profp =
@@ -441,6 +481,7 @@
X __u16 appl;
X char *cardname, cname[20];
X __u32 flag;
+ int nbchan = profp->nbchannel;
X
X card->cversion.majorversion = 2;
X card->cversion.minorversion = 0;
@@ -453,9 +494,14 @@
X
X for (appl = 1; appl <= CAPI_MAXAPPL; appl++) {
X if (VALID_APPLID(appl) && !APPL(appl)->releasing) {
+ int nconn, want = APPL(appl)->rparam.level3cnt;
+
+ if (want > 0) nconn = want;
+ else nconn = nbchan * -want;
+ if (nconn == 0) nconn = nbchan;
+
X B1_send_register(card->port, appl,
- 1024 * (APPL(appl)->rparam.level3cnt+1),
- APPL(appl)->rparam.level3cnt,
+ 1024 * (nconn+1), nconn,
X APPL(appl)->rparam.datablkcnt,
X APPL(appl)->rparam.datablklen);
X }
@@ -553,8 +599,8 @@
X SA_SHIRQ, card->name, card)) != 0) {
X printk(KERN_ERR "b1capi: unable to get IRQ %d (irqval=%d).\n",
X irq, irqval);
- release_region((unsigned short) port, AVMB1_PORTLEN);
- return -EIO;
+ release_region(port, AVMB1_PORTLEN);
+ return -EBUSY;
X }
X
X card->cardstate = CARD_DETECTED;
@@ -578,8 +624,14 @@
X if (!B1_valid_irq(irq, cardtype)) {
X printk(KERN_WARNING "b1capi: irq %d not valid for %s-card.\n",
X irq, cardtype2str(cardtype));
- return -EIO;
+ return -EINVAL;
+ }
+ if (!B1_valid_port(port, cardtype)) {
+ printk(KERN_WARNING "b1capi: port 0x%x not valid for %s-card.\n",
+ port, cardtype2str(cardtype));
+ return -EINVAL;
X }
+ B1_reset(port);
X if ((rc = B1_detect(port, cardtype)) != 0) {
X printk(KERN_NOTICE "b1capi: NO %s-card at 0x%x (%d)\n",
X cardtype2str(cardtype), port, rc);
@@ -591,10 +643,10 @@
X case AVM_CARDTYPE_M1:
X case AVM_CARDTYPE_M2:
X case AVM_CARDTYPE_B1:
+ case AVM_CARDTYPE_B1PCI:
X printk(KERN_NOTICE "b1capi: AVM-%s-Controller detected at 0x%x\n", cardtype2str(cardtype), port);
X break;
X case AVM_CARDTYPE_T1:
- printk(KERN_NOTICE "b1capi: AVM-%s-Controller may be at 0x%x\n", cardtype2str(cardtype), port);
X break;
X }
X
@@ -603,11 +655,11 @@
X
X int avmb1_probecard(int port, int irq, int cardtype)
X {
- if (check_region((unsigned short) port, AVMB1_PORTLEN)) {
+ if (check_region(port, AVMB1_PORTLEN)) {
X printk(KERN_WARNING
X "b1capi: ports 0x%03x-0x%03x in use.\n",
X port, port + AVMB1_PORTLEN);
- return -EIO;
+ return -EBUSY;
X }
X return avmb1_detectcard(port, irq, cardtype);
X }
@@ -618,11 +670,16 @@
X if (!VALID_CARD(cnr))
X return -ESRCH;
X card = CARD(cnr);
+
X if (card->cardstate == CARD_FREE)
X return -ESRCH;
X if (card->cardstate == CARD_RUNNING)
X avmb1_card_down(card, freeio);
X
+ if (card->cardstate != CARD_FREE)
+ if (card->cardtype == AVM_CARDTYPE_T1)
+ T1_reset(card->port);
+
X free_irq(card->irq, card);
X if (freeio)
X release_region(card->port, AVMB1_PORTLEN);
@@ -667,6 +724,7 @@
X
X static __u16 capi_register(capi_register_params * rparam, __u16 * applidp)
X {
+ int nconn, want = rparam->level3cnt;
X int i;
X int appl;
X
@@ -686,13 +744,20 @@
X memcpy(&APPL(appl)->rparam, rparam, sizeof(capi_register_params));
X
X for (i = 0; i < CAPI_MAXCONTR; i++) {
+ struct capi_profile *profp =
+ (struct capi_profile *)cards[i].version[VER_PROFILE];
+
X if (cards[i].cardstate != CARD_RUNNING)
X continue;
+
+ if (want > 0) nconn = want;
+ else nconn = profp->nbchannel * -want;
+ if (nconn == 0) nconn = profp->nbchannel;
+
X B1_send_register(cards[i].port, appl,
- 1024 * (APPL(appl)->rparam.level3cnt + 1),
- APPL(appl)->rparam.level3cnt,
- APPL(appl)->rparam.datablkcnt,
- APPL(appl)->rparam.datablklen);
+ 1024 * (nconn+1), nconn,
+ APPL(appl)->rparam.datablkcnt,
+ APPL(appl)->rparam.datablklen);
X }
X *applidp = appl;
X printk(KERN_INFO "b1capi: appl %d up\n", appl);
@@ -705,8 +770,6 @@
X struct sk_buff *skb;
X int i;
X
- if (ncards == 0)
- return CAPI_REGNOTINSTALLED;
X if (!VALID_APPLID(applid) || APPL(applid)->releasing)
X return CAPI_ILLAPPNR;
X while ((skb = skb_dequeue(&APPL(applid)->recv_queue)) != 0)
@@ -718,7 +781,7 @@
X APPL(applid)->releasing++;
X B1_send_release(cards[i].port, applid);
X }
- if (APPL(applid)->releasing == 0) {
+ if (APPL(applid)->releasing <= 0) {
X APPL(applid)->signal = 0;
X APPL_MARK_FREE(applid);
X printk(KERN_INFO "b1capi: appl %d down\n", applid);
@@ -863,7 +926,43 @@
X if ((rc = avmb1_probecard(cdef.port, cdef.irq, cdef.cardtype)) != 0)
X return rc;
X
- return avmb1_addcard(cdef.port, cdef.irq, cdef.cardtype);
+ if (cdef.cardtype == AVM_CARDTYPE_T1) {
+ int i;
+ for (i=0; i < CAPI_MAXCONTR; i++) {
+ if ( cards[i].cardstate != CARD_FREE
+ && cards[i].cardtype == AVM_CARDTYPE_T1
+ && cards[i].cardnr == cdef.cardnr) {
+ printk(KERN_ERR
+ "b1capi: T1-HEMA-card-%d already at 0x%x\n",
+ cdef.cardnr, cards[i].port);
+ return -EBUSY;
+ }
+ }
+ rc = T1_detectandinit(cdef.port,cdef.irq,cdef.cardnr);
+ if (rc) {
+ printk(KERN_NOTICE "b1capi: NO T1-HEMA-card-%d at 0x%x (%d)\n",
+ cdef.cardnr, cdef.port, rc);
+ return -EIO;
+ }
+ printk(KERN_NOTICE "b1capi: T1-HEMA-card-%d at 0x%x\n",
+ cdef.cardnr, cdef.port);
+ }
+
+ rc = avmb1_addcard(cdef.port, cdef.irq, cdef.cardtype);
+ if (rc < 0)
+ return rc;
+ /* don't want to change interface t
+ addcard/probecard/registercard */
+ if (cdef.cardtype == AVM_CARDTYPE_T1) {
+ int i;
+ for (i=0; i < CAPI_MAXCONTR; i++) {
+ if (cards[i].cnr == rc) {
+ cards[i].cardnr = cdef.cardnr;


+ break;
+ }
+ }
+ }

+ return rc;
X
X case AVMB1_LOAD:
X case AVMB1_LOAD_AND_CONFIG:
@@ -883,8 +982,7 @@
X return -ESRCH;
X
X if (ldef.t4file.len <= 0) {
- if (loaddebug)
- printk(KERN_DEBUG "b1capi: load: invalid parameter length of t4file is %d ?\n", ldef.t4file.len);
+ printk(KERN_DEBUG "b1capi: load: invalid parameter: length of t4file is %d ?\n", ldef.t4file.len);
X return -EINVAL;
X }
X
@@ -906,12 +1004,19 @@
X }
X
X B1_reset(card->port);
+
+ if (loaddebug) {
+ printk(KERN_DEBUG "b1capi: loading contr %d\n",
+ ldef.contr);
+ }
+
X if ((rc = B1_load_t4file(card->port, &ldef.t4file))) {
X B1_reset(card->port);
X printk(KERN_ERR "b1capi: failed to load t4file!!\n");
X card->cardstate = CARD_D