Skip to content

Instantly share code, notes, and snippets.

@igorsnunes
igorsnunes / 0-report.txt
Last active October 19, 2016 17:13
Cmpldi vs li+cmpld
Compiling cmpldi.s and running with "perf stat" the output was "195.508661159 seconds time elapsed".
Doing the same with nocmpldi.s the output was "195.614111789 seconds".
The files were compiled using gcc version 4.9.2 and the following line was used to compile:
gcc cmpldi.s -o cmpldi.o
gcc nocmpldi.s -o nocmpldi.o
Based on these results, no performance gain was detected.
@igorsnunes
igorsnunes / disclaimer.txt
Last active September 24, 2015 16:39
Different behavior between x86_64 and ppc64le in overflow in locale_get_display_name
When running the attached example in x86_64 and powerpc64le, different results are presented.
The attached file calls the function getDisplayName imported from libicu.
It is expected that in both architectures the program crashes in a core dump as pointed in [1] and
[2]. But in powerpc64le the last printed character is 247 and in x86_64 it is 255, i.e. in x86_64
the overflow happens 8 bytes ahead of ppc64le.
In order to compile the below code, the following command line is used: