arc: Fix memory read/write routines to handle unaligned addresses

Some targets only are capable of 32-bit reads/writes (and they need to
be aligned!!). As GDB can read from unaligned addresses, this causes
problems. Especially writing of 16-bit values needs to be done through
read-modify-write. This should fix this (at least for basic things as
breakpoint setting, etc).

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Fix wait_until_core_is_halted()

The logic was inverted.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
arc: Invalidate D$ as well

Although I$ invalidation is more important (especially when setting/
removing breakpoints), the D$ needs to be invalidated as well if the
code doesn't do that autonomically.

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
arc: Use read_aux_reg for auxiliary registers

read_core_reg was used accidentally

Signed-off-by: Mischa Jonker <mjonker@synopsys.com>