From d7db594b8d1dab36b711bd887a9dd21675c87243 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 28 Jan 2015 10:07:51 -0800 Subject: [PATCH] Switch kernel header parsing to python libclang Replace the tokenizer in cpp.py with libclang. Bug: 18937958 Change-Id: I27630904c6d2849418cd5ca3d3c612ec3078686d --- libc/kernel/tools/clean_header.py | 14 +- libc/kernel/tools/cpp.py | 2153 ++++++++++---------- libc/kernel/uapi/asm-arm/asm/a.out.h | 24 +- libc/kernel/uapi/asm-arm/asm/kvm.h | 24 +- libc/kernel/uapi/asm-arm/asm/mman.h | 2 +- libc/kernel/uapi/asm-arm/asm/perf_regs.h | 34 +- libc/kernel/uapi/asm-arm/asm/ptrace.h | 4 +- libc/kernel/uapi/asm-arm/asm/setup.h | 126 +- libc/kernel/uapi/asm-arm/asm/sigcontext.h | 42 +- libc/kernel/uapi/asm-arm/asm/signal.h | 20 +- libc/kernel/uapi/asm-arm/asm/stat.h | 96 +- libc/kernel/uapi/asm-arm/asm/statfs.h | 2 +- libc/kernel/uapi/asm-arm/asm/unistd.h | 900 ++++---- libc/kernel/uapi/asm-arm64/asm/kvm.h | 20 +- libc/kernel/uapi/asm-arm64/asm/perf_regs.h | 68 +- libc/kernel/uapi/asm-arm64/asm/ptrace.h | 28 +- libc/kernel/uapi/asm-arm64/asm/sigcontext.h | 28 +- libc/kernel/uapi/asm-arm64/asm/statfs.h | 2 +- libc/kernel/uapi/asm-generic/fcntl.h | 30 +- libc/kernel/uapi/asm-generic/ioctl.h | 32 +- libc/kernel/uapi/asm-generic/ipcbuf.h | 22 +- libc/kernel/uapi/asm-generic/msgbuf.h | 28 +- libc/kernel/uapi/asm-generic/param.h | 2 +- libc/kernel/uapi/asm-generic/poll.h | 6 +- libc/kernel/uapi/asm-generic/posix_types.h | 2 +- libc/kernel/uapi/asm-generic/sembuf.h | 16 +- libc/kernel/uapi/asm-generic/shmbuf.h | 44 +- libc/kernel/uapi/asm-generic/siginfo.h | 222 +- libc/kernel/uapi/asm-generic/signal-defs.h | 10 +- libc/kernel/uapi/asm-generic/signal.h | 16 +- libc/kernel/uapi/asm-generic/stat.h | 80 +- libc/kernel/uapi/asm-generic/statfs.h | 72 +- libc/kernel/uapi/asm-generic/termbits.h | 44 +- libc/kernel/uapi/asm-generic/termios.h | 20 +- libc/kernel/uapi/asm-generic/ucontext.h | 10 +- libc/kernel/uapi/asm-generic/unistd.h | 22 +- libc/kernel/uapi/asm-mips/asm/bitfield.h | 2 +- libc/kernel/uapi/asm-mips/asm/cachectl.h | 6 +- libc/kernel/uapi/asm-mips/asm/fcntl.h | 16 +- libc/kernel/uapi/asm-mips/asm/inst.h | 1404 +++++++------ libc/kernel/uapi/asm-mips/asm/kvm.h | 34 +- libc/kernel/uapi/asm-mips/asm/msgbuf.h | 28 +- libc/kernel/uapi/asm-mips/asm/posix_types.h | 2 +- libc/kernel/uapi/asm-mips/asm/ptrace.h | 46 +- libc/kernel/uapi/asm-mips/asm/reg.h | 2 +- libc/kernel/uapi/asm-mips/asm/sembuf.h | 12 +- libc/kernel/uapi/asm-mips/asm/sgidefs.h | 2 +- libc/kernel/uapi/asm-mips/asm/shmbuf.h | 38 +- libc/kernel/uapi/asm-mips/asm/sigcontext.h | 66 +- libc/kernel/uapi/asm-mips/asm/siginfo.h | 128 +- libc/kernel/uapi/asm-mips/asm/signal.h | 14 +- libc/kernel/uapi/asm-mips/asm/stat.h | 144 +- libc/kernel/uapi/asm-mips/asm/statfs.h | 106 +- libc/kernel/uapi/asm-mips/asm/termbits.h | 44 +- libc/kernel/uapi/asm-mips/asm/termios.h | 54 +- libc/kernel/uapi/asm-x86/asm/a.out.h | 23 +- libc/kernel/uapi/asm-x86/asm/bootparam.h | 240 +-- libc/kernel/uapi/asm-x86/asm/debugreg.h | 2 +- libc/kernel/uapi/asm-x86/asm/e820.h | 10 +- libc/kernel/uapi/asm-x86/asm/hyperv.h | 14 +- libc/kernel/uapi/asm-x86/asm/ist.h | 8 +- libc/kernel/uapi/asm-x86/asm/kvm.h | 358 ++-- libc/kernel/uapi/asm-x86/asm/kvm_para.h | 34 +- libc/kernel/uapi/asm-x86/asm/ldt.h | 20 +- libc/kernel/uapi/asm-x86/asm/mce.h | 38 +- libc/kernel/uapi/asm-x86/asm/msr-index.h | 40 +- libc/kernel/uapi/asm-x86/asm/mtrr.h | 48 +- libc/kernel/uapi/asm-x86/asm/perf_regs.h | 52 +- libc/kernel/uapi/asm-x86/asm/processor-flags.h | 6 +- libc/kernel/uapi/asm-x86/asm/ptrace.h | 76 +- libc/kernel/uapi/asm-x86/asm/sembuf.h | 16 +- libc/kernel/uapi/asm-x86/asm/sigcontext.h | 232 +-- libc/kernel/uapi/asm-x86/asm/sigcontext32.h | 96 +- libc/kernel/uapi/asm-x86/asm/signal.h | 28 +- libc/kernel/uapi/asm-x86/asm/stat.h | 157 +- libc/kernel/uapi/asm-x86/asm/statfs.h | 2 +- libc/kernel/uapi/asm-x86/asm/svm.h | 4 +- libc/kernel/uapi/asm-x86/asm/vm86.h | 94 +- libc/kernel/uapi/asm-x86/asm/vmx.h | 2 +- libc/kernel/uapi/asm-x86/asm/vsyscall.h | 8 +- libc/kernel/uapi/drm/armada_drm.h | 30 +- libc/kernel/uapi/drm/drm.h | 480 ++--- libc/kernel/uapi/drm/drm_fourcc.h | 4 +- libc/kernel/uapi/drm/drm_mode.h | 390 ++-- libc/kernel/uapi/drm/drm_sarea.h | 24 +- libc/kernel/uapi/drm/exynos_drm.h | 283 ++- libc/kernel/uapi/drm/i810_drm.h | 214 +- libc/kernel/uapi/drm/i915_drm.h | 632 +++--- libc/kernel/uapi/drm/mga_drm.h | 276 +-- libc/kernel/uapi/drm/msm_drm.h | 86 +- libc/kernel/uapi/drm/nouveau_drm.h | 92 +- libc/kernel/uapi/drm/omap_drm.h | 54 +- libc/kernel/uapi/drm/qxl_drm.h | 86 +- libc/kernel/uapi/drm/r128_drm.h | 268 +-- libc/kernel/uapi/drm/radeon_drm.h | 793 ++++--- libc/kernel/uapi/drm/savage_drm.h | 203 +- libc/kernel/uapi/drm/sis_drm.h | 20 +- libc/kernel/uapi/drm/tegra_drm.h | 136 +- libc/kernel/uapi/drm/via_drm.h | 184 +- libc/kernel/uapi/drm/vmwgfx_drm.h | 312 +-- libc/kernel/uapi/linux/a.out.h | 85 +- libc/kernel/uapi/linux/acct.h | 120 +- libc/kernel/uapi/linux/adb.h | 4 +- libc/kernel/uapi/linux/adfs_fs.h | 62 +- libc/kernel/uapi/linux/affs_hardblocks.h | 96 +- libc/kernel/uapi/linux/agpgart.h | 72 +- libc/kernel/uapi/linux/aio_abi.h | 48 +- libc/kernel/uapi/linux/android_alarm.h | 35 +- libc/kernel/uapi/linux/apm_bios.h | 18 +- libc/kernel/uapi/linux/ashmem.h | 4 +- libc/kernel/uapi/linux/atalk.h | 26 +- libc/kernel/uapi/linux/atm.h | 112 +- libc/kernel/uapi/linux/atm_eni.h | 6 +- libc/kernel/uapi/linux/atm_he.h | 4 +- libc/kernel/uapi/linux/atm_idt77105.h | 12 +- libc/kernel/uapi/linux/atm_nicstar.h | 29 +- libc/kernel/uapi/linux/atm_tcp.h | 24 +- libc/kernel/uapi/linux/atm_zatm.h | 26 +- libc/kernel/uapi/linux/atmapi.h | 4 +- libc/kernel/uapi/linux/atmarp.h | 24 +- libc/kernel/uapi/linux/atmbr2684.h | 54 +- libc/kernel/uapi/linux/atmclip.h | 2 +- libc/kernel/uapi/linux/atmdev.h | 96 +- libc/kernel/uapi/linux/atmlec.h | 98 +- libc/kernel/uapi/linux/atmmpc.h | 80 +- libc/kernel/uapi/linux/atmppp.h | 4 +- libc/kernel/uapi/linux/atmsap.h | 76 +- libc/kernel/uapi/linux/atmsvc.h | 53 +- libc/kernel/uapi/linux/audit.h | 134 +- libc/kernel/uapi/linux/auto_fs.h | 32 +- libc/kernel/uapi/linux/auto_fs4.h | 60 +- libc/kernel/uapi/linux/ax25.h | 102 +- libc/kernel/uapi/linux/b1lli.h | 34 +- libc/kernel/uapi/linux/baycom.h | 14 +- libc/kernel/uapi/linux/bcache.h | 212 +- libc/kernel/uapi/linux/bcm933xx_hcs.h | 22 +- libc/kernel/uapi/linux/bfs_fs.h | 66 +- libc/kernel/uapi/linux/binder.h | 189 +- libc/kernel/uapi/linux/blkpg.h | 20 +- libc/kernel/uapi/linux/blktrace_api.h | 142 +- libc/kernel/uapi/linux/bpf.h | 110 +- libc/kernel/uapi/linux/bpqether.h | 26 +- libc/kernel/uapi/linux/bsg.h | 66 +- libc/kernel/uapi/linux/btrfs.h | 502 ++--- libc/kernel/uapi/linux/byteorder/big_endian.h | 68 +- libc/kernel/uapi/linux/byteorder/little_endian.h | 68 +- libc/kernel/uapi/linux/caif/caif_socket.h | 98 +- libc/kernel/uapi/linux/caif/if_caif.h | 12 +- libc/kernel/uapi/linux/can.h | 38 +- libc/kernel/uapi/linux/can/bcm.h | 38 +- libc/kernel/uapi/linux/can/gw.h | 80 +- libc/kernel/uapi/linux/can/netlink.h | 94 +- libc/kernel/uapi/linux/can/raw.h | 10 +- libc/kernel/uapi/linux/capability.h | 28 +- libc/kernel/uapi/linux/capi.h | 76 +- libc/kernel/uapi/linux/cciss_defs.h | 114 +- libc/kernel/uapi/linux/cciss_ioctl.h | 66 +- libc/kernel/uapi/linux/cdrom.h | 773 ++++--- libc/kernel/uapi/linux/cgroupstats.h | 30 +- libc/kernel/uapi/linux/chio.h | 118 +- libc/kernel/uapi/linux/cm4000_cs.h | 30 +- libc/kernel/uapi/linux/cn_proc.h | 166 +- libc/kernel/uapi/linux/coda.h | 545 ++--- libc/kernel/uapi/linux/coda_psdev.h | 16 +- libc/kernel/uapi/linux/coff.h | 234 ++- libc/kernel/uapi/linux/connector.h | 16 +- libc/kernel/uapi/linux/const.h | 10 +- libc/kernel/uapi/linux/cramfs_fs.h | 32 +- libc/kernel/uapi/linux/cyclades.h | 258 +-- libc/kernel/uapi/linux/cycx_cfm.h | 42 +- libc/kernel/uapi/linux/dcbnl.h | 490 ++--- libc/kernel/uapi/linux/dccp.h | 198 +- libc/kernel/uapi/linux/dlm.h | 8 +- libc/kernel/uapi/linux/dlm_device.h | 78 +- libc/kernel/uapi/linux/dlm_netlink.h | 46 +- libc/kernel/uapi/linux/dlm_plock.h | 32 +- libc/kernel/uapi/linux/dlmconstants.h | 2 +- libc/kernel/uapi/linux/dm-ioctl.h | 98 +- libc/kernel/uapi/linux/dm-log-userspace.h | 20 +- libc/kernel/uapi/linux/dn.h | 52 +- libc/kernel/uapi/linux/dqblk_xfs.h | 178 +- libc/kernel/uapi/linux/dvb/audio.h | 63 +- libc/kernel/uapi/linux/dvb/ca.h | 36 +- libc/kernel/uapi/linux/dvb/dmx.h | 147 +- libc/kernel/uapi/linux/dvb/frontend.h | 484 ++--- libc/kernel/uapi/linux/dvb/net.h | 10 +- libc/kernel/uapi/linux/dvb/osd.h | 122 +- libc/kernel/uapi/linux/dvb/video.h | 154 +- libc/kernel/uapi/linux/edd.h | 268 +-- libc/kernel/uapi/linux/efs_fs_sb.h | 58 +- libc/kernel/uapi/linux/elf-fdpic.h | 12 +- libc/kernel/uapi/linux/elf.h | 214 +- libc/kernel/uapi/linux/elfcore.h | 68 +- libc/kernel/uapi/linux/errqueue.h | 24 +- libc/kernel/uapi/linux/ethtool.h | 530 ++--- libc/kernel/uapi/linux/eventpoll.h | 4 +- libc/kernel/uapi/linux/fanotify.h | 36 +- libc/kernel/uapi/linux/fb.h | 204 +- libc/kernel/uapi/linux/fcntl.h | 4 +- libc/kernel/uapi/linux/fd.h | 238 +-- libc/kernel/uapi/linux/fdreg.h | 10 +- libc/kernel/uapi/linux/fib_rules.h | 76 +- libc/kernel/uapi/linux/fiemap.h | 26 +- libc/kernel/uapi/linux/filter.h | 22 +- libc/kernel/uapi/linux/firewire-cdev.h | 262 +-- libc/kernel/uapi/linux/flat.h | 24 +- libc/kernel/uapi/linux/fou.h | 26 +- libc/kernel/uapi/linux/fs.h | 122 +- libc/kernel/uapi/linux/fsl_hypervisor.h | 70 +- libc/kernel/uapi/linux/fuse.h | 582 +++--- libc/kernel/uapi/linux/futex.h | 14 +- libc/kernel/uapi/linux/gen_stats.h | 46 +- libc/kernel/uapi/linux/genetlink.h | 62 +- libc/kernel/uapi/linux/genwqe/genwqe_card.h | 130 +- libc/kernel/uapi/linux/gfs2_ondisk.h | 320 +-- libc/kernel/uapi/linux/hash_info.h | 36 +- libc/kernel/uapi/linux/hdlc/ioctl.h | 44 +- libc/kernel/uapi/linux/hdlcdrv.h | 80 +- libc/kernel/uapi/linux/hdreg.h | 324 +-- libc/kernel/uapi/linux/hiddev.h | 84 +- libc/kernel/uapi/linux/hidraw.h | 14 +- libc/kernel/uapi/linux/hpet.h | 8 +- libc/kernel/uapi/linux/hsi/hsi_char.h | 20 +- libc/kernel/uapi/linux/hsr_netlink.h | 40 +- libc/kernel/uapi/linux/hw_breakpoint.h | 26 +- libc/kernel/uapi/linux/hyperv.h | 184 +- libc/kernel/uapi/linux/i2c-dev.h | 12 +- libc/kernel/uapi/linux/i2c.h | 26 +- libc/kernel/uapi/linux/i2o-dev.h | 300 +-- libc/kernel/uapi/linux/i8k.h | 10 +- libc/kernel/uapi/linux/icmp.h | 30 +- libc/kernel/uapi/linux/icmpv6.h | 97 +- libc/kernel/uapi/linux/if.h | 169 +- libc/kernel/uapi/linux/if_addr.h | 42 +- libc/kernel/uapi/linux/if_addrlabel.h | 18 +- libc/kernel/uapi/linux/if_alg.h | 14 +- libc/kernel/uapi/linux/if_arcnet.h | 52 +- libc/kernel/uapi/linux/if_arp.h | 28 +- libc/kernel/uapi/linux/if_bonding.h | 26 +- libc/kernel/uapi/linux/if_bridge.h | 164 +- libc/kernel/uapi/linux/if_cablemodem.h | 12 +- libc/kernel/uapi/linux/if_eql.h | 14 +- libc/kernel/uapi/linux/if_ether.h | 6 +- libc/kernel/uapi/linux/if_fc.h | 16 +- libc/kernel/uapi/linux/if_fddi.h | 40 +- libc/kernel/uapi/linux/if_frad.h | 78 +- libc/kernel/uapi/linux/if_hippi.h | 99 +- libc/kernel/uapi/linux/if_link.h | 614 +++--- libc/kernel/uapi/linux/if_packet.h | 186 +- libc/kernel/uapi/linux/if_plip.h | 6 +- libc/kernel/uapi/linux/if_pppol2tp.h | 58 +- libc/kernel/uapi/linux/if_pppolac.h | 12 +- libc/kernel/uapi/linux/if_pppopns.h | 10 +- libc/kernel/uapi/linux/if_pppox.h | 74 +- libc/kernel/uapi/linux/if_slip.h | 10 +- libc/kernel/uapi/linux/if_team.h | 78 +- libc/kernel/uapi/linux/if_tun.h | 10 +- libc/kernel/uapi/linux/if_tunnel.h | 156 +- libc/kernel/uapi/linux/if_vlan.h | 60 +- libc/kernel/uapi/linux/igmp.h | 53 +- libc/kernel/uapi/linux/in.h | 133 +- libc/kernel/uapi/linux/in6.h | 40 +- libc/kernel/uapi/linux/in_route.h | 4 +- libc/kernel/uapi/linux/inet_diag.h | 140 +- libc/kernel/uapi/linux/inotify.h | 12 +- libc/kernel/uapi/linux/input.h | 142 +- libc/kernel/uapi/linux/ion.h | 36 +- libc/kernel/uapi/linux/ion_test.h | 16 +- libc/kernel/uapi/linux/ioprio.h | 16 +- libc/kernel/uapi/linux/ip.h | 170 +- libc/kernel/uapi/linux/ip6_tunnel.h | 44 +- libc/kernel/uapi/linux/ip_vs.h | 356 ++-- libc/kernel/uapi/linux/ipc.h | 37 +- libc/kernel/uapi/linux/ipmi.h | 120 +- libc/kernel/uapi/linux/ipsec.h | 38 +- libc/kernel/uapi/linux/ipv6.h | 154 +- libc/kernel/uapi/linux/ipv6_route.h | 24 +- libc/kernel/uapi/linux/ipx.h | 42 +- libc/kernel/uapi/linux/irda.h | 152 +- libc/kernel/uapi/linux/isdn.h | 146 +- libc/kernel/uapi/linux/isdn/capicmd.h | 136 +- libc/kernel/uapi/linux/isdn_ppp.h | 48 +- libc/kernel/uapi/linux/iso_fs.h | 258 +-- libc/kernel/uapi/linux/ivtv.h | 20 +- libc/kernel/uapi/linux/ivtvfb.h | 8 +- libc/kernel/uapi/linux/ixjuser.h | 590 +++--- libc/kernel/uapi/linux/jffs2.h | 211 +- libc/kernel/uapi/linux/joystick.h | 44 +- libc/kernel/uapi/linux/kd.h | 64 +- libc/kernel/uapi/linux/kdev_t.h | 4 +- libc/kernel/uapi/linux/kernel.h | 4 +- libc/kernel/uapi/linux/kernelcapi.h | 14 +- libc/kernel/uapi/linux/kexec.h | 16 +- libc/kernel/uapi/linux/keyboard.h | 900 ++++---- libc/kernel/uapi/linux/keychord.h | 8 +- libc/kernel/uapi/linux/keyctl.h | 18 +- libc/kernel/uapi/linux/kvm.h | 738 +++---- libc/kernel/uapi/linux/l2tp.h | 193 +- libc/kernel/uapi/linux/llc.h | 62 +- libc/kernel/uapi/linux/loop.h | 56 +- libc/kernel/uapi/linux/major.h | 2 +- libc/kernel/uapi/linux/map_to_7segment.h | 28 +- libc/kernel/uapi/linux/matroxfb.h | 22 +- libc/kernel/uapi/linux/mdio.h | 2 +- libc/kernel/uapi/linux/media.h | 104 +- libc/kernel/uapi/linux/mei.h | 16 +- libc/kernel/uapi/linux/mempolicy.h | 38 +- libc/kernel/uapi/linux/meye.h | 24 +- libc/kernel/uapi/linux/mic_common.h | 98 +- libc/kernel/uapi/linux/mic_ioctl.h | 10 +- libc/kernel/uapi/linux/mii.h | 12 +- libc/kernel/uapi/linux/minix_fs.h | 98 +- libc/kernel/uapi/linux/mmc/ioctl.h | 30 +- libc/kernel/uapi/linux/mpls.h | 2 +- libc/kernel/uapi/linux/mqueue.h | 10 +- libc/kernel/uapi/linux/mroute.h | 110 +- libc/kernel/uapi/linux/mroute6.h | 90 +- libc/kernel/uapi/linux/msdos_fs.h | 162 +- libc/kernel/uapi/linux/msg.h | 46 +- libc/kernel/uapi/linux/mtio.h | 20 +- libc/kernel/uapi/linux/n_r3964.h | 18 +- libc/kernel/uapi/linux/nbd.h | 48 +- libc/kernel/uapi/linux/ncp.h | 148 +- libc/kernel/uapi/linux/ncp_fs.h | 110 +- libc/kernel/uapi/linux/ncp_mount.h | 46 +- libc/kernel/uapi/linux/ncp_no.h | 12 +- libc/kernel/uapi/linux/neighbour.h | 148 +- libc/kernel/uapi/linux/net.h | 10 +- libc/kernel/uapi/linux/net_dropmon.h | 39 +- libc/kernel/uapi/linux/net_tstamp.h | 69 +- libc/kernel/uapi/linux/netconf.h | 20 +- libc/kernel/uapi/linux/netdevice.h | 14 +- libc/kernel/uapi/linux/netfilter.h | 40 +- libc/kernel/uapi/linux/netfilter/ipset/ip_set.h | 394 ++-- .../uapi/linux/netfilter/ipset/ip_set_bitmap.h | 4 +- .../uapi/linux/netfilter/ipset/ip_set_hash.h | 12 +- .../uapi/linux/netfilter/ipset/ip_set_list.h | 12 +- .../uapi/linux/netfilter/nf_conntrack_common.h | 118 +- .../kernel/uapi/linux/netfilter/nf_conntrack_ftp.h | 8 +- .../uapi/linux/netfilter/nf_conntrack_sctp.h | 22 +- .../kernel/uapi/linux/netfilter/nf_conntrack_tcp.h | 38 +- .../linux/netfilter/nf_conntrack_tuple_common.h | 44 +- libc/kernel/uapi/linux/netfilter/nf_nat.h | 28 +- libc/kernel/uapi/linux/netfilter/nf_tables.h | 528 ++--- .../kernel/uapi/linux/netfilter/nf_tables_compat.h | 34 +- libc/kernel/uapi/linux/netfilter/nfnetlink.h | 28 +- libc/kernel/uapi/linux/netfilter/nfnetlink_acct.h | 44 +- .../kernel/uapi/linux/netfilter/nfnetlink_compat.h | 23 +- .../uapi/linux/netfilter/nfnetlink_conntrack.h | 334 +-- .../uapi/linux/netfilter/nfnetlink_cthelper.h | 58 +- .../uapi/linux/netfilter/nfnetlink_cttimeout.h | 130 +- libc/kernel/uapi/linux/netfilter/nfnetlink_log.h | 108 +- libc/kernel/uapi/linux/netfilter/nfnetlink_queue.h | 124 +- libc/kernel/uapi/linux/netfilter/x_tables.h | 106 +- libc/kernel/uapi/linux/netfilter/xt_AUDIT.h | 10 +- libc/kernel/uapi/linux/netfilter/xt_CHECKSUM.h | 2 +- libc/kernel/uapi/linux/netfilter/xt_CLASSIFY.h | 2 +- libc/kernel/uapi/linux/netfilter/xt_CONNSECMARK.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_CT.h | 32 +- libc/kernel/uapi/linux/netfilter/xt_DSCP.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_HMARK.h | 68 +- libc/kernel/uapi/linux/netfilter/xt_IDLETIMER.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_LED.h | 8 +- libc/kernel/uapi/linux/netfilter/xt_LOG.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_NFLOG.h | 12 +- libc/kernel/uapi/linux/netfilter/xt_NFQUEUE.h | 18 +- libc/kernel/uapi/linux/netfilter/xt_RATEEST.h | 8 +- libc/kernel/uapi/linux/netfilter/xt_SECMARK.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_SYNPROXY.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_TCPMSS.h | 2 +- libc/kernel/uapi/linux/netfilter/xt_TCPOPTSTRIP.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_TEE.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_TPROXY.h | 16 +- libc/kernel/uapi/linux/netfilter/xt_addrtype.h | 46 +- libc/kernel/uapi/linux/netfilter/xt_bpf.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_cgroup.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_cluster.h | 10 +- libc/kernel/uapi/linux/netfilter/xt_comment.h | 2 +- libc/kernel/uapi/linux/netfilter/xt_connbytes.h | 24 +- libc/kernel/uapi/linux/netfilter/xt_connlabel.h | 8 +- libc/kernel/uapi/linux/netfilter/xt_connlimit.h | 24 +- libc/kernel/uapi/linux/netfilter/xt_connmark.h | 14 +- libc/kernel/uapi/linux/netfilter/xt_conntrack.h | 94 +- libc/kernel/uapi/linux/netfilter/xt_cpu.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_dccp.h | 12 +- libc/kernel/uapi/linux/netfilter/xt_devgroup.h | 18 +- libc/kernel/uapi/linux/netfilter/xt_dscp.h | 10 +- libc/kernel/uapi/linux/netfilter/xt_ecn.h | 16 +- libc/kernel/uapi/linux/netfilter/xt_esp.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_hashlimit.h | 62 +- libc/kernel/uapi/linux/netfilter/xt_helper.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_ipcomp.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_iprange.h | 14 +- libc/kernel/uapi/linux/netfilter/xt_ipvs.h | 32 +- libc/kernel/uapi/linux/netfilter/xt_l2tp.h | 22 +- libc/kernel/uapi/linux/netfilter/xt_length.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_limit.h | 12 +- libc/kernel/uapi/linux/netfilter/xt_mac.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_mark.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_multiport.h | 22 +- libc/kernel/uapi/linux/netfilter/xt_nfacct.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_osf.h | 94 +- libc/kernel/uapi/linux/netfilter/xt_owner.h | 12 +- libc/kernel/uapi/linux/netfilter/xt_physdev.h | 12 +- libc/kernel/uapi/linux/netfilter/xt_pkttype.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_policy.h | 59 +- libc/kernel/uapi/linux/netfilter/xt_quota.h | 10 +- libc/kernel/uapi/linux/netfilter/xt_rateest.h | 40 +- libc/kernel/uapi/linux/netfilter/xt_realm.h | 6 +- libc/kernel/uapi/linux/netfilter/xt_recent.h | 50 +- libc/kernel/uapi/linux/netfilter/xt_rpfilter.h | 10 +- libc/kernel/uapi/linux/netfilter/xt_sctp.h | 40 +- libc/kernel/uapi/linux/netfilter/xt_set.h | 62 +- libc/kernel/uapi/linux/netfilter/xt_socket.h | 8 +- libc/kernel/uapi/linux/netfilter/xt_state.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_statistic.h | 34 +- libc/kernel/uapi/linux/netfilter/xt_string.h | 32 +- libc/kernel/uapi/linux/netfilter/xt_tcpmss.h | 4 +- libc/kernel/uapi/linux/netfilter/xt_tcpudp.h | 18 +- libc/kernel/uapi/linux/netfilter/xt_time.h | 28 +- libc/kernel/uapi/linux/netfilter/xt_u32.h | 30 +- libc/kernel/uapi/linux/netfilter_arp/arp_tables.h | 87 +- libc/kernel/uapi/linux/netfilter_arp/arpt_mangle.h | 27 +- .../kernel/uapi/linux/netfilter_bridge/ebt_802_3.h | 42 +- .../kernel/uapi/linux/netfilter_bridge/ebt_among.h | 22 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_arp.h | 33 +- .../uapi/linux/netfilter_bridge/ebt_arpreply.h | 4 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_ip.h | 22 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_ip6.h | 34 +- .../kernel/uapi/linux/netfilter_bridge/ebt_limit.h | 10 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_log.h | 6 +- .../uapi/linux/netfilter_bridge/ebt_mark_m.h | 6 +- .../uapi/linux/netfilter_bridge/ebt_mark_t.h | 4 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_nat.h | 4 +- .../kernel/uapi/linux/netfilter_bridge/ebt_nflog.h | 12 +- .../uapi/linux/netfilter_bridge/ebt_pkttype.h | 4 +- .../uapi/linux/netfilter_bridge/ebt_redirect.h | 2 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_stp.h | 30 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_ulog.h | 31 +- libc/kernel/uapi/linux/netfilter_bridge/ebt_vlan.h | 10 +- libc/kernel/uapi/linux/netfilter_bridge/ebtables.h | 156 +- libc/kernel/uapi/linux/netfilter_decnet.h | 28 +- libc/kernel/uapi/linux/netfilter_ipv4.h | 28 +- libc/kernel/uapi/linux/netfilter_ipv4/ip_tables.h | 81 +- .../uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h | 22 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_ECN.h | 14 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_LOG.h | 6 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_REJECT.h | 20 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_TTL.h | 10 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_ULOG.h | 30 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_ah.h | 4 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_ecn.h | 10 +- libc/kernel/uapi/linux/netfilter_ipv4/ipt_ttl.h | 12 +- libc/kernel/uapi/linux/netfilter_ipv6.h | 26 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6_tables.h | 104 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_HL.h | 10 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 6 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_NPT.h | 10 +- .../kernel/uapi/linux/netfilter_ipv6/ip6t_REJECT.h | 16 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_ah.h | 8 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_frag.h | 8 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_hl.h | 12 +- .../uapi/linux/netfilter_ipv6/ip6t_ipv6header.h | 6 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_mh.h | 4 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_opts.h | 10 +- libc/kernel/uapi/linux/netfilter_ipv6/ip6t_rt.h | 14 +- libc/kernel/uapi/linux/netlink.h | 72 +- libc/kernel/uapi/linux/netlink_diag.h | 48 +- libc/kernel/uapi/linux/netrom.h | 20 +- libc/kernel/uapi/linux/nfc.h | 187 +- libc/kernel/uapi/linux/nfs.h | 202 +- libc/kernel/uapi/linux/nfs2.h | 22 +- libc/kernel/uapi/linux/nfs3.h | 30 +- libc/kernel/uapi/linux/nfs4.h | 10 +- libc/kernel/uapi/linux/nfs4_mount.h | 40 +- libc/kernel/uapi/linux/nfs_fs.h | 4 +- libc/kernel/uapi/linux/nfs_idmap.h | 10 +- libc/kernel/uapi/linux/nfs_mount.h | 38 +- libc/kernel/uapi/linux/nfsd/cld.h | 28 +- libc/kernel/uapi/linux/nfsd/export.h | 2 +- libc/kernel/uapi/linux/nfsd/nfsfh.h | 36 +- libc/kernel/uapi/linux/nfsd/stats.h | 2 +- libc/kernel/uapi/linux/nl80211.h | 1949 +++++++++--------- libc/kernel/uapi/linux/nubus.h | 275 ++- libc/kernel/uapi/linux/nvme.h | 798 ++++---- libc/kernel/uapi/linux/nvram.h | 2 +- libc/kernel/uapi/linux/omap3isp.h | 330 +-- libc/kernel/uapi/linux/omapfb.h | 168 +- libc/kernel/uapi/linux/oom.h | 6 +- libc/kernel/uapi/linux/openvswitch.h | 348 ++-- libc/kernel/uapi/linux/packet_diag.h | 78 +- libc/kernel/uapi/linux/parport.h | 86 +- libc/kernel/uapi/linux/patchkey.h | 6 +- libc/kernel/uapi/linux/pci.h | 2 +- libc/kernel/uapi/linux/perf_event.h | 473 ++--- libc/kernel/uapi/linux/personality.h | 71 +- libc/kernel/uapi/linux/pfkeyv2.h | 260 +-- libc/kernel/uapi/linux/pg.h | 20 +- libc/kernel/uapi/linux/phantom.h | 10 +- libc/kernel/uapi/linux/phonet.h | 54 +- libc/kernel/uapi/linux/pkt_cls.h | 420 ++-- libc/kernel/uapi/linux/pkt_sched.h | 800 ++++---- libc/kernel/uapi/linux/pktcdvd.h | 12 +- libc/kernel/uapi/linux/pmu.h | 36 +- libc/kernel/uapi/linux/posix_types.h | 4 +- libc/kernel/uapi/linux/ppdev.h | 10 +- libc/kernel/uapi/linux/ppp-comp.h | 2 +- libc/kernel/uapi/linux/ppp-ioctl.h | 36 +- libc/kernel/uapi/linux/ppp_defs.h | 82 +- libc/kernel/uapi/linux/pps.h | 36 +- libc/kernel/uapi/linux/prctl.h | 30 +- libc/kernel/uapi/linux/psci.h | 28 +- libc/kernel/uapi/linux/ptp_clock.h | 74 +- libc/kernel/uapi/linux/ptrace.h | 6 +- libc/kernel/uapi/linux/qnx4_fs.h | 74 +- libc/kernel/uapi/linux/qnxtypes.h | 4 +- libc/kernel/uapi/linux/quota.h | 65 +- libc/kernel/uapi/linux/raid/md_p.h | 212 +- libc/kernel/uapi/linux/raid/md_u.h | 145 +- libc/kernel/uapi/linux/random.h | 18 +- libc/kernel/uapi/linux/raw.h | 15 +- libc/kernel/uapi/linux/rds.h | 178 +- libc/kernel/uapi/linux/reiserfs_fs.h | 2 +- libc/kernel/uapi/linux/reiserfs_xattr.h | 10 +- libc/kernel/uapi/linux/resource.h | 50 +- libc/kernel/uapi/linux/rfkill.h | 36 +- libc/kernel/uapi/linux/romfs_fs.h | 34 +- libc/kernel/uapi/linux/rose.h | 70 +- libc/kernel/uapi/linux/route.h | 26 +- libc/kernel/uapi/linux/rtc.h | 38 +- libc/kernel/uapi/linux/rtnetlink.h | 529 +++-- libc/kernel/uapi/linux/scc.h | 166 +- libc/kernel/uapi/linux/screen_info.h | 68 +- libc/kernel/uapi/linux/sctp.h | 543 ++--- libc/kernel/uapi/linux/sdla.h | 70 +- libc/kernel/uapi/linux/seccomp.h | 8 +- libc/kernel/uapi/linux/securebits.h | 4 +- libc/kernel/uapi/linux/selinux_netlink.h | 16 +- libc/kernel/uapi/linux/sem.h | 54 +- libc/kernel/uapi/linux/serial.h | 84 +- libc/kernel/uapi/linux/serial_reg.h | 4 +- libc/kernel/uapi/linux/shm.h | 44 +- libc/kernel/uapi/linux/signalfd.h | 36 +- libc/kernel/uapi/linux/snmp.h | 604 +++--- libc/kernel/uapi/linux/sock_diag.h | 22 +- libc/kernel/uapi/linux/socket.h | 8 +- libc/kernel/uapi/linux/som.h | 218 +- libc/kernel/uapi/linux/sonet.h | 22 +- libc/kernel/uapi/linux/soundcard.h | 601 +++--- libc/kernel/uapi/linux/spi/spidev.h | 30 +- libc/kernel/uapi/linux/sunrpc/debug.h | 16 +- libc/kernel/uapi/linux/suspend_ioctls.h | 6 +- libc/kernel/uapi/linux/sw_sync.h | 8 +- libc/kernel/uapi/linux/swab.h | 24 +- libc/kernel/uapi/linux/sync.h | 28 +- libc/kernel/uapi/linux/synclink.h | 145 +- libc/kernel/uapi/linux/sysctl.h | 1544 +++++++------- libc/kernel/uapi/linux/sysinfo.h | 28 +- libc/kernel/uapi/linux/target_core_user.h | 68 +- libc/kernel/uapi/linux/taskstats.h | 138 +- libc/kernel/uapi/linux/tc_act/tc_csum.h | 24 +- libc/kernel/uapi/linux/tc_act/tc_defact.h | 12 +- libc/kernel/uapi/linux/tc_act/tc_gact.h | 20 +- libc/kernel/uapi/linux/tc_act/tc_ipt.h | 16 +- libc/kernel/uapi/linux/tc_act/tc_mirred.h | 14 +- libc/kernel/uapi/linux/tc_act/tc_nat.h | 18 +- libc/kernel/uapi/linux/tc_act/tc_pedit.h | 28 +- libc/kernel/uapi/linux/tc_act/tc_skbedit.h | 16 +- libc/kernel/uapi/linux/tc_ematch/tc_em_cmp.h | 20 +- libc/kernel/uapi/linux/tc_ematch/tc_em_meta.h | 148 +- libc/kernel/uapi/linux/tc_ematch/tc_em_nbyte.h | 6 +- libc/kernel/uapi/linux/tc_ematch/tc_em_text.h | 14 +- libc/kernel/uapi/linux/tcp.h | 228 +-- libc/kernel/uapi/linux/tcp_metrics.h | 52 +- libc/kernel/uapi/linux/telephony.h | 240 ++- libc/kernel/uapi/linux/termios.h | 15 +- libc/kernel/uapi/linux/time.h | 20 +- libc/kernel/uapi/linux/times.h | 8 +- libc/kernel/uapi/linux/timex.h | 68 +- libc/kernel/uapi/linux/tiocl.h | 10 +- libc/kernel/uapi/linux/tipc.h | 60 +- libc/kernel/uapi/linux/tipc_config.h | 58 +- libc/kernel/uapi/linux/toshiba.h | 12 +- libc/kernel/uapi/linux/tty_flags.h | 8 +- libc/kernel/uapi/linux/udp.h | 8 +- libc/kernel/uapi/linux/uhid.h | 196 +- libc/kernel/uapi/linux/uinput.h | 30 +- libc/kernel/uapi/linux/uio.h | 10 +- libc/kernel/uapi/linux/ultrasound.h | 36 +- libc/kernel/uapi/linux/un.h | 4 +- libc/kernel/uapi/linux/unix_diag.h | 50 +- libc/kernel/uapi/linux/usb/audio.h | 249 +-- libc/kernel/uapi/linux/usb/cdc.h | 306 +-- libc/kernel/uapi/linux/usb/ch11.h | 76 +- libc/kernel/uapi/linux/usb/ch9.h | 367 ++-- libc/kernel/uapi/linux/usb/f_mtp.h | 14 +- libc/kernel/uapi/linux/usb/functionfs.h | 114 +- libc/kernel/uapi/linux/usb/gadgetfs.h | 20 +- libc/kernel/uapi/linux/usb/midi.h | 66 +- libc/kernel/uapi/linux/usb/video.h | 397 ++-- libc/kernel/uapi/linux/usbdevice_fs.h | 98 +- libc/kernel/uapi/linux/usbip.h | 14 +- libc/kernel/uapi/linux/utime.h | 4 +- libc/kernel/uapi/linux/utsname.h | 32 +- libc/kernel/uapi/linux/uuid.h | 16 +- libc/kernel/uapi/linux/uvcvideo.h | 38 +- libc/kernel/uapi/linux/v4l2-common.h | 10 +- libc/kernel/uapi/linux/v4l2-controls.h | 1062 +++++----- libc/kernel/uapi/linux/v4l2-dv-timings.h | 396 ++-- libc/kernel/uapi/linux/v4l2-mediabus.h | 202 +- libc/kernel/uapi/linux/v4l2-subdev.h | 76 +- libc/kernel/uapi/linux/veth.h | 6 +- libc/kernel/uapi/linux/vfio.h | 144 +- libc/kernel/uapi/linux/vhost.h | 42 +- libc/kernel/uapi/linux/videodev2.h | 1230 +++++------ libc/kernel/uapi/linux/virtio_9p.h | 4 +- libc/kernel/uapi/linux/virtio_balloon.h | 16 +- libc/kernel/uapi/linux/virtio_blk.h | 46 +- libc/kernel/uapi/linux/virtio_console.h | 16 +- libc/kernel/uapi/linux/virtio_net.h | 32 +- libc/kernel/uapi/linux/virtio_ring.h | 34 +- libc/kernel/uapi/linux/vm_sockets.h | 21 +- libc/kernel/uapi/linux/vsp1.h | 4 +- libc/kernel/uapi/linux/vt.h | 48 +- libc/kernel/uapi/linux/wanrouter.h | 13 +- libc/kernel/uapi/linux/watchdog.h | 10 +- libc/kernel/uapi/linux/wil6210_uapi.h | 28 +- libc/kernel/uapi/linux/wimax.h | 66 +- libc/kernel/uapi/linux/wimax/i2400m.h | 452 ++-- libc/kernel/uapi/linux/wireless.h | 377 ++-- libc/kernel/uapi/linux/x25.h | 54 +- libc/kernel/uapi/linux/xfrm.h | 544 ++--- libc/kernel/uapi/linux/zorro.h | 72 +- libc/kernel/uapi/misc/cxl.h | 76 +- libc/kernel/uapi/mtd/inftl-user.h | 78 +- libc/kernel/uapi/mtd/mtd-abi.h | 106 +- libc/kernel/uapi/mtd/nftl-user.h | 48 +- libc/kernel/uapi/mtd/ubi-user.h | 80 +- libc/kernel/uapi/rdma/ib_user_cm.h | 384 ++-- libc/kernel/uapi/rdma/ib_user_mad.h | 122 +- libc/kernel/uapi/rdma/ib_user_sa.h | 58 +- libc/kernel/uapi/rdma/ib_user_verbs.h | 1140 +++++------ libc/kernel/uapi/rdma/rdma_netlink.h | 146 +- libc/kernel/uapi/rdma/rdma_user_cm.h | 300 +-- libc/kernel/uapi/scsi/fc/fc_els.h | 777 +++---- libc/kernel/uapi/scsi/fc/fc_fs.h | 278 +-- libc/kernel/uapi/scsi/fc/fc_gs.h | 66 +- libc/kernel/uapi/scsi/fc/fc_ns.h | 130 +- libc/kernel/uapi/scsi/scsi_bsg_fc.h | 82 +- libc/kernel/uapi/scsi/scsi_netlink.h | 28 +- libc/kernel/uapi/scsi/scsi_netlink_fc.h | 16 +- libc/kernel/uapi/sound/asequencer.h | 478 ++--- libc/kernel/uapi/sound/asound.h | 956 +++++---- libc/kernel/uapi/sound/asound_fm.h | 90 +- libc/kernel/uapi/sound/compress_offload.h | 64 +- libc/kernel/uapi/sound/compress_params.h | 90 +- libc/kernel/uapi/sound/emu10k1.h | 132 +- libc/kernel/uapi/sound/firewire.h | 46 +- libc/kernel/uapi/sound/hdsp.h | 94 +- libc/kernel/uapi/sound/hdspm.h | 166 +- libc/kernel/uapi/sound/sb16_csp.h | 36 +- libc/kernel/uapi/sound/sfnt_info.h | 148 +- libc/kernel/uapi/video/adf.h | 164 +- libc/kernel/uapi/video/edid.h | 2 +- libc/kernel/uapi/video/sisfb.h | 122 +- libc/kernel/uapi/video/uvesafb.h | 66 +- libc/kernel/uapi/xen/evtchn.h | 22 +- libc/kernel/uapi/xen/gntalloc.h | 26 +- libc/kernel/uapi/xen/gntdev.h | 44 +- libc/kernel/uapi/xen/privcmd.h | 42 +- 670 files changed, 33781 insertions(+), 33699 deletions(-) diff --git a/libc/kernel/tools/clean_header.py b/libc/kernel/tools/clean_header.py index ebebe80f9..0e0ed7658 100755 --- a/libc/kernel/tools/clean_header.py +++ b/libc/kernel/tools/clean_header.py @@ -60,12 +60,7 @@ # using them anyway. # # -# 3. Whitespace cleanup: -# -# The final pass removes any comments and empty lines from the final headers. -# -# -# 4. Add a standard disclaimer: +# 3. Add a standard disclaimer: # # The message: # @@ -141,8 +136,9 @@ def cleanupFile(path, original_path): # now, let's parse the file # - blocks = cpp.BlockParser().parseFile(path) - if not blocks: + parser = cpp.BlockParser() + blocks = parser.parseFile(path) + if not parser.parsed: sys.stderr.write( "error: can't parse '%s'" % path ) sys.exit(1) @@ -157,9 +153,7 @@ def cleanupFile(path, original_path): blocks.optimizeIf01() blocks.removeVarsAndFuncs( statics ) blocks.replaceTokens( kernel_token_replacements ) - blocks.removeComments() blocks.removeMacroDefines( kernel_ignored_macros ) - blocks.removeWhiteSpace() out = StringOutput() out.write( kernel_disclaimer ) diff --git a/libc/kernel/tools/cpp.py b/libc/kernel/tools/cpp.py index 0c098de26..ff5136e65 100644 --- a/libc/kernel/tools/cpp.py +++ b/libc/kernel/tools/cpp.py @@ -1,560 +1,400 @@ -# a glorified C pre-processor parser - -import sys, re, string -from utils import * -from defaults import * - -debugTokens = False -debugDirectiveTokenizer = False -debugLineParsing = False -debugCppExpr = False -debugOptimIf01 = False - -##################################################################################### -##################################################################################### -##### ##### -##### C P P T O K E N S ##### -##### ##### -##################################################################################### -##################################################################################### +#!/usr/bin/python +"""A glorified C pre-processor parser.""" + +import ctypes +import logging +import os +import re +import site +import utils + +top = os.getenv('ANDROID_BUILD_TOP') +if top is None: + utils.panic('ANDROID_BUILD_TOP not set.\n') + +# Set up the env vars for libclang. +site.addsitedir(os.path.join(top, 'external/clang/bindings/python')) +os.putenv('LD_LIBRARY_PATH', os.path.join(top, 'prebuilts/sdk/tools/linux')) + +import clang.cindex +from clang.cindex import conf +from clang.cindex import Cursor +from clang.cindex import CursorKind +from clang.cindex import SourceLocation +from clang.cindex import SourceRange +from clang.cindex import TokenGroup +from clang.cindex import TokenKind +from clang.cindex import TranslationUnit + +from defaults import kCppUndefinedMacro +from defaults import kernel_remove_config_macros +from defaults import kernel_token_replacements + + +debugBlockParser = False +debugCppExpr = False +debugOptimIf01 = False + +############################################################################### +############################################################################### +##### ##### +##### C P P T O K E N S ##### +##### ##### +############################################################################### +############################################################################### # the list of supported C-preprocessor tokens # plus a couple of C tokens as well -tokEOF = "\0" -tokLN = "\n" +tokEOF = "\0" +tokLN = "\n" tokSTRINGIFY = "#" -tokCONCAT = "##" -tokLOGICAND = "&&" -tokLOGICOR = "||" -tokSHL = "<<" -tokSHR = ">>" -tokEQUAL = "==" -tokNEQUAL = "!=" -tokLT = "<" -tokLTE = "<=" -tokGT = ">" -tokGTE = ">=" -tokELLIPSIS = "..." -tokSPACE = " " -tokDEFINED = "defined" -tokLPAREN = "(" -tokRPAREN = ")" -tokNOT = "!" -tokPLUS = "+" -tokMINUS = "-" -tokMULTIPLY = "*" -tokDIVIDE = "/" -tokMODULUS = "%" -tokBINAND = "&" -tokBINOR = "|" -tokBINXOR = "^" -tokCOMMA = "," -tokLBRACE = "{" -tokRBRACE = "}" -tokARROW = "->" +tokCONCAT = "##" +tokLOGICAND = "&&" +tokLOGICOR = "||" +tokSHL = "<<" +tokSHR = ">>" +tokEQUAL = "==" +tokNEQUAL = "!=" +tokLT = "<" +tokLTE = "<=" +tokGT = ">" +tokGTE = ">=" +tokELLIPSIS = "..." +tokSPACE = " " +tokDEFINED = "defined" +tokLPAREN = "(" +tokRPAREN = ")" +tokNOT = "!" +tokPLUS = "+" +tokMINUS = "-" +tokMULTIPLY = "*" +tokDIVIDE = "/" +tokMODULUS = "%" +tokBINAND = "&" +tokBINOR = "|" +tokBINXOR = "^" +tokCOMMA = "," +tokLBRACE = "{" +tokRBRACE = "}" +tokARROW = "->" tokINCREMENT = "++" tokDECREMENT = "--" -tokNUMBER = "" -tokIDENT = "" -tokSTRING = "" +tokNUMBER = "" +tokIDENT = "" +tokSTRING = "" + + +class Token(clang.cindex.Token): + """A class that represents one token after parsing. + + It inherits the class in libclang, with an extra id property to hold the + new spelling of the token. The spelling property in the base class is + defined as read-only. New names after macro instantiation are saved in + their ids now. It also facilitates the renaming of directive optimizations + like replacing 'ifndef X' with 'if !defined(X)'. + + It also overrides the cursor property of the base class. Because the one + in libclang always queries based on a single token, which usually doesn't + hold useful information. The cursor in this class can be set by calling + CppTokenizer.getTokensWithCursors(). Otherwise it returns the one in the + base class. + """ + + def __init__(self, tu=None, group=None, int_data=None, ptr_data=None, + cursor=None): + clang.cindex.Token.__init__(self) + self._id = None + self._tu = tu + self._group = group + self._cursor = cursor + # self.int_data and self.ptr_data are from the base class. But + # self.int_data doesn't accept a None value. + if int_data is not None: + self.int_data = int_data + self.ptr_data = ptr_data + + @property + def id(self): + """Name of the token.""" + if self._id is None: + return self.spelling + else: + return self._id -class Token: - """a simple class to hold information about a given token. - each token has a position in the source code, as well as - an 'id' and a 'value'. the id is a string that identifies - the token's class, while the value is the string of the - original token itself. + @id.setter + def id(self, new_id): + """Setting name of the token.""" + self._id = new_id - for example, the tokenizer concatenates a series of spaces - and tabs as a single tokSPACE id, whose value if the original - spaces+tabs sequence.""" + @property + def cursor(self): + if self._cursor is None: + self._cursor = clang.cindex.Token.cursor + return self._cursor - def __init__(self): - self.id = None - self.value = None - self.lineno = 0 - self.colno = 0 - - def set(self,id,val=None): - self.id = id - if val: - self.value = val - else: - self.value = id - return None - - def copyFrom(self,src): - self.id = src.id - self.value = src.value - self.lineno = src.lineno - self.colno = src.colno + @cursor.setter + def cursor(self, new_cursor): + self._cursor = new_cursor def __repr__(self): - if self.id == tokIDENT: - return "(ident %s)" % self.value - if self.id == tokNUMBER: - return "(number %s)" % self.value - if self.id == tokSTRING: - return "(string '%s')" % self.value - if self.id == tokLN: - return "" - if self.id == tokEOF: - return "" - if self.id == tokSPACE and self.value == "\\": - # this corresponds to a trailing \ that was transformed into a tokSPACE - return "<\\>" + if self.id == 'defined': + return self.id + elif self.kind == TokenKind.IDENTIFIER: + return "(ident %s)" % self.id return self.id def __str__(self): - if self.id == tokIDENT: - return self.value - if self.id == tokNUMBER: - return self.value - if self.id == tokSTRING: - return self.value - if self.id == tokEOF: - return "" - if self.id == tokSPACE: - if self.value == "\\": # trailing \ - return "\\\n" - else: - return self.value - return self.id -class BadExpectedToken(Exception): - def __init__(self,msg): - print msg - -##################################################################################### -##################################################################################### -##### ##### -##### C P P T O K E N I Z E R ##### -##### ##### -##################################################################################### -##################################################################################### +class BadExpectedToken(Exception): + """An exception that will be raised for unexpected tokens.""" + pass + + +# The __contains__ function in libclang SourceRange class contains a bug. It +# gives wrong result when dealing with single line range. +# Bug filed with upstream: +# http://llvm.org/bugs/show_bug.cgi?id=22243, http://reviews.llvm.org/D7277 +def SourceRange__contains__(self, other): + """Determine if a given location is inside the range.""" + if not isinstance(other, SourceLocation): + return False + if other.file is None and self.start.file is None: + pass + elif (self.start.file.name != other.file.name or + other.file.name != self.end.file.name): + # same file name + return False + # same file, in between lines + if self.start.line < other.line < self.end.line: + return True + # same file, same line + elif self.start.line == other.line == self.end.line: + if self.start.column <= other.column <= self.end.column: + return True + elif self.start.line == other.line: + # same file first line + if self.start.column <= other.column: + return True + elif other.line == self.end.line: + # same file last line + if other.column <= self.end.column: + return True + return False + + +SourceRange.__contains__ = SourceRange__contains__ + + +################################################################################ +################################################################################ +##### ##### +##### C P P T O K E N I Z E R ##### +##### ##### +################################################################################ +################################################################################ + + +class CppTokenizer(object): + """A tokenizer that converts some input text into a list of tokens. + + It calls libclang's tokenizer to get the parsed tokens. In addition, it + updates the cursor property in each token after parsing, by calling + getTokensWithCursors(). + """ + + clang_flags = ['-E', '-x', 'c'] + options = TranslationUnit.PARSE_DETAILED_PROCESSING_RECORD -# list of long symbols, i.e. those that take more than one characters -cppLongSymbols = [ tokCONCAT, tokLOGICAND, tokLOGICOR, tokSHL, tokSHR, tokELLIPSIS, tokEQUAL,\ - tokNEQUAL, tokLTE, tokGTE, tokARROW, tokINCREMENT, tokDECREMENT ] + def __init__(self): + """Initialize a new CppTokenizer object.""" + self._indexer = clang.cindex.Index.create() + self._tu = None + self._index = 0 + self.tokens = None + + def _getTokensWithCursors(self): + """Helper method to return all tokens with their cursors. + + The cursor property in a clang Token doesn't provide enough + information. Because it is queried based on single token each time + without any context, i.e. via calling conf.lib.clang_annotateTokens() + with only one token given. So we often see 'INVALID_FILE' in one + token's cursor. In this function it passes all the available tokens + to get more informative cursors. + """ + + tokens_memory = ctypes.POINTER(clang.cindex.Token)() + tokens_count = ctypes.c_uint() + + conf.lib.clang_tokenize(self._tu, self._tu.cursor.extent, + ctypes.byref(tokens_memory), + ctypes.byref(tokens_count)) + + count = int(tokens_count.value) + + # If we get no tokens, no memory was allocated. Be sure not to return + # anything and potentially call a destructor on nothing. + if count < 1: + return -class CppTokenizer: - """an abstract class used to convert some input text into a list - of tokens. real implementations follow and differ in the format - of the input text only""" + cursors = (Cursor * count)() + cursors_memory = ctypes.cast(cursors, ctypes.POINTER(Cursor)) - def __init__(self): - """initialize a new CppTokenizer object""" - self.eof = False # end of file reached ? - self.text = None # content of current line, with final \n stripped - self.line = 0 # number of current line - self.pos = 0 # current character position in current line - self.len = 0 # length of current line text - self.held = Token() - - def setLineText(self,line): - """set the content of the (next) current line. should be called - by fillLineText() in derived classes""" - self.text = line - self.len = len(line) - self.pos = 0 - - def fillLineText(self): - """refresh the content of 'line' with a new line of input""" - # to be overriden - self.eof = True - - def markPos(self,tok): - """mark the position of the current token in the source file""" - if self.eof or self.pos > self.len: - tok.lineno = self.line + 1 - tok.colno = 0 - else: - tok.lineno = self.line - tok.colno = self.pos - - def peekChar(self): - """return the current token under the cursor without moving it""" - if self.eof: - return tokEOF - - if self.pos > self.len: - self.pos = 0 - self.line += 1 - self.fillLineText() - if self.eof: - return tokEOF - - if self.pos == self.len: - return tokLN - else: - return self.text[self.pos] + conf.lib.clang_annotateTokens(self._tu, tokens_memory, count, + cursors_memory) - def peekNChar(self,n): - """try to peek the next n chars on the same line""" - if self.pos + n > self.len: - return None - return self.text[self.pos:self.pos+n] + tokens_array = ctypes.cast( + tokens_memory, + ctypes.POINTER(clang.cindex.Token * count)).contents + token_group = TokenGroup(self._tu, tokens_memory, tokens_count) - def skipChar(self): - """increment the token cursor position""" - if not self.eof: - self.pos += 1 + tokens = [] + for i in xrange(0, count): + token = Token(self._tu, token_group, + int_data=tokens_array[i].int_data, + ptr_data=tokens_array[i].ptr_data, + cursor=cursors[i]) + # We only want non-comment tokens. + if token.kind != TokenKind.COMMENT: + tokens.append(token) + + return tokens + + def parseString(self, lines): + """Parse a list of text lines into a BlockList object.""" + file_ = 'dummy.c' + self._tu = self._indexer.parse(file_, self.clang_flags, + unsaved_files=[(file_, lines)], + options=self.options) + self.tokens = self._getTokensWithCursors() + + def parseFile(self, file_): + """Parse a file into a BlockList object.""" + self._tu = self._indexer.parse(file_, self.clang_flags, + options=self.options) + self.tokens = self._getTokensWithCursors() - def skipNChars(self,n): - if self.pos + n <= self.len: - self.pos += n + def nextToken(self): + """Return next token from the list.""" + if self._index < len(self.tokens): + t = self.tokens[self._index] + self._index += 1 + return t else: - while n > 0: - self.skipChar() - n -= 1 - - def nextChar(self): - """retrieve the token at the current cursor position, then skip it""" - result = self.peekChar() - self.skipChar() - return result - - def getEscape(self): - # try to get all characters after a backslash (\) - result = self.nextChar() - if result == "0": - # octal number ? - num = self.peekNChar(3) - if num != None: - isOctal = True - for d in num: - if not d in "01234567": - isOctal = False - break - if isOctal: - result += num - self.skipNChars(3) - elif result == "x" or result == "X": - # hex number ? - num = self.peekNChar(2) - if num != None: - isHex = True - for d in num: - if not d in "012345678abcdefABCDEF": - isHex = False - break - if isHex: - result += num - self.skipNChars(2) - elif result == "u" or result == "U": - # unicode char ? - num = self.peekNChar(4) - if num != None: - isHex = True - for d in num: - if not d in "012345678abcdefABCDEF": - isHex = False - break - if isHex: - result += num - self.skipNChars(4) - - return result + return None - def nextRealToken(self,tok): - """return next CPP token, used internally by nextToken()""" - c = self.nextChar() - if c == tokEOF or c == tokLN: - return tok.set(c) - - if c == '/': - c = self.peekChar() - if c == '/': # C++ comment line - self.skipChar() - while 1: - c = self.nextChar() - if c == tokEOF or c == tokLN: - break - return tok.set(tokLN) - if c == '*': # C comment start - self.skipChar() - value = "/*" - prev_c = None - while 1: - c = self.nextChar() - if c == tokEOF: - return tok.set(tokEOF,value) - if c == '/' and prev_c == '*': - break - prev_c = c - value += c - value += "/" - return tok.set(tokSPACE,value) - c = '/' +class CppStringTokenizer(CppTokenizer): + """A CppTokenizer derived class that accepts a string of text as input.""" - if c.isspace(): - while 1: - c2 = self.peekChar() - if c2 == tokLN or not c2.isspace(): - break - c += c2 - self.skipChar() - return tok.set(tokSPACE,c) - - if c == '\\': - if debugTokens: - print "nextRealToken: \\ found, next token is '%s'" % repr(self.peekChar()) - if self.peekChar() == tokLN: # trailing \ - # eat the tokLN - self.skipChar() - # we replace a trailing \ by a tokSPACE whose value is - # simply "\\". this allows us to detect them later when - # needed. - return tok.set(tokSPACE,"\\") - else: - # treat as a single token here ? - c +=self.getEscape() - return tok.set(c) - - if c == "'": # chars - c2 = self.nextChar() - c += c2 - if c2 == '\\': - c += self.getEscape() - - while 1: - c2 = self.nextChar() - if c2 == tokEOF: - break - c += c2 - if c2 == "'": - break + def __init__(self, line): + CppTokenizer.__init__(self) + self.parseString(line) - return tok.set(tokSTRING, c) - - if c == '"': # strings - quote = 0 - while 1: - c2 = self.nextChar() - if c2 == tokEOF: - return tok.set(tokSTRING,c) - - c += c2 - if not quote: - if c2 == '"': - return tok.set(tokSTRING,c) - if c2 == "\\": - quote = 1 - else: - quote = 0 - if c >= "0" and c <= "9": # integers ? - while 1: - c2 = self.peekChar() - if c2 == tokLN or (not c2.isalnum() and c2 != "_"): - break - c += c2 - self.skipChar() - return tok.set(tokNUMBER,c) - - if c.isalnum() or c == "_": # identifiers ? - while 1: - c2 = self.peekChar() - if c2 == tokLN or (not c2.isalnum() and c2 != "_"): - break - c += c2 - self.skipChar() - if c == tokDEFINED: - return tok.set(tokDEFINED) - else: - return tok.set(tokIDENT,c) - - # check special symbols - for sk in cppLongSymbols: - if c == sk[0]: - sklen = len(sk[1:]) - if self.pos + sklen <= self.len and \ - self.text[self.pos:self.pos+sklen] == sk[1:]: - self.pos += sklen - return tok.set(sk) - - return tok.set(c) - - def nextToken(self,tok): - """return the next token from the input text. this function - really updates 'tok', and does not return a new one""" - self.markPos(tok) - self.nextRealToken(tok) - - def getToken(self): - tok = Token() - self.nextToken(tok) - if debugTokens: - print "getTokens: %s" % repr(tok) - return tok - - def toTokenList(self): - """convert the input text of a CppTokenizer into a direct - list of token objects. tokEOF is stripped from the result""" - result = [] - while 1: - tok = Token() - self.nextToken(tok) - if tok.id == tokEOF: - break - result.append(tok) - return result +class CppFileTokenizer(CppTokenizer): + """A CppTokenizer derived class that accepts a file as input.""" -class CppLineTokenizer(CppTokenizer): - """a CppTokenizer derived class that accepts a single line of text as input""" - def __init__(self,line,lineno=1): + def __init__(self, file_): CppTokenizer.__init__(self) - self.line = lineno - self.setLineText(line) + self.parseFile(file_) -class CppLinesTokenizer(CppTokenizer): - """a CppTokenizer derived class that accepts a list of texdt lines as input. - the lines must not have a trailing \n""" - def __init__(self,lines=[],lineno=1): - """initialize a CppLinesTokenizer. you can later add lines using addLines()""" - CppTokenizer.__init__(self) - self.line = lineno - self.lines = lines - self.index = 0 - self.count = len(lines) +# Unit testing +# +class CppTokenizerTester(object): + """A class used to test CppTokenizer classes.""" - if self.count > 0: - self.fillLineText() - else: - self.eof = True - - def addLine(self,line): - """add a line to a CppLinesTokenizer. this can be done after tokenization - happens""" - if self.count == 0: - self.setLineText(line) - self.index = 1 - self.lines.append(line) - self.count += 1 - self.eof = False - - def fillLineText(self): - if self.index < self.count: - self.setLineText(self.lines[self.index]) - self.index += 1 - else: - self.eof = True + def __init__(self, tokenizer=None): + self._tokenizer = tokenizer + self._token = None + def setTokenizer(self, tokenizer): + self._tokenizer = tokenizer -class CppFileTokenizer(CppTokenizer): - def __init__(self,file,lineno=1): - CppTokenizer.__init__(self) - self.file = file - self.line = lineno - - def fillLineText(self): - line = self.file.readline() - if len(line) > 0: - if line[-1] == '\n': - line = line[:-1] - if len(line) > 0 and line[-1] == "\r": - line = line[:-1] - self.setLineText(line) + def expect(self, id): + self._token = self._tokenizer.nextToken() + if self._token is None: + tokid = '' else: - self.eof = True - -# Unit testing -# -class CppTokenizerTester: - """a class used to test CppTokenizer classes""" - def __init__(self,tokenizer=None): - self.tokenizer = tokenizer - self.token = Token() - - def setTokenizer(self,tokenizer): - self.tokenizer = tokenizer - - def expect(self,id): - self.tokenizer.nextToken(self.token) - tokid = self.token.id + tokid = self._token.id if tokid == id: return - if self.token.value == id and (tokid == tokIDENT or tokid == tokNUMBER): - return - raise BadExpectedToken, "### BAD TOKEN: '%s' expecting '%s'" % (self.token.id,id) + raise BadExpectedToken("### BAD TOKEN: '%s' expecting '%s'" % ( + tokid, id)) - def expectToken(self,id,line,col): + def expectToken(self, id, line, col): self.expect(id) - if self.token.lineno != line: - raise BadExpectedToken, "### BAD LINENO: token '%s' got '%d' expecting '%d'" % (id,self.token.lineno,line) - if self.token.colno != col: - raise BadExpectedToken, "### BAD COLNO: '%d' expecting '%d'" % (self.token.colno,col) - - def expectTokenVal(self,id,value,line,col): - self.expectToken(id,line,col) - if self.token.value != value: - raise BadExpectedToken, "### BAD VALUE: '%s' expecting '%s'" % (self.token.value,value) - - def expectList(self,list): - for item in list: + if self._token.location.line != line: + raise BadExpectedToken( + "### BAD LINENO: token '%s' got '%d' expecting '%d'" % ( + id, self._token.lineno, line)) + if self._token.location.column != col: + raise BadExpectedToken("### BAD COLNO: '%d' expecting '%d'" % ( + self._token.colno, col)) + + def expectTokens(self, tokens): + for id, line, col in tokens: + self.expectToken(id, line, col) + + def expectList(self, list_): + for item in list_: self.expect(item) + def test_CppTokenizer(): tester = CppTokenizerTester() - tester.setTokenizer( CppLineTokenizer("#an/example && (01923_xy)") ) - tester.expectList( ["#", "an", "/", "example", tokSPACE, tokLOGICAND, tokSPACE, tokLPAREN, "01923_xy", \ - tokRPAREN, tokLN, tokEOF] ) - - tester.setTokenizer( CppLineTokenizer("FOO(BAR) && defined(BAZ)") ) - tester.expectList( ["FOO", tokLPAREN, "BAR", tokRPAREN, tokSPACE, tokLOGICAND, tokSPACE, - tokDEFINED, tokLPAREN, "BAZ", tokRPAREN, tokLN, tokEOF] ) - - tester.setTokenizer( CppLinesTokenizer( ["/*", "#", "*/"] ) ) - tester.expectList( [ tokSPACE, tokLN, tokEOF ] ) - - tester.setTokenizer( CppLinesTokenizer( ["first", "second"] ) ) - tester.expectList( [ "first", tokLN, "second", tokLN, tokEOF ] ) - - tester.setTokenizer( CppLinesTokenizer( ["first second", " third"] ) ) - tester.expectToken( "first", 1, 0 ) - tester.expectToken( tokSPACE, 1, 5 ) - tester.expectToken( "second", 1, 6 ) - tester.expectToken( tokLN, 1, 12 ) - tester.expectToken( tokSPACE, 2, 0 ) - tester.expectToken( "third", 2, 2 ) - - tester.setTokenizer( CppLinesTokenizer( [ "boo /* what the", "hell */" ] ) ) - tester.expectList( [ "boo", tokSPACE ] ) - tester.expectTokenVal( tokSPACE, "/* what the\nhell */", 1, 4 ) - tester.expectList( [ tokLN, tokEOF ] ) - - tester.setTokenizer( CppLinesTokenizer( [ "an \\", " example" ] ) ) - tester.expectToken( "an", 1, 0 ) - tester.expectToken( tokSPACE, 1, 2 ) - tester.expectTokenVal( tokSPACE, "\\", 1, 3 ) - tester.expectToken( tokSPACE, 2, 0 ) - tester.expectToken( "example", 2, 1 ) - tester.expectToken( tokLN, 2, 8 ) + tester.setTokenizer(CppStringTokenizer("#an/example && (01923_xy)")) + tester.expectList(["#", "an", "/", "example", tokLOGICAND, tokLPAREN, + "01923_xy", tokRPAREN]) + + tester.setTokenizer(CppStringTokenizer("FOO(BAR) && defined(BAZ)")) + tester.expectList(["FOO", tokLPAREN, "BAR", tokRPAREN, tokLOGICAND, + "defined", tokLPAREN, "BAZ", tokRPAREN]) + + tester.setTokenizer(CppStringTokenizer("/*\n#\n*/")) + tester.expectList([]) + + tester.setTokenizer(CppStringTokenizer("first\nsecond")) + tester.expectList(["first", "second"]) + tester.setTokenizer(CppStringTokenizer("first second\n third")) + tester.expectTokens([("first", 1, 1), + ("second", 1, 7), + ("third", 2, 3)]) + + tester.setTokenizer(CppStringTokenizer("boo /* what the\nhell */")) + tester.expectTokens([("boo", 1, 1)]) + + tester.setTokenizer(CppStringTokenizer("an \\\n example")) + tester.expectTokens([("an", 1, 1), + ("example", 2, 2)]) return True -##################################################################################### -##################################################################################### -##### ##### -##### C P P E X P R E S S I O N S ##### -##### ##### -##################################################################################### -##################################################################################### +################################################################################ +################################################################################ +##### ##### +##### C P P E X P R E S S I O N S ##### +##### ##### +################################################################################ +################################################################################ + -class CppExpr: - """a class that models the condition of #if directives into - an expression tree. each node in the tree is of the form (op,arg) or (op,arg1,arg2) - where "op" is a string describing the operation""" +class CppExpr(object): + """A class that models the condition of #if directives into an expr tree. - unaries = [ "!", "~" ] - binaries = [ "+", "-", "<", "<=", ">=", ">", "&&", "||", "*", "/", "%", "&", "|", "^", "<<", ">>", "==", "!=", "?", ":" ] + Each node in the tree is of the form (op, arg) or (op, arg1, arg2) where + "op" is a string describing the operation + """ + + unaries = ["!", "~"] + binaries = ["+", "-", "<", "<=", ">=", ">", "&&", "||", "*", "/", "%", + "&", "|", "^", "<<", ">>", "==", "!=", "?", ":"] precedences = { "?": 1, ":": 1, "||": 2, @@ -570,197 +410,191 @@ class CppExpr: "!": 12, "~": 12 } - re_cpp_constant = re.compile(r"((\d|\w|_)+)") - def __init__(self, tokens): - """initialize a CppExpr. 'tokens' must be a CppToken list""" - self.tok = tokens - self.n = len(tokens) - self.i = 0 + """Initialize a CppExpr. 'tokens' must be a CppToken list.""" + self.tokens = tokens + self._num_tokens = len(tokens) + self._index = 0 + if debugCppExpr: print "CppExpr: trying to parse %s" % repr(tokens) self.expr = self.parseExpression(0) if debugCppExpr: print "CppExpr: got " + repr(self.expr) - if self.i != self.n: - print 'crap at end of input (%d != %d): %s' % (self.i, self.n, repr(tokens)) - raise - + if self._index != self._num_tokens: + self.throw(BadExpectedToken, "crap at end of input (%d != %d): %s" + % (self._index, self._num_tokens, repr(tokens))) def throw(self, exception, msg): - if self.i < self.n: - tok = self.tok[self.i] - print "%d:%d: %s" % (tok.lineno,tok.colno,msg) + if self._index < self._num_tokens: + tok = self.tokens[self._index] + print "%d:%d: %s" % (tok.location.line, tok.location.column, msg) else: print "EOF: %s" % msg raise exception(msg) - - def skip_spaces(self): - """skip spaces in input token list""" - while self.i < self.n: - t = self.tok[self.i] - if t.id != tokSPACE and t.id != tokLN: - break - self.i += 1 - - def expectId(self, id): - """check that a given token id is at the current position, then skip over it""" - self.skip_spaces() - if self.i >= self.n or self.tok[self.i].id != id: - self.throw(BadExpectedToken,self.i,"### expecting '%s' in expression, got '%s'" % (id, self.tok[self.i].id)) - self.i += 1 - - - def expectIdent(self): - self.skip_spaces() - if self.i >= self.n or self.tok[self.i].id != tokIDENT: - self.throw(BadExpectedToken, self.i,"### expecting identifier in expression, got '%s'" % (id, self.tok[self.i].id)) - self.i += 1 - + """Check that a given token id is at the current position.""" + token = self.tokens[self._index] + if self._index >= self._num_tokens or token.id != id: + self.throw(BadExpectedToken, + "### expecting '%s' in expression, got '%s'" % ( + id, token.id)) + self._index += 1 def is_decimal(self): - v = self.tok[self.i].value[:] - while len(v) > 0 and v[-1] in "ULul": - v = v[:-1] - for digit in v: - if not digit.isdigit(): - return None - - self.i += 1 - return ("int", string.atoi(v)) + token = self.tokens[self._index].id + if token[-1] in "ULul": + token = token[:-1] + try: + val = int(token, 10) + self._index += 1 + return ('int', val) + except ValueError: + return None + def is_octal(self): + token = self.tokens[self._index].id + if token[-1] in "ULul": + token = token[:-1] + if len(token) < 2 or token[0] != '0': + return None + try: + val = int(token, 8) + self._index += 1 + return ('oct', val) + except ValueError: + return None def is_hexadecimal(self): - v = self.tok[self.i].value[:] - while len(v) > 0 and v[-1] in "ULul": - v = v[:-1] - if len(v) > 2 and (v[0:2] == "0x" or v[0:2] == "0X"): - for digit in v[2:]: - if not digit in "0123456789abcdefABCDEF": - return None - - # for a hex expression tuple, the argument - # is the value as an integer - self.i += 1 - return ("hex", int(v[2:], 16)) - - return None - + token = self.tokens[self._index].id + if token[-1] in "ULul": + token = token[:-1] + if len(token) < 3 or (token[:2] != '0x' and token[:2] != '0X'): + return None + try: + val = int(token, 16) + self._index += 1 + return ('hex', val) + except ValueError: + return None def is_integer(self): - if self.tok[self.i].id != tokNUMBER: + if self.tokens[self._index].kind != TokenKind.LITERAL: return None - c = self.is_decimal() - if c: return c - c = self.is_hexadecimal() - if c: return c + if c: + return c - return None + c = self.is_octal() + if c: + return c + c = self.is_decimal() + if c: + return c + + return None def is_number(self): - t = self.tok[self.i] - if t.id == tokMINUS and self.i+1 < self.n: - self.i += 1 + t = self.tokens[self._index] + if t.id == tokMINUS and self._index + 1 < self._num_tokens: + self._index += 1 c = self.is_integer() if c: - op, val = c + op, val = c return (op, -val) - if t.id == tokPLUS and self.i+1 < self.n: + if t.id == tokPLUS and self._index + 1 < self._num_tokens: + self._index += 1 c = self.is_integer() - if c: return c + if c: + return c return self.is_integer() - def is_defined(self): - t = self.tok[self.i] + t = self.tokens[self._index] if t.id != tokDEFINED: return None - # we have the defined keyword, check the rest - self.i += 1 - self.skip_spaces() - used_parens = 0 - if self.i < self.n and self.tok[self.i].id == tokLPAREN: - used_parens = 1 - self.i += 1 - self.skip_spaces() - - if self.i >= self.n: - self.throw(CppConstantExpected,i,"### 'defined' must be followed by macro name or left paren") - - t = self.tok[self.i] - if t.id != tokIDENT: - self.throw(CppConstantExpected,i,"### 'defined' must be followed by macro name") - - self.i += 1 + # We have the defined keyword, check the rest. + self._index += 1 + used_parens = False + if (self._index < self._num_tokens and + self.tokens[self._index].id == tokLPAREN): + used_parens = True + self._index += 1 + + if self._index >= self._num_tokens: + self.throw(BadExpectedToken, + "### 'defined' must be followed by macro name or left " + "paren") + + t = self.tokens[self._index] + if t.kind != TokenKind.IDENTIFIER: + self.throw(BadExpectedToken, + "### 'defined' must be followed by macro name") + + self._index += 1 if used_parens: self.expectId(tokRPAREN) - return ("defined", t.value) - + return ("defined", t.id) def is_call_or_ident(self): - self.skip_spaces() - if self.i >= self.n: + if self._index >= self._num_tokens: return None - t = self.tok[self.i] - if t.id != tokIDENT: + t = self.tokens[self._index] + if t.kind != TokenKind.IDENTIFIER: return None - name = t.value + name = t.id - self.i += 1 - self.skip_spaces() - if self.i >= self.n or self.tok[self.i].id != tokLPAREN: + self._index += 1 + if (self._index >= self._num_tokens or + self.tokens[self._index].id != tokLPAREN): return ("ident", name) - params = [] - depth = 1 - self.i += 1 - j = self.i - while self.i < self.n: - id = self.tok[self.i].id + params = [] + depth = 1 + self._index += 1 + j = self._index + while self._index < self._num_tokens: + id = self.tokens[self._index].id if id == tokLPAREN: depth += 1 elif depth == 1 and (id == tokCOMMA or id == tokRPAREN): - while j < self.i and self.tok[j].id == tokSPACE: - j += 1 - k = self.i - while k > j and self.tok[k-1].id == tokSPACE: - k -= 1 - param = self.tok[j:k] + k = self._index + param = self.tokens[j:k] params.append(param) if id == tokRPAREN: break - j = self.i+1 + j = self._index + 1 elif id == tokRPAREN: depth -= 1 - self.i += 1 + self._index += 1 - if self.i >= self.n: + if self._index >= self._num_tokens: return None - self.i += 1 + self._index += 1 return ("call", (name, params)) + # Implements the "precedence climbing" algorithm from + # http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm. + # The "classic" algorithm would be fine if we were using a tool to + # generate the parser, but we're not. Dijkstra's "shunting yard" + # algorithm hasn't been necessary yet. - # Implements the "precedence climbing" algorithm from http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm. - # The "classic" algorithm would be fine if we were using a tool to generate the parser, but we're not. - # Dijkstra's "shunting yard" algorithm hasn't been necessary yet. def parseExpression(self, minPrecedence): - self.skip_spaces() - if self.i >= self.n: + if self._index >= self._num_tokens: return None node = self.parsePrimary() - while self.token() != None and self.isBinary(self.token()) and self.precedence(self.token()) >= minPrecedence: + while (self.token() and self.isBinary(self.token()) and + self.precedence(self.token()) >= minPrecedence): op = self.token() self.nextToken() rhs = self.parseExpression(self.precedence(op) + 1) @@ -768,7 +602,6 @@ class CppExpr: return node - def parsePrimary(self): op = self.token() if self.isUnary(op): @@ -784,51 +617,47 @@ class CppExpr: self.nextToken() primary = self.parseExpression(0) self.expectId(":") - elif op.id == tokNUMBER: + elif op.id == '+' or op.id == '-' or op.kind == TokenKind.LITERAL: primary = self.is_number() - elif op.id == tokIDENT: - primary = self.is_call_or_ident() + # Checking for 'defined' needs to come first now because 'defined' is + # recognized as IDENTIFIER. elif op.id == tokDEFINED: primary = self.is_defined() + elif op.kind == TokenKind.IDENTIFIER: + primary = self.is_call_or_ident() else: - self.throw(BadExpectedToken, "didn't expect to see a %s in factor" % (self.tok[self.i].id)) - - self.skip_spaces() - - return primary; - + self.throw(BadExpectedToken, + "didn't expect to see a %s in factor" % ( + self.tokens[self._index].id)) + return primary def isBinary(self, token): return token.id in self.binaries - def isUnary(self, token): return token.id in self.unaries - def precedence(self, token): return self.precedences.get(token.id) - def token(self): - if self.i >= self.n: + if self._index >= self._num_tokens: return None - return self.tok[self.i] - + return self.tokens[self._index] def nextToken(self): - self.i += 1 - self.skip_spaces() - if self.i >= self.n: + self._index += 1 + if self._index >= self._num_tokens: return None - return self.tok[self.i] - + return self.tokens[self._index] def dump_node(self, e): op = e[0] line = "(" + op if op == "int": line += " %d)" % e[1] + elif op == "oct": + line += " 0%o)" % e[1] elif op == "hex": line += " 0x%x)" % e[1] elif op == "ident": @@ -864,31 +693,33 @@ class CppExpr: return "%d" % e[1] if op == "hex": return "0x%x" % e[1] + if op == "oct": + return "0%o" % e[1] if op == "ident": # XXX: should try to expand return e[1] if op == "defined": return "defined(%s)" % e[1] - prec = CppExpr.precedences.get(op,1000) - arg = e[1] + prec = CppExpr.precedences.get(op, 1000) + arg = e[1] if op in CppExpr.unaries: arg_src = self.source_node(arg) - arg_op = arg[0] - arg_prec = CppExpr.precedences.get(arg[0],1000) + arg_op = arg[0] + arg_prec = CppExpr.precedences.get(arg_op, 1000) if arg_prec < prec: return "!(" + arg_src + ")" else: return "!" + arg_src if op in CppExpr.binaries: - arg2 = e[2] - arg1_op = arg[0] - arg2_op = arg2[0] + arg2 = e[2] + arg1_op = arg[0] + arg2_op = arg2[0] arg1_src = self.source_node(arg) arg2_src = self.source_node(arg2) - if CppExpr.precedences.get(arg1_op,1000) < prec: + if CppExpr.precedences.get(arg1_op, 1000) < prec: arg1_src = "(%s)" % arg1_src - if CppExpr.precedences.get(arg2_op,1000) < prec: + if CppExpr.precedences.get(arg2_op, 1000) < prec: arg2_src = "(%s)" % arg2_src return "%s %s %s" % (arg1_src, op, arg2_src) @@ -897,19 +728,21 @@ class CppExpr: def __str__(self): return self.source_node(self.expr) - def int_node(self,e): - if e[0] == "int": + @staticmethod + def int_node(e): + if e[0] in ["int", "oct", "hex"]: return e[1] - elif e[1] == "hex": - return int(e[1],16) else: return None def toInt(self): return self.int_node(self.expr) - def optimize_node(self, e, macros={}): + def optimize_node(self, e, macros=None): + if macros is None: + macros = {} op = e[0] + if op == "defined": op, name = e if macros.has_key(name): @@ -919,7 +752,7 @@ class CppExpr: try: value = int(macros[name]) return ("int", value) - except: + except ValueError: return ("defined", macros[name]) if kernel_remove_config_macros and name.startswith("CONFIG_"): @@ -933,7 +766,7 @@ class CppExpr: try: value = int(macros[name]) expanded = ("int", value) - except: + except ValueError: expanded = ("ident", macros[name]) return self.optimize_node(expanded, macros) return e @@ -950,16 +783,16 @@ class CppExpr: elif op == "&&": op, l, r = e - l = self.optimize_node(l, macros) - r = self.optimize_node(r, macros) + l = self.optimize_node(l, macros) + r = self.optimize_node(r, macros) li = self.int_node(l) ri = self.int_node(r) - if li != None: + if li is not None: if li == 0: return ("int", 0) else: return r - elif ri != None: + elif ri is not None: if ri == 0: return ("int", 0) else: @@ -968,16 +801,16 @@ class CppExpr: elif op == "||": op, l, r = e - l = self.optimize_node(l, macros) - r = self.optimize_node(r, macros) + l = self.optimize_node(l, macros) + r = self.optimize_node(r, macros) li = self.int_node(l) ri = self.int_node(r) - if li != None: + if li is not None: if li == 0: return r else: return ("int", 1) - elif ri != None: + elif ri is not None: if ri == 0: return l else: @@ -987,50 +820,54 @@ class CppExpr: else: return e - def optimize(self,macros={}): + def optimize(self, macros=None): + if macros is None: + macros = {} self.expr = self.optimize_node(self.expr, macros) - def is_equal_node(self,e1,e2): - if e1[0] != e2[0] or len(e1) != len(e2): - return False - - op = e1[0] - if op == "int" or op == "hex" or op == "!" or op == "defined": - return e1[0] == e2[0] - - return self.is_equal_node(e1[1],e2[1]) and self.is_equal_node(e1[2],e2[2]) - - def is_equal(self,other): - return self.is_equal_node(self.expr,other.expr) def test_cpp_expr(expr, expected): - e = CppExpr( CppLineTokenizer( expr ).toTokenList() ) + e = CppExpr(CppStringTokenizer(expr).tokens) s1 = repr(e) if s1 != expected: - print "[FAIL]: expression '%s' generates '%s', should be '%s'" % (expr, s1, expected) + print ("[FAIL]: expression '%s' generates '%s', should be " + "'%s'" % (expr, s1, expected)) global failure_count failure_count += 1 -def test_cpp_expr_optim(expr, expected, macros={}): - e = CppExpr( CppLineTokenizer( expr ).toTokenList() ) + +def test_cpp_expr_optim(expr, expected, macros=None): + if macros is None: + macros = {} + e = CppExpr(CppStringTokenizer(expr).tokens) e.optimize(macros) s1 = repr(e) if s1 != expected: - print "[FAIL]: optimized expression '%s' generates '%s' with macros %s, should be '%s'" % (expr, s1, macros, expected) + print ("[FAIL]: optimized expression '%s' generates '%s' with " + "macros %s, should be '%s'" % (expr, s1, macros, expected)) global failure_count failure_count += 1 + def test_cpp_expr_source(expr, expected): - e = CppExpr( CppLineTokenizer( expr ).toTokenList() ) + e = CppExpr(CppStringTokenizer(expr).tokens) s1 = str(e) if s1 != expected: - print "[FAIL]: source expression '%s' generates '%s', should be '%s'" % (expr, s1, expected) + print ("[FAIL]: source expression '%s' generates '%s', should " + "be '%s'" % (expr, s1, expected)) global failure_count failure_count += 1 + def test_CppExpr(): test_cpp_expr("0", "(int 0)") test_cpp_expr("1", "(int 1)") + test_cpp_expr("-5", "(int -5)") + test_cpp_expr("+1", "(int 1)") + test_cpp_expr("0U", "(int 0)") + test_cpp_expr("015", "(oct 015)") + test_cpp_expr("015l", "(oct 015)") + test_cpp_expr("0x3e", "(hex 0x3e)") test_cpp_expr("(0)", "(int 0)") test_cpp_expr("1 && 1", "(&& (int 1) (int 1))") test_cpp_expr("1 && 0", "(&& (int 1) (int 0))") @@ -1039,13 +876,17 @@ def test_CppExpr(): test_cpp_expr("defined(EXAMPLE)", "(defined EXAMPLE)") test_cpp_expr("defined ( EXAMPLE ) ", "(defined EXAMPLE)") test_cpp_expr("!defined(EXAMPLE)", "(! (defined EXAMPLE))") - test_cpp_expr("defined(ABC) || defined(BINGO)", "(|| (defined ABC) (defined BINGO))") - test_cpp_expr("FOO(BAR)", "(call FOO [BAR])") - test_cpp_expr("A == 1 || defined(B)", "(|| (== (ident A) (int 1)) (defined B))") + test_cpp_expr("defined(ABC) || defined(BINGO)", + "(|| (defined ABC) (defined BINGO))") + test_cpp_expr("FOO(BAR,5)", "(call FOO [BAR,5])") + test_cpp_expr("A == 1 || defined(B)", + "(|| (== (ident A) (int 1)) (defined B))") test_cpp_expr_optim("0", "(int 0)") test_cpp_expr_optim("1", "(int 1)") test_cpp_expr_optim("1 && 1", "(int 1)") + test_cpp_expr_optim("1 && +1", "(int 1)") + test_cpp_expr_optim("0x1 && 01", "(oct 01)") test_cpp_expr_optim("1 && 0", "(int 0)") test_cpp_expr_optim("0 && 1", "(int 0)") test_cpp_expr_optim("0 && 0", "(int 0)") @@ -1054,32 +895,48 @@ def test_CppExpr(): test_cpp_expr_optim("0 || 1", "(int 1)") test_cpp_expr_optim("0 || 0", "(int 0)") test_cpp_expr_optim("A", "(ident A)") - test_cpp_expr_optim("A", "(int 1)", { "A": 1 }) - test_cpp_expr_optim("A || B", "(int 1)", { "A": 1 }) - test_cpp_expr_optim("A || B", "(int 1)", { "B": 1 }) - test_cpp_expr_optim("A && B", "(ident B)", { "A": 1 }) - test_cpp_expr_optim("A && B", "(ident A)", { "B": 1 }) + test_cpp_expr_optim("A", "(int 1)", {"A": 1}) + test_cpp_expr_optim("A || B", "(int 1)", {"A": 1}) + test_cpp_expr_optim("A || B", "(int 1)", {"B": 1}) + test_cpp_expr_optim("A && B", "(ident B)", {"A": 1}) + test_cpp_expr_optim("A && B", "(ident A)", {"B": 1}) test_cpp_expr_optim("A && B", "(&& (ident A) (ident B))") test_cpp_expr_optim("EXAMPLE", "(ident EXAMPLE)") test_cpp_expr_optim("EXAMPLE - 3", "(- (ident EXAMPLE) (int 3))") test_cpp_expr_optim("defined(EXAMPLE)", "(defined EXAMPLE)") - test_cpp_expr_optim("defined(EXAMPLE)", "(defined XOWOE)", { "EXAMPLE": "XOWOE" }) - test_cpp_expr_optim("defined(EXAMPLE)", "(int 0)", { "EXAMPLE": kCppUndefinedMacro}) + test_cpp_expr_optim("defined(EXAMPLE)", "(defined XOWOE)", + {"EXAMPLE": "XOWOE"}) + test_cpp_expr_optim("defined(EXAMPLE)", "(int 0)", + {"EXAMPLE": kCppUndefinedMacro}) test_cpp_expr_optim("!defined(EXAMPLE)", "(! (defined EXAMPLE))") - test_cpp_expr_optim("!defined(EXAMPLE)", "(! (defined XOWOE))", { "EXAMPLE" : "XOWOE" }) - test_cpp_expr_optim("!defined(EXAMPLE)", "(int 1)", { "EXAMPLE" : kCppUndefinedMacro }) - test_cpp_expr_optim("defined(A) || defined(B)", "(|| (defined A) (defined B))") - test_cpp_expr_optim("defined(A) || defined(B)", "(int 1)", { "A" : "1" }) - test_cpp_expr_optim("defined(A) || defined(B)", "(int 1)", { "B" : "1" }) - test_cpp_expr_optim("defined(A) || defined(B)", "(defined A)", { "B" : kCppUndefinedMacro }) - test_cpp_expr_optim("defined(A) || defined(B)", "(int 0)", { "A" : kCppUndefinedMacro, "B" : kCppUndefinedMacro }) - test_cpp_expr_optim("defined(A) && defined(B)", "(&& (defined A) (defined B))") - test_cpp_expr_optim("defined(A) && defined(B)", "(defined B)", { "A" : "1" }) - test_cpp_expr_optim("defined(A) && defined(B)", "(defined A)", { "B" : "1" }) - test_cpp_expr_optim("defined(A) && defined(B)", "(int 0)", { "B" : kCppUndefinedMacro }) - test_cpp_expr_optim("defined(A) && defined(B)", "(int 0)", { "A" : kCppUndefinedMacro }) - test_cpp_expr_optim("A == 1 || defined(B)", "(|| (== (ident A) (int 1)) (defined B))" ) - test_cpp_expr_optim("defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)", "(|| (! (defined __GLIBC__)) (< (ident __GLIBC__) (int 2)))", { "__KERNEL__": kCppUndefinedMacro }) + test_cpp_expr_optim("!defined(EXAMPLE)", "(! (defined XOWOE))", + {"EXAMPLE": "XOWOE"}) + test_cpp_expr_optim("!defined(EXAMPLE)", "(int 1)", + {"EXAMPLE": kCppUndefinedMacro}) + test_cpp_expr_optim("defined(A) || defined(B)", + "(|| (defined A) (defined B))") + test_cpp_expr_optim("defined(A) || defined(B)", "(int 1)", {"A": "1"}) + test_cpp_expr_optim("defined(A) || defined(B)", "(int 1)", {"B": "1"}) + test_cpp_expr_optim("defined(A) || defined(B)", "(defined A)", + {"B": kCppUndefinedMacro}) + test_cpp_expr_optim("defined(A) || defined(B)", "(int 0)", + {"A": kCppUndefinedMacro, "B": kCppUndefinedMacro}) + test_cpp_expr_optim("defined(A) && defined(B)", + "(&& (defined A) (defined B))") + test_cpp_expr_optim("defined(A) && defined(B)", + "(defined B)", {"A": "1"}) + test_cpp_expr_optim("defined(A) && defined(B)", + "(defined A)", {"B": "1"}) + test_cpp_expr_optim("defined(A) && defined(B)", "(int 0)", + {"B": kCppUndefinedMacro}) + test_cpp_expr_optim("defined(A) && defined(B)", + "(int 0)", {"A": kCppUndefinedMacro}) + test_cpp_expr_optim("A == 1 || defined(B)", + "(|| (== (ident A) (int 1)) (defined B))") + test_cpp_expr_optim( + "defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)", + "(|| (! (defined __GLIBC__)) (< (ident __GLIBC__) (int 2)))", + {"__KERNEL__": kCppUndefinedMacro}) test_cpp_expr_source("0", "0") test_cpp_expr_source("1", "1") @@ -1098,179 +955,176 @@ def test_CppExpr(): test_cpp_expr_source("A == 1 || defined(B)", "A == 1 || defined(B)") -##################################################################################### -##################################################################################### -##### ##### -##### C P P B L O C K ##### -##### ##### -##################################################################################### -##################################################################################### +################################################################################ +################################################################################ +##### ##### +##### C P P B L O C K ##### +##### ##### +################################################################################ +################################################################################ -class Block: - """a class used to model a block of input source text. there are two block types: - - directive blocks: contain the tokens of a single pre-processor directive (e.g. #if) - - text blocks, contain the tokens of non-directive blocks - the cpp parser class below will transform an input source file into a list of Block - objects (grouped in a BlockList object for convenience)""" +class Block(object): + """A class used to model a block of input source text. + + There are two block types: + - directive blocks: contain the tokens of a single pre-processor + directive (e.g. #if) + - text blocks, contain the tokens of non-directive blocks + + The cpp parser class below will transform an input source file into a list + of Block objects (grouped in a BlockList object for convenience) + """ + + def __init__(self, tokens, directive=None, lineno=0, identifier=None): + """Initialize a new block, if 'directive' is None, it is a text block. + + NOTE: This automatically converts '#ifdef MACRO' into + '#if defined(MACRO)' and '#ifndef MACRO' into '#if !defined(MACRO)'. + """ - def __init__(self,tokens,directive=None,lineno=0): - """initialize a new block, if 'directive' is None, this is a text block - NOTE: this automatically converts '#ifdef MACRO' into '#if defined(MACRO)' - and '#ifndef MACRO' into '#if !defined(MACRO)'""" if directive == "ifdef": tok = Token() - tok.set(tokDEFINED) - tokens = [ tok ] + tokens + tok.id = tokDEFINED + tokens = [tok] + tokens directive = "if" elif directive == "ifndef": tok1 = Token() tok2 = Token() - tok1.set(tokNOT) - tok2.set(tokDEFINED) - tokens = [ tok1, tok2 ] + tokens + tok1.id = tokNOT + tok2.id = tokDEFINED + tokens = [tok1, tok2] + tokens directive = "if" - self.tokens = tokens + self.tokens = tokens self.directive = directive + self.define_id = identifier if lineno > 0: self.lineno = lineno else: - self.lineno = self.tokens[0].lineno + self.lineno = self.tokens[0].location.line if self.isIf(): - self.expr = CppExpr( self.tokens ) + self.expr = CppExpr(self.tokens) def isDirective(self): - """returns True iff this is a directive block""" - return self.directive != None + """Return True iff this is a directive block.""" + return self.directive is not None def isConditional(self): - """returns True iff this is a conditional directive block""" - return self.directive in ["if","ifdef","ifndef","else","elif","endif"] + """Return True iff this is a conditional directive block.""" + return self.directive in ["if", "ifdef", "ifndef", "else", "elif", + "endif"] def isDefine(self): - """returns the macro name in a #define directive, or None otherwise""" + """Return the macro name in a #define directive, or None otherwise.""" if self.directive != "define": return None - - return self.tokens[0].value + return self.define_id def isIf(self): - """returns True iff this is an #if-like directive block""" - return self.directive in ["if","ifdef","ifndef","elif"] + """Return True iff this is an #if-like directive block.""" + return self.directive in ["if", "ifdef", "ifndef", "elif"] - def isInclude(self): - """checks whether this is a #include directive. if true, then returns the - corresponding file name (with brackets or double-qoutes). None otherwise""" - if self.directive != "include": - return None - - if self.tokens[0].id == tokSTRING: - # a double-quote include, that's easy - return self.tokens[0].value + def isEndif(self): + """Return True iff this is an #endif directive block.""" + return self.directive == "endif" - # we only want the bracket part, not any comments or junk after it - if self.tokens[0].id == "<": - i = 0 - tok = self.tokens - n = len(tok) - while i < n and tok[i].id != ">": - i += 1 - - if i >= n: - return None + def isInclude(self): + """Check whether this is a #include directive. - return string.join([ str(x) for x in tok[:i+1] ],"") + If true, returns the corresponding file name (with brackets or + double-qoutes). None otherwise. + """ - else: + if self.directive != "include": return None + return ''.join([str(x) for x in self.tokens]) - def removeWhiteSpace(self): - # Remove trailing whitespace and empty lines - # All whitespace is also contracted to a single space - if self.directive != None: - return + @staticmethod + def format_blocks(tokens, indent=0): + """Return the formatted lines of strings with proper indentation.""" + newline = True + result = [] + buf = '' + i = 0 + while i < len(tokens): + t = tokens[i] + if t.id == '{': + buf += ' {' + result.append(strip_space(buf)) + indent += 2 + buf = '' + newline = True + elif t.id == '}': + indent -= 2 + if not newline: + result.append(strip_space(buf)) + # Look ahead to determine if it's the end of line. + if (i + 1 < len(tokens) and + (tokens[i+1].id == ';' or + tokens[i+1].id in ['else', '__attribute__', + '__attribute', '__packed'] or + tokens[i+1].kind == TokenKind.IDENTIFIER)): + buf = ' ' * indent + '}' + newline = False + else: + result.append(' ' * indent + '}') + buf = '' + newline = True + elif t.id == ';': + result.append(strip_space(buf) + ';') + buf = '' + newline = True + # We prefer a new line for each constant in enum. + elif t.id == ',' and t.cursor.kind == CursorKind.ENUM_DECL: + result.append(strip_space(buf) + ',') + buf = '' + newline = True + else: + if newline: + buf += ' ' * indent + str(t) + else: + buf += ' ' + str(t) + newline = False + i += 1 - tokens = [] - line = 0 # index of line start - space = -1 # index of first space, or -1 - ii = 0 - nn = len(self.tokens) - while ii < nn: - tok = self.tokens[ii] - - # If we find a space, record its position if this is the first - # one the line start or the previous character. Don't append - # anything to tokens array yet though. - if tok.id == tokSPACE: - if space < 0: - space = ii - ii += 1 - continue - - # If this is a line space, ignore the spaces we found previously - # on the line, and remove empty lines. - if tok.id == tokLN: - old_line = line - old_space = space - ii += 1 - line = ii - space = -1 - if old_space == old_line: # line only contains spaces - continue - if ii-1 == old_line: # line is empty - continue - tokens.append(tok) - continue - - # Other token, append any space range if any, converting each - # one to a single space character, then append the token. - if space >= 0: - jj = space - space = -1 - while jj < ii: - tok2 = self.tokens[jj] - tok2.value = " " - tokens.append(tok2) - jj += 1 - - tokens.append(tok) - ii += 1 + if buf: + result.append(strip_space(buf)) - self.tokens = tokens + return result, indent - def writeWithWarning(self,out,warning,left_count,repeat_count): + def writeWithWarning(self, out, warning, left_count, repeat_count, indent): + """Dump the current block with warnings.""" # removeWhiteSpace() will sometimes creates non-directive blocks # without any tokens. These come from blocks that only contained # empty lines and spaces. They should not be printed in the final # output, and then should not be counted for this operation. # - if not self.directive and self.tokens == []: - return left_count + if self.directive is None and not self.tokens: + return left_count, indent if self.directive: - out.write(str(self).rstrip() + "\n") + out.write(str(self) + '\n') left_count -= 1 if left_count == 0: out.write(warning) left_count = repeat_count else: - for tok in self.tokens: - out.write(str(tok)) - if tok.id == tokLN: - left_count -= 1 - if left_count == 0: - out.write(warning) - left_count = repeat_count - - return left_count + lines, indent = self.format_blocks(self.tokens, indent) + for line in lines: + out.write(line + '\n') + left_count -= 1 + if left_count == 0: + out.write(warning) + left_count = repeat_count + return left_count, indent def __repr__(self): - """generate the representation of a given block""" + """Generate the representation of a given block.""" if self.directive: result = "#%s " % self.directive if self.isIf(): @@ -1286,8 +1140,9 @@ class Block: return result def __str__(self): - """generate the string representation of a given block""" + """Generate the string representation of a given block.""" if self.directive: + # "#if" if self.directive == "if": # small optimization to re-generate #ifdef and #ifndef e = self.expr.expr @@ -1298,114 +1153,138 @@ class Block: result = "#ifndef %s" % e[1][1] else: result = "#if " + str(self.expr) + + # "#define" + elif self.isDefine(): + result = "#%s %s" % (self.directive, self.define_id) + if self.tokens: + result += " " + expr = strip_space(' '.join([tok.id for tok in self.tokens])) + # remove the space between name and '(' in function call + result += re.sub(r'(\w+) \(', r'\1(', expr) + + # "#error" + # Concatenating tokens with a space separator, because they may + # not be quoted and broken into several tokens + elif self.directive == "error": + result = "#error %s" % ' '.join([tok.id for tok in self.tokens]) + else: result = "#%s" % self.directive - if len(self.tokens): + if self.tokens: result += " " - for tok in self.tokens: - result += str(tok) + result += ''.join([tok.id for tok in self.tokens]) else: - result = "" - for tok in self.tokens: - result += str(tok) + lines, _ = self.format_blocks(self.tokens) + result = '\n'.join(lines) return result -class BlockList: - """a convenience class used to hold and process a list of blocks returned by - the cpp parser""" - def __init__(self,blocks): + +class BlockList(object): + """A convenience class used to hold and process a list of blocks. + + It calls the cpp parser to get the blocks. + """ + + def __init__(self, blocks): self.blocks = blocks def __len__(self): return len(self.blocks) - def __getitem__(self,n): + def __getitem__(self, n): return self.blocks[n] def __repr__(self): return repr(self.blocks) def __str__(self): - result = "" - for b in self.blocks: - result += str(b) - if b.isDirective(): - result = result.rstrip() + '\n' + result = '\n'.join([str(b) for b in self.blocks]) return result - def optimizeIf01(self): - """remove the code between #if 0 .. #endif in a BlockList""" + def dump(self): + """Dump all the blocks in current BlockList.""" + print '##### BEGIN #####' + for i, b in enumerate(self.blocks): + print '### BLOCK %d ###' % i + print b + print '##### END #####' + + def optimizeIf01(self): + """Remove the code between #if 0 .. #endif in a BlockList.""" self.blocks = optimize_if01(self.blocks) def optimizeMacros(self, macros): - """remove known defined and undefined macros from a BlockList""" + """Remove known defined and undefined macros from a BlockList.""" for b in self.blocks: if b.isIf(): b.expr.optimize(macros) - def removeMacroDefines(self,macros): - """remove known macro definitions from a BlockList""" - self.blocks = remove_macro_defines(self.blocks,macros) - - def removeWhiteSpace(self): - for b in self.blocks: - b.removeWhiteSpace() + def removeMacroDefines(self, macros): + """Remove known macro definitions from a BlockList.""" + self.blocks = remove_macro_defines(self.blocks, macros) - def optimizeAll(self,macros): + def optimizeAll(self, macros): self.optimizeMacros(macros) self.optimizeIf01() return def findIncludes(self): - """return the list of included files in a BlockList""" + """Return the list of included files in a BlockList.""" result = [] for b in self.blocks: i = b.isInclude() if i: result.append(i) - return result - - def write(self,out): + def write(self, out): out.write(str(self)) - def writeWithWarning(self,out,warning,repeat_count): + def writeWithWarning(self, out, warning, repeat_count): left_count = repeat_count + indent = 0 for b in self.blocks: - left_count = b.writeWithWarning(out,warning,left_count,repeat_count) + left_count, indent = b.writeWithWarning(out, warning, left_count, + repeat_count, indent) + + def removeVarsAndFuncs(self, knownStatics=None): + """Remove variable and function declarations. + + All extern and static declarations corresponding to variable and + function declarations are removed. We only accept typedefs and + enum/structs/union declarations. + + However, we keep the definitions corresponding to the set of known + static inline functions in the set 'knownStatics', which is useful + for optimized byteorder swap functions and stuff like that. + """ + + # NOTE: It's also removing function-like macros, such as __SYSCALL(...) + # in uapi/asm-generic/unistd.h, or KEY_FIELD(...) in linux/bcache.h. + # It could be problematic when we have function-like macros but without + # '}' following them. It will skip all the tokens/blocks until seeing a + # '}' as the function end. Fortunately we don't have such cases in the + # current kernel headers. - def removeComments(self): - for b in self.blocks: - for tok in b.tokens: - if tok.id == tokSPACE: - tok.value = " " - - def removeVarsAndFuncs(self,knownStatics=set()): - """remove all extern and static declarations corresponding - to variable and function declarations. we only accept typedefs - and enum/structs/union declarations. - - however, we keep the definitions corresponding to the set - of known static inline functions in the set 'knownStatics', - which is useful for optimized byteorder swap functions and - stuff like that. - """ # state = 0 => normal (i.e. LN + spaces) # state = 1 => typedef/struct encountered, ends with ";" # state = 2 => var declaration encountered, ends with ";" # state = 3 => func declaration encountered, ends with "}" - state = 0 - depth = 0 - blocks2 = [] + + if knownStatics is None: + knownStatics = set() + state = 0 + depth = 0 + blocks2 = [] skipTokens = False for b in self.blocks: if b.isDirective(): blocks2.append(b) else: - n = len(b.tokens) - i = 0 + n = len(b.tokens) + i = 0 if skipTokens: first = n else: @@ -1434,21 +1313,16 @@ class BlockList: state = 0 if skipTokens: skipTokens = False - first = i+1 + first = i + 1 - i = i+1 - continue - - # We are looking for the start of a new type/func/var - # ignore whitespace - if tokid in [tokLN, tokSPACE]: - i = i+1 + i += 1 continue # Is it a new type definition, then start recording it - if tok.value in [ 'struct', 'typedef', 'enum', 'union', '__extension__' ]: + if tok.id in ['struct', 'typedef', 'enum', 'union', + '__extension__']: state = 1 - i = i+1 + i += 1 continue # Is it a variable or function definition. If so, first @@ -1464,18 +1338,18 @@ class BlockList: # We also assume that the var/func name is the last # identifier before the terminator. # - j = i+1 + j = i + 1 ident = "" while j < n: tokid = b.tokens[j].id if tokid == '(': # a function declaration state = 3 break - elif tokid == ';': # a variable declaration + elif tokid == ';': # a variable declaration state = 2 break - if tokid == tokIDENT: - ident = b.tokens[j].value + if b.tokens[j].kind == TokenKind.IDENTIFIER: + ident = b.tokens[j].id j += 1 if j >= n: @@ -1488,221 +1362,309 @@ class BlockList: # without making our parser much more # complex. # - #print "### skip unterminated static '%s'" % ident + logging.debug("### skip unterminated static '%s'", + ident) break if ident in knownStatics: - #print "### keep var/func '%s': %s" % (ident,repr(b.tokens[i:j])) - pass + logging.debug("### keep var/func '%s': %s", ident, + repr(b.tokens[i:j])) else: # We're going to skip the tokens for this declaration - #print "### skip variable /func'%s': %s" % (ident,repr(b.tokens[i:j])) + logging.debug("### skip var/func '%s': %s", ident, + repr(b.tokens[i:j])) if i > first: - blocks2.append( Block(b.tokens[first:i])) + blocks2.append(Block(b.tokens[first:i])) skipTokens = True - first = n + first = n - i = i+1 + i += 1 if i > first: - #print "### final '%s'" % repr(b.tokens[first:i]) - blocks2.append( Block(b.tokens[first:i]) ) + # print "### final '%s'" % repr(b.tokens[first:i]) + blocks2.append(Block(b.tokens[first:i])) self.blocks = blocks2 - def insertDisclaimer(self,disclaimer="/* auto-generated file, DO NOT EDIT */"): - """insert your standard issue disclaimer that this is an - auto-generated file, etc..""" - tokens = CppLineTokenizer( disclaimer ).toTokenList() - tokens = tokens[:-1] # remove trailing tokLN - self.blocks = [ Block(tokens) ] + self.blocks - - def replaceTokens(self,replacements): - """replace tokens according to the given dict""" + def replaceTokens(self, replacements): + """Replace tokens according to the given dict.""" for b in self.blocks: made_change = False - if b.isInclude() == None: + if b.isInclude() is None: for tok in b.tokens: - if tok.id == tokIDENT: - if tok.value in replacements: - tok.value = replacements[tok.value] + if tok.kind == TokenKind.IDENTIFIER: + if tok.id in replacements: + tok.id = replacements[tok.id] made_change = True + if b.isDefine() and b.define_id in replacements: + b.define_id = replacements[b.define_id] + made_change = True + if made_change and b.isIf(): # Keep 'expr' in sync with 'tokens'. b.expr = CppExpr(b.tokens) -class BlockParser: - """a class used to convert an input source file into a BlockList object""" - - def __init__(self,tokzer=None): - """initialize a block parser. the input source is provided through a Tokenizer - object""" - self.reset(tokzer) - - def reset(self,tokzer): - self.state = 1 - self.tokzer = tokzer - - def getBlocks(self,tokzer=None): - """tokenize and parse the input source, return a BlockList object - NOTE: empty and line-numbering directives are ignored and removed - from the result. as a consequence, it is possible to have - two successive text blocks in the result""" - # state 0 => in source code - # state 1 => in source code, after a LN - # state 2 => in source code, after LN then some space - state = 1 - lastLN = 0 - current = [] - blocks = [] - - if tokzer == None: - tokzer = self.tokzer - - while 1: - tok = tokzer.getToken() - if tok.id == tokEOF: - break - if tok.id == tokLN: - state = 1 - current.append(tok) - lastLN = len(current) +def strip_space(s): + """Strip out redundant space in a given string.""" + + # NOTE: It ought to be more clever to not destroy spaces in string tokens. + replacements = {' . ': '.', + ' [': '[', + '[ ': '[', + ' ]': ']', + '( ': '(', + ' )': ')', + ' ,': ',', + '# ': '#', + ' ;': ';', + '~ ': '~', + ' -> ': '->'} + result = s + for r in replacements: + result = result.replace(r, replacements[r]) + + # Remove the space between function name and the parenthesis. + result = re.sub(r'(\w+) \(', r'\1(', result) + return result - elif tok.id == tokSPACE: - if state == 1: - state = 2 - current.append(tok) - elif tok.id == "#": - if state > 0: - # this is the start of a directive +class BlockParser(object): + """A class that converts an input source file into a BlockList object.""" - if lastLN > 0: - # record previous tokens as text block - block = Block(current[:lastLN]) - blocks.append(block) - lastLN = 0 + def __init__(self, tokzer=None): + """Initialize a block parser. - current = [] + The input source is provided through a Tokenizer object. + """ + self._tokzer = tokzer + self._parsed = False - # skip spaces after the # - while 1: - tok = tokzer.getToken() - if tok.id != tokSPACE: - break + @property + def parsed(self): + return self._parsed - if tok.id != tokIDENT: - # empty or line-numbering, ignore it - if tok.id != tokLN and tok.id != tokEOF: - while 1: - tok = tokzer.getToken() - if tok.id == tokLN or tok.id == tokEOF: - break - continue + @staticmethod + def _short_extent(extent): + return '%d:%d - %d:%d' % (extent.start.line, extent.start.column, + extent.end.line, extent.end.column) + + def getBlocks(self, tokzer=None): + """Return all the blocks parsed.""" + + def consume_extent(i, tokens, extent=None, detect_change=False): + """Return tokens that belong to the given extent. + + It parses all the tokens that follow tokens[i], until getting out + of the extent. When detect_change is True, it may terminate early + when detecting preprocessing directives inside the extent. + """ + + result = [] + if extent is None: + extent = tokens[i].cursor.extent + + while i < len(tokens) and tokens[i].location in extent: + t = tokens[i] + if debugBlockParser: + print ' ' * 2, t.id, t.kind, t.cursor.kind + if (detect_change and t.cursor.extent != extent and + t.cursor.kind == CursorKind.PREPROCESSING_DIRECTIVE): + break + result.append(t) + i += 1 + return (i, result) + + def consume_line(i, tokens): + """Return tokens that follow tokens[i] in the same line.""" + result = [] + line = tokens[i].location.line + while i < len(tokens) and tokens[i].location.line == line: + if tokens[i].cursor.kind == CursorKind.PREPROCESSING_DIRECTIVE: + break + result.append(tokens[i]) + i += 1 + return (i, result) + + if tokzer is None: + tokzer = self._tokzer + tokens = tokzer.tokens + + blocks = [] + buf = [] + i = 0 + + while i < len(tokens): + t = tokens[i] + cursor = t.cursor + + if debugBlockParser: + print ("%d: Processing [%s], kind=[%s], cursor=[%s], " + "extent=[%s]" % (t.location.line, t.spelling, t.kind, + cursor.kind, + self._short_extent(cursor.extent))) + + if cursor.kind == CursorKind.PREPROCESSING_DIRECTIVE: + if buf: + blocks.append(Block(buf)) + buf = [] + + j = i + if j + 1 >= len(tokens): + raise BadExpectedToken("### BAD TOKEN at %s" % (t.location)) + directive = tokens[j+1].id + + if directive == 'define': + if i+2 >= len(tokens): + raise BadExpectedToken("### BAD TOKEN at %s" % + (tokens[i].location)) + + # Skip '#' and 'define'. + extent = tokens[i].cursor.extent + i += 2 + id = '' + # We need to separate the id from the remaining of + # the line, especially for the function-like macro. + if (i + 1 < len(tokens) and tokens[i+1].id == '(' and + (tokens[i].location.column + len(tokens[i].spelling) == + tokens[i+1].location.column)): + while i < len(tokens): + id += tokens[i].id + if tokens[i].spelling == ')': + i += 1 + break + i += 1 + else: + id += tokens[i].id + # Advance to the next token that follows the macro id + i += 1 + + (i, ret) = consume_extent(i, tokens, extent=extent) + blocks.append(Block(ret, directive=directive, + lineno=t.location.line, identifier=id)) + + else: + (i, ret) = consume_extent(i, tokens) + blocks.append(Block(ret[2:], directive=directive, + lineno=t.location.line)) + + elif cursor.kind == CursorKind.INCLUSION_DIRECTIVE: + if buf: + blocks.append(Block(buf)) + buf = [] + directive = tokens[i+1].id + (i, ret) = consume_extent(i, tokens) - directive = tok.value - lineno = tok.lineno + blocks.append(Block(ret[2:], directive=directive, + lineno=t.location.line)) - # skip spaces - tok = tokzer.getToken() - while tok.id == tokSPACE: - tok = tokzer.getToken() + elif cursor.kind == CursorKind.VAR_DECL: + if buf: + blocks.append(Block(buf)) + buf = [] - # then record tokens until LN - dirtokens = [] - while tok.id != tokLN and tok.id != tokEOF: - dirtokens.append(tok) - tok = tokzer.getToken() + (i, ret) = consume_extent(i, tokens, detect_change=True) + buf += ret - block = Block(dirtokens,directive,lineno) - blocks.append(block) - state = 1 + elif cursor.kind == CursorKind.FUNCTION_DECL: + if buf: + blocks.append(Block(buf)) + buf = [] + + (i, ret) = consume_extent(i, tokens, detect_change=True) + buf += ret else: - state = 0 - current.append(tok) + (i, ret) = consume_line(i, tokens) + buf += ret - if len(current) > 0: - block = Block(current) - blocks.append(block) + if buf: + blocks.append(Block(buf)) - return BlockList(blocks) + # _parsed=True indicates a successful parsing, although may result an + # empty BlockList. + self._parsed = True - def parse(self,tokzer): - return self.getBlocks( tokzer ) + return BlockList(blocks) - def parseLines(self,lines): - """parse a list of text lines into a BlockList object""" - return self.getBlocks( CppLinesTokenizer(lines) ) + def parse(self, tokzer): + return self.getBlocks(tokzer) - def parseFile(self,path): - """parse a file into a BlockList object""" - file = open(path, "rt") - result = self.getBlocks( CppFileTokenizer(file) ) - file.close() - return result + def parseFile(self, path): + return self.getBlocks(CppFileTokenizer(path)) -def test_block_parsing(lines,expected): - blocks = BlockParser().parse( CppLinesTokenizer(lines) ) +def test_block_parsing(lines, expected): + """Helper method to test the correctness of BlockParser.parse.""" + blocks = BlockParser().parse(CppStringTokenizer('\n'.join(lines))) if len(blocks) != len(expected): - raise BadExpectedToken, "parser.buildBlocks returned '%s' expecting '%s'" \ - % (str(blocks), repr(expected)) + raise BadExpectedToken("BlockParser.parse() returned '%s' expecting " + "'%s'" % (str(blocks), repr(expected))) for n in range(len(blocks)): if str(blocks[n]) != expected[n]: - raise BadExpectedToken, "parser.buildBlocks()[%d] is '%s', expecting '%s'" \ - % (n, str(blocks[n]), expected[n]) - #for block in blocks: - # print block + raise BadExpectedToken("BlockParser.parse()[%d] is '%s', " + "expecting '%s'" % (n, str(blocks[n]), + expected[n])) + def test_BlockParser(): - test_block_parsing(["#error hello"],["#error hello"]) - test_block_parsing([ "foo", "", "bar" ], [ "foo\n\nbar\n" ]) - test_block_parsing([ "foo", " # ", "bar" ], [ "foo\n","bar\n" ]) - test_block_parsing(\ - [ "foo", " # ", " # /* ahah */ if defined(__KERNEL__) ", "bar", "#endif" ], - [ "foo\n", "#ifdef __KERNEL__", "bar\n", "#endif" ] ) - - -##################################################################################### -##################################################################################### -##### ##### -##### B L O C K L I S T O P T I M I Z A T I O N ##### -##### ##### -##################################################################################### -##################################################################################### - -def remove_macro_defines( blocks, excludedMacros=set() ): - """remove macro definitions like #define ....""" + test_block_parsing(["#error hello"], ["#error hello"]) + test_block_parsing(["foo", "", "bar"], ["foo bar"]) + + # We currently cannot handle the following case with libclang properly. + # Fortunately it doesn't appear in current headers. + # test_block_parsing(["foo", " # ", "bar"], ["foo", "bar"]) + + test_block_parsing(["foo", + " # /* ahah */ if defined(__KERNEL__) /* more */", + "bar", "#endif"], + ["foo", "#ifdef __KERNEL__", "bar", "#endif"]) + + +################################################################################ +################################################################################ +##### ##### +##### B L O C K L I S T O P T I M I Z A T I O N ##### +##### ##### +################################################################################ +################################################################################ + + +def remove_macro_defines(blocks, excludedMacros=None): + """Remove macro definitions like #define ....""" + if excludedMacros is None: + excludedMacros = set() result = [] for b in blocks: macroName = b.isDefine() - if macroName == None or not macroName in excludedMacros: + if macroName is None or macroName not in excludedMacros: result.append(b) return result -def find_matching_endif( blocks, i ): - n = len(blocks) + +def find_matching_endif(blocks, i): + """Traverse the blocks to find out the matching #endif.""" + n = len(blocks) depth = 1 while i < n: if blocks[i].isDirective(): - dir = blocks[i].directive - if dir in [ "if", "ifndef", "ifdef" ]: + dir_ = blocks[i].directive + if dir_ in ["if", "ifndef", "ifdef"]: depth += 1 - elif depth == 1 and dir in [ "else", "elif" ]: + elif depth == 1 and dir_ in ["else", "elif"]: return i - elif dir == "endif": + elif dir_ == "endif": depth -= 1 if depth == 0: return i i += 1 return i -def optimize_if01( blocks ): - """remove the code between #if 0 .. #endif in a list of CppBlocks""" + +def optimize_if01(blocks): + """Remove the code between #if 0 .. #endif in a list of CppBlocks.""" i = 0 n = len(blocks) result = [] @@ -1711,34 +1673,37 @@ def optimize_if01( blocks ): while j < n and not blocks[j].isIf(): j += 1 if j > i: - logging.debug("appending lines %d to %d" % (blocks[i].lineno, blocks[j-1].lineno)) + logging.debug("appending lines %d to %d", blocks[i].lineno, + blocks[j-1].lineno) result += blocks[i:j] if j >= n: break expr = blocks[j].expr - r = expr.toInt() - if r == None: + r = expr.toInt() + if r is None: result.append(blocks[j]) i = j + 1 continue if r == 0: # if 0 => skip everything until the corresponding #endif - j = find_matching_endif( blocks, j+1 ) + j = find_matching_endif(blocks, j + 1) if j >= n: # unterminated #if 0, finish here break - dir = blocks[j].directive - if dir == "endif": - logging.debug("remove 'if 0' .. 'endif' (lines %d to %d)" % (blocks[i].lineno, blocks[j].lineno)) + dir_ = blocks[j].directive + if dir_ == "endif": + logging.debug("remove 'if 0' .. 'endif' (lines %d to %d)", + blocks[i].lineno, blocks[j].lineno) i = j + 1 - elif dir == "else": + elif dir_ == "else": # convert 'else' into 'if 1' - logging.debug("convert 'if 0' .. 'else' into 'if 1' (lines %d to %d)" % (blocks[i].lineno, blocks[j-1].lineno)) + logging.debug("convert 'if 0' .. 'else' into 'if 1' (lines %d " + "to %d)", blocks[i].lineno, blocks[j-1].lineno) blocks[j].directive = "if" - blocks[j].expr = CppExpr( CppLineTokenizer("1").toTokenList() ) + blocks[j].expr = CppExpr(CppStringTokenizer("1").tokens) i = j - elif dir == "elif": + elif dir_ == "elif": # convert 'elif' into 'if' logging.debug("convert 'if 0' .. 'elif' into 'if'") blocks[j].directive = "if" @@ -1746,34 +1711,38 @@ def optimize_if01( blocks ): continue # if 1 => find corresponding endif and remove/transform them - k = find_matching_endif( blocks, j+1 ) + k = find_matching_endif(blocks, j + 1) if k >= n: # unterminated #if 1, finish here logging.debug("unterminated 'if 1'") result += blocks[j+1:k] break - dir = blocks[k].directive - if dir == "endif": - logging.debug("convert 'if 1' .. 'endif' (lines %d to %d)" % (blocks[j].lineno, blocks[k].lineno)) + dir_ = blocks[k].directive + if dir_ == "endif": + logging.debug("convert 'if 1' .. 'endif' (lines %d to %d)", + blocks[j].lineno, blocks[k].lineno) result += optimize_if01(blocks[j+1:k]) - i = k+1 - elif dir == "else": + i = k + 1 + elif dir_ == "else": # convert 'else' into 'if 0' - logging.debug("convert 'if 1' .. 'else' (lines %d to %d)" % (blocks[j].lineno, blocks[k].lineno)) + logging.debug("convert 'if 1' .. 'else' (lines %d to %d)", + blocks[j].lineno, blocks[k].lineno) result += optimize_if01(blocks[j+1:k]) blocks[k].directive = "if" - blocks[k].expr = CppExpr( CppLineTokenizer("0").toTokenList() ) + blocks[k].expr = CppExpr(CppStringTokenizer("0").tokens) i = k - elif dir == "elif": + elif dir_ == "elif": # convert 'elif' into 'if 0' - logging.debug("convert 'if 1' .. 'elif' (lines %d to %d)" % (blocks[j].lineno, blocks[k].lineno)) + logging.debug("convert 'if 1' .. 'elif' (lines %d to %d)", + blocks[j].lineno, blocks[k].lineno) result += optimize_if01(blocks[j+1:k]) - blocks[k].expr = CppExpr( CppLineTokenizer("0").toTokenList() ) + blocks[k].expr = CppExpr(CppStringTokenizer("0").tokens) i = k return result -def test_optimizeAll(): + +def test_optimizeAll(): text = """\ #if 1 #define GOOD_1 @@ -1816,49 +1785,41 @@ def test_optimizeAll(): expected = """\ #define GOOD_1 - #define GOOD_2 - #define GOOD_3 - - #if !defined(__GLIBC__) || __GLIBC__ < 2 #define X #endif - #ifndef __SIGRTMAX #define __SIGRTMAX 123 -#endif - +#endif\ """ - out = StringOutput() - lines = string.split(text, '\n') - list = BlockParser().parse( CppLinesTokenizer(lines) ) - list.replaceTokens( kernel_token_replacements ) - list.optimizeAll( {"__KERNEL__":kCppUndefinedMacro} ) - list.write(out) + out = utils.StringOutput() + blocks = BlockParser().parse(CppStringTokenizer(text)) + blocks.replaceTokens(kernel_token_replacements) + blocks.optimizeAll({"__KERNEL__": kCppUndefinedMacro}) + blocks.write(out) if out.get() != expected: print "[FAIL]: macro optimization failed\n" print "<<<< expecting '", print expected, - print "'\n>>>> result '" + print "'\n>>>> result '", print out.get(), print "'\n----" global failure_count failure_count += 1 -# -- Always run the unit tests. - def runUnitTests(): - """run all unit tests for this program""" + """Always run all unit tests for this program.""" test_CppTokenizer() test_CppExpr() test_optimizeAll() test_BlockParser() + failure_count = 0 runUnitTests() if failure_count != 0: - sys.exit(1) + utils.panic("Unit tests failed in cpp.py.\n") diff --git a/libc/kernel/uapi/asm-arm/asm/a.out.h b/libc/kernel/uapi/asm-arm/asm/a.out.h index 54b30acda..3d51506ae 100644 --- a/libc/kernel/uapi/asm-arm/asm/a.out.h +++ b/libc/kernel/uapi/asm-arm/asm/a.out.h @@ -21,28 +21,26 @@ #include #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -struct exec -{ - __u32 a_info; - __u32 a_text; +struct exec { + __u32 a_info; + __u32 a_text; + __u32 a_data; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 a_data; - __u32 a_bss; - __u32 a_syms; - __u32 a_entry; + __u32 a_bss; + __u32 a_syms; + __u32 a_entry; + __u32 a_trsize; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 a_trsize; - __u32 a_drsize; + __u32 a_drsize; }; #define N_TXTADDR(a) (0x00008000) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define N_TRSIZE(a) ((a).a_trsize) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) #define M_ARM 103 -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #ifndef LIBRARY_START_TEXT +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define LIBRARY_START_TEXT (0x00c00000) #endif #endif -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-arm/asm/kvm.h b/libc/kernel/uapi/asm-arm/asm/kvm.h index 0a238e0b0..c37d809f5 100644 --- a/libc/kernel/uapi/asm-arm/asm/kvm.h +++ b/libc/kernel/uapi/asm-arm/asm/kvm.h @@ -26,7 +26,7 @@ #define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_READONLY_MEM /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) +#define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) #define KVM_ARM_SVC_sp svc_regs[0] #define KVM_ARM_SVC_lr svc_regs[1] #define KVM_ARM_SVC_spsr svc_regs[2] @@ -53,13 +53,13 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KVM_ARM_FIQ_spsr fiq_regs[7] struct kvm_regs { - struct pt_regs usr_regs; - unsigned long svc_regs[3]; + struct pt_regs usr_regs; + unsigned long svc_regs[3]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long abt_regs[3]; - unsigned long und_regs[3]; - unsigned long irq_regs[3]; - unsigned long fiq_regs[8]; + unsigned long abt_regs[3]; + unsigned long und_regs[3]; + unsigned long irq_regs[3]; + unsigned long fiq_regs[8]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #define KVM_ARM_TARGET_CORTEX_A15 0 @@ -81,8 +81,8 @@ struct kvm_regs { #define KVM_ARM_VCPU_PSCI_0_2 1 struct kvm_vcpu_init { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 target; - __u32 features[7]; + __u32 target; + __u32 features[7]; }; struct kvm_sregs { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -112,11 +112,11 @@ struct kvm_arch_memory_slot { #define KVM_REG_ARM_32_CRN_MASK 0x0000000000007800 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KVM_REG_ARM_32_CRN_SHIFT 11 -#define ARM_CP15_REG_SHIFT_MASK(x,n) (((x) << KVM_REG_ARM_ ## n ## _SHIFT) & KVM_REG_ARM_ ## n ## _MASK) -#define __ARM_CP15_REG(op1,crn,crm,op2) (KVM_REG_ARM | (15 << KVM_REG_ARM_COPROC_SHIFT) | ARM_CP15_REG_SHIFT_MASK(op1, OPC1) | ARM_CP15_REG_SHIFT_MASK(crn, 32_CRN) | ARM_CP15_REG_SHIFT_MASK(crm, CRM) | ARM_CP15_REG_SHIFT_MASK(op2, 32_OPC2)) +#define ARM_CP15_REG_SHIFT_MASK(x,n) (((x) << KVM_REG_ARM_ ##n ##_SHIFT) & KVM_REG_ARM_ ##n ##_MASK) +#define __ARM_CP15_REG(op1,crn,crm,op2) (KVM_REG_ARM | (15 << KVM_REG_ARM_COPROC_SHIFT) | ARM_CP15_REG_SHIFT_MASK(op1, OPC1) | ARM_CP15_REG_SHIFT_MASK(crn, 32_CRN) | ARM_CP15_REG_SHIFT_MASK(crm, CRM) | ARM_CP15_REG_SHIFT_MASK(op2, 32_OPC2)) #define ARM_CP15_REG32(...) (__ARM_CP15_REG(__VA_ARGS__) | KVM_REG_SIZE_U32) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __ARM_CP15_REG64(op1,crm) (__ARM_CP15_REG(op1, 0, crm, 0) | KVM_REG_SIZE_U64) +#define __ARM_CP15_REG64(op1,crm) (__ARM_CP15_REG(op1, 0, crm, 0) | KVM_REG_SIZE_U64) #define ARM_CP15_REG64(...) __ARM_CP15_REG64(__VA_ARGS__) #define KVM_REG_ARM_TIMER_CTL ARM_CP15_REG32(0, 14, 3, 1) #define KVM_REG_ARM_TIMER_CNT ARM_CP15_REG64(1, 14) diff --git a/libc/kernel/uapi/asm-arm/asm/mman.h b/libc/kernel/uapi/asm-arm/asm/mman.h index 40f0e9773..ec9453d06 100644 --- a/libc/kernel/uapi/asm-arm/asm/mman.h +++ b/libc/kernel/uapi/asm-arm/asm/mman.h @@ -17,4 +17,4 @@ **************************************************************************** ****************************************************************************/ #include -#define arch_mmap_check(addr, len, flags) (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? -EINVAL : 0) +#define arch_mmap_check(addr,len,flags) (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? - EINVAL : 0) diff --git a/libc/kernel/uapi/asm-arm/asm/perf_regs.h b/libc/kernel/uapi/asm-arm/asm/perf_regs.h index 745bcf30c..537eb4444 100644 --- a/libc/kernel/uapi/asm-arm/asm/perf_regs.h +++ b/libc/kernel/uapi/asm-arm/asm/perf_regs.h @@ -19,27 +19,27 @@ #ifndef _ASM_ARM_PERF_REGS_H #define _ASM_ARM_PERF_REGS_H enum perf_event_arm_regs { - PERF_REG_ARM_R0, + PERF_REG_ARM_R0, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM_R1, - PERF_REG_ARM_R2, - PERF_REG_ARM_R3, - PERF_REG_ARM_R4, + PERF_REG_ARM_R1, + PERF_REG_ARM_R2, + PERF_REG_ARM_R3, + PERF_REG_ARM_R4, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM_R5, - PERF_REG_ARM_R6, - PERF_REG_ARM_R7, - PERF_REG_ARM_R8, + PERF_REG_ARM_R5, + PERF_REG_ARM_R6, + PERF_REG_ARM_R7, + PERF_REG_ARM_R8, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM_R9, - PERF_REG_ARM_R10, - PERF_REG_ARM_FP, - PERF_REG_ARM_IP, + PERF_REG_ARM_R9, + PERF_REG_ARM_R10, + PERF_REG_ARM_FP, + PERF_REG_ARM_IP, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM_SP, - PERF_REG_ARM_LR, - PERF_REG_ARM_PC, - PERF_REG_ARM_MAX, + PERF_REG_ARM_SP, + PERF_REG_ARM_LR, + PERF_REG_ARM_PC, + PERF_REG_ARM_MAX, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-arm/asm/ptrace.h b/libc/kernel/uapi/asm-arm/asm/ptrace.h index 9d39d4917..6a015982b 100644 --- a/libc/kernel/uapi/asm-arm/asm/ptrace.h +++ b/libc/kernel/uapi/asm-arm/asm/ptrace.h @@ -89,7 +89,7 @@ #define PT_TEXT_END_ADDR 0x10008 #ifndef __ASSEMBLY__ struct pt_regs { - long uregs[18]; + long uregs[18]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #define ARM_cpsr uregs[16] @@ -114,7 +114,7 @@ struct pt_regs { #define ARM_r1 uregs[1] #define ARM_r0 uregs[0] #define ARM_ORIG_r0 uregs[17] -#define ARM_VFPREGS_SIZE ( 32 * 8 + 4 ) +#define ARM_VFPREGS_SIZE (32 * 8 + 4) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #endif diff --git a/libc/kernel/uapi/asm-arm/asm/setup.h b/libc/kernel/uapi/asm-arm/asm/setup.h index 0f2a18b58..5fd2f20d9 100644 --- a/libc/kernel/uapi/asm-arm/asm/setup.h +++ b/libc/kernel/uapi/asm-arm/asm/setup.h @@ -23,133 +23,133 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define ATAG_NONE 0x00000000 struct tag_header { - __u32 size; - __u32 tag; + __u32 size; + __u32 tag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #define ATAG_CORE 0x54410001 struct tag_core { - __u32 flags; + __u32 flags; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 pagesize; - __u32 rootdev; + __u32 pagesize; + __u32 rootdev; }; #define ATAG_MEM 0x54410002 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct tag_mem32 { - __u32 size; - __u32 start; + __u32 size; + __u32 start; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define ATAG_VIDEOTEXT 0x54410003 struct tag_videotext { - __u8 x; - __u8 y; + __u8 x; + __u8 y; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u16 video_page; - __u8 video_mode; - __u8 video_cols; - __u16 video_ega_bx; + __u16 video_page; + __u8 video_mode; + __u8 video_cols; + __u16 video_ega_bx; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u8 video_lines; - __u8 video_isvga; - __u16 video_points; + __u8 video_lines; + __u8 video_isvga; + __u16 video_points; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define ATAG_RAMDISK 0x54410004 struct tag_ramdisk { - __u32 flags; - __u32 size; + __u32 flags; + __u32 size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 start; + __u32 start; }; #define ATAG_INITRD 0x54410005 #define ATAG_INITRD2 0x54420005 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct tag_initrd { - __u32 start; - __u32 size; + __u32 start; + __u32 size; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define ATAG_SERIAL 0x54410006 struct tag_serialnr { - __u32 low; - __u32 high; + __u32 low; + __u32 high; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #define ATAG_REVISION 0x54410007 struct tag_revision { - __u32 rev; + __u32 rev; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #define ATAG_VIDEOLFB 0x54410008 struct tag_videolfb { - __u16 lfb_width; + __u16 lfb_width; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u16 lfb_height; - __u16 lfb_depth; - __u16 lfb_linelength; - __u32 lfb_base; + __u16 lfb_height; + __u16 lfb_depth; + __u16 lfb_linelength; + __u32 lfb_base; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 lfb_size; - __u8 red_size; - __u8 red_pos; - __u8 green_size; + __u32 lfb_size; + __u8 red_size; + __u8 red_pos; + __u8 green_size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u8 green_pos; - __u8 blue_size; - __u8 blue_pos; - __u8 rsvd_size; + __u8 green_pos; + __u8 blue_size; + __u8 blue_pos; + __u8 rsvd_size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u8 rsvd_pos; + __u8 rsvd_pos; }; #define ATAG_CMDLINE 0x54410009 struct tag_cmdline { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - char cmdline[1]; + char cmdline[1]; }; #define ATAG_ACORN 0x41000101 struct tag_acorn { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 memc_control_reg; - __u32 vram_pages; - __u8 sounddefault; - __u8 adfsdrives; + __u32 memc_control_reg; + __u32 vram_pages; + __u8 sounddefault; + __u8 adfsdrives; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #define ATAG_MEMCLK 0x41000402 struct tag_memclk { - __u32 fmemclk; + __u32 fmemclk; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; struct tag { - struct tag_header hdr; - union { + struct tag_header hdr; + union { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct tag_core core; - struct tag_mem32 mem; - struct tag_videotext videotext; - struct tag_ramdisk ramdisk; + struct tag_core core; + struct tag_mem32 mem; + struct tag_videotext videotext; + struct tag_ramdisk ramdisk; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct tag_initrd initrd; - struct tag_serialnr serialnr; - struct tag_revision revision; - struct tag_videolfb videolfb; + struct tag_initrd initrd; + struct tag_serialnr serialnr; + struct tag_revision revision; + struct tag_videolfb videolfb; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct tag_cmdline cmdline; - struct tag_acorn acorn; - struct tag_memclk memclk; - } u; + struct tag_cmdline cmdline; + struct tag_acorn acorn; + struct tag_memclk memclk; + } u; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; struct tagtable { - __u32 tag; - int (*parse)(const struct tag *); + __u32 tag; + int(* parse) (const struct tag *); /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; -#define tag_member_present(tag,member) ((unsigned long)(&((struct tag *)0L)->member + 1) <= (tag)->hdr.size * 4) -#define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size)) +#define tag_member_present(tag,member) ((unsigned long) (& ((struct tag *) 0L)->member + 1) <= (tag)->hdr.size * 4) +#define tag_next(t) ((struct tag *) ((__u32 *) (t) + (t)->hdr.size)) #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define for_each_tag(t,base) for (t = base; t->hdr.size; t = tag_next(t)) +#define for_each_tag(t,base) for(t = base; t->hdr.size; t = tag_next(t)) #endif diff --git a/libc/kernel/uapi/asm-arm/asm/sigcontext.h b/libc/kernel/uapi/asm-arm/asm/sigcontext.h index bda233947..739de4c10 100644 --- a/libc/kernel/uapi/asm-arm/asm/sigcontext.h +++ b/libc/kernel/uapi/asm-arm/asm/sigcontext.h @@ -19,32 +19,32 @@ #ifndef _ASMARM_SIGCONTEXT_H #define _ASMARM_SIGCONTEXT_H struct sigcontext { - unsigned long trap_no; + unsigned long trap_no; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long error_code; - unsigned long oldmask; - unsigned long arm_r0; - unsigned long arm_r1; + unsigned long error_code; + unsigned long oldmask; + unsigned long arm_r0; + unsigned long arm_r1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long arm_r2; - unsigned long arm_r3; - unsigned long arm_r4; - unsigned long arm_r5; + unsigned long arm_r2; + unsigned long arm_r3; + unsigned long arm_r4; + unsigned long arm_r5; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long arm_r6; - unsigned long arm_r7; - unsigned long arm_r8; - unsigned long arm_r9; + unsigned long arm_r6; + unsigned long arm_r7; + unsigned long arm_r8; + unsigned long arm_r9; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long arm_r10; - unsigned long arm_fp; - unsigned long arm_ip; - unsigned long arm_sp; + unsigned long arm_r10; + unsigned long arm_fp; + unsigned long arm_ip; + unsigned long arm_sp; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long arm_lr; - unsigned long arm_pc; - unsigned long arm_cpsr; - unsigned long fault_address; + unsigned long arm_lr; + unsigned long arm_pc; + unsigned long arm_cpsr; + unsigned long fault_address; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-arm/asm/signal.h b/libc/kernel/uapi/asm-arm/asm/signal.h index fd39aaa9a..5ee272b6a 100644 --- a/libc/kernel/uapi/asm-arm/asm/signal.h +++ b/libc/kernel/uapi/asm-arm/asm/signal.h @@ -88,23 +88,23 @@ typedef unsigned long sigset_t; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #include struct sigaction { - union { - __sighandler_t _sa_handler; + union { + __sighandler_t _sa_handler; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - void (*_sa_sigaction)(int, struct siginfo *, void *); - } _u; - sigset_t sa_mask; - unsigned long sa_flags; + void(* _sa_sigaction) (int, struct siginfo *, void *); + } _u; + sigset_t sa_mask; + unsigned long sa_flags; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - void (*sa_restorer)(void); + void(* sa_restorer) (void); }; #define sa_handler _u._sa_handler #define sa_sigaction _u._sa_sigaction /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef struct sigaltstack { - void __user *ss_sp; - int ss_flags; - size_t ss_size; + void __user * ss_sp; + int ss_flags; + size_t ss_size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ } stack_t; #endif diff --git a/libc/kernel/uapi/asm-arm/asm/stat.h b/libc/kernel/uapi/asm-arm/asm/stat.h index b3425dd8d..5a78c010e 100644 --- a/libc/kernel/uapi/asm-arm/asm/stat.h +++ b/libc/kernel/uapi/asm-arm/asm/stat.h @@ -19,73 +19,73 @@ #ifndef _ASMARM_STAT_H #define _ASMARM_STAT_H struct __old_kernel_stat { - unsigned short st_dev; + unsigned short st_dev; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; + unsigned short st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short st_gid; - unsigned short st_rdev; - unsigned long st_size; - unsigned long st_atime; + unsigned short st_gid; + unsigned short st_rdev; + unsigned long st_size; + unsigned long st_atime; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_mtime; - unsigned long st_ctime; + unsigned long st_mtime; + unsigned long st_ctime; }; #define STAT_HAVE_NSEC /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct stat { - unsigned long st_dev; - unsigned long st_ino; - unsigned short st_mode; + unsigned long st_dev; + unsigned long st_ino; + unsigned short st_mode; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned long st_rdev; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned long st_rdev; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; + unsigned long st_size; + unsigned long st_blksize; + unsigned long st_blocks; + unsigned long st_atime; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned long st_mtime_nsec; + unsigned long st_ctime; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_ctime_nsec; - unsigned long __unused4; - unsigned long __unused5; + unsigned long st_ctime_nsec; + unsigned long __unused4; + unsigned long __unused5; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct stat64 { - unsigned long long st_dev; - unsigned char __pad0[4]; + unsigned long long st_dev; + unsigned char __pad0[4]; #define STAT64_HAS_BROKEN_ST_INO 1 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __st_ino; - unsigned int st_mode; - unsigned int st_nlink; - unsigned long st_uid; + unsigned long __st_ino; + unsigned int st_mode; + unsigned int st_nlink; + unsigned long st_uid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_gid; - unsigned long long st_rdev; - unsigned char __pad3[4]; - long long st_size; + unsigned long st_gid; + unsigned long long st_rdev; + unsigned char __pad3[4]; + long long st_size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_blksize; - unsigned long long st_blocks; - unsigned long st_atime; - unsigned long st_atime_nsec; + unsigned long st_blksize; + unsigned long long st_blocks; + unsigned long st_atime; + unsigned long st_atime_nsec; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; + unsigned long st_mtime; + unsigned long st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long long st_ino; + unsigned long long st_ino; }; #endif diff --git a/libc/kernel/uapi/asm-arm/asm/statfs.h b/libc/kernel/uapi/asm-arm/asm/statfs.h index d1f3b8192..60ccd6b82 100644 --- a/libc/kernel/uapi/asm-arm/asm/statfs.h +++ b/libc/kernel/uapi/asm-arm/asm/statfs.h @@ -18,7 +18,7 @@ ****************************************************************************/ #ifndef _ASMARM_STATFS_H #define _ASMARM_STATFS_H -#define ARCH_PACK_STATFS64 __attribute__((packed,aligned(4))) +#define ARCH_PACK_STATFS64 __attribute__((packed, aligned(4))) #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif diff --git a/libc/kernel/uapi/asm-arm/asm/unistd.h b/libc/kernel/uapi/asm-arm/asm/unistd.h index fbea19698..32f66884d 100644 --- a/libc/kernel/uapi/asm-arm/asm/unistd.h +++ b/libc/kernel/uapi/asm-arm/asm/unistd.h @@ -21,457 +21,457 @@ #define __NR_OABI_SYSCALL_BASE 0x900000 #define __NR_SYSCALL_BASE 0 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) -#define __NR_exit (__NR_SYSCALL_BASE+ 1) -#define __NR_fork (__NR_SYSCALL_BASE+ 2) -#define __NR_read (__NR_SYSCALL_BASE+ 3) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_write (__NR_SYSCALL_BASE+ 4) -#define __NR_open (__NR_SYSCALL_BASE+ 5) -#define __NR_close (__NR_SYSCALL_BASE+ 6) -#define __NR_creat (__NR_SYSCALL_BASE+ 8) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_link (__NR_SYSCALL_BASE+ 9) -#define __NR_unlink (__NR_SYSCALL_BASE+ 10) -#define __NR_execve (__NR_SYSCALL_BASE+ 11) -#define __NR_chdir (__NR_SYSCALL_BASE+ 12) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_time (__NR_SYSCALL_BASE+ 13) -#define __NR_mknod (__NR_SYSCALL_BASE+ 14) -#define __NR_chmod (__NR_SYSCALL_BASE+ 15) -#define __NR_lchown (__NR_SYSCALL_BASE+ 16) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_lseek (__NR_SYSCALL_BASE+ 19) -#define __NR_getpid (__NR_SYSCALL_BASE+ 20) -#define __NR_mount (__NR_SYSCALL_BASE+ 21) -#define __NR_umount (__NR_SYSCALL_BASE+ 22) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_setuid (__NR_SYSCALL_BASE+ 23) -#define __NR_getuid (__NR_SYSCALL_BASE+ 24) -#define __NR_stime (__NR_SYSCALL_BASE+ 25) -#define __NR_ptrace (__NR_SYSCALL_BASE+ 26) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_alarm (__NR_SYSCALL_BASE+ 27) -#define __NR_pause (__NR_SYSCALL_BASE+ 29) -#define __NR_utime (__NR_SYSCALL_BASE+ 30) -#define __NR_access (__NR_SYSCALL_BASE+ 33) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_nice (__NR_SYSCALL_BASE+ 34) -#define __NR_sync (__NR_SYSCALL_BASE+ 36) -#define __NR_kill (__NR_SYSCALL_BASE+ 37) -#define __NR_rename (__NR_SYSCALL_BASE+ 38) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_mkdir (__NR_SYSCALL_BASE+ 39) -#define __NR_rmdir (__NR_SYSCALL_BASE+ 40) -#define __NR_dup (__NR_SYSCALL_BASE+ 41) -#define __NR_pipe (__NR_SYSCALL_BASE+ 42) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_times (__NR_SYSCALL_BASE+ 43) -#define __NR_brk (__NR_SYSCALL_BASE+ 45) -#define __NR_setgid (__NR_SYSCALL_BASE+ 46) -#define __NR_getgid (__NR_SYSCALL_BASE+ 47) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_geteuid (__NR_SYSCALL_BASE+ 49) -#define __NR_getegid (__NR_SYSCALL_BASE+ 50) -#define __NR_acct (__NR_SYSCALL_BASE+ 51) -#define __NR_umount2 (__NR_SYSCALL_BASE+ 52) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_ioctl (__NR_SYSCALL_BASE+ 54) -#define __NR_fcntl (__NR_SYSCALL_BASE+ 55) -#define __NR_setpgid (__NR_SYSCALL_BASE+ 57) -#define __NR_umask (__NR_SYSCALL_BASE+ 60) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_chroot (__NR_SYSCALL_BASE+ 61) -#define __NR_ustat (__NR_SYSCALL_BASE+ 62) -#define __NR_dup2 (__NR_SYSCALL_BASE+ 63) -#define __NR_getppid (__NR_SYSCALL_BASE+ 64) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) -#define __NR_setsid (__NR_SYSCALL_BASE+ 66) -#define __NR_sigaction (__NR_SYSCALL_BASE+ 67) -#define __NR_setreuid (__NR_SYSCALL_BASE+ 70) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_setregid (__NR_SYSCALL_BASE+ 71) -#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) -#define __NR_sigpending (__NR_SYSCALL_BASE+ 73) -#define __NR_sethostname (__NR_SYSCALL_BASE+ 74) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) -#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) -#define __NR_getrusage (__NR_SYSCALL_BASE+ 77) -#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) -#define __NR_getgroups (__NR_SYSCALL_BASE+ 80) -#define __NR_setgroups (__NR_SYSCALL_BASE+ 81) -#define __NR_select (__NR_SYSCALL_BASE+ 82) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_symlink (__NR_SYSCALL_BASE+ 83) -#define __NR_readlink (__NR_SYSCALL_BASE+ 85) -#define __NR_uselib (__NR_SYSCALL_BASE+ 86) -#define __NR_swapon (__NR_SYSCALL_BASE+ 87) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_reboot (__NR_SYSCALL_BASE+ 88) -#define __NR_readdir (__NR_SYSCALL_BASE+ 89) -#define __NR_mmap (__NR_SYSCALL_BASE+ 90) -#define __NR_munmap (__NR_SYSCALL_BASE+ 91) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_truncate (__NR_SYSCALL_BASE+ 92) -#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) -#define __NR_fchmod (__NR_SYSCALL_BASE+ 94) -#define __NR_fchown (__NR_SYSCALL_BASE+ 95) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getpriority (__NR_SYSCALL_BASE+ 96) -#define __NR_setpriority (__NR_SYSCALL_BASE+ 97) -#define __NR_statfs (__NR_SYSCALL_BASE+ 99) -#define __NR_fstatfs (__NR_SYSCALL_BASE+100) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_socketcall (__NR_SYSCALL_BASE+102) -#define __NR_syslog (__NR_SYSCALL_BASE+103) -#define __NR_setitimer (__NR_SYSCALL_BASE+104) -#define __NR_getitimer (__NR_SYSCALL_BASE+105) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_stat (__NR_SYSCALL_BASE+106) -#define __NR_lstat (__NR_SYSCALL_BASE+107) -#define __NR_fstat (__NR_SYSCALL_BASE+108) -#define __NR_vhangup (__NR_SYSCALL_BASE+111) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_syscall (__NR_SYSCALL_BASE+113) -#define __NR_wait4 (__NR_SYSCALL_BASE+114) -#define __NR_swapoff (__NR_SYSCALL_BASE+115) -#define __NR_sysinfo (__NR_SYSCALL_BASE+116) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_ipc (__NR_SYSCALL_BASE+117) -#define __NR_fsync (__NR_SYSCALL_BASE+118) -#define __NR_sigreturn (__NR_SYSCALL_BASE+119) -#define __NR_clone (__NR_SYSCALL_BASE+120) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_setdomainname (__NR_SYSCALL_BASE+121) -#define __NR_uname (__NR_SYSCALL_BASE+122) -#define __NR_adjtimex (__NR_SYSCALL_BASE+124) -#define __NR_mprotect (__NR_SYSCALL_BASE+125) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_sigprocmask (__NR_SYSCALL_BASE+126) -#define __NR_init_module (__NR_SYSCALL_BASE+128) -#define __NR_delete_module (__NR_SYSCALL_BASE+129) -#define __NR_quotactl (__NR_SYSCALL_BASE+131) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getpgid (__NR_SYSCALL_BASE+132) -#define __NR_fchdir (__NR_SYSCALL_BASE+133) -#define __NR_bdflush (__NR_SYSCALL_BASE+134) -#define __NR_sysfs (__NR_SYSCALL_BASE+135) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_personality (__NR_SYSCALL_BASE+136) -#define __NR_setfsuid (__NR_SYSCALL_BASE+138) -#define __NR_setfsgid (__NR_SYSCALL_BASE+139) -#define __NR__llseek (__NR_SYSCALL_BASE+140) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getdents (__NR_SYSCALL_BASE+141) -#define __NR__newselect (__NR_SYSCALL_BASE+142) -#define __NR_flock (__NR_SYSCALL_BASE+143) -#define __NR_msync (__NR_SYSCALL_BASE+144) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_readv (__NR_SYSCALL_BASE+145) -#define __NR_writev (__NR_SYSCALL_BASE+146) -#define __NR_getsid (__NR_SYSCALL_BASE+147) -#define __NR_fdatasync (__NR_SYSCALL_BASE+148) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR__sysctl (__NR_SYSCALL_BASE+149) -#define __NR_mlock (__NR_SYSCALL_BASE+150) -#define __NR_munlock (__NR_SYSCALL_BASE+151) -#define __NR_mlockall (__NR_SYSCALL_BASE+152) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_munlockall (__NR_SYSCALL_BASE+153) -#define __NR_sched_setparam (__NR_SYSCALL_BASE+154) -#define __NR_sched_getparam (__NR_SYSCALL_BASE+155) -#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) -#define __NR_sched_yield (__NR_SYSCALL_BASE+158) -#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) -#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) -#define __NR_nanosleep (__NR_SYSCALL_BASE+162) -#define __NR_mremap (__NR_SYSCALL_BASE+163) -#define __NR_setresuid (__NR_SYSCALL_BASE+164) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getresuid (__NR_SYSCALL_BASE+165) -#define __NR_poll (__NR_SYSCALL_BASE+168) -#define __NR_nfsservctl (__NR_SYSCALL_BASE+169) -#define __NR_setresgid (__NR_SYSCALL_BASE+170) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getresgid (__NR_SYSCALL_BASE+171) -#define __NR_prctl (__NR_SYSCALL_BASE+172) -#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) -#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) -#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) -#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) -#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) -#define __NR_pread64 (__NR_SYSCALL_BASE+180) -#define __NR_pwrite64 (__NR_SYSCALL_BASE+181) -#define __NR_chown (__NR_SYSCALL_BASE+182) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getcwd (__NR_SYSCALL_BASE+183) -#define __NR_capget (__NR_SYSCALL_BASE+184) -#define __NR_capset (__NR_SYSCALL_BASE+185) -#define __NR_sigaltstack (__NR_SYSCALL_BASE+186) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_sendfile (__NR_SYSCALL_BASE+187) -#define __NR_vfork (__NR_SYSCALL_BASE+190) -#define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) -#define __NR_mmap2 (__NR_SYSCALL_BASE+192) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_truncate64 (__NR_SYSCALL_BASE+193) -#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) -#define __NR_stat64 (__NR_SYSCALL_BASE+195) -#define __NR_lstat64 (__NR_SYSCALL_BASE+196) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fstat64 (__NR_SYSCALL_BASE+197) -#define __NR_lchown32 (__NR_SYSCALL_BASE+198) -#define __NR_getuid32 (__NR_SYSCALL_BASE+199) -#define __NR_getgid32 (__NR_SYSCALL_BASE+200) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_geteuid32 (__NR_SYSCALL_BASE+201) -#define __NR_getegid32 (__NR_SYSCALL_BASE+202) -#define __NR_setreuid32 (__NR_SYSCALL_BASE+203) -#define __NR_setregid32 (__NR_SYSCALL_BASE+204) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getgroups32 (__NR_SYSCALL_BASE+205) -#define __NR_setgroups32 (__NR_SYSCALL_BASE+206) -#define __NR_fchown32 (__NR_SYSCALL_BASE+207) -#define __NR_setresuid32 (__NR_SYSCALL_BASE+208) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getresuid32 (__NR_SYSCALL_BASE+209) -#define __NR_setresgid32 (__NR_SYSCALL_BASE+210) -#define __NR_getresgid32 (__NR_SYSCALL_BASE+211) -#define __NR_chown32 (__NR_SYSCALL_BASE+212) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_setuid32 (__NR_SYSCALL_BASE+213) -#define __NR_setgid32 (__NR_SYSCALL_BASE+214) -#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) -#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getdents64 (__NR_SYSCALL_BASE+217) -#define __NR_pivot_root (__NR_SYSCALL_BASE+218) -#define __NR_mincore (__NR_SYSCALL_BASE+219) -#define __NR_madvise (__NR_SYSCALL_BASE+220) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fcntl64 (__NR_SYSCALL_BASE+221) -#define __NR_gettid (__NR_SYSCALL_BASE+224) -#define __NR_readahead (__NR_SYSCALL_BASE+225) -#define __NR_setxattr (__NR_SYSCALL_BASE+226) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_lsetxattr (__NR_SYSCALL_BASE+227) -#define __NR_fsetxattr (__NR_SYSCALL_BASE+228) -#define __NR_getxattr (__NR_SYSCALL_BASE+229) -#define __NR_lgetxattr (__NR_SYSCALL_BASE+230) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fgetxattr (__NR_SYSCALL_BASE+231) -#define __NR_listxattr (__NR_SYSCALL_BASE+232) -#define __NR_llistxattr (__NR_SYSCALL_BASE+233) -#define __NR_flistxattr (__NR_SYSCALL_BASE+234) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_removexattr (__NR_SYSCALL_BASE+235) -#define __NR_lremovexattr (__NR_SYSCALL_BASE+236) -#define __NR_fremovexattr (__NR_SYSCALL_BASE+237) -#define __NR_tkill (__NR_SYSCALL_BASE+238) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_sendfile64 (__NR_SYSCALL_BASE+239) -#define __NR_futex (__NR_SYSCALL_BASE+240) -#define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) -#define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_io_setup (__NR_SYSCALL_BASE+243) -#define __NR_io_destroy (__NR_SYSCALL_BASE+244) -#define __NR_io_getevents (__NR_SYSCALL_BASE+245) -#define __NR_io_submit (__NR_SYSCALL_BASE+246) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_io_cancel (__NR_SYSCALL_BASE+247) -#define __NR_exit_group (__NR_SYSCALL_BASE+248) -#define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) -#define __NR_epoll_create (__NR_SYSCALL_BASE+250) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) -#define __NR_epoll_wait (__NR_SYSCALL_BASE+252) -#define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) -#define __NR_set_tid_address (__NR_SYSCALL_BASE+256) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_timer_create (__NR_SYSCALL_BASE+257) -#define __NR_timer_settime (__NR_SYSCALL_BASE+258) -#define __NR_timer_gettime (__NR_SYSCALL_BASE+259) -#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_timer_delete (__NR_SYSCALL_BASE+261) -#define __NR_clock_settime (__NR_SYSCALL_BASE+262) -#define __NR_clock_gettime (__NR_SYSCALL_BASE+263) -#define __NR_clock_getres (__NR_SYSCALL_BASE+264) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) -#define __NR_statfs64 (__NR_SYSCALL_BASE+266) -#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) -#define __NR_tgkill (__NR_SYSCALL_BASE+268) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_utimes (__NR_SYSCALL_BASE+269) -#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270) -#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) -#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) -#define __NR_mq_open (__NR_SYSCALL_BASE+274) -#define __NR_mq_unlink (__NR_SYSCALL_BASE+275) -#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) -#define __NR_mq_notify (__NR_SYSCALL_BASE+278) -#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) -#define __NR_waitid (__NR_SYSCALL_BASE+280) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_socket (__NR_SYSCALL_BASE+281) -#define __NR_bind (__NR_SYSCALL_BASE+282) -#define __NR_connect (__NR_SYSCALL_BASE+283) -#define __NR_listen (__NR_SYSCALL_BASE+284) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_accept (__NR_SYSCALL_BASE+285) -#define __NR_getsockname (__NR_SYSCALL_BASE+286) -#define __NR_getpeername (__NR_SYSCALL_BASE+287) -#define __NR_socketpair (__NR_SYSCALL_BASE+288) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_send (__NR_SYSCALL_BASE+289) -#define __NR_sendto (__NR_SYSCALL_BASE+290) -#define __NR_recv (__NR_SYSCALL_BASE+291) -#define __NR_recvfrom (__NR_SYSCALL_BASE+292) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_shutdown (__NR_SYSCALL_BASE+293) -#define __NR_setsockopt (__NR_SYSCALL_BASE+294) -#define __NR_getsockopt (__NR_SYSCALL_BASE+295) -#define __NR_sendmsg (__NR_SYSCALL_BASE+296) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_recvmsg (__NR_SYSCALL_BASE+297) -#define __NR_semop (__NR_SYSCALL_BASE+298) -#define __NR_semget (__NR_SYSCALL_BASE+299) -#define __NR_semctl (__NR_SYSCALL_BASE+300) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_msgsnd (__NR_SYSCALL_BASE+301) -#define __NR_msgrcv (__NR_SYSCALL_BASE+302) -#define __NR_msgget (__NR_SYSCALL_BASE+303) -#define __NR_msgctl (__NR_SYSCALL_BASE+304) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_shmat (__NR_SYSCALL_BASE+305) -#define __NR_shmdt (__NR_SYSCALL_BASE+306) -#define __NR_shmget (__NR_SYSCALL_BASE+307) -#define __NR_shmctl (__NR_SYSCALL_BASE+308) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_add_key (__NR_SYSCALL_BASE+309) -#define __NR_request_key (__NR_SYSCALL_BASE+310) -#define __NR_keyctl (__NR_SYSCALL_BASE+311) -#define __NR_semtimedop (__NR_SYSCALL_BASE+312) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_vserver (__NR_SYSCALL_BASE+313) -#define __NR_ioprio_set (__NR_SYSCALL_BASE+314) -#define __NR_ioprio_get (__NR_SYSCALL_BASE+315) -#define __NR_inotify_init (__NR_SYSCALL_BASE+316) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317) -#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318) -#define __NR_mbind (__NR_SYSCALL_BASE+319) -#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321) -#define __NR_openat (__NR_SYSCALL_BASE+322) -#define __NR_mkdirat (__NR_SYSCALL_BASE+323) -#define __NR_mknodat (__NR_SYSCALL_BASE+324) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fchownat (__NR_SYSCALL_BASE+325) -#define __NR_futimesat (__NR_SYSCALL_BASE+326) -#define __NR_fstatat64 (__NR_SYSCALL_BASE+327) -#define __NR_unlinkat (__NR_SYSCALL_BASE+328) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_renameat (__NR_SYSCALL_BASE+329) -#define __NR_linkat (__NR_SYSCALL_BASE+330) -#define __NR_symlinkat (__NR_SYSCALL_BASE+331) -#define __NR_readlinkat (__NR_SYSCALL_BASE+332) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fchmodat (__NR_SYSCALL_BASE+333) -#define __NR_faccessat (__NR_SYSCALL_BASE+334) -#define __NR_pselect6 (__NR_SYSCALL_BASE+335) -#define __NR_ppoll (__NR_SYSCALL_BASE+336) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_unshare (__NR_SYSCALL_BASE+337) -#define __NR_set_robust_list (__NR_SYSCALL_BASE+338) -#define __NR_get_robust_list (__NR_SYSCALL_BASE+339) -#define __NR_splice (__NR_SYSCALL_BASE+340) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) +#define __NR_restart_syscall (__NR_SYSCALL_BASE + 0) +#define __NR_exit (__NR_SYSCALL_BASE + 1) +#define __NR_fork (__NR_SYSCALL_BASE + 2) +#define __NR_read (__NR_SYSCALL_BASE + 3) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_write (__NR_SYSCALL_BASE + 4) +#define __NR_open (__NR_SYSCALL_BASE + 5) +#define __NR_close (__NR_SYSCALL_BASE + 6) +#define __NR_creat (__NR_SYSCALL_BASE + 8) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_link (__NR_SYSCALL_BASE + 9) +#define __NR_unlink (__NR_SYSCALL_BASE + 10) +#define __NR_execve (__NR_SYSCALL_BASE + 11) +#define __NR_chdir (__NR_SYSCALL_BASE + 12) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_time (__NR_SYSCALL_BASE + 13) +#define __NR_mknod (__NR_SYSCALL_BASE + 14) +#define __NR_chmod (__NR_SYSCALL_BASE + 15) +#define __NR_lchown (__NR_SYSCALL_BASE + 16) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_lseek (__NR_SYSCALL_BASE + 19) +#define __NR_getpid (__NR_SYSCALL_BASE + 20) +#define __NR_mount (__NR_SYSCALL_BASE + 21) +#define __NR_umount (__NR_SYSCALL_BASE + 22) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_setuid (__NR_SYSCALL_BASE + 23) +#define __NR_getuid (__NR_SYSCALL_BASE + 24) +#define __NR_stime (__NR_SYSCALL_BASE + 25) +#define __NR_ptrace (__NR_SYSCALL_BASE + 26) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_alarm (__NR_SYSCALL_BASE + 27) +#define __NR_pause (__NR_SYSCALL_BASE + 29) +#define __NR_utime (__NR_SYSCALL_BASE + 30) +#define __NR_access (__NR_SYSCALL_BASE + 33) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_nice (__NR_SYSCALL_BASE + 34) +#define __NR_sync (__NR_SYSCALL_BASE + 36) +#define __NR_kill (__NR_SYSCALL_BASE + 37) +#define __NR_rename (__NR_SYSCALL_BASE + 38) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_mkdir (__NR_SYSCALL_BASE + 39) +#define __NR_rmdir (__NR_SYSCALL_BASE + 40) +#define __NR_dup (__NR_SYSCALL_BASE + 41) +#define __NR_pipe (__NR_SYSCALL_BASE + 42) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_times (__NR_SYSCALL_BASE + 43) +#define __NR_brk (__NR_SYSCALL_BASE + 45) +#define __NR_setgid (__NR_SYSCALL_BASE + 46) +#define __NR_getgid (__NR_SYSCALL_BASE + 47) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_geteuid (__NR_SYSCALL_BASE + 49) +#define __NR_getegid (__NR_SYSCALL_BASE + 50) +#define __NR_acct (__NR_SYSCALL_BASE + 51) +#define __NR_umount2 (__NR_SYSCALL_BASE + 52) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_ioctl (__NR_SYSCALL_BASE + 54) +#define __NR_fcntl (__NR_SYSCALL_BASE + 55) +#define __NR_setpgid (__NR_SYSCALL_BASE + 57) +#define __NR_umask (__NR_SYSCALL_BASE + 60) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_chroot (__NR_SYSCALL_BASE + 61) +#define __NR_ustat (__NR_SYSCALL_BASE + 62) +#define __NR_dup2 (__NR_SYSCALL_BASE + 63) +#define __NR_getppid (__NR_SYSCALL_BASE + 64) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getpgrp (__NR_SYSCALL_BASE + 65) +#define __NR_setsid (__NR_SYSCALL_BASE + 66) +#define __NR_sigaction (__NR_SYSCALL_BASE + 67) +#define __NR_setreuid (__NR_SYSCALL_BASE + 70) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_setregid (__NR_SYSCALL_BASE + 71) +#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72) +#define __NR_sigpending (__NR_SYSCALL_BASE + 73) +#define __NR_sethostname (__NR_SYSCALL_BASE + 74) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_setrlimit (__NR_SYSCALL_BASE + 75) +#define __NR_getrlimit (__NR_SYSCALL_BASE + 76) +#define __NR_getrusage (__NR_SYSCALL_BASE + 77) +#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_settimeofday (__NR_SYSCALL_BASE + 79) +#define __NR_getgroups (__NR_SYSCALL_BASE + 80) +#define __NR_setgroups (__NR_SYSCALL_BASE + 81) +#define __NR_select (__NR_SYSCALL_BASE + 82) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_symlink (__NR_SYSCALL_BASE + 83) +#define __NR_readlink (__NR_SYSCALL_BASE + 85) +#define __NR_uselib (__NR_SYSCALL_BASE + 86) +#define __NR_swapon (__NR_SYSCALL_BASE + 87) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_reboot (__NR_SYSCALL_BASE + 88) +#define __NR_readdir (__NR_SYSCALL_BASE + 89) +#define __NR_mmap (__NR_SYSCALL_BASE + 90) +#define __NR_munmap (__NR_SYSCALL_BASE + 91) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_truncate (__NR_SYSCALL_BASE + 92) +#define __NR_ftruncate (__NR_SYSCALL_BASE + 93) +#define __NR_fchmod (__NR_SYSCALL_BASE + 94) +#define __NR_fchown (__NR_SYSCALL_BASE + 95) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getpriority (__NR_SYSCALL_BASE + 96) +#define __NR_setpriority (__NR_SYSCALL_BASE + 97) +#define __NR_statfs (__NR_SYSCALL_BASE + 99) +#define __NR_fstatfs (__NR_SYSCALL_BASE + 100) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_socketcall (__NR_SYSCALL_BASE + 102) +#define __NR_syslog (__NR_SYSCALL_BASE + 103) +#define __NR_setitimer (__NR_SYSCALL_BASE + 104) +#define __NR_getitimer (__NR_SYSCALL_BASE + 105) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_stat (__NR_SYSCALL_BASE + 106) +#define __NR_lstat (__NR_SYSCALL_BASE + 107) +#define __NR_fstat (__NR_SYSCALL_BASE + 108) +#define __NR_vhangup (__NR_SYSCALL_BASE + 111) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_syscall (__NR_SYSCALL_BASE + 113) +#define __NR_wait4 (__NR_SYSCALL_BASE + 114) +#define __NR_swapoff (__NR_SYSCALL_BASE + 115) +#define __NR_sysinfo (__NR_SYSCALL_BASE + 116) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_ipc (__NR_SYSCALL_BASE + 117) +#define __NR_fsync (__NR_SYSCALL_BASE + 118) +#define __NR_sigreturn (__NR_SYSCALL_BASE + 119) +#define __NR_clone (__NR_SYSCALL_BASE + 120) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_setdomainname (__NR_SYSCALL_BASE + 121) +#define __NR_uname (__NR_SYSCALL_BASE + 122) +#define __NR_adjtimex (__NR_SYSCALL_BASE + 124) +#define __NR_mprotect (__NR_SYSCALL_BASE + 125) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126) +#define __NR_init_module (__NR_SYSCALL_BASE + 128) +#define __NR_delete_module (__NR_SYSCALL_BASE + 129) +#define __NR_quotactl (__NR_SYSCALL_BASE + 131) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getpgid (__NR_SYSCALL_BASE + 132) +#define __NR_fchdir (__NR_SYSCALL_BASE + 133) +#define __NR_bdflush (__NR_SYSCALL_BASE + 134) +#define __NR_sysfs (__NR_SYSCALL_BASE + 135) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_personality (__NR_SYSCALL_BASE + 136) +#define __NR_setfsuid (__NR_SYSCALL_BASE + 138) +#define __NR_setfsgid (__NR_SYSCALL_BASE + 139) +#define __NR__llseek (__NR_SYSCALL_BASE + 140) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getdents (__NR_SYSCALL_BASE + 141) +#define __NR__newselect (__NR_SYSCALL_BASE + 142) +#define __NR_flock (__NR_SYSCALL_BASE + 143) +#define __NR_msync (__NR_SYSCALL_BASE + 144) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_readv (__NR_SYSCALL_BASE + 145) +#define __NR_writev (__NR_SYSCALL_BASE + 146) +#define __NR_getsid (__NR_SYSCALL_BASE + 147) +#define __NR_fdatasync (__NR_SYSCALL_BASE + 148) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR__sysctl (__NR_SYSCALL_BASE + 149) +#define __NR_mlock (__NR_SYSCALL_BASE + 150) +#define __NR_munlock (__NR_SYSCALL_BASE + 151) +#define __NR_mlockall (__NR_SYSCALL_BASE + 152) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_munlockall (__NR_SYSCALL_BASE + 153) +#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154) +#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155) +#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157) +#define __NR_sched_yield (__NR_SYSCALL_BASE + 158) +#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159) +#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161) +#define __NR_nanosleep (__NR_SYSCALL_BASE + 162) +#define __NR_mremap (__NR_SYSCALL_BASE + 163) +#define __NR_setresuid (__NR_SYSCALL_BASE + 164) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getresuid (__NR_SYSCALL_BASE + 165) +#define __NR_poll (__NR_SYSCALL_BASE + 168) +#define __NR_nfsservctl (__NR_SYSCALL_BASE + 169) +#define __NR_setresgid (__NR_SYSCALL_BASE + 170) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getresgid (__NR_SYSCALL_BASE + 171) +#define __NR_prctl (__NR_SYSCALL_BASE + 172) +#define __NR_rt_sigreturn (__NR_SYSCALL_BASE + 173) +#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175) +#define __NR_rt_sigpending (__NR_SYSCALL_BASE + 176) +#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177) +#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE + 178) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE + 179) +#define __NR_pread64 (__NR_SYSCALL_BASE + 180) +#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181) +#define __NR_chown (__NR_SYSCALL_BASE + 182) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getcwd (__NR_SYSCALL_BASE + 183) +#define __NR_capget (__NR_SYSCALL_BASE + 184) +#define __NR_capset (__NR_SYSCALL_BASE + 185) +#define __NR_sigaltstack (__NR_SYSCALL_BASE + 186) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_sendfile (__NR_SYSCALL_BASE + 187) +#define __NR_vfork (__NR_SYSCALL_BASE + 190) +#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191) +#define __NR_mmap2 (__NR_SYSCALL_BASE + 192) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_truncate64 (__NR_SYSCALL_BASE + 193) +#define __NR_ftruncate64 (__NR_SYSCALL_BASE + 194) +#define __NR_stat64 (__NR_SYSCALL_BASE + 195) +#define __NR_lstat64 (__NR_SYSCALL_BASE + 196) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fstat64 (__NR_SYSCALL_BASE + 197) +#define __NR_lchown32 (__NR_SYSCALL_BASE + 198) +#define __NR_getuid32 (__NR_SYSCALL_BASE + 199) +#define __NR_getgid32 (__NR_SYSCALL_BASE + 200) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201) +#define __NR_getegid32 (__NR_SYSCALL_BASE + 202) +#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203) +#define __NR_setregid32 (__NR_SYSCALL_BASE + 204) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205) +#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206) +#define __NR_fchown32 (__NR_SYSCALL_BASE + 207) +#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209) +#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210) +#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211) +#define __NR_chown32 (__NR_SYSCALL_BASE + 212) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_setuid32 (__NR_SYSCALL_BASE + 213) +#define __NR_setgid32 (__NR_SYSCALL_BASE + 214) +#define __NR_setfsuid32 (__NR_SYSCALL_BASE + 215) +#define __NR_setfsgid32 (__NR_SYSCALL_BASE + 216) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getdents64 (__NR_SYSCALL_BASE + 217) +#define __NR_pivot_root (__NR_SYSCALL_BASE + 218) +#define __NR_mincore (__NR_SYSCALL_BASE + 219) +#define __NR_madvise (__NR_SYSCALL_BASE + 220) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221) +#define __NR_gettid (__NR_SYSCALL_BASE + 224) +#define __NR_readahead (__NR_SYSCALL_BASE + 225) +#define __NR_setxattr (__NR_SYSCALL_BASE + 226) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_lsetxattr (__NR_SYSCALL_BASE + 227) +#define __NR_fsetxattr (__NR_SYSCALL_BASE + 228) +#define __NR_getxattr (__NR_SYSCALL_BASE + 229) +#define __NR_lgetxattr (__NR_SYSCALL_BASE + 230) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fgetxattr (__NR_SYSCALL_BASE + 231) +#define __NR_listxattr (__NR_SYSCALL_BASE + 232) +#define __NR_llistxattr (__NR_SYSCALL_BASE + 233) +#define __NR_flistxattr (__NR_SYSCALL_BASE + 234) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_removexattr (__NR_SYSCALL_BASE + 235) +#define __NR_lremovexattr (__NR_SYSCALL_BASE + 236) +#define __NR_fremovexattr (__NR_SYSCALL_BASE + 237) +#define __NR_tkill (__NR_SYSCALL_BASE + 238) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_sendfile64 (__NR_SYSCALL_BASE + 239) +#define __NR_futex (__NR_SYSCALL_BASE + 240) +#define __NR_sched_setaffinity (__NR_SYSCALL_BASE + 241) +#define __NR_sched_getaffinity (__NR_SYSCALL_BASE + 242) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_io_setup (__NR_SYSCALL_BASE + 243) +#define __NR_io_destroy (__NR_SYSCALL_BASE + 244) +#define __NR_io_getevents (__NR_SYSCALL_BASE + 245) +#define __NR_io_submit (__NR_SYSCALL_BASE + 246) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_io_cancel (__NR_SYSCALL_BASE + 247) +#define __NR_exit_group (__NR_SYSCALL_BASE + 248) +#define __NR_lookup_dcookie (__NR_SYSCALL_BASE + 249) +#define __NR_epoll_create (__NR_SYSCALL_BASE + 250) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251) +#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252) +#define __NR_remap_file_pages (__NR_SYSCALL_BASE + 253) +#define __NR_set_tid_address (__NR_SYSCALL_BASE + 256) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_timer_create (__NR_SYSCALL_BASE + 257) +#define __NR_timer_settime (__NR_SYSCALL_BASE + 258) +#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259) +#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_timer_delete (__NR_SYSCALL_BASE + 261) +#define __NR_clock_settime (__NR_SYSCALL_BASE + 262) +#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263) +#define __NR_clock_getres (__NR_SYSCALL_BASE + 264) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265) +#define __NR_statfs64 (__NR_SYSCALL_BASE + 266) +#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267) +#define __NR_tgkill (__NR_SYSCALL_BASE + 268) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_utimes (__NR_SYSCALL_BASE + 269) +#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE + 270) +#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE + 271) +#define __NR_pciconfig_read (__NR_SYSCALL_BASE + 272) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_pciconfig_write (__NR_SYSCALL_BASE + 273) +#define __NR_mq_open (__NR_SYSCALL_BASE + 274) +#define __NR_mq_unlink (__NR_SYSCALL_BASE + 275) +#define __NR_mq_timedsend (__NR_SYSCALL_BASE + 276) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_mq_timedreceive (__NR_SYSCALL_BASE + 277) +#define __NR_mq_notify (__NR_SYSCALL_BASE + 278) +#define __NR_mq_getsetattr (__NR_SYSCALL_BASE + 279) +#define __NR_waitid (__NR_SYSCALL_BASE + 280) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_socket (__NR_SYSCALL_BASE + 281) +#define __NR_bind (__NR_SYSCALL_BASE + 282) +#define __NR_connect (__NR_SYSCALL_BASE + 283) +#define __NR_listen (__NR_SYSCALL_BASE + 284) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_accept (__NR_SYSCALL_BASE + 285) +#define __NR_getsockname (__NR_SYSCALL_BASE + 286) +#define __NR_getpeername (__NR_SYSCALL_BASE + 287) +#define __NR_socketpair (__NR_SYSCALL_BASE + 288) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_send (__NR_SYSCALL_BASE + 289) +#define __NR_sendto (__NR_SYSCALL_BASE + 290) +#define __NR_recv (__NR_SYSCALL_BASE + 291) +#define __NR_recvfrom (__NR_SYSCALL_BASE + 292) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_shutdown (__NR_SYSCALL_BASE + 293) +#define __NR_setsockopt (__NR_SYSCALL_BASE + 294) +#define __NR_getsockopt (__NR_SYSCALL_BASE + 295) +#define __NR_sendmsg (__NR_SYSCALL_BASE + 296) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_recvmsg (__NR_SYSCALL_BASE + 297) +#define __NR_semop (__NR_SYSCALL_BASE + 298) +#define __NR_semget (__NR_SYSCALL_BASE + 299) +#define __NR_semctl (__NR_SYSCALL_BASE + 300) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_msgsnd (__NR_SYSCALL_BASE + 301) +#define __NR_msgrcv (__NR_SYSCALL_BASE + 302) +#define __NR_msgget (__NR_SYSCALL_BASE + 303) +#define __NR_msgctl (__NR_SYSCALL_BASE + 304) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_shmat (__NR_SYSCALL_BASE + 305) +#define __NR_shmdt (__NR_SYSCALL_BASE + 306) +#define __NR_shmget (__NR_SYSCALL_BASE + 307) +#define __NR_shmctl (__NR_SYSCALL_BASE + 308) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_add_key (__NR_SYSCALL_BASE + 309) +#define __NR_request_key (__NR_SYSCALL_BASE + 310) +#define __NR_keyctl (__NR_SYSCALL_BASE + 311) +#define __NR_semtimedop (__NR_SYSCALL_BASE + 312) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_vserver (__NR_SYSCALL_BASE + 313) +#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314) +#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315) +#define __NR_inotify_init (__NR_SYSCALL_BASE + 316) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317) +#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318) +#define __NR_mbind (__NR_SYSCALL_BASE + 319) +#define __NR_get_mempolicy (__NR_SYSCALL_BASE + 320) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_set_mempolicy (__NR_SYSCALL_BASE + 321) +#define __NR_openat (__NR_SYSCALL_BASE + 322) +#define __NR_mkdirat (__NR_SYSCALL_BASE + 323) +#define __NR_mknodat (__NR_SYSCALL_BASE + 324) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fchownat (__NR_SYSCALL_BASE + 325) +#define __NR_futimesat (__NR_SYSCALL_BASE + 326) +#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327) +#define __NR_unlinkat (__NR_SYSCALL_BASE + 328) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_renameat (__NR_SYSCALL_BASE + 329) +#define __NR_linkat (__NR_SYSCALL_BASE + 330) +#define __NR_symlinkat (__NR_SYSCALL_BASE + 331) +#define __NR_readlinkat (__NR_SYSCALL_BASE + 332) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fchmodat (__NR_SYSCALL_BASE + 333) +#define __NR_faccessat (__NR_SYSCALL_BASE + 334) +#define __NR_pselect6 (__NR_SYSCALL_BASE + 335) +#define __NR_ppoll (__NR_SYSCALL_BASE + 336) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_unshare (__NR_SYSCALL_BASE + 337) +#define __NR_set_robust_list (__NR_SYSCALL_BASE + 338) +#define __NR_get_robust_list (__NR_SYSCALL_BASE + 339) +#define __NR_splice (__NR_SYSCALL_BASE + 340) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE + 341) #define __NR_sync_file_range2 __NR_arm_sync_file_range -#define __NR_tee (__NR_SYSCALL_BASE+342) -#define __NR_vmsplice (__NR_SYSCALL_BASE+343) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_move_pages (__NR_SYSCALL_BASE+344) -#define __NR_getcpu (__NR_SYSCALL_BASE+345) -#define __NR_epoll_pwait (__NR_SYSCALL_BASE+346) -#define __NR_kexec_load (__NR_SYSCALL_BASE+347) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_utimensat (__NR_SYSCALL_BASE+348) -#define __NR_signalfd (__NR_SYSCALL_BASE+349) -#define __NR_timerfd_create (__NR_SYSCALL_BASE+350) -#define __NR_eventfd (__NR_SYSCALL_BASE+351) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fallocate (__NR_SYSCALL_BASE+352) -#define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) -#define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) -#define __NR_signalfd4 (__NR_SYSCALL_BASE+355) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_eventfd2 (__NR_SYSCALL_BASE+356) -#define __NR_epoll_create1 (__NR_SYSCALL_BASE+357) -#define __NR_dup3 (__NR_SYSCALL_BASE+358) -#define __NR_pipe2 (__NR_SYSCALL_BASE+359) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_inotify_init1 (__NR_SYSCALL_BASE+360) -#define __NR_preadv (__NR_SYSCALL_BASE+361) -#define __NR_pwritev (__NR_SYSCALL_BASE+362) -#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_perf_event_open (__NR_SYSCALL_BASE+364) -#define __NR_recvmmsg (__NR_SYSCALL_BASE+365) -#define __NR_accept4 (__NR_SYSCALL_BASE+366) -#define __NR_fanotify_init (__NR_SYSCALL_BASE+367) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) -#define __NR_prlimit64 (__NR_SYSCALL_BASE+369) -#define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370) -#define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372) -#define __NR_syncfs (__NR_SYSCALL_BASE+373) -#define __NR_sendmmsg (__NR_SYSCALL_BASE+374) -#define __NR_setns (__NR_SYSCALL_BASE+375) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_process_vm_readv (__NR_SYSCALL_BASE+376) -#define __NR_process_vm_writev (__NR_SYSCALL_BASE+377) -#define __NR_kcmp (__NR_SYSCALL_BASE+378) -#define __NR_finit_module (__NR_SYSCALL_BASE+379) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_sched_setattr (__NR_SYSCALL_BASE+380) -#define __NR_sched_getattr (__NR_SYSCALL_BASE+381) -#define __NR_renameat2 (__NR_SYSCALL_BASE+382) -#define __NR_seccomp (__NR_SYSCALL_BASE+383) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_getrandom (__NR_SYSCALL_BASE+384) -#define __NR_memfd_create (__NR_SYSCALL_BASE+385) -#define __NR_bpf (__NR_SYSCALL_BASE+386) -#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __ARM_NR_breakpoint (__ARM_NR_BASE+1) -#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) -#define __ARM_NR_usr26 (__ARM_NR_BASE+3) -#define __ARM_NR_usr32 (__ARM_NR_BASE+4) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __ARM_NR_set_tls (__ARM_NR_BASE+5) +#define __NR_tee (__NR_SYSCALL_BASE + 342) +#define __NR_vmsplice (__NR_SYSCALL_BASE + 343) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_move_pages (__NR_SYSCALL_BASE + 344) +#define __NR_getcpu (__NR_SYSCALL_BASE + 345) +#define __NR_epoll_pwait (__NR_SYSCALL_BASE + 346) +#define __NR_kexec_load (__NR_SYSCALL_BASE + 347) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_utimensat (__NR_SYSCALL_BASE + 348) +#define __NR_signalfd (__NR_SYSCALL_BASE + 349) +#define __NR_timerfd_create (__NR_SYSCALL_BASE + 350) +#define __NR_eventfd (__NR_SYSCALL_BASE + 351) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fallocate (__NR_SYSCALL_BASE + 352) +#define __NR_timerfd_settime (__NR_SYSCALL_BASE + 353) +#define __NR_timerfd_gettime (__NR_SYSCALL_BASE + 354) +#define __NR_signalfd4 (__NR_SYSCALL_BASE + 355) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_eventfd2 (__NR_SYSCALL_BASE + 356) +#define __NR_epoll_create1 (__NR_SYSCALL_BASE + 357) +#define __NR_dup3 (__NR_SYSCALL_BASE + 358) +#define __NR_pipe2 (__NR_SYSCALL_BASE + 359) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_inotify_init1 (__NR_SYSCALL_BASE + 360) +#define __NR_preadv (__NR_SYSCALL_BASE + 361) +#define __NR_pwritev (__NR_SYSCALL_BASE + 362) +#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE + 363) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_perf_event_open (__NR_SYSCALL_BASE + 364) +#define __NR_recvmmsg (__NR_SYSCALL_BASE + 365) +#define __NR_accept4 (__NR_SYSCALL_BASE + 366) +#define __NR_fanotify_init (__NR_SYSCALL_BASE + 367) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_fanotify_mark (__NR_SYSCALL_BASE + 368) +#define __NR_prlimit64 (__NR_SYSCALL_BASE + 369) +#define __NR_name_to_handle_at (__NR_SYSCALL_BASE + 370) +#define __NR_open_by_handle_at (__NR_SYSCALL_BASE + 371) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_clock_adjtime (__NR_SYSCALL_BASE + 372) +#define __NR_syncfs (__NR_SYSCALL_BASE + 373) +#define __NR_sendmmsg (__NR_SYSCALL_BASE + 374) +#define __NR_setns (__NR_SYSCALL_BASE + 375) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_process_vm_readv (__NR_SYSCALL_BASE + 376) +#define __NR_process_vm_writev (__NR_SYSCALL_BASE + 377) +#define __NR_kcmp (__NR_SYSCALL_BASE + 378) +#define __NR_finit_module (__NR_SYSCALL_BASE + 379) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_sched_setattr (__NR_SYSCALL_BASE + 380) +#define __NR_sched_getattr (__NR_SYSCALL_BASE + 381) +#define __NR_renameat2 (__NR_SYSCALL_BASE + 382) +#define __NR_seccomp (__NR_SYSCALL_BASE + 383) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __NR_getrandom (__NR_SYSCALL_BASE + 384) +#define __NR_memfd_create (__NR_SYSCALL_BASE + 385) +#define __NR_bpf (__NR_SYSCALL_BASE + 386) +#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0x0f0000) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __ARM_NR_breakpoint (__ARM_NR_BASE + 1) +#define __ARM_NR_cacheflush (__ARM_NR_BASE + 2) +#define __ARM_NR_usr26 (__ARM_NR_BASE + 3) +#define __ARM_NR_usr32 (__ARM_NR_BASE + 4) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define __ARM_NR_set_tls (__ARM_NR_BASE + 5) #undef __NR_time #undef __NR_umount #undef __NR_stime diff --git a/libc/kernel/uapi/asm-arm64/asm/kvm.h b/libc/kernel/uapi/asm-arm64/asm/kvm.h index f812b272d..855e084e0 100644 --- a/libc/kernel/uapi/asm-arm64/asm/kvm.h +++ b/libc/kernel/uapi/asm-arm64/asm/kvm.h @@ -36,14 +36,14 @@ #define __KVM_HAVE_IRQ_LINE #define __KVM_HAVE_READONLY_MEM /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) +#define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) struct kvm_regs { - struct user_pt_regs regs; - __u64 sp_el1; + struct user_pt_regs regs; + __u64 sp_el1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 elr_el1; - __u64 spsr[KVM_NR_SPSR]; - struct user_fpsimd_state fp_regs; + __u64 elr_el1; + __u64 spsr[KVM_NR_SPSR]; + struct user_fpsimd_state fp_regs; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KVM_ARM_TARGET_AEM_V8 0 @@ -69,9 +69,9 @@ struct kvm_regs { #define KVM_ARM_VCPU_EL1_32BIT 1 #define KVM_ARM_VCPU_PSCI_0_2 2 struct kvm_vcpu_init { - __u32 target; + __u32 target; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 features[7]; + __u32 features[7]; }; struct kvm_sregs { }; @@ -114,9 +114,9 @@ struct kvm_arch_memory_slot { #define KVM_REG_ARM64_SYSREG_CRM_SHIFT 3 #define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007 #define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0 -#define ARM64_SYS_REG_SHIFT_MASK(x,n) (((x) << KVM_REG_ARM64_SYSREG_ ## n ## _SHIFT) & KVM_REG_ARM64_SYSREG_ ## n ## _MASK) +#define ARM64_SYS_REG_SHIFT_MASK(x,n) (((x) << KVM_REG_ARM64_SYSREG_ ##n ##_SHIFT) & KVM_REG_ARM64_SYSREG_ ##n ##_MASK) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) (KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | ARM64_SYS_REG_SHIFT_MASK(op2, OP2)) +#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) (KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | ARM64_SYS_REG_SHIFT_MASK(op2, OP2)) #define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64) #define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1) #define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) diff --git a/libc/kernel/uapi/asm-arm64/asm/perf_regs.h b/libc/kernel/uapi/asm-arm64/asm/perf_regs.h index 711086847..741bc7548 100644 --- a/libc/kernel/uapi/asm-arm64/asm/perf_regs.h +++ b/libc/kernel/uapi/asm-arm64/asm/perf_regs.h @@ -19,48 +19,48 @@ #ifndef _ASM_ARM64_PERF_REGS_H #define _ASM_ARM64_PERF_REGS_H enum perf_event_arm_regs { - PERF_REG_ARM64_X0, + PERF_REG_ARM64_X0, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X1, - PERF_REG_ARM64_X2, - PERF_REG_ARM64_X3, - PERF_REG_ARM64_X4, + PERF_REG_ARM64_X1, + PERF_REG_ARM64_X2, + PERF_REG_ARM64_X3, + PERF_REG_ARM64_X4, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X5, - PERF_REG_ARM64_X6, - PERF_REG_ARM64_X7, - PERF_REG_ARM64_X8, + PERF_REG_ARM64_X5, + PERF_REG_ARM64_X6, + PERF_REG_ARM64_X7, + PERF_REG_ARM64_X8, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X9, - PERF_REG_ARM64_X10, - PERF_REG_ARM64_X11, - PERF_REG_ARM64_X12, + PERF_REG_ARM64_X9, + PERF_REG_ARM64_X10, + PERF_REG_ARM64_X11, + PERF_REG_ARM64_X12, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X13, - PERF_REG_ARM64_X14, - PERF_REG_ARM64_X15, - PERF_REG_ARM64_X16, + PERF_REG_ARM64_X13, + PERF_REG_ARM64_X14, + PERF_REG_ARM64_X15, + PERF_REG_ARM64_X16, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X17, - PERF_REG_ARM64_X18, - PERF_REG_ARM64_X19, - PERF_REG_ARM64_X20, + PERF_REG_ARM64_X17, + PERF_REG_ARM64_X18, + PERF_REG_ARM64_X19, + PERF_REG_ARM64_X20, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X21, - PERF_REG_ARM64_X22, - PERF_REG_ARM64_X23, - PERF_REG_ARM64_X24, + PERF_REG_ARM64_X21, + PERF_REG_ARM64_X22, + PERF_REG_ARM64_X23, + PERF_REG_ARM64_X24, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X25, - PERF_REG_ARM64_X26, - PERF_REG_ARM64_X27, - PERF_REG_ARM64_X28, + PERF_REG_ARM64_X25, + PERF_REG_ARM64_X26, + PERF_REG_ARM64_X27, + PERF_REG_ARM64_X28, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_X29, - PERF_REG_ARM64_LR, - PERF_REG_ARM64_SP, - PERF_REG_ARM64_PC, + PERF_REG_ARM64_X29, + PERF_REG_ARM64_LR, + PERF_REG_ARM64_SP, + PERF_REG_ARM64_PC, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - PERF_REG_ARM64_MAX, + PERF_REG_ARM64_MAX, }; #endif diff --git a/libc/kernel/uapi/asm-arm64/asm/ptrace.h b/libc/kernel/uapi/asm-arm64/asm/ptrace.h index 5650e2d08..ec531f96f 100644 --- a/libc/kernel/uapi/asm-arm64/asm/ptrace.h +++ b/libc/kernel/uapi/asm-arm64/asm/ptrace.h @@ -51,28 +51,28 @@ #ifndef __ASSEMBLY__ struct user_pt_regs { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 regs[31]; - __u64 sp; - __u64 pc; - __u64 pstate; + __u64 regs[31]; + __u64 sp; + __u64 pc; + __u64 pstate; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; struct user_fpsimd_state { - __uint128_t vregs[32]; - __u32 fpsr; + __uint128_t vregs[32]; + __u32 fpsr; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 fpcr; + __u32 fpcr; }; struct user_hwdebug_state { - __u32 dbg_info; + __u32 dbg_info; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 pad; - struct { - __u64 addr; - __u32 ctrl; + __u32 pad; + struct { + __u64 addr; + __u32 ctrl; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 pad; - } dbg_regs[16]; + __u32 pad; + } dbg_regs[16]; }; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-arm64/asm/sigcontext.h b/libc/kernel/uapi/asm-arm64/asm/sigcontext.h index 8918925c5..393dfd4ac 100644 --- a/libc/kernel/uapi/asm-arm64/asm/sigcontext.h +++ b/libc/kernel/uapi/asm-arm64/asm/sigcontext.h @@ -21,33 +21,33 @@ #include struct sigcontext { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 fault_address; - __u64 regs[31]; - __u64 sp; - __u64 pc; + __u64 fault_address; + __u64 regs[31]; + __u64 sp; + __u64 pc; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 pstate; - __u8 __reserved[4096] __attribute__((__aligned__(16))); + __u64 pstate; + __u8 __reserved[4096] __attribute__((__aligned__(16))); }; struct _aarch64_ctx { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 magic; - __u32 size; + __u32 magic; + __u32 size; }; #define FPSIMD_MAGIC 0x46508001 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct fpsimd_context { - struct _aarch64_ctx head; - __u32 fpsr; - __u32 fpcr; + struct _aarch64_ctx head; + __u32 fpsr; + __u32 fpcr; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __uint128_t vregs[32]; + __uint128_t vregs[32]; }; #define ESR_MAGIC 0x45535201 struct esr_context { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct _aarch64_ctx head; - __u64 esr; + struct _aarch64_ctx head; + __u64 esr; }; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-arm64/asm/statfs.h b/libc/kernel/uapi/asm-arm64/asm/statfs.h index 8f3841294..3469b8af9 100644 --- a/libc/kernel/uapi/asm-arm64/asm/statfs.h +++ b/libc/kernel/uapi/asm-arm64/asm/statfs.h @@ -18,7 +18,7 @@ ****************************************************************************/ #ifndef __ASM_STATFS_H #define __ASM_STATFS_H -#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) +#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed, aligned(4))) #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif diff --git a/libc/kernel/uapi/asm-generic/fcntl.h b/libc/kernel/uapi/asm-generic/fcntl.h index 9c1881b59..9753cf3ba 100644 --- a/libc/kernel/uapi/asm-generic/fcntl.h +++ b/libc/kernel/uapi/asm-generic/fcntl.h @@ -79,7 +79,7 @@ #endif #ifndef O_SYNC #define __O_SYNC 04000000 -#define O_SYNC (__O_SYNC|O_DSYNC) +#define O_SYNC (__O_SYNC | O_DSYNC) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #ifndef O_PATH @@ -144,9 +144,9 @@ #define F_OWNER_PID 1 #define F_OWNER_PGRP 2 struct f_owner_ex { - int type; + int type; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_pid_t pid; + __kernel_pid_t pid; }; #define FD_CLOEXEC 1 #ifndef F_RDLCK @@ -178,13 +178,13 @@ struct f_owner_ex { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif struct flock { - short l_type; - short l_whence; + short l_type; + short l_whence; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_off_t l_start; - __kernel_off_t l_len; - __kernel_pid_t l_pid; - __ARCH_FLOCK_PAD + __kernel_off_t l_start; + __kernel_off_t l_len; + __kernel_pid_t l_pid; + __ARCH_FLOCK_PAD /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif @@ -194,14 +194,14 @@ struct flock { #define __ARCH_FLOCK64_PAD #endif struct flock64 { - short l_type; + short l_type; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - short l_whence; - __kernel_loff_t l_start; - __kernel_loff_t l_len; - __kernel_pid_t l_pid; + short l_whence; + __kernel_loff_t l_start; + __kernel_loff_t l_len; + __kernel_pid_t l_pid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __ARCH_FLOCK64_PAD + __ARCH_FLOCK64_PAD }; #endif #endif diff --git a/libc/kernel/uapi/asm-generic/ioctl.h b/libc/kernel/uapi/asm-generic/ioctl.h index 79ec83cd6..468c3010f 100644 --- a/libc/kernel/uapi/asm-generic/ioctl.h +++ b/libc/kernel/uapi/asm-generic/ioctl.h @@ -28,16 +28,16 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define _IOC_DIRBITS 2 #endif -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) +#define _IOC_NRMASK ((1 << _IOC_NRBITS) - 1) +#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS) - 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) +#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS) - 1) +#define _IOC_DIRMASK ((1 << _IOC_DIRBITS) - 1) #define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) +#define _IOC_TYPESHIFT (_IOC_NRSHIFT + _IOC_NRBITS) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) +#define _IOC_SIZESHIFT (_IOC_TYPESHIFT + _IOC_TYPEBITS) +#define _IOC_DIRSHIFT (_IOC_SIZESHIFT + _IOC_SIZEBITS) #ifndef _IOC_NONE #define _IOC_NONE 0U /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -49,17 +49,17 @@ #ifndef _IOC_READ #define _IOC_READ 2U #endif -#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)) +#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define _IOC_TYPECHECK(t) (sizeof(t)) -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) +#define _IO(type,nr) _IOC(_IOC_NONE, (type), (nr), 0) +#define _IOR(type,nr,size) _IOC(_IOC_READ, (type), (nr), (_IOC_TYPECHECK(size))) +#define _IOW(type,nr,size) _IOC(_IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(size))) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) -#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) +#define _IOWR(type,nr,size) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(size))) +#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ, (type), (nr), sizeof(size)) +#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE, (type), (nr), sizeof(size)) +#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), sizeof(size)) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) @@ -68,7 +68,7 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) +#define IOC_INOUT ((_IOC_WRITE | _IOC_READ) << _IOC_DIRSHIFT) #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) diff --git a/libc/kernel/uapi/asm-generic/ipcbuf.h b/libc/kernel/uapi/asm-generic/ipcbuf.h index cc7274eaf..b16f72982 100644 --- a/libc/kernel/uapi/asm-generic/ipcbuf.h +++ b/libc/kernel/uapi/asm-generic/ipcbuf.h @@ -19,20 +19,20 @@ #ifndef __ASM_GENERIC_IPCBUF_H #define __ASM_GENERIC_IPCBUF_H struct ipc64_perm { - __kernel_key_t key; + __kernel_key_t key; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; + __kernel_uid32_t uid; + __kernel_gid32_t gid; + __kernel_uid32_t cuid; + __kernel_gid32_t cgid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_mode_t mode; - unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; - unsigned short seq; - unsigned short __pad2; + __kernel_mode_t mode; + unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; + unsigned short seq; + unsigned short __pad2; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_ulong_t __unused1; - __kernel_ulong_t __unused2; + __kernel_ulong_t __unused1; + __kernel_ulong_t __unused2; }; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-generic/msgbuf.h b/libc/kernel/uapi/asm-generic/msgbuf.h index b2500ef53..867672e85 100644 --- a/libc/kernel/uapi/asm-generic/msgbuf.h +++ b/libc/kernel/uapi/asm-generic/msgbuf.h @@ -21,30 +21,30 @@ #include struct msqid64_ds { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct ipc64_perm msg_perm; - __kernel_time_t msg_stime; + struct ipc64_perm msg_perm; + __kernel_time_t msg_stime; #if __BITS_PER_LONG != 64 - unsigned long __unused1; + unsigned long __unused1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif - __kernel_time_t msg_rtime; + __kernel_time_t msg_rtime; #if __BITS_PER_LONG != 64 - unsigned long __unused2; + unsigned long __unused2; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif - __kernel_time_t msg_ctime; + __kernel_time_t msg_ctime; #if __BITS_PER_LONG != 64 - unsigned long __unused3; + unsigned long __unused3; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif - __kernel_ulong_t msg_cbytes; - __kernel_ulong_t msg_qnum; - __kernel_ulong_t msg_qbytes; + __kernel_ulong_t msg_cbytes; + __kernel_ulong_t msg_qnum; + __kernel_ulong_t msg_qbytes; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_pid_t msg_lspid; - __kernel_pid_t msg_lrpid; - __kernel_ulong_t __unused4; - __kernel_ulong_t __unused5; + __kernel_pid_t msg_lspid; + __kernel_pid_t msg_lrpid; + __kernel_ulong_t __unused4; + __kernel_ulong_t __unused5; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-generic/param.h b/libc/kernel/uapi/asm-generic/param.h index 416c4fbaa..aa2186408 100644 --- a/libc/kernel/uapi/asm-generic/param.h +++ b/libc/kernel/uapi/asm-generic/param.h @@ -27,7 +27,7 @@ #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #ifndef NOGROUP -#define NOGROUP (-1) +#define NOGROUP (- 1) #endif #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-generic/poll.h b/libc/kernel/uapi/asm-generic/poll.h index 7faa0b871..4137abbb8 100644 --- a/libc/kernel/uapi/asm-generic/poll.h +++ b/libc/kernel/uapi/asm-generic/poll.h @@ -51,9 +51,9 @@ #define POLL_BUSY_LOOP 0x8000 struct pollfd { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int fd; - short events; - short revents; + int fd; + short events; + short revents; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif diff --git a/libc/kernel/uapi/asm-generic/posix_types.h b/libc/kernel/uapi/asm-generic/posix_types.h index 1519affd8..aa68412f1 100644 --- a/libc/kernel/uapi/asm-generic/posix_types.h +++ b/libc/kernel/uapi/asm-generic/posix_types.h @@ -82,7 +82,7 @@ typedef __kernel_long_t __kernel_ptrdiff_t; #ifndef __kernel_fsid_t /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef struct { - int val[2]; + int val[2]; } __kernel_fsid_t; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-generic/sembuf.h b/libc/kernel/uapi/asm-generic/sembuf.h index bcf1702f5..1cc4e32f4 100644 --- a/libc/kernel/uapi/asm-generic/sembuf.h +++ b/libc/kernel/uapi/asm-generic/sembuf.h @@ -21,20 +21,20 @@ #include struct semid64_ds { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct ipc64_perm sem_perm; - __kernel_time_t sem_otime; + struct ipc64_perm sem_perm; + __kernel_time_t sem_otime; #if __BITS_PER_LONG != 64 - unsigned long __unused1; + unsigned long __unused1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif - __kernel_time_t sem_ctime; + __kernel_time_t sem_ctime; #if __BITS_PER_LONG != 64 - unsigned long __unused2; + unsigned long __unused2; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif - unsigned long sem_nsems; - unsigned long __unused3; - unsigned long __unused4; + unsigned long sem_nsems; + unsigned long __unused3; + unsigned long __unused4; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-generic/shmbuf.h b/libc/kernel/uapi/asm-generic/shmbuf.h index 68b859dd5..6eb8b6a92 100644 --- a/libc/kernel/uapi/asm-generic/shmbuf.h +++ b/libc/kernel/uapi/asm-generic/shmbuf.h @@ -21,43 +21,43 @@ #include struct shmid64_ds { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct ipc64_perm shm_perm; - size_t shm_segsz; - __kernel_time_t shm_atime; + struct ipc64_perm shm_perm; + size_t shm_segsz; + __kernel_time_t shm_atime; #if __BITS_PER_LONG != 64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __unused1; + unsigned long __unused1; #endif - __kernel_time_t shm_dtime; + __kernel_time_t shm_dtime; #if __BITS_PER_LONG != 64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __unused2; + unsigned long __unused2; #endif - __kernel_time_t shm_ctime; + __kernel_time_t shm_ctime; #if __BITS_PER_LONG != 64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __unused3; + unsigned long __unused3; #endif - __kernel_pid_t shm_cpid; - __kernel_pid_t shm_lpid; + __kernel_pid_t shm_cpid; + __kernel_pid_t shm_lpid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_ulong_t shm_nattch; - __kernel_ulong_t __unused4; - __kernel_ulong_t __unused5; + __kernel_ulong_t shm_nattch; + __kernel_ulong_t __unused4; + __kernel_ulong_t __unused5; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct shminfo64 { - __kernel_ulong_t shmmax; - __kernel_ulong_t shmmin; - __kernel_ulong_t shmmni; + __kernel_ulong_t shmmax; + __kernel_ulong_t shmmin; + __kernel_ulong_t shmmni; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_ulong_t shmseg; - __kernel_ulong_t shmall; - __kernel_ulong_t __unused1; - __kernel_ulong_t __unused2; + __kernel_ulong_t shmseg; + __kernel_ulong_t shmall; + __kernel_ulong_t __unused1; + __kernel_ulong_t __unused2; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_ulong_t __unused3; - __kernel_ulong_t __unused4; + __kernel_ulong_t __unused3; + __kernel_ulong_t __unused4; }; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-generic/siginfo.h b/libc/kernel/uapi/asm-generic/siginfo.h index 42770ee06..2083fa10a 100644 --- a/libc/kernel/uapi/asm-generic/siginfo.h +++ b/libc/kernel/uapi/asm-generic/siginfo.h @@ -22,8 +22,8 @@ #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef union sigval { - int sival_int; - void __user *sival_ptr; + int sival_int; + void __user * sival_ptr; } sigval_t; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #ifndef __ARCH_SI_PREAMBLE_SIZE @@ -52,62 +52,62 @@ typedef union sigval { #ifndef HAVE_ARCH_SIGINFO_T /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef struct siginfo { - int si_signo; - int si_errno; - int si_code; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - union { - int _pad[SI_PAD_SIZE]; - struct { - __kernel_pid_t _pid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __ARCH_SI_UID_T _uid; - } _kill; - struct { - __kernel_timer_t _tid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int _overrun; - char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; - sigval_t _sigval; - int _sys_private; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - } _timer; - struct { - __kernel_pid_t _pid; - __ARCH_SI_UID_T _uid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - sigval_t _sigval; - } _rt; - struct { - __kernel_pid_t _pid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __ARCH_SI_UID_T _uid; - int _status; - __ARCH_SI_CLOCK_T _utime; - __ARCH_SI_CLOCK_T _stime; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - } _sigchld; - struct { - void __user *_addr; + int si_signo; + int si_errno; + int si_code; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + union { + int _pad[SI_PAD_SIZE]; + struct { + __kernel_pid_t _pid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __ARCH_SI_UID_T _uid; + } _kill; + struct { + __kernel_timer_t _tid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + int _overrun; + char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; + sigval_t _sigval; + int _sys_private; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + } _timer; + struct { + __kernel_pid_t _pid; + __ARCH_SI_UID_T _uid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + sigval_t _sigval; + } _rt; + struct { + __kernel_pid_t _pid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __ARCH_SI_UID_T _uid; + int _status; + __ARCH_SI_CLOCK_T _utime; + __ARCH_SI_CLOCK_T _stime; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + } _sigchld; + struct { + void __user * _addr; #ifdef __ARCH_SI_TRAPNO /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int _trapno; + int _trapno; #endif - short _addr_lsb; - } _sigfault; + short _addr_lsb; + } _sigfault; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct { - __ARCH_SI_BAND_T _band; - int _fd; - } _sigpoll; + struct { + __ARCH_SI_BAND_T _band; + int _fd; + } _sigpoll; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct { - void __user *_call_addr; - int _syscall; - unsigned int _arch; + struct { + void __user * _call_addr; + int _syscall; + unsigned int _arch; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - } _sigsys; - } _sifields; + } _sigsys; + } _sifields; } __ARCH_SI_ATTRIBUTES siginfo_t; #define __ARCH_SIGSYS /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -154,76 +154,76 @@ typedef struct siginfo { #define __SI_CODE(T,N) (N) #define SI_USER 0 #define SI_KERNEL 0x80 -#define SI_QUEUE -1 +#define SI_QUEUE - 1 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define SI_TIMER __SI_CODE(__SI_TIMER,-2) -#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) -#define SI_ASYNCIO -4 -#define SI_SIGIO -5 +#define SI_TIMER __SI_CODE(__SI_TIMER, - 2) +#define SI_MESGQ __SI_CODE(__SI_MESGQ, - 3) +#define SI_ASYNCIO - 4 +#define SI_SIGIO - 5 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define SI_TKILL -6 -#define SI_DETHREAD -7 +#define SI_TKILL - 6 +#define SI_DETHREAD - 7 #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ILL_ILLOPC (__SI_FAULT|1) -#define ILL_ILLOPN (__SI_FAULT|2) -#define ILL_ILLADR (__SI_FAULT|3) -#define ILL_ILLTRP (__SI_FAULT|4) +#define ILL_ILLOPC (__SI_FAULT | 1) +#define ILL_ILLOPN (__SI_FAULT | 2) +#define ILL_ILLADR (__SI_FAULT | 3) +#define ILL_ILLTRP (__SI_FAULT | 4) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define ILL_PRVOPC (__SI_FAULT|5) -#define ILL_PRVREG (__SI_FAULT|6) -#define ILL_COPROC (__SI_FAULT|7) -#define ILL_BADSTK (__SI_FAULT|8) +#define ILL_PRVOPC (__SI_FAULT | 5) +#define ILL_PRVREG (__SI_FAULT | 6) +#define ILL_COPROC (__SI_FAULT | 7) +#define ILL_BADSTK (__SI_FAULT | 8) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define NSIGILL 8 -#define FPE_INTDIV (__SI_FAULT|1) -#define FPE_INTOVF (__SI_FAULT|2) -#define FPE_FLTDIV (__SI_FAULT|3) +#define FPE_INTDIV (__SI_FAULT | 1) +#define FPE_INTOVF (__SI_FAULT | 2) +#define FPE_FLTDIV (__SI_FAULT | 3) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define FPE_FLTOVF (__SI_FAULT|4) -#define FPE_FLTUND (__SI_FAULT|5) -#define FPE_FLTRES (__SI_FAULT|6) -#define FPE_FLTINV (__SI_FAULT|7) +#define FPE_FLTOVF (__SI_FAULT | 4) +#define FPE_FLTUND (__SI_FAULT | 5) +#define FPE_FLTRES (__SI_FAULT | 6) +#define FPE_FLTINV (__SI_FAULT | 7) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define FPE_FLTSUB (__SI_FAULT|8) +#define FPE_FLTSUB (__SI_FAULT | 8) #define NSIGFPE 8 -#define SEGV_MAPERR (__SI_FAULT|1) -#define SEGV_ACCERR (__SI_FAULT|2) +#define SEGV_MAPERR (__SI_FAULT | 1) +#define SEGV_ACCERR (__SI_FAULT | 2) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define NSIGSEGV 2 -#define BUS_ADRALN (__SI_FAULT|1) -#define BUS_ADRERR (__SI_FAULT|2) -#define BUS_OBJERR (__SI_FAULT|3) +#define BUS_ADRALN (__SI_FAULT | 1) +#define BUS_ADRERR (__SI_FAULT | 2) +#define BUS_OBJERR (__SI_FAULT | 3) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define BUS_MCEERR_AR (__SI_FAULT|4) -#define BUS_MCEERR_AO (__SI_FAULT|5) +#define BUS_MCEERR_AR (__SI_FAULT | 4) +#define BUS_MCEERR_AO (__SI_FAULT | 5) #define NSIGBUS 5 -#define TRAP_BRKPT (__SI_FAULT|1) +#define TRAP_BRKPT (__SI_FAULT | 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define TRAP_TRACE (__SI_FAULT|2) -#define TRAP_BRANCH (__SI_FAULT|3) -#define TRAP_HWBKPT (__SI_FAULT|4) +#define TRAP_TRACE (__SI_FAULT | 2) +#define TRAP_BRANCH (__SI_FAULT | 3) +#define TRAP_HWBKPT (__SI_FAULT | 4) #define NSIGTRAP 4 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define CLD_EXITED (__SI_CHLD|1) -#define CLD_KILLED (__SI_CHLD|2) -#define CLD_DUMPED (__SI_CHLD|3) -#define CLD_TRAPPED (__SI_CHLD|4) +#define CLD_EXITED (__SI_CHLD | 1) +#define CLD_KILLED (__SI_CHLD | 2) +#define CLD_DUMPED (__SI_CHLD | 3) +#define CLD_TRAPPED (__SI_CHLD | 4) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define CLD_STOPPED (__SI_CHLD|5) -#define CLD_CONTINUED (__SI_CHLD|6) +#define CLD_STOPPED (__SI_CHLD | 5) +#define CLD_CONTINUED (__SI_CHLD | 6) #define NSIGCHLD 6 -#define POLL_IN (__SI_POLL|1) +#define POLL_IN (__SI_POLL | 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define POLL_OUT (__SI_POLL|2) -#define POLL_MSG (__SI_POLL|3) -#define POLL_ERR (__SI_POLL|4) -#define POLL_PRI (__SI_POLL|5) +#define POLL_OUT (__SI_POLL | 2) +#define POLL_MSG (__SI_POLL | 3) +#define POLL_ERR (__SI_POLL | 4) +#define POLL_PRI (__SI_POLL | 5) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define POLL_HUP (__SI_POLL|6) +#define POLL_HUP (__SI_POLL | 6) #define NSIGPOLL 6 -#define SYS_SECCOMP (__SI_SYS|1) +#define SYS_SECCOMP (__SI_SYS | 1) #define NSIGSYS 1 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define SIGEV_SIGNAL 0 @@ -236,22 +236,22 @@ typedef struct siginfo { #endif #define SIGEV_MAX_SIZE 64 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) +#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) typedef struct sigevent { - sigval_t sigev_value; - int sigev_signo; + sigval_t sigev_value; + int sigev_signo; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int sigev_notify; - union { - int _pad[SIGEV_PAD_SIZE]; - int _tid; + int sigev_notify; + union { + int _pad[SIGEV_PAD_SIZE]; + int _tid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct { - void (*_function)(sigval_t); - void *_attribute; - } _sigev_thread; + struct { + void(* _function) (sigval_t); + void * _attribute; + } _sigev_thread; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - } _sigev_un; + } _sigev_un; } sigevent_t; #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute diff --git a/libc/kernel/uapi/asm-generic/signal-defs.h b/libc/kernel/uapi/asm-generic/signal-defs.h index f47cbe7b9..ad77d773e 100644 --- a/libc/kernel/uapi/asm-generic/signal-defs.h +++ b/libc/kernel/uapi/asm-generic/signal-defs.h @@ -33,13 +33,13 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #ifndef __ASSEMBLY__ typedef void __signalfn_t(int); -typedef __signalfn_t __user *__sighandler_t; +typedef __signalfn_t __user * __sighandler_t; typedef void __restorefn_t(void); /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -typedef __restorefn_t __user *__sigrestore_t; -#define SIG_DFL ((__force __sighandler_t)0) -#define SIG_IGN ((__force __sighandler_t)1) -#define SIG_ERR ((__force __sighandler_t)-1) +typedef __restorefn_t __user * __sigrestore_t; +#define SIG_DFL ((__force __sighandler_t) 0) +#define SIG_IGN ((__force __sighandler_t) 1) +#define SIG_ERR ((__force __sighandler_t) - 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #endif diff --git a/libc/kernel/uapi/asm-generic/signal.h b/libc/kernel/uapi/asm-generic/signal.h index e103240b1..30188cb23 100644 --- a/libc/kernel/uapi/asm-generic/signal.h +++ b/libc/kernel/uapi/asm-generic/signal.h @@ -87,7 +87,7 @@ #ifndef __ASSEMBLY__ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef struct { - unsigned long sig[_NSIG_WORDS]; + unsigned long sig[_NSIG_WORDS]; } sigset_t; typedef unsigned long old_sigset_t; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -97,19 +97,19 @@ typedef unsigned long old_sigset_t; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct sigaction { - __sighandler_t sa_handler; - unsigned long sa_flags; + __sighandler_t sa_handler; + unsigned long sa_flags; #ifdef SA_RESTORER /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __sigrestore_t sa_restorer; + __sigrestore_t sa_restorer; #endif - sigset_t sa_mask; + sigset_t sa_mask; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef struct sigaltstack { - void __user *ss_sp; - int ss_flags; - size_t ss_size; + void __user * ss_sp; + int ss_flags; + size_t ss_size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ } stack_t; #endif diff --git a/libc/kernel/uapi/asm-generic/stat.h b/libc/kernel/uapi/asm-generic/stat.h index a94c69d61..4dbc208c3 100644 --- a/libc/kernel/uapi/asm-generic/stat.h +++ b/libc/kernel/uapi/asm-generic/stat.h @@ -22,59 +22,59 @@ #define STAT_HAVE_NSEC 1 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct stat { - unsigned long st_dev; - unsigned long st_ino; - unsigned int st_mode; + unsigned long st_dev; + unsigned long st_ino; + unsigned int st_mode; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int st_nlink; - unsigned int st_uid; - unsigned int st_gid; - unsigned long st_rdev; + unsigned int st_nlink; + unsigned int st_uid; + unsigned int st_gid; + unsigned long st_rdev; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __pad1; - long st_size; - int st_blksize; - int __pad2; + unsigned long __pad1; + long st_size; + int st_blksize; + int __pad2; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long st_blocks; - long st_atime; - unsigned long st_atime_nsec; - long st_mtime; + long st_blocks; + long st_atime; + unsigned long st_atime_nsec; + long st_mtime; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_mtime_nsec; - long st_ctime; - unsigned long st_ctime_nsec; - unsigned int __unused4; + unsigned long st_mtime_nsec; + long st_ctime; + unsigned long st_ctime_nsec; + unsigned int __unused4; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int __unused5; + unsigned int __unused5; }; #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) struct stat64 { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long long st_dev; - unsigned long long st_ino; - unsigned int st_mode; - unsigned int st_nlink; + unsigned long long st_dev; + unsigned long long st_ino; + unsigned int st_mode; + unsigned int st_nlink; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int st_uid; - unsigned int st_gid; - unsigned long long st_rdev; - unsigned long long __pad1; + unsigned int st_uid; + unsigned int st_gid; + unsigned long long st_rdev; + unsigned long long __pad1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long long st_size; - int st_blksize; - int __pad2; - long long st_blocks; + long long st_size; + int st_blksize; + int __pad2; + long long st_blocks; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int st_atime; - unsigned int st_atime_nsec; - int st_mtime; - unsigned int st_mtime_nsec; + int st_atime; + unsigned int st_atime_nsec; + int st_mtime; + unsigned int st_mtime_nsec; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int st_ctime; - unsigned int st_ctime_nsec; - unsigned int __unused4; - unsigned int __unused5; + int st_ctime; + unsigned int st_ctime_nsec; + unsigned int __unused4; + unsigned int __unused5; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-generic/statfs.h b/libc/kernel/uapi/asm-generic/statfs.h index 1c8c58906..0d03cff83 100644 --- a/libc/kernel/uapi/asm-generic/statfs.h +++ b/libc/kernel/uapi/asm-generic/statfs.h @@ -29,21 +29,21 @@ #endif #endif struct statfs { - __statfs_word f_type; + __statfs_word f_type; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __statfs_word f_bsize; - __statfs_word f_blocks; - __statfs_word f_bfree; - __statfs_word f_bavail; + __statfs_word f_bsize; + __statfs_word f_blocks; + __statfs_word f_bfree; + __statfs_word f_bavail; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __statfs_word f_files; - __statfs_word f_ffree; - __kernel_fsid_t f_fsid; - __statfs_word f_namelen; + __statfs_word f_files; + __statfs_word f_ffree; + __kernel_fsid_t f_fsid; + __statfs_word f_namelen; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __statfs_word f_frsize; - __statfs_word f_flags; - __statfs_word f_spare[4]; + __statfs_word f_frsize; + __statfs_word f_flags; + __statfs_word f_spare[4]; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #ifndef ARCH_PACK_STATFS64 @@ -51,20 +51,20 @@ struct statfs { #endif struct statfs64 { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __statfs_word f_type; - __statfs_word f_bsize; - __u64 f_blocks; - __u64 f_bfree; + __statfs_word f_type; + __statfs_word f_bsize; + __u64 f_blocks; + __u64 f_bfree; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 f_bavail; - __u64 f_files; - __u64 f_ffree; - __kernel_fsid_t f_fsid; + __u64 f_bavail; + __u64 f_files; + __u64 f_ffree; + __kernel_fsid_t f_fsid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __statfs_word f_namelen; - __statfs_word f_frsize; - __statfs_word f_flags; - __statfs_word f_spare[4]; + __statfs_word f_namelen; + __statfs_word f_frsize; + __statfs_word f_flags; + __statfs_word f_spare[4]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ } ARCH_PACK_STATFS64; #ifndef ARCH_PACK_COMPAT_STATFS64 @@ -72,20 +72,20 @@ struct statfs64 { #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct compat_statfs64 { - __u32 f_type; - __u32 f_bsize; - __u64 f_blocks; + __u32 f_type; + __u32 f_bsize; + __u64 f_blocks; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 f_bfree; - __u64 f_bavail; - __u64 f_files; - __u64 f_ffree; + __u64 f_bfree; + __u64 f_bavail; + __u64 f_files; + __u64 f_ffree; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_fsid_t f_fsid; - __u32 f_namelen; - __u32 f_frsize; - __u32 f_flags; + __kernel_fsid_t f_fsid; + __u32 f_namelen; + __u32 f_frsize; + __u32 f_flags; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 f_spare[4]; + __u32 f_spare[4]; } ARCH_PACK_COMPAT_STATFS64; #endif diff --git a/libc/kernel/uapi/asm-generic/termbits.h b/libc/kernel/uapi/asm-generic/termbits.h index 58acd3d98..c08bbb8cb 100644 --- a/libc/kernel/uapi/asm-generic/termbits.h +++ b/libc/kernel/uapi/asm-generic/termbits.h @@ -26,38 +26,38 @@ typedef unsigned int tcflag_t; #define NCCS 19 struct termios { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - cc_t c_line; - cc_t c_cc[NCCS]; + cc_t c_line; + cc_t c_cc[NCCS]; }; struct termios2 { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - cc_t c_line; - cc_t c_cc[NCCS]; - speed_t c_ispeed; - speed_t c_ospeed; + cc_t c_line; + cc_t c_cc[NCCS]; + speed_t c_ispeed; + speed_t c_ospeed; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; struct ktermios { - tcflag_t c_iflag; - tcflag_t c_oflag; + tcflag_t c_iflag; + tcflag_t c_oflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_line; + cc_t c_cc[NCCS]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - speed_t c_ispeed; - speed_t c_ospeed; + speed_t c_ispeed; + speed_t c_ospeed; }; #define VINTR 0 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-generic/termios.h b/libc/kernel/uapi/asm-generic/termios.h index 0a5dfd6ae..1e5f9ceef 100644 --- a/libc/kernel/uapi/asm-generic/termios.h +++ b/libc/kernel/uapi/asm-generic/termios.h @@ -22,22 +22,22 @@ #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short ws_ypixel; + unsigned short ws_ypixel; }; #define NCC 8 struct termio { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short c_iflag; - unsigned short c_oflag; - unsigned short c_cflag; - unsigned short c_lflag; + unsigned short c_iflag; + unsigned short c_oflag; + unsigned short c_cflag; + unsigned short c_lflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned char c_line; - unsigned char c_cc[NCC]; + unsigned char c_line; + unsigned char c_cc[NCC]; }; #define TIOCM_LE 0x001 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-generic/ucontext.h b/libc/kernel/uapi/asm-generic/ucontext.h index f26d1ccaf..cfb1d2b6d 100644 --- a/libc/kernel/uapi/asm-generic/ucontext.h +++ b/libc/kernel/uapi/asm-generic/ucontext.h @@ -19,12 +19,12 @@ #ifndef __ASM_GENERIC_UCONTEXT_H #define __ASM_GENERIC_UCONTEXT_H struct ucontext { - unsigned long uc_flags; + unsigned long uc_flags; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct ucontext *uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; + struct ucontext * uc_link; + stack_t uc_stack; + struct sigcontext uc_mcontext; + sigset_t uc_sigmask; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-generic/unistd.h b/libc/kernel/uapi/asm-generic/unistd.h index 7cdf4391e..d7ac6c2ee 100644 --- a/libc/kernel/uapi/asm-generic/unistd.h +++ b/libc/kernel/uapi/asm-generic/unistd.h @@ -18,22 +18,22 @@ ****************************************************************************/ #include #ifndef __SYSCALL -#define __SYSCALL(x, y) +#define __SYSCALL(x,y) #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) -#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) +#define __SC_3264(_nr,_32,_64) __SYSCALL(_nr, _32) #else -#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) +#define __SC_3264(_nr,_32,_64) __SYSCALL(_nr, _64) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #ifdef __SYSCALL_COMPAT -#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) -#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) +#define __SC_COMP(_nr,_sys,_comp) __SYSCALL(_nr, _comp) +#define __SC_COMP_3264(_nr,_32,_64,_comp) __SYSCALL(_nr, _comp) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #else -#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) -#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) +#define __SC_COMP(_nr,_sys,_comp) __SYSCALL(_nr, _sys) +#define __SC_COMP_3264(_nr,_32,_64,_comp) __SC_3264(_nr, _32, _64) #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __NR_io_setup 0 @@ -402,7 +402,7 @@ #define __NR3264_lstat 1039 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #undef __NR_syscalls -#define __NR_syscalls (__NR3264_lstat+1) +#define __NR_syscalls (__NR3264_lstat + 1) #endif #ifdef __ARCH_WANT_SYSCALL_NO_FLAGS /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -414,7 +414,7 @@ #define __NR_eventfd 1044 #define __NR_signalfd 1045 #undef __NR_syscalls -#define __NR_syscalls (__NR_signalfd+1) +#define __NR_syscalls (__NR_signalfd + 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && defined(__ARCH_WANT_SYSCALL_OFF_T) @@ -438,7 +438,7 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __NR_mmap 1058 #undef __NR_syscalls -#define __NR_syscalls (__NR_mmap+1) +#define __NR_syscalls (__NR_mmap + 1) #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #ifdef __ARCH_WANT_SYSCALL_DEPRECATED @@ -481,7 +481,7 @@ #define __NR_fork 1079 #undef __NR_syscalls /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define __NR_syscalls (__NR_fork+1) +#define __NR_syscalls (__NR_fork + 1) #endif #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) #define __NR_fcntl __NR3264_fcntl diff --git a/libc/kernel/uapi/asm-mips/asm/bitfield.h b/libc/kernel/uapi/asm-mips/asm/bitfield.h index 4b8ac1928..dbe56cc82 100644 --- a/libc/kernel/uapi/asm-mips/asm/bitfield.h +++ b/libc/kernel/uapi/asm-mips/asm/bitfield.h @@ -18,6 +18,6 @@ ****************************************************************************/ #ifndef __UAPI_ASM_BITFIELD_H #define __UAPI_ASM_BITFIELD_H -#define __BITFIELD_FIELD(field, more) more field; +#define __BITFIELD_FIELD(field,more) more field; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-mips/asm/cachectl.h b/libc/kernel/uapi/asm-mips/asm/cachectl.h index 6cc6f2872..86cf3e4e4 100644 --- a/libc/kernel/uapi/asm-mips/asm/cachectl.h +++ b/libc/kernel/uapi/asm-mips/asm/cachectl.h @@ -18,10 +18,10 @@ ****************************************************************************/ #ifndef _ASM_CACHECTL #define _ASM_CACHECTL -#define ICACHE (1<<0) -#define DCACHE (1<<1) +#define ICACHE (1 << 0) +#define DCACHE (1 << 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define BCACHE (ICACHE|DCACHE) +#define BCACHE (ICACHE | DCACHE) #define CACHEABLE 0 #define UNCACHEABLE 1 #endif diff --git a/libc/kernel/uapi/asm-mips/asm/fcntl.h b/libc/kernel/uapi/asm-mips/asm/fcntl.h index 02ea3ac69..86ad973c8 100644 --- a/libc/kernel/uapi/asm-mips/asm/fcntl.h +++ b/libc/kernel/uapi/asm-mips/asm/fcntl.h @@ -32,7 +32,7 @@ #define O_LARGEFILE 0x2000 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __O_SYNC 0x4000 -#define O_SYNC (__O_SYNC|O_DSYNC) +#define O_SYNC (__O_SYNC | O_DSYNC) #define O_DIRECT 0x8000 #define F_GETLK 14 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -51,14 +51,14 @@ #include struct flock { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - short l_type; - short l_whence; - __kernel_off_t l_start; - __kernel_off_t l_len; + short l_type; + short l_whence; + __kernel_off_t l_start; + __kernel_off_t l_len; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long l_sysid; - __kernel_pid_t l_pid; - long pad[4]; + long l_sysid; + __kernel_pid_t l_pid; + long pad[4]; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define HAVE_ARCH_STRUCT_FLOCK diff --git a/libc/kernel/uapi/asm-mips/asm/inst.h b/libc/kernel/uapi/asm-mips/asm/inst.h index 18b546528..e9b8372e0 100644 --- a/libc/kernel/uapi/asm-mips/asm/inst.h +++ b/libc/kernel/uapi/asm-mips/asm/inst.h @@ -21,906 +21,1030 @@ #include enum major_op { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - spec_op, bcond_op, j_op, jal_op, - beq_op, bne_op, blez_op, bgtz_op, - addi_op, addiu_op, slti_op, sltiu_op, - andi_op, ori_op, xori_op, lui_op, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - cop0_op, cop1_op, cop2_op, cop1x_op, - beql_op, bnel_op, blezl_op, bgtzl_op, - daddi_op, daddiu_op, ldl_op, ldr_op, - spec2_op, jalx_op, mdmx_op, spec3_op, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - lb_op, lh_op, lwl_op, lw_op, - lbu_op, lhu_op, lwr_op, lwu_op, - sb_op, sh_op, swl_op, sw_op, - sdl_op, sdr_op, swr_op, cache_op, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ll_op, lwc1_op, lwc2_op, pref_op, - lld_op, ldc1_op, ldc2_op, ld_op, - sc_op, swc1_op, swc2_op, major_3b_op, - scd_op, sdc1_op, sdc2_op, sd_op + spec_op, + bcond_op, + j_op, + jal_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + beq_op, + bne_op, + blez_op, + bgtz_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + addi_op, + addiu_op, + slti_op, + sltiu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + andi_op, + ori_op, + xori_op, + lui_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + cop0_op, + cop1_op, + cop2_op, + cop1x_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + beql_op, + bnel_op, + blezl_op, + bgtzl_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + daddi_op, + daddiu_op, + ldl_op, + ldr_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + spec2_op, + jalx_op, + mdmx_op, + spec3_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lb_op, + lh_op, + lwl_op, + lw_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lbu_op, + lhu_op, + lwr_op, + lwu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + sb_op, + sh_op, + swl_op, + sw_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + sdl_op, + sdr_op, + swr_op, + cache_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ll_op, + lwc1_op, + lwc2_op, + pref_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lld_op, + ldc1_op, + ldc2_op, + ld_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + sc_op, + swc1_op, + swc2_op, + major_3b_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + scd_op, + sdc1_op, + sdc2_op, + sd_op /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; enum spec_op { - sll_op, movc_op, srl_op, sra_op, - sllv_op, pmon_op, srlv_op, srav_op, + sll_op, + movc_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + srl_op, + sra_op, + sllv_op, + pmon_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + srlv_op, + srav_op, + jr_op, + jalr_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + movz_op, + movn_op, + syscall_op, + break_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + spim_op, + sync_op, + mfhi_op, + mthi_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mflo_op, + mtlo_op, + dsllv_op, + spec2_unused_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + dsrlv_op, + dsrav_op, + mult_op, + multu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + div_op, + divu_op, + dmult_op, + dmultu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ddiv_op, + ddivu_op, + add_op, + addu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + sub_op, + subu_op, + and_op, + or_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + xor_op, + nor_op, + spec3_unused_op, + spec4_unused_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + slt_op, + sltu_op, + dadd_op, + daddu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + dsub_op, + dsubu_op, + tge_op, + tgeu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + tlt_op, + tltu_op, + teq_op, + spec5_unused_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + tne_op, + spec6_unused_op, + dsll_op, + spec7_unused_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + dsrl_op, + dsra_op, + dsll32_op, + spec8_unused_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + dsrl32_op, + dsra32_op +}; +enum spec2_op { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - jr_op, jalr_op, movz_op, movn_op, - syscall_op, break_op, spim_op, sync_op, - mfhi_op, mthi_op, mflo_op, mtlo_op, - dsllv_op, spec2_unused_op, dsrlv_op, dsrav_op, + madd_op, + maddu_op, + mul_op, + spec2_3_unused_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mult_op, multu_op, div_op, divu_op, - dmult_op, dmultu_op, ddiv_op, ddivu_op, - add_op, addu_op, sub_op, subu_op, - and_op, or_op, xor_op, nor_op, + msub_op, + msubu_op, + clz_op = 0x20, + clo_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - spec3_unused_op, spec4_unused_op, slt_op, sltu_op, - dadd_op, daddu_op, dsub_op, dsubu_op, - tge_op, tgeu_op, tlt_op, tltu_op, - teq_op, spec5_unused_op, tne_op, spec6_unused_op, + dclz_op = 0x24, + dclo_op, + sdbpp_op = 0x3f +}; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - dsll_op, spec7_unused_op, dsrl_op, dsra_op, - dsll32_op, spec8_unused_op, dsrl32_op, dsra32_op +enum spec3_op { + ext_op, + dextm_op, + dextu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + dext_op, + ins_op, + dinsm_op, + dinsu_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + dins_op, + yield_op = 0x09, + lx_op = 0x0a, + lwle_op = 0x19, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lwre_op = 0x1a, + cachee_op = 0x1b, + sbe_op = 0x1c, + she_op = 0x1d, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + sce_op = 0x1e, + swe_op = 0x1f, + bshfl_op = 0x20, + swle_op = 0x21, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + swre_op = 0x22, + prefe_op = 0x23, + dbshfl_op = 0x24, + lbue_op = 0x28, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lhue_op = 0x29, + lbe_op = 0x2c, + lhe_op = 0x2d, + lle_op = 0x2e, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lwe_op = 0x2f, + rdhwr_op = 0x3b }; -enum spec2_op { +enum rt_op { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - madd_op, maddu_op, mul_op, spec2_3_unused_op, - msub_op, msubu_op, - clz_op = 0x20, clo_op, - dclz_op = 0x24, dclo_op, + bltz_op, + bgez_op, + bltzl_op, + bgezl_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - sdbpp_op = 0x3f -}; -enum spec3_op { - ext_op, dextm_op, dextu_op, dext_op, + spimi_op, + unused_rt_op_0x05, + unused_rt_op_0x06, + unused_rt_op_0x07, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ins_op, dinsm_op, dinsu_op, dins_op, - yield_op = 0x09, lx_op = 0x0a, - lwle_op = 0x19, lwre_op = 0x1a, - cachee_op = 0x1b, sbe_op = 0x1c, + tgei_op, + tgeiu_op, + tlti_op, + tltiu_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - she_op = 0x1d, sce_op = 0x1e, - swe_op = 0x1f, bshfl_op = 0x20, - swle_op = 0x21, swre_op = 0x22, - prefe_op = 0x23, dbshfl_op = 0x24, + teqi_op, + unused_0x0d_rt_op, + tnei_op, + unused_0x0f_rt_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - lbue_op = 0x28, lhue_op = 0x29, - lbe_op = 0x2c, lhe_op = 0x2d, - lle_op = 0x2e, lwe_op = 0x2f, - rdhwr_op = 0x3b + bltzal_op, + bgezal_op, + bltzall_op, + bgezall_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -enum rt_op { - bltz_op, bgez_op, bltzl_op, bgezl_op, - spimi_op, unused_rt_op_0x05, unused_rt_op_0x06, unused_rt_op_0x07, + rt_op_0x14, + rt_op_0x15, + rt_op_0x16, + rt_op_0x17, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tgei_op, tgeiu_op, tlti_op, tltiu_op, - teqi_op, unused_0x0d_rt_op, tnei_op, unused_0x0f_rt_op, - bltzal_op, bgezal_op, bltzall_op, bgezall_op, - rt_op_0x14, rt_op_0x15, rt_op_0x16, rt_op_0x17, + rt_op_0x18, + rt_op_0x19, + rt_op_0x1a, + rt_op_0x1b, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + bposge32_op, + rt_op_0x1d, + rt_op_0x1e, + rt_op_0x1f /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - rt_op_0x18, rt_op_0x19, rt_op_0x1a, rt_op_0x1b, - bposge32_op, rt_op_0x1d, rt_op_0x1e, rt_op_0x1f }; enum cop_op { + mfc_op = 0x00, + dmfc_op = 0x01, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + cfc_op = 0x02, + mfhc_op = 0x03, + mtc_op = 0x04, + dmtc_op = 0x05, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mfc_op = 0x00, dmfc_op = 0x01, - cfc_op = 0x02, mfhc_op = 0x03, - mtc_op = 0x04, dmtc_op = 0x05, - ctc_op = 0x06, mthc_op = 0x07, + ctc_op = 0x06, + mthc_op = 0x07, + bc_op = 0x08, + cop_op = 0x10, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - bc_op = 0x08, cop_op = 0x10, - copm_op = 0x18 + copm_op = 0x18 }; enum bcop_op { + bcf_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - bcf_op, bct_op, bcfl_op, bctl_op + bct_op, + bcfl_op, + bctl_op }; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ enum cop0_coi_func { - tlbr_op = 0x01, tlbwi_op = 0x02, + tlbr_op = 0x01, + tlbwi_op = 0x02, + tlbwr_op = 0x06, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tlbwr_op = 0x06, tlbp_op = 0x08, - rfe_op = 0x10, eret_op = 0x18, - wait_op = 0x20, -}; + tlbp_op = 0x08, + rfe_op = 0x10, + eret_op = 0x18, + wait_op = 0x20, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +}; enum cop0_com_func { - tlbr1_op = 0x01, tlbw_op = 0x02, - tlbp1_op = 0x08, dctr_op = 0x09, - dctw_op = 0x0a + tlbr1_op = 0x01, + tlbw_op = 0x02, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + tlbp1_op = 0x08, + dctr_op = 0x09, + dctw_op = 0x0a }; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ enum cop1_fmt { - s_fmt, d_fmt, e_fmt, q_fmt, - w_fmt, l_fmt + s_fmt, + d_fmt, + e_fmt, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + q_fmt, + w_fmt, + l_fmt }; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ enum cop1_sdw_func { - fadd_op = 0x00, fsub_op = 0x01, - fmul_op = 0x02, fdiv_op = 0x03, + fadd_op = 0x00, + fsub_op = 0x01, + fmul_op = 0x02, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + fdiv_op = 0x03, + fsqrt_op = 0x04, + fabs_op = 0x05, + fmov_op = 0x06, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + fneg_op = 0x07, + froundl_op = 0x08, + ftruncl_op = 0x09, + fceill_op = 0x0a, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - fsqrt_op = 0x04, fabs_op = 0x05, - fmov_op = 0x06, fneg_op = 0x07, - froundl_op = 0x08, ftruncl_op = 0x09, - fceill_op = 0x0a, ffloorl_op = 0x0b, + ffloorl_op = 0x0b, + fround_op = 0x0c, + ftrunc_op = 0x0d, + fceil_op = 0x0e, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - fround_op = 0x0c, ftrunc_op = 0x0d, - fceil_op = 0x0e, ffloor_op = 0x0f, - fmovc_op = 0x11, fmovz_op = 0x12, - fmovn_op = 0x13, frecip_op = 0x15, + ffloor_op = 0x0f, + fmovc_op = 0x11, + fmovz_op = 0x12, + fmovn_op = 0x13, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - frsqrt_op = 0x16, fcvts_op = 0x20, - fcvtd_op = 0x21, fcvte_op = 0x22, - fcvtw_op = 0x24, fcvtl_op = 0x25, - fcmp_op = 0x30 + frecip_op = 0x15, + frsqrt_op = 0x16, + fcvts_op = 0x20, + fcvtd_op = 0x21, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + fcvte_op = 0x22, + fcvtw_op = 0x24, + fcvtl_op = 0x25, + fcmp_op = 0x30 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; enum cop1x_func { - lwxc1_op = 0x00, ldxc1_op = 0x01, - swxc1_op = 0x08, sdxc1_op = 0x09, + lwxc1_op = 0x00, + ldxc1_op = 0x01, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + swxc1_op = 0x08, + sdxc1_op = 0x09, + pfetch_op = 0x0f, + madd_s_op = 0x20, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + madd_d_op = 0x21, + madd_e_op = 0x22, + msub_s_op = 0x28, + msub_d_op = 0x29, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - pfetch_op = 0x0f, madd_s_op = 0x20, - madd_d_op = 0x21, madd_e_op = 0x22, - msub_s_op = 0x28, msub_d_op = 0x29, - msub_e_op = 0x2a, nmadd_s_op = 0x30, + msub_e_op = 0x2a, + nmadd_s_op = 0x30, + nmadd_d_op = 0x31, + nmadd_e_op = 0x32, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - nmadd_d_op = 0x31, nmadd_e_op = 0x32, - nmsub_s_op = 0x38, nmsub_d_op = 0x39, - nmsub_e_op = 0x3a + nmsub_s_op = 0x38, + nmsub_d_op = 0x39, + nmsub_e_op = 0x3a }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ enum mad_func { - madd_fp_op = 0x08, msub_fp_op = 0x0a, - nmadd_fp_op = 0x0c, nmsub_fp_op = 0x0e -}; + madd_fp_op = 0x08, + msub_fp_op = 0x0a, + nmadd_fp_op = 0x0c, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + nmsub_fp_op = 0x0e +}; enum lx_func { - lwx_op = 0x00, - lhx_op = 0x04, - lbux_op = 0x06, + lwx_op = 0x00, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ldx_op = 0x08, - lwux_op = 0x10, - lhux_op = 0x14, - lbx_op = 0x16, + lhx_op = 0x04, + lbux_op = 0x06, + ldx_op = 0x08, + lwux_op = 0x10, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + lhux_op = 0x14, + lbx_op = 0x16, }; enum bshfl_func { - wsbh_op = 0x2, - dshd_op = 0x5, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - seb_op = 0x10, - seh_op = 0x18, + wsbh_op = 0x2, + dshd_op = 0x5, + seb_op = 0x10, + seh_op = 0x18, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; enum mm_major_op { + mm_pool32a_op, + mm_pool16a_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_lbu16_op, + mm_move16_op, + mm_addi32_op, + mm_lbu32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sb32_op, + mm_lb32_op, + mm_pool32b_op, + mm_pool16b_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_lhu16_op, + mm_andi16_op, + mm_addiu32_op, + mm_lhu32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sh32_op, + mm_lh32_op, + mm_pool32i_op, + mm_pool16c_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_lwsp16_op, + mm_pool16d_op, + mm_ori32_op, + mm_pool32f_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_reserved1_op, + mm_reserved2_op, + mm_pool32c_op, + mm_lwgp16_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_lw16_op, + mm_pool16e_op, + mm_xori32_op, + mm_jals32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_addiupc_op, + mm_reserved3_op, + mm_reserved4_op, + mm_pool16f_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sb16_op, + mm_beqz16_op, + mm_slti32_op, + mm_beq32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_swc132_op, + mm_lwc132_op, + mm_reserved5_op, + mm_reserved6_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sh16_op, + mm_bnez16_op, + mm_sltiu32_op, + mm_bne32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sdc132_op, + mm_ldc132_op, + mm_reserved7_op, + mm_reserved8_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_swsp16_op, + mm_b16_op, + mm_andi32_op, + mm_j32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sd32_op, + mm_ld32_op, + mm_reserved11_op, + mm_reserved12_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sw16_op, + mm_li16_op, + mm_jalx32_op, + mm_jal32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sw32_op, + mm_lw32_op, +}; +enum mm_32i_minor_op { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_pool32a_op, mm_pool16a_op, mm_lbu16_op, mm_move16_op, - mm_addi32_op, mm_lbu32_op, mm_sb32_op, mm_lb32_op, - mm_pool32b_op, mm_pool16b_op, mm_lhu16_op, mm_andi16_op, - mm_addiu32_op, mm_lhu32_op, mm_sh32_op, mm_lh32_op, + mm_bltz_op, + mm_bltzal_op, + mm_bgez_op, + mm_bgezal_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_pool32i_op, mm_pool16c_op, mm_lwsp16_op, mm_pool16d_op, - mm_ori32_op, mm_pool32f_op, mm_reserved1_op, mm_reserved2_op, - mm_pool32c_op, mm_lwgp16_op, mm_lw16_op, mm_pool16e_op, - mm_xori32_op, mm_jals32_op, mm_addiupc_op, mm_reserved3_op, + mm_blez_op, + mm_bnezc_op, + mm_bgtz_op, + mm_beqzc_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_reserved4_op, mm_pool16f_op, mm_sb16_op, mm_beqz16_op, - mm_slti32_op, mm_beq32_op, mm_swc132_op, mm_lwc132_op, - mm_reserved5_op, mm_reserved6_op, mm_sh16_op, mm_bnez16_op, - mm_sltiu32_op, mm_bne32_op, mm_sdc132_op, mm_ldc132_op, + mm_tlti_op, + mm_tgei_op, + mm_tltiu_op, + mm_tgeiu_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_reserved7_op, mm_reserved8_op, mm_swsp16_op, mm_b16_op, - mm_andi32_op, mm_j32_op, mm_sd32_op, mm_ld32_op, - mm_reserved11_op, mm_reserved12_op, mm_sw16_op, mm_li16_op, - mm_jalx32_op, mm_jal32_op, mm_sw32_op, mm_lw32_op, + mm_tnei_op, + mm_lui_op, + mm_teqi_op, + mm_reserved13_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -enum mm_32i_minor_op { - mm_bltz_op, mm_bltzal_op, mm_bgez_op, mm_bgezal_op, - mm_blez_op, mm_bnezc_op, mm_bgtz_op, mm_beqzc_op, + mm_synci_op, + mm_bltzals_op, + mm_reserved14_op, + mm_bgezals_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_tlti_op, mm_tgei_op, mm_tltiu_op, mm_tgeiu_op, - mm_tnei_op, mm_lui_op, mm_teqi_op, mm_reserved13_op, - mm_synci_op, mm_bltzals_op, mm_reserved14_op, mm_bgezals_op, - mm_bc2f_op, mm_bc2t_op, mm_reserved15_op, mm_reserved16_op, + mm_bc2f_op, + mm_bc2t_op, + mm_reserved15_op, + mm_reserved16_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_reserved17_op, mm_reserved18_op, mm_bposge64_op, mm_bposge32_op, - mm_bc1f_op, mm_bc1t_op, mm_reserved19_op, mm_reserved20_op, - mm_bc1any2f_op, mm_bc1any2t_op, mm_bc1any4f_op, mm_bc1any4t_op, -}; + mm_reserved17_op, + mm_reserved18_op, + mm_bposge64_op, + mm_bposge32_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_bc1f_op, + mm_bc1t_op, + mm_reserved19_op, + mm_reserved20_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_bc1any2f_op, + mm_bc1any2t_op, + mm_bc1any4f_op, + mm_bc1any4t_op, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +}; enum mm_32a_minor_op { - mm_sll32_op = 0x000, - mm_ins_op = 0x00c, - mm_sllv32_op = 0x010, + mm_sll32_op = 0x000, + mm_ins_op = 0x00c, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_ext_op = 0x02c, - mm_pool32axf_op = 0x03c, - mm_srl32_op = 0x040, - mm_sra_op = 0x080, + mm_sllv32_op = 0x010, + mm_ext_op = 0x02c, + mm_pool32axf_op = 0x03c, + mm_srl32_op = 0x040, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_srlv32_op = 0x090, - mm_rotr_op = 0x0c0, - mm_lwxs_op = 0x118, - mm_addu32_op = 0x150, + mm_sra_op = 0x080, + mm_srlv32_op = 0x090, + mm_rotr_op = 0x0c0, + mm_lwxs_op = 0x118, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_subu32_op = 0x1d0, - mm_wsbh_op = 0x1ec, - mm_mul_op = 0x210, - mm_and_op = 0x250, + mm_addu32_op = 0x150, + mm_subu32_op = 0x1d0, + mm_wsbh_op = 0x1ec, + mm_mul_op = 0x210, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_or32_op = 0x290, - mm_xor32_op = 0x310, - mm_slt_op = 0x350, - mm_sltu_op = 0x390, + mm_and_op = 0x250, + mm_or32_op = 0x290, + mm_xor32_op = 0x310, + mm_slt_op = 0x350, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_sltu_op = 0x390, }; enum mm_32b_func { - mm_lwc2_func = 0x0, - mm_lwp_func = 0x1, + mm_lwc2_func = 0x0, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_ldc2_func = 0x2, - mm_ldp_func = 0x4, - mm_lwm32_func = 0x5, - mm_cache_func = 0x6, + mm_lwp_func = 0x1, + mm_ldc2_func = 0x2, + mm_ldp_func = 0x4, + mm_lwm32_func = 0x5, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_ldm_func = 0x7, - mm_swc2_func = 0x8, - mm_swp_func = 0x9, - mm_sdc2_func = 0xa, + mm_cache_func = 0x6, + mm_ldm_func = 0x7, + mm_swc2_func = 0x8, + mm_swp_func = 0x9, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_sdp_func = 0xc, - mm_swm32_func = 0xd, - mm_sdm_func = 0xf, -}; + mm_sdc2_func = 0xa, + mm_sdp_func = 0xc, + mm_swm32_func = 0xd, + mm_sdm_func = 0xf, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +}; enum mm_32c_func { - mm_pref_func = 0x2, - mm_ll_func = 0x3, - mm_swr_func = 0x9, + mm_pref_func = 0x2, + mm_ll_func = 0x3, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_sc_func = 0xb, - mm_lwu_func = 0xe, + mm_swr_func = 0x9, + mm_sc_func = 0xb, + mm_lwu_func = 0xe, }; -enum mm_32axf_minor_op { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_mfc0_op = 0x003, - mm_mtc0_op = 0x00b, - mm_tlbp_op = 0x00d, - mm_mfhi32_op = 0x035, +enum mm_32axf_minor_op { + mm_mfc0_op = 0x003, + mm_mtc0_op = 0x00b, + mm_tlbp_op = 0x00d, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_jalr_op = 0x03c, - mm_tlbr_op = 0x04d, - mm_mflo32_op = 0x075, - mm_jalrhb_op = 0x07c, + mm_mfhi32_op = 0x035, + mm_jalr_op = 0x03c, + mm_tlbr_op = 0x04d, + mm_mflo32_op = 0x075, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_tlbwi_op = 0x08d, - mm_tlbwr_op = 0x0cd, - mm_jalrs_op = 0x13c, - mm_jalrshb_op = 0x17c, + mm_jalrhb_op = 0x07c, + mm_tlbwi_op = 0x08d, + mm_tlbwr_op = 0x0cd, + mm_jalrs_op = 0x13c, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_sync_op = 0x1ad, - mm_syscall_op = 0x22d, - mm_wait_op = 0x24d, - mm_eret_op = 0x3cd, + mm_jalrshb_op = 0x17c, + mm_sync_op = 0x1ad, + mm_syscall_op = 0x22d, + mm_wait_op = 0x24d, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_divu_op = 0x5dc, + mm_eret_op = 0x3cd, + mm_divu_op = 0x5dc, }; enum mm_32f_minor_op { - mm_32f_00_op = 0x00, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_32f_01_op = 0x01, - mm_32f_02_op = 0x02, - mm_32f_10_op = 0x08, - mm_32f_11_op = 0x09, + mm_32f_00_op = 0x00, + mm_32f_01_op = 0x01, + mm_32f_02_op = 0x02, + mm_32f_10_op = 0x08, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_32f_12_op = 0x0a, - mm_32f_20_op = 0x10, - mm_32f_30_op = 0x18, - mm_32f_40_op = 0x20, + mm_32f_11_op = 0x09, + mm_32f_12_op = 0x0a, + mm_32f_20_op = 0x10, + mm_32f_30_op = 0x18, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_32f_41_op = 0x21, - mm_32f_42_op = 0x22, - mm_32f_50_op = 0x28, - mm_32f_51_op = 0x29, + mm_32f_40_op = 0x20, + mm_32f_41_op = 0x21, + mm_32f_42_op = 0x22, + mm_32f_50_op = 0x28, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_32f_52_op = 0x2a, - mm_32f_60_op = 0x30, - mm_32f_70_op = 0x38, - mm_32f_73_op = 0x3b, + mm_32f_51_op = 0x29, + mm_32f_52_op = 0x2a, + mm_32f_60_op = 0x30, + mm_32f_70_op = 0x38, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_32f_74_op = 0x3c, + mm_32f_73_op = 0x3b, + mm_32f_74_op = 0x3c, }; enum mm_32f_10_minor_op { - mm_lwxc1_op = 0x1, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_swxc1_op, - mm_ldxc1_op, - mm_sdxc1_op, - mm_luxc1_op, + mm_lwxc1_op = 0x1, + mm_swxc1_op, + mm_ldxc1_op, + mm_sdxc1_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_suxc1_op, + mm_luxc1_op, + mm_suxc1_op, }; enum mm_32f_func { - mm_lwxc1_func = 0x048, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_swxc1_func = 0x088, - mm_ldxc1_func = 0x0c8, - mm_sdxc1_func = 0x108, -}; + mm_lwxc1_func = 0x048, + mm_swxc1_func = 0x088, + mm_ldxc1_func = 0x0c8, + mm_sdxc1_func = 0x108, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -enum mm_32f_40_minor_op { - mm_fmovf_op, - mm_fmovt_op, }; +enum mm_32f_40_minor_op { + mm_fmovf_op, + mm_fmovt_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +}; enum mm_32f_60_minor_op { - mm_fadd_op, - mm_fsub_op, - mm_fmul_op, + mm_fadd_op, + mm_fsub_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fdiv_op, + mm_fmul_op, + mm_fdiv_op, }; enum mm_32f_70_minor_op { - mm_fmovn_op, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fmovz_op, + mm_fmovn_op, + mm_fmovz_op, }; enum mm_32f_73_minor_op { - mm_fmov0_op = 0x01, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fcvtl_op = 0x04, - mm_movf0_op = 0x05, - mm_frsqrt_op = 0x08, - mm_ffloorl_op = 0x0c, + mm_fmov0_op = 0x01, + mm_fcvtl_op = 0x04, + mm_movf0_op = 0x05, + mm_frsqrt_op = 0x08, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fabs0_op = 0x0d, - mm_fcvtw_op = 0x24, - mm_movt0_op = 0x25, - mm_fsqrt_op = 0x28, + mm_ffloorl_op = 0x0c, + mm_fabs0_op = 0x0d, + mm_fcvtw_op = 0x24, + mm_movt0_op = 0x25, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_ffloorw_op = 0x2c, - mm_fneg0_op = 0x2d, - mm_cfc1_op = 0x40, - mm_frecip_op = 0x48, + mm_fsqrt_op = 0x28, + mm_ffloorw_op = 0x2c, + mm_fneg0_op = 0x2d, + mm_cfc1_op = 0x40, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fceill_op = 0x4c, - mm_fcvtd0_op = 0x4d, - mm_ctc1_op = 0x60, - mm_fceilw_op = 0x6c, + mm_frecip_op = 0x48, + mm_fceill_op = 0x4c, + mm_fcvtd0_op = 0x4d, + mm_ctc1_op = 0x60, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fcvts0_op = 0x6d, - mm_mfc1_op = 0x80, - mm_fmov1_op = 0x81, - mm_movf1_op = 0x85, + mm_fceilw_op = 0x6c, + mm_fcvts0_op = 0x6d, + mm_mfc1_op = 0x80, + mm_fmov1_op = 0x81, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_ftruncl_op = 0x8c, - mm_fabs1_op = 0x8d, - mm_mtc1_op = 0xa0, - mm_movt1_op = 0xa5, + mm_movf1_op = 0x85, + mm_ftruncl_op = 0x8c, + mm_fabs1_op = 0x8d, + mm_mtc1_op = 0xa0, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_ftruncw_op = 0xac, - mm_fneg1_op = 0xad, - mm_mfhc1_op = 0xc0, - mm_froundl_op = 0xcc, + mm_movt1_op = 0xa5, + mm_ftruncw_op = 0xac, + mm_fneg1_op = 0xad, + mm_mfhc1_op = 0xc0, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_fcvtd1_op = 0xcd, - mm_mthc1_op = 0xe0, - mm_froundw_op = 0xec, - mm_fcvts1_op = 0xed, + mm_froundl_op = 0xcc, + mm_fcvtd1_op = 0xcd, + mm_mthc1_op = 0xe0, + mm_froundw_op = 0xec, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + mm_fcvts1_op = 0xed, }; enum mm_16c_minor_op { - mm_lwm16_op = 0x04, - mm_swm16_op = 0x05, + mm_lwm16_op = 0x04, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_jr16_op = 0x0c, - mm_jrc_op = 0x0d, - mm_jalr16_op = 0x0e, - mm_jalrs16_op = 0x0f, + mm_swm16_op = 0x05, + mm_jr16_op = 0x0c, + mm_jrc_op = 0x0d, + mm_jalr16_op = 0x0e, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_jraddiusp_op = 0x18, + mm_jalrs16_op = 0x0f, + mm_jraddiusp_op = 0x18, }; enum mm_16d_minor_op { - mm_addius5_func, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - mm_addiusp_func, + mm_addius5_func, + mm_addiusp_func, }; enum MIPS16e_ops { - MIPS16e_jal_op = 003, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_ld_op = 007, - MIPS16e_i8_op = 014, - MIPS16e_sd_op = 017, - MIPS16e_lb_op = 020, + MIPS16e_jal_op = 003, + MIPS16e_ld_op = 007, + MIPS16e_i8_op = 014, + MIPS16e_sd_op = 017, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_lh_op = 021, - MIPS16e_lwsp_op = 022, - MIPS16e_lw_op = 023, - MIPS16e_lbu_op = 024, + MIPS16e_lb_op = 020, + MIPS16e_lh_op = 021, + MIPS16e_lwsp_op = 022, + MIPS16e_lw_op = 023, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_lhu_op = 025, - MIPS16e_lwpc_op = 026, - MIPS16e_lwu_op = 027, - MIPS16e_sb_op = 030, + MIPS16e_lbu_op = 024, + MIPS16e_lhu_op = 025, + MIPS16e_lwpc_op = 026, + MIPS16e_lwu_op = 027, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_sh_op = 031, - MIPS16e_swsp_op = 032, - MIPS16e_sw_op = 033, - MIPS16e_rr_op = 035, + MIPS16e_sb_op = 030, + MIPS16e_sh_op = 031, + MIPS16e_swsp_op = 032, + MIPS16e_sw_op = 033, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_extend_op = 036, - MIPS16e_i64_op = 037, + MIPS16e_rr_op = 035, + MIPS16e_extend_op = 036, + MIPS16e_i64_op = 037, }; -enum MIPS16e_i64_func { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_ldsp_func, - MIPS16e_sdsp_func, - MIPS16e_sdrasp_func, - MIPS16e_dadjsp_func, +enum MIPS16e_i64_func { + MIPS16e_ldsp_func, + MIPS16e_sdsp_func, + MIPS16e_sdrasp_func, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - MIPS16e_ldpc_func, + MIPS16e_dadjsp_func, + MIPS16e_ldpc_func, }; enum MIPS16e_rr_func { - MIPS16e_jr_func, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + MIPS16e_jr_func, }; enum MIPS6e_i8_func { - MIPS16e_swrasp_func = 02, -}; + MIPS16e_swrasp_func = 02, /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +}; #define MM_NOP16 0x0c00 struct j_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int target : 26, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int target : 26,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;)) + )) }; struct i_format { - __BITFIELD_FIELD(unsigned int opcode : 6, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rs : 5, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(signed int simmediate : 16, - ;)))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + )))) }; struct u_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rs : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int uimmediate : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int uimmediate : 16, - ;)))) + )))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct c_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rs : 5, - __BITFIELD_FIELD(unsigned int c_op : 3, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int c_op : 3, __BITFIELD_FIELD(unsigned int cache : 2, __BITFIELD_FIELD(unsigned int simmediate : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int cache : 2, - __BITFIELD_FIELD(unsigned int simmediate : 16, - ;))))) + ))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct r_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rs : 5, - __BITFIELD_FIELD(unsigned int rt : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rd : 5, - __BITFIELD_FIELD(unsigned int re : 5, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + )))))) }; struct p_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int rd : 5, - __BITFIELD_FIELD(unsigned int re : 5, - __BITFIELD_FIELD(unsigned int func : 6, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;)))))) + )))))) }; struct f_format { - __BITFIELD_FIELD(unsigned int opcode : 6, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int : 1, __BITFIELD_FIELD(unsigned int fmt : 4, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int : 1, - __BITFIELD_FIELD(unsigned int fmt : 4, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int rd : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int re : 5, - __BITFIELD_FIELD(unsigned int func : 6, - ;))))))) + ))))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct ma_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int fr : 5, - __BITFIELD_FIELD(unsigned int ft : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fs : 5, - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int func : 4, - __BITFIELD_FIELD(unsigned int fmt : 2, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int fmt : 2,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;))))))) + ))))))) }; struct b_format { - __BITFIELD_FIELD(unsigned int opcode : 6, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int code : 20, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int code : 20, - __BITFIELD_FIELD(unsigned int func : 6, - ;))) + ))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct ps_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rs : 5, - __BITFIELD_FIELD(unsigned int ft : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fs : 5, - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + )))))) }; struct v_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int sel : 4, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fmt : 1, - __BITFIELD_FIELD(unsigned int vt : 5, - __BITFIELD_FIELD(unsigned int vs : 5, - __BITFIELD_FIELD(unsigned int vd : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int sel : 4, __BITFIELD_FIELD(unsigned int fmt : 1, __BITFIELD_FIELD(unsigned int vt : 5, __BITFIELD_FIELD(unsigned int vs : 5, __BITFIELD_FIELD(unsigned int vd : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int func : 6, - ;))))))) + ))))))) }; struct spec3_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 9, __BITFIELD_FIELD(unsigned int func : 7,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode:6, - __BITFIELD_FIELD(unsigned int rs:5, - __BITFIELD_FIELD(unsigned int rt:5, - __BITFIELD_FIELD(signed int simmediate:9, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int func:7, - ;))))) + ))))) }; struct fb_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int bc : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int flag : 2, __BITFIELD_FIELD(signed int simmediate : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int bc : 5, - __BITFIELD_FIELD(unsigned int cc : 3, - __BITFIELD_FIELD(unsigned int flag : 2, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(signed int simmediate : 16, - ;))))) + ))))) }; struct fp0_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fmt : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int fmt : 5, - __BITFIELD_FIELD(unsigned int ft : 5, - __BITFIELD_FIELD(unsigned int fs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + )))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_fp0_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int ft : 5, - __BITFIELD_FIELD(unsigned int fs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int fmt : 3, - __BITFIELD_FIELD(unsigned int op : 2, - __BITFIELD_FIELD(unsigned int func : 6, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 2, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;))))))) + ))))))) }; struct fp1_format { - __BITFIELD_FIELD(unsigned int opcode : 6, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int op : 5, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int fs : 5, - __BITFIELD_FIELD(unsigned int fd : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + )))))) }; struct mm_fp1_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 8, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int fs : 5, - __BITFIELD_FIELD(unsigned int fmt : 2, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int op : 8, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + )))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_fp2_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int fs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int cc : 3, - __BITFIELD_FIELD(unsigned int zero : 2, - __BITFIELD_FIELD(unsigned int fmt : 2, - __BITFIELD_FIELD(unsigned int op : 3, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int zero : 2, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 3, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))))) + )))))))) }; struct mm_fp3_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 7, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int fs : 5, - __BITFIELD_FIELD(unsigned int fmt : 3, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int op : 7, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + )))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_fp4_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(unsigned int fs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int cc : 3, - __BITFIELD_FIELD(unsigned int fmt : 3, - __BITFIELD_FIELD(unsigned int cond : 4, - __BITFIELD_FIELD(unsigned int func : 6, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int cond : 4, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;))))))) + ))))))) }; struct mm_fp5_format { - __BITFIELD_FIELD(unsigned int opcode : 6, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int index : 5, - __BITFIELD_FIELD(unsigned int base : 5, - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int op : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + )))))) }; struct fp6_format { + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int fr : 5, - __BITFIELD_FIELD(unsigned int ft : 5, - __BITFIELD_FIELD(unsigned int fs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + )))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_fp6_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int ft : 5, - __BITFIELD_FIELD(unsigned int fs : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int fd : 5, - __BITFIELD_FIELD(unsigned int fr : 5, - __BITFIELD_FIELD(unsigned int func : 6, - ;)))))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int func : 6,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + )))))) }; struct mm_i_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(signed int simmediate : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rs : 5, - __BITFIELD_FIELD(signed int simmediate : 16, - ;)))) + )))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_m_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rd : 5, - __BITFIELD_FIELD(unsigned int base : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(signed int simmediate : 12,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int func : 4, - __BITFIELD_FIELD(signed int simmediate : 12, - ;))))) + ))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_x_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int index : 5, - __BITFIELD_FIELD(unsigned int base : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int func : 11,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rd : 5, - __BITFIELD_FIELD(unsigned int func : 11, - ;))))) + ))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm_b0_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(signed int simmediate : 10, - __BITFIELD_FIELD(unsigned int : 16, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int simmediate : 10, __BITFIELD_FIELD(unsigned int : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;))) + ))) }; struct mm_b1_format { - __BITFIELD_FIELD(unsigned int opcode : 6, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rs : 3, - __BITFIELD_FIELD(signed int simmediate : 7, - __BITFIELD_FIELD(unsigned int : 16, - ;)))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + )))) }; struct mm16_m_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int func : 4, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rlist : 2, - __BITFIELD_FIELD(unsigned int imm : 4, - __BITFIELD_FIELD(unsigned int : 16, - ;))))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int rlist : 2, __BITFIELD_FIELD(unsigned int imm : 4, __BITFIELD_FIELD(unsigned int : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ))))) }; struct mm16_rb_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 3, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int base : 3, - __BITFIELD_FIELD(signed int simmediate : 4, - __BITFIELD_FIELD(unsigned int : 16, - ;))))) + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(unsigned int base : 3, __BITFIELD_FIELD(signed int simmediate : 4, __BITFIELD_FIELD(unsigned int : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ))))) }; struct mm16_r3_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 3, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(signed int simmediate : 7, - __BITFIELD_FIELD(unsigned int : 16, - ;)))) + )))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct mm16_r5_format { - __BITFIELD_FIELD(unsigned int opcode : 6, - __BITFIELD_FIELD(unsigned int rt : 5, - __BITFIELD_FIELD(signed int simmediate : 5, + __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 5, __BITFIELD_FIELD(unsigned int : 16,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int : 16, - ;)))) + )))) }; struct m16e_rr { + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int nd : 1, __BITFIELD_FIELD(unsigned int l : 1, __BITFIELD_FIELD(unsigned int ra : 1, __BITFIELD_FIELD(unsigned int func : 5,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 5, - __BITFIELD_FIELD(unsigned int rx : 3, - __BITFIELD_FIELD(unsigned int nd : 1, - __BITFIELD_FIELD(unsigned int l : 1, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int ra : 1, - __BITFIELD_FIELD(unsigned int func : 5, - ;)))))) + )))))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct m16e_jal { - __BITFIELD_FIELD(unsigned int opcode : 5, - __BITFIELD_FIELD(unsigned int x : 1, - __BITFIELD_FIELD(unsigned int imm20_16 : 5, + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int x : 1, __BITFIELD_FIELD(unsigned int imm20_16 : 5, __BITFIELD_FIELD(signed int imm25_21 : 5,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(signed int imm25_21 : 5, - ;)))) + )))) }; struct m16e_i64 { + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int opcode : 5, - __BITFIELD_FIELD(unsigned int func : 3, - __BITFIELD_FIELD(unsigned int imm : 8, - ;))) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ))) }; struct m16e_ri64 { - __BITFIELD_FIELD(unsigned int opcode : 5, - __BITFIELD_FIELD(unsigned int func : 3, + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int ry : 3, - __BITFIELD_FIELD(unsigned int imm : 5, - ;)))) + )))) }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct m16e_ri { - __BITFIELD_FIELD(unsigned int opcode : 5, - __BITFIELD_FIELD(unsigned int rx : 3, - __BITFIELD_FIELD(unsigned int imm : 8, + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int imm : 8,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ;))) + ))) }; struct m16e_rri { - __BITFIELD_FIELD(unsigned int opcode : 5, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int rx : 3, - __BITFIELD_FIELD(unsigned int ry : 3, - __BITFIELD_FIELD(unsigned int imm : 5, - ;)))) + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + )))) }; struct m16e_i8 { - __BITFIELD_FIELD(unsigned int opcode : 5, - __BITFIELD_FIELD(unsigned int func : 3, + __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __BITFIELD_FIELD(unsigned int imm : 8, - ;))) + ))) }; union mips_instruction { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int word; - unsigned short halfword[2]; - unsigned char byte[4]; - struct j_format j_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct i_format i_format; - struct u_format u_format; - struct c_format c_format; - struct r_format r_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct p_format p_format; - struct f_format f_format; - struct ma_format ma_format; - struct b_format b_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct ps_format ps_format; - struct v_format v_format; - struct spec3_format spec3_format; - struct fb_format fb_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct fp0_format fp0_format; - struct mm_fp0_format mm_fp0_format; - struct fp1_format fp1_format; - struct mm_fp1_format mm_fp1_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct mm_fp2_format mm_fp2_format; - struct mm_fp3_format mm_fp3_format; - struct mm_fp4_format mm_fp4_format; - struct mm_fp5_format mm_fp5_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct fp6_format fp6_format; - struct mm_fp6_format mm_fp6_format; - struct mm_i_format mm_i_format; - struct mm_m_format mm_m_format; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct mm_x_format mm_x_format; - struct mm_b0_format mm_b0_format; - struct mm_b1_format mm_b1_format; - struct mm16_m_format mm16_m_format ; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct mm16_rb_format mm16_rb_format; - struct mm16_r3_format mm16_r3_format; - struct mm16_r5_format mm16_r5_format; + unsigned int word; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned short halfword[2]; + unsigned char byte[4]; + struct j_format j_format; + struct i_format i_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct u_format u_format; + struct c_format c_format; + struct r_format r_format; + struct p_format p_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct f_format f_format; + struct ma_format ma_format; + struct b_format b_format; + struct ps_format ps_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct v_format v_format; + struct spec3_format spec3_format; + struct fb_format fb_format; + struct fp0_format fp0_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct mm_fp0_format mm_fp0_format; + struct fp1_format fp1_format; + struct mm_fp1_format mm_fp1_format; + struct mm_fp2_format mm_fp2_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct mm_fp3_format mm_fp3_format; + struct mm_fp4_format mm_fp4_format; + struct mm_fp5_format mm_fp5_format; + struct fp6_format fp6_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct mm_fp6_format mm_fp6_format; + struct mm_i_format mm_i_format; + struct mm_m_format mm_m_format; + struct mm_x_format mm_x_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct mm_b0_format mm_b0_format; + struct mm_b1_format mm_b1_format; + struct mm16_m_format mm16_m_format; + struct mm16_rb_format mm16_rb_format; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct mm16_r3_format mm16_r3_format; + struct mm16_r5_format mm16_r5_format; }; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ union mips16e_instruction { - unsigned int full : 16; - struct m16e_rr rr; - struct m16e_jal jal; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct m16e_i64 i64; - struct m16e_ri64 ri64; - struct m16e_ri ri; - struct m16e_rri rri; + unsigned int full : 16; + struct m16e_rr rr; + struct m16e_jal jal; + struct m16e_i64 i64; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct m16e_ri64 ri64; + struct m16e_ri ri; + struct m16e_rri rri; + struct m16e_i8 i8; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct m16e_i8 i8; }; #endif diff --git a/libc/kernel/uapi/asm-mips/asm/kvm.h b/libc/kernel/uapi/asm-mips/asm/kvm.h index 908ab9df2..0206d16b9 100644 --- a/libc/kernel/uapi/asm-mips/asm/kvm.h +++ b/libc/kernel/uapi/asm-mips/asm/kvm.h @@ -21,22 +21,22 @@ #include struct kvm_regs { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 gpr[32]; - __u64 hi; - __u64 lo; - __u64 pc; + __u64 gpr[32]; + __u64 hi; + __u64 lo; + __u64 pc; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; struct kvm_fpu { - __u64 fpr[32]; - __u32 fir; + __u64 fpr[32]; + __u32 fir; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 fccr; - __u32 fexr; - __u32 fenr; - __u32 fcsr; + __u32 fccr; + __u32 fexr; + __u32 fenr; + __u32 fcsr; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 pad; + __u32 pad; }; #define KVM_REG_MIPS_R0 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0) #define KVM_REG_MIPS_R1 (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 1) @@ -82,13 +82,13 @@ struct kvm_fpu { #define KVM_REG_MIPS_LO (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 33) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define KVM_REG_MIPS_PC (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 34) -#define KVM_REG_MIPS_COUNT_CTL (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x20000 | 0) +#define KVM_REG_MIPS_COUNT_CTL (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x20000 | 0) #define KVM_REG_MIPS_COUNT_CTL_DC 0x00000001 -#define KVM_REG_MIPS_COUNT_RESUME (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x20000 | 1) +#define KVM_REG_MIPS_COUNT_RESUME (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x20000 | 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define KVM_REG_MIPS_COUNT_HZ (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x20000 | 2) +#define KVM_REG_MIPS_COUNT_HZ (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x20000 | 2) struct kvm_debug_exit_arch { - __u64 epc; + __u64 epc; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct kvm_guest_debug_arch { @@ -99,8 +99,8 @@ struct kvm_sync_regs { struct kvm_sregs { }; struct kvm_mips_interrupt { - __u32 cpu; + __u32 cpu; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 irq; + __u32 irq; }; #endif diff --git a/libc/kernel/uapi/asm-mips/asm/msgbuf.h b/libc/kernel/uapi/asm-mips/asm/msgbuf.h index efae148c4..3e700b37b 100644 --- a/libc/kernel/uapi/asm-mips/asm/msgbuf.h +++ b/libc/kernel/uapi/asm-mips/asm/msgbuf.h @@ -19,31 +19,31 @@ #ifndef _ASM_MSGBUF_H #define _ASM_MSGBUF_H struct msqid64_ds { - struct ipc64_perm msg_perm; + struct ipc64_perm msg_perm; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_time_t msg_stime; + __kernel_time_t msg_stime; #ifndef __mips64 - unsigned long __unused1; + unsigned long __unused1; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_time_t msg_rtime; + __kernel_time_t msg_rtime; #ifndef __mips64 - unsigned long __unused2; + unsigned long __unused2; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_time_t msg_ctime; + __kernel_time_t msg_ctime; #ifndef __mips64 - unsigned long __unused3; + unsigned long __unused3; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long msg_cbytes; - unsigned long msg_qnum; - unsigned long msg_qbytes; - __kernel_pid_t msg_lspid; + unsigned long msg_cbytes; + unsigned long msg_qnum; + unsigned long msg_qbytes; + __kernel_pid_t msg_lspid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_pid_t msg_lrpid; - unsigned long __unused4; - unsigned long __unused5; + __kernel_pid_t msg_lrpid; + unsigned long __unused4; + unsigned long __unused5; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif diff --git a/libc/kernel/uapi/asm-mips/asm/posix_types.h b/libc/kernel/uapi/asm-mips/asm/posix_types.h index e85821cff..25a9e3ccc 100644 --- a/libc/kernel/uapi/asm-mips/asm/posix_types.h +++ b/libc/kernel/uapi/asm-mips/asm/posix_types.h @@ -24,7 +24,7 @@ typedef long __kernel_daddr_t; #define __kernel_daddr_t __kernel_daddr_t #if _MIPS_SZLONG == 32 typedef struct { - long val[2]; + long val[2]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ } __kernel_fsid_t; #define __kernel_fsid_t __kernel_fsid_t diff --git a/libc/kernel/uapi/asm-mips/asm/ptrace.h b/libc/kernel/uapi/asm-mips/asm/ptrace.h index 1f533e4f0..48010e52b 100644 --- a/libc/kernel/uapi/asm-mips/asm/ptrace.h +++ b/libc/kernel/uapi/asm-mips/asm/ptrace.h @@ -34,16 +34,16 @@ #define DSP_CONTROL 77 #define ACX 78 struct pt_regs { - __u64 regs[32]; + __u64 regs[32]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 lo; - __u64 hi; - __u64 cp0_epc; - __u64 cp0_badvaddr; + __u64 lo; + __u64 hi; + __u64 cp0_epc; + __u64 cp0_badvaddr; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 cp0_status; - __u64 cp0_cause; -} __attribute__ ((aligned (8))); + __u64 cp0_status; + __u64 cp0_cause; +} __attribute__((aligned(8))); #define PTRACE_GETREGS 12 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define PTRACE_SETREGS 13 @@ -61,32 +61,32 @@ struct pt_regs { #define PTRACE_GET_THREAD_AREA_3264 0xc4 enum pt_watch_style { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - pt_watch_style_mips32, - pt_watch_style_mips64 + pt_watch_style_mips32, + pt_watch_style_mips64 }; struct mips32_watch_regs { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int watchlo[8]; - unsigned short watchhi[8]; - unsigned short watch_masks[8]; - unsigned int num_valid; + unsigned int watchlo[8]; + unsigned short watchhi[8]; + unsigned short watch_masks[8]; + unsigned int num_valid; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ } __attribute__((aligned(8))); struct mips64_watch_regs { - unsigned long long watchlo[8]; - unsigned short watchhi[8]; + unsigned long long watchlo[8]; + unsigned short watchhi[8]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short watch_masks[8]; - unsigned int num_valid; + unsigned short watch_masks[8]; + unsigned int num_valid; } __attribute__((aligned(8))); struct pt_watch_regs { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - enum pt_watch_style style; - union { - struct mips32_watch_regs mips32; - struct mips64_watch_regs mips64; + enum pt_watch_style style; + union { + struct mips32_watch_regs mips32; + struct mips64_watch_regs mips64; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - }; + }; }; #define PTRACE_GET_WATCH_REGS 0xd0 #define PTRACE_SET_WATCH_REGS 0xd1 diff --git a/libc/kernel/uapi/asm-mips/asm/reg.h b/libc/kernel/uapi/asm-mips/asm/reg.h index 35c89f759..c0f003ebb 100644 --- a/libc/kernel/uapi/asm-mips/asm/reg.h +++ b/libc/kernel/uapi/asm-mips/asm/reg.h @@ -168,7 +168,7 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define EF_UNUSED0 MIPS32_EF_UNUSED0 #define EF_SIZE MIPS32_EF_SIZE -#elif _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 +#elif _MIPS_SIM==_MIPS_SIM_ABI64||_MIPS_SIM==_MIPS_SIM_NABI32 #define EF_R0 MIPS64_EF_R0 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define EF_R1 MIPS64_EF_R1 diff --git a/libc/kernel/uapi/asm-mips/asm/sembuf.h b/libc/kernel/uapi/asm-mips/asm/sembuf.h index b524f686e..0a8d4d92d 100644 --- a/libc/kernel/uapi/asm-mips/asm/sembuf.h +++ b/libc/kernel/uapi/asm-mips/asm/sembuf.h @@ -19,13 +19,13 @@ #ifndef _ASM_SEMBUF_H #define _ASM_SEMBUF_H struct semid64_ds { - struct ipc64_perm sem_perm; + struct ipc64_perm sem_perm; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_time_t sem_otime; - __kernel_time_t sem_ctime; - unsigned long sem_nsems; - unsigned long __unused1; + __kernel_time_t sem_otime; + __kernel_time_t sem_ctime; + unsigned long sem_nsems; + unsigned long __unused1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __unused2; + unsigned long __unused2; }; #endif diff --git a/libc/kernel/uapi/asm-mips/asm/sgidefs.h b/libc/kernel/uapi/asm-mips/asm/sgidefs.h index d63f15e33..e8b5f6f31 100644 --- a/libc/kernel/uapi/asm-mips/asm/sgidefs.h +++ b/libc/kernel/uapi/asm-mips/asm/sgidefs.h @@ -19,7 +19,7 @@ #ifndef __ASM_SGIDEFS_H #define __ASM_SGIDEFS_H #ifndef __linux__ -#error Use a Linux compiler or give up. +#error Use a Linux compiler or give up . /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #define _MIPS_ISA_MIPS1 1 diff --git a/libc/kernel/uapi/asm-mips/asm/shmbuf.h b/libc/kernel/uapi/asm-mips/asm/shmbuf.h index 3f7d0b1f0..8d41650d6 100644 --- a/libc/kernel/uapi/asm-mips/asm/shmbuf.h +++ b/libc/kernel/uapi/asm-mips/asm/shmbuf.h @@ -19,32 +19,32 @@ #ifndef _ASM_SHMBUF_H #define _ASM_SHMBUF_H struct shmid64_ds { - struct ipc64_perm shm_perm; + struct ipc64_perm shm_perm; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - size_t shm_segsz; - __kernel_time_t shm_atime; - __kernel_time_t shm_dtime; - __kernel_time_t shm_ctime; + size_t shm_segsz; + __kernel_time_t shm_atime; + __kernel_time_t shm_dtime; + __kernel_time_t shm_ctime; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_pid_t shm_cpid; - __kernel_pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __unused1; + __kernel_pid_t shm_cpid; + __kernel_pid_t shm_lpid; + unsigned long shm_nattch; + unsigned long __unused1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __unused2; + unsigned long __unused2; }; struct shminfo64 { - unsigned long shmmax; + unsigned long shmmax; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long shmmin; - unsigned long shmmni; - unsigned long shmseg; - unsigned long shmall; + unsigned long shmmin; + unsigned long shmmni; + unsigned long shmseg; + unsigned long shmall; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long __unused1; - unsigned long __unused2; - unsigned long __unused3; - unsigned long __unused4; + unsigned long __unused1; + unsigned long __unused2; + unsigned long __unused3; + unsigned long __unused4; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-mips/asm/sigcontext.h b/libc/kernel/uapi/asm-mips/asm/sigcontext.h index 8a877db5b..59870bc06 100644 --- a/libc/kernel/uapi/asm-mips/asm/sigcontext.h +++ b/libc/kernel/uapi/asm-mips/asm/sigcontext.h @@ -23,28 +23,28 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #if _MIPS_SIM == _MIPS_SIM_ABI32 struct sigcontext { - unsigned int sc_regmask; - unsigned int sc_status; + unsigned int sc_regmask; + unsigned int sc_status; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long long sc_pc; - unsigned long long sc_regs[32]; - unsigned long long sc_fpregs[32]; - unsigned int sc_acx; + unsigned long long sc_pc; + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned int sc_acx; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int sc_fpc_csr; - unsigned int sc_fpc_eir; - unsigned int sc_used_math; - unsigned int sc_dsp; + unsigned int sc_fpc_csr; + unsigned int sc_fpc_eir; + unsigned int sc_used_math; + unsigned int sc_dsp; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long long sc_mdhi; - unsigned long long sc_mdlo; - unsigned long sc_hi1; - unsigned long sc_lo1; + unsigned long long sc_mdhi; + unsigned long long sc_mdlo; + unsigned long sc_hi1; + unsigned long sc_lo1; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long sc_hi2; - unsigned long sc_lo2; - unsigned long sc_hi3; - unsigned long sc_lo3; + unsigned long sc_hi2; + unsigned long sc_lo2; + unsigned long sc_hi3; + unsigned long sc_lo3; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif @@ -52,24 +52,24 @@ struct sigcontext { #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct sigcontext { - __u64 sc_regs[32]; - __u64 sc_fpregs[32]; - __u64 sc_mdhi; + __u64 sc_regs[32]; + __u64 sc_fpregs[32]; + __u64 sc_mdhi; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 sc_hi1; - __u64 sc_hi2; - __u64 sc_hi3; - __u64 sc_mdlo; + __u64 sc_hi1; + __u64 sc_hi2; + __u64 sc_hi3; + __u64 sc_mdlo; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 sc_lo1; - __u64 sc_lo2; - __u64 sc_lo3; - __u64 sc_pc; + __u64 sc_lo1; + __u64 sc_lo2; + __u64 sc_lo3; + __u64 sc_pc; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 sc_fpc_csr; - __u32 sc_used_math; - __u32 sc_dsp; - __u32 sc_reserved; + __u32 sc_fpc_csr; + __u32 sc_used_math; + __u32 sc_dsp; + __u32 sc_reserved; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; #endif diff --git a/libc/kernel/uapi/asm-mips/asm/siginfo.h b/libc/kernel/uapi/asm-mips/asm/siginfo.h index 599c875de..2f95d1765 100644 --- a/libc/kernel/uapi/asm-mips/asm/siginfo.h +++ b/libc/kernel/uapi/asm-mips/asm/siginfo.h @@ -18,7 +18,7 @@ ****************************************************************************/ #ifndef _UAPI_ASM_SIGINFO_H #define _UAPI_ASM_SIGINFO_H -#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int)) +#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2 * sizeof(int)) #undef __ARCH_SI_TRAPNO /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define HAVE_ARCH_SIGINFO_T @@ -27,7 +27,7 @@ struct siginfo; #if _MIPS_SZLONG == 32 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) -#elif _MIPS_SZLONG == 64 +#elif _MIPS_SZLONG==64 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) #else /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ @@ -37,78 +37,78 @@ struct siginfo; #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ typedef struct siginfo { - int si_signo; - int si_code; - int si_errno; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3]; - union { - int _pad[SI_PAD_SIZE]; - struct { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - pid_t _pid; - __ARCH_SI_UID_T _uid; - } _kill; - struct { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - timer_t _tid; - int _overrun; - char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; - sigval_t _sigval; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - int _sys_private; - } _timer; - struct { - pid_t _pid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __ARCH_SI_UID_T _uid; - sigval_t _sigval; - } _rt; - struct { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - pid_t _pid; - __ARCH_SI_UID_T _uid; - int _status; - clock_t _utime; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - clock_t _stime; - } _sigchld; - struct { - pid_t _pid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - clock_t _utime; - int _status; - clock_t _stime; - } _irix_sigchld; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - struct { - void __user *_addr; + int si_signo; + int si_code; + int si_errno; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3]; + union { + int _pad[SI_PAD_SIZE]; + struct { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + pid_t _pid; + __ARCH_SI_UID_T _uid; + } _kill; + struct { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + timer_t _tid; + int _overrun; + char _pad[sizeof(__ARCH_SI_UID_T) - sizeof(int)]; + sigval_t _sigval; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + int _sys_private; + } _timer; + struct { + pid_t _pid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __ARCH_SI_UID_T _uid; + sigval_t _sigval; + } _rt; + struct { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + pid_t _pid; + __ARCH_SI_UID_T _uid; + int _status; + clock_t _utime; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + clock_t _stime; + } _sigchld; + struct { + pid_t _pid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + clock_t _utime; + int _status; + clock_t _stime; + } _irix_sigchld; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct { + void __user * _addr; #ifdef __ARCH_SI_TRAPNO - int _trapno; + int _trapno; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif - short _addr_lsb; - } _sigfault; - struct { + short _addr_lsb; + } _sigfault; + struct { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __ARCH_SI_BAND_T _band; - int _fd; - } _sigpoll; - struct { + __ARCH_SI_BAND_T _band; + int _fd; + } _sigpoll; + struct { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - void __user *_call_addr; - int _syscall; - unsigned int _arch; - } _sigsys; + void __user * _call_addr; + int _syscall; + unsigned int _arch; + } _sigsys; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - } _sifields; + } _sifields; } siginfo_t; #undef SI_ASYNCIO #undef SI_TIMER /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #undef SI_MESGQ -#define SI_ASYNCIO -2 -#define SI_TIMER __SI_CODE(__SI_TIMER, -3) -#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) +#define SI_ASYNCIO - 2 +#define SI_TIMER __SI_CODE(__SI_TIMER, - 3) +#define SI_MESGQ __SI_CODE(__SI_MESGQ, - 4) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif diff --git a/libc/kernel/uapi/asm-mips/asm/signal.h b/libc/kernel/uapi/asm-mips/asm/signal.h index b774a66f3..ba88b7070 100644 --- a/libc/kernel/uapi/asm-mips/asm/signal.h +++ b/libc/kernel/uapi/asm-mips/asm/signal.h @@ -24,7 +24,7 @@ #define _NSIG_BPW (sizeof(unsigned long) * 8) #define _NSIG_WORDS (_KERNEL__NSIG / _NSIG_BPW) typedef struct { - unsigned long sig[_NSIG_WORDS]; + unsigned long sig[_NSIG_WORDS]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ } sigset_t; typedef unsigned long old_sigset_t; @@ -93,16 +93,16 @@ typedef unsigned long old_sigset_t; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #include struct sigaction { - unsigned int sa_flags; - __sighandler_t sa_handler; + unsigned int sa_flags; + __sighandler_t sa_handler; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - sigset_t sa_mask; + sigset_t sa_mask; }; typedef struct sigaltstack { - void __user *ss_sp; + void __user * ss_sp; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - size_t ss_size; - int ss_flags; + size_t ss_size; + int ss_flags; } stack_t; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-mips/asm/stat.h b/libc/kernel/uapi/asm-mips/asm/stat.h index a71eecb6b..cf05e5ca9 100644 --- a/libc/kernel/uapi/asm-mips/asm/stat.h +++ b/libc/kernel/uapi/asm-mips/asm/stat.h @@ -23,86 +23,86 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32 struct stat { - unsigned st_dev; - long st_pad1[3]; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - ino_t st_ino; - mode_t st_mode; - __u32 st_nlink; - uid_t st_uid; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - gid_t st_gid; - unsigned st_rdev; - long st_pad2[2]; - __kernel_off_t st_size; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long st_pad3; - time_t st_atime; - long st_atime_nsec; - time_t st_mtime; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long st_mtime_nsec; - time_t st_ctime; - long st_ctime_nsec; - long st_blksize; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long st_blocks; - long st_pad4[14]; + unsigned st_dev; + long st_pad1[3]; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ino_t st_ino; + mode_t st_mode; + __u32 st_nlink; + uid_t st_uid; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + gid_t st_gid; + unsigned st_rdev; + long st_pad2[2]; + __kernel_off_t st_size; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + long st_pad3; + time_t st_atime; + long st_atime_nsec; + time_t st_mtime; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + long st_mtime_nsec; + time_t st_ctime; + long st_ctime_nsec; + long st_blksize; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + long st_blocks; + long st_pad4[14]; }; struct stat64 { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_dev; - unsigned long st_pad0[3]; - unsigned long long st_ino; - mode_t st_mode; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 st_nlink; - uid_t st_uid; - gid_t st_gid; - unsigned long st_rdev; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_pad1[3]; - long long st_size; - time_t st_atime; - unsigned long st_atime_nsec; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - time_t st_mtime; - unsigned long st_mtime_nsec; - time_t st_ctime; - unsigned long st_ctime_nsec; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned long st_blksize; - unsigned long st_pad2; - long long st_blocks; + unsigned long st_dev; + unsigned long st_pad0[3]; + unsigned long long st_ino; + mode_t st_mode; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u32 st_nlink; + uid_t st_uid; + gid_t st_gid; + unsigned long st_rdev; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned long st_pad1[3]; + long long st_size; + time_t st_atime; + unsigned long st_atime_nsec; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + time_t st_mtime; + unsigned long st_mtime_nsec; + time_t st_ctime; + unsigned long st_ctime_nsec; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned long st_blksize; + unsigned long st_pad2; + long long st_blocks; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif #if _MIPS_SIM == _MIPS_SIM_ABI64 struct stat { - unsigned int st_dev; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int st_pad0[3]; - unsigned long st_ino; - mode_t st_mode; - __u32 st_nlink; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - uid_t st_uid; - gid_t st_gid; - unsigned int st_rdev; - unsigned int st_pad1[3]; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __kernel_off_t st_size; - unsigned int st_atime; - unsigned int st_atime_nsec; - unsigned int st_mtime; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int st_mtime_nsec; - unsigned int st_ctime; - unsigned int st_ctime_nsec; - unsigned int st_blksize; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int st_pad2; - unsigned long st_blocks; + unsigned int st_dev; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned int st_pad0[3]; + unsigned long st_ino; + mode_t st_mode; + __u32 st_nlink; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + uid_t st_uid; + gid_t st_gid; + unsigned int st_rdev; + unsigned int st_pad1[3]; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __kernel_off_t st_size; + unsigned int st_atime; + unsigned int st_atime_nsec; + unsigned int st_mtime; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned int st_mtime_nsec; + unsigned int st_ctime; + unsigned int st_ctime_nsec; + unsigned int st_blksize; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned int st_pad2; + unsigned long st_blocks; }; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-mips/asm/statfs.h b/libc/kernel/uapi/asm-mips/asm/statfs.h index 390b75176..36cc3d5ff 100644 --- a/libc/kernel/uapi/asm-mips/asm/statfs.h +++ b/libc/kernel/uapi/asm-mips/asm/statfs.h @@ -22,81 +22,81 @@ #include /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct statfs { - long f_type; + long f_type; #define f_fstyp f_type - long f_bsize; + long f_bsize; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long f_frsize; - long f_blocks; - long f_bfree; - long f_files; + long f_frsize; + long f_blocks; + long f_bfree; + long f_files; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long f_ffree; - long f_bavail; - __kernel_fsid_t f_fsid; - long f_namelen; + long f_ffree; + long f_bavail; + __kernel_fsid_t f_fsid; + long f_namelen; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long f_flags; - long f_spare[5]; + long f_flags; + long f_spare[5]; }; #if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct statfs64 { - __u32 f_type; - __u32 f_bsize; - __u32 f_frsize; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 __pad; - __u64 f_blocks; - __u64 f_bfree; - __u64 f_files; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 f_ffree; - __u64 f_bavail; - __kernel_fsid_t f_fsid; - __u32 f_namelen; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 f_flags; - __u32 f_spare[5]; + __u32 f_type; + __u32 f_bsize; + __u32 f_frsize; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u32 __pad; + __u64 f_blocks; + __u64 f_bfree; + __u64 f_files; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u64 f_ffree; + __u64 f_bavail; + __kernel_fsid_t f_fsid; + __u32 f_namelen; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + __u32 f_flags; + __u32 f_spare[5]; }; #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #if _MIPS_SIM == _MIPS_SIM_ABI64 struct statfs64 { - long f_type; - long f_bsize; + long f_type; + long f_bsize; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long f_frsize; - long f_blocks; - long f_bfree; - long f_files; + long f_frsize; + long f_blocks; + long f_bfree; + long f_files; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long f_ffree; - long f_bavail; - __kernel_fsid_t f_fsid; - long f_namelen; + long f_ffree; + long f_bavail; + __kernel_fsid_t f_fsid; + long f_namelen; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - long f_flags; - long f_spare[5]; + long f_flags; + long f_spare[5]; }; struct compat_statfs64 { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 f_type; - __u32 f_bsize; - __u32 f_frsize; - __u32 __pad; + __u32 f_type; + __u32 f_bsize; + __u32 f_frsize; + __u32 __pad; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 f_blocks; - __u64 f_bfree; - __u64 f_files; - __u64 f_ffree; + __u64 f_blocks; + __u64 f_bfree; + __u64 f_files; + __u64 f_ffree; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u64 f_bavail; - __kernel_fsid_t f_fsid; - __u32 f_namelen; - __u32 f_flags; + __u64 f_bavail; + __kernel_fsid_t f_fsid; + __u32 f_namelen; + __u32 f_flags; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 f_spare[5]; + __u32 f_spare[5]; }; #endif #endif diff --git a/libc/kernel/uapi/asm-mips/asm/termbits.h b/libc/kernel/uapi/asm-mips/asm/termbits.h index 56cab21db..f8f861275 100644 --- a/libc/kernel/uapi/asm-mips/asm/termbits.h +++ b/libc/kernel/uapi/asm-mips/asm/termbits.h @@ -26,38 +26,38 @@ typedef unsigned int tcflag_t; #define NCCS 23 struct termios { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - cc_t c_line; - cc_t c_cc[NCCS]; + cc_t c_line; + cc_t c_cc[NCCS]; }; struct termios2 { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tcflag_t c_iflag; - tcflag_t c_oflag; - tcflag_t c_cflag; - tcflag_t c_lflag; + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - cc_t c_line; - cc_t c_cc[NCCS]; - speed_t c_ispeed; - speed_t c_ospeed; + cc_t c_line; + cc_t c_cc[NCCS]; + speed_t c_ispeed; + speed_t c_ospeed; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ }; struct ktermios { - tcflag_t c_iflag; - tcflag_t c_oflag; + tcflag_t c_iflag; + tcflag_t c_oflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - tcflag_t c_cflag; - tcflag_t c_lflag; - cc_t c_line; - cc_t c_cc[NCCS]; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_line; + cc_t c_cc[NCCS]; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - speed_t c_ispeed; - speed_t c_ospeed; + speed_t c_ispeed; + speed_t c_ospeed; }; #define VINTR 0 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-mips/asm/termios.h b/libc/kernel/uapi/asm-mips/asm/termios.h index 16d822a02..51742540f 100644 --- a/libc/kernel/uapi/asm-mips/asm/termios.h +++ b/libc/kernel/uapi/asm-mips/asm/termios.h @@ -23,51 +23,51 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #include struct sgttyb { - char sg_ispeed; - char sg_ospeed; + char sg_ispeed; + char sg_ospeed; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - char sg_erase; - char sg_kill; - int sg_flags; + char sg_erase; + char sg_kill; + int sg_flags; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct tchars { - char t_intrc; - char t_quitc; - char t_startc; + char t_intrc; + char t_quitc; + char t_startc; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - char t_stopc; - char t_eofc; - char t_brkc; + char t_stopc; + char t_eofc; + char t_brkc; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct ltchars { - char t_suspc; - char t_dsuspc; - char t_rprntc; + char t_suspc; + char t_dsuspc; + char t_rprntc; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - char t_flushc; - char t_werasc; - char t_lnextc; + char t_flushc; + char t_werasc; + char t_lnextc; }; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short ws_ypixel; + unsigned short ws_ypixel; }; #define NCC 8 struct termio { /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned short c_iflag; - unsigned short c_oflag; - unsigned short c_cflag; - unsigned short c_lflag; + unsigned short c_iflag; + unsigned short c_oflag; + unsigned short c_cflag; + unsigned short c_lflag; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - char c_line; - unsigned char c_cc[NCCS]; + char c_line; + unsigned char c_cc[NCCS]; }; #define TIOCM_LE 0x001 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-x86/asm/a.out.h b/libc/kernel/uapi/asm-x86/asm/a.out.h index fa287b536..d1a474032 100644 --- a/libc/kernel/uapi/asm-x86/asm/a.out.h +++ b/libc/kernel/uapi/asm-x86/asm/a.out.h @@ -18,22 +18,21 @@ ****************************************************************************/ #ifndef _ASM_X86_A_OUT_H #define _ASM_X86_A_OUT_H -struct exec -{ +struct exec { + unsigned int a_info; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned int a_info; - unsigned a_text; - unsigned a_data; - unsigned a_bss; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - unsigned a_syms; - unsigned a_entry; - unsigned a_trsize; - unsigned a_drsize; + unsigned a_text; + unsigned a_data; + unsigned a_bss; + unsigned a_syms; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned a_entry; + unsigned a_trsize; + unsigned a_drsize; }; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define N_TRSIZE(a) ((a).a_trsize) #define N_DRSIZE(a) ((a).a_drsize) #define N_SYMSIZE(a) ((a).a_syms) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ diff --git a/libc/kernel/uapi/asm-x86/asm/bootparam.h b/libc/kernel/uapi/asm-x86/asm/bootparam.h index b576825e6..27201d6e9 100644 --- a/libc/kernel/uapi/asm-x86/asm/bootparam.h +++ b/libc/kernel/uapi/asm-x86/asm/bootparam.h @@ -28,17 +28,17 @@ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 -#define LOADED_HIGH (1<<0) -#define QUIET_FLAG (1<<5) +#define LOADED_HIGH (1 << 0) +#define QUIET_FLAG (1 << 5) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define KEEP_SEGMENTS (1<<6) -#define CAN_USE_HEAP (1<<7) -#define XLF_KERNEL_64 (1<<0) -#define XLF_CAN_BE_LOADED_ABOVE_4G (1<<1) +#define KEEP_SEGMENTS (1 << 6) +#define CAN_USE_HEAP (1 << 7) +#define XLF_KERNEL_64 (1 << 0) +#define XLF_CAN_BE_LOADED_ABOVE_4G (1 << 1) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define XLF_EFI_HANDOVER_32 (1<<2) -#define XLF_EFI_HANDOVER_64 (1<<3) -#define XLF_EFI_KEXEC (1<<4) +#define XLF_EFI_HANDOVER_32 (1 << 2) +#define XLF_EFI_HANDOVER_64 (1 << 3) +#define XLF_EFI_KEXEC (1 << 4) #ifndef __ASSEMBLY__ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #include @@ -51,138 +51,138 @@ #include