Skip to content

Commit

Permalink
Add SPDX-License-Identifier tag
Browse files Browse the repository at this point in the history
To calm out the linter.

Signed-off-by: Andreia Ocanoaia <[email protected]>
  • Loading branch information
andreia-oca committed May 3, 2024
1 parent 7f4d307 commit 48a637f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <stdio.h>

#define NUM 100
Expand All @@ -7,8 +9,6 @@ int main(void)
size_t n = NUM;
size_t sum = 0;



__asm__ (
"xor eax, eax\n\t" /* collect the sum in eax */
/* use ecx to go through items, start from n */
Expand All @@ -20,7 +20,8 @@ int main(void)
"mov %0, eax\n\t"
: "=r" (sum) /* output variable */
: "r" (n) /* input variable */
: "eax", "ecx" ); /* registers used in the assembly code */
: "eax", "ecx"
); /* registers used in the assembly code */

printf("sum(%u): %u\n", n, sum);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <stdio.h>

#define NUM 0x12345678
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <stdio.h>

int main(void)
Expand Down

0 comments on commit 48a637f

Please sign in to comment.