Files
llgo/runtime/internal/clite/bitcast/bitcast.go

37 lines
1.0 KiB
Go
Raw Normal View History

2024-06-25 14:02:25 +08:00
/*
* Copyright (c) 2024 The GoPlus Authors (goplus.org). All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package bitcast
2024-06-25 14:02:25 +08:00
import _ "unsafe"
2024-06-25 14:02:25 +08:00
const (
LLGoFiles = "_cast/cast.c"
LLGoPackage = "link"
2024-06-25 14:02:25 +08:00
)
//go:linkname ToFloat64 C.llgoToFloat64
2025-04-08 16:50:47 +08:00
func ToFloat64(v int64) float64
2024-11-29 14:23:46 +08:00
//go:linkname ToFloat32 C.llgoToFloat32
2025-04-08 16:50:47 +08:00
func ToFloat32(v int32) float32
2024-12-12 16:29:17 +08:00
//go:linkname FromFloat64 C.llgoFromFloat64
2025-04-08 16:50:47 +08:00
func FromFloat64(v float64) int64
2024-12-12 16:29:17 +08:00
//go:linkname FromFloat32 C.llgoFromFloat32
2025-04-08 16:50:47 +08:00
func FromFloat32(v float32) int32