Re: [Qemu-devel] [PATCH 10/12 v9] target-tilegx: Add TILE-Gx building files

2015-04-10 Thread Chen Gang
On 4/10/15 06:10, Peter Maydell wrote: On 27 March 2015 at 11:00, Chen Gang xili_gchen_5...@hotmail.com wrote: [...] ;; + tilegx) +TARGET_ARCH=tilegx + ;; TARGET_ARCH already defaults to the target name, so you don't need to set it again unless it's different. You can just have

Re: [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-04-10 Thread Chen Gang
On 4/10/15 06:19, Peter Maydell wrote: On 27 March 2015 at 11:07, Chen Gang xili_gchen_5...@hotmail.com wrote: [...] +static void gen_fnop(void) +{ +qemu_log_mask(CPU_LOG_TB_IN_ASM, (f)nop\n); I really don't much like mixing a fake disassembler in with the translator. If you want

Re: [Qemu-devel] [PATCH 01/12 v9] linux-user: tilegx: Firstly add architecture related features

2015-04-10 Thread Chen Gang
On 4/11/15 05:38, Peter Maydell wrote: On 10 April 2015 at 21:01, Chen Gang xili_gchen_5...@hotmail.com wrote: Firstly, thank you very much for your patient work for all related patches. And I shall try to send patch v10 within this month, and let linux-user run Hello world completely

Re: [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-04-10 Thread Chen Gang
On 4/11/15 05:56, Peter Maydell wrote: On 10 April 2015 at 22:28, Chen Gang xili_gchen_5...@hotmail.com wrote: On 4/10/15 06:19, Peter Maydell wrote: On 27 March 2015 at 11:07, Chen Gang xili_gchen_5...@hotmail.com wrote: +/* + * The related functional description for bfextu in isa document

[Qemu-devel] [PATCH 03/12 v9] linux-user: Support tilegx architecture in syscall

2015-03-27 Thread Chen Gang
Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions

[Qemu-devel] [PATCH 02/12 v9] linux-user: tilegx: Add target features support within qemu

2015-03-27 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h

[Qemu-devel] [PATCH 05/12 v9] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-27 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux

[Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-03-27 Thread Chen Gang
Generate related tcg instructions, and qemu tilegx can run to 1st system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/translate.c | 543

[Qemu-devel] [PATCH 06/12 v9] target-tilegx: Add cpu basic features for linux-user

2015-03-27 Thread Chen Gang
It implements minimized cpu features for linux-user. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/cpu-qom.h | 73 target-tilegx/cpu.c | 149 target-tilegx/cpu.h | 94

[Qemu-devel] [PATCH 04/12 v9] linux-user: Support tilegx architecture in linux-user

2015-03-27 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user

[Qemu-devel] [PATCH 01/12 v9] linux-user: tilegx: Firstly add architecture related features

2015-03-27 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278

[Qemu-devel] [PATCH 00/12 v9] tilegx: Firstly add tilegx feature for linux-user

2015-03-27 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (12): linux-user: tilegx: Firstly add architecture related features linux-user: tilegx: Add target features support

[Qemu-devel] [PATCH 08/12 v9] target-tilegx: Add opcode basic implementation for tilegx

2015-03-27 Thread Chen Gang
It is from Tilera Corporation, and copied from Linux kernel arch/tile/ include/uapi/arch/opcode_tilegx.h. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/opcode_tilegx.h | 1406 + 1 file changed, 1406 insertions(+) create mode 100644

[Qemu-devel] [PATCH 07/12 v9] target-tilegx: Add helper features for linux-user

2015-03-27 Thread Chen Gang
For supporting linux-user system call, tilegx need support exception helper features for it. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/helper.c | 31 +++ target-tilegx/helper.h | 1 + 2 files changed, 32 insertions(+) create mode 100644

[Qemu-devel] [PATCH 10/12 v9] target-tilegx: Add TILE-Gx building files

2015-03-27 Thread Chen Gang
Add related configuration, make files for tilegx. Now, qemu tilegx can pass building. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure | 3 +++ default-configs/tilegx-linux-user.mak | 1 + target-tilegx/Makefile.objs | 1 + 3 files changed, 5

[Qemu-devel] [PATCH 11/12 v9] target-tilegx: Decoding pipes to support finish running 1st system call

2015-03-27 Thread Chen Gang
For the instructions which need tcg generation, the decoding functions return directly, or they will direct to the exception. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/translate.c | 704 ++ 1 file changed, 704 insertions

Re: [Qemu-devel] [PATCH 00/12 v9] tilegx: Firstly add tilegx feature for linux-user

2015-03-27 Thread Chen Gang
On 3/28/15 01:01, Richard Henderson wrote: On 03/27/2015 03:47 AM, Chen Gang wrote: After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (12): linux-user: tilegx

Re: [Qemu-devel] [PATCH 06/12 v8] target-tilegx: Add TILE-Gx building files

2015-03-23 Thread Chen Gang
On 3/23/15 23:06, Richard Henderson wrote: On 03/21/2015 03:23 AM, Chen Gang wrote: Add related configuration, make files for tilegx. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure | 3 +++ default-configs/tilegx-linux-user.mak | 1 + target

[Qemu-devel] [PATCH 11/12 v8] target-tilegx: Decoding pipes to support finish running 1st system call

2015-03-21 Thread Chen Gang
For the instructions which need tcg generation, the decoding functions return directly, or they will direct to the exception. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/translate.c | 704 ++ 1 file changed, 704 insertions

[Qemu-devel] [PATCH 12/12 v8] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-03-21 Thread Chen Gang
Generate related tcg instructions, and qemu tilegx can run to 1st system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/translate.c | 543

[Qemu-devel] [PATCH 09/12 v8] target-tilegx: Add opcode basic implementation for tilegx

2015-03-21 Thread Chen Gang
It is from Tilera Corporation, and copied from Linux kernel arch/tile/ include/uapi/arch/opcode_tilegx.h. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/opcode_tilegx.h | 1406 + 1 file changed, 1406 insertions(+) create mode 100644

[Qemu-devel] [PATCH 10/12 v8] target-tilegx: Finish processing bundle and preparing decoding pipes

2015-03-21 Thread Chen Gang
Finish processing tilegx bundle, and reach to related pipes. At present, the qemu tilegx can pass building. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/translate.c | 515 ++ 1 file changed, 515 insertions(+) create mode 100644

[Qemu-devel] [PATCH 08/12 v8] target-tilegx: Add helper features for linux-user

2015-03-21 Thread Chen Gang
For supporting linux-user system call, tilegx need support exception helper features for it. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/helper.c | 31 +++ target-tilegx/helper.h | 1 + 2 files changed, 32 insertions(+) create mode 100644

[Qemu-devel] [PATCH 05/12 v8] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-21 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux

[Qemu-devel] [PATCH 04/12 v8] linux-user: Support tilegx architecture in linux-user

2015-03-21 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user

[Qemu-devel] [PATCH 02/12 v8] linux-user: tilegx: Add target features support within qemu

2015-03-21 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h

[Qemu-devel] [PATCH 03/12 v8] linux-user: Support tilegx architecture in syscall

2015-03-21 Thread Chen Gang
Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions

[Qemu-devel] [PATCH 07/12 v8] target-tilegx: Add cpu basic features for linux-user

2015-03-21 Thread Chen Gang
It implements minimized cpu features for linux-user. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/cpu-qom.h | 73 target-tilegx/cpu.c | 149 target-tilegx/cpu.h | 94

[Qemu-devel] [PATCH 06/12 v8] target-tilegx: Add TILE-Gx building files

2015-03-21 Thread Chen Gang
Add related configuration, make files for tilegx. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure | 3 +++ default-configs/tilegx-linux-user.mak | 1 + target-tilegx/Makefile.objs | 1 + 3 files changed, 5 insertions(+) create mode 100644

[Qemu-devel] [PATCH 01/12 v8] linux-user: tilegx: Firstly add architecture related features

2015-03-21 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278

[Qemu-devel] [PATCH 00/12 v8] tilegx: Firstly add tilegx feature for linux-user

2015-03-21 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (12): linux-user: tilegx: Firstly add architecture related features linux-user: tilegx: Add target features support

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-21 Thread Chen Gang
On 3/22/15 01:33, Peter Maydell wrote: On 20 March 2015 at 23:57, Chen Gang xili_gchen_5...@hotmail.com wrote: For 'opcode_tilegx.h', it comes from Linux kernel which is already more than 1000 lines. For me, I still suggest to let it within one patch. Right, for that sort of special case you

Re: [Qemu-devel] [PATCH 1/6 v6] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 01:03, Richard Henderson wrote: On 03/18/2015 07:04 PM, Chen Gang wrote: For me, I am not quite sure about it, the related functional description is: rf[Dest] = signExtend32 ((int32_t) rf[SrcA] * (int32_t) rf[SrcB]); Do you mean it is equal to: rf[Dest] = signExtend32 (rf

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 07:30, Peter Maydell wrote: On 20 March 2015 at 22:52, Chen Gang xili_gchen_5...@hotmail.com wrote: On 3/21/15 01:48, Peter Maydell wrote: On 20 March 2015 at 15:25, Chen Gang xili_gchen_5...@hotmail.com wrote: 10 files changed, 3523 insertions(+) If you have any patch which has

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 01:45, Richard Henderson wrote: On 03/20/2015 08:25 AM, Chen Gang wrote: +/* + * The related functional description for bfextu in isa document: + * + * uint64_t mask = 0; + * mask = (-1ULL) ^ ((-1ULL ((BFEnd - BFStart) 63)) 1); + * uint64_t rot_src = (((uint64_t) rf[SrcA

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 01:48, Peter Maydell wrote: On 20 March 2015 at 15:25, Chen Gang xili_gchen_5...@hotmail.com wrote: It is the configure and build system support for TILE-Gx (tilegx will be used in configure and real sub-directory name). At present, it is linux-user only, and can finish the first

[Qemu-devel] [PATCH 3/6 v7] linux-user: tilegx: Add target features support within qemu

2015-03-20 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h

[Qemu-devel] [PATCH 0/6 v7] tilegx: Firstly add tilegx feature for linux-user

2015-03-20 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

[Qemu-devel] [PATCH 6/6 v7] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-20 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux

[Qemu-devel] [PATCH 5/6 v7] linux-user: Support tilegx architecture in linux-user

2015-03-20 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user

[Qemu-devel] [PATCH 4/6 v7] linux-user: Support tilegx architecture in syscall

2015-03-20 Thread Chen Gang
Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions

[Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
It is the configure and build system support for TILE-Gx (tilegx will be used in configure and real sub-directory name). At present, it is linux-user only, and can finish the first system call (uname) execution in __libc_start_main(). Signed-off-by: Chen Gang gang.chen.5...@gmail.com

[Qemu-devel] [PATCH 2/6 v7] linux-user: tilegx: Firstly add architecture related features

2015-03-20 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278

[Qemu-devel] [PATCH 0/6 v7] tilegx: Firstly add tilegx feature for linux-user

2015-03-20 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

Re: [Qemu-devel] [PATCH 0/6 v7] tilegx: Firstly add tilegx feature for linux-user

2015-03-20 Thread Chen Gang
Sorry, I sent send the mail by my another mail address (it is incorrect). I should send them again by my xili_gchen_5...@hotmail.com. Thanks. On 3/20/15 23:18, Chen Gang wrote: After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully

[Qemu-devel] [PATCH 5/6 v6] linux-user: Support tilegx architecture in linux-user

2015-03-18 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user

[Qemu-devel] [PATCH 2/6 v6] linux-user: tilegx: Firstly add architecture related features

2015-03-18 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278

[Qemu-devel] [PATCH 4/6 v6] linux-user: Support tilegx architecture in syscall

2015-03-18 Thread Chen Gang
Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions

[Qemu-devel] [PATCH 3/6 v6] linux-user: tilegx: Add target features support within qemu

2015-03-18 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h

[Qemu-devel] [PATCH 0/6 v6] tilegx: Firstly add tilegx feature for linux-user

2015-03-18 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

[Qemu-devel] [PATCH 1/6 v6] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-18 Thread Chen Gang
It is the configure and build system support for TILE-Gx (tilegx will be used in configure and real sub-directory name). At present, it is linux-user only, and can finish the first system call (uname) execution in __libc_start_main(). Signed-off-by: Chen Gang gang.chen.5...@gmail.com

[Qemu-devel] [PATCH 6/6 v6] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-18 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux

Re: [Qemu-devel] [PATCH 1/6 v6] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-18 Thread Chen Gang
On 3/19/15 04:06, Richard Henderson wrote: On 03/18/2015 09:34 AM, Chen Gang wrote: +static void gen_fnop(void) +{ +qemu_log_mask(CPU_LOG_TB_IN_ASM, (f)nop\n); +} + +static void gen_cmpltui(struct DisasContext *dc, +uint8_t rdst, uint8_t rsrc, int8_t imm8

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-17 Thread Chen Gang
On 3/16/15 23:37, Richard Henderson wrote: On 03/15/2015 04:57 PM, Chen Gang wrote: OK, thanks. And next, I shall try to send the whole tilegx patches again (it is about 6-8 patches), within 2015-03-18. When you do so, make sure it's against the *current* master tree. Your patch set

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-17 Thread Chen Gang
On 3/16/15 23:31, Richard Henderson wrote: On 03/13/2015 11:03 PM, Chen Gang wrote: +static void decode_rrr_1_opcode_y0(struct DisasContext *dc, + tilegx_bundle_bits bundle) +{ +switch (get_RRROpcodeExtension_Y0(bundle)) { +case

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-15 Thread Chen Gang
At present, I finished the first system call successfully (it is uname called by glibc). If no additional reply of this thread within 3 days, I shall send a new patch which will include system call implementation. Thanks. On 3/14/15 14:03, Chen Gang wrote: QEMU TILE-Gx can decode bundle

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-15 Thread Chen Gang
On 3/16/15 00:50, Andreas Färber wrote: Am 15.03.2015 um 15:19 schrieb Chen Gang: If no additional reply of this thread within 3 days, I shall send a new patch which will include system call implementation. Please use a proper subject then, saying what it does (rather what works afterwards

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-15 Thread Chen Gang
On 3/16/15 07:44, Peter Maydell wrote: On 15 March 2015 at 23:08, Chen Gang xili_gchen_5...@hotmail.com wrote: On 3/16/15 00:50, Andreas Färber wrote: Am 15.03.2015 um 15:19 schrieb Chen Gang: If no additional reply of this thread within 3 days, I shall send a new patch which will include

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-15 Thread Chen Gang
On 3/16/15 07:45, Peter Maydell wrote: On 14 March 2015 at 06:03, Chen Gang xili_gchen_5...@hotmail.com wrote: QEMU TILE-Gx can decode bundle, disassemble code, and generate tcg code for 1st TB block (__start). Then directly jump to __libc_start_main (2nd TB block). In __libc_start_main

[Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-14 Thread Chen Gang
QEMU TILE-Gx can decode bundle, disassemble code, and generate tcg code for 1st TB block (__start). Then directly jump to __libc_start_main (2nd TB block). In __libc_start_main, it can continue executing to the first function call _dl_aux_init(). Signed-off-by: Chen Gang gang.chen.5...@gmail.com

Re: [Qemu-devel] [PATCH v2] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-03-13 Thread Chen Gang
On 3/14/15 08:22, Richard Henderson wrote: On 03/13/2015 04:07 PM, Chen Gang wrote: UNARY_RRR_0_OPCODE_X0. +if ((get_UnaryOpcodeExtension_X0(bundle) == 0x03) !rsrc !rdst) { FNOP_UNARY_OPCODE_X0. OK, thanks. There are enough of these it's probably worth

Re: [Qemu-devel] [PATCH v2] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-03-13 Thread Chen Gang
Firstly, thank you very much for your reviewing, and I shall send patch v3 within this week end (2015-03-15). On 3/14/15 02:20, Richard Henderson wrote: On 03/12/2015 09:06 AM, Chen Gang wrote: +#define TILEGX_GEN_SAVE_PREP(rdst) \ +dc-tmp_regcur-idx = rdst; \ +dc-tmp_regcur-val

Re: [Qemu-devel] [PATCH] target-tilegx: Finish parsing all opcode for bundle

2015-03-12 Thread Chen Gang
I shall send a new patch, next. This patch will be obsoleted. Thanks. On 3/8/15 08:54, Chen Gang wrote: According to arch/tile/include/uapi/arch/opcode_tilegx.h in Linux kernel source code, qemu can parse all opcode: grep _OPCODE_X0 opcode_tilegx.h | awk '{print $3, $1}' | sort -n

[Qemu-devel] [PATCH v2] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-03-12 Thread Chen Gang
Tilegx Qemu can decode bundle, disassemble code, and generate tcg code for 1st TB block (__start). Then directly jump to __libc_start_main (2nd TB block). Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/cpu-qom.h |2 + target-tilegx/cpu.c |4 - target-tilegx

[Qemu-devel] [PATCH] target-tilegx: Finish parsing all opcode for bundle

2015-03-07 Thread Chen Gang
, $1}' | sort -n grep _OPCODE_Y1 opcode_tilegx.h | awk '{print $3, $1}' | sort -n grep _OPCODE_Y2 opcode_tilegx.h | awk '{print $3, $1}' | sort -n Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- target-tilegx/cpu-qom.h |2 + target-tilegx/cpu.c |4 - target-tilegx

Re: [Qemu-devel] [PATCH 0/6 v5] tilegx: Can load elf64 tilegx binary successfully for linux-user

2015-03-06 Thread Chen Gang
, but it is not stable (gmail in China is not stable). And if the patches can pass checking, please add me as the maintainer, and let Andreas, Chris, Richard, and Peter as Reviewed-by. Thanks. On 3/6/15 04:22, Chen Gang wrote: After load elf64 tilegx binary for linux-user, the working flow reaches 1st

Re: [Qemu-devel] [PATCH 0/6 v5] tilegx: Can load elf64 tilegx binary successfully for linux-user

2015-03-06 Thread Chen Gang
, but it is not stable (gmail in China is not stable). And if the patches can pass checking, please add me as the maintainer, and let Andreas, Chris, Richard, and Peter as Reviewed-by. Thanks. On 3/6/15 04:22, Chen Gang wrote: After load elf64 tilegx binary for linux-user, the working flow reaches 1st

[Qemu-devel] [PATCH 4/6 v5] linux-user: Support tilegx architecture in syscall

2015-03-05 Thread Chen Gang
Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions

[Qemu-devel] [PATCH 6/6 v5] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-05 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux

[Qemu-devel] [PATCH 2/6 v5] linux-user: tilegx: Firstly add architecture related features

2015-03-05 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278

[Qemu-devel] [PATCH 5/6 v5] linux-user: Support tilegx architecture in linux-user

2015-03-05 Thread Chen Gang
-by: Chen Gang gang.chen.5...@gmail.com --- include/elf.h| 2 ++ linux-user/elfload.c | 23 linux-user/main.c| 74 3 files changed, 99 insertions(+) diff --git a/include/elf.h b/include/elf.h index a516584..139b22d

[Qemu-devel] [PATCH 0/6 v5] tilegx: Can load elf64 tilegx binary successfully for linux-user

2015-03-05 Thread Chen Gang
0x7fcc44c71717: retq Load elf64 tilegx successfully reach code start position: [00010f60] _start [root@localhost qemu]# echo $? 0 [root@localhost qemu]# Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

[Qemu-devel] [PATCH 1/6 v5] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-05 Thread Chen Gang
It is the configure and build system support for TILE-Gx (tilegx will be used in configure and real sub-directory name), and at present, it is linux-user only. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure | 3 + default-configs/tilegx-linux

[Qemu-devel] [PATCH 3/6 v5] linux-user: tilegx: Add target features support within qemu

2015-03-05 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h

Re: [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features

2015-02-28 Thread Chen Gang S
parameter. - arm, i386 and microblaze do not consider about the invalid parameter. For dump_state, the caller will check whether it is NULL, before use it. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed

Re: [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features

2015-02-28 Thread Chen Gang S
On 2/28/15 13:20, Chen Gang S wrote: diff --git a/target-tilegx/helper.h b/target-tilegx/helper.h new file mode 100644 index 000..e69de29 Is this empty file actually included from somewhere in this patch? Yes, it is for future use, I guess, at present, we can just drop

Re: [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features

2015-02-27 Thread Chen Gang S
On 2/28/15 10:09, Chris Metcalf wrote: On 2/27/2015 9:10 PM, Chen Gang S wrote: By the way, does Gx8000 mean 8000 core count? It's marketing, so it doesn't have to mean anything. The TILE-Gx 8036 is the 36-core part, the 8072 is the 72-core part, 8009 is the 9-core part, etc

Re: [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features

2015-02-27 Thread Chen Gang S
Firstly, thank you very much for your patient work! On 2/28/15 01:36, Andreas Färber wrote: Hi, target-tilegx: Initial stub or ...support? No need to mention QEMU (spelling!) in a QEMU commit. OK, thanks. Am 22.02.2015 um 14:33 schrieb Chen Gang S: It almost likes a template

Re: [Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features

2015-02-27 Thread Chen Gang S
count? Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed

Re: [Qemu-devel] [PATCH 4/6 v4] linux-user: Support tilegx architecture in syscall

2015-02-27 Thread Chen Gang S
On 02/28/2015 01:40 AM, Andreas Färber wrote: Am 22.02.2015 um 14:36 schrieb Chen Gang S: Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux

Re: [Qemu-devel] [PATCH 6/6 v4] linux-user/syscall.c: Switch all macros which are not defined in tilegx

2015-02-27 Thread Chen Gang S
On 02/28/2015 02:24 AM, Andreas Färber wrote: Am 22.02.2015 um 14:37 schrieb Chen Gang S: For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-26 Thread Chen Gang S
On 2/27/15 11:01, Chris Metcalf wrote: On 2/25/2015 8:44 PM, Chen Gang S wrote: On 02/26/2015 01:19 AM, Richard Henderson wrote: On 02/24/2015 05:40 PM, Chen Gang S wrote: +static int gen_shl16insli(struct DisasContext *dc, + unsigned char rdst, unsigned char rsrc

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-25 Thread Chen Gang S
On 02/26/2015 01:19 AM, Richard Henderson wrote: On 02/24/2015 05:40 PM, Chen Gang S wrote: +static int gen_shl16insli(struct DisasContext *dc, + unsigned char rdst, unsigned char rsrc, short im16) Use uint16_t, as the field is not signed. objdump print

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
On 2/24/15 15:53, Chen Gang S wrote: [...] diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index 5131fa7..82c751e 100644 --- a/target-tilegx/translate.c +++ b/target-tilegx/translate.c @@ -25,18 +25,880 @@ #include exec/cpu_ldst.h #include exec/helper-gen.h

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
On 2/24/15 22:38, Peter Maydell wrote: On 24 February 2015 at 23:21, Chris Metcalf cmetc...@ezchip.com wrote: On 2/24/2015 2:53 AM, Chen Gang S wrote: typedef struct CPUTLState { +uint64_t regs[TILEGX_R_COUNT]; /* Common used registers by outside */ +uint64_t zero

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
On 2/24/15 22:21, Chris Metcalf wrote: On 2/24/2015 2:53 AM, Chen Gang S wrote: typedef struct CPUTLState { +uint64_t regs[TILEGX_R_COUNT]; /* Common used registers by outside */ +uint64_t zero; /* Zero register */ +uint64_t pc; /* Current pc

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
On 2/25/15 00:42, Richard Henderson wrote: On 02/24/2015 05:39 AM, Chen Gang S wrote: After read through target-arm/translate-a64.c, I guess, the main reason is: the zero register (r31) shares with the sp register (also r31). - So it uses cpu_reg() and cpu_reg_sp() for them. - For each

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
On 2/25/15 00:46, Chris Metcalf wrote: On 2/24/2015 11:31 AM, Chen Gang S wrote: - When dst is zero, in most cases, we can just skip the insn, but in some cases, it may cause exception in user mode (e.g st zero r0). Be careful of skipping instructions in general, since for example a ld

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
On 2/25/15 02:18, Chris Metcalf wrote: On 2/24/2015 12:25 PM, Chen Gang S wrote: For me, if the raw integer is only used once, we needn't define a macro for it (instead of, we can give a comment for it). The advantage of names even in this case is that you can group all the macro

Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-24 Thread Chen Gang S
, Chen Gang S wrote: +env-zero = 0; I replied elsewhere about the zero register. OK, thanks. +#define TILEGX_GEN_CHK_BEGIN(x) \ +if ((x) == TILEGX_R_ZERO) { +#define TILEGX_GEN_CHK_END(x) \ +return 0; \ +} \ +if ((x) = TILEGX_R_COUNT) { \ +return -1

[Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully

2015-02-23 Thread Chen Gang S
,tmp3 exit_tb $0x0 set_label $0x0 exit_tb $0x7fd21f340013 Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/main.c | 1 + target-tilegx/cpu-qom.h | 2 + target-tilegx/cpu.c | 4 - target-tilegx/cpu.h | 21 +- target-tilegx/translate.c | 876

[Qemu-devel] [PATCH 1/6 v4] target-tilegx: Firstly add to qemu with minimized features

2015-02-22 Thread Chen Gang S
It almost likes a template for adding an architecture target. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure | 7 ++ default-configs/tilegx-linux-user.mak | 1 + target-tilegx/Makefile.objs | 1 + target-tilegx/cpu-qom.h

[Qemu-devel] [PATCH 5/6 v4] linux-user: Support tilegx architecture in linux-user

2015-02-22 Thread Chen Gang S
-by: Chen Gang gang.chen.5...@gmail.com --- include/elf.h| 2 ++ linux-user/elfload.c | 23 linux-user/main.c| 74 3 files changed, 99 insertions(+) diff --git a/include/elf.h b/include/elf.h index a516584..e70512c

[Qemu-devel] [PATCH 6/6 v4] linux-user/syscall.c: Switch all macros which are not defined in tilegx

2015-02-22 Thread Chen Gang S
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux

[Qemu-devel] [PATCH 4/6 v4] linux-user: Support tilegx architecture in syscall

2015-02-22 Thread Chen Gang S
Add tilegx architecture in syscall_defs.h, all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions

[Qemu-devel] [PATCH 3/6 v4] linux-user: tilegx: Add target features support within qemu

2015-02-22 Thread Chen Gang S
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h

[Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user

2015-02-22 Thread Chen Gang S
0x7fcc44c71717: retq Load elf64 tilegx successfully reach code start position: [00010f60] _start [root@localhost qemu]# echo $? 0 [root@localhost qemu]# Chen Gang (6): target-tilegx: Firstly add to qemu with minimized features linux-user: tilegx: Firstly add architecture related

Re: [Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user

2015-02-22 Thread Chen Gang S
On 2/23/15 02:29, Richard Henderson wrote: On 02/22/2015 05:31 AM, Chen Gang S wrote: Chen Gang (6): target-tilegx: Firstly add to qemu with minimized features linux-user: tilegx: Firstly add architecture related features linux-user: tilegx: Add target features support within qemu

Re: [Qemu-devel] [PATCH 0/6 v4] tilegx: Can load elf64 tilegx binary successfully for linux-user

2015-02-22 Thread Chen Gang S
On 2/23/15 06:32, Bastian Koppelmann wrote: On 02/22/2015 01:31 PM, Chen Gang S wrote: Chen Gang (6): target-tilegx: Firstly add to qemu with minimized features linux-user: tilegx: Firstly add architecture related features linux-user: tilegx: Add target features support within qemu

Re: [Qemu-devel] [PATCH] target-tilegx: Finish decoding the first TB block.

2015-02-21 Thread Chen Gang S
On 2/22/15 09:08, Chen Gang S wrote: On 2/22/15 08:25, Chris Metcalf wrote: [...] Similarly, if any pipeline takes an exception (a TLB fault from a memory op, a GPV fault from an illegal mfspr, etc) then no pipeline completes its action. Oh, really !! And I guess, Richard's code can

<    1   2   3   4   5   6   7   >