Remove intrinsic_2 functions
This commit is contained in:
parent
5e7dff4db5
commit
6a0e85b81c
3 changed files with 0 additions and 189 deletions
|
@ -80,68 +80,3 @@ rust_intrinsic_task_sleep(void **retptr,
|
|||
rust_task_sleep(time_in_us);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_vec_len(size_t *retptr,
|
||||
void *env,
|
||||
type_desc *ty,
|
||||
rust_vec **vp)
|
||||
{
|
||||
*retptr = (*vp)->fill / ty->size;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_ptr_offset(void **retptr,
|
||||
void *env,
|
||||
type_desc *ty,
|
||||
void *ptr,
|
||||
uintptr_t count)
|
||||
{
|
||||
*retptr = &((uint8_t *)ptr)[ty->size * count];
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_cast(void *retptr,
|
||||
void *env,
|
||||
type_desc *t1,
|
||||
type_desc *t2,
|
||||
void *src)
|
||||
{
|
||||
if (t1->size != t2->size) {
|
||||
upcall_fail("attempt to cast values of differing sizes",
|
||||
__FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
memmove(retptr, src, t1->size);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_addr_of(void **retptr,
|
||||
void *env,
|
||||
type_desc *ty,
|
||||
void *valptr) {
|
||||
*retptr = valptr;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_recv(void **retptr,
|
||||
void *env,
|
||||
type_desc *ty,
|
||||
rust_port *port) {
|
||||
port_recv((uintptr_t*)retptr, port);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_get_type_desc(void **retptr,
|
||||
void *env,
|
||||
type_desc* ty) {
|
||||
*(type_desc**)retptr = ty;
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_intrinsic_2_task_sleep(void **retptr,
|
||||
void *env,
|
||||
size_t time_in_us) {
|
||||
rust_task_sleep(time_in_us);
|
||||
}
|
||||
|
|
|
@ -130,68 +130,6 @@ define void @rust_intrinsic_task_sleep(i8** nocapture %retptr, i8* nocapture %en
|
|||
|
||||
declare void @rust_task_sleep(i32)
|
||||
|
||||
define void @rust_intrinsic_2_vec_len(i32* nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, %struct.rust_vec** nocapture %vp) nounwind {
|
||||
%1 = load %struct.rust_vec** %vp, align 4, !tbaa !0
|
||||
%2 = getelementptr inbounds %struct.rust_vec* %1, i32 0, i32 0
|
||||
%3 = load i32* %2, align 4, !tbaa !3
|
||||
%4 = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
|
||||
%5 = load i32* %4, align 4, !tbaa !3
|
||||
%6 = udiv i32 %3, %5
|
||||
store i32 %6, i32* %retptr, align 4, !tbaa !3
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_ptr_offset(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, i8* %ptr, i32 %count) nounwind {
|
||||
%1 = getelementptr inbounds %struct.type_desc* %ty, i32 0, i32 1
|
||||
%2 = load i32* %1, align 4, !tbaa !3
|
||||
%3 = mul i32 %2, %count
|
||||
%4 = getelementptr inbounds i8* %ptr, i32 %3
|
||||
store i8* %4, i8** %retptr, align 4, !tbaa !0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_cast(i8* nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %t1, %struct.type_desc* nocapture %t2, i8* nocapture %src) {
|
||||
%1 = getelementptr inbounds %struct.type_desc* %t1, i32 0, i32 1
|
||||
%2 = load i32* %1, align 4, !tbaa !3
|
||||
%3 = getelementptr inbounds %struct.type_desc* %t2, i32 0, i32 1
|
||||
%4 = load i32* %3, align 4, !tbaa !3
|
||||
%5 = icmp eq i32 %2, %4
|
||||
br i1 %5, label %7, label %6
|
||||
|
||||
; <label>:6 ; preds = %0
|
||||
tail call void @upcall_fail(i8* getelementptr inbounds ([42 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([33 x i8]* @.str1, i32 0, i32 0), i32 112)
|
||||
br label %8
|
||||
|
||||
; <label>:7 ; preds = %0
|
||||
tail call void @llvm.memmove.p0i8.p0i8.i32(i8* %retptr, i8* %src, i32 %2, i32 1, i1 false)
|
||||
br label %8
|
||||
|
||||
; <label>:8 ; preds = %7, %6
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_addr_of(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, i8* %valptr) nounwind {
|
||||
store i8* %valptr, i8** %retptr, align 4, !tbaa !0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_recv(i8** %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, %class.rust_port* %port) {
|
||||
%1 = bitcast i8** %retptr to i32*
|
||||
tail call void @port_recv(i32* %1, %class.rust_port* %port)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_get_type_desc(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* %ty) nounwind {
|
||||
%ty.c = bitcast %struct.type_desc* %ty to i8*
|
||||
store i8* %ty.c, i8** %retptr, align 4, !tbaa !0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_task_sleep(i8** nocapture %retptr, i8* nocapture %env, i32 %time_in_us) {
|
||||
tail call void @rust_task_sleep(i32 %time_in_us)
|
||||
ret void
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"any pointer", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
|
||||
|
|
|
@ -130,68 +130,6 @@ define void @rust_intrinsic_task_sleep(i8** nocapture %retptr, i8* nocapture %en
|
|||
|
||||
declare void @rust_task_sleep(i64)
|
||||
|
||||
define void @rust_intrinsic_2_vec_len(i64* nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, %struct.rust_vec** nocapture %vp) nounwind uwtable {
|
||||
%1 = load %struct.rust_vec** %vp, align 8, !tbaa !0
|
||||
%2 = getelementptr inbounds %struct.rust_vec* %1, i64 0, i32 0
|
||||
%3 = load i64* %2, align 8, !tbaa !3
|
||||
%4 = getelementptr inbounds %struct.type_desc* %ty, i64 0, i32 1
|
||||
%5 = load i64* %4, align 8, !tbaa !3
|
||||
%6 = udiv i64 %3, %5
|
||||
store i64 %6, i64* %retptr, align 8, !tbaa !3
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_ptr_offset(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, i8* %ptr, i64 %count) nounwind uwtable {
|
||||
%1 = getelementptr inbounds %struct.type_desc* %ty, i64 0, i32 1
|
||||
%2 = load i64* %1, align 8, !tbaa !3
|
||||
%3 = mul i64 %2, %count
|
||||
%4 = getelementptr inbounds i8* %ptr, i64 %3
|
||||
store i8* %4, i8** %retptr, align 8, !tbaa !0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_cast(i8* nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %t1, %struct.type_desc* nocapture %t2, i8* nocapture %src) uwtable {
|
||||
%1 = getelementptr inbounds %struct.type_desc* %t1, i64 0, i32 1
|
||||
%2 = load i64* %1, align 8, !tbaa !3
|
||||
%3 = getelementptr inbounds %struct.type_desc* %t2, i64 0, i32 1
|
||||
%4 = load i64* %3, align 8, !tbaa !3
|
||||
%5 = icmp eq i64 %2, %4
|
||||
br i1 %5, label %7, label %6
|
||||
|
||||
; <label>:6 ; preds = %0
|
||||
tail call void @upcall_fail(i8* getelementptr inbounds ([42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8]* @.str1, i64 0, i64 0), i64 112)
|
||||
br label %8
|
||||
|
||||
; <label>:7 ; preds = %0
|
||||
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* %retptr, i8* %src, i64 %2, i32 1, i1 false)
|
||||
br label %8
|
||||
|
||||
; <label>:8 ; preds = %7, %6
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_addr_of(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, i8* %valptr) nounwind uwtable {
|
||||
store i8* %valptr, i8** %retptr, align 8, !tbaa !0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_recv(i8** %retptr, i8* nocapture %env, %struct.type_desc* nocapture %ty, %class.rust_port* %port) uwtable {
|
||||
%1 = bitcast i8** %retptr to i64*
|
||||
tail call void @port_recv(i64* %1, %class.rust_port* %port)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_get_type_desc(i8** nocapture %retptr, i8* nocapture %env, %struct.type_desc* %ty) nounwind uwtable {
|
||||
%ty.c = bitcast %struct.type_desc* %ty to i8*
|
||||
store i8* %ty.c, i8** %retptr, align 8, !tbaa !0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @rust_intrinsic_2_task_sleep(i8** nocapture %retptr, i8* nocapture %env, i64 %time_in_us) uwtable {
|
||||
tail call void @rust_task_sleep(i64 %time_in_us)
|
||||
ret void
|
||||
}
|
||||
|
||||
!0 = metadata !{metadata !"any pointer", metadata !1}
|
||||
!1 = metadata !{metadata !"omnipotent char", metadata !2}
|
||||
!2 = metadata !{metadata !"Simple C/C++ TBAA", null}
|
||||
|
|
Loading…
Add table
Reference in a new issue