Skip to content

Commit

Permalink
Move boolean indicating hardware SVE support to separate file
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 677958227
  • Loading branch information
sarahjkim authored and copybara-github committed Sep 23, 2024
1 parent de9e3cd commit 84b0096
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
3 changes: 2 additions & 1 deletion util/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ cc_library_plus_nolibc(
"@silifuzz//build_defs/platform:aarch64": [
"aarch64/reg_group_io_buffer_offsets.h",
"aarch64/reg_groups.cc",
"aarch64/save_register_groups_to_buffer.S",
"aarch64/sve_supported.S",
],
"@silifuzz//build_defs/platform:x86_64": ["x86_64/reg_groups.cc"],
}),
Expand Down Expand Up @@ -1220,6 +1220,7 @@ cc_library_plus_nolibc(
"aarch64/reg_group_io.cc",
"aarch64/reg_group_io_buffer_offsets.h",
"aarch64/save_register_groups_to_buffer.S",
"aarch64/sve_supported.S",
],
"@silifuzz//build_defs/platform:x86_64": [
"x86_64/reg_group_io.cc",
Expand Down
11 changes: 0 additions & 11 deletions util/aarch64/save_register_groups_to_buffer.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,3 @@ Exit:
ldp x19, x30, [sp], #16
ret
.size SaveRegisterGroupsToBuffer, .-SaveRegisterGroupsToBuffer

.bss
// Flag to tell if SVE is supported.
.align 1
.globl reg_group_io_supports_sve
.type reg_group_io_supports_sve, @object
.size reg_group_io_supports_sve, 1
reg_group_io_supports_sve:
.zero 1

.section .note.GNU-stack,"",@progbits
22 changes: 22 additions & 0 deletions util/aarch64/sve_supported.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2024 The SiliFuzz Authors.
//
// 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
//
// https://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.

.bss
// Flag to tell if SVE is supported.
.align 1
.globl reg_group_io_supports_sve
.type reg_group_io_supports_sve, @object
.size reg_group_io_supports_sve, 1
reg_group_io_supports_sve:
.zero 1

0 comments on commit 84b0096

Please sign in to comment.