Specify the ABI of a function

80 Views Asked by At

Is there a way to specify the ABI of a function directly in ATS? For instance, I want to do this:

%{^
typedef uint64_t __attribute__((ms_abi)) (*function)(uint16_t*);
%}

but in ATS instead of C.

Edit: Here's my original problem:

%{^
struct SimpleTextOutputInterface;

typedef uint64_t __attribute__((ms_abi)) (*EfiTextString)(struct SimpleTextOutputInterface*, uint16_t*);
%}

typedef EfiTextString = $extype"EfiTextString"

vtypedef SimpleTextOutputInterface =
   @{ reset = EfiTextReset
    , output_string = [l:addr] (EfiTextString@l | ptr l)
    }

and I want to call output_string with the ms_abi. I can do it in C, but I don't know if it is possible to do without C.

0

There are 0 best solutions below