diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-11 15:10:23 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-11 15:10:23 +0200 |
| commit | 543b8c7287ac1248453a59cd3d759ce5ffeec4a3 (patch) | |
| tree | d152fcb8bedf413841536109a5a612c2a4186bb3 /Examples | |
| parent | 992764412966eeff4296e086a3717053d86cae5e (diff) | |
MHR-21: Work in progress code generator.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Examples')
| -rw-r--r-- | Examples/ExampleCPlusPlus.cxx | 11 | ||||
| -rw-r--r-- | Examples/ExampleCPlusPlus.s | 14 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Examples/ExampleCPlusPlus.cxx b/Examples/ExampleCPlusPlus.cxx new file mode 100644 index 0000000..38bf0c5 --- /dev/null +++ b/Examples/ExampleCPlusPlus.cxx @@ -0,0 +1,11 @@ +int main(int argc, char const *argv[]) +{ + struct ExampleCPlusPlus + { + int example_data; + }* example; + + example->example_data = 0; + + return 0; +} diff --git a/Examples/ExampleCPlusPlus.s b/Examples/ExampleCPlusPlus.s new file mode 100644 index 0000000..328bce7 --- /dev/null +++ b/Examples/ExampleCPlusPlus.s @@ -0,0 +1,14 @@ +; Path: Examples/ExampleCPlusPlus.cxx +; Language: MPCC assembly. (Generated from C++) +; Date: 2024-5-11 + +#bits 64 + +#org 0x1000000 + +
+
+lea %LEFT+%OFFSET
+
+mov rax, %A0
+ret
\ No newline at end of file |
