
This document contains a collection of unorganized notes. The information here should be
organized better at some point but in the meantime it is better here than lost.

## Extend existing / add a new Processor Architecture

OpenWatcom has still no support for many Processors: 
 * MMX, SIMD,AVX, ... Modern instruction sets for x86
 * amd64/x86_64 (internal Name: x64)
 * aarch64 (Internal Name: a64)
 * arm

Things to consider, when extending to 64bit or adding a new architecture.<br>
(This list is long, not sorted and incomplete)
 * 64 bit CPUs: Alignment of functions / stack / args ... must increase to 16 Byte
 * 32+64bit: Many currently unsupported CPU commands need higher alignments (MMX/SIMD/AVX)
 * orl & owl: (Object Reader Library & Object Writer Library)<br>
   - ELF Support and COFF Support for RISC architecture
 * many projects: Object reading/writing for the x86 family
 * wdis (ndisasm): Disassembler for all file formats and architectures
 * wdump (exedump): Executable/DLL/Library/Object dumping tool  
 * wlink (wl): Linker for all file formats and architectures
 * wlib (nwlib): Object file archive tool for all file formats and architectures
 * dwarf: Debug info support for ELF file format
 * wd & wdw (wv): Debugger for all file formats and architectures
 * dig / dig: Debug format support
 * wasarm / wasa64: RISC Assembler for arm and aarch64/a64
 * wasm: Assembler for the x86 family
 * wcpp: preprocessor for all C/C++ Compiler
 * cg: The code generator (backend for C/C++/FORTRAN compiler)
 * wccarm / wcca64 / wccx64: C compiler for arm, aarch64, x86_64
 * wpparm / wppa64 / wppx64: C++ compiler for arm, aarch64, x86_64
 * wfc (f77): FORTRAN compiler
 * clib: C Runtime library
 * cpplib: C++ Runtime library
 * mathlib: Math support library
 * fpuemu: FPU emulation
 * owcc: Compile and Link utility (posix style command line args)
 * wclarm / wcla64 / wclx64: Compile and Link utility (OW style command line args)<br>
 There are a lot more modules in the bld directory

### Probably resuable work (for backports / tests / comparsion):
 * Forks of wasm & wlink, extended for x86_64 and new CPU instructions<br>
   (with 'Sybase Open Watcom Public License')
   * [jwasm Homepage](https://www.japheth.de/JWasm.html)
   * [jwasm on github](https://github.com/Baron-von-Riedesel/jwasm)
   * [jwlink Homepage](https://www.japheth.de/JWlink.html)
   * [jwlink on github](https://github.com/Baron-von-Riedesel/jwlink)<br>
   There are more forks of wasm/jwasm and wlink/jwlink on  Github
 * FASM / FASMARM: A free Assembler
   * [fasm Homepage](http://flatassembler.net/)
   * [fasm Source on github](https://github.com/tgrysztar/fasm)


## Links to online infos:
 * [Agner Fog: Optimize Manuals and Instruction tables](https://www.agner.org/optimize/)
 * [Agner Fog: calling conventions](https://www.agner.org/optimize/calling_conventions.pdf)
 * [Wikibooks: x86 calling conventions](https://en.wikibooks.org/wiki/X86_Disassembly/Calling_Conventions)
 * [Wikipedia: calling conventions](https://en.wikipedia.org/wiki/Calling_convention)
 * [ARM ABI](https://developer.arm.com/Architectures/Application%20Binary%20Interface)
 * [ARM: arm/aarch64 ELF/DWARF/ABI-Infos](https://github.com/ARM-software/abi-aa)
 * [Linux ABI](https://en.wikipedia.org/wiki/Linux_kernel_interfaces#Linux_ABI)
 * [Linus kernel Interface](https://en.wikipedia.org/wiki/Linux_kernel_interfaces)
 * [Microsoft: Windows arm 32bit ABI](https://learn.microsoft.com/en-us/cpp/build/overview-of-arm-abi-conventions?view=msvc-170)
 * [Microsoft: Windows aarch64 ABI](https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170)
