Files
revng-revng/tests/unit/mlir_lit_tests/backend/raw-function.mlir
Ivan Krysak dce5c1a02c NamingConfiguration: pull more prefixes inside
Unify additional values that used to be hardcoded in the old backend
under the same naming configuration root.
2025-04-17 11:19:17 +03:00

33 lines
920 B
MLIR

//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
// RUN: %revngcliftopt %s --emit-c="tagless model=%S/model.yml" -o /dev/null | FileCheck %s
!int32_t = !clift.primitive<signed 4>
!f_args = !clift.defined<#clift.struct<
"/type-definition/2004-StructDefinition" : size(4) {
offset(0) : !int32_t
}
>>
!f = !clift.defined<#clift.func<
"/type-definition/1003-CABIFunctionDefinition" : !int32_t(!int32_t, !f_args)
>>
clift.module {
// CHECK: int32_t fun_0x40001003(int32_t rcx _REG(rcx_x86_64), args_1003 stack_arguments _STACK) {
clift.func @f<!f>(%arg0 : !int32_t, %arg1 : !f_args) attributes {
handle = "/function/0x40001003:Code_x86_64"
} {
// CHECK: return stack_arguments.a + rcx;
clift.return {
%a = clift.access<0> %arg1 : !f_args -> !int32_t
%r = clift.add %a, %arg0 : !int32_t
clift.yield %r : !int32_t
}
}
// CHECK: }
}