mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
51 lines
1.7 KiB
MLIR
51 lines
1.7 KiB
MLIR
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
// RUN: %root/bin/revng pipe import-descriptive-info %S/model.yml %s /dev/stdout | %root/bin/revng clift-opt | FileCheck %s
|
|
|
|
!void = !clift.void
|
|
!uint64_t = !clift.int<unsigned 8>
|
|
|
|
!stack_1002_ = !clift.struct<"/type-definition/2004-StructDefinition" : size(8) {
|
|
"/struct-field/2004-StructDefinition/0" : offset(0) !uint64_t
|
|
}>
|
|
|
|
// CHECK: !h = !clift.func<"/type-definition/1002-RawFunctionDefinition" as "h" :
|
|
// CHECK: !void(!uint64_t, !stack_1002_)
|
|
// CHECK: [
|
|
// CHECK: #clift.c_attribute<"_ABI" : "/macro/_ABI"
|
|
// CHECK: [
|
|
// CHECK: #clift.identifier<"raw_x86_64">
|
|
// CHECK: ]>
|
|
// CHECK: ]
|
|
// CHECK: >
|
|
!h = !clift.func<
|
|
"/type-definition/1002-RawFunctionDefinition"
|
|
: !void(!uint64_t, !stack_1002_)
|
|
[
|
|
#clift.c_attribute<"_ABI" : "/macro/_ABI" [#clift.identifier<"raw_x86_64">]>
|
|
]
|
|
>
|
|
|
|
module attributes { clift.module } {
|
|
// CHECK: clift.func @fun_0x40001002<!h>(
|
|
// CHECK: %arg0: !uint64_t {
|
|
// CHECK: clift.handle = "/raw-argument/1002-RawFunctionDefinition/rcx_x86_64"
|
|
// CHECK: clift.name = "rcx"
|
|
// CHECK: }
|
|
// CHECK: %arg1: !stack_1002_ {
|
|
// CHECK: clift.handle = "/raw-stack-arguments/1002-RawFunctionDefinition"
|
|
// CHECK: clift.name = "stack_arguments"
|
|
// CHECK: }
|
|
// CHECK: ) -> !void
|
|
// CHECK: attributes {
|
|
// CHECK: handle = "/function/0x40001002:Code_x86_64"
|
|
// CHECK: }
|
|
clift.func @h<!h>(%arg0 : !uint64_t { clift.handle = "/raw-argument/1002-RawFunctionDefinition/rcx_x86_64" },
|
|
%arg1 : !stack_1002_ { clift.handle = "/raw-stack-arguments/1002-RawFunctionDefinition" }) attributes {
|
|
handle = "/function/0x40001002:Code_x86_64"
|
|
} {
|
|
}
|
|
}
|