Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
On 2/16/15 23:24, Max Filippov wrote: On Mon, Feb 16, 2015 at 5:44 PM, Chen Gang S gang.c...@sunrus.com.cn wrote: I guess, for qemu, we need !DISASM_ONLY, and may need BFD_RELOC, and may need the latest decode_X1_fsm, and also may need !__KERNEL__ -- which means we will use the full binutils

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chris Metcalf
On 2/16/2015 6:46 PM, Peter Maydell wrote: On 17 February 2015 at 08:08, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/16/15 23:24, Max Filippov wrote: Disassembler is not a crucial part of QEMU target. For me, it is necessary. We need disassemble target binary instructions (recognize

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
On 2/16/15 23:00, Chris Metcalf wrote: On 2/16/2015 9:44 AM, Chen Gang S wrote: Excuse me, after comparing the code details between kernel version disassembler and binutils version disassembler, I am sure the kernel version disassembler is the part of the binutils version disassembler: Yes,

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
On 2/17/15 08:29, Chris Metcalf wrote: Yes, I think there is a bit less documentation on tilegx SPRs available. If this becomes a blocker for you, let me know and I will see if there is anything we can do about it. Probably best to wait until you have made more progress on qemu before

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Peter Maydell
On 17 February 2015 at 08:08, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/16/15 23:24, Max Filippov wrote: Disassembler is not a crucial part of QEMU target. For me, it is necessary. We need disassemble target binary instructions (recognize them), then translate them into tcg instructions

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chris Metcalf
Yes, I think there is a bit less documentation on tilegx SPRs available. If this becomes a blocker for you, let me know and I will see if there is anything we can do about it. Probably best to wait until you have made more progress on qemu before trying to make a case for it internally, though.

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
On 2/17/15 10:48, Chen Gang S wrote: On 2/17/15 08:11, Chris Metcalf wrote: On 2/16/2015 6:46 PM, Peter Maydell wrote: On 17 February 2015 at 08:08, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/16/15 23:24, Max Filippov wrote: Disassembler is not a crucial part of QEMU target. For me, it

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
On 2/17/15 08:11, Chris Metcalf wrote: On 2/16/2015 6:46 PM, Peter Maydell wrote: On 17 February 2015 at 08:08, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/16/15 23:24, Max Filippov wrote: Disassembler is not a crucial part of QEMU target. For me, it is necessary. We need disassemble

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
And of cause, it is not the excuse to let me stop: - I shall integrate binutils disassembler firstly in my own branch for the related test and learning. - According to binutils disassembler implementation, I shall write translate.c step by step. - After finish translate.c, I shall

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chen Gang S
Excuse me, after comparing the code details between kernel version disassembler and binutils version disassembler, I am sure the kernel version disassembler is the part of the binutils version disassembler: - kernel version is DISASM_ONLY. - kernel version does not need BFD_RELOC. - kernel

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Chris Metcalf
On 2/16/2015 9:44 AM, Chen Gang S wrote: Excuse me, after comparing the code details between kernel version disassembler and binutils version disassembler, I am sure the kernel version disassembler is the part of the binutils version disassembler: Yes, exactly. We used an unifdef tool and

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-16 Thread Max Filippov
On Mon, Feb 16, 2015 at 5:44 PM, Chen Gang S gang.c...@sunrus.com.cn wrote: I guess, for qemu, we need !DISASM_ONLY, and may need BFD_RELOC, and may need the latest decode_X1_fsm, and also may need !__KERNEL__ -- which means we will use the full binutils version disassembler!! Disassembler is

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-15 Thread Chen Gang S
Excuse me, I want to consult the related information about SPR. For SPRs (Special Purpose Register) under tilegx, I can not get related documents (I only got the tilepro related document for SPR). After read through the source code of Linux kernel for tile, I guess: - SPRs are in

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-14 Thread Chen Gang S
On 2/14/15 11:37, Chris Metcalf wrote: On 2/13/2015 10:08 PM, Chen Gang S wrote: On 2/14/15 08:26, Peter Maydell wrote: On 13 February 2015 at 23:50, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/13/15 05:15, Chen Gang S wrote: It almost likes a template for adding an architecture target.

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-14 Thread Chen Gang S
On 2/14/15 13:47, Peter Maydell wrote: On 14 February 2015 at 03:37, Chris Metcalf cmetc...@ezchip.com wrote: I'm not sure whether Tilera can simply re-release the tilegx-specific stuff from binutils as a separate tarball with GPL v2 licensing. Hopefully we can avoid having to figure that

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Peter Maydell
On 13 February 2015 at 23:50, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/13/15 05:15, Chen Gang S wrote: It almost likes a template for adding an architecture target. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure | 7 ++

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chen Gang S
On 2/13/15 05:15, Chen Gang S wrote: 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-tile/Makefile.objs |

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Peter Maydell
On 14 February 2015 at 03:37, Chris Metcalf cmetc...@ezchip.com wrote: I'm not sure whether Tilera can simply re-release the tilegx-specific stuff from binutils as a separate tarball with GPL v2 licensing. Hopefully we can avoid having to figure that out. :-) I believe it is theoretically

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chen Gang S
On 2/14/15 08:26, Peter Maydell wrote: On 13 February 2015 at 23:50, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/13/15 05:15, Chen Gang S wrote: It almost likes a template for adding an architecture target. Signed-off-by: Chen Gang gang.chen.5...@gmail.com --- configure

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Peter Maydell
On 14 February 2015 at 03:08, Chen Gang S gang.c...@sunrus.com.cn wrote: Yeah, I shall add disassembler firstly, before generate tcg code: - binutils tilegx disassembler is easy to be integrated into qemu. - I shall reuse part of the tilegx disassembler code for generating tcg code.

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Richard Henderson
On 02/13/2015 04:26 PM, Peter Maydell wrote: Oh, it needs to use TARGET_ARCH=tilegx instead of TARGET_ARCH=tile, or can not put CONFIG_TILE_DIS=y to config-all-disas.mak, below (when I am adding disas/tilegx.c, I meet it). You need to make up your mind about what your architecture is

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chen Gang S
On 2/14/15 10:40, Richard Henderson wrote: On 02/13/2015 04:26 PM, Peter Maydell wrote: Oh, it needs to use TARGET_ARCH=tilegx instead of TARGET_ARCH=tile, or can not put CONFIG_TILE_DIS=y to config-all-disas.mak, below (when I am adding disas/tilegx.c, I meet it). You need to make up your

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chris Metcalf
On 2/13/2015 10:08 PM, Chen Gang S wrote: On 2/14/15 08:26, Peter Maydell wrote: On 13 February 2015 at 23:50, Chen Gang S gang.c...@sunrus.com.cn wrote: On 2/13/15 05:15, Chen Gang S wrote: It almost likes a template for adding an architecture target. Signed-off-by: Chen Gang

[Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-12 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-tile/Makefile.objs | 1 + target-tile/cpu-qom.h