search for: have_hardware_division

Displaying 1 result from an estimated 1 matches for "have_hardware_division".

2014 Sep 20
2
[LLVMdev] ARM assembler bug on LLVM 3.5
...ch=pentium2 and still use SSE instructions in the assembler, no matter that pentium2 doesn't have SSE. The ARM backend seems overly protective and prevents such instructions. Mikulas #include <stdio.h> #include <stdint.h> #include <fcntl.h> #include <unistd.h> int have_hardware_division = 0; int divide(int a, int b) { int result; if (have_hardware_division) asm (".cpu cortex-a15 \n sdiv %0, %1, %2" : "=r"(result) : "r"(a), "r"(b)); else result = a / b; return result; } int main(void) { int h, i; unsigned a; h = open("/proc/...