XCore target: Add target specific EmitVAArg

Robert Lytton robert at xmos.com
Thu Aug 15 11:07:21 PDT 2013


Hi Rafael,

Will change tests to -O0 (a few extra lines emitted)

As for "case ABIArgInfo::Expand:" how could I arrive there?
	Expand - Only valid for aggregate argument types.
	The structure should be expanded into consecutive arguments for its constituent fields.
	Currently expand is only allowed on structures whose fields are all scalar types or are themselves expandable types. 
As all aggregate types are passed via a pointer, I assume the target will never need to expand.

So, what should I place in the case clause?
  case ABIArgInfo::Expand:
    // Fall back to the LLVM instruction.
    return 0;

As an aside, I am only needing to handle the ABIArgInfo::Indirect types.
Other types could be emitted as LLVM instructions and handled by the backend viz: return 0.

Robert

________________________________________
From: Rafael EspĂ­ndola [rafael.espindola at gmail.com]
Sent: 15 August 2013 16:35
To: Robert Lytton
Cc: cfe-commits at cs.uiuc.edu
Subject: Re: XCore target: Add target specific EmitVAArg

+    llvm_unreachable("Unsupported ABI kind for va_arg");

Unsupported or it is impossible to get here? If it is something a user
can hit, this should probably be report_fatal_error as
llvm_unreachable will not cause clang to stop in a -Asserts build.

+// RUN: %clang -target xcore -O3

Why run the tests at -O3? We normally prefer to test clang at -O0.

LGTM with those comments addressed.


On 15 August 2013 06:52, Robert Lytton <robert at xmos.com> wrote:
> Hi,
>
> Add target specific EmitVAArg to XCore target.
> This was so aggregates could be passed as var args too.
>
> Robert
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list