This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] microblaze: microblaze.md: Use 'SI' instead of 'VOID' for operand 1 of 'call_value_intern'
- From: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- To: Michael Eager <eager at eagerm dot com>, Mike Stump <mikestump at comcast dot net>
- Cc: Jeff Law <law at redhat dot com>, davem at redhat dot com, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 27 Oct 2014 09:42:22 +0800
- Subject: Re: [PATCH] microblaze: microblaze.md: Use 'SI' instead of 'VOID' for operand 1 of 'call_value_intern'
- Authentication-results: sourceware.org; auth=none
- References: <bekwguasixaphab5pghrhbxp dot 1411603920412 at email dot android dot com> <544673D6 dot 7020607 at gmail dot com> <544709B8 dot 7080707 at gmail dot com> <544CCEC0 dot 50406 at gmail dot com> <544D3C03 dot 4040307 at eagerm dot com>
On 10/27/14 2:22, Michael Eager wrote:
> On 10/26/14 03:36, Chen Gang wrote:
>> On 10/22/2014 09:34 AM, Chen Gang wrote:
>>>
>>>>>
>>>>> Yes, if you want to test on a target, you will need a target. You can either have a simulator (see binutils and sim/* for an example of how to write one) or target hardware in some form.
>>>>>
>>
>> After tried 'sim', I found the root cause is microblaze sim does not
>> support '--sysroot', which is the environments for shared libraries and
>> system calls (need load microblaze kernel).
>>
>> - microblaze can successfully execute simple programs which has no
>> glibc and no system call.
>>
>> - In upstream master branch of binutils, for microblaze sim, it has no
>> related testsuite for sim in binutils, neither support '--sysroot',
>> neither support function stack, startup parameters, and environments.
>>
>> - After hard code the default stack in sim, it can start the '-static'
>> program with glibc, but stop at uname() which will use system call.
>>
>> So I want to consult: at present, can we let microblaze sim run 'normal'
>> programs (have glibc, and use system call)?
>
> Microblaze-sim provides basic instruction set architecture and memory simulation.
> There is no operating system support. (It's also quite old. I'm not sure
> which version of the MB architecture it models, but it is not recent.)
>
> Microblaze-sim is not a full system simulator, like QEMU. To be able to
> run a program which requires glibc, you need to be able to boot a full Linux
> image on the simulator, which microblaze-sim cannot do. QEMU models an
> entire processor and can boot a Linux image.
>
OK, thank you very much, I shall rewind to qemu, and should try my best
to finish within within this month.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed