summaryrefslogtreecommitdiffhomepage
path: root/Examples
diff options
context:
space:
mode:
authorAmlal El Mahrouss <113760121+Amlal-ElMahrouss@users.noreply.github.com>2024-04-14 10:48:10 +0200
committerAmlal El Mahrouss <113760121+Amlal-ElMahrouss@users.noreply.github.com>2024-04-14 10:48:10 +0200
commit180b333debbd1e555fbab5191656e2146dff6e8a (patch)
treed371c780283540df695a82384757d0b9f0d79bd2 /Examples
parentdd6d72026ac1c96bb85d5f108fa8ddfa2758f02b (diff)
see below.
- format code. - fix xcoff header. - add .dword, .long and .word for i64asm Signed-off-by: Amlal El Mahrouss <113760121+Amlal-ElMahrouss@users.noreply.github.com>
Diffstat (limited to 'Examples')
-rw-r--r--Examples/ExampleCDialect.c17
-rw-r--r--Examples/ExamplePowerPC.S3
2 files changed, 9 insertions, 11 deletions
diff --git a/Examples/ExampleCDialect.c b/Examples/ExampleCDialect.c
index c8c72d1..899062c 100644
--- a/Examples/ExampleCDialect.c
+++ b/Examples/ExampleCDialect.c
@@ -1,12 +1,11 @@
-int main(int argc, char const *argv[])
-{
- int* foo = 0x1000;
+int main(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 d25f7d2..51c8dbc 100644
--- a/Examples/ExamplePowerPC.S
+++ b/Examples/ExamplePowerPC.S
@@ -1,6 +1,5 @@
b 0x1000
mflr r21
mtlr r21
-
-stwu r1, [r2 + 2]
+ nik
li r3, 0 \ No newline at end of file