source stringlengths 3 46 | c stringlengths 31 48.4k | risc_o0 stringlengths 130 91k | risc_o1 stringlengths 130 86.5k | risc_o2 stringlengths 130 94.6k | risc_o3 stringlengths 130 110k | arm_o0 stringlengths 132 111k | arm_o1 stringlengths 132 113k | arm_o2 stringlengths 132 135k | arm_o3 stringlengths 132 162k |
|---|---|---|---|---|---|---|---|---|---|
1050.c | /*
URI Online Judge | 1050
DDD
Adapted by Neilor Tonin, URI Brazil
https://www.urionlinejudge.com.br/judge/en/problems/view/1050
Timelimit: 1
Read an integer number that is the code number for phone dialing. Then, print the destination according to the following table:
61 Brasilia
71 Salvador
11 Sao Paulo
21 Rio... | .file "1050.c"
.option pic
.text
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
.string "Juiz de Fora"
.al... | .file "1050.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
.s... | .file "1050.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
.s... | .file "1050.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
.s... | .arch armv8-a
.file "1050.c"
.text
.section .rodata
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
.string "Juiz de Fora"
.... | .arch armv8-a
.file "1050.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
... | .arch armv8-a
.file "1050.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
... | .arch armv8-a
.file "1050.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "%d"
.align 3
.LC1:
.string "Sao Paulo"
.align 3
.LC2:
.string "Campinas"
.align 3
.LC3:
.string "Rio de Janeiro"
.align 3
.LC4:
.string "Vitoria"
.align 3
.LC5:
.string "Belo Horizonte"
.align 3
.LC6:
... |
pointers.c | void func() {
char* string = "Hello";
}
| .file "pointers.c"
.option pic
.text
.section .rodata
.align 3
.LC0:
.string "Hello"
.text
.align 1
.globl func
.type func, @function
func:
addi sp,sp,-32
sd s0,24(sp)
addi s0,sp,32
lla a5,.LC0
sd a5,-24(s0)
nop
ld s0,24(sp)
addi sp,sp,32
jr ra
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu... | .file "pointers.c"
.option pic
.text
.align 1
.globl func
.type func, @function
func:
ret
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .file "pointers.c"
.option pic
.text
.align 1
.globl func
.type func, @function
func:
ret
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .file "pointers.c"
.option pic
.text
.align 1
.globl func
.type func, @function
func:
ret
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "pointers.c"
.text
.section .rodata
.align 3
.LC0:
.string "Hello"
.text
.align 2
.global func
.type func, %function
func:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
adrp x0, .LC0
add x0, x0, :lo12:.LC0
str x0, [sp, 8]
nop
add sp, sp, 16
.cfi_def_cfa_offset 0
re... | .arch armv8-a
.file "pointers.c"
.text
.align 2
.global func
.type func, %function
func:
.LFB0:
.cfi_startproc
ret
.cfi_endproc
.LFE0:
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "pointers.c"
.text
.align 2
.p2align 4,,11
.global func
.type func, %function
func:
.LFB0:
.cfi_startproc
ret
.cfi_endproc
.LFE0:
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "pointers.c"
.text
.align 2
.p2align 4,,11
.global func
.type func, %function
func:
.LFB0:
.cfi_startproc
ret
.cfi_endproc
.LFE0:
.size func, .-func
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
|
Wstring-literal-comparison-3.c | /* PR c/7776 */
/* { dg-do compile } */
/* { dg-options "" } */
int test1(char *ptr)
{
return ptr == "foo";
}
int test2()
{
return "foo" != (const char*)0;
}
int test3()
{
return "foo" == (const char*)0;
}
int test4()
{
return (const char*)0 != "foo";
}
int test5()
{
return (const char*)0 == "foo";
}
| .file "Wstring-literal-comparison-3.c"
.option pic
.text
.section .rodata
.align 3
.LC0:
.string "foo"
.text
.align 1
.globl test1
.type test1, @function
test1:
addi sp,sp,-32
sd s0,24(sp)
addi s0,sp,32
sd a0,-24(s0)
ld a4,-24(s0)
lla a5,.LC0
sub a5,a4,a5
seqz a5,a5
andi a5,a5,0xff
sext.w a5,a5
mv ... | .file "Wstring-literal-comparison-3.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "foo"
.text
.align 1
.globl test1
.type test1, @function
test1:
lla a5,.LC0
sub a0,a0,a5
seqz a0,a0
ret
.size test1, .-test1
.align 1
.globl test2
.type test2, @function
test2:
li... | .file "Wstring-literal-comparison-3.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "foo"
.text
.align 1
.globl test1
.type test1, @function
test1:
lla a5,.LC0
sub a0,a0,a5
seqz a0,a0
ret
.size test1, .-test1
.align 1
.globl test2
.type test2, @function
test2:
li... | .file "Wstring-literal-comparison-3.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "foo"
.text
.align 1
.globl test1
.type test1, @function
test1:
lla a5,.LC0
sub a0,a0,a5
seqz a0,a0
ret
.size test1, .-test1
.align 1
.globl test2
.type test2, @function
test2:
li... | .arch armv8-a
.file "Wstring-literal-comparison-3.c"
.text
.section .rodata
.align 3
.LC0:
.string "foo"
.text
.align 2
.global test1
.type test1, %function
test1:
.LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
str x0, [sp, 8]
ldr x1, [sp, 8]
adrp x0, .LC0
add x0, x0, :lo12:.LC0
cmp x1, ... | .arch armv8-a
.file "Wstring-literal-comparison-3.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "foo"
.text
.align 2
.global test1
.type test1, %function
test1:
.LFB0:
.cfi_startproc
adrp x1, .LC0
add x1, x1, :lo12:.LC0
cmp x1, x0
cset w0, eq
ret
.cfi_endproc
.LFE0:
.size t... | .arch armv8-a
.file "Wstring-literal-comparison-3.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "foo"
.text
.align 2
.p2align 4,,11
.global test1
.type test1, %function
test1:
.LFB0:
.cfi_startproc
adrp x1, .LC0
add x1, x1, :lo12:.LC0
cmp x1, x0
cset w0, eq
ret
.cfi_endproc... | .arch armv8-a
.file "Wstring-literal-comparison-3.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "foo"
.text
.align 2
.p2align 4,,11
.global test1
.type test1, %function
test1:
.LFB0:
.cfi_startproc
adrp x1, .LC0
add x1, x1, :lo12:.LC0
cmp x1, x0
cset w0, eq
ret
.cfi_endproc... |
hex2bin.c | /*
* hex2bin - converts data in hexadecimal form to binary form
*
* Copyright (C) 2013 Jonathan Buhacoff <jonathan@buhacoff.net>
*
* BSD license.
*
* Input must contain only hex characters. Any other characters will result in an error
* printed to stderr and exit code 1. On success exit code is 0.
*
* Would ... | .file "hex2bin.c"
.option pic
.text
.align 1
.globl hex2int
.type hex2int, @function
hex2int:
addi sp,sp,-32
sd s0,24(sp)
addi s0,sp,32
mv a5,a0
sb a5,-17(s0)
lbu a5,-17(s0)
andi a4,a5,0xff
li a5,47
bleu a4,a5,.L2
lbu a5,-17(s0)
andi a4,a5,0xff
li a5,57
bgtu a4,a5,.L2
lbu a5,-17(s0)
sext.w a5,a5
a... | .file "hex2bin.c"
.option pic
.text
.align 1
.globl hex2int
.type hex2int, @function
hex2int:
addiw a5,a0,-48
andi a5,a5,0xff
li a4,9
bleu a5,a4,.L6
addiw a5,a0,-65
andi a5,a5,0xff
li a4,5
bleu a5,a4,.L7
addiw a5,a0,-97
andi a5,a5,0xff
li a4,5
bgtu a5,a4,.L5
addiw a0,a0,-87
ret
.L6:
addiw a0,a0,-48... | .file "hex2bin.c"
.option pic
.text
.align 1
.globl hex2int
.type hex2int, @function
hex2int:
addiw a5,a0,-48
andi a3,a5,0xff
li a4,9
bleu a3,a4,.L7
addiw a5,a0,-65
andi a5,a5,0xff
li a4,5
bleu a5,a4,.L8
addiw a5,a0,-97
andi a5,a5,0xff
bgtu a5,a4,.L5
addiw a0,a0,-87
ret
.L8:
addiw a0,a0,-55
ret
.L7... | .file "hex2bin.c"
.option pic
.text
.align 1
.globl hex2int
.type hex2int, @function
hex2int:
addiw a5,a0,-48
andi a3,a5,0xff
li a4,9
bleu a3,a4,.L7
addiw a5,a0,-65
andi a5,a5,0xff
li a4,5
bleu a5,a4,.L8
addiw a5,a0,-97
andi a5,a5,0xff
bgtu a5,a4,.L5
addiw a0,a0,-87
ret
.L8:
addiw a0,a0,-55
ret
.L7... | .arch armv8-a
.file "hex2bin.c"
.text
.align 2
.global hex2int
.type hex2int, %function
hex2int:
.LFB6:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
strb w0, [sp, 15]
ldrb w0, [sp, 15]
cmp w0, 47
bls .L2
ldrb w0, [sp, 15]
cmp w0, 57
bhi .L2
ldrb w0, [sp, 15]
sub w0, w0, #48
b .L3
.L2:
ldrb ... | .arch armv8-a
.file "hex2bin.c"
.text
.align 2
.global hex2int
.type hex2int, %function
hex2int:
.LFB39:
.cfi_startproc
and w0, w0, 255
sub w1, w0, #48
and w1, w1, 255
cmp w1, 9
bls .L6
sub w1, w0, #65
and w1, w1, 255
cmp w1, 5
bls .L7
sub w1, w0, #97
and w1, w1, 255
cmp w1, 5
bhi .L5
sub w0, w0, #... | .arch armv8-a
.file "hex2bin.c"
.text
.align 2
.p2align 4,,11
.global hex2int
.type hex2int, %function
hex2int:
.LFB39:
.cfi_startproc
and w1, w0, 255
sub w0, w1, #48
and w2, w0, 255
cmp w2, 9
bls .L1
sub w0, w1, #65
and w0, w0, 255
cmp w0, 5
bls .L7
sub w0, w1, #97
and w0, w0, 255
cmp w0, 5
bhi .L... | .arch armv8-a
.file "hex2bin.c"
.text
.align 2
.p2align 4,,11
.global hex2int
.type hex2int, %function
hex2int:
.LFB39:
.cfi_startproc
and w1, w0, 255
sub w0, w1, #48
and w2, w0, 255
cmp w2, 9
bls .L1
sub w0, w1, #65
and w0, w0, 255
cmp w0, 5
bls .L7
sub w0, w1, #97
and w0, w0, 255
cmp w0, 5
bhi .L... |
ds2490.c | const char dtlib[] = "DS2490";
| .file "ds2490.c"
.option pic
.text
.globl dtlib
.section .rodata
.align 3
.type dtlib, @object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .file "ds2490.c"
.option pic
.text
.globl dtlib
.section .rodata
.align 3
.type dtlib, @object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .file "ds2490.c"
.option pic
.text
.globl dtlib
.section .rodata
.align 3
.type dtlib, @object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .file "ds2490.c"
.option pic
.text
.globl dtlib
.section .rodata
.align 3
.type dtlib, @object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "ds2490.c"
.text
.global dtlib
.section .rodata
.align 3
.type dtlib, %object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "ds2490.c"
.text
.global dtlib
.section .rodata
.align 3
.type dtlib, %object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "ds2490.c"
.text
.global dtlib
.section .rodata
.align 3
.type dtlib, %object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
| .arch armv8-a
.file "ds2490.c"
.text
.global dtlib
.section .rodata
.align 3
.type dtlib, %object
.size dtlib, 7
dtlib:
.string "DS2490"
.ident "GCC: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0"
.section .note.GNU-stack,"",@progbits
|
linearsearch.c | #include<stdio.h>
struct Array
{
int A[10];
int size;
int length;
};
void Display(struct Array arr)
{
int i;
printf("\nElements are\n");
for(i=0;i<arr.length;i++)
printf("%d ",arr.A[i]);
}
void Append(struct Array *arr,int x)
{
if(arr->length<arr->size)
arr->A[arr->length++]=... | .file "linearsearch.c"
.option pic
.text
.section .rodata
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 1
.globl Display
.type Display, @function
Display:
addi sp,sp,-48
sd ra,40(sp)
sd s0,32(sp)
sd s1,24(sp)
addi s0,sp,48
mv s1,a0
lla a0,.LC0
call puts@plt
sw ze... | .file "linearsearch.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 1
.globl Display
.type Display, @function
Display:
addi sp,sp,-32
sd ra,24(sp)
sd s0,16(sp)
sd s1,8(sp)
sd s2,0(sp)
mv s2,a0
lw s1,44(a0... | .file "linearsearch.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 1
.globl Display
.type Display, @function
Display:
addi sp,sp,-32
sd s1,8(sp)
lw s1,44(a0)
sd s0,16(sp)
mv s0,a0
lla a0,.LC0
sd ra,24(sp... | .file "linearsearch.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 1
.globl Display
.type Display, @function
Display:
addi sp,sp,-32
sd s1,8(sp)
lw s1,44(a0)
sd s0,16(sp)
mv s0,a0
lla a0,.LC0
sd ra,24(sp... | .arch armv8-a
.file "linearsearch.c"
.text
.section .rodata
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 2
.global Display
.type Display, %function
Display:
.LFB0:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48
.cfi_offset 29, -48
.cfi_offset 30, -40... | .arch armv8-a
.file "linearsearch.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 2
.global Display
.type Display, %function
Display:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -64]!
.cfi_def_cfa_offset 64
.cfi_offset 29... | .arch armv8-a
.file "linearsearch.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 2
.p2align 4,,11
.global Display
.type Display, %function
Display:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48... | .arch armv8-a
.file "linearsearch.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "\nElements are"
.align 3
.LC1:
.string "%d "
.text
.align 2
.p2align 4,,11
.global Display
.type Display, %function
Display:
.LFB23:
.cfi_startproc
stp x29, x30, [sp, -48]!
.cfi_def_cfa_offset 48... |
main.c | /*------------------------------------------------------------
PROGRAMACIÓN AVANZADA HW01P04
Andrés César Magaña Martínez
cesar@cimat.mx
--------------------------------------------------------------*/
float SumFloats (int n){
int i;
float sumf = 0.0;
for ( i=1; i<n+1; i++ )
sumf+=(1/(float)n);
return sumf;
}
... | .file "main.c"
.option pic
.text
.align 1
.globl SumFloats
.type SumFloats, @function
SumFloats:
addi sp,sp,-48
sd s0,40(sp)
addi s0,sp,48
mv a5,a0
sw a5,-36(s0)
sw zero,-20(s0)
li a5,1
sw a5,-24(s0)
j .L2
.L3:
lw a5,-36(s0)
fcvt.s.w fa5,a5
lla a5,.LC0
flw fa4,0(a5)
fdiv.s fa5,fa4,fa5
flw fa4,-20(s... | .file "main.c"
.option pic
.text
.align 1
.globl SumFloats
.type SumFloats, @function
SumFloats:
ble a0,zero,.L4
fcvt.s.w fa4,a0
flw fa5,.LC0,a5
fdiv.s fa5,fa5,fa4
addiw a0,a0,1
fmv.w.x fa0,zero
li a5,1
.L3:
fadd.s fa0,fa0,fa5
addiw a5,a5,1
bne a5,a0,.L3
ret
.L4:
fmv.w.x fa0,zero
ret
.size SumFloats... | .file "main.c"
.option pic
.text
.align 1
.globl SumFloats
.type SumFloats, @function
SumFloats:
ble a0,zero,.L4
fcvt.s.w fa4,a0
flw fa5,.LC0,a5
fmv.w.x fa0,zero
fdiv.s fa5,fa5,fa4
addiw a0,a0,1
li a5,1
.L3:
addiw a5,a5,1
fadd.s fa0,fa0,fa5
bne a5,a0,.L3
ret
.L4:
fmv.w.x fa0,zero
ret
.size SumFloats... | .file "main.c"
.option pic
.text
.align 1
.globl SumFloats
.type SumFloats, @function
SumFloats:
ble a0,zero,.L4
fcvt.s.w fa4,a0
flw fa5,.LC0,a5
fmv.w.x fa0,zero
fdiv.s fa5,fa5,fa4
addiw a0,a0,1
li a5,1
.L3:
addiw a5,a5,1
fadd.s fa0,fa0,fa5
bne a5,a0,.L3
ret
.L4:
fmv.w.x fa0,zero
ret
.size SumFloats... | .arch armv8-a
.file "main.c"
.text
.align 2
.global SumFloats
.type SumFloats, %function
SumFloats:
.LFB0:
.cfi_startproc
sub sp, sp, #32
.cfi_def_cfa_offset 32
str w0, [sp, 12]
str wzr, [sp, 28]
mov w0, 1
str w0, [sp, 24]
b .L2
.L3:
ldr s0, [sp, 12]
scvtf s0, s0
fmov s1, 1.0e+0
fdiv s0, s1, s0
ldr s... | .arch armv8-a
.file "main.c"
.text
.align 2
.global SumFloats
.type SumFloats, %function
SumFloats:
.LFB0:
.cfi_startproc
cmp w0, 0
ble .L4
scvtf s0, w0
fmov s1, 1.0e+0
fdiv s1, s1, s0
add w1, w0, 1
movi v0.2s, #0
mov w0, 1
.L3:
fadd s0, s0, s1
add w0, w0, 1
cmp w0, w1
bne .L3
.L1:
ret
.L4:
movi v0... | .arch armv8-a
.file "main.c"
.text
.align 2
.p2align 4,,11
.global SumFloats
.type SumFloats, %function
SumFloats:
.LFB0:
.cfi_startproc
cmp w0, 0
ble .L4
scvtf s2, w0
fmov s1, 1.0e+0
movi v0.2s, #0
add w1, w0, 1
mov w0, 1
fdiv s1, s1, s2
.p2align 3,,7
.L3:
add w0, w0, 1
fadd s0, s0, s1
cmp w0, w1
... | .arch armv8-a
.file "main.c"
.text
.align 2
.p2align 4,,11
.global SumFloats
.type SumFloats, %function
SumFloats:
.LFB0:
.cfi_startproc
cmp w0, 0
ble .L4
scvtf s2, w0
fmov s1, 1.0e+0
movi v0.2s, #0
add w1, w0, 1
mov w0, 1
fdiv s1, s1, s2
.p2align 3,,7
.L3:
add w0, w0, 1
fadd s0, s0, s1
cmp w0, w1
... |
oppgave1.c | #include <stdio.h>
struct deltager
{
char navn[30];
int poeng;
};
int main(void){
struct deltager jim, tom;
printf("Navn 1: ");
scanf("%s", jim.navn);
printf("Poeng:");
scanf("%d", &jim.poeng);
printf("Navn 2: ");
scanf("%s", tom.navn);
printf("Poeng:");
scanf("%d", &tom.poeng);
if(tom.poeng<jim.poeng... | .file "oppgave1.c"
.option pic
.text
.section .rodata
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.text
.align 1
.globl main
.type main, @function
mai... | .file "oppgave1.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.text
.align 1
.globl main
... | .file "oppgave1.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.section .text.startup,"ax",@p... | .file "oppgave1.c"
.option pic
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.section .text.startup,"ax",@p... | .arch armv8-a
.file "oppgave1.c"
.text
.section .rodata
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.text
.align 2
.global main
.type main, %function
... | .arch armv8-a
.file "oppgave1.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.text
.align 2
.global mai... | .arch armv8-a
.file "oppgave1.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.section .text.startup,"ax",... | .arch armv8-a
.file "oppgave1.c"
.text
.section .rodata.str1.8,"aMS",@progbits,1
.align 3
.LC0:
.string "Navn 1: "
.align 3
.LC1:
.string "%s"
.align 3
.LC2:
.string "Poeng:"
.align 3
.LC3:
.string "%d"
.align 3
.LC4:
.string "Navn 2: "
.align 3
.LC5:
.string "%s, vinner\n"
.section .text.startup,"ax",... |
6.c | "#include<stdio.h>\n#include<stdlib.h>\n#define size 5\nint cq[size],f=-1,r=-1,elm;\nvoid display();(...TRUNCATED) | "\t.file\t\"6.c\"\n\t.option pic\n\t.text\n\t.globl\tcq\n\t.bss\n\t.align\t3\n\t.type\tcq, @object\n(...TRUNCATED) | "\t.file\t\"6.c\"\n\t.option pic\n\t.text\n\t.align\t1\n\t.globl\tfull\n\t.type\tfull, @function\nfu(...TRUNCATED) | "\t.file\t\"6.c\"\n\t.option pic\n\t.text\n\t.section\t.rodata.str1.8,\"aMS\",@progbits,1\n\t.align\(...TRUNCATED) | "\t.file\t\"6.c\"\n\t.option pic\n\t.text\n\t.section\t.rodata.str1.8,\"aMS\",@progbits,1\n\t.align\(...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"6.c\"\n\t.text\n\t.global\tcq\n\t.bss\n\t.align\t3\n\t.type\tcq, %objec(...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"6.c\"\n\t.text\n\t.align\t2\n\t.global\tfull\n\t.type\tfull, %function\(...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"6.c\"\n\t.text\n\t.section\t.rodata.str1.8,\"aMS\",@progbits,1\n\t.alig(...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"6.c\"\n\t.text\n\t.section\t.rodata.str1.8,\"aMS\",@progbits,1\n\t.alig(...TRUNCATED) |
compile000d.c | int
main(int argc, char **argv)
{
if (argc || argc - 1)
return 2;
return 1;
}
| "\t.file\t\"compile000d.c\"\n\t.option pic\n\t.text\n\t.align\t1\n\t.globl\tmain\n\t.type\tmain, @fu(...TRUNCATED) | "\t.file\t\"compile000d.c\"\n\t.option pic\n\t.text\n\t.align\t1\n\t.globl\tmain\n\t.type\tmain, @fu(...TRUNCATED) | "\t.file\t\"compile000d.c\"\n\t.option pic\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\t.(...TRUNCATED) | "\t.file\t\"compile000d.c\"\n\t.option pic\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\t.(...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"compile000d.c\"\n\t.text\n\t.align\t2\n\t.global\tmain\n\t.type\tmain, (...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"compile000d.c\"\n\t.text\n\t.align\t2\n\t.global\tmain\n\t.type\tmain, (...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"compile000d.c\"\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\(...TRUNCATED) | "\t.arch armv8-a\n\t.file\t\"compile000d.c\"\n\t.text\n\t.section\t.text.startup,\"ax\",@progbits\n\(...TRUNCATED) |
End of preview. Expand in Data Studio
- Downloads last month
- 4