| 36 | static String system_abi = null; |
| 37 | |
| 38 | static void usage() { |
| 39 | System.out.println( |
| 40 | """ |
| 41 | simple <input-file> [options] [--eval|--run ...] |
| 42 | Options: |
| 43 | --dump - dump final intermediate representation |
| 44 | --dump-after-parse - dump intermediate representation after parse |
| 45 | --dump-after-opto - dump intermediate representation after opto pass |
| 46 | --dump-after-type-check - dump intermediate representation after type check pass |
| 47 | --dump-after-instr-select - dump intermediate representation after instrution selection pass |
| 48 | --dump-after-gcm - dump intermediate representation after GCM pass |
| 49 | --dump-after-local-sched - dump intermediate representation after local scheduling pass |
| 50 | --dump-after-reg-alloc - dump intermediate representation after register allocation pass |
| 51 | --dump-after-encode - dump intermediate representation after encoding pass |
| 52 | --dump-after-all - dump intermediate representation after all passes |
| 53 | --dot - dump grapical representation of intermediate code into *.dot file(s) |
| 54 | -S - dump generated assembler code |
| 55 | --eval ... - evaluate the compiled code in emulator |
| 56 | --run ... - run the compiled code natively |
| 57 | --dump-size - print the size of generated code |
| 58 | --dump-time - print compilation and execution times |
| 59 | --cpu <cpu-name> - use specific CPU (x86_64_v2, riscv, arm) |
| 60 | --abi <abi-name> - use speific ABI variant (SystemV) |
| 61 | --target - print native CPU and ABI |
| 62 | --version |
| 63 | --help |
| 64 | """ |
| 65 | ); |
| 66 | System.exit(0); |
| 67 | } |
| 68 | |
| 69 | static void bad_usage() { |
| 70 | System.err.println("ERROR: Invalid usage (use --help)"); |