Google Sandbox2 for arm64 - sandbox

According to ./sandboxed_api/sandbox2/regs.h only 64 bit Intel and 64 bit PowerPC architectures are supported.
#if !defined(__x86_64__) && !defined(__powerpc64__)
static_assert(false, "No support for the current CPU architecture");
#endif
Can someone tell me why arm64 is not supported?
Is it planned to be supported in the near future?

Related

Regarding QT creator in Lubuntu 16.04 (i386) ICOP board

I have installed qtcreator in lubuntu 16.04 and when trying to open it, i am getting an error
This program requires an x86 processor that supports SSE2 extension, at least a Pentium 4 or newer
Aborted (core dumped)
can someone help me to solve this problem.
I'm using ICOP borad with Lubuntu 16.04
You'll probably need to compile from source with -mno-sse (Or just -mno-sse2 if your CPU has SSE1 but not SSE2). If you're not cross-compiling from a faster machine, use -march=native to enable all the instruction sets your CPU supports, and not enable any that it doesn't.)
The 32-bit qtcreator package probably enables SSE2 on purpose, because detected it and printed an error instead of just dying with a SIGILL. Likely it can be built from source (or the Ubuntu source package) with a different config.
Apparently 32-bit Ubuntu is intended to run on CPUs without SSE2, according to this guide posted in the Ubuntu forums. (It's talking about old desktops with old mainstream CPUs, not modern embedded, but same difference.) So this might be considered a bug.
gcc's 32-bit code-gen does default to assuming cmov support and other P6 (Pentium Pro / Pentium II) instructions, but I guess Ubuntu configures their 32-bit gcc to not enable -msse2 by default. So you couldn't even boot the kernel on a P5 Pentium or older. (Makes sense, if you have SSE2 you probably have an x86-64 capable CPU; running on 32-bit-only CPUs is one of the few reasons for not just using x86-64 Ubuntu. But some people do use 32-bit systems for some reason on modern HW, and gimping it too much by disabling cmov and other P6 new instructions might be undesirable.)
A few years ago (like 2013 maybe?) I booted an Ubuntu live CD on an Athlon XP (SSE1 but not SSE2). It mostly booted to the desktop, but there was a popup from one program that it had died with SIGILL. i.e. it tried to run an SSE2 instruction and got an illegal-instruction exception. I guess this would be considered a but if 32-bit Ubuntu really does aim to support CPUs without SSE2

Assembly language programs in linux using amd64

Do i need to use AT & T syntax(GAS) or Intel syntax or anything else for writing assembly language program in linux with AMD 64 bit architecture using NASM ? What is the instruction set used to run AMD64? Does it support push pop instructions?
NASM uses intel syntax. Available instructions can be found from AMD manual: http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2008/10/24594_APM_v3.pdf

CUDA 5.5 & Intel C/C++ Compiler on Linux

For my current project, I need to use CUDA and the Intel C/C++ compilers in the same project. (I rely on the SSYEV implementation of Intel's MKL, which takes roughly 10 times as long when using GCC+MKL instead of ICC+MKL (~3ms from GCC, ~300µs from ICC).
icc -v
icc version 12.1.5
NVIDIA states, that Intel ICC 12.1 is supported (http://docs.nvidia.com/cuda/cuda-samples/index.html#linux-platforms-supported), but even after having downgraded to Intel ICC 12.1.5 (installed as part of the Intel Composer XE 2011 SP1 Update 3), I am still running into this issue:
nvcc -ccbin=icc src/test.cu -o test
/usr/local/cuda-5.5/bin//..//include/host_config.h(72): catastrophic error: #error directive: -- unsupported ICC configuration! Only ICC 12.1 on Linux x86_64 is supported!
#error -- unsupported ICC configuration! Only ICC 12.1 on Linux x86_64 is supported!
Unfortunately, it seems as if Nvidia is merely tolerating the use of ICC, because I would hardly call it "support", given the lack of information provided by Nvidia for using ICC together with CUDA.
I am running Ubuntu 12.10 x86_64 and CUDA 5.5. Telling icc to mimick the behavior of the stock GCC 4.7.2 using the -Xcompiler -gcc-version=470 option did not help either. Using google/search, I was only able to find threads from the Nvidia forums dealing with CUDA 3.x and Intel ICC 11.1, but I was unable to transfer the obtained information to current CUDA releases.
I would be very grateful for any suggestion on how to solving this issue :-)
Referring to the file referenced in the error you received, it's specifically looking for an ICC compiler with a particular build date:
#if defined(__ICC)
#if !(__INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811) || !defined(__GNUC__) || !defined(__LP64__)
#error -- unsupported ICC configuration! Only ICC 12.1 on Linux x86_64 is supported!
#endif
The solution would be to have the intel compiler that actually matches that specified build date. As indicated, ICC 12.1, ie. version 12.1.0.233, instead of ICC 12.1.5 should do the trick.
The narrow focus is at least partly due to a test limitation. In this case, a particular ICC variant was tested with the CUDA toolkit before it was released, and so that host config check has this test in it.
I confronted the problem when compiling madagascar-1.5 with icc2013 and ifort2013. Then I try to resolve the problem by downloading ICC version 2011 update7. Based the INTEL_COMPILER_BUILD_DATE which is 20110811, I can download the correct one. I think the date 20110811 matched icc is the correct one.

How to test if your Linux Support SSE2

Actually I have 2 questions:
Is SSE2 Compatibility a CPU issue or Compiler issue?
How to check if your CPU or Compiler support SSE2?
I am using GCC Version:
gcc (GCC) 4.5.1
When I tried to compile a code it give me this error:
$ gcc -O3 -msse2 -fno-strict-aliasing -DHAVE_SSE2=1 -DMEXP=19937 -o test-sse2-M19937 test.c
cc1: error: unrecognized command line option "-msse2"
And cpuinfo showed this:
processor : 0
vendor : GenuineIntel
arch : IA-64
family : 32
model : 1
model name : Dual-Core Intel(R) Itanium(R) Processor 9140M
revision : 1
archrev : 0
features : branchlong, 16-byte atomic ops
cpu number : 0
cpu regs : 4
cpu MHz : 1669.000503
itc MHz : 416.875000
BogoMIPS : 3325.95
siblings : 2
physical id: 0
core id : 0
thread id : 0
The CPU needs to be able to execute SSE2 instrcutions, and the compiler needs to be able to generate them.
To check if your cpu supports SSE2:
# cat /proc/cpuinfo
It will be somewhere under "flags" if it is supported.
Update: So you cpu doesn't support it.
For the compiler:
# gcc -dumpmachine
# gcc --version
Target of your compiler needs to a kind of x86*, since only this cpus support sse2, which is part of the x86 instruction set
AND
gcc version needs to be >= 3.1 (most likely, since this is about 10 years old or something) for supporting SSE2.
Update: So your compiler doesn't support it on this target, it will if you are using it as a cross compiler for x86.
It's both. The compiler/assembler need to be able to emit/handle SSE2 instructions, and then the CPU needs to support them. If your binary has SSE2 instructions with no conditions attached and you try to run it on a Pentium II you are out of luck.
The best way is to check your GCC manual. For example my GCC manpage refers to the -msse2 option which will allow you to explicitly enable SSE2 instructions in the binaries. Any relatively recent GCC or ICC should support it. As for your cpu, check the flags line in /proc/cpuinfo.
It would be best, though, to have checks in your code using cpuid etc, so that SSE2 sections can be disabled in CPUs that do not support it and your code can fall back on a more common instruction set.
EDIT:
Note that your compiler needs to either be a native compiler running on a x86 system, or a cross-compiler for x86. Otherwise it will not have the necessary options to compile binaries for x86 processors, which includes anything with SSE2.
In your case the CPU does not support x86 at all. Depending on your Linux distribution, there might be packages with the Intel IA32EL emulation layer for x86-software-on-IA64, which may allow you to run x86 software.
Therefore you have the following options:
Use a cross-compiler that will run on IA64 and produce binaries for x86. Cross-compiler toolchains are not an easy thing to setup though, because you need way more than just the compiler (binutils, libraries etc).
Use Intel IA32EL to run a native x86 compiler. I don't know how you would go about installing a native x86 toolchain and all the libraries that your project needs in your distributions does not support it directly. Perhaps a full-blown chroot'ed installation of an x86 distribution ?
Then if you want to test your build on this system you have to install Intel's IA32EL for Linux.
EDIT2:
I suppose you could also run a full x86 linux distribution on an emulator like Bochs or QEMU (with no virtualization of course). You are definitely not going to be dazzled by the resulting speeds though.
Another trick not yet mentioned is do:
gcc -march=native -dM -E - </dev/null | grep SSE2
and get:
#define __SSE2_MATH__ 1
#define __SSE2__ 1
With -march=native you are checking both your compiler and your CPU. If you give a different -march for a specific CPU, like -march=bonnell you can check for that CPU.
Consult your gcc docs for the correct version of gcc:
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Submodel-Options.html
use asm to check the existence of sse2
enter code here
static
bool HaveSSE2()
{
return false;
__asm mov EAX,1 ;
__asm cpuid ;
__asm test EDX, 4000000h ;test whether bit 26 is set
__asm jnz yes ;yes
return false;
yes:
return true;
}
Try running:
lshw -class processor | grep -w sse2
and look under the processor section.

What 64bit target to choose when compiling with Visual Studio (vcvarsall.bat)?

The vcvarsall.bat that does setup de build environment let you choose between x86 | ia64 | amd64 | x86_amd64 | x86_ia64.
First option is obvious for 32bit, but the question is: what would be the optimal option between the other 4 if you want to build for 64bit and you want to run on all 64 bit machines.
Let say that you don't have time/resources to make 4 builds for 64 and you have to choose only one of them?
I found a page that clarifies this issue http://msdn.microsoft.com/en-us/library/x4d2c09s%28VS.80%29.aspx
32/64 OS building for 32 => x86
32 OS building for 64 => x86_amd64
64 OS building for 64 => amd64
And you can ignore the other options because Itanium does not have a real market share.
ia64 (Itanium) is a very redundant CPU (Google for ia64 market share) and you should use it only if you're going to deploy to that architecture.
x86_amd is for running 32 bit on amd64 architecture, use it only if your code doesn't compile/work under amd64.

Resources