From: noeljohn <noel.daniel@gmx.com>
To: gcc-help@gcc.gnu.org
Subject: Re: Emission of store_multiple and load_multiple patterns
Date: Mon, 01 Feb 2010 10:12:00 -0000 [thread overview]
Message-ID: <27401949.post@talk.nabble.com> (raw)
In-Reply-To: <mcr3a1pndbw.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
Ian Lance Taylor-3 wrote:
>
> noeljohn <noel.daniel@gmx.com> writes:
>
>> Ian Lance Taylor-3 wrote:
>>>
>>> noeljohn <noel.daniel@gmx.com> writes:
>>>
>>>> The array as I have seen is not being treated as a vector. What it
>>>> does
>>>> is
>>>> it directly loads the integer array data into the stack. This is
>>>> normally
>>>> done for processors which does not have a support for multiple loading
>>>> and
>>>> storing of words. Is there any way by which we can convey gcc through
>>>> macros
>>>> that our architecture supports this multiple loading and storing
>>>> facility?
>>>
>>> I'm sorry, I don't understand what you mean. What specific
>>> instruction are you trying to generate, and what precisely does it do?
>>> When exact C code would you write that you would expect to generate
>>> this instruction?
>>>
>>> Ian
>>>
>>>
>>
>> Hello Sir,
>> The actual problem is that the array contents are not put in a
>> separate
>> data section we would see in .s file. Suppose we take a arm processor or
>> rs6000 processor, a separate section will be created in which the array
>> contents will be stored and then these array contents are loaded into the
>> stack. I want this data section to be created. How should I go forward ?
>
>
> Give us an example. Show us some source code.
>
> Ian
>
>
.file "1234.c"
.section .rodata
.align 2
.type C.0.1175, %object
.size C.0.1175, 20
C.0.1175:
.word 6
.word 9
.word 5
.word 6
.word 8
.text
.align 2
.global main
.type main, %function
main:
@ args = 0, pretend = 0, frame = 20
@ frame_needed = 1, uses_anonymous_args = 0
mov ip, sp
stmfd sp!, {r4, fp, ip, lr, pc}
sub fp, ip, #4
sub sp, sp, #20
ldr r3, .L3
sub r4, fp, #36
mov ip, r3
ldmia ip!, {r0, r1, r2, r3}
stmia r4!, {r0, r1, r2, r3}
ldr r3, [ip, #0]
str r3, [r4, #0]
ldr r2, [fp, #-28]
ldr r3, [fp, #-20]
and r3, r2, r3
str r3, [fp, #-24]
sub sp, fp, #16
ldmfd sp, {r4, fp, sp, pc}
.L4:
.align 2
.L3:
.word C.0.1175
.size main, .-main
.ident "GCC: (GNU) 4.3.0"
This is the arm assembly for the c program:
void main()
{
int a[5]={6,9,5,6,8};
a[3]=a[2] & a[4];
}
The section below is the one which needs to be generated for the machine
which I am working for.
.section .rodata
.align 2
.type C.0.1175, %object
.size C.0.1175, 20
C.0.1175:
.word 6
.word 9
.word 5
.word 6
.word 8
Similar section is seen for the assembly generated by the machine powerpc.
How can it be generated?
noeljohn
--
View this message in context: http://old.nabble.com/Emission-of-store_multiple-and-load_multiple-patterns-tp26739724p27401949.html
Sent from the gcc - Help mailing list archive at Nabble.com.
next prev parent reply other threads:[~2010-02-01 10:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 9:31 noeljohn
2009-12-12 2:21 ` Ian Lance Taylor
2009-12-14 12:40 ` noeljohn
2009-12-16 1:18 ` Ian Lance Taylor
2010-01-12 6:56 ` noeljohn
2010-01-28 6:16 ` noeljohn
2010-01-28 6:55 ` Ian Lance Taylor
2010-01-29 9:49 ` noeljohn
2010-01-29 15:25 ` Ian Lance Taylor
2010-02-01 10:12 ` noeljohn [this message]
2010-02-01 22:19 ` Ian Lance Taylor
2010-02-02 13:05 ` noeljohn
2010-02-23 8:03 ` noeljohn
2010-02-23 18:30 ` Ian Lance Taylor
2010-03-01 10:51 ` noeljohn
2010-03-08 14:02 ` noeljohn
2010-03-08 20:27 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27401949.post@talk.nabble.com \
--to=noel.daniel@gmx.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).