s390x: Remove inline function ebcdic_put and related data from cpu.h
authorStefan Weil <sw@weilnetz.de>
Tue, 1 Jan 2013 08:24:55 +0000 (08:24 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 18 Jan 2013 18:07:47 +0000 (19:07 +0100)
commita158986d85bf75aa078ce3fb53e60a7fa3c6c6ee
tree8ad9f02e0c8c15daadca3ea10562866a04dd0a33
parent904e5fd5c25537fdf910bfd5db832df5d9c23ad6
s390x: Remove inline function ebcdic_put and related data from cpu.h

The function is only used in misc_helper.c, so move it to that file.

This reduces the size of debug executables (compiled without optimization)
because they get unused code and data for each compilation which includes
cpu.h.

Executables with optimization don't change their size.

ebcdic2ascii is currently unused and could be removed (not done here).

The array ascii2ebcdic must be accessed with an unsigned index, therefore
(int)ascii[i] was replaced by (uint8_t)ascii[i]. The old code would have
failed for a signed char less than 0. The current code only converts
"QEMU" and spaces to EBCDIC, so there is no problem today.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x/cpu.h
target-s390x/misc_helper.c