Go to advanced search

by Magniko
Tue Jun 04, 2019 9:20 am
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

Re: C compiling in AArch64 only use Thumb-2?

Well this was what I said from the start: the instructions were all 32-bit long(which is 8 hex numbers) despite being compiled for 64-bit architecture which confused me as I assumed the instructions should be 64-bit long. I also stated that I did see that the assembly showed the use of the AArch64-r...
by Magniko
Tue Jun 04, 2019 8:20 am
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

Re: C compiling in AArch64 only use Thumb-2?

I already had gcc-aarch64-linux-gcc installed. That's what I used for cross compiling. Either way, I figured out I had to add the -mcpu flag right after aarch64-linux-gnu-gcc. I did that with the flag set to -mcpu=cortex-a53+fp+simd and succesfully compiled an output file. The pragma message also re...
by Magniko
Mon Jun 03, 2019 10:24 pm
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

Re: C compiling in AArch64 only use Thumb-2?

Allright, I did the following command:

Code: Select all

aarch64-linux-gnu-gcc test.c -g -o -mcpu=cortex-a53+fp+simd test1
And I get the following error:
unrecognised emulation mode: cpu=aarch64linux
What is the problem then? What flag should I use instead?
by Magniko
Mon Jun 03, 2019 7:02 pm
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

Re: C compiling in AArch64 only use Thumb-2?

Allright will try that
But it’s kinda strange as I did install gcc-aarch64-linux-gnu and used that to compile
I will try again with that method and see if there’s a difference
by Magniko
Mon Jun 03, 2019 3:25 pm
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

Re: C compiling in AArch64 only use Thumb-2?

By 64-bit compiler, are you referring to the one on Ubuntu or the cross-compiler? You can also pick it at compile time as any aarch64 compiler has a defined macro __aarch64__ == 1 Just do and #if test on it I should do this in a shell script with no additional statements than that code? And that wil...
by Magniko
Mon Jun 03, 2019 10:19 am
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

Re: C compiling in AArch64 only use Thumb-2?

So my question is, does C code always compile to the Thumb-2 instruction set which is 32-bit? Or am I not compiling the code properly? No. Thumb-2 is a mix of 16-bit and 32-bit wide instructions (with 32-bit address space etc, registers called Rx). GCC will not generate thumb2 unless you specifical...
by Magniko
Mon Jun 03, 2019 9:22 am
Forum: C/C++
Topic: C compiling in AArch64 only use Thumb-2?
Replies: 12
Views: 768

C compiling in AArch64 only use Thumb-2?

This is not really me asking for guidance, but rather confirmation: I run my Raspberry Pi 3 B+ with Ubuntu for AArch64. Thus it takes full advantage of the 64-bit architecture. However, I have tried to compile code with GCC on the Raspberry, and also cross- compilation with an AArch64 extension of G...
by Magniko
Mon Jun 03, 2019 9:15 am
Forum: Off topic discussion
Topic: University-project: Comparing Cortex-A53 with an i7
Replies: 5
Views: 1184

Re: University-project: Comparing Cortex-A53 with an i7

I settled with Ubuntu AArch64. When I tried to run some test .c programs in 1000 loops, the 64-bit results turned out significantly faster than the 32-bit. So I am satisfied with the results To compare IPC, I found a better solution which was to compare IPS. As my goal is to test the core architectu...
by Magniko
Sat Jun 01, 2019 12:16 pm
Forum: Off topic discussion
Topic: University-project: Comparing Cortex-A53 with an i7
Replies: 5
Views: 1184

University-project: Comparing Cortex-A53 with an i7

Hi all. I have a project for my University, kind of like a minithesis, where I want to compare the performance of the ARMv8-A Cortex-A53 with an Ivy Bridge i7 3770K and see if the RISC-architecture of ARM could do better than the CISC-architecture of x86 when one accounts the hard performance differ...

Go to advanced search