Re: [arm-gnu] Fwd: Doubts regarding compatilbility issues between codesourcery assembler file and RVDS assembler file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Fwd: Doubts regarding compatilbility issues between codesourcery assembler file and RVDS assembler file.



Hello Richard,

I got the point now. But the problem is that my exercise is to try to
port out a source code written for arm-gcc to armcc so that we check
improvement in performance. To confirm that armcc gives better
performance over arm-gcc is the first step in my exercise. It is for
this reason that I need to map the source code to armcc. Porting to
armcc is easy for C files. But when we need to port assembly code to
armasm, I am facing problems.

Thanks and Regards
Abhinav





On Thu, Aug 12, 2010 at 11:35 PM, Richard Earnshaw <rearnsha@xxxxxxx> wrote:
>
> On Thu, 2010-08-12 at 23:25 +0530, Abhinav Varma wrote:
>> Hello Richard,
>>
>> I am still inexperienced in ARM assembly programming, but when I try
>> assembling the Codesourcery (arm-none-eabi-as) compatible .S source
>> file, it gives errors. The errors are because the syntax for
>> directives are different in both assemblers. As an example arm-as has
>> .macro and .endm while armasm has MACRO and MEND respectively. So,
>> when I wish to convert the source code, I mean mapping these
>> directives so that the code becomes compatible with armasm assembler.
>>
>
> My point is that you shouldn't need to do this mapping.  Why can't you
> continue to use GAS?  Although the input to the two assemblers is not
> compatible, the output is.
>
> R.
>
>> Thanks and Regards
>> Abhinav
>>
>>
>>
>>
>> On Thu, Aug 12, 2010 at 11:12 PM, Richard Earnshaw <rearnsha@xxxxxxx> wrote:
>> >
>> > On Thu, 2010-08-12 at 17:42 +0530, Abhinav Varma wrote:
>> >> Hey,
>> >>
>> >> I have a arm assembly source code whichi is compatible with
>> >> CodeSourcery's arm-none-eabi-as. I also want to run it on RVCT 4.0
>> >> armasm. But I am getting lot of errors as GAS and ARMASM aren't
>> >> compatible. Is there any method to convert an assembly code from
>> >> CodeSourcery's assembler to RVCT's assembler?
>> >>
>> >> Initially I was trying the preprocessing on the armcc compiler which
>> >> was unable to preprocess #error and the #define function directives.
>> >> But then I thought that since they are already supported by
>> >> arm-none-eabi-gcc, so lets run the preprocessor on the arm-gcc
>> >> compiler. The generated assembly code (remember the file had assembly
>> >> code with some C style directives) needs to be converted to arm-asm
>> >> style code for which I have started working on mapping the
>> >> instructions. I have problems mapping the following (arm-none-eabi-as)
>> >> directives. If you have any information about which directives replace
>> >> them on arm-asm, it would be very helpful.
>> >>
>> >> 1) .word
>> >> 2) .size myFunc, . -myFunc
>> >> 3) .org 0x6a1
>> >> 4) .fill 0x100,4,~0x1353A318
>> >>
>> >> Thanks and Regards
>> >> Abhinav
>> >
>> > Both ARMASM and GAS use the same object file format (governed by the
>> > ABI).  Is there any reason why you can't continue to use GAS for this
>> > file?
>> >
>> > R.
>> >
>> >
>
>