Skip to content

Commit 1e1d9f3

Browse files
committed
Only expose VO bit side metadata base address on 64bits target
1 parent 37652f5 commit 1e1d9f3

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ no_mmap_annotation = []
189189
# However, in rare cases, a binding may want to directly access and manipulate VO bit. For example, a binding cannot cooperate
190190
# with MMTk to identify each object for setting the VO bit. This is usually due to the limitation of the VM.
191191
# In such cases, a binding may use this feature and manipulate the VO bit to their needs. The binding's manipulation on VO bit
192-
# may violate MMTk's semantics, and may result in undefined behaviors for VO bit related APIs.
192+
# may violate MMTk's semantics, and may result in undefined behaviors for VO bit related APIs. This feature should
193+
# only be used if you understand how VO bit works internally. Use at your own risk.
193194
vo_bit_access = []
194195

195196
# Do not modify the following line - ci-common.sh matches it

src/util/metadata/side_metadata/constants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub(crate) const GLOBAL_SIDE_METADATA_BASE_OFFSET: SideMetadataOffset =
3030
SideMetadataOffset::addr(GLOBAL_SIDE_METADATA_BASE_ADDRESS);
3131

3232
/// Base address of VO bit, public to VM bindings which may need to use this.
33+
#[cfg(target_pointer_width = "64")]
3334
pub const VO_BIT_SIDE_METADATA_ADDR: Address =
3435
crate::util::metadata::vo_bit::VO_BIT_SIDE_METADATA_ADDR;
3536

src/util/metadata/vo_bit/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ use crate::vm::VMBinding;
5858
pub(crate) const VO_BIT_SIDE_METADATA_SPEC: SideMetadataSpec =
5959
crate::util::metadata::side_metadata::spec_defs::VO_BIT;
6060

61+
#[cfg(target_pointer_width = "64")]
6162
pub const VO_BIT_SIDE_METADATA_ADDR: Address = VO_BIT_SIDE_METADATA_SPEC.get_absolute_offset();
6263

6364
/// Atomically set the VO bit for an object.

0 commit comments

Comments
 (0)