Makefile: add compile flags for QEMU to not use sse3/sse4

Signed-off-by: Jonas Zaddach <zaddach@eurecom.fr>
Makefile: split qemu arch list into components

Signed-off-by: Luca Bruno <lucab@debian.org>
Unify ARM BaseInstructions plugin

Add some conditional compilation to the base one, to avoid having
several per-arch codebase. Better abstraction still to be done.

Signed-off-by: Luca Bruno <lucab@debian.org>
BaseInstructions: uniform opcodes registers usage

Make more esplicit the register usage of custom S2E opcodes.
This helps documenting the ASM interface and at the same time
removes a lot of target-specific code in favor of compile-time
constants.

Signed-off-by: Luca Bruno <lucab@debian.org>
BaseInstructions: move debug to proper stream

Signed-off-by: Luca Bruno <lucab@debian.org>
BaseInstructions: enable sleep opcode for ARM

Signed-off-by: Luca Bruno <lucab@debian.org>
EdgeKiller: enable plugin for ARM

Signed-off-by: Luca Bruno <lucab@debian.org>
CacheSim: enable plugin for ARM

Signed-off-by: Luca Bruno <lucab@debian.org>
ARM: fix env is RO when the tlb is filled

An update of env will cause klee to throw an error:
"""
KLEE: ERROR: memory error: object read only
KLEE: NOTE: now ignoring this error at this location
"""

To trigger the error the following test case can be used:

	/* assuming D is not in the TLB */
	#define D (*((unsigned int *)0x85000000))

	static void my_test(void)
	{
	    char b;
	    s2e_make_symbolic(&b, 1, "my_buf");

	    if (b == 'A') {
	        D = 0;
	        s2e_kill_state(0, "A");
	    } else {
	        s2e_kill_state(0, "not A");
	    }
	}

The fix is just an old hack that has been introduced in the commit:
394a0e3b999c9c4d76691ff81163731d908cdebb

Signed-off-by: Lucian Cojocar <cojocar@gmail.com>
Guest: fix pass message pointer in r0 for ARM

The pointer to the message for the s2e_{message,warning} calls was not
set in the 'r0' register.

Signed-off-by: Lucian Cojocar <cojocar@gmail.com>
Emit instr_translate_start also in full ARM mode

Signed-off-by: Luca BRUNO <lucab@debian.org>
Implemented execution state getFlags() function for ARM

Signed-off-by: Jonas Zaddach <zaddach@eurecom.fr>
Uniform opcodes handling across architectures

Signed-off-by: Luca Bruno <lucab@debian.org>
RawMonitor: port plugin to ARM

Make RawMonitor plugin no more x86-dependent, port to ARM and enable it
on all architectures.

Signed-off-by: Luca Bruno <lucab@debian.org>
ModuleExecutionDetector: port plugin to ARM

Signed-off-by: Luca Bruno <lucab@debian.org>
Add more helpers for banked register

Add getters and setters for banked spsr and lr registers.

Signed-off-by: Luca Bruno <lucab@debian.org>
Guest: Add missing include

Signed-off-by: Luca BRUNO <lucab@debian.org>
Move S2E ARM tests in a separate repository

Signed-off-by: Luca Bruno <lucab@debian.org>
Guest: make guest tools more arch independent

Signed-off-by: Luca Bruno <lucab@debian.org>
Guest: add makefile targets for all arch

Signed-off-by: Luca Bruno <lucab@debian.org>