├── .gitignore
├── AlpVM-Assembler
├── .gitignore
├── AlpVM-Assembler.sln
├── AlpVM-Assembler
│ ├── AlpVM-Assembler.csproj
│ ├── App.config
│ ├── Assembler.cs
│ ├── Common.cs
│ ├── Function.cs
│ ├── Instruction.cs
│ ├── Linker
│ │ ├── CompilationUnit.cs
│ │ └── Linker.cs
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
└── AlpVM-Debugger
│ ├── AlpVM-Debugger.csproj
│ ├── App.config
│ ├── Debugger.cs
│ ├── Form1.Designer.cs
│ ├── Form1.cs
│ ├── Form1.resx
│ ├── Machine.cs
│ ├── MachineState.cs
│ ├── MemoryForm.Designer.cs
│ ├── MemoryForm.cs
│ ├── MemoryForm.resx
│ ├── Program.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ └── Utils.cs
├── AlpVM
├── AlpVM.sln
├── AlpVM.vcxproj
├── AlpVM.vcxproj.filters
├── Debugger.cpp
├── Debugger.h
├── FileHeader.h
├── Globals.h
├── Instruction.h
├── KeyboardDevice.cpp
├── KeyboardDevice.h
├── Memory.cpp
├── Memory.h
├── SDL2-2.0.3
│ ├── BUGS.txt
│ ├── COPYING.txt
│ ├── README-SDL.txt
│ ├── README.txt
│ ├── WhatsNew.txt
│ ├── include
│ │ ├── SDL.h
│ │ ├── SDL_assert.h
│ │ ├── SDL_atomic.h
│ │ ├── SDL_audio.h
│ │ ├── SDL_bits.h
│ │ ├── SDL_blendmode.h
│ │ ├── SDL_clipboard.h
│ │ ├── SDL_config.h
│ │ ├── SDL_cpuinfo.h
│ │ ├── SDL_endian.h
│ │ ├── SDL_error.h
│ │ ├── SDL_events.h
│ │ ├── SDL_filesystem.h
│ │ ├── SDL_gamecontroller.h
│ │ ├── SDL_gesture.h
│ │ ├── SDL_haptic.h
│ │ ├── SDL_hints.h
│ │ ├── SDL_joystick.h
│ │ ├── SDL_keyboard.h
│ │ ├── SDL_keycode.h
│ │ ├── SDL_loadso.h
│ │ ├── SDL_log.h
│ │ ├── SDL_main.h
│ │ ├── SDL_messagebox.h
│ │ ├── SDL_mouse.h
│ │ ├── SDL_mutex.h
│ │ ├── SDL_name.h
│ │ ├── SDL_opengl.h
│ │ ├── SDL_opengles.h
│ │ ├── SDL_opengles2.h
│ │ ├── SDL_pixels.h
│ │ ├── SDL_platform.h
│ │ ├── SDL_power.h
│ │ ├── SDL_quit.h
│ │ ├── SDL_rect.h
│ │ ├── SDL_render.h
│ │ ├── SDL_revision.h
│ │ ├── SDL_rwops.h
│ │ ├── SDL_scancode.h
│ │ ├── SDL_shape.h
│ │ ├── SDL_stdinc.h
│ │ ├── SDL_surface.h
│ │ ├── SDL_system.h
│ │ ├── SDL_syswm.h
│ │ ├── SDL_test.h
│ │ ├── SDL_test_assert.h
│ │ ├── SDL_test_common.h
│ │ ├── SDL_test_compare.h
│ │ ├── SDL_test_crc32.h
│ │ ├── SDL_test_font.h
│ │ ├── SDL_test_fuzzer.h
│ │ ├── SDL_test_harness.h
│ │ ├── SDL_test_images.h
│ │ ├── SDL_test_log.h
│ │ ├── SDL_test_md5.h
│ │ ├── SDL_test_random.h
│ │ ├── SDL_thread.h
│ │ ├── SDL_timer.h
│ │ ├── SDL_touch.h
│ │ ├── SDL_types.h
│ │ ├── SDL_version.h
│ │ ├── SDL_video.h
│ │ ├── begin_code.h
│ │ └── close_code.h
│ └── lib
│ │ ├── x64
│ │ ├── SDL2.dll
│ │ ├── SDL2.lib
│ │ ├── SDL2main.lib
│ │ └── SDL2test.lib
│ │ └── x86
│ │ ├── SDL2.dll
│ │ ├── SDL2.lib
│ │ ├── SDL2main.lib
│ │ └── SDL2test.lib
├── SDL2_net-2.0.1
│ ├── CHANGES.txt
│ ├── COPYING.txt
│ ├── README.txt
│ ├── include
│ │ └── SDL_net.h
│ └── lib
│ │ ├── x64
│ │ ├── SDL2_net.dll
│ │ └── SDL2_net.lib
│ │ └── x86
│ │ ├── SDL2_net.dll
│ │ └── SDL2_net.lib
├── SymbolUsage.cpp
├── SymbolUsage.h
├── SystemTime.cpp
├── SystemTime.h
├── TimerDevice.cpp
├── TimerDevice.h
├── VirtualMachine.cpp
├── VirtualMachine.h
└── main.cpp
├── CPU.md
├── Debugging.png
├── Interrupts.md
├── LICENSE
├── README.md
├── Video.md
├── compilec.bat
├── examples
└── sample.c
└── lcc
├── CPYRIGHT
├── LOG
├── README
├── README.md
├── alpha
└── osf
│ └── tst
│ ├── 8q.1bk
│ ├── 8q.2bk
│ ├── 8q.sbk
│ ├── array.1bk
│ ├── array.2bk
│ ├── array.sbk
│ ├── cf.1bk
│ ├── cf.2bk
│ ├── cf.sbk
│ ├── cq.1bk
│ ├── cq.2bk
│ ├── cq.sbk
│ ├── cvt.1bk
│ ├── cvt.2bk
│ ├── cvt.sbk
│ ├── fields.1bk
│ ├── fields.2bk
│ ├── fields.sbk
│ ├── front.2bk
│ ├── front.sbk
│ ├── incr.1bk
│ ├── incr.2bk
│ ├── incr.sbk
│ ├── init.1bk
│ ├── init.2bk
│ ├── init.sbk
│ ├── limits.1bk
│ ├── limits.2bk
│ ├── limits.sbk
│ ├── paranoia.1bk
│ ├── paranoia.2bk
│ ├── paranoia.sbk
│ ├── sort.1bk
│ ├── sort.2bk
│ ├── sort.sbk
│ ├── spill.1bk
│ ├── spill.2bk
│ ├── spill.sbk
│ ├── stdarg.1bk
│ ├── stdarg.2bk
│ ├── stdarg.sbk
│ ├── struct.1bk
│ ├── struct.2bk
│ ├── struct.sbk
│ ├── switch.1bk
│ ├── switch.2bk
│ ├── switch.sbk
│ ├── wf1.1bk
│ ├── wf1.2bk
│ ├── wf1.sbk
│ ├── yacc.1bk
│ ├── yacc.2bk
│ └── yacc.sbk
├── build.bat
├── cpp
├── cpp.c
├── cpp.h
├── eval.c
├── getopt.c
├── hideset.c
├── include.c
├── lex.c
├── macro.c
├── nlist.c
├── tokens.c
└── unix.c
├── custom.mk
├── doc
├── 4.html
├── bprint.1
├── bprint.pdf
├── install.html
├── lcc.1
└── lcc.pdf
├── etc
├── bprint.c
├── gcc-solaris.c
├── irix.c
├── lcc.c
├── linux.c
├── ops.c
├── osf.c
├── solaris.c
└── win32.c
├── include
├── alpha
│ └── osf
│ │ ├── assert.h
│ │ ├── ctype.h
│ │ ├── errno.h
│ │ ├── float.h
│ │ ├── limits.h
│ │ ├── locale.h
│ │ ├── math.h
│ │ ├── setjmp.h
│ │ ├── signal.h
│ │ ├── stdarg.h
│ │ ├── stddef.h
│ │ ├── stdio.h
│ │ ├── stdlib.h
│ │ ├── string.h
│ │ └── time.h
├── mips
│ └── irix
│ │ ├── assert.h
│ │ ├── ctype.h
│ │ ├── errno.h
│ │ ├── float.h
│ │ ├── limits.h
│ │ ├── locale.h
│ │ ├── math.h
│ │ ├── setjmp.h
│ │ ├── signal.h
│ │ ├── stdarg.h
│ │ ├── stddef.h
│ │ ├── stdio.h
│ │ ├── stdlib.h
│ │ ├── string.h
│ │ └── time.h
├── sparc
│ └── solaris
│ │ ├── assert.h
│ │ ├── ctype.h
│ │ ├── errno.h
│ │ ├── float.h
│ │ ├── limits.h
│ │ ├── locale.h
│ │ ├── math.h
│ │ ├── setjmp.h
│ │ ├── signal.h
│ │ ├── stdarg.h
│ │ ├── stddef.h
│ │ ├── stdio.h
│ │ ├── stdlib.h
│ │ ├── string.h
│ │ └── time.h
└── x86
│ └── linux
│ ├── assert.h
│ ├── float.h
│ └── stdarg.h
├── lburg
├── gram.c
├── gram.y
├── lburg.1
├── lburg.c
└── lburg.h
├── lib
├── assert.c
├── bbexit.c
└── yynull.c
├── makefile
├── makefile.nt
├── mips
└── irix
│ └── tst
│ ├── 8q.1bk
│ ├── 8q.2bk
│ ├── 8q.sbk
│ ├── array.1bk
│ ├── array.2bk
│ ├── array.sbk
│ ├── cf.1bk
│ ├── cf.2bk
│ ├── cf.sbk
│ ├── cq.1bk
│ ├── cq.2bk
│ ├── cq.sbk
│ ├── cvt.1bk
│ ├── cvt.2bk
│ ├── cvt.sbk
│ ├── fields.1bk
│ ├── fields.2bk
│ ├── fields.sbk
│ ├── front.2bk
│ ├── front.sbk
│ ├── incr.2bk
│ ├── incr.sbk
│ ├── init.1bk
│ ├── init.2bk
│ ├── init.sbk
│ ├── limits.1bk
│ ├── limits.2bk
│ ├── limits.sbk
│ ├── paranoia.1bk
│ ├── paranoia.2bk
│ ├── paranoia.sbk
│ ├── sort.1bk
│ ├── sort.2bk
│ ├── sort.sbk
│ ├── spill.2bk
│ ├── spill.sbk
│ ├── stdarg.1bk
│ ├── stdarg.2bk
│ ├── stdarg.sbk
│ ├── struct.1bk
│ ├── struct.2bk
│ ├── struct.sbk
│ ├── switch.1bk
│ ├── switch.2bk
│ ├── switch.sbk
│ ├── wf1.1bk
│ ├── wf1.2bk
│ ├── wf1.sbk
│ ├── yacc.1bk
│ ├── yacc.2bk
│ └── yacc.sbk
├── sparc
└── solaris
│ └── tst
│ ├── 8q.1bk
│ ├── 8q.2bk
│ ├── 8q.sbk
│ ├── array.1bk
│ ├── array.2bk
│ ├── array.sbk
│ ├── cf.1bk
│ ├── cf.2bk
│ ├── cf.sbk
│ ├── cq.1bk
│ ├── cq.2bk
│ ├── cq.sbk
│ ├── cvt.1bk
│ ├── cvt.2bk
│ ├── cvt.sbk
│ ├── fields.1bk
│ ├── fields.2bk
│ ├── fields.sbk
│ ├── front.2bk
│ ├── front.sbk
│ ├── incr.1bk
│ ├── incr.2bk
│ ├── incr.sbk
│ ├── init.1bk
│ ├── init.2bk
│ ├── init.sbk
│ ├── limits.1bk
│ ├── limits.2bk
│ ├── limits.sbk
│ ├── paranoia.1bk
│ ├── paranoia.2bk
│ ├── paranoia.sbk
│ ├── sort.1bk
│ ├── sort.2bk
│ ├── sort.sbk
│ ├── spill.1bk
│ ├── spill.2bk
│ ├── spill.sbk
│ ├── stdarg.1bk
│ ├── stdarg.2bk
│ ├── stdarg.sbk
│ ├── struct.1bk
│ ├── struct.2bk
│ ├── struct.sbk
│ ├── switch.1bk
│ ├── switch.2bk
│ ├── switch.sbk
│ ├── wf1.1bk
│ ├── wf1.2bk
│ ├── wf1.sbk
│ ├── yacc.1bk
│ ├── yacc.2bk
│ └── yacc.sbk
├── src
├── 2html.c
├── alloc.c
├── alpha.md
├── asdl.c
├── bind.c
├── bytecode.c
├── c.h
├── config.h
├── dag.c
├── dagcheck.md
├── decl.c
├── enode.c
├── error.c
├── event.c
├── expr.c
├── gen.c
├── init.c
├── inits.c
├── input.c
├── lex.c
├── list.c
├── main.c
├── mips.md
├── null.c
├── output.c
├── pass2.c
├── prof.c
├── profio.c
├── rcc.asdl
├── run.sh
├── simp.c
├── sparc.md
├── stab.c
├── stab.h
├── stmt.c
├── string.c
├── sym.c
├── symbolic.c
├── token.h
├── trace.c
├── tree.c
├── types.c
├── x86.md
└── x86linux.md
├── tst
├── 8q.0
├── 8q.c
├── array.0
├── array.c
├── cf.0
├── cf.c
├── cq.0
├── cq.c
├── cvt.0
├── cvt.c
├── fields.0
├── fields.c
├── front.0
├── front.c
├── incr.0
├── incr.c
├── init.0
├── init.c
├── limits.0
├── limits.c
├── paranoia.0
├── paranoia.c
├── sort.0
├── sort.c
├── spill.0
├── spill.c
├── stdarg.0
├── stdarg.c
├── struct.0
├── struct.c
├── switch.0
├── switch.c
├── wf1.0
├── wf1.c
├── yacc.0
└── yacc.c
└── x86
├── linux
└── tst
│ ├── 8q.1bk
│ ├── 8q.2bk
│ ├── 8q.sbk
│ ├── array.1bk
│ ├── array.2bk
│ ├── array.sbk
│ ├── cf.1bk
│ ├── cf.2bk
│ ├── cf.sbk
│ ├── cq.1bk
│ ├── cq.2bk
│ ├── cq.sbk
│ ├── cvt.1bk
│ ├── cvt.2bk
│ ├── cvt.sbk
│ ├── fields.1bk
│ ├── fields.2bk
│ ├── fields.sbk
│ ├── front.2bk
│ ├── front.sbk
│ ├── incr.1bk
│ ├── incr.2bk
│ ├── incr.sbk
│ ├── init.1bk
│ ├── init.2bk
│ ├── init.sbk
│ ├── limits.1bk
│ ├── limits.2bk
│ ├── limits.sbk
│ ├── paranoia.1bk
│ ├── paranoia.2bk
│ ├── paranoia.sbk
│ ├── sort.1bk
│ ├── sort.2bk
│ ├── sort.sbk
│ ├── spill.1bk
│ ├── spill.2bk
│ ├── spill.sbk
│ ├── stdarg.1bk
│ ├── stdarg.2bk
│ ├── stdarg.sbk
│ ├── struct.1bk
│ ├── struct.2bk
│ ├── struct.sbk
│ ├── switch.1bk
│ ├── switch.2bk
│ ├── switch.sbk
│ ├── wf1.1bk
│ ├── wf1.2bk
│ ├── wf1.sbk
│ ├── yacc.1bk
│ ├── yacc.2bk
│ └── yacc.sbk
└── win32
└── tst
├── 8q.1bk
├── 8q.2bk
├── 8q.sbk
├── array.1bk
├── array.2bk
├── array.sbk
├── cf.1bk
├── cf.2bk
├── cf.sbk
├── cq.1bk
├── cq.2bk
├── cq.sbk
├── cvt.1bk
├── cvt.2bk
├── cvt.sbk
├── fields.1bk
├── fields.2bk
├── fields.sbk
├── front.2bk
├── front.sbk
├── incr.1bk
├── incr.2bk
├── incr.sbk
├── init.1bk
├── init.2bk
├── init.sbk
├── limits.1bk
├── limits.2bk
├── limits.sbk
├── paranoia.1bk
├── paranoia.2bk
├── paranoia.sbk
├── sort.1bk
├── sort.2bk
├── sort.sbk
├── spill.1bk
├── spill.2bk
├── spill.sbk
├── stdarg.1bk
├── stdarg.2bk
├── stdarg.sbk
├── struct.1bk
├── struct.2bk
├── struct.sbk
├── switch.1bk
├── switch.2bk
├── switch.sbk
├── wf1.1bk
├── wf1.2bk
├── wf1.sbk
├── yacc.1bk
├── yacc.2bk
└── yacc.sbk
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 | *.smod
19 |
20 | # Compiled Static libraries
21 | *.lai
22 | *.la
23 | *.a
24 | *.lib
25 |
26 | # Executables
27 | *.exe
28 | *.out
29 | *.app
30 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Assembler.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.24720.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlpVM-Assembler", "AlpVM-Assembler\AlpVM-Assembler.csproj", "{952A7156-AA9E-42C1-BFD6-5302FC497FBE}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlpVM-Debugger", "AlpVM-Debugger\AlpVM-Debugger.csproj", "{C79753DF-8E40-404D-AED6-28112A6DA322}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {952A7156-AA9E-42C1-BFD6-5302FC497FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {952A7156-AA9E-42C1-BFD6-5302FC497FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {952A7156-AA9E-42C1-BFD6-5302FC497FBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {952A7156-AA9E-42C1-BFD6-5302FC497FBE}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {C79753DF-8E40-404D-AED6-28112A6DA322}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {C79753DF-8E40-404D-AED6-28112A6DA322}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {C79753DF-8E40-404D-AED6-28112A6DA322}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {C79753DF-8E40-404D-AED6-28112A6DA322}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Assembler/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Assembler/Function.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlpVM_Assembler
8 | {
9 | class Function
10 | {
11 | public Function(string name, int address, int localDataSize = 0, int argumentsCallDataSize = 0)
12 | {
13 | Name = name;
14 | Address = address;
15 | LocalDataSize = localDataSize;
16 | ArgumentsCallDataSize = argumentsCallDataSize;
17 | }
18 |
19 | public string Name
20 | {
21 | private set;
22 | get;
23 | }
24 |
25 | public int LocalDataSize
26 | {
27 | private set;
28 | get;
29 | }
30 |
31 | public int ArgumentsCallDataSize
32 | {
33 | private set;
34 | get;
35 | }
36 |
37 | public int Address
38 | {
39 | private set;
40 | get;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Assembler/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AlpVM-Assembler")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AlpVM-Assembler")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("952a7156-aa9e-42c1-bfd6-5302fc497fbe")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/Machine.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace AlpVM_Debugger
8 | {
9 | public class Machine
10 | {
11 | public MachineState MachineState;
12 |
13 | byte[] mMachineMemory;
14 |
15 | public Machine()
16 | {
17 | mMachineMemory = new byte[64 * 1024 * 1024];
18 | }
19 |
20 | public byte[] MachineMemory
21 | {
22 | get
23 | {
24 | return mMachineMemory;
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/MachineState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace AlpVM_Debugger
9 | {
10 | public enum Interrupt
11 | {
12 | I_NoInterrupt = 0,
13 | I_Timer = 1,
14 | I_Keyboard = 2
15 | };
16 |
17 | [StructLayout(LayoutKind.Sequential, Pack =4)]
18 | public struct MachineState
19 | {
20 | public byte mHalted; //bool
21 | public byte mPaused; //bool
22 | public byte mInterruptsEnabled; //bool
23 |
24 | public byte mFlagZero;
25 | public byte mFlagSign;
26 |
27 | public Interrupt mInterrupt;
28 | public UInt32 mInterruptTable0;
29 | public UInt32 mInterruptTable1;
30 | public UInt32 mInterruptTable2;
31 |
32 | //These are registers.
33 | public UInt32 mExecutionPointer;//not accesible directly
34 |
35 | public UInt32 mCounter;
36 |
37 | public UInt32 mBasePointer;
38 | public UInt32 mStackPointer;
39 | public UInt32 mError;
40 | public UInt32 mReturn;
41 | public UInt32 mAlp1;
42 | public UInt32 mAlp2;
43 | public UInt32 mAlp3;
44 | public UInt32 mAlp4;
45 | public UInt32 mAlp5;
46 | public UInt32 mAlp6;
47 | public UInt32 mAlp7;
48 | public UInt32 mAlp8;
49 | };
50 | }
51 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace AlpVM_Debugger
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// The main entry point for the application.
13 | ///
14 | [STAThread]
15 | static void Main(string[] args)
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AlpVM-Debugger")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("AlpVM-Debugger")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e0440f8a-333c-4c46-a4ff-8cf0ebb95665")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace AlpVM_Debugger.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AlpVM-Assembler/AlpVM-Debugger/Utils.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace AlpVM_Debugger
9 | {
10 | public static class Utils
11 | {
12 | public static byte[] StructureToByteArray(object obj)
13 | {
14 | int len = Marshal.SizeOf(obj);
15 |
16 | byte[] arr = new byte[len];
17 |
18 | IntPtr ptr = Marshal.AllocHGlobal(len);
19 |
20 | Marshal.StructureToPtr(obj, ptr, true);
21 |
22 | Marshal.Copy(ptr, arr, 0, len);
23 |
24 | Marshal.FreeHGlobal(ptr);
25 |
26 | return arr;
27 | }
28 |
29 | public static void ByteArrayToStructure(byte[] bytearray, int sourceOffset, ref object obj)
30 | {
31 | int len = Marshal.SizeOf(obj);
32 |
33 | IntPtr i = Marshal.AllocHGlobal(len);
34 |
35 | Marshal.Copy(bytearray, sourceOffset, i, len);
36 |
37 | obj = Marshal.PtrToStructure(i, obj.GetType());
38 |
39 | Marshal.FreeHGlobal(i);
40 | }
41 |
42 | public static void ByteArrayToExistingStructure(byte[] bytearray, int sourceOffset, ref object obj)
43 | {
44 | int len = Marshal.SizeOf(obj);
45 |
46 | IntPtr i = Marshal.AllocHGlobal(len);
47 |
48 | Marshal.Copy(bytearray, sourceOffset, i, len);
49 |
50 | Marshal.PtrToStructure(i, obj);
51 |
52 | Marshal.FreeHGlobal(i);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/AlpVM/AlpVM.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.24720.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AlpVM", "AlpVM.vcxproj", "{340ED565-40BD-4FD8-8893-E53D83B90FFC}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x86 = Debug|x86
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {340ED565-40BD-4FD8-8893-E53D83B90FFC}.Debug|x86.ActiveCfg = Debug|Win32
15 | {340ED565-40BD-4FD8-8893-E53D83B90FFC}.Debug|x86.Build.0 = Debug|Win32
16 | {340ED565-40BD-4FD8-8893-E53D83B90FFC}.Release|x86.ActiveCfg = Release|Win32
17 | {340ED565-40BD-4FD8-8893-E53D83B90FFC}.Release|x86.Build.0 = Release|Win32
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/AlpVM/Debugger.h:
--------------------------------------------------------------------------------
1 | #ifndef DEBUGGER_H
2 | #define DEBUGGER_H
3 |
4 | #include
5 |
6 | class VirtualMachine;
7 |
8 | const int BufferSize = 1024;
9 |
10 | class Debugger
11 | {
12 | public:
13 | struct DebugCommand
14 | {
15 | enum EnCommand
16 | {
17 | NoCommand,
18 | Pause,
19 | Resume,
20 | Step,
21 | SetBreakpoint,
22 | UnsetBreakpoint,
23 | GetBreakpoints,
24 | ClearBreakpoints,
25 | GetMemory
26 | };
27 |
28 | DebugCommand()
29 | {
30 | Command = EnCommand::NoCommand;
31 | Data = 0;
32 | }
33 |
34 | EnCommand Command;
35 | unsigned int Data;
36 | };
37 |
38 | struct VmMessageHeader
39 | {
40 | enum EnMessageType
41 | {
42 | MachineState,
43 | Memory,
44 | Breakpoints
45 | };
46 |
47 | VmMessageHeader()
48 | {
49 | MessageType = MachineState;
50 | MessageSize = 0;
51 | Data = 0;
52 | }
53 |
54 | EnMessageType MessageType;
55 |
56 | unsigned int MessageSize;
57 | unsigned int Data;
58 | };
59 |
60 | Debugger(VirtualMachine* machine);
61 | ~Debugger();
62 |
63 | bool listen(short port);
64 | void close();
65 | inline bool isConnected()
66 | {
67 | return mConnectionSocket != NULL;
68 | }
69 |
70 | void process();
71 |
72 | void sendMachineState();
73 | void sendMemory(unsigned int offset);
74 |
75 | private:
76 | bool tryAccept();
77 | void closeConnection();
78 |
79 | private:
80 | VirtualMachine* mMachine;
81 | char mBuffer[BufferSize];
82 | TCPsocket mListenerSocket;
83 | TCPsocket mConnectionSocket;
84 | SDLNet_SocketSet mSocketSet;
85 |
86 | };
87 | #endif //DEBUGGER_H
88 |
--------------------------------------------------------------------------------
/AlpVM/FileHeader.h:
--------------------------------------------------------------------------------
1 | #ifndef FILEHEADER_H
2 | #define FILEHEADER_H
3 |
4 | #include "Globals.h"
5 |
6 | struct FileHeader
7 | {
8 | UInt32 MagicNumber;
9 | UInt32 FileFormatVersion;
10 | UInt32 FileType;
11 | UInt32 CodeSize;
12 | UInt32 DataSize;
13 | UInt32 LitSize;
14 | UInt32 BssSize;
15 | UInt32 SymbolDefinitionTableSize;
16 | UInt32 SymbolUsageTableSize;
17 | };
18 |
19 | #endif //FILEHEADER_H
--------------------------------------------------------------------------------
/AlpVM/Globals.h:
--------------------------------------------------------------------------------
1 | #ifndef GLOBALS_H
2 | #define GLOBALS_H
3 |
4 | typedef unsigned int UInt32;
5 | typedef int Int32;
6 | typedef unsigned short UInt16;
7 | typedef short Int16;
8 | typedef unsigned char UByte;
9 | typedef char SByte;
10 |
11 | enum ErrorCode
12 | {
13 | Ec_NoError = 0,
14 | Ec_InvalidExecution = 1,
15 | Ec_InvalidInterupt = 2,
16 | Ec_InvalidOperation = 3
17 | };
18 |
19 | enum Interrupt
20 | {
21 | I_NoInterrupt = 0,
22 | I_Timer = 1,
23 | I_Keyboard = 2
24 | };
25 | #define INTERRUPT_COUNT 3
26 |
27 | enum Register
28 | {
29 | Reg_BasePointer = 0,
30 | Reg_StackPointer = 1,
31 | Reg_Error = 2,
32 | Reg_Return = 3,
33 | Reg_Alp1 = 4,
34 | Reg_Alp2 = 5,
35 | Reg_Alp3 = 6,
36 | Reg_Alp4 = 7,
37 | Reg_Alp5 = 8,
38 | Reg_Alp6 = 9,
39 | Reg_Alp7 = 10,
40 | Reg_Alp8 = 11,
41 | };
42 |
43 | #define REGISTER_COUNT 12
44 |
45 |
46 | struct MachineState
47 | {
48 | bool mHalted;
49 | bool mPaused;
50 | bool mInterruptsEnabled;
51 |
52 | UByte mFlagZero;
53 | UByte mFlagSign;
54 |
55 | Interrupt mInterrupt;
56 | UInt32 mInterruptTable[INTERRUPT_COUNT];//must cover whole Interrupt enum
57 |
58 | //These are registers.
59 | UInt32 mExecutionPointer;//not accesible directly
60 |
61 | UInt32 mCounter;
62 |
63 | UInt32 mBasePointer;
64 | UInt32 mStackPointer;
65 | UInt32 mError;
66 | UInt32 mReturn;
67 | UInt32 mAlp1;
68 | UInt32 mAlp2;
69 | UInt32 mAlp3;
70 | UInt32 mAlp4;
71 | UInt32 mAlp5;
72 | UInt32 mAlp6;
73 | UInt32 mAlp7;
74 | UInt32 mAlp8;
75 | };
76 |
77 | #endif //GLOBALS_H
--------------------------------------------------------------------------------
/AlpVM/KeyboardDevice.cpp:
--------------------------------------------------------------------------------
1 | #include "KeyboardDevice.h"
2 |
3 |
4 | KeyboardDevice::KeyboardDevice(UInt32* mappedMemory)
5 | :
6 | mMappedMemory(mappedMemory)
7 | {
8 | }
9 |
10 |
11 | KeyboardDevice::~KeyboardDevice()
12 | {
13 | }
14 |
15 |
16 | void KeyboardDevice::setKey(UInt32 keyCode)
17 | {
18 | mMappedMemory[0] = keyCode;
19 | }
20 |
21 | UInt32 KeyboardDevice::getKey() const
22 | {
23 | return mMappedMemory[0];
24 | }
--------------------------------------------------------------------------------
/AlpVM/KeyboardDevice.h:
--------------------------------------------------------------------------------
1 | #ifndef KEYBOARDDEVICE_H
2 | #define KEYBOARDDEVICE_H
3 |
4 | #include "Globals.h"
5 |
6 | class KeyboardDevice
7 | {
8 | public:
9 | KeyboardDevice(UInt32* mappedMemory);
10 | ~KeyboardDevice();
11 | void setKey(UInt32 keyCode);
12 | UInt32 getKey() const;
13 |
14 | private:
15 | UInt32* mMappedMemory;
16 | //mMappedMemory[0] is the key pressed
17 | };
18 |
19 | #endif //KEYBOARDDEVICE_H
--------------------------------------------------------------------------------
/AlpVM/Memory.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "Memory.h"
4 |
5 |
6 | Memory::Memory(UInt32 memorySize)
7 | {
8 | mMemorySize = memorySize;
9 |
10 | mData = new UByte[mMemorySize];
11 |
12 | clear();
13 | }
14 |
15 |
16 | Memory::~Memory()
17 | {
18 | delete [] mData;
19 | }
20 |
21 |
22 | void Memory::setByte(UInt32 address, UByte byte)
23 | {
24 | mData[address] = byte;
25 | }
26 |
27 | UByte Memory::getByte(UInt32 address) const
28 | {
29 | return mData[address];
30 | }
31 |
32 | UByte* Memory::getRawData()
33 | {
34 | return mData;
35 | }
36 |
37 | void Memory::clear()
38 | {
39 | memset(mData, 0, mMemorySize);
40 | }
--------------------------------------------------------------------------------
/AlpVM/Memory.h:
--------------------------------------------------------------------------------
1 | #ifndef MEMORY_H
2 | #define MEMORY_H
3 |
4 | #include "Globals.h"
5 |
6 | class Memory
7 | {
8 | public:
9 | Memory(UInt32 memorySize);
10 | ~Memory();
11 | void setByte(UInt32 address, UByte byte);
12 | UByte getByte(UInt32 address) const;
13 | UByte* getRawData();
14 | void clear();
15 |
16 | template
17 | UInt32 setData(UInt32 address, const T& data)
18 | {
19 | UInt32 size = sizeof(T);
20 |
21 | const UByte* pointer = (const UByte*)&data;
22 |
23 | UInt32 i = 0;
24 | for (i = 0; i < size; ++i)
25 | {
26 | mData[address + i] = (pointer[i]);
27 | }
28 |
29 | return address + i;
30 | }
31 |
32 | template
33 | UInt32 getData(UInt32 address, T& data)
34 | {
35 | UInt32 size = sizeof(T);
36 |
37 | UByte* pointer = (UByte*)&data;
38 |
39 | UInt32 i = 0;
40 | for (i = 0; i < size; ++i)
41 | {
42 | pointer[i] = mData[address + i];
43 | }
44 |
45 | return address + i;
46 | }
47 |
48 | private:
49 | UByte* mData;
50 | UInt32 mMemorySize;
51 | };
52 |
53 | #endif //MEMORY_H
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/BUGS.txt:
--------------------------------------------------------------------------------
1 |
2 | Bugs are now managed in the SDL bug tracker, here:
3 |
4 | http://bugzilla.libsdl.org/
5 |
6 | You may report bugs there, and search to see if a given issue has already
7 | been reported, discussed, and maybe even fixed.
8 |
9 |
10 | You may also find help on the SDL mailing list. Subscription information:
11 |
12 | http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
13 |
14 | Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
15 | bugs discussed on the mailing list may be forgotten or missed.
16 |
17 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/COPYING.txt:
--------------------------------------------------------------------------------
1 |
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2014 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 |
21 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/README-SDL.txt:
--------------------------------------------------------------------------------
1 |
2 | Please distribute this file with the SDL runtime environment:
3 |
4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library
5 | designed to make it easy to write multi-media software, such as games and
6 | emulators.
7 |
8 | The Simple DirectMedia Layer library source code is available from:
9 | http://www.libsdl.org/
10 |
11 | This library is distributed under the terms of the zlib license:
12 | http://www.zlib.net/zlib_license.html
13 |
14 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/README.txt:
--------------------------------------------------------------------------------
1 |
2 | Simple DirectMedia Layer
3 |
4 | (SDL)
5 |
6 | Version 2.0
7 |
8 | ---
9 | http://www.libsdl.org/
10 |
11 | Simple DirectMedia Layer is a cross-platform development library designed
12 | to provide low level access to audio, keyboard, mouse, joystick, and graphics
13 | hardware via OpenGL and Direct3D. It is used by video playback software,
14 | emulators, and popular games including Valve's award winning catalog
15 | and many Humble Bundle games.
16 |
17 | SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
18 | Support for other platforms may be found in the source code.
19 |
20 | SDL is written in C, works natively with C++, and there are bindings
21 | available for several other languages, including C# and Python.
22 |
23 | This library is distributed under the zlib license, which can be found
24 | in the file "COPYING.txt".
25 |
26 | The best way to learn how to use SDL is to check out the header files in
27 | the "include" subdirectory and the programs in the "test" subdirectory.
28 | The header files and test programs are well commented and always up to date.
29 | More documentation and FAQs are available online at:
30 | http://wiki.libsdl.org/
31 |
32 | If you need help with the library, or just want to discuss SDL related
33 | issues, you can join the developers mailing list:
34 | http://www.libsdl.org/mailing-list.php
35 |
36 | If you want to report bugs or contribute patches, please submit them to
37 | bugzilla:
38 | http://bugzilla.libsdl.org/
39 |
40 | Enjoy!
41 | Sam Lantinga (slouken@libsdl.org)
42 |
43 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/include/SDL_name.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2014 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | #ifndef _SDLname_h_
23 | #define _SDLname_h_
24 |
25 | #if defined(__STDC__) || defined(__cplusplus)
26 | #define NeedFunctionPrototypes 1
27 | #endif
28 |
29 | #define SDL_NAME(X) SDL_##X
30 |
31 | #endif /* _SDLname_h_ */
32 |
33 | /* vi: set ts=4 sw=4 expandtab: */
34 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/include/SDL_opengles.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2014 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_opengles.h
24 | *
25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers.
26 | */
27 |
28 | #ifdef __IPHONEOS__
29 | #include
30 | #include
31 | #else
32 | #include
33 | #include
34 | #endif
35 |
36 | #ifndef APIENTRY
37 | #define APIENTRY
38 | #endif
39 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/include/SDL_revision.h:
--------------------------------------------------------------------------------
1 | #define SDL_REVISION "hg-8628:b558f99d48f0"
2 | #define SDL_REVISION_NUMBER 8628
3 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/include/SDL_test_log.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2014 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_test_log.h
24 | *
25 | * Include file for SDL test framework.
26 | *
27 | * This code is a part of the SDL2_test library, not the main SDL library.
28 | */
29 |
30 | /*
31 | *
32 | * Wrapper to log in the TEST category
33 | *
34 | */
35 |
36 | #ifndef _SDL_test_log_h
37 | #define _SDL_test_log_h
38 |
39 | #include "begin_code.h"
40 | /* Set up for C function definitions, even when using C++ */
41 | #ifdef __cplusplus
42 | extern "C" {
43 | #endif
44 |
45 | /**
46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority.
47 | *
48 | * \param fmt Message to be logged
49 | */
50 | void SDLTest_Log(const char *fmt, ...);
51 |
52 | /**
53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
54 | *
55 | * \param fmt Message to be logged
56 | */
57 | void SDLTest_LogError(const char *fmt, ...);
58 |
59 | /* Ends C function definitions when using C++ */
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 | #include "close_code.h"
64 |
65 | #endif /* _SDL_test_log_h */
66 |
67 | /* vi: set ts=4 sw=4 expandtab: */
68 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/include/SDL_types.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2014 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file SDL_types.h
24 | *
25 | * \deprecated
26 | */
27 |
28 | /* DEPRECATED */
29 | #include "SDL_stdinc.h"
30 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/include/close_code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2014 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
22 | /**
23 | * \file close_code.h
24 | *
25 | * This file reverses the effects of begin_code.h and should be included
26 | * after you finish any function and structure declarations in your headers
27 | */
28 |
29 | #undef _begin_code_h
30 |
31 | /* Reset structure packing at previous byte alignment */
32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__)
33 | #ifdef __BORLANDC__
34 | #pragma nopackwarning
35 | #endif
36 | #pragma pack(pop)
37 | #endif /* Compiler needs structure packing set */
38 |
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x64/SDL2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x64/SDL2.dll
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x64/SDL2.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x64/SDL2.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x64/SDL2main.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x64/SDL2main.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x64/SDL2test.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x64/SDL2test.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x86/SDL2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x86/SDL2.dll
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x86/SDL2.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x86/SDL2.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x86/SDL2main.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x86/SDL2main.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2-2.0.3/lib/x86/SDL2test.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2-2.0.3/lib/x86/SDL2test.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2_net-2.0.1/COPYING.txt:
--------------------------------------------------------------------------------
1 | /*
2 | SDL_net: An example cross-platform network library for use with SDL
3 | Copyright (C) 1997-2016 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 |
--------------------------------------------------------------------------------
/AlpVM/SDL2_net-2.0.1/README.txt:
--------------------------------------------------------------------------------
1 |
2 | SDL_net 2.0
3 |
4 | The latest version of this library is available from:
5 | http://www.libsdl.org/projects/SDL_net/
6 |
7 | This is an example portable network library for use with SDL.
8 | It is available under the zlib license, found in the file COPYING.txt.
9 | The API can be found in the file SDL_net.h
10 | This library supports UNIX, Windows, MacOS Classic, MacOS X,
11 | BeOS and QNX.
12 |
13 | The demo program is a chat client and server.
14 | The chat client requires the sample GUI library available at:
15 | http://www.libsdl.org/projects/GUIlib/
16 | The chat client connects to the server via TCP, registering itself.
17 | The server sends back a list of connected clients, and keeps the
18 | client updated with the status of other clients.
19 | Every line of text from a client is sent via UDP to every other client.
20 |
21 | Note that this isn't necessarily how you would want to write a chat
22 | program, but it demonstrates how to use the basic features of the
23 | network library.
24 |
25 | Enjoy!
26 | -Sam Lantinga and Roy Wood
27 |
28 |
--------------------------------------------------------------------------------
/AlpVM/SDL2_net-2.0.1/lib/x64/SDL2_net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2_net-2.0.1/lib/x64/SDL2_net.dll
--------------------------------------------------------------------------------
/AlpVM/SDL2_net-2.0.1/lib/x64/SDL2_net.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2_net-2.0.1/lib/x64/SDL2_net.lib
--------------------------------------------------------------------------------
/AlpVM/SDL2_net-2.0.1/lib/x86/SDL2_net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2_net-2.0.1/lib/x86/SDL2_net.dll
--------------------------------------------------------------------------------
/AlpVM/SDL2_net-2.0.1/lib/x86/SDL2_net.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/AlpVM/SDL2_net-2.0.1/lib/x86/SDL2_net.lib
--------------------------------------------------------------------------------
/AlpVM/SymbolUsage.cpp:
--------------------------------------------------------------------------------
1 | #include "SymbolUsage.h"
2 |
3 |
4 | SymbolUsage::SymbolUsage()
5 | :
6 | NameLength(0),
7 | Section(Data),
8 | Address(0)
9 | {
10 | }
11 |
12 |
13 | SymbolUsage::~SymbolUsage()
14 | {
15 | }
16 |
17 | SymbolUsage SymbolUsage::deserialize(std::ifstream& inFile)
18 | {
19 | SymbolUsage result;
20 |
21 | int nameLength = 0;
22 | char section = 0;
23 | int address = 0;
24 |
25 | inFile.read((char*)&nameLength, 4);
26 | inFile.seekg(nameLength, std::ios_base::cur);
27 | inFile.read((char*)§ion, 1);
28 | inFile.read((char*)&address, 4);
29 |
30 | result.NameLength = nameLength;
31 | result.Section = (EnSection)section;
32 | result.Address = address;
33 |
34 | return result;
35 | }
36 |
37 | int SymbolUsage::calculateSize()
38 | {
39 | int size = 0;
40 |
41 | size += 4;//name length
42 | size += NameLength;
43 | size += 1; //section
44 | size += 4; //Address
45 |
46 | return size;
47 | }
--------------------------------------------------------------------------------
/AlpVM/SymbolUsage.h:
--------------------------------------------------------------------------------
1 | #ifndef SYMBOLUSAGE_H
2 | #define SYMBOLUSAGE_H
3 |
4 | #include
5 | #include
6 |
7 | class SymbolUsage
8 | {
9 | public:
10 | enum EnSection
11 | {
12 | Data,
13 | Bss,
14 | Lit,
15 | Code
16 | };
17 |
18 | SymbolUsage();
19 | ~SymbolUsage();
20 |
21 | static SymbolUsage deserialize(std::ifstream& inFile);
22 |
23 | int calculateSize();
24 |
25 | int NameLength;
26 | EnSection Section;
27 | int Address;
28 | };
29 |
30 | #endif //SYMBOLUSAGE_H
--------------------------------------------------------------------------------
/AlpVM/SystemTime.cpp:
--------------------------------------------------------------------------------
1 | #include "SystemTime.h"
2 |
3 |
4 | SystemTime::SystemTime(UInt32* mappedMemory)
5 | :
6 | mMappedMemory(mappedMemory)
7 | {
8 | *mMappedMemory = 0;
9 | }
10 |
11 |
12 | SystemTime::~SystemTime()
13 | {
14 | }
15 |
--------------------------------------------------------------------------------
/AlpVM/SystemTime.h:
--------------------------------------------------------------------------------
1 | #ifndef SYSTEMTIME_H
2 | #define SYSTEMTIME_H
3 |
4 | #include
5 |
6 | #include "Globals.h"
7 |
8 | class SystemTime
9 | {
10 | public:
11 | SystemTime(UInt32* mappedMemory);
12 | ~SystemTime();
13 |
14 | inline void process()
15 | {
16 | *mMappedMemory = (UInt32)time(NULL);
17 | }
18 |
19 | private:
20 | UInt32* mMappedMemory;
21 | };
22 |
23 | #endif //SYSTEMTIME_H
--------------------------------------------------------------------------------
/AlpVM/TimerDevice.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "TimerDevice.h"
4 |
5 |
6 | TimerDevice::TimerDevice(UInt32* mappedMemory)
7 | :
8 | mMappedMemory(mappedMemory),
9 | mOccuredGlobal(false)
10 | {
11 | for (UInt32 i = 0; i < TIMER_COUNT; ++i)
12 | {
13 | setTimerOccured(i, false);
14 | setTimerInterval(i, 0);
15 | setTimerTime(i, 0);
16 | }
17 | }
18 |
19 |
20 | TimerDevice::~TimerDevice()
21 | {
22 | }
23 |
24 | void TimerDevice::process()
25 | {
26 | UInt32 interval = 0;
27 | UInt32 time = 0;
28 |
29 | UInt32 now = (UInt32)((clock() / (float)CLOCKS_PER_SEC) * 1000);
30 |
31 | for (UInt32 i = 0; i < TIMER_COUNT; ++i)
32 | {
33 | interval = getTimerInterval(i);
34 | if (interval > 0)
35 | {
36 | time = getTimerTime(i);
37 | if (now - time >= interval)
38 | {
39 | setTimerOccured(i, true);
40 | setTimerTime(i, now);
41 | }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/AlpVM/TimerDevice.h:
--------------------------------------------------------------------------------
1 | #ifndef TIMERDEVICE_H
2 | #define TIMERDEVICE_H
3 |
4 | #include "Globals.h"
5 |
6 | #define TIMER_COUNT 2
7 | #define VALUE_PER_TIMER 3
8 |
9 | class TimerDevice
10 | {
11 | public:
12 | TimerDevice(UInt32* mappedMemory);
13 | ~TimerDevice();
14 | void process();
15 |
16 | inline bool isOccuredGlobal()
17 | {
18 | return mOccuredGlobal;
19 | }
20 |
21 | inline void clearOccuredGlobal()
22 | {
23 | mOccuredGlobal = false;
24 | }
25 |
26 | inline bool isTimerOccured(UInt32 id)
27 | {
28 | return mMappedMemory[VALUE_PER_TIMER * id + 0] != 0;
29 | }
30 |
31 | inline UInt32 getTimerInterval(UInt32 id)
32 | {
33 | return mMappedMemory[VALUE_PER_TIMER * id + 1];
34 | }
35 |
36 | inline UInt32 getTimerTime(UInt32 id)
37 | {
38 | return mMappedMemory[VALUE_PER_TIMER * id + 2];
39 | }
40 |
41 | private:
42 | TimerDevice(const TimerDevice& other){}
43 |
44 | inline void setTimerOccured(UInt32 id, bool occured)
45 | {
46 | mMappedMemory[VALUE_PER_TIMER * id + 0] = (occured ? 1 : 0);
47 |
48 | if (occured)
49 | {
50 | mOccuredGlobal = true;
51 | }
52 | }
53 |
54 | inline void setTimerInterval(UInt32 id, UInt32 interval)
55 | {
56 | mMappedMemory[VALUE_PER_TIMER * id + 1] = interval;
57 | }
58 |
59 | inline void setTimerTime(UInt32 id, UInt32 time)
60 | {
61 | mMappedMemory[VALUE_PER_TIMER * id + 2] = time;
62 | }
63 |
64 |
65 | private:
66 | UInt32* mMappedMemory;
67 | bool mOccuredGlobal;
68 |
69 | /*
70 | mMappedMemory[0] represents whether timer_0 occured
71 | mMappedMemory[1] represents interval of timer_0 in milliseconds
72 | mMappedMemory[2] represents current time of timer_0 in milliseconds
73 |
74 | mMappedMemory[3] represents whether timer_1 occured
75 | mMappedMemory[4] represents interval of timer_1 in milliseconds
76 | mMappedMemory[5] represents current time of timer_1 in milliseconds
77 | */
78 | };
79 |
80 | #endif //TIMERDEVICE_H
--------------------------------------------------------------------------------
/Debugging.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/Debugging.png
--------------------------------------------------------------------------------
/Interrupts.md:
--------------------------------------------------------------------------------
1 | # Interrupts
2 | Interrupts are used for receiving hardware events. Hardware generates an interrupt for a particular event detected by the hardware. In software side, if it is intended to take that action, an interrupt handler is set to receive that interrupt.
3 |
4 | To illustrate this scenario, keyboard chip generates interrupt to inform a key press event. If an interrupt handler is assigned for keyboard key press interrupt, CPU jumps to the handler. When handler finishes its job, CPU returns where it was.
5 |
6 | Interrupts can be disabled or enabled by related instructions. Also, CPU disables interrupts before calling an interrupt handler. When returning from an interrupt handler, IRET instruction enables interrupts. Interrupts are disabled during handling an interrupt.
7 |
8 | Interrupt handlers are assigned with SET_INTERRUPT_HANDLER instruction. First parameter to this instruction is interrupt type. Second parameter is the register containing the address of interrupt handler subroutine.
9 |
10 | There are currently two interrupts:
11 |
12 | |Id |Description|
13 | |---|-----------|
14 | |1 |Timer
15 | |2 |Keyboard
16 |
--------------------------------------------------------------------------------
/Video.md:
--------------------------------------------------------------------------------
1 | # Video
2 | Video device of AlpVM is controlled by 12 bytes starting from the address 1024 of memory. It supports accesing pixels directly.
3 | It does not support a text mode yet.
4 |
5 | ### Video Device Control Structure
6 | |Memory Address|Description|
7 | |--------------|-----------|
8 | |1024 |Contains the memory address where the video device should render. This can be changed to have back buffer or multiple offscreen devices.
9 | |1028 |Width in pixels
10 | |1032 |Height in pixels
11 |
12 | Drawing to a back buffer and then switching to it is preferred way to do drawing in AlpVM. Switching is an atomic operation.
13 |
--------------------------------------------------------------------------------
/compilec.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | lcc\bin\cpp %1 | lcc\bin\rcc -target=bytecode > %1.asm
--------------------------------------------------------------------------------
/examples/sample.c:
--------------------------------------------------------------------------------
1 | unsigned int* VideoDevice = (unsigned int*)1024;
2 | unsigned int* Screen = (unsigned int*)4096;
3 |
4 | void main()
5 | {
6 | int r = 0;
7 | int c = 0;
8 |
9 | VideoDevice[0] = (unsigned int)Screen;
10 |
11 | for (r = 0; r < 100; ++r)
12 | {
13 | for (c = 0; c < 120; ++c)
14 | {
15 | Screen[r * 120 + c] = 255;
16 | }
17 | }
18 |
19 | while (1);
20 | }
21 |
--------------------------------------------------------------------------------
/lcc/README:
--------------------------------------------------------------------------------
1 | This hierarchy is the distribution for lcc version 4.1.
2 |
3 | lcc version 3.x is described in the book "A Retargetable C Compiler:
4 | Design and Implementation" (Addison-Wesley, 1995, ISBN 0-8053-1670-1).
5 | There are significant differences between 3.x and 4.x, most notably in
6 | the intermediate code. doc/4.html summarizes the differences.
7 |
8 | VERSION 4.1 IS INCOMPATIBLE WITH EARLIER VERSIONS OF LCC. DO NOT
9 | UNLOAD THIS DISTRIBUTION ON TOP OF A 3.X DISTRIBUTION.
10 |
11 | LOG describes the changes since the last release.
12 |
13 | CPYRIGHT describes the conditions under you can use, copy, modify, and
14 | distribute lcc or works derived from lcc.
15 |
16 | doc/install.html is an HTML file that gives a complete description of
17 | the distribution and installation instructions.
18 |
19 | Chris Fraser / cwfraser@microsoft.com
20 | David Hanson / drh@microsoft.com
21 | $Revision$ $Date$
22 |
--------------------------------------------------------------------------------
/lcc/README.md:
--------------------------------------------------------------------------------
1 | # LCC
2 | Bytecode backend of LCC is used for compiling C source files into the AlpVM assembly.
3 | Refer to AlpVM assembler and linker for more information on building for AlpVM.
4 |
5 | LCC source code here has small modifications for two reasons:
6 | * To make double type 4 bytes long (to do this, we use bytecode.c from id software's Quake 3)
7 | * To make LCC source compilable under Visual Studio 2015 (outp replaced)
8 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/8q.1bk:
--------------------------------------------------------------------------------
1 | 1 5 8 6 3 7 2 4
2 | 1 6 8 3 7 4 2 5
3 | 1 7 4 6 8 2 5 3
4 | 1 7 5 8 2 4 6 3
5 | 2 4 6 8 3 1 7 5
6 | 2 5 7 1 3 8 6 4
7 | 2 5 7 4 1 8 6 3
8 | 2 6 1 7 4 8 3 5
9 | 2 6 8 3 1 4 7 5
10 | 2 7 3 6 8 5 1 4
11 | 2 7 5 8 1 4 6 3
12 | 2 8 6 1 3 5 7 4
13 | 3 1 7 5 8 2 4 6
14 | 3 5 2 8 1 7 4 6
15 | 3 5 2 8 6 4 7 1
16 | 3 5 7 1 4 2 8 6
17 | 3 5 8 4 1 7 2 6
18 | 3 6 2 5 8 1 7 4
19 | 3 6 2 7 1 4 8 5
20 | 3 6 2 7 5 1 8 4
21 | 3 6 4 1 8 5 7 2
22 | 3 6 4 2 8 5 7 1
23 | 3 6 8 1 4 7 5 2
24 | 3 6 8 1 5 7 2 4
25 | 3 6 8 2 4 1 7 5
26 | 3 7 2 8 5 1 4 6
27 | 3 7 2 8 6 4 1 5
28 | 3 8 4 7 1 6 2 5
29 | 4 1 5 8 2 7 3 6
30 | 4 1 5 8 6 3 7 2
31 | 4 2 5 8 6 1 3 7
32 | 4 2 7 3 6 8 1 5
33 | 4 2 7 3 6 8 5 1
34 | 4 2 7 5 1 8 6 3
35 | 4 2 8 5 7 1 3 6
36 | 4 2 8 6 1 3 5 7
37 | 4 6 1 5 2 8 3 7
38 | 4 6 8 2 7 1 3 5
39 | 4 6 8 3 1 7 5 2
40 | 4 7 1 8 5 2 6 3
41 | 4 7 3 8 2 5 1 6
42 | 4 7 5 2 6 1 3 8
43 | 4 7 5 3 1 6 8 2
44 | 4 8 1 3 6 2 7 5
45 | 4 8 1 5 7 2 6 3
46 | 4 8 5 3 1 7 2 6
47 | 5 1 4 6 8 2 7 3
48 | 5 1 8 4 2 7 3 6
49 | 5 1 8 6 3 7 2 4
50 | 5 2 4 6 8 3 1 7
51 | 5 2 4 7 3 8 6 1
52 | 5 2 6 1 7 4 8 3
53 | 5 2 8 1 4 7 3 6
54 | 5 3 1 6 8 2 4 7
55 | 5 3 1 7 2 8 6 4
56 | 5 3 8 4 7 1 6 2
57 | 5 7 1 3 8 6 4 2
58 | 5 7 1 4 2 8 6 3
59 | 5 7 2 4 8 1 3 6
60 | 5 7 2 6 3 1 4 8
61 | 5 7 2 6 3 1 8 4
62 | 5 7 4 1 3 8 6 2
63 | 5 8 4 1 3 6 2 7
64 | 5 8 4 1 7 2 6 3
65 | 6 1 5 2 8 3 7 4
66 | 6 2 7 1 3 5 8 4
67 | 6 2 7 1 4 8 5 3
68 | 6 3 1 7 5 8 2 4
69 | 6 3 1 8 4 2 7 5
70 | 6 3 1 8 5 2 4 7
71 | 6 3 5 7 1 4 2 8
72 | 6 3 5 8 1 4 2 7
73 | 6 3 7 2 4 8 1 5
74 | 6 3 7 2 8 5 1 4
75 | 6 3 7 4 1 8 2 5
76 | 6 4 1 5 8 2 7 3
77 | 6 4 2 8 5 7 1 3
78 | 6 4 7 1 3 5 2 8
79 | 6 4 7 1 8 2 5 3
80 | 6 8 2 4 1 7 5 3
81 | 7 1 3 8 6 4 2 5
82 | 7 2 4 1 8 5 3 6
83 | 7 2 6 3 1 4 8 5
84 | 7 3 1 6 8 5 2 4
85 | 7 3 8 2 5 1 6 4
86 | 7 4 2 5 8 1 3 6
87 | 7 4 2 8 6 1 3 5
88 | 7 5 3 1 6 8 2 4
89 | 8 2 4 1 7 5 3 6
90 | 8 2 5 3 1 7 4 6
91 | 8 3 1 6 2 5 7 4
92 | 8 4 1 3 6 2 7 5
93 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/8q.2bk:
--------------------------------------------------------------------------------
1 | tst/8q.c:30: warning: missing return value
2 | tst/8q.c:39: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/array.1bk:
--------------------------------------------------------------------------------
1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
5 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/array.2bk:
--------------------------------------------------------------------------------
1 | tst/array.c:33: warning: missing return value
2 | tst/array.c:48: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/cf.1bk:
--------------------------------------------------------------------------------
1 | char freq
2 | 011 8.1
3 | 012 6.1
4 | 040 11.9
5 | ! 0.2
6 | " 1.5
7 | % 0.6
8 | & 0.4
9 | ' 0.4
10 | ( 2.9
11 | ) 2.9
12 | * 0.8
13 | + 1.3
14 | , 1.3
15 | - 0.4
16 | . 0.6
17 | / 1.0
18 | 0 2.5
19 | 1 1.9
20 | 2 0.6
21 | 3 0.2
22 | 7 0.4
23 | 8 0.2
24 | ; 3.8
25 | < 0.8
26 | = 2.7
27 | > 0.2
28 | [ 1.5
29 | \ 0.8
30 | ] 1.5
31 | a 3.1
32 | c 4.4
33 | e 2.3
34 | f 6.0
35 | g 1.3
36 | h 1.0
37 | i 5.0
38 | l 1.0
39 | m 0.2
40 | n 3.3
41 | o 2.1
42 | p 1.0
43 | q 0.4
44 | r 4.2
45 | s 0.6
46 | t 3.8
47 | u 1.2
48 | v 0.6
49 | w 0.2
50 | { 0.6
51 | } 0.6
52 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/cf.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/alpha/osf/tst/cf.2bk
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/cq.1bk:
--------------------------------------------------------------------------------
1 | Section s22 returned 0.
2 | s241,er4
3 | Section s241 returned 4.
4 | Section s243 returned 0.
5 | Section s244 returned 0.
6 | Section s25 returned 0.
7 | 8 bits in chars.
8 | 32 bits in ints.
9 | 16 bits in shorts.
10 | 64 bits in longs.
11 | 32 bits in unsigneds.
12 | 32 bits in floats.
13 | 64 bits in doubles.
14 | 1.192093e-07 is the least number that can be added to 1. (float).
15 | 2.220446e-16 is the least number that can be added to 1. (double).
16 | Section s26 returned 0.
17 | Section s4 returned 0.
18 | Section s61 returned 0.
19 | Section s626 returned 0.
20 | Section s71 returned 0.
21 | Section s72 returned 0.
22 | Section s757 returned 0.
23 | Section s7813 returned 0.
24 | Section s714 returned 0.
25 | Section s715 returned 0.
26 | Register count for char is unreliable.
27 | Register count for pointer is unreliable.
28 | Register count for int is unreliable.
29 | Section s81 returned 0.
30 | Section s84 returned 0.
31 | char alignment: 1
32 | short alignment: 2
33 | int alignment: 4
34 | long alignment: 8
35 | unsigned alignment: 4
36 | float alignment: 4
37 | double alignment: 8
38 | Sign extension in fields
39 | Be especially careful with 1-bit fields!
40 | Section s85 returned 0.
41 | Section s86 returned 0.
42 | Section s88 returned 0.
43 | Section s9 returned 0.
44 |
45 | Failed.
46 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/cq.2bk:
--------------------------------------------------------------------------------
1 | tst/cq.c:533: warning: missing return value
2 | tst/cq.c:1169: warning: missing return value
3 | tst/cq.c:5294: warning: unreachable code
4 | tst/cq.c:5303: warning: missing return value
5 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/cvt.1bk:
--------------------------------------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
12 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/cvt.2bk:
--------------------------------------------------------------------------------
1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
3 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/fields.1bk:
--------------------------------------------------------------------------------
1 | x = 1 2 3 4 -3 6
2 | y = 3 8 9
3 | x = 1 2 3 0 0 6
4 | y = 2 8 16
5 | p->a = 0x3, p->b = 0xf
6 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/fields.2bk:
--------------------------------------------------------------------------------
1 | tst/fields.c:6: warning: initializer exceeds bit-field width
2 | tst/fields.c:8: warning: initializer exceeds bit-field width
3 | tst/fields.c:30: warning: missing return value
4 | tst/fields.c:34: warning: missing return value
5 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/incr.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/alpha/osf/tst/incr.1bk
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/incr.2bk:
--------------------------------------------------------------------------------
1 | tst/incr.c:1: warning: missing return value
2 | tst/incr.c:6: warning: expression with no effect elided
3 | tst/incr.c:6: warning: expression with no effect elided
4 | tst/incr.c:11: warning: missing return value
5 | tst/incr.c:16: warning: expression with no effect elided
6 | tst/incr.c:16: warning: expression with no effect elided
7 | tst/incr.c:21: warning: missing return value
8 | tst/incr.c:30: warning: missing return value
9 | tst/incr.c:39: warning: missing return value
10 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/init.1bk:
--------------------------------------------------------------------------------
1 | 1 2 3 4
2 | 5 6
3 | 7
4 | if
5 | for
6 | else
7 | while
8 | 1 2 3 if
9 | 4 5 0 for
10 | 6 7 8 else
11 | 9 10 11 while
12 | 1 2 3 if
13 | 4 5 0 for
14 | 6 7 8 else
15 | 9 10 11 while
16 | 0 0 0
17 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/init.2bk:
--------------------------------------------------------------------------------
1 | tst/init.c:36: warning: missing return value
2 | tst/init.c:49: warning: missing return value
3 | tst/init.c:59: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/limits.1bk:
--------------------------------------------------------------------------------
1 | UCHAR_MAX: 000000ff=255
2 | USHRT_MAX: 0000ffff=65535
3 | UINT_MAX: ffffffff=-1
4 | ULONG_MAX: ffffffffffffffff=-1
5 | CHAR_MAX: 0000007f=127
6 | SCHAR_MAX: 0000007f=127
7 | SHRT_MAX: 00007fff=32767
8 | INT_MAX: 7fffffff=2147483647
9 | LONG_MAX: 7fffffffffffffff=9223372036854775807
10 | CHAR_MIN: ffffff80=-128
11 | SCHAR_MIN: ffffff80=-128
12 | SHRT_MIN: ffff8000=-32768
13 | INT_MIN: 80000000=-2147483648
14 | LONG_MIN: 8000000000000000=-9223372036854775808
15 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/limits.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/alpha/osf/tst/limits.2bk
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/paranoia.2bk:
--------------------------------------------------------------------------------
1 | tst/paranoia.c:1867: warning: missing return value
2 | tst/paranoia.c:1874: warning: missing return value
3 | tst/paranoia.c:1884: warning: missing return value
4 | tst/paranoia.c:1924: warning: missing return value
5 | tst/paranoia.c:1939: warning: missing return value
6 | tst/paranoia.c:1956: warning: missing return value
7 | tst/paranoia.c:1975: warning: missing return value
8 | tst/paranoia.c:1988: warning: missing return value
9 | tst/paranoia.c:1995: warning: missing return value
10 | tst/paranoia.c:2055: warning: missing return value
11 | tst/paranoia.c:2062: warning: missing return value
12 | tst/paranoia.c:2070: warning: missing return value
13 | tst/paranoia.c:2087: warning: missing return value
14 | tst/paranoia.c:2115: warning: missing return value
15 | tst/paranoia.c:2144: warning: missing return value
16 | tst/paranoia.c:2173: warning: missing return value
17 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/sort.1bk:
--------------------------------------------------------------------------------
1 | exchange(1,9)
2 | exchange(3,7)
3 | exchange(5,6)
4 | exchange(0,5)
5 | exchange(0,3)
6 | exchange(0,0)
7 | exchange(1,2)
8 | exchange(6,6)
9 | exchange(8,9)
10 | exchange(7,8)
11 | -51
12 | -1
13 | 0
14 | 1
15 | 3
16 | 10
17 | 18
18 | 32
19 | 567
20 | 789
21 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/sort.2bk:
--------------------------------------------------------------------------------
1 | tst/sort.c:23: warning: missing return value
2 | tst/sort.c:30: warning: missing return value
3 | tst/sort.c:37: warning: missing return value
4 | tst/sort.c:41: warning: missing return value
5 | tst/sort.c:65: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/spill.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/alpha/osf/tst/spill.1bk
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/spill.2bk:
--------------------------------------------------------------------------------
1 | tst/spill.c:1: warning: missing return value
2 | tst/spill.c:3: warning: missing return value
3 | tst/spill.c:5: warning: missing return value
4 | tst/spill.c:7: warning: missing return value
5 | tst/spill.c:9: warning: missing return value
6 | tst/spill.c:17: warning: missing return value
7 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/stdarg.1bk:
--------------------------------------------------------------------------------
1 | test 1
2 | test 2
3 | test 3
4 | test 4
5 | test 5.000000
6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
7 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/stdarg.2bk:
--------------------------------------------------------------------------------
1 | tst/stdarg.c:51: warning: missing return value
2 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/struct.1bk:
--------------------------------------------------------------------------------
1 | (-1,-1) is not within [10,10; 310,310]
2 | (1,1) is not within [10,10; 310,310]
3 | (20,300) is within [10,10; 310,310]
4 | (500,400) is not within [10,10; 310,310]
5 | ab
6 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/struct.2bk:
--------------------------------------------------------------------------------
1 | tst/struct.c:49: warning: missing return value
2 | tst/struct.c:68: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/switch.1bk:
--------------------------------------------------------------------------------
1 | b = 0x8
2 | f = 0xc
3 | n = 0xa
4 | r = 0xd
5 | t = 0x9
6 | v = 0xb
7 | x = 0x78
8 | f:
9 | x = 0
10 | x = 1
11 | x = 2
12 | x = 2
13 | x = 2
14 | x = 2
15 | x = 2
16 | x = 7
17 | x = 8
18 | x = 9
19 | x = 9
20 | x = 9
21 | x = 9
22 | x = 9
23 | x = 9
24 | x = 9
25 | x = 16
26 | x = 17
27 | x = 18
28 | x = 19
29 | x = 20
30 | g:
31 | 1 1
32 | 1 2
33 | 2 3
34 | 2 4
35 | 2 5
36 | 3 6
37 | d 6
38 | 3 7
39 | d 7
40 | 3 8
41 | d 8
42 | d 9
43 | d 10
44 | h:
45 | i = 8
46 | i = 16
47 | i = 120
48 | i = 128
49 | i = 248
50 | i = 264
51 | i = 272
52 | i = 280
53 | i = 288
54 | i = 296
55 | i = 304
56 | i = 312
57 | 488 defaults
58 | x = 0x1000000
59 | x = 0x2000000
60 | x = 0x3000000
61 | x = 0x4000000
62 | x = 0x5000000
63 | x = 0x6000000 (default)
64 | x = 0x7000000 (default)
65 | 0
66 | 1
67 | 2
68 | 3
69 | 4
70 | 5
71 | 0
72 | 1
73 | 2
74 | 3
75 | 4
76 | 5
77 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/switch.2bk:
--------------------------------------------------------------------------------
1 | tst/switch.c:55: warning: missing return value
2 | tst/switch.c:73: warning: missing return value
3 | tst/switch.c:97: warning: missing return value
4 | tst/switch.c:101: warning: overflow in converting constant expression from `int' to `unsigned int'
5 | tst/switch.c:102: warning: overflow in converting constant expression from `int' to `unsigned int'
6 | tst/switch.c:112: warning: missing return value
7 | tst/switch.c:137: warning: missing return value
8 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/wf1.1bk:
--------------------------------------------------------------------------------
1 | 5 a
2 | 2 and
3 | 5 buf
4 | 16 c
5 | 8 char
6 | 1 compare
7 | 4 cond
8 | 5 count
9 | 1 d
10 | 1 die
11 | 3 else
12 | 1 entry
13 | 1 eof
14 | 4 err
15 | 1 error
16 | 1 exit
17 | 1 folded
18 | 1 for
19 | 1 free
20 | 1 frequencies
21 | 1 frequency
22 | 1 get
23 | 2 getchar
24 | 3 getword
25 | 14 if
26 | 2 in
27 | 1 index
28 | 1 input
29 | 1 install
30 | 8 int
31 | 1 into
32 | 1 is
33 | 4 isletter
34 | 1 it
35 | 1 itself
36 | 5 left
37 | 1 letter
38 | 7 lookup
39 | 1 main
40 | 2 malloc
41 | 1 message
42 | 2 n
43 | 1 necessary
44 | 12 next
45 | 9 node
46 | 4 of
47 | 1 on
48 | 1 or
49 | 1 otherwise
50 | 2 out
51 | 8 p
52 | 3 print
53 | 2 printf
54 | 16 return
55 | 5 right
56 | 4 root
57 | 25 s
58 | 2 storage
59 | 3 strcmp
60 | 1 strcpy
61 | 1 strlen
62 | 8 struct
63 | 1 structures
64 | 2 subtree
65 | 1 t
66 | 5 tprint
67 | 9 tree
68 | 1 uses
69 | 1 version
70 | 1 wf
71 | 3 while
72 | 21 word
73 | 9 words
74 | 2 z
75 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/wf1.2bk:
--------------------------------------------------------------------------------
1 | tst/wf1.c:29: warning: missing return value
2 | tst/wf1.c:87: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/yacc.1bk:
--------------------------------------------------------------------------------
1 | a
2 | b
3 | load
4 | negate
5 | push 5
6 | c
7 | load
8 | multiply
9 | add
10 | store
11 |
--------------------------------------------------------------------------------
/lcc/alpha/osf/tst/yacc.2bk:
--------------------------------------------------------------------------------
1 | tst/yacc.c:345: warning: missing return value
2 | tst/yacc.c:349: warning: missing return value
3 | tst/yacc.c:359: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/build.bat:
--------------------------------------------------------------------------------
1 | mkdir bin
2 | set BUILDDIR=bin
3 | nmake -f makefile.nt all
--------------------------------------------------------------------------------
/lcc/cpp/getopt.c:
--------------------------------------------------------------------------------
1 | #include
2 | #define EPR fprintf(stderr,
3 | #define ERR(str, chr) if(opterr){EPR "%s%c\n", str, chr);}
4 | int opterr = 1;
5 | int optind = 1;
6 | int optopt;
7 | char *optarg;
8 | char *strchr();
9 |
10 | int
11 | getopt (int argc, char *const argv[], const char *opts)
12 | {
13 | static int sp = 1;
14 | int c;
15 | char *cp;
16 |
17 | if (sp == 1)
18 | if (optind >= argc ||
19 | argv[optind][0] != '-' || argv[optind][1] == '\0')
20 | return -1;
21 | else if (strcmp(argv[optind], "--") == 0) {
22 | optind++;
23 | return -1;
24 | }
25 | optopt = c = argv[optind][sp];
26 | if (c == ':' || (cp=strchr(opts, c)) == 0) {
27 | ERR (": illegal option -- ", c);
28 | if (argv[optind][++sp] == '\0') {
29 | optind++;
30 | sp = 1;
31 | }
32 | return '?';
33 | }
34 | if (*++cp == ':') {
35 | if (argv[optind][sp+1] != '\0')
36 | optarg = &argv[optind++][sp+1];
37 | else if (++optind >= argc) {
38 | ERR (": option requires an argument -- ", c);
39 | sp = 1;
40 | return '?';
41 | } else
42 | optarg = argv[optind++];
43 | sp = 1;
44 | } else {
45 | if (argv[optind][++sp] == '\0') {
46 | sp = 1;
47 | optind++;
48 | }
49 | optarg = 0;
50 | }
51 | return c;
52 | }
53 |
--------------------------------------------------------------------------------
/lcc/custom.mk:
--------------------------------------------------------------------------------
1 | #empty
2 |
--------------------------------------------------------------------------------
/lcc/doc/bprint.1:
--------------------------------------------------------------------------------
1 | .\" $Id$
2 | .TH BPRINT 1 "local \- $Date$"
3 | .SH NAME
4 | bprint \- expression profiler
5 | .SH SYNOPSIS
6 | .B bprint
7 | [
8 | .I option ...
9 | ]
10 | [
11 | .I file ...
12 | ]
13 | .SH DESCRIPTION
14 | .I bprint
15 | produces on the standard output a listing of the programs compiled by
16 | .I lcc
17 | with the
18 | .B \-b
19 | option.
20 | Executing an
21 | .B a.out
22 | so compiled appends profiling data to
23 | .BR prof.out .
24 | The first token of each expression in the listing is preceded
25 | by the number of times it was executed
26 | enclosed in angle brackets as determined from the data in
27 | .BR prof.out .
28 | .I bprint
29 | interprets the following options.
30 | .TP
31 | .B \-c
32 | Compress the
33 | .B prof.out
34 | file, which otherwise grows with every execution of
35 | .BR a.out .
36 | .TP
37 | .B \-b
38 | Print an annotated listing as described above.
39 | .TP
40 | .B \-n
41 | Include line numbers in the listing.
42 | .TP
43 | .B \-f
44 | Print only the number of invocations of each function.
45 | A second
46 | .B \-f
47 | summarizes call sites instead of callers.
48 | .TP
49 | .BI \-I \*Sdir
50 | specifies additional directories in which to seek
51 | files given in
52 | .B prof.out
53 | that do not begin with `/'.
54 | .PP
55 | If any file names are given, only the requested data for those files are printed
56 | in the order presented.
57 | If no options are given,
58 | .B \-b
59 | is assumed.
60 | .SH FILES
61 | .PP
62 | .ta \w'$LCCDIR/liblcc.{a,lib}XX'u
63 | .nf
64 | prof.out profiling data
65 | $LCCDIR/liblcc.{a,lib} \fIlcc\fP-specific library
66 | .SH "SEE ALSO"
67 | .IR lcc (1),
68 | .IR prof (1)
69 | .SH BUGS
70 | Macros and comments can confuse
71 | .I bprint
72 | because it uses post-expansion source coordinates
73 | to annotate pre-expansion source files.
74 | If
75 | .I bprint
76 | sees that it's about to print a statement count
77 | .I inside
78 | a number or identifier, it moves the count to just
79 | .I before
80 | the token.
81 | .PP
82 | Can't cope with an ill-formed
83 | .BR prof.out .
84 |
--------------------------------------------------------------------------------
/lcc/doc/bprint.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/doc/bprint.pdf
--------------------------------------------------------------------------------
/lcc/doc/lcc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/doc/lcc.pdf
--------------------------------------------------------------------------------
/lcc/etc/gcc-solaris.c:
--------------------------------------------------------------------------------
1 | /* SPARCs running Solaris 2.5.1 w/GCC tools
2 | at CS Dept., Princeton University */
3 |
4 | #include
5 |
6 | static char rcsid[] = "$Id$";
7 |
8 | #ifndef LCCDIR
9 | #define LCCDIR "/usr/local/lib/lcc/"
10 | #endif
11 | #ifndef GCCDIR
12 | #define GCCDIR "/usr/local/gnu/bin/"
13 | #endif
14 | #ifndef GCCLIB
15 | #define GCCLIB "/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2/"
16 | #endif
17 |
18 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
19 | char inputs[256] = "";
20 | char *cpp[] = { LCCDIR "cpp",
21 | "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix",
22 | "$1", "$2", "$3", 0 };
23 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
24 | "-I" GCCLIB "include", "-I/usr/include", 0 };
25 | char *com[] = { LCCDIR "rcc", "-target=sparc/solaris",
26 | "$1", "$2", "$3", 0 };
27 | char *as[] = { GCCDIR "as", "-f", "-o", "$3", "$1", "$2", 0 };
28 | char *ld[] = { GCCDIR "ld", "-o", "$3", "$1",
29 | GCCLIB "crti.o", GCCLIB "crt1.o",
30 | GCCLIB "crtbegin.o", "$2", "", "", "-L" LCCDIR, "-llcc",
31 | "-L" GCCLIB, "-lgcc", "-lm", "-lc", "",
32 | GCCLIB "crtend.o", GCCLIB "crtn.o", 0 };
33 |
34 | extern char *concat(char *, char *);
35 |
36 | int option(char *arg) {
37 | if (strncmp(arg, "-lccdir=", 8) == 0) {
38 | cpp[0] = concat(&arg[8], "/cpp");
39 | include[0] = concat("-I", concat(&arg[8], "/include"));
40 | ld[10] = concat("-L", &arg[8]);
41 | com[0] = concat(&arg[8], "/rcc");
42 | } else if (strcmp(arg, "-g") == 0)
43 | ;
44 | else if (strcmp(arg, "-pg") == 0) {
45 | ld[8] = GCCLIB "gmon.o";
46 | } else if (strcmp(arg, "-b") == 0)
47 | ;
48 | else
49 | return 0;
50 | return 1;
51 | }
52 |
--------------------------------------------------------------------------------
/lcc/etc/irix.c:
--------------------------------------------------------------------------------
1 | /* SGI big endian MIPSes running IRIX 5.2 at CS Dept., Princeton University */
2 |
3 | #include
4 |
5 | static char rcsid[] = "$Id$";
6 |
7 | #ifndef LCCDIR
8 | #define LCCDIR "/usr/local/lib/lcc/"
9 | #endif
10 |
11 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
12 | char inputs[256] = "";
13 | char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1",
14 | "-DLANGUAGE_C",
15 | "-DMIPSEB",
16 | "-DSYSTYPE_SVR4",
17 | "-D_CFE",
18 | "-D_LANGUAGE_C",
19 | "-D_MIPSEB",
20 | "-D_MIPS_FPSET=16",
21 | "-D_MIPS_ISA=_MIPS_ISA_MIPS1",
22 | "-D_MIPS_SIM=_MIPS_SIM_ABI32",
23 | "-D_MIPS_SZINT=32",
24 | "-D_MIPS_SZLONG=32",
25 | "-D_MIPS_SZPTR=32",
26 | "-D_SGI_SOURCE",
27 | "-D_SVR4_SOURCE",
28 | "-D_SYSTYPE_SVR4",
29 | "-D__host_mips",
30 | "-D__mips=1",
31 | "-D__sgi",
32 | "-D__unix",
33 | "-Dhost_mips",
34 | "-Dmips",
35 | "-Dsgi",
36 | "-Dunix",
37 | "$1", "$2", "$3", 0 };
38 | char *com[] = { LCCDIR "rcc", "-target=mips/irix", "$1", "$2", "$3", "", 0 };
39 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
40 | "-I/usr/include", 0 };
41 | char *as[] = { "/usr/bin/as", "-o", "$3", "$1", "-nocpp", "-KPIC", "$2", 0 };
42 | char *ld[] = { "/usr/bin/ld", "-require_dynamic_link", "_rld_new_interface",
43 | "-elf", "-_SYSTYPE_SVR4", "-Wx,-G", "0", "-g0", "-KPIC", "-dont_warn_unused",
44 | "-o", "$3", "/usr/lib/crt1.o", "-L/usr/local/lib",
45 | "$1", "$2", "", "-L" LCCDIR, "-llcc", "-lc", "-lm", "/usr/lib/crtn.o", 0
46 | };
47 |
48 | extern char *concat(char *, char *);
49 |
50 | int option(char *arg) {
51 | if (strncmp(arg, "-lccdir=", 8) == 0) {
52 | cpp[0] = concat(&arg[8], "/cpp");
53 | include[0] = concat("-I", concat(&arg[8], "/include"));
54 | com[0] = concat(&arg[8], "/rcc");
55 | ld[17] = concat("-L", &arg[8]);
56 | } else if (strcmp(arg, "-g") == 0)
57 | ;
58 | else if (strcmp(arg, "-p") == 0)
59 | ld[12] = "/usr/lib/mcrt1.o";
60 | else if (strcmp(arg, "-b") == 0)
61 | ;
62 | else
63 | return 0;
64 | return 1;
65 | }
66 |
--------------------------------------------------------------------------------
/lcc/etc/osf.c:
--------------------------------------------------------------------------------
1 | /* DEC ALPHAs running OSF/1 V3.2A (Rev. 17) at Princeton University */
2 |
3 | #include
4 |
5 | static char rcsid[] = "$Id$";
6 |
7 | #ifndef LCCDIR
8 | #define LCCDIR "/usr/local/lib/lcc/"
9 | #endif
10 |
11 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
12 | char inputs[256] = "";
13 | char *cpp[] = {
14 | LCCDIR "cpp", "-D__STDC__=1",
15 | "-DLANGUAGE_C", "-D__LANGUAGE_C__",
16 | "-D_unix", "-D__unix__", "-D_osf", "-D__osf__", "-Dunix",
17 | "-Dalpha", "-D_alpha", "-D__alpha",
18 | "-D__SYSTYPE_BSD", "-D_SYSTYPE_BSD",
19 | "$1", "$2", "$3", 0 };
20 | char *com[] = { LCCDIR "rcc", "-target=alpha/osf", "$1", "$2", "$3", "", 0 };
21 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
22 | "-I/usr/include", 0 };
23 | char *as[] = { "/bin/as", "-o", "$3", "", "$1", "-nocpp", "$2", 0 };
24 | char *ld[] = { "/usr/bin/ld", "-o", "$3", "/usr/lib/cmplrs/cc/crt0.o",
25 | "$1", "$2", "", "", "-L" LCCDIR, "-llcc", "-lm", "-lc", 0 };
26 |
27 | extern char *concat(char *, char *);
28 | extern int access(const char *, int);
29 |
30 | int option(char *arg) {
31 | if (strncmp(arg, "-lccdir=", 8) == 0) {
32 | cpp[0] = concat(&arg[8], "/cpp");
33 | include[0] = concat("-I", concat(&arg[8], "/include"));
34 | com[0] = concat(&arg[8], "/rcc");
35 | ld[8] = concat("-L", &arg[8]);
36 | } else if (strcmp(arg, "-g4") == 0
37 | && access("/u/drh/lib/alpha/rcc", 4) == 0
38 | && access("/u/drh/book/cdb/alpha/osf/cdbld", 4) == 0) {
39 | com[0] = "/u/drh/lib/alpha/rcc";
40 | com[5] = "-g4";
41 | ld[0] = "/u/drh/book/cdb/alpha/osf/cdbld";
42 | ld[1] = "-o";
43 | ld[2] = "$3";
44 | ld[3] = "$1";
45 | ld[4] = "$2";
46 | ld[5] = 0;
47 | } else if (strcmp(arg, "-g") == 0)
48 | return 1;
49 | else if (strcmp(arg, "-b") == 0)
50 | ;
51 | else
52 | return 0;
53 | return 1;
54 | }
55 |
--------------------------------------------------------------------------------
/lcc/etc/solaris.c:
--------------------------------------------------------------------------------
1 | /* SPARCs running Solaris 2.5.1 at CS Dept., Princeton University */
2 |
3 | #include
4 |
5 | static char rcsid[] = "$Id$";
6 |
7 | #ifndef LCCDIR
8 | #define LCCDIR "/usr/local/lib/lcc/"
9 | #endif
10 | #ifndef SUNDIR
11 | #define SUNDIR "/opt/SUNWspro/SC4.2/lib/"
12 | #endif
13 |
14 | char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
15 | char inputs[256] = "";
16 | char *cpp[] = { LCCDIR "cpp",
17 | "-D__STDC__=1", "-Dsparc", "-D__sparc__", "-Dsun", "-D__sun__", "-Dunix",
18 | "$1", "$2", "$3", 0 };
19 | char *include[] = { "-I" LCCDIR "include", "-I/usr/local/include",
20 | "-I/usr/include", 0 };
21 | char *com[] = { LCCDIR "rcc", "-target=sparc/solaris",
22 | "$1", "$2", "$3", 0 };
23 | char *as[] = { "/usr/ccs/bin/as", "-Qy", "-s", "-o", "$3", "$1", "$2", 0 };
24 | char *ld[] = { "/usr/ccs/bin/ld", "-o", "$3", "$1",
25 | SUNDIR "crti.o", SUNDIR "crt1.o",
26 | SUNDIR "values-xa.o", "$2", "",
27 | "-Y", "P," SUNDIR ":/usr/ccs/lib:/usr/lib", "-Qy",
28 | "-L" LCCDIR, "-llcc", "-lm", "-lc", SUNDIR "crtn.o", 0 };
29 |
30 | extern char *concat(char *, char *);
31 |
32 | int option(char *arg) {
33 | if (strncmp(arg, "-lccdir=", 8) == 0) {
34 | cpp[0] = concat(&arg[8], "/cpp");
35 | include[0] = concat("-I", concat(&arg[8], "/include"));
36 | ld[12] = concat("-L", &arg[8]);
37 | com[0] = concat(&arg[8], "/rcc");
38 | } else if (strcmp(arg, "-g") == 0)
39 | ;
40 | else if (strcmp(arg, "-p") == 0) {
41 | ld[5] = SUNDIR "mcrt1.o";
42 | ld[10] = "P," SUNDIR "libp:/usr/ccs/lib/libp:/usr/lib/libp:"
43 | SUNDIR ":/usr/ccs/lib:/usr/lib";
44 | } else if (strcmp(arg, "-b") == 0)
45 | ;
46 | else if (strncmp(arg, "-ld=", 4) == 0)
47 | ld[0] = &arg[4];
48 | else
49 | return 0;
50 | return 1;
51 | }
52 |
--------------------------------------------------------------------------------
/lcc/etc/win32.c:
--------------------------------------------------------------------------------
1 | /* x86s running MS Windows NT 4.0 */
2 |
3 | #include
4 |
5 | static char rcsid[] = "$Id$";
6 |
7 | #ifndef LCCDIR
8 | #define LCCDIR "\\progra~1\\lcc\\4.1\\bin\\"
9 | #endif
10 |
11 | char *suffixes[] = { ".c;.C", ".i;.I", ".asm;.ASM;.s;.S", ".obj;.OBJ", ".exe", 0 };
12 | char inputs[256] = "";
13 | char *cpp[] = { LCCDIR "cpp", "-D__STDC__=1", "-Dwin32", "-D_WIN32", "-D_M_IX86",
14 | "$1", "$2", "$3", 0 };
15 | char *include[] = { "-I" LCCDIR "include", 0 };
16 | char *com[] = { LCCDIR "rcc", "-target=x86/win32", "$1", "$2", "$3", 0 };
17 | char *as[] = { "ml", "-nologo", "-c", "-Cp", "-coff", "-Fo$3", "$1", "$2", 0 };
18 | char *ld[] = { "link", "-nologo",
19 | "-align:0x1000", "-subsystem:console", "-entry:mainCRTStartup",
20 | "$2", "-OUT:$3", "$1", LCCDIR "liblcc.lib", "libc.lib", "kernel32.lib", 0 };
21 |
22 | extern char *concat(char *, char *);
23 | extern char *replace(const char *, int, int);
24 |
25 | int option(char *arg) {
26 | if (strncmp(arg, "-lccdir=", 8) == 0) {
27 | arg = replace(arg + 8, '/', '\\');
28 | if (arg[strlen(arg)-1] == '\\')
29 | arg[strlen(arg)-1] = '\0';
30 | cpp[0] = concat(arg, "\\cpp.exe");
31 | include[0] = concat("-I", concat(arg, "\\include"));
32 | com[0] = concat(arg, "\\rcc.exe");
33 | ld[8] = concat(arg, "\\liblcc.lib");
34 | } else if (strcmp(arg, "-b") == 0)
35 | ;
36 | else if (strncmp(arg, "-ld=", 4) == 0)
37 | ld[0] = &arg[4];
38 | else
39 | return 0;
40 | return 1;
41 | }
42 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/assert.h:
--------------------------------------------------------------------------------
1 | #ifndef __ASSERT
2 | #define __ASSERT
3 |
4 | void assert(int);
5 |
6 | #endif /* __ASSERT */
7 |
8 | #undef assert
9 | #ifdef NDEBUG
10 | #define assert(ignore) ((void)0)
11 | #else
12 | extern void __assert(char *, char *, unsigned);
13 | #define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0)))
14 | #endif /* NDEBUG */
15 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/ctype.h:
--------------------------------------------------------------------------------
1 | #ifndef __CTYPE
2 | #define __CTYPE
3 |
4 | extern int isalnum(int);
5 | extern int isalpha(int);
6 | extern int iscntrl(int);
7 | extern int isdigit(int);
8 | extern int isgraph(int);
9 | extern int islower(int);
10 | extern int isprint(int);
11 | extern int ispunct(int);
12 | extern int isspace(int);
13 | extern int isupper(int);
14 | extern int isxdigit(int);
15 | extern int tolower(int);
16 | extern int toupper(int);
17 |
18 | #define __U 01
19 | #define __L 02
20 | #define __N 04
21 | #define __S 010
22 | #define __P 020
23 | #define __C 040
24 |
25 | #endif /* __CTYPE */
26 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/errno.h:
--------------------------------------------------------------------------------
1 | #ifndef __ERRNO
2 | #define __ERRNO
3 |
4 | #define EDOM 33
5 | #define ERANGE 34
6 | extern int errno;
7 |
8 | #endif /* __ERRNO */
9 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/float.h:
--------------------------------------------------------------------------------
1 | #ifndef __FLOAT
2 | #define __FLOAT
3 |
4 | #define FLT_ROUNDS 1
5 | #define FLT_RADIX 2
6 |
7 | #define FLT_DIG 6
8 | #define FLT_EPSILON 1.19209289550781250000e-07
9 | #define FLT_MANT_DIG 24
10 | #define FLT_MAX 3.40282346638528860000e+38
11 | #define FLT_MAX_10_EXP 38
12 | #define FLT_MAX_EXP 128
13 | #define FLT_MIN 1.17549435082228750000e-38
14 | #define FLT_MIN_10_EXP -37
15 | #define FLT_MIN_EXP -125
16 |
17 | #define DBL_DIG 15
18 | #define DBL_EPSILON 2.22044604925031310000e-16
19 | #define DBL_MANT_DIG 53
20 | #define DBL_MAX 1.79769313486231570000e+308
21 | #define DBL_MAX_10_EXP 308
22 | #define DBL_MAX_EXP 1024
23 | #define DBL_MIN 2.22507385850720140000e-308
24 | #define DBL_MIN_10_EXP -307
25 | #define DBL_MIN_EXP -1021
26 |
27 | #define LDBL_MANT_DIG DBL_MANT_DIG
28 | #define LDBL_EPSILON DBL_EPSILON
29 | #define LDBL_DIG DBL_DIG
30 | #define LDBL_MIN_EXP DBL_MIN_EXP
31 | #define LDBL_MIN DBL_MIN
32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
33 | #define LDBL_MAX_EXP DBL_MAX_EXP
34 | #define LDBL_MAX DBL_MAX
35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
36 |
37 | #endif /* __FLOAT */
38 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/limits.h:
--------------------------------------------------------------------------------
1 | #ifndef __LIMITS
2 | #define __LIMITS
3 |
4 | #define CHAR_BIT 8
5 | #define MB_LEN_MAX 1
6 |
7 | #define UCHAR_MAX 0xff
8 | #define USHRT_MAX 0xffff
9 | #define UINT_MAX (~0U)
10 | #define ULONG_MAX (~0UL)
11 |
12 | #define CHAR_MAX SCHAR_MAX
13 | #define SCHAR_MAX 0x7f
14 | #define SHRT_MAX 0x7fff
15 | #define INT_MAX 0x7fffffff
16 | #define LONG_MAX 0x7fffffffffffffffL
17 |
18 | #define CHAR_MIN SCHAR_MIN
19 | #define SCHAR_MIN (-SCHAR_MAX-1)
20 | #define SHRT_MIN (-SHRT_MAX-1)
21 | #define INT_MIN (-INT_MAX-1)
22 | #define LONG_MIN (-LONG_MAX-1)
23 |
24 | #endif /* __LIMITS */
25 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/locale.h:
--------------------------------------------------------------------------------
1 | #ifndef __LOCALE
2 | #define __LOCALE
3 |
4 | #define LC_ALL 0
5 | #define LC_COLLATE 1
6 | #define LC_CTYPE 2
7 | #define LC_MONETARY 3
8 | #define LC_NUMERIC 4
9 | #define LC_TIME 5
10 | #define NULL 0
11 |
12 | struct lconv {
13 | char *decimal_point;
14 | char *thousands_sep;
15 | char *grouping;
16 | char *int_curr_symbol;
17 | char *currency_symbol;
18 | char *mon_decimal_point;
19 | char *mon_thousands_sep;
20 | char *mon_grouping;
21 | char *positive_sign;
22 | char *negative_sign;
23 | char int_frac_digits;
24 | char frac_digits;
25 | char p_cs_precedes;
26 | char p_sep_by_space;
27 | char n_cs_precedes;
28 | char n_sep_by_space;
29 | char p_sign_posn;
30 | char n_sign_posn;
31 | };
32 |
33 | char *setlocale(int, const char *);
34 | struct lconv *localeconv(void);
35 |
36 | #endif /* __LOCALE */
37 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/math.h:
--------------------------------------------------------------------------------
1 | #ifndef __MATH
2 | #define __MATH
3 |
4 | #define HUGE_VAL 1.79769313486231570000e+308
5 |
6 | extern double acos(double);
7 | extern double asin(double);
8 | extern double atan(double);
9 | extern double atan2(double, double);
10 | extern double cos(double);
11 | extern double sin(double);
12 | extern double tan(double);
13 | extern double cosh(double);
14 | extern double sinh(double);
15 | extern double tanh(double);
16 | extern double exp(double);
17 | extern double frexp(double, int *);
18 | extern double ldexp(double, int);
19 | extern double log(double);
20 | extern double log10(double);
21 | extern double modf(double, double *);
22 | extern double pow(double, double);
23 | extern double sqrt(double);
24 | extern double ceil(double);
25 | extern double fabs(double);
26 | extern double floor(double);
27 | extern double fmod(double, double);
28 |
29 | #endif /* __MATH */
30 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/setjmp.h:
--------------------------------------------------------------------------------
1 | #ifndef __SETJMP
2 | #define __SETJMP
3 |
4 |
5 |
6 | typedef int jmp_buf[35+1+48];
7 | int setjmp(jmp_buf);
8 | void longjmp(jmp_buf, int);
9 |
10 | #endif /* __SETJMP */
11 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/signal.h:
--------------------------------------------------------------------------------
1 | #ifndef __SIGNAL
2 | #define __SIGNAL
3 |
4 | typedef int sig_atomic_t;
5 |
6 | #define SIG_DFL ((void (*)(int))0)
7 | #define SIG_ERR ((void (*)(int))-1)
8 | #define SIG_IGN ((void (*)(int))1)
9 |
10 | #define SIGABRT 6
11 | #define SIGFPE 8
12 | #define SIGILL 4
13 | #define SIGINT 2
14 | #define SIGSEGV 11
15 | #define SIGTERM 15
16 |
17 | void (*signal(int, void (*)(int)))(int);
18 | int raise(int);
19 |
20 | #endif /* __SIGNAL */
21 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/stdarg.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDARG
2 | #define __STDARG
3 |
4 | #if !defined(_VA_LIST)
5 | #define _VA_LIST
6 | typedef struct {
7 | char *_a0; /* pointer to first homed integer arg */
8 | int _offset; /* byte offset of next param */
9 | float _tmp;
10 | } __va_list;
11 | #endif
12 | typedef __va_list va_list;
13 |
14 | #define va_start(list, start) ((void)( \
15 | (list)._a0 = (__typecode(__firstarg)==1 ? \
16 | (char*)&__firstarg+48 : (char *)&__firstarg), \
17 | (list)._offset = (__typecode(start)==1 ? \
18 | (char*)&start+56 : (char *)&start+8)-(list)._a0))
19 | #define va_arg(list, mode) (*(mode *)( \
20 | (list)._offset += (int)((sizeof(mode)+7)&~7), \
21 | (__typecode(mode)==1 && sizeof(mode)==4) ? \
22 | ((list)._tmp = (float)*(double *)((list)._a0 + (list)._offset - \
23 | ((list)._offset <= 48 ? 56 : 8))), (char *)&(list)._tmp : \
24 | (__typecode(mode)==1 && (list)._offset <= 48) ? \
25 | (list)._a0 + (list)._offset - 56 : \
26 | (list)._a0 + (list)._offset - (int)((sizeof(mode)+7)&~7)))
27 | #define va_end(list) ((void)0)
28 | #endif
29 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/stddef.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDDEF
2 | #define __STDDEF
3 |
4 | /* $Id$ */
5 |
6 | #define NULL 0
7 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0))
8 |
9 | typedef long ptrdiff_t;
10 |
11 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
12 | #define _SIZE_T
13 | #define _SIZE_T_
14 | typedef unsigned long size_t;
15 | #endif
16 |
17 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
18 | #define _WCHAR_T
19 | #define _WCHAR_T_
20 | typedef unsigned short wchar_t;
21 | #endif
22 |
23 | #endif /* __STDDEF */
24 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/stdlib.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDLIB
2 | #define __STDLIB
3 |
4 | #define EXIT_FAILURE 1
5 | #define EXIT_SUCCESS 0
6 | #define MB_CUR_MAX 1
7 | #define NULL 0
8 | #define RAND_MAX 32767
9 |
10 | typedef struct { int quot, rem; } div_t;
11 | typedef struct { long quot, rem; } ldiv_t;
12 |
13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
14 | #define _SIZE_T
15 | #define _SIZE_T_
16 | typedef unsigned long size_t;
17 | #endif
18 |
19 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
20 | #define _WCHAR_T
21 | #define _WCHAR_T_
22 | typedef unsigned char wchar_t;
23 | #endif
24 |
25 | extern double atof(const char *);
26 | extern int atoi(const char *);
27 | extern long int atol(const char *);
28 | extern double strtod(const char *, char **);
29 | extern long int strtol(const char *, char **, int);
30 | extern unsigned long int strtoul(const char *, char **, int);
31 | extern int rand(void);
32 | extern void srand(unsigned int);
33 | extern void *calloc(size_t, size_t);
34 | extern void free(void *);
35 | extern void *malloc(size_t);
36 | extern void *realloc(void *, size_t);
37 | extern void abort(void);
38 | extern int atexit(void (*)(void));
39 | extern void exit(int);
40 | extern char *getenv(const char *);
41 | extern int system(const char *);
42 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
43 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
44 | extern int abs(int);
45 | extern div_t div(int, int);
46 | extern long int labs(long int);
47 | extern ldiv_t ldiv(long int, long int);
48 | extern int mblen(const char *, size_t);
49 | extern int mbtowc(wchar_t *, const char *, size_t);
50 | extern int wctomb(char *, wchar_t);
51 | extern size_t mbstowcs(wchar_t *, const char *, size_t);
52 | extern size_t wcstombs(char *, const wchar_t *, size_t);
53 |
54 | #endif /* __STDLIB */
55 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/string.h:
--------------------------------------------------------------------------------
1 | #ifndef __STRING
2 | #define __STRING
3 |
4 | #define NULL 0
5 |
6 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
7 | #define _SIZE_T
8 | #define _SIZE_T_
9 | typedef unsigned long size_t;
10 | #endif
11 |
12 | void *memcpy(void *, const void *, size_t);
13 | void *memmove(void *, const void *, size_t);
14 | char *strcpy(char *, const char *);
15 | char *strncpy(char *, const char *, size_t);
16 | char *strcat(char *, const char *);
17 | char *strncat(char *, const char *, size_t);
18 | int memcmp(const void *, const void *, size_t);
19 | int strcmp(const char *, const char *);
20 | int strcoll(const char *, const char *);
21 | int strncmp(const char *, const char *, size_t);
22 | size_t strxfrm(char *, const char *, size_t);
23 | void *memchr(const void *, int, size_t);
24 | char *strchr(const char *, int);
25 | size_t strcspn(const char *, const char *);
26 | char *strpbrk(const char *, const char *);
27 | char *strrchr(const char *, int);
28 | size_t strspn(const char *, const char *);
29 | char *strstr(const char *, const char *);
30 | char *strtok(char *, const char *);
31 | void *memset(void *, int, size_t);
32 | char *strerror(int);
33 | size_t strlen(const char *);
34 |
35 | #endif /* __STRING */
36 |
--------------------------------------------------------------------------------
/lcc/include/alpha/osf/time.h:
--------------------------------------------------------------------------------
1 | #ifndef __TIME
2 | #define __TIME
3 |
4 | #define CLOCKS_PER_SEC 1000000
5 | #ifndef NULL
6 | #define NULL 0
7 | #endif
8 |
9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_)
10 | #define _CLOCK_T
11 | #define _CLOCK_T_
12 | typedef long clock_t;
13 | #endif
14 |
15 | #if !defined(_TIME_T) && !defined(_TIME_T_)
16 | #define _TIME_T
17 | #define _TIME_T_
18 | typedef long time_t;
19 | #endif
20 |
21 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
22 | #define _SIZE_T
23 | #define _SIZE_T_
24 | typedef unsigned long size_t;
25 | #endif
26 |
27 | struct tm {
28 | int tm_sec;
29 | int tm_min;
30 | int tm_hour;
31 | int tm_mday;
32 | int tm_mon;
33 | int tm_year;
34 | int tm_wday;
35 | int tm_yday;
36 | int tm_isdst;
37 | long __tm_gmtoff;
38 | char *__tm_zone;
39 | };
40 | extern clock_t clock(void);
41 | extern double difftime(time_t, time_t);
42 | extern time_t mktime(struct tm *);
43 | extern time_t time(time_t *);
44 | extern char *asctime(const struct tm *);
45 | extern char *ctime(const time_t *);
46 | extern struct tm *gmtime(const time_t *);
47 | extern struct tm *localtime(const time_t *);
48 | extern size_t strftime(char *, size_t, const char *, const struct tm *);
49 |
50 | #endif /* __TIME */
51 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/assert.h:
--------------------------------------------------------------------------------
1 | #ifndef __ASSERT
2 | #define __ASSERT
3 |
4 | void assert(int);
5 |
6 | #endif /* __ASSERT */
7 |
8 | #undef assert
9 | #ifdef NDEBUG
10 | #define assert(ignore) ((void)0)
11 | #else
12 | extern int _assert(char *, char *, unsigned);
13 | #define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__)))
14 | #endif /* NDEBUG */
15 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/ctype.h:
--------------------------------------------------------------------------------
1 | #ifndef __CTYPE
2 | #define __CTYPE
3 |
4 | extern int isalnum(int);
5 | extern int isalpha(int);
6 | extern int iscntrl(int);
7 | extern int isdigit(int);
8 | extern int isgraph(int);
9 | extern int islower(int);
10 | extern int isprint(int);
11 | extern int ispunct(int);
12 | extern int isspace(int);
13 | extern int isupper(int);
14 | extern int isxdigit(int);
15 | extern int tolower(int);
16 | extern int toupper(int);
17 |
18 | #define __U 01
19 | #define __L 02
20 | #define __N 04
21 | #define __S 010
22 | #define __P 020
23 | #define __C 040
24 | #define __B 0100
25 | #define __X 0200
26 |
27 | extern unsigned char _ctype[];
28 | #define isalnum(c) ((_ctype+1)[c]&(__U|__L|__N))
29 | #define isalpha(c) ((_ctype+1)[c]&(__U|__L))
30 | #define iscntrl(c) ((_ctype+1)[c]&__C)
31 | #define isdigit(c) ((_ctype+1)[c]&__N)
32 | #define isgraph(c) ((_ctype+1)[c]&(__P|__U|__L|__N))
33 | #define islower(c) ((_ctype+1)[c]&__L)
34 | #define isprint(c) ((_ctype+1)[c]&(__P|__U|__L|__N|__B))
35 | #define ispunct(c) ((_ctype+1)[c]&__P)
36 | #define isspace(c) ((_ctype+1)[c]&__S)
37 | #define isupper(c) ((_ctype+1)[c]&__U)
38 | #define isxdigit(c) ((_ctype+1)[c]&__X)
39 |
40 | #endif /* __CTYPE */
41 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/errno.h:
--------------------------------------------------------------------------------
1 | #ifndef __ERRNO
2 | #define __ERRNO
3 |
4 | #define EDOM 33
5 | #define ERANGE 34
6 | extern int errno;
7 |
8 | #endif /* __ERRNO */
9 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/float.h:
--------------------------------------------------------------------------------
1 | #ifndef __FLOAT
2 | #define __FLOAT
3 |
4 | #define FLT_ROUNDS 1
5 | #define FLT_RADIX 2
6 |
7 | #define FLT_DIG 6
8 | #define FLT_EPSILON 1.19209289550781250000e-07
9 | #define FLT_MANT_DIG 24
10 | #define FLT_MAX 3.40282346638528860000e+38
11 | #define FLT_MAX_10_EXP 38
12 | #define FLT_MAX_EXP 128
13 | #define FLT_MIN 1.17549435082228750000e-38
14 | #define FLT_MIN_10_EXP -37
15 | #define FLT_MIN_EXP -125
16 |
17 | #define DBL_DIG 15
18 | #define DBL_EPSILON 2.22044604925031310000e-16
19 | #define DBL_MANT_DIG 53
20 | #define DBL_MAX 1.79769313486231570000e+308
21 | #define DBL_MAX_10_EXP 308
22 | #define DBL_MAX_EXP 1024
23 | #define DBL_MIN 2.22507385850720140000e-308
24 | #define DBL_MIN_10_EXP -307
25 | #define DBL_MIN_EXP -1021
26 |
27 | #define LDBL_MANT_DIG DBL_MANT_DIG
28 | #define LDBL_EPSILON DBL_EPSILON
29 | #define LDBL_DIG DBL_DIG
30 | #define LDBL_MIN_EXP DBL_MIN_EXP
31 | #define LDBL_MIN DBL_MIN
32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
33 | #define LDBL_MAX_EXP DBL_MAX_EXP
34 | #define LDBL_MAX DBL_MAX
35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
36 |
37 | #endif /* __FLOAT */
38 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/limits.h:
--------------------------------------------------------------------------------
1 | #ifndef __LIMITS
2 | #define __LIMITS
3 |
4 | #define CHAR_BIT 8
5 | #define MB_LEN_MAX 1
6 |
7 | #define UCHAR_MAX 0xff
8 | #define USHRT_MAX 0xffff
9 | #define UINT_MAX (~0U)
10 | #define ULONG_MAX (~0UL)
11 |
12 | #define CHAR_MAX SCHAR_MAX
13 | #define SCHAR_MAX 0x7f
14 | #define SHRT_MAX 0x7fff
15 | #define INT_MAX 0x7fffffff
16 | #define LONG_MAX 0x7fffffffL
17 |
18 | #define CHAR_MIN SCHAR_MIN
19 | #define SCHAR_MIN (-SCHAR_MAX-1)
20 | #define SHRT_MIN (-SHRT_MAX-1)
21 | #define INT_MIN (-INT_MAX-1)
22 | #define LONG_MIN (-LONG_MAX-1)
23 |
24 | #endif /* __LIMITS */
25 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/locale.h:
--------------------------------------------------------------------------------
1 | #ifndef __LOCALE
2 | #define __LOCALE
3 |
4 | #define LC_ALL 0
5 | #define LC_COLLATE 1
6 | #define LC_CTYPE 2
7 | #define LC_MONETARY 3
8 | #define LC_NUMERIC 4
9 | #define LC_TIME 5
10 | #define NULL 0
11 |
12 | struct lconv {
13 | char *decimal_point;
14 | char *thousands_sep;
15 | char *grouping;
16 | char *int_curr_symbol;
17 | char *currency_symbol;
18 | char *mon_decimal_point;
19 | char *mon_thousands_sep;
20 | char *mon_grouping;
21 | char *positive_sign;
22 | char *negative_sign;
23 | char int_frac_digits;
24 | char frac_digits;
25 | char p_cs_precedes;
26 | char p_sep_by_space;
27 | char n_cs_precedes;
28 | char n_sep_by_space;
29 | char p_sign_posn;
30 | char n_sign_posn;
31 | };
32 |
33 | char *setlocale(int, const char *);
34 | struct lconv *localeconv(void);
35 |
36 | #endif /* __LOCALE */
37 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/math.h:
--------------------------------------------------------------------------------
1 | #ifndef __MATH
2 | #define __MATH
3 |
4 | #define HUGE_VAL 1.79769313486231570000e+308
5 |
6 | extern double acos(double);
7 | extern double asin(double);
8 | extern double atan(double);
9 | extern double atan2(double, double);
10 | extern double cos(double);
11 | extern double sin(double);
12 | extern double tan(double);
13 | extern double cosh(double);
14 | extern double sinh(double);
15 | extern double tanh(double);
16 | extern double exp(double);
17 | extern double frexp(double, int *);
18 | extern double ldexp(double, int);
19 | extern double log(double);
20 | extern double log10(double);
21 | extern double modf(double, double *);
22 | extern double pow(double, double);
23 | extern double sqrt(double);
24 | extern double ceil(double);
25 | extern double fabs(double);
26 | extern double floor(double);
27 | extern double fmod(double, double);
28 |
29 | #endif /* __MATH */
30 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/setjmp.h:
--------------------------------------------------------------------------------
1 | #ifndef __SETJMP
2 | #define __SETJMP
3 |
4 |
5 |
6 | typedef int jmp_buf[28];
7 | int setjmp(jmp_buf);
8 | void longjmp(jmp_buf, int);
9 |
10 | #endif /* __SETJMP */
11 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/signal.h:
--------------------------------------------------------------------------------
1 | #ifndef __SIGNAL
2 | #define __SIGNAL
3 |
4 | typedef int sig_atomic_t;
5 |
6 | #define SIG_DFL ((void (*)(int))0)
7 | #define SIG_ERR ((void (*)(int))-1)
8 | #define SIG_IGN ((void (*)(int))1)
9 |
10 | #define SIGABRT 6
11 | #define SIGFPE 8
12 | #define SIGILL 4
13 | #define SIGINT 2
14 | #define SIGSEGV 11
15 | #define SIGTERM 15
16 |
17 | void (*signal(int, void (*)(int)))(int);
18 | int raise(int);
19 |
20 | #endif /* __SIGNAL */
21 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/stdarg.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDARG
2 | #define __STDARG
3 |
4 | #if !defined(_VA_LIST)
5 | #define _VA_LIST
6 | typedef char *__va_list;
7 | #endif
8 | typedef __va_list va_list;
9 |
10 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
11 | (char *)((int *)&(start)+1) : (char *)(&(start)+1))))
12 | #define __va_arg(list, mode, n) \
13 | (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
14 | #define _bigendian_va_arg(list, mode, n) (\
15 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
16 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
17 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
18 | #define va_end(list) ((void)0)
19 | #define va_arg(list, mode) (sizeof(mode)==8 ? \
20 | *(mode *)(&(list = (char*)(((int)list + 15)&~7U))[-8]) : \
21 | _bigendian_va_arg(list, mode, 3U))
22 | #endif
23 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/stddef.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDDEF
2 | #define __STDDEF
3 |
4 | /* $Id$ */
5 |
6 | #define NULL 0
7 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0))
8 |
9 | typedef long ptrdiff_t;
10 |
11 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
12 | #define _SIZE_T
13 | #define _SIZE_T_
14 | typedef unsigned long size_t;
15 | #endif
16 |
17 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
18 | #define _WCHAR_T
19 | #define _WCHAR_T_
20 | typedef unsigned short wchar_t;
21 | #endif
22 |
23 | #endif /* __STDDEF */
24 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/stdlib.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDLIB
2 | #define __STDLIB
3 |
4 | #define EXIT_FAILURE 1
5 | #define EXIT_SUCCESS 0
6 | #define MB_CUR_MAX 1
7 | #define NULL 0
8 | #define RAND_MAX 32767
9 |
10 | typedef struct { int quot, rem; } div_t;
11 | typedef struct { long quot, rem; } ldiv_t;
12 |
13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
14 | #define _SIZE_T
15 | #define _SIZE_T_
16 | typedef unsigned long size_t;
17 | #endif
18 |
19 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
20 | #define _WCHAR_T
21 | #define _WCHAR_T_
22 | typedef unsigned char wchar_t;
23 | #endif
24 |
25 | extern double atof(const char *);
26 | extern int atoi(const char *);
27 | extern long int atol(const char *);
28 | extern double strtod(const char *, char **);
29 | extern long int strtol(const char *, char **, int);
30 | extern unsigned long int strtoul(const char *, char **, int);
31 | extern int rand(void);
32 | extern void srand(unsigned int);
33 | extern void *calloc(size_t, size_t);
34 | extern void free(void *);
35 | extern void *malloc(size_t);
36 | extern void *realloc(void *, size_t);
37 | extern void abort(void);
38 | extern int atexit(void (*)(void));
39 | extern void exit(int);
40 | extern char *getenv(const char *);
41 | extern int system(const char *);
42 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
43 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
44 | extern int abs(int);
45 | extern div_t div(int, int);
46 | extern long int labs(long int);
47 | extern ldiv_t ldiv(long int, long int);
48 | extern int mblen(const char *, size_t);
49 | extern int mbtowc(wchar_t *, const char *, size_t);
50 | extern int wctomb(char *, wchar_t);
51 | extern size_t mbstowcs(wchar_t *, const char *, size_t);
52 | extern size_t wcstombs(char *, const wchar_t *, size_t);
53 |
54 | #endif /* __STDLIB */
55 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/string.h:
--------------------------------------------------------------------------------
1 | #ifndef __STRING
2 | #define __STRING
3 |
4 | #define NULL 0
5 |
6 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
7 | #define _SIZE_T
8 | #define _SIZE_T_
9 | typedef unsigned long size_t;
10 | #endif
11 |
12 | void *memcpy(void *, const void *, size_t);
13 | void *memmove(void *, const void *, size_t);
14 | char *strcpy(char *, const char *);
15 | char *strncpy(char *, const char *, size_t);
16 | char *strcat(char *, const char *);
17 | char *strncat(char *, const char *, size_t);
18 | int memcmp(const void *, const void *, size_t);
19 | int strcmp(const char *, const char *);
20 | int strcoll(const char *, const char *);
21 | int strncmp(const char *, const char *, size_t);
22 | size_t strxfrm(char *, const char *, size_t);
23 | void *memchr(const void *, int, size_t);
24 | char *strchr(const char *, int);
25 | size_t strcspn(const char *, const char *);
26 | char *strpbrk(const char *, const char *);
27 | char *strrchr(const char *, int);
28 | size_t strspn(const char *, const char *);
29 | char *strstr(const char *, const char *);
30 | char *strtok(char *, const char *);
31 | void *memset(void *, int, size_t);
32 | char *strerror(int);
33 | size_t strlen(const char *);
34 |
35 | #endif /* __STRING */
36 |
--------------------------------------------------------------------------------
/lcc/include/mips/irix/time.h:
--------------------------------------------------------------------------------
1 | #ifndef __TIME
2 | #define __TIME
3 |
4 | #define CLOCKS_PER_SEC 1000000
5 | #ifndef NULL
6 | #define NULL 0
7 | #endif
8 |
9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_)
10 | #define _CLOCK_T
11 | #define _CLOCK_T_
12 | typedef long clock_t;
13 | #endif
14 |
15 | #if !defined(_TIME_T) && !defined(_TIME_T_)
16 | #define _TIME_T
17 | #define _TIME_T_
18 | typedef long time_t;
19 | #endif
20 |
21 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
22 | #define _SIZE_T
23 | #define _SIZE_T_
24 | typedef unsigned long size_t;
25 | #endif
26 |
27 | struct tm {
28 | int tm_sec;
29 | int tm_min;
30 | int tm_hour;
31 | int tm_mday;
32 | int tm_mon;
33 | int tm_year;
34 | int tm_wday;
35 | int tm_yday;
36 | int tm_isdst;
37 | };
38 | extern clock_t clock(void);
39 | extern double difftime(time_t, time_t);
40 | extern time_t mktime(struct tm *);
41 | extern time_t time(time_t *);
42 | extern char *asctime(const struct tm *);
43 | extern char *ctime(const time_t *);
44 | extern struct tm *gmtime(const time_t *);
45 | extern struct tm *localtime(const time_t *);
46 | extern size_t strftime(char *, size_t, const char *, const struct tm *);
47 |
48 | #endif /* __TIME */
49 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/assert.h:
--------------------------------------------------------------------------------
1 | #ifndef __ASSERT
2 | #define __ASSERT
3 |
4 | void assert(int);
5 |
6 | #endif /* __ASSERT */
7 |
8 | #undef assert
9 | #ifdef NDEBUG
10 | #define assert(ignore) ((void)0)
11 | #else
12 | extern void __assert(char *, char *, unsigned);
13 | #define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0)))
14 | #endif /* NDEBUG */
15 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/ctype.h:
--------------------------------------------------------------------------------
1 | #ifndef __CTYPE
2 | #define __CTYPE
3 |
4 | extern int isalnum(int);
5 | extern int isalpha(int);
6 | extern int iscntrl(int);
7 | extern int isdigit(int);
8 | extern int isgraph(int);
9 | extern int islower(int);
10 | extern int isprint(int);
11 | extern int ispunct(int);
12 | extern int isspace(int);
13 | extern int isupper(int);
14 | extern int isxdigit(int);
15 | extern int tolower(int);
16 | extern int toupper(int);
17 |
18 | #define __U 01
19 | #define __L 02
20 | #define __N 04
21 | #define __S 010
22 | #define __P 020
23 | #define __C 040
24 | #define _U 01
25 | #define _L 02
26 | #define _N 04
27 | #define _S 010
28 | #define _P 020
29 | #define _C 040
30 | #define _B 0100
31 | #define _X 0200
32 |
33 | extern unsigned char __ctype[];
34 | #define isalpha(c) ((__ctype + 1)[c] & (_U | _L))
35 | #define isupper(c) ((__ctype + 1)[c] & _U)
36 | #define islower(c) ((__ctype + 1)[c] & _L)
37 | #define isdigit(c) ((__ctype + 1)[c] & _N)
38 | #define isxdigit(c) ((__ctype + 1)[c] & _X)
39 | #define isalnum(c) ((__ctype + 1)[c] & (_U | _L | _N))
40 | #define isspace(c) ((__ctype + 1)[c] & _S)
41 | #define ispunct(c) ((__ctype + 1)[c] & _P)
42 | #define isprint(c) ((__ctype + 1)[c] & (_P | _U | _L | _N | _B))
43 | #define isgraph(c) ((__ctype + 1)[c] & (_P | _U | _L | _N))
44 | #define iscntrl(c) ((__ctype + 1)[c] & _C)
45 |
46 | #endif /* __CTYPE */
47 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/errno.h:
--------------------------------------------------------------------------------
1 | #ifndef __ERRNO
2 | #define __ERRNO
3 |
4 | #define EDOM 33
5 | #define ERANGE 34
6 | extern int errno;
7 |
8 | #endif /* __ERRNO */
9 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/float.h:
--------------------------------------------------------------------------------
1 | #ifndef __FLOAT
2 | #define __FLOAT
3 |
4 | #define FLT_ROUNDS 1
5 | #define FLT_RADIX 2
6 |
7 | #define FLT_DIG 6
8 | #define FLT_EPSILON 1.19209289550781250000e-07
9 | #define FLT_MANT_DIG 24
10 | #define FLT_MAX 3.40282346638528860000e+38
11 | #define FLT_MAX_10_EXP 38
12 | #define FLT_MAX_EXP 128
13 | #define FLT_MIN 1.17549435082228750000e-38
14 | #define FLT_MIN_10_EXP -37
15 | #define FLT_MIN_EXP -125
16 |
17 | #define DBL_DIG 15
18 | #define DBL_EPSILON 2.22044604925031310000e-16
19 | #define DBL_MANT_DIG 53
20 | #define DBL_MAX 1.79769313486231570000e+308
21 | #define DBL_MAX_10_EXP 308
22 | #define DBL_MAX_EXP 1024
23 | #define DBL_MIN 2.22507385850720140000e-308
24 | #define DBL_MIN_10_EXP -307
25 | #define DBL_MIN_EXP -1021
26 |
27 | #define LDBL_MANT_DIG DBL_MANT_DIG
28 | #define LDBL_EPSILON DBL_EPSILON
29 | #define LDBL_DIG DBL_DIG
30 | #define LDBL_MIN_EXP DBL_MIN_EXP
31 | #define LDBL_MIN DBL_MIN
32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
33 | #define LDBL_MAX_EXP DBL_MAX_EXP
34 | #define LDBL_MAX DBL_MAX
35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
36 |
37 | #endif /* __FLOAT */
38 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/limits.h:
--------------------------------------------------------------------------------
1 | #ifndef __LIMITS
2 | #define __LIMITS
3 |
4 | #define CHAR_BIT 8
5 | #define MB_LEN_MAX 1
6 |
7 | #define UCHAR_MAX 0xff
8 | #define USHRT_MAX 0xffff
9 | #define UINT_MAX (~0U)
10 | #define ULONG_MAX (~0UL)
11 |
12 | #define CHAR_MAX SCHAR_MAX
13 | #define SCHAR_MAX 0x7f
14 | #define SHRT_MAX 0x7fff
15 | #define INT_MAX 0x7fffffff
16 | #define LONG_MAX 0x7fffffffL
17 |
18 | #define CHAR_MIN SCHAR_MIN
19 | #define SCHAR_MIN (-SCHAR_MAX-1)
20 | #define SHRT_MIN (-SHRT_MAX-1)
21 | #define INT_MIN (-INT_MAX-1)
22 | #define LONG_MIN (-LONG_MAX-1)
23 |
24 | #endif /* __LIMITS */
25 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/locale.h:
--------------------------------------------------------------------------------
1 | #ifndef __LOCALE
2 | #define __LOCALE
3 |
4 | #define LC_ALL 0
5 | #define LC_COLLATE 1
6 | #define LC_CTYPE 2
7 | #define LC_MONETARY 3
8 | #define LC_NUMERIC 4
9 | #define LC_TIME 5
10 | #define NULL 0
11 |
12 | struct lconv {
13 | char *decimal_point;
14 | char *thousands_sep;
15 | char *grouping;
16 | char *int_curr_symbol;
17 | char *currency_symbol;
18 | char *mon_decimal_point;
19 | char *mon_thousands_sep;
20 | char *mon_grouping;
21 | char *positive_sign;
22 | char *negative_sign;
23 | char int_frac_digits;
24 | char frac_digits;
25 | char p_cs_precedes;
26 | char p_sep_by_space;
27 | char n_cs_precedes;
28 | char n_sep_by_space;
29 | char p_sign_posn;
30 | char n_sign_posn;
31 | };
32 |
33 | char *setlocale(int, const char *);
34 | struct lconv *localeconv(void);
35 |
36 | #endif /* __LOCALE */
37 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/math.h:
--------------------------------------------------------------------------------
1 | #ifndef __MATH
2 | #define __MATH
3 |
4 | extern double infinity(void);
5 | #define HUGE_VAL (infinity())
6 |
7 | extern double acos(double);
8 | extern double asin(double);
9 | extern double atan(double);
10 | extern double atan2(double, double);
11 | extern double cos(double);
12 | extern double sin(double);
13 | extern double tan(double);
14 | extern double cosh(double);
15 | extern double sinh(double);
16 | extern double tanh(double);
17 | extern double exp(double);
18 | extern double frexp(double, int *);
19 | extern double ldexp(double, int);
20 | extern double log(double);
21 | extern double log10(double);
22 | extern double modf(double, double *);
23 | extern double pow(double, double);
24 | extern double sqrt(double);
25 | extern double ceil(double);
26 | extern double fabs(double);
27 | extern double floor(double);
28 | extern double fmod(double, double);
29 |
30 | #endif /* __MATH */
31 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/setjmp.h:
--------------------------------------------------------------------------------
1 | #ifndef __SETJMP
2 | #define __SETJMP
3 |
4 |
5 |
6 | typedef int jmp_buf[12];
7 | int setjmp(jmp_buf);
8 | void longjmp(jmp_buf, int);
9 |
10 | #endif /* __SETJMP */
11 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/signal.h:
--------------------------------------------------------------------------------
1 | #ifndef __SIGNAL
2 | #define __SIGNAL
3 |
4 | typedef int sig_atomic_t;
5 |
6 | #define SIG_DFL ((void (*)(int))0)
7 | #define SIG_ERR ((void (*)(int))-1)
8 | #define SIG_IGN ((void (*)(int))1)
9 |
10 | #define SIGABRT 6
11 | #define SIGFPE 8
12 | #define SIGILL 4
13 | #define SIGINT 2
14 | #define SIGSEGV 11
15 | #define SIGTERM 15
16 |
17 | void (*signal(int, void (*)(int)))(int);
18 | int raise(int);
19 |
20 | #endif /* __SIGNAL */
21 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/stdarg.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDARG
2 | #define __STDARG
3 |
4 | #if !defined(_VA_LIST)
5 | #define _VA_LIST
6 | typedef char *__va_list;
7 | #endif
8 | typedef __va_list va_list;
9 |
10 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
11 | (char *)((int *)&(start)+1) : (char *)(&(start)+1))))
12 | #define __va_arg(list, mode, n) \
13 | (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
14 | #define _bigendian_va_arg(list, mode, n) (\
15 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
16 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
17 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
18 | #define va_end(list) ((void)0)
19 | #define va_arg(list, mode) (sizeof(mode)>8 ? \
20 | **(mode **)(&(list += 4)[-4]) : \
21 | _bigendian_va_arg(list, mode, 3U))
22 | #endif
23 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/stddef.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDDEF
2 | #define __STDDEF
3 |
4 | /* $Id$ */
5 |
6 | #define NULL 0
7 | #define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0))
8 |
9 | typedef long ptrdiff_t;
10 |
11 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
12 | #define _SIZE_T
13 | #define _SIZE_T_
14 | typedef unsigned long size_t;
15 | #endif
16 |
17 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
18 | #define _WCHAR_T
19 | #define _WCHAR_T_
20 | typedef unsigned short wchar_t;
21 | #endif
22 |
23 | #endif /* __STDDEF */
24 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/stdlib.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDLIB
2 | #define __STDLIB
3 |
4 | #define EXIT_FAILURE 1
5 | #define EXIT_SUCCESS 0
6 | #define MB_CUR_MAX 1
7 | #define NULL 0
8 | #define RAND_MAX 32767
9 |
10 | typedef struct { int quot, rem; } div_t;
11 | typedef struct { long quot, rem; } ldiv_t;
12 |
13 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
14 | #define _SIZE_T
15 | #define _SIZE_T_
16 | typedef unsigned long size_t;
17 | #endif
18 |
19 | #if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
20 | #define _WCHAR_T
21 | #define _WCHAR_T_
22 | typedef unsigned char wchar_t;
23 | #endif
24 |
25 | extern double atof(const char *);
26 | extern int atoi(const char *);
27 | extern long int atol(const char *);
28 | extern double strtod(const char *, char **);
29 | extern long int strtol(const char *, char **, int);
30 | extern unsigned long int strtoul(const char *, char **, int);
31 | extern int rand(void);
32 | extern void srand(unsigned int);
33 | extern void *calloc(size_t, size_t);
34 | extern void free(void *);
35 | extern void *malloc(size_t);
36 | extern void *realloc(void *, size_t);
37 | extern void abort(void);
38 | extern int atexit(void (*)(void));
39 | extern void exit(int);
40 | extern char *getenv(const char *);
41 | extern int system(const char *);
42 | extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
43 | extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
44 | extern int abs(int);
45 | extern div_t div(int, int);
46 | extern long int labs(long int);
47 | extern ldiv_t ldiv(long int, long int);
48 | extern int mblen(const char *, size_t);
49 | extern int mbtowc(wchar_t *, const char *, size_t);
50 | extern int wctomb(char *, wchar_t);
51 | extern size_t mbstowcs(wchar_t *, const char *, size_t);
52 | extern size_t wcstombs(char *, const wchar_t *, size_t);
53 |
54 | #endif /* __STDLIB */
55 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/string.h:
--------------------------------------------------------------------------------
1 | #ifndef __STRING
2 | #define __STRING
3 |
4 | #define NULL 0
5 |
6 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
7 | #define _SIZE_T
8 | #define _SIZE_T_
9 | typedef unsigned long size_t;
10 | #endif
11 |
12 | void *memcpy(void *, const void *, size_t);
13 | void *memmove(void *, const void *, size_t);
14 | char *strcpy(char *, const char *);
15 | char *strncpy(char *, const char *, size_t);
16 | char *strcat(char *, const char *);
17 | char *strncat(char *, const char *, size_t);
18 | int memcmp(const void *, const void *, size_t);
19 | int strcmp(const char *, const char *);
20 | int strcoll(const char *, const char *);
21 | int strncmp(const char *, const char *, size_t);
22 | size_t strxfrm(char *, const char *, size_t);
23 | void *memchr(const void *, int, size_t);
24 | char *strchr(const char *, int);
25 | size_t strcspn(const char *, const char *);
26 | char *strpbrk(const char *, const char *);
27 | char *strrchr(const char *, int);
28 | size_t strspn(const char *, const char *);
29 | char *strstr(const char *, const char *);
30 | char *strtok(char *, const char *);
31 | void *memset(void *, int, size_t);
32 | char *strerror(int);
33 | size_t strlen(const char *);
34 |
35 | #endif /* __STRING */
36 |
--------------------------------------------------------------------------------
/lcc/include/sparc/solaris/time.h:
--------------------------------------------------------------------------------
1 | #ifndef __TIME
2 | #define __TIME
3 |
4 | #define CLOCKS_PER_SEC 1000000
5 | #ifndef NULL
6 | #define NULL 0
7 | #endif
8 |
9 | #if !defined(_CLOCK_T) && !defined(_CLOCK_T_)
10 | #define _CLOCK_T
11 | #define _CLOCK_T_
12 | typedef long clock_t;
13 | #endif
14 |
15 | #if !defined(_TIME_T) && !defined(_TIME_T_)
16 | #define _TIME_T
17 | #define _TIME_T_
18 | typedef long time_t;
19 | #endif
20 |
21 | #if !defined(_SIZE_T) && !defined(_SIZE_T_)
22 | #define _SIZE_T
23 | #define _SIZE_T_
24 | typedef unsigned long size_t;
25 | #endif
26 |
27 | struct tm {
28 | int tm_sec;
29 | int tm_min;
30 | int tm_hour;
31 | int tm_mday;
32 | int tm_mon;
33 | int tm_year;
34 | int tm_wday;
35 | int tm_yday;
36 | int tm_isdst;
37 | };
38 | extern clock_t clock(void);
39 | extern double difftime(time_t, time_t);
40 | extern time_t mktime(struct tm *);
41 | extern time_t time(time_t *);
42 | extern char *asctime(const struct tm *);
43 | extern char *ctime(const time_t *);
44 | extern struct tm *gmtime(const time_t *);
45 | extern struct tm *localtime(const time_t *);
46 | extern size_t strftime(char *, size_t, const char *, const struct tm *);
47 |
48 | #endif /* __TIME */
49 |
--------------------------------------------------------------------------------
/lcc/include/x86/linux/assert.h:
--------------------------------------------------------------------------------
1 | #ifndef __ASSERT
2 | #define __ASSERT
3 |
4 | void assert(int);
5 |
6 | #endif /* __ASSERT */
7 |
8 | #undef assert
9 | #ifdef NDEBUG
10 | #define assert(ignore) ((void)0)
11 | #else
12 | extern int _assert(char *, char *, unsigned);
13 | #define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__)))
14 | #endif /* NDEBUG */
15 |
--------------------------------------------------------------------------------
/lcc/include/x86/linux/float.h:
--------------------------------------------------------------------------------
1 | #ifndef __FLOAT
2 | #define __FLOAT
3 |
4 | #define FLT_ROUNDS (__flt_rounds())
5 | #define FLT_RADIX 2
6 |
7 | #define FLT_DIG 6
8 | #define FLT_EPSILON 1.19209289550781250000e-07
9 | #define FLT_MANT_DIG 24
10 | #define FLT_MAX 3.40282346638528860000e+38
11 | #define FLT_MAX_10_EXP 38
12 | #define FLT_MAX_EXP 128
13 | #define FLT_MIN 1.17549435082228750000e-38
14 | #define FLT_MIN_10_EXP -37
15 | #define FLT_MIN_EXP -125
16 |
17 | #define DBL_DIG 15
18 | #define DBL_EPSILON 2.22044604925031310000e-16
19 | #define DBL_MANT_DIG 53
20 | #define DBL_MAX 1.79769313486231570000e+308
21 | #define DBL_MAX_10_EXP 308
22 | #define DBL_MAX_EXP 1024
23 | #define DBL_MIN 2.22507385850720140000e-308
24 | #define DBL_MIN_10_EXP -307
25 | #define DBL_MIN_EXP -1021
26 |
27 | #define LDBL_MANT_DIG DBL_MANT_DIG
28 | #define LDBL_EPSILON DBL_EPSILON
29 | #define LDBL_DIG DBL_DIG
30 | #define LDBL_MIN_EXP DBL_MIN_EXP
31 | #define LDBL_MIN DBL_MIN
32 | #define LDBL_MIN_10_EXP DBL_MIN_10_EXP
33 | #define LDBL_MAX_EXP DBL_MAX_EXP
34 | #define LDBL_MAX DBL_MAX
35 | #define LDBL_MAX_10_EXP DBL_MAX_10_EXP
36 |
37 | #endif /* __FLOAT */
38 |
--------------------------------------------------------------------------------
/lcc/include/x86/linux/stdarg.h:
--------------------------------------------------------------------------------
1 | #ifndef __STDARG
2 | #define __STDARG
3 |
4 | #if !defined(_VA_LIST)
5 | #define _VA_LIST
6 | typedef char *__va_list;
7 | #endif
8 | typedef __va_list va_list;
9 |
10 | #define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
11 | (char *)((int *)&(start)+1) : (char *)(&(start)+1))))
12 | #define __va_arg(list, mode, n) \
13 | (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
14 | #define _bigendian_va_arg(list, mode, n) (\
15 | sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
16 | sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
17 | #define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
18 | #define va_end(list) ((void)0)
19 | #define va_arg(list, mode) _littleendian_va_arg(list, mode, 3U)
20 | typedef void *__gnuc_va_list;
21 | #endif
22 |
--------------------------------------------------------------------------------
/lcc/lib/assert.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | static char rcsid[] = "$Id$";
5 |
6 | int _assert(char *e, char *file, int line) {
7 | fprintf(stderr, "assertion failed:");
8 | if (e)
9 | fprintf(stderr, " %s", e);
10 | if (file)
11 | fprintf(stderr, " file %s", file);
12 | fprintf(stderr, " line %d\n", line);
13 | fflush(stderr);
14 | abort();
15 | return 0;
16 | }
17 |
--------------------------------------------------------------------------------
/lcc/lib/yynull.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | static char rcsid[] = "$Id$";
5 |
6 | void _YYnull(char *file, int line) {
7 | fprintf(stderr, "null pointer dereferenced:");
8 | if (file)
9 | fprintf(stderr, " file %s,", file);
10 | fprintf(stderr, " line %d\n", line);
11 | fflush(stderr);
12 | abort();
13 | }
14 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/8q.1bk:
--------------------------------------------------------------------------------
1 | 1 5 8 6 3 7 2 4
2 | 1 6 8 3 7 4 2 5
3 | 1 7 4 6 8 2 5 3
4 | 1 7 5 8 2 4 6 3
5 | 2 4 6 8 3 1 7 5
6 | 2 5 7 1 3 8 6 4
7 | 2 5 7 4 1 8 6 3
8 | 2 6 1 7 4 8 3 5
9 | 2 6 8 3 1 4 7 5
10 | 2 7 3 6 8 5 1 4
11 | 2 7 5 8 1 4 6 3
12 | 2 8 6 1 3 5 7 4
13 | 3 1 7 5 8 2 4 6
14 | 3 5 2 8 1 7 4 6
15 | 3 5 2 8 6 4 7 1
16 | 3 5 7 1 4 2 8 6
17 | 3 5 8 4 1 7 2 6
18 | 3 6 2 5 8 1 7 4
19 | 3 6 2 7 1 4 8 5
20 | 3 6 2 7 5 1 8 4
21 | 3 6 4 1 8 5 7 2
22 | 3 6 4 2 8 5 7 1
23 | 3 6 8 1 4 7 5 2
24 | 3 6 8 1 5 7 2 4
25 | 3 6 8 2 4 1 7 5
26 | 3 7 2 8 5 1 4 6
27 | 3 7 2 8 6 4 1 5
28 | 3 8 4 7 1 6 2 5
29 | 4 1 5 8 2 7 3 6
30 | 4 1 5 8 6 3 7 2
31 | 4 2 5 8 6 1 3 7
32 | 4 2 7 3 6 8 1 5
33 | 4 2 7 3 6 8 5 1
34 | 4 2 7 5 1 8 6 3
35 | 4 2 8 5 7 1 3 6
36 | 4 2 8 6 1 3 5 7
37 | 4 6 1 5 2 8 3 7
38 | 4 6 8 2 7 1 3 5
39 | 4 6 8 3 1 7 5 2
40 | 4 7 1 8 5 2 6 3
41 | 4 7 3 8 2 5 1 6
42 | 4 7 5 2 6 1 3 8
43 | 4 7 5 3 1 6 8 2
44 | 4 8 1 3 6 2 7 5
45 | 4 8 1 5 7 2 6 3
46 | 4 8 5 3 1 7 2 6
47 | 5 1 4 6 8 2 7 3
48 | 5 1 8 4 2 7 3 6
49 | 5 1 8 6 3 7 2 4
50 | 5 2 4 6 8 3 1 7
51 | 5 2 4 7 3 8 6 1
52 | 5 2 6 1 7 4 8 3
53 | 5 2 8 1 4 7 3 6
54 | 5 3 1 6 8 2 4 7
55 | 5 3 1 7 2 8 6 4
56 | 5 3 8 4 7 1 6 2
57 | 5 7 1 3 8 6 4 2
58 | 5 7 1 4 2 8 6 3
59 | 5 7 2 4 8 1 3 6
60 | 5 7 2 6 3 1 4 8
61 | 5 7 2 6 3 1 8 4
62 | 5 7 4 1 3 8 6 2
63 | 5 8 4 1 3 6 2 7
64 | 5 8 4 1 7 2 6 3
65 | 6 1 5 2 8 3 7 4
66 | 6 2 7 1 3 5 8 4
67 | 6 2 7 1 4 8 5 3
68 | 6 3 1 7 5 8 2 4
69 | 6 3 1 8 4 2 7 5
70 | 6 3 1 8 5 2 4 7
71 | 6 3 5 7 1 4 2 8
72 | 6 3 5 8 1 4 2 7
73 | 6 3 7 2 4 8 1 5
74 | 6 3 7 2 8 5 1 4
75 | 6 3 7 4 1 8 2 5
76 | 6 4 1 5 8 2 7 3
77 | 6 4 2 8 5 7 1 3
78 | 6 4 7 1 3 5 2 8
79 | 6 4 7 1 8 2 5 3
80 | 6 8 2 4 1 7 5 3
81 | 7 1 3 8 6 4 2 5
82 | 7 2 4 1 8 5 3 6
83 | 7 2 6 3 1 4 8 5
84 | 7 3 1 6 8 5 2 4
85 | 7 3 8 2 5 1 6 4
86 | 7 4 2 5 8 1 3 6
87 | 7 4 2 8 6 1 3 5
88 | 7 5 3 1 6 8 2 4
89 | 8 2 4 1 7 5 3 6
90 | 8 2 5 3 1 7 4 6
91 | 8 3 1 6 2 5 7 4
92 | 8 4 1 3 6 2 7 5
93 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/8q.2bk:
--------------------------------------------------------------------------------
1 | tst/8q.c:30: warning: missing return value
2 | tst/8q.c:39: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/array.1bk:
--------------------------------------------------------------------------------
1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
5 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/array.2bk:
--------------------------------------------------------------------------------
1 | tst/array.c:33: warning: missing return value
2 | tst/array.c:48: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/cf.1bk:
--------------------------------------------------------------------------------
1 | char freq
2 | 011 8.1
3 | 012 6.1
4 | 040 11.9
5 | ! 0.2
6 | " 1.5
7 | % 0.6
8 | & 0.4
9 | ' 0.4
10 | ( 2.9
11 | ) 2.9
12 | * 0.8
13 | + 1.3
14 | , 1.3
15 | - 0.4
16 | . 0.6
17 | / 1.0
18 | 0 2.5
19 | 1 1.9
20 | 2 0.6
21 | 3 0.2
22 | 7 0.4
23 | 8 0.2
24 | ; 3.8
25 | < 0.8
26 | = 2.7
27 | > 0.2
28 | [ 1.5
29 | \ 0.8
30 | ] 1.5
31 | a 3.1
32 | c 4.4
33 | e 2.3
34 | f 6.0
35 | g 1.3
36 | h 1.0
37 | i 5.0
38 | l 1.0
39 | m 0.2
40 | n 3.3
41 | o 2.1
42 | p 1.0
43 | q 0.4
44 | r 4.2
45 | s 0.6
46 | t 3.8
47 | u 1.2
48 | v 0.6
49 | w 0.2
50 | { 0.6
51 | } 0.6
52 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/cf.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/mips/irix/tst/cf.2bk
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/cq.1bk:
--------------------------------------------------------------------------------
1 | Section s22 returned 0.
2 | Decimal and octal/hex constants sometimes give
3 | different results when assigned to longs.
4 | Decimal and octal/hex constants sometimes give
5 | different results when assigned to longs.
6 | Section s241 returned 0.
7 | Section s243 returned 0.
8 | Section s244 returned 0.
9 | Section s25 returned 0.
10 | 8 bits in chars.
11 | 32 bits in ints.
12 | 16 bits in shorts.
13 | 32 bits in longs.
14 | 32 bits in unsigneds.
15 | 32 bits in floats.
16 | 64 bits in doubles.
17 | 1.192093e-07 is the least number that can be added to 1. (float).
18 | 2.220446e-16 is the least number that can be added to 1. (double).
19 | Section s26 returned 0.
20 | Section s4 returned 0.
21 | Section s61 returned 0.
22 | Section s626 returned 0.
23 | Section s71 returned 0.
24 | Section s72 returned 0.
25 | Section s757 returned 0.
26 | Section s7813 returned 0.
27 | Section s714 returned 0.
28 | Section s715 returned 0.
29 | Register count for char is unreliable.
30 | Register count for pointer is unreliable.
31 | Register count for int is unreliable.
32 | Section s81 returned 0.
33 | Section s84 returned 0.
34 | char alignment: 1
35 | short alignment: 2
36 | int alignment: 4
37 | long alignment: 4
38 | unsigned alignment: 4
39 | float alignment: 4
40 | double alignment: 8
41 | Sign extension in fields
42 | Be especially careful with 1-bit fields!
43 | Section s85 returned 0.
44 | Section s86 returned 0.
45 | Section s88 returned 0.
46 | Section s9 returned 0.
47 |
48 | No errors detected.
49 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/cq.2bk:
--------------------------------------------------------------------------------
1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
4 | tst/cq.c:395: warning: overflow in constant `4294967296'
5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
6 | tst/cq.c:395: warning: overflow in constant `040000000000'
7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
8 | tst/cq.c:395: warning: overflow in constant `0x100000000'
9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
10 | tst/cq.c:396: warning: overflow in constant `68719476735'
11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
12 | tst/cq.c:396: warning: overflow in constant `0777777777777'
13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff'
15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
16 | tst/cq.c:397: warning: overflow in constant `68719476736'
17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
18 | tst/cq.c:397: warning: overflow in constant `01000000000000'
19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
20 | tst/cq.c:397: warning: overflow in constant `0x1000000000'
21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
22 | tst/cq.c:533: warning: missing return value
23 | tst/cq.c:1169: warning: missing return value
24 | tst/cq.c:5294: warning: unreachable code
25 | tst/cq.c:5303: warning: missing return value
26 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/cvt.1bk:
--------------------------------------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
12 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/cvt.2bk:
--------------------------------------------------------------------------------
1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
3 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/fields.1bk:
--------------------------------------------------------------------------------
1 | x = 1 2 3 4 -3 6
2 | y = 3 8 9
3 | x = 1 2 3 0 0 6
4 | y = 2 8 16
5 | p->a = 0x3, p->b = 0xf
6 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/fields.2bk:
--------------------------------------------------------------------------------
1 | tst/fields.c:6: warning: initializer exceeds bit-field width
2 | tst/fields.c:8: warning: initializer exceeds bit-field width
3 | tst/fields.c:30: warning: missing return value
4 | tst/fields.c:34: warning: missing return value
5 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/incr.2bk:
--------------------------------------------------------------------------------
1 | tst/incr.c:1: warning: missing return value
2 | tst/incr.c:6: warning: expression with no effect elided
3 | tst/incr.c:6: warning: expression with no effect elided
4 | tst/incr.c:11: warning: missing return value
5 | tst/incr.c:16: warning: expression with no effect elided
6 | tst/incr.c:16: warning: expression with no effect elided
7 | tst/incr.c:21: warning: missing return value
8 | tst/incr.c:30: warning: missing return value
9 | tst/incr.c:39: warning: missing return value
10 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/init.1bk:
--------------------------------------------------------------------------------
1 | 1 2 3 4
2 | 5 6
3 | 7
4 | if
5 | for
6 | else
7 | while
8 | 1 2 3 if
9 | 4 5 0 for
10 | 6 7 8 else
11 | 9 10 11 while
12 | 1 2 3 if
13 | 4 5 0 for
14 | 6 7 8 else
15 | 9 10 11 while
16 | 0 0 0
17 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/init.2bk:
--------------------------------------------------------------------------------
1 | tst/init.c:36: warning: missing return value
2 | tst/init.c:49: warning: missing return value
3 | tst/init.c:59: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/limits.1bk:
--------------------------------------------------------------------------------
1 | UCHAR_MAX: 000000ff=255
2 | USHRT_MAX: 0000ffff=65535
3 | UINT_MAX: ffffffff=-1
4 | ULONG_MAX: ffffffff=-1
5 | CHAR_MAX: 0000007f=127
6 | SCHAR_MAX: 0000007f=127
7 | SHRT_MAX: 00007fff=32767
8 | INT_MAX: 7fffffff=2147483647
9 | LONG_MAX: 7fffffff=2147483647
10 | CHAR_MIN: ffffff80=-128
11 | SCHAR_MIN: ffffff80=-128
12 | SHRT_MIN: ffff8000=-32768
13 | INT_MIN: 80000000=-2147483648
14 | LONG_MIN: 80000000=-2147483648
15 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/limits.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/mips/irix/tst/limits.2bk
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/paranoia.2bk:
--------------------------------------------------------------------------------
1 | tst/paranoia.c:1867: warning: missing return value
2 | tst/paranoia.c:1874: warning: missing return value
3 | tst/paranoia.c:1884: warning: missing return value
4 | tst/paranoia.c:1924: warning: missing return value
5 | tst/paranoia.c:1939: warning: missing return value
6 | tst/paranoia.c:1956: warning: missing return value
7 | tst/paranoia.c:1975: warning: missing return value
8 | tst/paranoia.c:1988: warning: missing return value
9 | tst/paranoia.c:1995: warning: missing return value
10 | tst/paranoia.c:2055: warning: missing return value
11 | tst/paranoia.c:2062: warning: missing return value
12 | tst/paranoia.c:2070: warning: missing return value
13 | tst/paranoia.c:2087: warning: missing return value
14 | tst/paranoia.c:2115: warning: missing return value
15 | tst/paranoia.c:2144: warning: missing return value
16 | tst/paranoia.c:2173: warning: missing return value
17 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/sort.1bk:
--------------------------------------------------------------------------------
1 | exchange(1,9)
2 | exchange(3,7)
3 | exchange(5,6)
4 | exchange(0,5)
5 | exchange(0,3)
6 | exchange(0,0)
7 | exchange(1,2)
8 | exchange(6,6)
9 | exchange(8,9)
10 | exchange(7,8)
11 | -51
12 | -1
13 | 0
14 | 1
15 | 3
16 | 10
17 | 18
18 | 32
19 | 567
20 | 789
21 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/sort.2bk:
--------------------------------------------------------------------------------
1 | tst/sort.c:23: warning: missing return value
2 | tst/sort.c:30: warning: missing return value
3 | tst/sort.c:37: warning: missing return value
4 | tst/sort.c:41: warning: missing return value
5 | tst/sort.c:65: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/spill.2bk:
--------------------------------------------------------------------------------
1 | tst/spill.c:1: warning: missing return value
2 | tst/spill.c:3: warning: missing return value
3 | tst/spill.c:5: warning: missing return value
4 | tst/spill.c:7: warning: missing return value
5 | tst/spill.c:9: warning: missing return value
6 | tst/spill.c:17: warning: missing return value
7 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/stdarg.1bk:
--------------------------------------------------------------------------------
1 | test 1
2 | test 2
3 | test 3
4 | test 4
5 | test 5.000000
6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
7 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/stdarg.2bk:
--------------------------------------------------------------------------------
1 | tst/stdarg.c:51: warning: missing return value
2 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/struct.1bk:
--------------------------------------------------------------------------------
1 | (-1,-1) is not within [10,10; 310,310]
2 | (1,1) is not within [10,10; 310,310]
3 | (20,300) is within [10,10; 310,310]
4 | (500,400) is not within [10,10; 310,310]
5 | ab
6 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/struct.2bk:
--------------------------------------------------------------------------------
1 | tst/struct.c:49: warning: missing return value
2 | tst/struct.c:68: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/switch.1bk:
--------------------------------------------------------------------------------
1 | b = 0x8
2 | f = 0xc
3 | n = 0xa
4 | r = 0xd
5 | t = 0x9
6 | v = 0xb
7 | x = 0x78
8 | f:
9 | x = 0
10 | x = 1
11 | x = 2
12 | x = 2
13 | x = 2
14 | x = 2
15 | x = 2
16 | x = 7
17 | x = 8
18 | x = 9
19 | x = 9
20 | x = 9
21 | x = 9
22 | x = 9
23 | x = 9
24 | x = 9
25 | x = 16
26 | x = 17
27 | x = 18
28 | x = 19
29 | x = 20
30 | g:
31 | 1 1
32 | 1 2
33 | 2 3
34 | 2 4
35 | 2 5
36 | 3 6
37 | d 6
38 | 3 7
39 | d 7
40 | 3 8
41 | d 8
42 | d 9
43 | d 10
44 | h:
45 | i = 8
46 | i = 16
47 | i = 120
48 | i = 128
49 | i = 248
50 | i = 264
51 | i = 272
52 | i = 280
53 | i = 288
54 | i = 296
55 | i = 304
56 | i = 312
57 | 488 defaults
58 | x = 0x1000000
59 | x = 0x2000000
60 | x = 0x3000000
61 | x = 0x4000000
62 | x = 0x5000000
63 | x = 0x6000000 (default)
64 | x = 0x7000000 (default)
65 | 0
66 | 1
67 | 2
68 | 3
69 | 4
70 | 5
71 | 0
72 | 1
73 | 2
74 | 3
75 | 4
76 | 5
77 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/switch.2bk:
--------------------------------------------------------------------------------
1 | tst/switch.c:55: warning: missing return value
2 | tst/switch.c:73: warning: missing return value
3 | tst/switch.c:97: warning: missing return value
4 | tst/switch.c:112: warning: missing return value
5 | tst/switch.c:137: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/wf1.1bk:
--------------------------------------------------------------------------------
1 | 5 a
2 | 2 and
3 | 5 buf
4 | 16 c
5 | 8 char
6 | 1 compare
7 | 4 cond
8 | 5 count
9 | 1 d
10 | 1 die
11 | 3 else
12 | 1 entry
13 | 1 eof
14 | 4 err
15 | 1 error
16 | 1 exit
17 | 1 folded
18 | 1 for
19 | 1 free
20 | 1 frequencies
21 | 1 frequency
22 | 1 get
23 | 2 getchar
24 | 3 getword
25 | 14 if
26 | 2 in
27 | 1 index
28 | 1 input
29 | 1 install
30 | 8 int
31 | 1 into
32 | 1 is
33 | 4 isletter
34 | 1 it
35 | 1 itself
36 | 5 left
37 | 1 letter
38 | 7 lookup
39 | 1 main
40 | 2 malloc
41 | 1 message
42 | 2 n
43 | 1 necessary
44 | 12 next
45 | 9 node
46 | 4 of
47 | 1 on
48 | 1 or
49 | 1 otherwise
50 | 2 out
51 | 8 p
52 | 3 print
53 | 2 printf
54 | 16 return
55 | 5 right
56 | 4 root
57 | 25 s
58 | 2 storage
59 | 3 strcmp
60 | 1 strcpy
61 | 1 strlen
62 | 8 struct
63 | 1 structures
64 | 2 subtree
65 | 1 t
66 | 5 tprint
67 | 9 tree
68 | 1 uses
69 | 1 version
70 | 1 wf
71 | 3 while
72 | 21 word
73 | 9 words
74 | 2 z
75 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/wf1.2bk:
--------------------------------------------------------------------------------
1 | tst/wf1.c:29: warning: missing return value
2 | tst/wf1.c:87: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/yacc.1bk:
--------------------------------------------------------------------------------
1 | a
2 | b
3 | load
4 | negate
5 | push 5
6 | c
7 | load
8 | multiply
9 | add
10 | store
11 |
--------------------------------------------------------------------------------
/lcc/mips/irix/tst/yacc.2bk:
--------------------------------------------------------------------------------
1 | tst/yacc.c:345: warning: missing return value
2 | tst/yacc.c:349: warning: missing return value
3 | tst/yacc.c:359: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/8q.1bk:
--------------------------------------------------------------------------------
1 | 1 5 8 6 3 7 2 4
2 | 1 6 8 3 7 4 2 5
3 | 1 7 4 6 8 2 5 3
4 | 1 7 5 8 2 4 6 3
5 | 2 4 6 8 3 1 7 5
6 | 2 5 7 1 3 8 6 4
7 | 2 5 7 4 1 8 6 3
8 | 2 6 1 7 4 8 3 5
9 | 2 6 8 3 1 4 7 5
10 | 2 7 3 6 8 5 1 4
11 | 2 7 5 8 1 4 6 3
12 | 2 8 6 1 3 5 7 4
13 | 3 1 7 5 8 2 4 6
14 | 3 5 2 8 1 7 4 6
15 | 3 5 2 8 6 4 7 1
16 | 3 5 7 1 4 2 8 6
17 | 3 5 8 4 1 7 2 6
18 | 3 6 2 5 8 1 7 4
19 | 3 6 2 7 1 4 8 5
20 | 3 6 2 7 5 1 8 4
21 | 3 6 4 1 8 5 7 2
22 | 3 6 4 2 8 5 7 1
23 | 3 6 8 1 4 7 5 2
24 | 3 6 8 1 5 7 2 4
25 | 3 6 8 2 4 1 7 5
26 | 3 7 2 8 5 1 4 6
27 | 3 7 2 8 6 4 1 5
28 | 3 8 4 7 1 6 2 5
29 | 4 1 5 8 2 7 3 6
30 | 4 1 5 8 6 3 7 2
31 | 4 2 5 8 6 1 3 7
32 | 4 2 7 3 6 8 1 5
33 | 4 2 7 3 6 8 5 1
34 | 4 2 7 5 1 8 6 3
35 | 4 2 8 5 7 1 3 6
36 | 4 2 8 6 1 3 5 7
37 | 4 6 1 5 2 8 3 7
38 | 4 6 8 2 7 1 3 5
39 | 4 6 8 3 1 7 5 2
40 | 4 7 1 8 5 2 6 3
41 | 4 7 3 8 2 5 1 6
42 | 4 7 5 2 6 1 3 8
43 | 4 7 5 3 1 6 8 2
44 | 4 8 1 3 6 2 7 5
45 | 4 8 1 5 7 2 6 3
46 | 4 8 5 3 1 7 2 6
47 | 5 1 4 6 8 2 7 3
48 | 5 1 8 4 2 7 3 6
49 | 5 1 8 6 3 7 2 4
50 | 5 2 4 6 8 3 1 7
51 | 5 2 4 7 3 8 6 1
52 | 5 2 6 1 7 4 8 3
53 | 5 2 8 1 4 7 3 6
54 | 5 3 1 6 8 2 4 7
55 | 5 3 1 7 2 8 6 4
56 | 5 3 8 4 7 1 6 2
57 | 5 7 1 3 8 6 4 2
58 | 5 7 1 4 2 8 6 3
59 | 5 7 2 4 8 1 3 6
60 | 5 7 2 6 3 1 4 8
61 | 5 7 2 6 3 1 8 4
62 | 5 7 4 1 3 8 6 2
63 | 5 8 4 1 3 6 2 7
64 | 5 8 4 1 7 2 6 3
65 | 6 1 5 2 8 3 7 4
66 | 6 2 7 1 3 5 8 4
67 | 6 2 7 1 4 8 5 3
68 | 6 3 1 7 5 8 2 4
69 | 6 3 1 8 4 2 7 5
70 | 6 3 1 8 5 2 4 7
71 | 6 3 5 7 1 4 2 8
72 | 6 3 5 8 1 4 2 7
73 | 6 3 7 2 4 8 1 5
74 | 6 3 7 2 8 5 1 4
75 | 6 3 7 4 1 8 2 5
76 | 6 4 1 5 8 2 7 3
77 | 6 4 2 8 5 7 1 3
78 | 6 4 7 1 3 5 2 8
79 | 6 4 7 1 8 2 5 3
80 | 6 8 2 4 1 7 5 3
81 | 7 1 3 8 6 4 2 5
82 | 7 2 4 1 8 5 3 6
83 | 7 2 6 3 1 4 8 5
84 | 7 3 1 6 8 5 2 4
85 | 7 3 8 2 5 1 6 4
86 | 7 4 2 5 8 1 3 6
87 | 7 4 2 8 6 1 3 5
88 | 7 5 3 1 6 8 2 4
89 | 8 2 4 1 7 5 3 6
90 | 8 2 5 3 1 7 4 6
91 | 8 3 1 6 2 5 7 4
92 | 8 4 1 3 6 2 7 5
93 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/8q.2bk:
--------------------------------------------------------------------------------
1 | tst/8q.c:30: warning: missing return value
2 | tst/8q.c:39: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/array.1bk:
--------------------------------------------------------------------------------
1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
5 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/array.2bk:
--------------------------------------------------------------------------------
1 | tst/array.c:33: warning: missing return value
2 | tst/array.c:48: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/cf.1bk:
--------------------------------------------------------------------------------
1 | char freq
2 | 011 8.1
3 | 012 6.1
4 | 040 11.9
5 | ! 0.2
6 | " 1.5
7 | % 0.6
8 | & 0.4
9 | ' 0.4
10 | ( 2.9
11 | ) 2.9
12 | * 0.8
13 | + 1.3
14 | , 1.3
15 | - 0.4
16 | . 0.6
17 | / 1.0
18 | 0 2.5
19 | 1 1.9
20 | 2 0.6
21 | 3 0.2
22 | 7 0.4
23 | 8 0.2
24 | ; 3.8
25 | < 0.8
26 | = 2.7
27 | > 0.2
28 | [ 1.5
29 | \ 0.8
30 | ] 1.5
31 | a 3.1
32 | c 4.4
33 | e 2.3
34 | f 6.0
35 | g 1.3
36 | h 1.0
37 | i 5.0
38 | l 1.0
39 | m 0.2
40 | n 3.3
41 | o 2.1
42 | p 1.0
43 | q 0.4
44 | r 4.2
45 | s 0.6
46 | t 3.8
47 | u 1.2
48 | v 0.6
49 | w 0.2
50 | { 0.6
51 | } 0.6
52 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/cf.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/sparc/solaris/tst/cf.2bk
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/cq.1bk:
--------------------------------------------------------------------------------
1 | Section s22 returned 0.
2 | Decimal and octal/hex constants sometimes give
3 | different results when assigned to longs.
4 | Decimal and octal/hex constants sometimes give
5 | different results when assigned to longs.
6 | Section s241 returned 0.
7 | Section s243 returned 0.
8 | Section s244 returned 0.
9 | Section s25 returned 0.
10 | 8 bits in chars.
11 | 32 bits in ints.
12 | 16 bits in shorts.
13 | 32 bits in longs.
14 | 32 bits in unsigneds.
15 | 32 bits in floats.
16 | 64 bits in doubles.
17 | 1.192093e-07 is the least number that can be added to 1. (float).
18 | 2.220446e-16 is the least number that can be added to 1. (double).
19 | Section s26 returned 0.
20 | Section s4 returned 0.
21 | Section s61 returned 0.
22 | Section s626 returned 0.
23 | Section s71 returned 0.
24 | Section s72 returned 0.
25 | Section s757 returned 0.
26 | Section s7813 returned 0.
27 | Section s714 returned 0.
28 | Section s715 returned 0.
29 | Register count for char is unreliable.
30 | Register count for pointer is unreliable.
31 | Register count for int is unreliable.
32 | Section s81 returned 0.
33 | Section s84 returned 0.
34 | char alignment: 1
35 | short alignment: 2
36 | int alignment: 4
37 | long alignment: 4
38 | unsigned alignment: 4
39 | float alignment: 4
40 | double alignment: 8
41 | Sign extension in fields
42 | Be especially careful with 1-bit fields!
43 | Section s85 returned 0.
44 | Section s86 returned 0.
45 | Section s88 returned 0.
46 | Section s9 returned 0.
47 |
48 | No errors detected.
49 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/cq.2bk:
--------------------------------------------------------------------------------
1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
4 | tst/cq.c:395: warning: overflow in constant `4294967296'
5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
6 | tst/cq.c:395: warning: overflow in constant `040000000000'
7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
8 | tst/cq.c:395: warning: overflow in constant `0x100000000'
9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
10 | tst/cq.c:396: warning: overflow in constant `68719476735'
11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
12 | tst/cq.c:396: warning: overflow in constant `0777777777777'
13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff'
15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
16 | tst/cq.c:397: warning: overflow in constant `68719476736'
17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
18 | tst/cq.c:397: warning: overflow in constant `01000000000000'
19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
20 | tst/cq.c:397: warning: overflow in constant `0x1000000000'
21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
22 | tst/cq.c:533: warning: missing return value
23 | tst/cq.c:1169: warning: missing return value
24 | tst/cq.c:5294: warning: unreachable code
25 | tst/cq.c:5303: warning: missing return value
26 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/cvt.1bk:
--------------------------------------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
12 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/cvt.2bk:
--------------------------------------------------------------------------------
1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
3 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/fields.1bk:
--------------------------------------------------------------------------------
1 | x = 1 2 3 4 -3 6
2 | y = 3 8 9
3 | x = 1 2 3 0 0 6
4 | y = 2 8 16
5 | p->a = 0x3, p->b = 0xf
6 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/fields.2bk:
--------------------------------------------------------------------------------
1 | tst/fields.c:6: warning: initializer exceeds bit-field width
2 | tst/fields.c:8: warning: initializer exceeds bit-field width
3 | tst/fields.c:30: warning: missing return value
4 | tst/fields.c:34: warning: missing return value
5 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/incr.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/sparc/solaris/tst/incr.1bk
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/incr.2bk:
--------------------------------------------------------------------------------
1 | tst/incr.c:1: warning: missing return value
2 | tst/incr.c:6: warning: expression with no effect elided
3 | tst/incr.c:6: warning: expression with no effect elided
4 | tst/incr.c:11: warning: missing return value
5 | tst/incr.c:16: warning: expression with no effect elided
6 | tst/incr.c:16: warning: expression with no effect elided
7 | tst/incr.c:21: warning: missing return value
8 | tst/incr.c:30: warning: missing return value
9 | tst/incr.c:39: warning: missing return value
10 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/incr.sbk:
--------------------------------------------------------------------------------
1 | .global main
2 | .section ".text"
3 | .align 4
4 | main:
5 | mov %g0,%o0
6 | .L1:
7 | retl; nop
8 | .type main,#function
9 | .size main,.-main
10 | .global memchar
11 | .align 4
12 | memchar:
13 | save %sp,-104,%sp
14 | ld [%fp+-8],%i5
15 | add %i5,1,%i4
16 | st %i4,[%fp+-8]
17 | ldsb [%i5],%i5
18 | stb %i5,[%fp+-1]
19 | ld [%fp+-8],%i5
20 | add %i5,1,%i5
21 | st %i5,[%fp+-8]
22 | ldsb [%i5],%i5
23 | stb %i5,[%fp+-1]
24 | ld [%fp+-8],%i5
25 | add %i5,-1,%i4
26 | st %i4,[%fp+-8]
27 | ldsb [%i5],%i5
28 | stb %i5,[%fp+-1]
29 | ld [%fp+-8],%i5
30 | add %i5,-1,%i5
31 | st %i5,[%fp+-8]
32 | ldsb [%i5],%i5
33 | stb %i5,[%fp+-1]
34 | mov %g0,%i0
35 | .L2:
36 | ret; restore
37 | .type memchar,#function
38 | .size memchar,.-memchar
39 | .global memint
40 | .align 4
41 | memint:
42 | save %sp,-104,%sp
43 | ld [%fp+-8],%i5
44 | add %i5,4,%i4
45 | st %i4,[%fp+-8]
46 | ld [%i5],%i5
47 | st %i5,[%fp+-4]
48 | ld [%fp+-8],%i5
49 | add %i5,4,%i5
50 | st %i5,[%fp+-8]
51 | ld [%i5],%i5
52 | st %i5,[%fp+-4]
53 | ld [%fp+-8],%i5
54 | add %i5,-4,%i4
55 | st %i4,[%fp+-8]
56 | ld [%i5],%i5
57 | st %i5,[%fp+-4]
58 | ld [%fp+-8],%i5
59 | add %i5,-4,%i5
60 | st %i5,[%fp+-8]
61 | ld [%i5],%i5
62 | st %i5,[%fp+-4]
63 | mov %g0,%i0
64 | .L3:
65 | ret; restore
66 | .type memint,#function
67 | .size memint,.-memint
68 | .global regchar
69 | .align 4
70 | regchar:
71 | mov %o4,%o3
72 | add %o3,1,%o4
73 | ldsb [%o3],%o5
74 | add %o4,1,%o3
75 | mov %o3,%o4
76 | ldsb [%o3],%o5
77 | mov %o4,%o3
78 | add %o3,-1,%o4
79 | ldsb [%o3],%o5
80 | add %o4,-1,%o3
81 | mov %o3,%o4
82 | ldsb [%o3],%o5
83 | mov %g0,%o0
84 | .L4:
85 | retl; nop
86 | .type regchar,#function
87 | .size regchar,.-regchar
88 | .global regint
89 | .align 4
90 | regint:
91 | mov %o4,%o3
92 | add %o3,4,%o4
93 | ld [%o3],%o5
94 | add %o4,4,%o3
95 | mov %o3,%o4
96 | ld [%o3],%o5
97 | mov %o4,%o3
98 | add %o3,-4,%o4
99 | ld [%o3],%o5
100 | add %o4,-4,%o3
101 | mov %o3,%o4
102 | ld [%o3],%o5
103 | mov %g0,%o0
104 | .L5:
105 | retl; nop
106 | .type regint,#function
107 | .size regint,.-regint
108 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/init.1bk:
--------------------------------------------------------------------------------
1 | 1 2 3 4
2 | 5 6
3 | 7
4 | if
5 | for
6 | else
7 | while
8 | 1 2 3 if
9 | 4 5 0 for
10 | 6 7 8 else
11 | 9 10 11 while
12 | 1 2 3 if
13 | 4 5 0 for
14 | 6 7 8 else
15 | 9 10 11 while
16 | 0 0 0
17 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/init.2bk:
--------------------------------------------------------------------------------
1 | tst/init.c:36: warning: missing return value
2 | tst/init.c:49: warning: missing return value
3 | tst/init.c:59: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/limits.1bk:
--------------------------------------------------------------------------------
1 | UCHAR_MAX: 000000ff=255
2 | USHRT_MAX: 0000ffff=65535
3 | UINT_MAX: ffffffff=-1
4 | ULONG_MAX: ffffffff=-1
5 | CHAR_MAX: 0000007f=127
6 | SCHAR_MAX: 0000007f=127
7 | SHRT_MAX: 00007fff=32767
8 | INT_MAX: 7fffffff=2147483647
9 | LONG_MAX: 7fffffff=2147483647
10 | CHAR_MIN: ffffff80=-128
11 | SCHAR_MIN: ffffff80=-128
12 | SHRT_MIN: ffff8000=-32768
13 | INT_MIN: 80000000=-2147483648
14 | LONG_MIN: 80000000=-2147483648
15 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/limits.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/sparc/solaris/tst/limits.2bk
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/paranoia.2bk:
--------------------------------------------------------------------------------
1 | tst/paranoia.c:1867: warning: missing return value
2 | tst/paranoia.c:1874: warning: missing return value
3 | tst/paranoia.c:1884: warning: missing return value
4 | tst/paranoia.c:1924: warning: missing return value
5 | tst/paranoia.c:1939: warning: missing return value
6 | tst/paranoia.c:1956: warning: missing return value
7 | tst/paranoia.c:1975: warning: missing return value
8 | tst/paranoia.c:1988: warning: missing return value
9 | tst/paranoia.c:1995: warning: missing return value
10 | tst/paranoia.c:2055: warning: missing return value
11 | tst/paranoia.c:2062: warning: missing return value
12 | tst/paranoia.c:2070: warning: missing return value
13 | tst/paranoia.c:2087: warning: missing return value
14 | tst/paranoia.c:2115: warning: missing return value
15 | tst/paranoia.c:2144: warning: missing return value
16 | tst/paranoia.c:2173: warning: missing return value
17 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/sort.1bk:
--------------------------------------------------------------------------------
1 | exchange(1,9)
2 | exchange(3,7)
3 | exchange(5,6)
4 | exchange(0,5)
5 | exchange(0,3)
6 | exchange(0,0)
7 | exchange(1,2)
8 | exchange(6,6)
9 | exchange(8,9)
10 | exchange(7,8)
11 | -51
12 | -1
13 | 0
14 | 1
15 | 3
16 | 10
17 | 18
18 | 32
19 | 567
20 | 789
21 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/sort.2bk:
--------------------------------------------------------------------------------
1 | tst/sort.c:23: warning: missing return value
2 | tst/sort.c:30: warning: missing return value
3 | tst/sort.c:37: warning: missing return value
4 | tst/sort.c:41: warning: missing return value
5 | tst/sort.c:65: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/spill.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/sparc/solaris/tst/spill.1bk
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/spill.2bk:
--------------------------------------------------------------------------------
1 | tst/spill.c:1: warning: missing return value
2 | tst/spill.c:3: warning: missing return value
3 | tst/spill.c:5: warning: missing return value
4 | tst/spill.c:7: warning: missing return value
5 | tst/spill.c:9: warning: missing return value
6 | tst/spill.c:17: warning: missing return value
7 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/stdarg.1bk:
--------------------------------------------------------------------------------
1 | test 1
2 | test 2
3 | test 3
4 | test 4
5 | test 5.000000
6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
7 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/stdarg.2bk:
--------------------------------------------------------------------------------
1 | tst/stdarg.c:51: warning: missing return value
2 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/struct.1bk:
--------------------------------------------------------------------------------
1 | (-1,-1) is not within [10,10; 310,310]
2 | (1,1) is not within [10,10; 310,310]
3 | (20,300) is within [10,10; 310,310]
4 | (500,400) is not within [10,10; 310,310]
5 | ab
6 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/struct.2bk:
--------------------------------------------------------------------------------
1 | tst/struct.c:49: warning: missing return value
2 | tst/struct.c:68: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/switch.1bk:
--------------------------------------------------------------------------------
1 | b = 0x8
2 | f = 0xc
3 | n = 0xa
4 | r = 0xd
5 | t = 0x9
6 | v = 0xb
7 | x = 0x78
8 | f:
9 | x = 0
10 | x = 1
11 | x = 2
12 | x = 2
13 | x = 2
14 | x = 2
15 | x = 2
16 | x = 7
17 | x = 8
18 | x = 9
19 | x = 9
20 | x = 9
21 | x = 9
22 | x = 9
23 | x = 9
24 | x = 9
25 | x = 16
26 | x = 17
27 | x = 18
28 | x = 19
29 | x = 20
30 | g:
31 | 1 1
32 | 1 2
33 | 2 3
34 | 2 4
35 | 2 5
36 | 3 6
37 | d 6
38 | 3 7
39 | d 7
40 | 3 8
41 | d 8
42 | d 9
43 | d 10
44 | h:
45 | i = 8
46 | i = 16
47 | i = 120
48 | i = 128
49 | i = 248
50 | i = 264
51 | i = 272
52 | i = 280
53 | i = 288
54 | i = 296
55 | i = 304
56 | i = 312
57 | 488 defaults
58 | x = 0x1000000
59 | x = 0x2000000
60 | x = 0x3000000
61 | x = 0x4000000
62 | x = 0x5000000
63 | x = 0x6000000 (default)
64 | x = 0x7000000 (default)
65 | 0
66 | 1
67 | 2
68 | 3
69 | 4
70 | 5
71 | 0
72 | 1
73 | 2
74 | 3
75 | 4
76 | 5
77 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/switch.2bk:
--------------------------------------------------------------------------------
1 | tst/switch.c:55: warning: missing return value
2 | tst/switch.c:73: warning: missing return value
3 | tst/switch.c:97: warning: missing return value
4 | tst/switch.c:112: warning: missing return value
5 | tst/switch.c:137: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/wf1.1bk:
--------------------------------------------------------------------------------
1 | 5 a
2 | 2 and
3 | 5 buf
4 | 16 c
5 | 8 char
6 | 1 compare
7 | 4 cond
8 | 5 count
9 | 1 d
10 | 1 die
11 | 3 else
12 | 1 entry
13 | 1 eof
14 | 4 err
15 | 1 error
16 | 1 exit
17 | 1 folded
18 | 1 for
19 | 1 free
20 | 1 frequencies
21 | 1 frequency
22 | 1 get
23 | 2 getchar
24 | 3 getword
25 | 14 if
26 | 2 in
27 | 1 index
28 | 1 input
29 | 1 install
30 | 8 int
31 | 1 into
32 | 1 is
33 | 4 isletter
34 | 1 it
35 | 1 itself
36 | 5 left
37 | 1 letter
38 | 7 lookup
39 | 1 main
40 | 2 malloc
41 | 1 message
42 | 2 n
43 | 1 necessary
44 | 12 next
45 | 9 node
46 | 4 of
47 | 1 on
48 | 1 or
49 | 1 otherwise
50 | 2 out
51 | 8 p
52 | 3 print
53 | 2 printf
54 | 16 return
55 | 5 right
56 | 4 root
57 | 25 s
58 | 2 storage
59 | 3 strcmp
60 | 1 strcpy
61 | 1 strlen
62 | 8 struct
63 | 1 structures
64 | 2 subtree
65 | 1 t
66 | 5 tprint
67 | 9 tree
68 | 1 uses
69 | 1 version
70 | 1 wf
71 | 3 while
72 | 21 word
73 | 9 words
74 | 2 z
75 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/wf1.2bk:
--------------------------------------------------------------------------------
1 | tst/wf1.c:29: warning: missing return value
2 | tst/wf1.c:87: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/yacc.1bk:
--------------------------------------------------------------------------------
1 | a
2 | b
3 | load
4 | negate
5 | push 5
6 | c
7 | load
8 | multiply
9 | add
10 | store
11 |
--------------------------------------------------------------------------------
/lcc/sparc/solaris/tst/yacc.2bk:
--------------------------------------------------------------------------------
1 | tst/yacc.c:345: warning: missing return value
2 | tst/yacc.c:349: warning: missing return value
3 | tst/yacc.c:359: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/src/bind.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 | extern Interface alphaIR;
3 | extern Interface mipsebIR, mipselIR;
4 | extern Interface sparcIR, solarisIR;
5 | extern Interface x86IR, x86linuxIR;
6 | extern Interface symbolicIR, symbolic64IR;
7 | extern Interface nullIR;
8 | extern Interface bytecodeIR;
9 | Binding bindings[] = {
10 | "alpha/osf", &alphaIR,
11 | "mips/irix", &mipsebIR,
12 | "mips/ultrix", &mipselIR,
13 | "sparc/sun", &sparcIR,
14 | "sparc/solaris", &solarisIR,
15 | "x86/win32", &x86IR,
16 | "x86/linux", &x86linuxIR,
17 | "symbolic/osf", &symbolic64IR,
18 | "symbolic/irix", &symbolicIR,
19 | "symbolic", &symbolicIR,
20 | "null", &nullIR,
21 | "bytecode", &bytecodeIR,
22 | NULL, NULL
23 | };
24 |
--------------------------------------------------------------------------------
/lcc/src/event.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 |
3 | static char rcsid[] = "$Id$";
4 |
5 | struct entry {
6 | Apply func;
7 | void *cl;
8 | };
9 |
10 | Events events;
11 | void attach(Apply func, void *cl, List *list) {
12 | struct entry *p;
13 |
14 | NEW(p, PERM);
15 | p->func = func;
16 | p->cl = cl;
17 | *list = append(p, *list);
18 | }
19 | void apply(List event, void *arg1, void *arg2) {
20 | if (event) {
21 | List lp = event;
22 | do {
23 | struct entry *p = lp->x;
24 | (*p->func)(p->cl, arg1, arg2);
25 | lp = lp->link;
26 | } while (lp != event);
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/lcc/src/inits.c:
--------------------------------------------------------------------------------
1 | void init(int argc, char *argv[]) {
2 | {extern void input_init(int, char *[]); input_init(argc, argv);}
3 | {extern void main_init(int, char *[]); main_init(argc, argv);}
4 | {extern void prof_init(int, char *[]); prof_init(argc, argv);}
5 | {extern void trace_init(int, char *[]); trace_init(argc, argv);}
6 | {extern void type_init(int, char *[]); type_init(argc, argv);}
7 | {extern void x86linux_init(int, char *[]); x86linux_init(argc, argv);}
8 | }
9 |
--------------------------------------------------------------------------------
/lcc/src/list.c:
--------------------------------------------------------------------------------
1 | #include "c.h"
2 |
3 | static char rcsid[] = "$Id$";
4 |
5 | static List freenodes; /* free list nodes */
6 |
7 | /* append - append x to list, return new list */
8 | List append(void *x, List list) {
9 | List new;
10 |
11 | if ((new = freenodes) != NULL)
12 | freenodes = freenodes->link;
13 | else
14 | NEW(new, PERM);
15 | if (list) {
16 | new->link = list->link;
17 | list->link = new;
18 | } else
19 | new->link = new;
20 | new->x = x;
21 | return new;
22 | }
23 |
24 | /* length - # elements in list */
25 | int length(List list) {
26 | int n = 0;
27 |
28 | if (list) {
29 | List lp = list;
30 | do
31 | n++;
32 | while ((lp = lp->link) != list);
33 | }
34 | return n;
35 | }
36 |
37 | /* ltov - convert list to an NULL-terminated vector allocated in arena */
38 | void *ltov(List *list, unsigned arena) {
39 | int i = 0;
40 | void **array = newarray(length(*list) + 1, sizeof array[0], arena);
41 |
42 | if (*list) {
43 | List lp = *list;
44 | do {
45 | lp = lp->link;
46 | array[i++] = lp->x;
47 | } while (lp != *list);
48 | #ifndef PURIFY
49 | lp = (*list)->link;
50 | (*list)->link = freenodes;
51 | freenodes = lp;
52 | #endif
53 | }
54 | *list = NULL;
55 | array[i] = NULL;
56 | return array;
57 | }
58 |
--------------------------------------------------------------------------------
/lcc/src/rcc.asdl:
--------------------------------------------------------------------------------
1 | -- lcc IR
2 | -- $Id$
3 | module rcc {
4 |
5 | -- Pickles start with an int version number, followed by rcc.program
6 |
7 | program = (int nuids,int nlabels,item* items,interface* interfaces,int argc,string *argv)
8 |
9 | real = (int msb,int lsb)
10 |
11 | item = Symbol(symbol symbol)
12 | | Type(type type)
13 | attributes(int uid)
14 |
15 | symbol = (identifier id,int type,int scope,int sclass,int ref,int flags)
16 |
17 | field = (identifier id,int type,int offset,int bitsize,int lsb)
18 |
19 | enum = (identifier id,int value)
20 |
21 | type = INT
22 | | UNSIGNED
23 | | FLOAT
24 | | VOID
25 | | POINTER(int type)
26 | | ENUM(identifier tag,enum* ids)
27 | | STRUCT(identifier tag,field* fields)
28 | | UNION(identifier tag,field* fields)
29 | | ARRAY(int type)
30 | | FUNCTION(int type,int* formals)
31 | | CONST(int type)
32 | | VOLATILE(int type)
33 | attributes(int size,int align)
34 |
35 | interface = Export(int p)
36 | | Import(int p)
37 | | Global(int p,int seg)
38 | | Local(int uid,symbol p) -- includes formals
39 | | Address(int uid,symbol q,int p,int n)
40 | | Segment(int seg)
41 | | Defaddress(int p)
42 | | Deflabel(int label)
43 | | Defconst(int suffix,int size,int value)
44 | | Defconstf(int size,real value)
45 | | Defstring(string s)
46 | | Space(int n)
47 | | Function(int f,int* caller,int* callee,int ncalls,interface* codelist)
48 | | Blockbeg
49 | | Blockend
50 | | Forest(node* nodes)
51 |
52 | node = CNST(int value)
53 | | CNSTF(real value)
54 | | ARG(node left,int len,int align)
55 | | ASGN(node left,node right,int len,int align)
56 | | CVT(int op,node left,int fromsize)
57 | | CALL(node left,int type)
58 | | CALLB(node left,node right,int type)
59 | | RET
60 | | ADDRG(int uid)
61 | | ADDRL(int uid)
62 | | ADDRF(int uid)
63 | | Unary(int op,node left) -- INDIR RET JUMP NEG BCOM
64 | | Binary(int op,node left,node right) -- ADD SUB DIV MUL MOD BOR BAND BXOR RSH LSH
65 | | Compare(int op,node left,node right,int label) -- EQ NE GT GE LE LT
66 | | LABEL(int label)
67 | | BRANCH(int label)
68 | | CSE(int uid,node node)
69 | attributes(int suffix,int size)
70 | }
71 |
--------------------------------------------------------------------------------
/lcc/src/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # $Id$
3 | # run .../target/os/tst/foo.s [ remotehost ]
4 |
5 | # set -x
6 | target=`echo $1 | awk -F/ '{ print $(NF-3) }'`
7 | os=`echo $1 | awk -F/ '{ print $(NF-2) }'`
8 | dir=$target/$os
9 |
10 | case "$1" in
11 | *symbolic/irix*) idir=include/mips/irix; remotehost=noexecute ;;
12 | *symbolic/osf*) idir=include/alpha/osf; remotehost=noexecute ;;
13 | *) idir=include/$dir; remotehost=${2-$REMOTEHOST} ;;
14 | esac
15 |
16 | if [ ! -d "$target/$os" -o ! -d "$idir" ]; then
17 | echo 2>&1 $0: unknown combination '"'$target/$os'"'
18 | exit 1
19 | fi
20 |
21 | C=`basename $1 .s`
22 | BUILDDIR=${BUILDDIR-.} LCC="${LCC-${BUILDDIR}/lcc} -Wo-lccdir=$BUILDDIR"
23 | TSTDIR=${TSTDIR-${BUILDDIR}/$dir/tst}
24 | if [ ! -d $TSTDIR ]; then mkdir -p $TSTDIR; fi
25 |
26 | echo ${BUILDDIR}/rcc$EXE -target=$target/$os $1: 1>&2
27 | $LCC -S -I$idir -Ualpha -Usun -Uvax -Umips -Ux86 \
28 | -Wf-errout=$TSTDIR/$C.2 -D$target -Wf-g0 \
29 | -Wf-target=$target/$os -o $1 tst/$C.c
30 | if [ $? != 0 ]; then remotehost=noexecute; fi
31 | if [ -r $dir/tst/$C.2bk ]; then
32 | diff $dir/tst/$C.2bk $TSTDIR/$C.2
33 | fi
34 | if [ -r $dir/tst/$C.sbk ]; then
35 | if diff $dir/tst/$C.sbk $TSTDIR/$C.s; then exit 0; fi
36 | fi
37 |
38 | case "$remotehost" in
39 | noexecute) exit 0 ;;
40 | ""|"-") $LCC -o $TSTDIR/$C$EXE $1; $TSTDIR/$C$EXE $TSTDIR/$C.1 ;;
41 | *) rcp $1 $remotehost:
42 | if expr "$remotehost" : '.*@' >/dev/null ; then
43 | remotehost="`expr $remotehost : '.*@\(.*\)'` -l `expr $remotehost : '\(.*\)@'`"
44 | fi
45 | rsh $remotehost "cc -o $C$EXE $C.s -lm;./$C$EXE;rm -f $C$EXE $C.[so]" $TSTDIR/$C.1
46 | ;;
47 | esac
48 | if [ -r $dir/tst/$C.1bk ]; then
49 | diff $dir/tst/$C.1bk $TSTDIR/$C.1
50 | exit $?
51 | fi
52 | exit 0
53 |
--------------------------------------------------------------------------------
/lcc/tst/8q.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/8q.0
--------------------------------------------------------------------------------
/lcc/tst/8q.c:
--------------------------------------------------------------------------------
1 | int up[15], down[15], rows[8], x[8];
2 | int queens(), print();
3 |
4 | main()
5 | {
6 | int i;
7 |
8 | for (i = 0; i < 15; i++)
9 | up[i] = down[i] = 1;
10 | for (i = 0; i < 8; i++)
11 | rows[i] = 1;
12 | queens(0);
13 | return 0;
14 | }
15 |
16 | queens(c)
17 | {
18 | int r;
19 |
20 | for (r = 0; r < 8; r++)
21 | if (rows[r] && up[r-c+7] && down[r+c]) {
22 | rows[r] = up[r-c+7] = down[r+c] = 0;
23 | x[c] = r;
24 | if (c == 7)
25 | print();
26 | else
27 | queens(c + 1);
28 | rows[r] = up[r-c+7] = down[r+c] = 1;
29 | }
30 | }
31 |
32 | print()
33 | {
34 | int k;
35 |
36 | for (k = 0; k < 8; k++)
37 | printf("%c ", x[k]+'1');
38 | printf("\n");
39 | }
40 |
--------------------------------------------------------------------------------
/lcc/tst/array.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/array.0
--------------------------------------------------------------------------------
/lcc/tst/array.c:
--------------------------------------------------------------------------------
1 | int x[3][4], *y[3];
2 |
3 | main() {
4 | int z[3][4];
5 | int i, j, *p;
6 |
7 | for (i = 0; i < 3; i++) {
8 | for (j = 0; j < 4; j++)
9 | x[i][j] = 1000*i + j;
10 | y[i] = x[i];
11 | }
12 | f();
13 | for (i = 0; i < 3; i++) {
14 | y[i] = p = &z[i][0];
15 | for (j = 0; j < 4; j++)
16 | p[j] = x[i][j];
17 | }
18 | g(z, y);
19 | return 0;
20 | }
21 |
22 | f() {
23 | int i, j;
24 |
25 | for (i = 0; i < 3; i++)
26 | for (j = 0; j < 4; j++)
27 | printf(" %d", x[i][j]);
28 | printf("\n");
29 | for (i = 0; i < 3; i++)
30 | for (j = 0; j < 4; j++)
31 | printf(" %d", y[i][j]);
32 | printf("\n");
33 | }
34 |
35 | g(x, y)
36 | int x[][4], *y[];
37 | {
38 | int i, j;
39 |
40 | for (i = 0; i < 3; i++)
41 | for (j = 0; j < 4; j++)
42 | printf(" %d", x[i][j]);
43 | printf("\n");
44 | for (i = 0; i < 3; i++)
45 | for (j = 0; j < 4; j++)
46 | printf(" %d", y[i][j]);
47 | printf("\n");
48 | }
49 |
--------------------------------------------------------------------------------
/lcc/tst/cf.0:
--------------------------------------------------------------------------------
1 | /* cf - print character frequencies */
2 | float f[128];
3 |
4 | main(argc, argv)
5 | int argc;
6 | char *argv[];
7 | {
8 | int i, c, nc;
9 | float cutoff, atof();
10 |
11 | if (argc <= 1)
12 | cutoff = 0.0;
13 | else
14 | cutoff = atof(argv[1])/100;
15 | for (i = 0; i <= 127; )
16 | f[i++] = 0.0;
17 | nc = 0;
18 | while ((c = getchar()) != -1) {
19 | f[c] += 1;
20 | nc++;
21 | }
22 | printf("char\tfreq\n");
23 | for (i = 0; i <= 127; ++i)
24 | if (f[i] && f[i]/nc >= cutoff) {
25 | if (i <= ' ')
26 | printf("%03o", i);
27 | else
28 | printf("%c", i);
29 | printf("\t%.1f\n", 100*f[i]/nc);
30 | }
31 | return 0;
32 | }
33 |
--------------------------------------------------------------------------------
/lcc/tst/cf.c:
--------------------------------------------------------------------------------
1 | /* cf - print character frequencies */
2 | float f[128];
3 |
4 | main(argc, argv)
5 | int argc;
6 | char *argv[];
7 | {
8 | int i, c, nc;
9 | float cutoff, atof();
10 |
11 | if (argc <= 1)
12 | cutoff = 0.0;
13 | else
14 | cutoff = atof(argv[1])/100;
15 | for (i = 0; i <= 127; )
16 | f[i++] = 0.0;
17 | nc = 0;
18 | while ((c = getchar()) != -1) {
19 | f[c] += 1;
20 | nc++;
21 | }
22 | printf("char\tfreq\n");
23 | for (i = 0; i <= 127; ++i)
24 | if (f[i] && f[i]/nc >= cutoff) {
25 | if (i <= ' ')
26 | printf("%03o", i);
27 | else
28 | printf("%c", i);
29 | printf("\t%.1f\n", 100*f[i]/nc);
30 | }
31 | return 0;
32 | }
33 |
--------------------------------------------------------------------------------
/lcc/tst/cq.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/cq.0
--------------------------------------------------------------------------------
/lcc/tst/cvt.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/cvt.0
--------------------------------------------------------------------------------
/lcc/tst/cvt.c:
--------------------------------------------------------------------------------
1 | signed char c;
2 | signed short s;
3 | signed int i;
4 | signed long int l;
5 | unsigned char C;
6 | unsigned short S;
7 | unsigned int I;
8 | unsigned long int L;
9 | float f;
10 | double d;
11 | long double D;
12 | void *p;
13 | void (*P)(void);
14 |
15 | void print(void) {
16 | printf("%d %d %d %ld %u %u %u %lu %f %f %lf\n",c,s,i,l,C,S,I,L,f,d,D);
17 | }
18 |
19 | main() {
20 | c= 1; s=c;i=c;l=c;C=c;S=c;I=c;L=c;f=c;d=c;D=c; print();
21 | s= 2; c=s; i=s;l=s;C=s;S=s;I=s;L=s;f=s;d=s;D=s; print();
22 | i= 3; c=i;s=i; l=i;C=i;S=i;I=i;L=i;f=i;d=i;D=i; print();
23 | l= 4; c=l;s=l;i=l; C=l;S=l;I=l;L=l;f=l;d=l;D=l; print();
24 | C= 5; c=C;s=C;i=C;l=C; S=C;I=C;L=C;f=C;d=C;D=C; print();
25 | S= 6; c=S;s=S;i=S;l=S;C=S; I=S;L=S;f=S;d=S;D=S; print();
26 | I= 7; c=I;s=I;i=I;l=I;C=I;S=I; L=I;f=I;d=I;D=I; print();
27 | L= 8; c=L;s=L;i=L;l=L;C=L;S=L;I=S; f=L;d=L;D=L; print();
28 | f= 9; c=f;s=f;i=f;l=f;C=f;S=f;I=f;L=f; d=f;D=f; print();
29 | d=10; c=d;s=d;i=d;l=d;C=d;S=d;I=d;L=d;f=d; D=d; print();
30 | D=11; c=D;s=D;i=D;l=D;C=D;S=D;I=D;L=D;f=D;d=D; print();
31 |
32 | p=0; p=0L; p=0U; p=0UL; p=P;
33 | P=0; P=0L; P=0U; P=0UL; P=p;
34 | return 0;
35 | }
36 |
--------------------------------------------------------------------------------
/lcc/tst/fields.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/fields.0
--------------------------------------------------------------------------------
/lcc/tst/fields.c:
--------------------------------------------------------------------------------
1 | struct foo {
2 | int a;
3 | char b;
4 | int x : 12, y : 4, : 0, : 4, z : 3;
5 | char c;
6 | } x = { 1, 2, 3, 4, 5, 6 };
7 | int i = 16;
8 | struct baz { unsigned int a:2, b:4, c:32;} y = { 7, 8, 9};
9 |
10 | main()
11 | {
12 | printf("x = %d %d %d %d %d %d\n", x.a, x.b, x.x, x.y, x.z, x.c);
13 | printf("y = %d %d %d\n", y.a, y.b, y.c);
14 | x.y = i;
15 | x.z = 070;
16 | printf("x = %d %d %d %d %d %d\n", x.a, x.b, x.x, x.y, x.z, x.c);
17 | y.a = 2;
18 | y.c = i;
19 | printf("y = %d %d %d\n", y.a, y.b, y.c);
20 | f2(&x);
21 | return 0;
22 | }
23 |
24 | f1(struct baz *p) {
25 | p->a = p->b = 0;
26 | if (p->b)
27 | printf("p->b != 0!\n");
28 | p->a = 0x3; p->b = 0xf;
29 | printf("p->a = 0x%x, p->b = 0x%x\n", p->a, p->b);
30 | }
31 | f2(struct baz *p) {
32 | p->a = (i==0);
33 | p->b = (f1(p),0);
34 | }
35 |
--------------------------------------------------------------------------------
/lcc/tst/front.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/front.0
--------------------------------------------------------------------------------
/lcc/tst/incr.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/incr.0
--------------------------------------------------------------------------------
/lcc/tst/incr.c:
--------------------------------------------------------------------------------
1 | main() {}
2 |
3 | memchar() {
4 | char x, *p;
5 |
6 | &x, &p;
7 | x = *p++;
8 | x = *++p;
9 | x = *p--;
10 | x = *--p;
11 | }
12 |
13 | memint() {
14 | int x, *p;
15 |
16 | &x, &p;
17 | x = *p++;
18 | x = *++p;
19 | x = *p--;
20 | x = *--p;
21 | }
22 |
23 | regchar() {
24 | register char x, *p;
25 |
26 | x = *p++;
27 | x = *++p;
28 | x = *p--;
29 | x = *--p;
30 | }
31 |
32 | regint() {
33 | register int x, *p;
34 |
35 | x = *p++;
36 | x = *++p;
37 | x = *p--;
38 | x = *--p;
39 | }
40 |
--------------------------------------------------------------------------------
/lcc/tst/init.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/init.0
--------------------------------------------------------------------------------
/lcc/tst/init.c:
--------------------------------------------------------------------------------
1 |
2 | typedef struct { int codes[3]; char name[6]; } Word;
3 |
4 | Word words[] = {
5 | 1, 2, 3, "if",
6 | { { 4, 5 }, { 'f', 'o', 'r' } },
7 | 6, 7, 8, {"else"},
8 | { { 9, 10, 11,}, 'w', 'h', 'i', 'l', 'e', },
9 | { 0 },
10 | }, *wordlist = words;
11 |
12 | int x[][5] = { 1, 2, 3, 4, 0, { 5, 6 }, { 7 } };
13 | int *y[] = { x[0], x[1], x[2], 0 };
14 |
15 |
16 | main()
17 | {
18 | int i, j;
19 |
20 | for (i = 0; y[i]; i++) {
21 | for (j = 0; y[i][j]; j++)
22 | printf(" %d", y[i][j]);
23 | printf("\n");
24 | }
25 | f();
26 | g(wordlist);
27 | return 0;
28 | }
29 |
30 | f() {
31 | static char *keywords[] = {"if", "for", "else", "while", 0, };
32 | char **p;
33 |
34 | for (p = keywords; *p; p++)
35 | printf("%s\n", *p);
36 | }
37 |
38 | g(p)
39 | Word *p;
40 | {
41 | int i;
42 |
43 | for ( ; p->codes[0]; p++) {
44 | for (i = 0; i < sizeof p->codes/sizeof(p->codes[0]); i++)
45 | printf("%d ", p->codes[i]);
46 | printf("%s\n", p->name);
47 | }
48 | h();
49 | }
50 |
51 | h()
52 | {
53 | int i;
54 |
55 | for (i = 0; i < sizeof(words)/sizeof(Word); i++)
56 | printf("%d %d %d %s\n", words[i].codes[0],
57 | words[i].codes[1], words[i].codes[2],
58 | &words[i].name[0]);
59 | }
60 |
--------------------------------------------------------------------------------
/lcc/tst/limits.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/limits.0
--------------------------------------------------------------------------------
/lcc/tst/limits.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | main() {
4 | printf("UCHAR_MAX: %08x=%d\n", UCHAR_MAX, UCHAR_MAX);
5 | printf("USHRT_MAX: %08x=%d\n", USHRT_MAX, USHRT_MAX);
6 | printf("UINT_MAX: %08x=%d\n", UINT_MAX, UINT_MAX);
7 | printf("ULONG_MAX: %08lx=%ld\n", ULONG_MAX, ULONG_MAX);
8 | printf("CHAR_MAX: %08x=%d\n", CHAR_MAX, CHAR_MAX);
9 | printf("SCHAR_MAX: %08x=%d\n", SCHAR_MAX, SCHAR_MAX);
10 | printf("SHRT_MAX: %08x=%d\n", SHRT_MAX, SHRT_MAX);
11 | printf("INT_MAX: %08x=%d\n", INT_MAX, INT_MAX);
12 | printf("LONG_MAX: %08lx=%ld\n", LONG_MAX, LONG_MAX);
13 | printf("CHAR_MIN: %08x=%d\n", CHAR_MIN, CHAR_MIN);
14 | printf("SCHAR_MIN: %08x=%d\n", SCHAR_MIN, SCHAR_MIN);
15 | printf("SHRT_MIN: %08x=%d\n", SHRT_MIN, SHRT_MIN);
16 | printf("INT_MIN: %08x=%d\n", INT_MIN, INT_MIN);
17 | printf("LONG_MIN: %08lx=%ld\n", LONG_MIN, LONG_MIN);
18 | return 0;
19 | }
20 |
--------------------------------------------------------------------------------
/lcc/tst/paranoia.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/paranoia.0
--------------------------------------------------------------------------------
/lcc/tst/sort.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/sort.0
--------------------------------------------------------------------------------
/lcc/tst/sort.c:
--------------------------------------------------------------------------------
1 | int in[] = {10, 32, -1, 567, 3, 18, 1, -51, 789, 0};
2 |
3 | main() {
4 | int i;
5 |
6 | sort(in, (sizeof in)/(sizeof in[0]));
7 | for (i = 0; i < (sizeof in)/(sizeof in[0]); i++) {
8 | putd(in[i]);
9 | putchar('\n');
10 | }
11 | return 0;
12 | }
13 |
14 | /* putd - output decimal number */
15 | putd(n) {
16 | if (n < 0) {
17 | putchar('-');
18 | n = -n;
19 | }
20 | if (n/10)
21 | putd(n/10);
22 | putchar(n%10 + '0');
23 | }
24 |
25 | int *xx;
26 |
27 | /* sort - sort a[0..n-1] into increasing order */
28 | sort(a, n) int a[]; {
29 | quick(xx = a, 0, --n);
30 | }
31 |
32 | /* quick - quicksort a[lb..ub] */
33 | quick(a, lb, ub) int a[]; {
34 | int k, partition();
35 |
36 | if (lb >= ub)
37 | return;
38 | k = partition(a, lb, ub);
39 | quick(a, lb, k - 1);
40 | quick(a, k + 1, ub);
41 | }
42 |
43 | /* partition - partition a[i..j] */
44 | int partition(a, i, j) int a[]; {
45 | int v, k;
46 |
47 | j++;
48 | k = i;
49 | v = a[k];
50 | while (i < j) {
51 | i++; while (a[i] < v) i++;
52 | j--; while (a[j] > v) j--;
53 | if (i < j) exchange(&a[i], &a[j]);
54 | }
55 | exchange(&a[k], &a[j]);
56 | return j;
57 | }
58 |
59 | /* exchange - exchange *x and *y */
60 | exchange(x, y) int *x, *y; {
61 | int t;
62 |
63 | printf("exchange(%d,%d)\n", x - xx, y - xx);
64 | t = *x; *x = *y; *y = t;
65 | }
66 |
--------------------------------------------------------------------------------
/lcc/tst/spill.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/spill.0
--------------------------------------------------------------------------------
/lcc/tst/spill.c:
--------------------------------------------------------------------------------
1 | main(){}
2 |
3 | f(i){i=f()+f();}
4 |
5 | f2(i){i=f()+(i?f():1);}
6 |
7 | f3(int i,int *p){register r1=0,r2=0,r3=0,r4=0,r5=0,r6=0,r7=0,r8=0,r9=0,r10=0;*p++=i?f():0;}
8 |
9 | double a[10],b[10];int i;f4(){register r6=0,r7=0,r8=0,r9=0,r10=0,r11=0;i=a[i]+b[i] && i && a[i]-b[i];}
10 | /* f4 causes parent to spill child on vax when odd double regs are enabled */
11 |
12 | int j, k, m, n;
13 | double *A, *B, x;
14 | f5(){
15 | x=A[k*m]*A[j*m]+B[k*n]*B[j*n];
16 | x=A[k*m]*B[j*n]-B[k*n]*A[j*m];
17 | }
18 |
--------------------------------------------------------------------------------
/lcc/tst/stdarg.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/stdarg.0
--------------------------------------------------------------------------------
/lcc/tst/stdarg.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | struct node { int a[4]; } x = {1,2,3,4};
4 |
5 | print(char *fmt, ...);
6 |
7 | main() {
8 | print("test 1\n");
9 | print("test %s\n", "2");
10 | print("test %d%c", 3, '\n');
11 | print("%s%s %w%c", "te", "st", 4, '\n');
12 | print("%s%s %f%c", "te", "st", 5.0, '\n');
13 | print("%b %b %b %b %b %b\n", x, x, x, x, x, x);
14 | return 0;
15 | }
16 |
17 | print(char *fmt, ...) {
18 | va_list ap;
19 |
20 | va_start(ap, fmt);
21 | for (; *fmt; fmt++)
22 | if (*fmt == '%')
23 | switch (*++fmt) {
24 | case 'b': {
25 | struct node x = va_arg(ap, struct node);
26 | printf("{%d %d %d %d}", x.a[0], x.a[1], x.a[2], x.a[3]);
27 | break;
28 | }
29 | case 'c':
30 | printf("%c", va_arg(ap, char));
31 | break;
32 | case 'd':
33 | printf("%d", va_arg(ap, int));
34 | break;
35 | case 'w':
36 | printf("%x", va_arg(ap, short));
37 | break;
38 | case 's':
39 | printf("%s", va_arg(ap, char *));
40 | break;
41 | case 'f':
42 | printf("%f", va_arg(ap, double));
43 | break;
44 | default:
45 | printf("%c", *fmt);
46 | break;
47 | }
48 | else
49 | printf("%c", *fmt);
50 | va_end(ap);
51 | }
52 |
--------------------------------------------------------------------------------
/lcc/tst/struct.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/struct.0
--------------------------------------------------------------------------------
/lcc/tst/struct.c:
--------------------------------------------------------------------------------
1 | typedef struct point { int x,y; } point;
2 | typedef struct rect { point pt1, pt2; } rect;
3 |
4 | point addpoint(point p1, point p2) { /* add two points */
5 | p1.x += p2.x;
6 | p1.y += p2.y;
7 | return p1;
8 | }
9 |
10 | #define min(a, b) ((a) < (b) ? (a) : (b))
11 | #define max(a, b) ((a) > (b) ? (a) : (b))
12 |
13 | rect canonrect(rect r) { /* canonicalize rectangle coordinates */
14 | rect temp;
15 |
16 | temp.pt1.x = min(r.pt1.x, r.pt2.x);
17 | temp.pt1.y = min(r.pt1.y, r.pt2.y);
18 | temp.pt2.x = max(r.pt1.x, r.pt2.x);
19 | temp.pt2.y = max(r.pt1.y, r.pt2.y);
20 | return temp;
21 | }
22 |
23 | point makepoint(int x, int y) { /* make a point from x and y components */
24 | point p;
25 |
26 | p.x = x;
27 | p.y = y;
28 | return p;
29 | }
30 |
31 | rect makerect(point p1, point p2) { /* make a rectangle from two points */
32 | rect r;
33 |
34 | r.pt1 = p1;
35 | r.pt2 = p2;
36 | return canonrect(r);
37 | }
38 |
39 | int ptinrect(point p, rect r) { /* is p in r? */
40 | return p.x >= r.pt1.x && p.x < r.pt2.x
41 | && p.y >= r.pt1.y && p.y < r.pt2.y;
42 | }
43 |
44 | struct odd {char a[3]; } y = {'a', 'b', 0};
45 |
46 | odd(struct odd y) {
47 | struct odd x = y;
48 | printf("%s\n", x.a);
49 | }
50 |
51 | main() {
52 | int i;
53 | point x, origin = { 0, 0 }, maxpt = { 320, 320 };
54 | point pts[] = { -1, -1, 1, 1, 20, 300, 500, 400 };
55 | rect screen = makerect(addpoint(maxpt, makepoint(-10, -10)),
56 | addpoint(origin, makepoint(10, 10)));
57 |
58 | for (i = 0; i < sizeof pts/sizeof pts[0]; i++) {
59 | printf("(%d,%d) is ", pts[i].x,
60 | (x = makepoint(pts[i].x, pts[i].y)).y);
61 | if (ptinrect(x, screen) == 0)
62 | printf("not ");
63 | printf("within [%d,%d; %d,%d]\n", screen.pt1.x, screen.pt1.y,
64 | screen.pt2.x, screen.pt2.y);
65 | }
66 | odd(y);
67 | exit(0);
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/lcc/tst/switch.0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/tst/switch.0
--------------------------------------------------------------------------------
/lcc/tst/yacc.0:
--------------------------------------------------------------------------------
1 | a=-b+5*c
2 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/8q.1bk:
--------------------------------------------------------------------------------
1 | 1 5 8 6 3 7 2 4
2 | 1 6 8 3 7 4 2 5
3 | 1 7 4 6 8 2 5 3
4 | 1 7 5 8 2 4 6 3
5 | 2 4 6 8 3 1 7 5
6 | 2 5 7 1 3 8 6 4
7 | 2 5 7 4 1 8 6 3
8 | 2 6 1 7 4 8 3 5
9 | 2 6 8 3 1 4 7 5
10 | 2 7 3 6 8 5 1 4
11 | 2 7 5 8 1 4 6 3
12 | 2 8 6 1 3 5 7 4
13 | 3 1 7 5 8 2 4 6
14 | 3 5 2 8 1 7 4 6
15 | 3 5 2 8 6 4 7 1
16 | 3 5 7 1 4 2 8 6
17 | 3 5 8 4 1 7 2 6
18 | 3 6 2 5 8 1 7 4
19 | 3 6 2 7 1 4 8 5
20 | 3 6 2 7 5 1 8 4
21 | 3 6 4 1 8 5 7 2
22 | 3 6 4 2 8 5 7 1
23 | 3 6 8 1 4 7 5 2
24 | 3 6 8 1 5 7 2 4
25 | 3 6 8 2 4 1 7 5
26 | 3 7 2 8 5 1 4 6
27 | 3 7 2 8 6 4 1 5
28 | 3 8 4 7 1 6 2 5
29 | 4 1 5 8 2 7 3 6
30 | 4 1 5 8 6 3 7 2
31 | 4 2 5 8 6 1 3 7
32 | 4 2 7 3 6 8 1 5
33 | 4 2 7 3 6 8 5 1
34 | 4 2 7 5 1 8 6 3
35 | 4 2 8 5 7 1 3 6
36 | 4 2 8 6 1 3 5 7
37 | 4 6 1 5 2 8 3 7
38 | 4 6 8 2 7 1 3 5
39 | 4 6 8 3 1 7 5 2
40 | 4 7 1 8 5 2 6 3
41 | 4 7 3 8 2 5 1 6
42 | 4 7 5 2 6 1 3 8
43 | 4 7 5 3 1 6 8 2
44 | 4 8 1 3 6 2 7 5
45 | 4 8 1 5 7 2 6 3
46 | 4 8 5 3 1 7 2 6
47 | 5 1 4 6 8 2 7 3
48 | 5 1 8 4 2 7 3 6
49 | 5 1 8 6 3 7 2 4
50 | 5 2 4 6 8 3 1 7
51 | 5 2 4 7 3 8 6 1
52 | 5 2 6 1 7 4 8 3
53 | 5 2 8 1 4 7 3 6
54 | 5 3 1 6 8 2 4 7
55 | 5 3 1 7 2 8 6 4
56 | 5 3 8 4 7 1 6 2
57 | 5 7 1 3 8 6 4 2
58 | 5 7 1 4 2 8 6 3
59 | 5 7 2 4 8 1 3 6
60 | 5 7 2 6 3 1 4 8
61 | 5 7 2 6 3 1 8 4
62 | 5 7 4 1 3 8 6 2
63 | 5 8 4 1 3 6 2 7
64 | 5 8 4 1 7 2 6 3
65 | 6 1 5 2 8 3 7 4
66 | 6 2 7 1 3 5 8 4
67 | 6 2 7 1 4 8 5 3
68 | 6 3 1 7 5 8 2 4
69 | 6 3 1 8 4 2 7 5
70 | 6 3 1 8 5 2 4 7
71 | 6 3 5 7 1 4 2 8
72 | 6 3 5 8 1 4 2 7
73 | 6 3 7 2 4 8 1 5
74 | 6 3 7 2 8 5 1 4
75 | 6 3 7 4 1 8 2 5
76 | 6 4 1 5 8 2 7 3
77 | 6 4 2 8 5 7 1 3
78 | 6 4 7 1 3 5 2 8
79 | 6 4 7 1 8 2 5 3
80 | 6 8 2 4 1 7 5 3
81 | 7 1 3 8 6 4 2 5
82 | 7 2 4 1 8 5 3 6
83 | 7 2 6 3 1 4 8 5
84 | 7 3 1 6 8 5 2 4
85 | 7 3 8 2 5 1 6 4
86 | 7 4 2 5 8 1 3 6
87 | 7 4 2 8 6 1 3 5
88 | 7 5 3 1 6 8 2 4
89 | 8 2 4 1 7 5 3 6
90 | 8 2 5 3 1 7 4 6
91 | 8 3 1 6 2 5 7 4
92 | 8 4 1 3 6 2 7 5
93 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/8q.2bk:
--------------------------------------------------------------------------------
1 | tst/8q.c:30: warning: missing return value
2 | tst/8q.c:39: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/array.1bk:
--------------------------------------------------------------------------------
1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
5 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/array.2bk:
--------------------------------------------------------------------------------
1 | tst/array.c:33: warning: missing return value
2 | tst/array.c:48: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/cf.1bk:
--------------------------------------------------------------------------------
1 | char freq
2 | 011 8.1
3 | 012 6.1
4 | 040 11.9
5 | ! 0.2
6 | " 1.5
7 | % 0.6
8 | & 0.4
9 | ' 0.4
10 | ( 2.9
11 | ) 2.9
12 | * 0.8
13 | + 1.3
14 | , 1.3
15 | - 0.4
16 | . 0.6
17 | / 1.0
18 | 0 2.5
19 | 1 1.9
20 | 2 0.6
21 | 3 0.2
22 | 7 0.4
23 | 8 0.2
24 | ; 3.8
25 | < 0.8
26 | = 2.7
27 | > 0.2
28 | [ 1.5
29 | \ 0.8
30 | ] 1.5
31 | a 3.1
32 | c 4.4
33 | e 2.3
34 | f 6.0
35 | g 1.3
36 | h 1.0
37 | i 5.0
38 | l 1.0
39 | m 0.2
40 | n 3.3
41 | o 2.1
42 | p 1.0
43 | q 0.4
44 | r 4.2
45 | s 0.6
46 | t 3.8
47 | u 1.2
48 | v 0.6
49 | w 0.2
50 | { 0.6
51 | } 0.6
52 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/cf.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/linux/tst/cf.2bk
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/cq.1bk:
--------------------------------------------------------------------------------
1 | Section s22 returned 0.
2 | Decimal and octal/hex constants sometimes give
3 | different results when assigned to longs.
4 | Decimal and octal/hex constants sometimes give
5 | different results when assigned to longs.
6 | Section s241 returned 0.
7 | Section s243 returned 0.
8 | Section s244 returned 0.
9 | Section s25 returned 0.
10 | 8 bits in chars.
11 | 32 bits in ints.
12 | 16 bits in shorts.
13 | 32 bits in longs.
14 | 32 bits in unsigneds.
15 | 32 bits in floats.
16 | 64 bits in doubles.
17 | 1.192093e-07 is the least number that can be added to 1. (float).
18 | 2.220446e-16 is the least number that can be added to 1. (double).
19 | Section s26 returned 0.
20 | Section s4 returned 0.
21 | Section s61 returned 0.
22 | Section s626 returned 0.
23 | Section s71 returned 0.
24 | Section s72 returned 0.
25 | Section s757 returned 0.
26 | Section s7813 returned 0.
27 | Section s714 returned 0.
28 | Section s715 returned 0.
29 | Register count for char is unreliable.
30 | Register count for pointer is unreliable.
31 | Register count for int is unreliable.
32 | Section s81 returned 0.
33 | Section s84 returned 0.
34 | char alignment: 1
35 | short alignment: 2
36 | int alignment: 4
37 | long alignment: 4
38 | unsigned alignment: 4
39 | float alignment: 4
40 | double alignment: 4
41 | Sign extension in fields
42 | Be especially careful with 1-bit fields!
43 | Section s85 returned 0.
44 | Section s86 returned 0.
45 | Section s88 returned 0.
46 | Section s9 returned 0.
47 |
48 | No errors detected.
49 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/cq.2bk:
--------------------------------------------------------------------------------
1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
4 | tst/cq.c:395: warning: overflow in constant `4294967296'
5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
6 | tst/cq.c:395: warning: overflow in constant `040000000000'
7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
8 | tst/cq.c:395: warning: overflow in constant `0x100000000'
9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
10 | tst/cq.c:396: warning: overflow in constant `68719476735'
11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
12 | tst/cq.c:396: warning: overflow in constant `0777777777777'
13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff'
15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
16 | tst/cq.c:397: warning: overflow in constant `68719476736'
17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
18 | tst/cq.c:397: warning: overflow in constant `01000000000000'
19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
20 | tst/cq.c:397: warning: overflow in constant `0x1000000000'
21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
22 | tst/cq.c:533: warning: missing return value
23 | tst/cq.c:1169: warning: missing return value
24 | tst/cq.c:5294: warning: unreachable code
25 | tst/cq.c:5303: warning: missing return value
26 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/cvt.1bk:
--------------------------------------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
12 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/cvt.2bk:
--------------------------------------------------------------------------------
1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
3 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/fields.1bk:
--------------------------------------------------------------------------------
1 | x = 1 2 3 4 -3 6
2 | y = 3 8 9
3 | x = 1 2 3 0 0 6
4 | y = 2 8 16
5 | p->a = 0x3, p->b = 0xf
6 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/fields.2bk:
--------------------------------------------------------------------------------
1 | tst/fields.c:6: warning: initializer exceeds bit-field width
2 | tst/fields.c:8: warning: initializer exceeds bit-field width
3 | tst/fields.c:30: warning: missing return value
4 | tst/fields.c:34: warning: missing return value
5 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/incr.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/linux/tst/incr.1bk
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/incr.2bk:
--------------------------------------------------------------------------------
1 | tst/incr.c:1: warning: missing return value
2 | tst/incr.c:6: warning: expression with no effect elided
3 | tst/incr.c:6: warning: expression with no effect elided
4 | tst/incr.c:11: warning: missing return value
5 | tst/incr.c:16: warning: expression with no effect elided
6 | tst/incr.c:16: warning: expression with no effect elided
7 | tst/incr.c:21: warning: missing return value
8 | tst/incr.c:30: warning: missing return value
9 | tst/incr.c:39: warning: missing return value
10 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/init.1bk:
--------------------------------------------------------------------------------
1 | 1 2 3 4
2 | 5 6
3 | 7
4 | if
5 | for
6 | else
7 | while
8 | 1 2 3 if
9 | 4 5 0 for
10 | 6 7 8 else
11 | 9 10 11 while
12 | 1 2 3 if
13 | 4 5 0 for
14 | 6 7 8 else
15 | 9 10 11 while
16 | 0 0 0
17 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/init.2bk:
--------------------------------------------------------------------------------
1 | tst/init.c:36: warning: missing return value
2 | tst/init.c:49: warning: missing return value
3 | tst/init.c:59: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/limits.1bk:
--------------------------------------------------------------------------------
1 | UCHAR_MAX: 000000ff=255
2 | USHRT_MAX: 0000ffff=65535
3 | UINT_MAX: ffffffff=-1
4 | ULONG_MAX: ffffffff=-1
5 | CHAR_MAX: 0000007f=127
6 | SCHAR_MAX: 0000007f=127
7 | SHRT_MAX: 00007fff=32767
8 | INT_MAX: 7fffffff=2147483647
9 | LONG_MAX: 7fffffff=2147483647
10 | CHAR_MIN: ffffff80=-128
11 | SCHAR_MIN: ffffff80=-128
12 | SHRT_MIN: ffff8000=-32768
13 | INT_MIN: 80000000=-2147483648
14 | LONG_MIN: 80000000=-2147483648
15 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/limits.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/linux/tst/limits.2bk
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/paranoia.2bk:
--------------------------------------------------------------------------------
1 | tst/paranoia.c:1867: warning: missing return value
2 | tst/paranoia.c:1874: warning: missing return value
3 | tst/paranoia.c:1884: warning: missing return value
4 | tst/paranoia.c:1924: warning: missing return value
5 | tst/paranoia.c:1939: warning: missing return value
6 | tst/paranoia.c:1956: warning: missing return value
7 | tst/paranoia.c:1975: warning: missing return value
8 | tst/paranoia.c:1988: warning: missing return value
9 | tst/paranoia.c:1995: warning: missing return value
10 | tst/paranoia.c:2055: warning: missing return value
11 | tst/paranoia.c:2062: warning: missing return value
12 | tst/paranoia.c:2070: warning: missing return value
13 | tst/paranoia.c:2087: warning: missing return value
14 | tst/paranoia.c:2115: warning: missing return value
15 | tst/paranoia.c:2144: warning: missing return value
16 | tst/paranoia.c:2173: warning: missing return value
17 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/sort.1bk:
--------------------------------------------------------------------------------
1 | exchange(1,9)
2 | exchange(3,7)
3 | exchange(5,6)
4 | exchange(0,5)
5 | exchange(0,3)
6 | exchange(0,0)
7 | exchange(1,2)
8 | exchange(6,6)
9 | exchange(8,9)
10 | exchange(7,8)
11 | -51
12 | -1
13 | 0
14 | 1
15 | 3
16 | 10
17 | 18
18 | 32
19 | 567
20 | 789
21 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/sort.2bk:
--------------------------------------------------------------------------------
1 | tst/sort.c:23: warning: missing return value
2 | tst/sort.c:30: warning: missing return value
3 | tst/sort.c:37: warning: missing return value
4 | tst/sort.c:41: warning: missing return value
5 | tst/sort.c:65: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/spill.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/linux/tst/spill.1bk
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/spill.2bk:
--------------------------------------------------------------------------------
1 | tst/spill.c:1: warning: missing return value
2 | tst/spill.c:3: warning: missing return value
3 | tst/spill.c:5: warning: missing return value
4 | tst/spill.c:7: warning: missing return value
5 | tst/spill.c:9: warning: missing return value
6 | tst/spill.c:17: warning: missing return value
7 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/stdarg.1bk:
--------------------------------------------------------------------------------
1 | test 1
2 | test 2
3 | test 3
4 | test 4
5 | test 5.000000
6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
7 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/stdarg.2bk:
--------------------------------------------------------------------------------
1 | tst/stdarg.c:51: warning: missing return value
2 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/struct.1bk:
--------------------------------------------------------------------------------
1 | (-1,-1) is not within [10,10; 310,310]
2 | (1,1) is not within [10,10; 310,310]
3 | (20,300) is within [10,10; 310,310]
4 | (500,400) is not within [10,10; 310,310]
5 | ab
6 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/struct.2bk:
--------------------------------------------------------------------------------
1 | tst/struct.c:49: warning: missing return value
2 | tst/struct.c:68: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/switch.1bk:
--------------------------------------------------------------------------------
1 | b = 0x8
2 | f = 0xc
3 | n = 0xa
4 | r = 0xd
5 | t = 0x9
6 | v = 0xb
7 | x = 0x78
8 | f:
9 | x = 0
10 | x = 1
11 | x = 2
12 | x = 2
13 | x = 2
14 | x = 2
15 | x = 2
16 | x = 7
17 | x = 8
18 | x = 9
19 | x = 9
20 | x = 9
21 | x = 9
22 | x = 9
23 | x = 9
24 | x = 9
25 | x = 16
26 | x = 17
27 | x = 18
28 | x = 19
29 | x = 20
30 | g:
31 | 1 1
32 | 1 2
33 | 2 3
34 | 2 4
35 | 2 5
36 | 3 6
37 | d 6
38 | 3 7
39 | d 7
40 | 3 8
41 | d 8
42 | d 9
43 | d 10
44 | h:
45 | i = 8
46 | i = 16
47 | i = 120
48 | i = 128
49 | i = 248
50 | i = 264
51 | i = 272
52 | i = 280
53 | i = 288
54 | i = 296
55 | i = 304
56 | i = 312
57 | 488 defaults
58 | x = 0x1000000
59 | x = 0x2000000
60 | x = 0x3000000
61 | x = 0x4000000
62 | x = 0x5000000
63 | x = 0x6000000 (default)
64 | x = 0x7000000 (default)
65 | 0
66 | 1
67 | 2
68 | 3
69 | 4
70 | 5
71 | 0
72 | 1
73 | 2
74 | 3
75 | 4
76 | 5
77 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/switch.2bk:
--------------------------------------------------------------------------------
1 | tst/switch.c:55: warning: missing return value
2 | tst/switch.c:73: warning: missing return value
3 | tst/switch.c:97: warning: missing return value
4 | tst/switch.c:112: warning: missing return value
5 | tst/switch.c:137: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/wf1.1bk:
--------------------------------------------------------------------------------
1 | 5 a
2 | 2 and
3 | 5 buf
4 | 16 c
5 | 8 char
6 | 1 compare
7 | 4 cond
8 | 5 count
9 | 1 d
10 | 1 die
11 | 3 else
12 | 1 entry
13 | 1 eof
14 | 4 err
15 | 1 error
16 | 1 exit
17 | 1 folded
18 | 1 for
19 | 1 free
20 | 1 frequencies
21 | 1 frequency
22 | 1 get
23 | 2 getchar
24 | 3 getword
25 | 14 if
26 | 2 in
27 | 1 index
28 | 1 input
29 | 1 install
30 | 8 int
31 | 1 into
32 | 1 is
33 | 4 isletter
34 | 1 it
35 | 1 itself
36 | 5 left
37 | 1 letter
38 | 7 lookup
39 | 1 main
40 | 2 malloc
41 | 1 message
42 | 2 n
43 | 1 necessary
44 | 12 next
45 | 9 node
46 | 4 of
47 | 1 on
48 | 1 or
49 | 1 otherwise
50 | 2 out
51 | 8 p
52 | 3 print
53 | 2 printf
54 | 16 return
55 | 5 right
56 | 4 root
57 | 25 s
58 | 2 storage
59 | 3 strcmp
60 | 1 strcpy
61 | 1 strlen
62 | 8 struct
63 | 1 structures
64 | 2 subtree
65 | 1 t
66 | 5 tprint
67 | 9 tree
68 | 1 uses
69 | 1 version
70 | 1 wf
71 | 3 while
72 | 21 word
73 | 9 words
74 | 2 z
75 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/wf1.2bk:
--------------------------------------------------------------------------------
1 | tst/wf1.c:29: warning: missing return value
2 | tst/wf1.c:87: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/yacc.1bk:
--------------------------------------------------------------------------------
1 | a
2 | b
3 | load
4 | negate
5 | push 5
6 | c
7 | load
8 | multiply
9 | add
10 | store
11 |
--------------------------------------------------------------------------------
/lcc/x86/linux/tst/yacc.2bk:
--------------------------------------------------------------------------------
1 | tst/yacc.c:345: warning: missing return value
2 | tst/yacc.c:349: warning: missing return value
3 | tst/yacc.c:359: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/8q.1bk:
--------------------------------------------------------------------------------
1 | 1 5 8 6 3 7 2 4
2 | 1 6 8 3 7 4 2 5
3 | 1 7 4 6 8 2 5 3
4 | 1 7 5 8 2 4 6 3
5 | 2 4 6 8 3 1 7 5
6 | 2 5 7 1 3 8 6 4
7 | 2 5 7 4 1 8 6 3
8 | 2 6 1 7 4 8 3 5
9 | 2 6 8 3 1 4 7 5
10 | 2 7 3 6 8 5 1 4
11 | 2 7 5 8 1 4 6 3
12 | 2 8 6 1 3 5 7 4
13 | 3 1 7 5 8 2 4 6
14 | 3 5 2 8 1 7 4 6
15 | 3 5 2 8 6 4 7 1
16 | 3 5 7 1 4 2 8 6
17 | 3 5 8 4 1 7 2 6
18 | 3 6 2 5 8 1 7 4
19 | 3 6 2 7 1 4 8 5
20 | 3 6 2 7 5 1 8 4
21 | 3 6 4 1 8 5 7 2
22 | 3 6 4 2 8 5 7 1
23 | 3 6 8 1 4 7 5 2
24 | 3 6 8 1 5 7 2 4
25 | 3 6 8 2 4 1 7 5
26 | 3 7 2 8 5 1 4 6
27 | 3 7 2 8 6 4 1 5
28 | 3 8 4 7 1 6 2 5
29 | 4 1 5 8 2 7 3 6
30 | 4 1 5 8 6 3 7 2
31 | 4 2 5 8 6 1 3 7
32 | 4 2 7 3 6 8 1 5
33 | 4 2 7 3 6 8 5 1
34 | 4 2 7 5 1 8 6 3
35 | 4 2 8 5 7 1 3 6
36 | 4 2 8 6 1 3 5 7
37 | 4 6 1 5 2 8 3 7
38 | 4 6 8 2 7 1 3 5
39 | 4 6 8 3 1 7 5 2
40 | 4 7 1 8 5 2 6 3
41 | 4 7 3 8 2 5 1 6
42 | 4 7 5 2 6 1 3 8
43 | 4 7 5 3 1 6 8 2
44 | 4 8 1 3 6 2 7 5
45 | 4 8 1 5 7 2 6 3
46 | 4 8 5 3 1 7 2 6
47 | 5 1 4 6 8 2 7 3
48 | 5 1 8 4 2 7 3 6
49 | 5 1 8 6 3 7 2 4
50 | 5 2 4 6 8 3 1 7
51 | 5 2 4 7 3 8 6 1
52 | 5 2 6 1 7 4 8 3
53 | 5 2 8 1 4 7 3 6
54 | 5 3 1 6 8 2 4 7
55 | 5 3 1 7 2 8 6 4
56 | 5 3 8 4 7 1 6 2
57 | 5 7 1 3 8 6 4 2
58 | 5 7 1 4 2 8 6 3
59 | 5 7 2 4 8 1 3 6
60 | 5 7 2 6 3 1 4 8
61 | 5 7 2 6 3 1 8 4
62 | 5 7 4 1 3 8 6 2
63 | 5 8 4 1 3 6 2 7
64 | 5 8 4 1 7 2 6 3
65 | 6 1 5 2 8 3 7 4
66 | 6 2 7 1 3 5 8 4
67 | 6 2 7 1 4 8 5 3
68 | 6 3 1 7 5 8 2 4
69 | 6 3 1 8 4 2 7 5
70 | 6 3 1 8 5 2 4 7
71 | 6 3 5 7 1 4 2 8
72 | 6 3 5 8 1 4 2 7
73 | 6 3 7 2 4 8 1 5
74 | 6 3 7 2 8 5 1 4
75 | 6 3 7 4 1 8 2 5
76 | 6 4 1 5 8 2 7 3
77 | 6 4 2 8 5 7 1 3
78 | 6 4 7 1 3 5 2 8
79 | 6 4 7 1 8 2 5 3
80 | 6 8 2 4 1 7 5 3
81 | 7 1 3 8 6 4 2 5
82 | 7 2 4 1 8 5 3 6
83 | 7 2 6 3 1 4 8 5
84 | 7 3 1 6 8 5 2 4
85 | 7 3 8 2 5 1 6 4
86 | 7 4 2 5 8 1 3 6
87 | 7 4 2 8 6 1 3 5
88 | 7 5 3 1 6 8 2 4
89 | 8 2 4 1 7 5 3 6
90 | 8 2 5 3 1 7 4 6
91 | 8 3 1 6 2 5 7 4
92 | 8 4 1 3 6 2 7 5
93 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/8q.2bk:
--------------------------------------------------------------------------------
1 | tst/8q.c:30: warning: missing return value
2 | tst/8q.c:39: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/array.1bk:
--------------------------------------------------------------------------------
1 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
2 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
3 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
4 | 0 1 2 3 1000 1001 1002 1003 2000 2001 2002 2003
5 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/array.2bk:
--------------------------------------------------------------------------------
1 | tst/array.c:33: warning: missing return value
2 | tst/array.c:48: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/cf.1bk:
--------------------------------------------------------------------------------
1 | char freq
2 | 011 8.1
3 | 012 6.1
4 | 040 11.9
5 | ! 0.2
6 | " 1.5
7 | % 0.6
8 | & 0.4
9 | ' 0.4
10 | ( 2.9
11 | ) 2.9
12 | * 0.8
13 | + 1.3
14 | , 1.3
15 | - 0.4
16 | . 0.6
17 | / 1.0
18 | 0 2.5
19 | 1 1.9
20 | 2 0.6
21 | 3 0.2
22 | 7 0.4
23 | 8 0.2
24 | ; 3.8
25 | < 0.8
26 | = 2.7
27 | > 0.2
28 | [ 1.5
29 | \ 0.8
30 | ] 1.5
31 | a 3.1
32 | c 4.4
33 | e 2.3
34 | f 6.0
35 | g 1.3
36 | h 1.0
37 | i 5.0
38 | l 1.0
39 | m 0.2
40 | n 3.3
41 | o 2.1
42 | p 1.0
43 | q 0.4
44 | r 4.2
45 | s 0.6
46 | t 3.8
47 | u 1.2
48 | v 0.6
49 | w 0.2
50 | { 0.6
51 | } 0.6
52 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/cf.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/win32/tst/cf.2bk
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/cq.1bk:
--------------------------------------------------------------------------------
1 | Section s22 returned 0.
2 | Decimal and octal/hex constants sometimes give
3 | different results when assigned to longs.
4 | Decimal and octal/hex constants sometimes give
5 | different results when assigned to longs.
6 | Section s241 returned 0.
7 | Section s243 returned 0.
8 | Section s244 returned 0.
9 | Section s25 returned 0.
10 | 8 bits in chars.
11 | 32 bits in ints.
12 | 16 bits in shorts.
13 | 32 bits in longs.
14 | 32 bits in unsigneds.
15 | 32 bits in floats.
16 | 64 bits in doubles.
17 | 1.192093e-007 is the least number that can be added to 1. (float).
18 | 2.220446e-016 is the least number that can be added to 1. (double).
19 | Section s26 returned 0.
20 | Section s4 returned 0.
21 | Section s61 returned 0.
22 | Section s626 returned 0.
23 | Section s71 returned 0.
24 | Section s72 returned 0.
25 | Section s757 returned 0.
26 | Section s7813 returned 0.
27 | Section s714 returned 0.
28 | Section s715 returned 0.
29 | Register count for char is unreliable.
30 | Register count for pointer is unreliable.
31 | Register count for int is unreliable.
32 | Section s81 returned 0.
33 | Section s84 returned 0.
34 | char alignment: 1
35 | short alignment: 2
36 | int alignment: 4
37 | long alignment: 4
38 | unsigned alignment: 4
39 | float alignment: 4
40 | double alignment: 4
41 | Sign extension in fields
42 | Be especially careful with 1-bit fields!
43 | Section s85 returned 0.
44 | Section s86 returned 0.
45 | Section s88 returned 0.
46 | Section s9 returned 0.
47 |
48 | No errors detected.
49 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/cq.2bk:
--------------------------------------------------------------------------------
1 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
2 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
3 | tst/cq.c:394: warning: overflow in converting constant expression from `unsigned long' to `long int'
4 | tst/cq.c:395: warning: overflow in constant `4294967296'
5 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
6 | tst/cq.c:395: warning: overflow in constant `040000000000'
7 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
8 | tst/cq.c:395: warning: overflow in constant `0x100000000'
9 | tst/cq.c:395: warning: overflow in converting constant expression from `unsigned long' to `long int'
10 | tst/cq.c:396: warning: overflow in constant `68719476735'
11 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
12 | tst/cq.c:396: warning: overflow in constant `0777777777777'
13 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
14 | tst/cq.c:396: warning: overflow in constant `0xfffffffff'
15 | tst/cq.c:396: warning: overflow in converting constant expression from `unsigned long' to `long int'
16 | tst/cq.c:397: warning: overflow in constant `68719476736'
17 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
18 | tst/cq.c:397: warning: overflow in constant `01000000000000'
19 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
20 | tst/cq.c:397: warning: overflow in constant `0x1000000000'
21 | tst/cq.c:397: warning: overflow in converting constant expression from `unsigned long' to `long int'
22 | tst/cq.c:533: warning: missing return value
23 | tst/cq.c:1169: warning: missing return value
24 | tst/cq.c:5294: warning: unreachable code
25 | tst/cq.c:5303: warning: missing return value
26 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/cvt.1bk:
--------------------------------------------------------------------------------
1 | 1 1 1 1 1 1 1 1 1.000000 1.000000 1.000000
2 | 2 2 2 2 2 2 2 2 2.000000 2.000000 2.000000
3 | 3 3 3 3 3 3 3 3 3.000000 3.000000 3.000000
4 | 4 4 4 4 4 4 4 4 4.000000 4.000000 4.000000
5 | 5 5 5 5 5 5 5 5 5.000000 5.000000 5.000000
6 | 6 6 6 6 6 6 6 6 6.000000 6.000000 6.000000
7 | 7 7 7 7 7 7 7 7 7.000000 7.000000 7.000000
8 | 8 8 8 8 8 8 8 8 8.000000 8.000000 8.000000
9 | 9 9 9 9 9 9 9 9 9.000000 9.000000 9.000000
10 | 10 10 10 10 10 10 10 10 10.000000 10.000000 10.000000
11 | 11 11 11 11 11 11 11 11 11.000000 11.000000 11.000000
12 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/cvt.2bk:
--------------------------------------------------------------------------------
1 | tst/cvt.c:32: warning: conversion from `pointer to void function(void)' to `pointer to void' is compiler dependent
2 | tst/cvt.c:33: warning: conversion from `pointer to void' to `pointer to void function(void)' is compiler dependent
3 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/fields.1bk:
--------------------------------------------------------------------------------
1 | x = 1 2 3 4 -3 6
2 | y = 3 8 9
3 | x = 1 2 3 0 0 6
4 | y = 2 8 16
5 | p->a = 0x3, p->b = 0xf
6 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/fields.2bk:
--------------------------------------------------------------------------------
1 | tst/fields.c:6: warning: initializer exceeds bit-field width
2 | tst/fields.c:8: warning: initializer exceeds bit-field width
3 | tst/fields.c:30: warning: missing return value
4 | tst/fields.c:34: warning: missing return value
5 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/incr.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/win32/tst/incr.1bk
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/incr.2bk:
--------------------------------------------------------------------------------
1 | tst/incr.c:1: warning: missing return value
2 | tst/incr.c:6: warning: expression with no effect elided
3 | tst/incr.c:6: warning: expression with no effect elided
4 | tst/incr.c:11: warning: missing return value
5 | tst/incr.c:16: warning: expression with no effect elided
6 | tst/incr.c:16: warning: expression with no effect elided
7 | tst/incr.c:21: warning: missing return value
8 | tst/incr.c:30: warning: missing return value
9 | tst/incr.c:39: warning: missing return value
10 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/init.1bk:
--------------------------------------------------------------------------------
1 | 1 2 3 4
2 | 5 6
3 | 7
4 | if
5 | for
6 | else
7 | while
8 | 1 2 3 if
9 | 4 5 0 for
10 | 6 7 8 else
11 | 9 10 11 while
12 | 1 2 3 if
13 | 4 5 0 for
14 | 6 7 8 else
15 | 9 10 11 while
16 | 0 0 0
17 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/init.2bk:
--------------------------------------------------------------------------------
1 | tst/init.c:36: warning: missing return value
2 | tst/init.c:49: warning: missing return value
3 | tst/init.c:59: warning: missing return value
4 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/limits.1bk:
--------------------------------------------------------------------------------
1 | UCHAR_MAX: 000000ff=255
2 | USHRT_MAX: 0000ffff=65535
3 | UINT_MAX: ffffffff=-1
4 | ULONG_MAX: ffffffff=-1
5 | CHAR_MAX: 0000007f=127
6 | SCHAR_MAX: 0000007f=127
7 | SHRT_MAX: 00007fff=32767
8 | INT_MAX: 7fffffff=2147483647
9 | LONG_MAX: 7fffffff=2147483647
10 | CHAR_MIN: ffffff80=-128
11 | SCHAR_MIN: ffffff80=-128
12 | SHRT_MIN: ffff8000=-32768
13 | INT_MIN: 80000000=-2147483648
14 | LONG_MIN: 80000000=-2147483648
15 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/limits.2bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/win32/tst/limits.2bk
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/paranoia.2bk:
--------------------------------------------------------------------------------
1 | tst/paranoia.c:1867: warning: missing return value
2 | tst/paranoia.c:1874: warning: missing return value
3 | tst/paranoia.c:1884: warning: missing return value
4 | tst/paranoia.c:1924: warning: missing return value
5 | tst/paranoia.c:1939: warning: missing return value
6 | tst/paranoia.c:1956: warning: missing return value
7 | tst/paranoia.c:1975: warning: missing return value
8 | tst/paranoia.c:1988: warning: missing return value
9 | tst/paranoia.c:1995: warning: missing return value
10 | tst/paranoia.c:2055: warning: missing return value
11 | tst/paranoia.c:2062: warning: missing return value
12 | tst/paranoia.c:2070: warning: missing return value
13 | tst/paranoia.c:2087: warning: missing return value
14 | tst/paranoia.c:2115: warning: missing return value
15 | tst/paranoia.c:2144: warning: missing return value
16 | tst/paranoia.c:2173: warning: missing return value
17 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/sort.1bk:
--------------------------------------------------------------------------------
1 | exchange(1,9)
2 | exchange(3,7)
3 | exchange(5,6)
4 | exchange(0,5)
5 | exchange(0,3)
6 | exchange(0,0)
7 | exchange(1,2)
8 | exchange(6,6)
9 | exchange(8,9)
10 | exchange(7,8)
11 | -51
12 | -1
13 | 0
14 | 1
15 | 3
16 | 10
17 | 18
18 | 32
19 | 567
20 | 789
21 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/sort.2bk:
--------------------------------------------------------------------------------
1 | tst/sort.c:23: warning: missing return value
2 | tst/sort.c:30: warning: missing return value
3 | tst/sort.c:37: warning: missing return value
4 | tst/sort.c:41: warning: missing return value
5 | tst/sort.c:65: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/spill.1bk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ozkl/AlpVM/7791e2f38f732ad17a465df5dfa27eeb727723bb/lcc/x86/win32/tst/spill.1bk
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/spill.2bk:
--------------------------------------------------------------------------------
1 | tst/spill.c:1: warning: missing return value
2 | tst/spill.c:3: warning: missing return value
3 | tst/spill.c:5: warning: missing return value
4 | tst/spill.c:7: warning: missing return value
5 | tst/spill.c:9: warning: missing return value
6 | tst/spill.c:17: warning: missing return value
7 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/stdarg.1bk:
--------------------------------------------------------------------------------
1 | test 1
2 | test 2
3 | test 3
4 | test 4
5 | test 5.000000
6 | {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4} {1 2 3 4}
7 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/stdarg.2bk:
--------------------------------------------------------------------------------
1 | tst/stdarg.c:51: warning: missing return value
2 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/struct.1bk:
--------------------------------------------------------------------------------
1 | (-1,-1) is not within [10,10; 310,310]
2 | (1,1) is not within [10,10; 310,310]
3 | (20,300) is within [10,10; 310,310]
4 | (500,400) is not within [10,10; 310,310]
5 | ab
6 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/struct.2bk:
--------------------------------------------------------------------------------
1 | tst/struct.c:49: warning: missing return value
2 | tst/struct.c:68: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/switch.1bk:
--------------------------------------------------------------------------------
1 | b = 0x8
2 | f = 0xc
3 | n = 0xa
4 | r = 0xd
5 | t = 0x9
6 | v = 0xb
7 | x = 0x78
8 | f:
9 | x = 0
10 | x = 1
11 | x = 2
12 | x = 2
13 | x = 2
14 | x = 2
15 | x = 2
16 | x = 7
17 | x = 8
18 | x = 9
19 | x = 9
20 | x = 9
21 | x = 9
22 | x = 9
23 | x = 9
24 | x = 9
25 | x = 16
26 | x = 17
27 | x = 18
28 | x = 19
29 | x = 20
30 | g:
31 | 1 1
32 | 1 2
33 | 2 3
34 | 2 4
35 | 2 5
36 | 3 6
37 | d 6
38 | 3 7
39 | d 7
40 | 3 8
41 | d 8
42 | d 9
43 | d 10
44 | h:
45 | i = 8
46 | i = 16
47 | i = 120
48 | i = 128
49 | i = 248
50 | i = 264
51 | i = 272
52 | i = 280
53 | i = 288
54 | i = 296
55 | i = 304
56 | i = 312
57 | 488 defaults
58 | x = 0x1000000
59 | x = 0x2000000
60 | x = 0x3000000
61 | x = 0x4000000
62 | x = 0x5000000
63 | x = 0x6000000 (default)
64 | x = 0x7000000 (default)
65 | 0
66 | 1
67 | 2
68 | 3
69 | 4
70 | 5
71 | 0
72 | 1
73 | 2
74 | 3
75 | 4
76 | 5
77 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/switch.2bk:
--------------------------------------------------------------------------------
1 | tst/switch.c:55: warning: missing return value
2 | tst/switch.c:73: warning: missing return value
3 | tst/switch.c:97: warning: missing return value
4 | tst/switch.c:112: warning: missing return value
5 | tst/switch.c:137: warning: missing return value
6 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/wf1.1bk:
--------------------------------------------------------------------------------
1 | 5 a
2 | 2 and
3 | 5 buf
4 | 16 c
5 | 8 char
6 | 1 compare
7 | 4 cond
8 | 5 count
9 | 1 d
10 | 1 die
11 | 3 else
12 | 1 entry
13 | 1 eof
14 | 4 err
15 | 1 error
16 | 1 exit
17 | 1 folded
18 | 1 for
19 | 1 free
20 | 1 frequencies
21 | 1 frequency
22 | 1 get
23 | 2 getchar
24 | 3 getword
25 | 14 if
26 | 2 in
27 | 1 index
28 | 1 input
29 | 1 install
30 | 8 int
31 | 1 into
32 | 1 is
33 | 4 isletter
34 | 1 it
35 | 1 itself
36 | 5 left
37 | 1 letter
38 | 7 lookup
39 | 1 main
40 | 2 malloc
41 | 1 message
42 | 2 n
43 | 1 necessary
44 | 12 next
45 | 9 node
46 | 4 of
47 | 1 on
48 | 1 or
49 | 1 otherwise
50 | 2 out
51 | 8 p
52 | 3 print
53 | 2 printf
54 | 16 return
55 | 5 right
56 | 4 root
57 | 25 s
58 | 2 storage
59 | 3 strcmp
60 | 1 strcpy
61 | 1 strlen
62 | 8 struct
63 | 1 structures
64 | 2 subtree
65 | 1 t
66 | 5 tprint
67 | 9 tree
68 | 1 uses
69 | 1 version
70 | 1 wf
71 | 3 while
72 | 21 word
73 | 9 words
74 | 2 z
75 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/wf1.2bk:
--------------------------------------------------------------------------------
1 | tst/wf1.c:29: warning: missing return value
2 | tst/wf1.c:87: warning: missing return value
3 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/yacc.1bk:
--------------------------------------------------------------------------------
1 | a
2 | b
3 | load
4 | negate
5 | push 5
6 | c
7 | load
8 | multiply
9 | add
10 | store
11 |
--------------------------------------------------------------------------------
/lcc/x86/win32/tst/yacc.2bk:
--------------------------------------------------------------------------------
1 | tst/yacc.c:345: warning: missing return value
2 | tst/yacc.c:349: warning: missing return value
3 | tst/yacc.c:359: warning: missing return value
4 |
--------------------------------------------------------------------------------