public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: cowwoc <cowwoc@bbs.darktech.org>
To: libffi-discuss@sourceware.org
Subject: Re: please, help me with libffi on iOS porting
Date: Wed, 15 Aug 2012 13:33:00 -0000	[thread overview]
Message-ID: <34301795.post@talk.nabble.com> (raw)
In-Reply-To: <502B5173.4030206@redhat.com>



Andrew Haley wrote:
> 
> On 08/15/2012 03:30 AM, cowwoc wrote:
>> 
>> Andrew Haley wrote:
>>>
>>>> to have 4 bytes alignment.  So is there a reason the alignment is
>>>> set to 1 byte?
>>>
>>> The doc says:
>>>
>>> `.align EXPRESSION [, EXPRESSION]'
>>>      This is the generic .ALIGN directive.  For the ARM however if the
>>>      first argument is zero (ie no alignment is needed) the assembler
>>>      will behave as if the argument had been 2 (ie pad to the next four
>>>      byte boundary).  This is for compatibility with ARM's own
>>>      assembler.
>>>
>> 
>> I believe you are wrong on this point.
> 
> I'm not: that is what it says.
> 
>> GNU Assembler says this:
>> http://sourceware.org/binutils/docs/as/ARM-Directives.html
>> 
>> but Apple Assembler does not:
>> https://developer.apple.com/library/mac/#documentation/developertools/Reference/Assembler/040-Assembler_Directives/asm_directives.html
>> 
>> hence the generated memory alignment is wrong.
> 
> Right, so Apple's assembler is incompatible.  The align_expression
> doesn't seem to be optional there, so we could simply change this to
> .align 2".
> 
> Andrew.
> 

Hi Andrew,

Take a look at https://github.com/jspahrsummers/libffi. It's not my
repository but it contains lots of iOS-specific patches, including the one
for .align 2.

There is even a 4 month old pull request for this specific issue:
https://github.com/atgreen/libffi/pull/19

Gili
-- 
View this message in context: http://old.nabble.com/please%2C-help-me-with-libffi-on-iOS-porting-tp34250621p34301795.html
Sent from the Sourceware - libffi-discuss mailing list archive at Nabble.com.

  reply	other threads:[~2012-08-15 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 12:01 Guetcho Guetchev
2012-08-06  8:55 ` Andrew Haley
2012-08-15  2:30   ` cowwoc
2012-08-15  7:36     ` Andrew Haley
2012-08-15 13:33       ` cowwoc [this message]
2012-08-15 14:14         ` Andrew Haley

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=34301795.post@talk.nabble.com \
    --to=cowwoc@bbs.darktech.org \
    --cc=libffi-discuss@sourceware.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).