summaryrefslogtreecommitdiffhomepage
path: root/Examples
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-05-06 08:54:16 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-05-06 08:54:16 +0000
commit7a6ac1d9cd3128a9ef96bf675a06963a617b5673 (patch)
treeca1e56070e732b37354a726261fe95bcdbcaf035 /Examples
parent0fceaef4af5fbb97ec74d215177bae7a60729062 (diff)
parent87be60c5242d407b67b6eb2670c058a6c93dce2b (diff)
Merged in MHR-24 (pull request #5)
MHR-24/MHR-21 - CodeTools related.
Diffstat (limited to 'Examples')
-rw-r--r--Examples/ExampleCDialect.S7
-rw-r--r--Examples/ExampleCDialect.c21
-rw-r--r--Examples/ExamplePowerPC.S1
3 files changed, 17 insertions, 12 deletions
diff --git a/Examples/ExampleCDialect.S b/Examples/ExampleCDialect.S
index 5182381..d937aed 100644
--- a/Examples/ExampleCDialect.S
+++ b/Examples/ExampleCDialect.S
@@ -1,6 +1,6 @@
# Path: Examples/ExampleCDialect.c
# Language: POWER Assembly (Generated from C)
-# Build Date: 2024-4-16
+# Build Date: 2024-4-28
@@ -14,8 +14,8 @@ dword export .code64 __ImageStart
li r3,0x1000
cmpw r10, r11
- beq import__MPCC_IF_PROC_6168864856
-dword export .code64 __MPCC_IF_PROC_6168864856
+ beq import __MPCC_IF_PROC_6099380296
+dword export .code64 __MPCC_IF_PROC_6099380296
@@ -25,3 +25,4 @@ dword export .code64 __MPCC_IF_PROC_6168864856
mr r31, r0
blr
+
diff --git a/Examples/ExampleCDialect.c b/Examples/ExampleCDialect.c
index 8c65bf0..e6d92fb 100644
--- a/Examples/ExampleCDialect.c
+++ b/Examples/ExampleCDialect.c
@@ -1,17 +1,20 @@
-struct {
+struct
+{
int a;
int b;
int c;
};
-int __ImageStart(int argc, char const* argv[]) {
- int* foo = 0x1000;
+int __ImageStart(int argc, char const* argv[])
+{
+ int* foo = 0x1000;
- if (foo == 57) {
- foo = 0x2000;
- *foo = 5;
- return foo;
- }
+ if (foo == 57)
+ {
+ foo = 0x2000;
+ *foo = 5;
+ return foo;
+ }
- return 57;
+ return 57;
}
diff --git a/Examples/ExamplePowerPC.S b/Examples/ExamplePowerPC.S
index 9615fe8..b9de796 100644
--- a/Examples/ExamplePowerPC.S
+++ b/Examples/ExamplePowerPC.S
@@ -4,4 +4,5 @@ b 0x1000
mflr r21
mtlr r21
li r3, 0
+cmpw r10, r11
stw r7, r5+36