qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] tcg_register_jit_int() interface problem
@ 2018-07-16 11:10 Aleksandar Markovic
  2018-07-16 11:30 ` Laurent Vivier
  0 siblings, 1 reply; 9+ messages in thread
From: Aleksandar Markovic @ 2018-07-16 11:10 UTC (permalink / raw)
  To: Richard Henderson, Peter Maydell
  Cc: qemu-devel@nongnu.org, Petar Jovanovic, Laurent Vivier,
	Riku Voipio

Hello, all.


Just a little background:


One of the fields in an ELF header is e_machine. It is meant to contain "machine architecture". The numerical value is approved by a committee. Some values for common targets are: EM_PPC, EM_PPC64, EM_ARM, EM_AARCH64, etc.


The TCG function tcg_register_jit_int() expects that the preprocessor constant ELF_HOST_MACHINE is defined, and uses internally the value of that constant.


Consider, let's say, ARM: It defines ELF_HOST_MACHINE in tcg/arm/tcg-target.inc.c as


#define ELF_HOST_MACHINE EM_ARM


while in tcg/aarch64/tcg-target.inc.c it defines it as


#define ELF_HOST_MACHINE EM_AARCH64


For MIPS, the situation is different: Up until recently, MIPS had only one value for e_machine: that was EM_MIPS (used for both 32-bit and 64-bit MIPS systems). However, new nanoMIPS systems have a new value in that field: EM_NANOMIPS (that is to be applied for both 32-bit and 64-bit nanoMIPS systems).


The situation described above represent a problem for us developing nanoMIPS support, forcing us to have different compilations (and executables) for MIPS and nanoMIPS.


Is there a possibility to refactor tcg_register_jit_int() to receive "e_machine" value as an argument, instead of expecting preprocessor constant to be set?


Please advice if you have something better in mind.


Yours,

Aleksandar


(cc. Laurent and Riku since this is also indirectly related to handling ELF headers linux user mode, and there will be a couple other nanoMIPS patches comming related to that.)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-07-16 15:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-16 11:10 [Qemu-devel] tcg_register_jit_int() interface problem Aleksandar Markovic
2018-07-16 11:30 ` Laurent Vivier
2018-07-16 11:36   ` Aleksandar Markovic
2018-07-16 11:55     ` Peter Maydell
2018-07-16 12:55       ` Aleksandar Markovic
2018-07-16 13:04         ` Laurent Vivier
2018-07-16 13:23           ` Aleksandar Markovic
2018-07-16 15:06             ` Richard Henderson
2018-07-16 15:04     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).