This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to define a macro function

hi,

    I want to ask a question.

     How to define a macro function that can be called by C language in armasm?

     I know that in GNU can be used in the following way:

.macro push_x1_x12

push x1,x2

push x3,x4

push x5,x6

push x7,x8

push x9,x10

push x11,x12

.endm

ENTRY(test)

.......

push_x1_x12
......
ENDPROC(test)

  Now  in armasm, I used as follow :

MACRO

push_x1_x12

push x1,x2

push x3,x4

push x5,x6

push x7,x8

push x9,x10

push x11,x12

MEND

But how to expand the macro that can be called by C language??

Parents
  • sorry,

    //    define:

    //-------------------------------------

    #define  push_x1_x12     \

        __asm {                 \ 

         push x1,x2              \ 

         push x3,x4              \               

         push x5,x6              \ 

         push x7,x8              \ 

         push x9,x10             \ 

         push x11,x12            \ 

    }

    //     call

    //----------------------------------------

    void test_tt(void)

    {

    push_x1_x12;

    }

    ARM Compiler 6  Compilation error

    1.png

    javascript:liveAction('org.eclipse.help.ui', 'org.eclipse.help.ui.internal.ShowInTocAction', '2_4')

Reply
  • sorry,

    //    define:

    //-------------------------------------

    #define  push_x1_x12     \

        __asm {                 \ 

         push x1,x2              \ 

         push x3,x4              \               

         push x5,x6              \ 

         push x7,x8              \ 

         push x9,x10             \ 

         push x11,x12            \ 

    }

    //     call

    //----------------------------------------

    void test_tt(void)

    {

    push_x1_x12;

    }

    ARM Compiler 6  Compilation error

    1.png

    javascript:liveAction('org.eclipse.help.ui', 'org.eclipse.help.ui.internal.ShowInTocAction', '2_4')

Children