To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 5716ed1b authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano
Browse files

Fixed botched aarch64 merge

parent 182bd3c1
# Copyright 2017 The Australian National University
#
# 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.
set -e
if [ -z "$MU_ZEBU" ]
then
export MU_ZEBU=$PWD
fi
export MU_LOG_LEVEL=none
export RUST_TEST_THREADS=1
export RUST_BACKTRACE=0
export PYTHONPATH="$MU_ZEBU/tests/test_jit/mu-client-pypy/:$MU_ZEBU/tests/test_jit/RPySOM/src"
export LD_LIBRARY_PATH="$MU_ZEBU/tests/test_jit/:$MU_ZEBU/tests/test_jit"
export ZEBU_BUILD=release
rm -rf $MU_ZEBU/emit
rm -rf $MU_ZEBU/tests/test_jit/emit
cargo update
#cargo clean
rustup run nightly cargo fmt -- --write-mode=diff src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs --verbose | tee cargo_fmt_out.txt
cargo test --release --no-run --color=always 2>&1 | tee build_out.txt
$(exit ${PIPESTATUS[0]}) # this command will exit the shell but only if the above cargo test failed
/usr/bin/time -f "finished in %e secs" -a -o cargo_test_out.txt ./test-release --color=always 2>/dev/null | tee cargo_test_out.txt
cd $MU_ZEBU/tests/test_jit/
if [ -d "./mu-client-pypy" ]
then
git -C ./mu-client-pypy pull
else
git clone https://gitlab.anu.edu.au/mu/mu-client-pypy.git
git -C ./mu-client-pypy checkout mu-rewrite
git -C ./mu-client-pypy apply pypy.patch
fi
if [ -d "./RPySOM" ]
then
git -C ./RPySOM pull
else
git clone https://github.com/microvm/RPySOM.git
git -C ./RPySOM submodule init
git -C ./RPySOM submodule update
fi
pytest test_*.py -v --color=yes 2>&1 | tee $MU_ZEBU/pytest_out.txt
......@@ -555,17 +555,6 @@ impl MachineCode for ASMCode {
let split: Vec<&str> = inst.code.split(' ').collect();
Some(demangle_name(String::from(split[1])))
}
Some(inst) if inst.code.starts_with("CBNZ ") || inst.code.starts_with("CBZ ") => {
// Destination is the second argument
let split: Vec<&str> = inst.code.split(',').collect();
Some(demangle_name(String::from(split[1])))
}
Some(inst) if inst.code.starts_with("TBNZ ") || inst.code.starts_with("TBZ ") => {
// Destination is the third argument
let split: Vec<&str> = inst.code.split(',').collect();
Some(demangle_name(String::from(split[2])))
}
_ => None
}
}
......@@ -699,6 +688,24 @@ impl MachineCode for ASMCode {
}
}
fn replace_branch_dest(&mut self, inst: usize, new_dest: &str, succ: usize) {
{
let asm = &mut self.code[inst];
let inst = String::from(asm.code.split_whitespace().next().unwrap());
asm.code = format!("{} {}", inst, mangle_name(String::from(new_dest)));
asm.succs.clear();
asm.succs.push(succ);
}
{
let asm = &mut self.code[succ];
if !asm.preds.contains(&inst) {
asm.preds.push(inst);
}
}
}
fn set_inst_nop(&mut self, index: usize) {
self.code[index].code.clear();
// self.code.remove(index);
......@@ -2743,7 +2750,8 @@ impl CodeGenerator for ASMCodeGen {
let (reg1, id1, loc1) = self.prepare_reg(dest, 4 + 1);
// GCC complains if the immediate argument has no decimal part
// (it will treat it as an integer, e.g. #1 is an error, but #1.0 is not)
// (it will treat it as an integer)
// (e.g. #1 is an error, but #1.0 is not)
let asm = if src == src.trunc() {
// src is an integer, append '.0'
format!("FMOV {},#{}.0", reg1, src)
......@@ -3601,7 +3609,7 @@ pub fn emit_context_with_reloc(
use runtime::mm;
// persist globals
let global_locs_lock = vm.global_locations.read().unwrap();
let global_locs_lock = vm.global_locations().read().unwrap();
let global_lock = vm.globals().read().unwrap();
let global_addr_id_map = {
......@@ -3684,8 +3692,8 @@ pub fn emit_context_with_reloc(
Some(label) => label,
None => {
panic!(
"cannot find label for address {}, it is not dumped by GC (why \
GC didn't trace to it)",
"cannot find label for address {}, \
it is not dumped by GC (why GC didn't trace to it)",
load_ref
)
}
......
......@@ -134,11 +134,13 @@ GPR_ALIAS!(XZR_ALIAS: (64, XZR) -> WZR); // Pseudo register, not to be used by
// Aliases
// Indirect result location register (points to a location in memory to write return values to)
ALIAS!(X8 -> XR);
// Intraprocedure call register 0 (may be modified by the linker when executing BL/BLR instructions)
// Intra proecdure call register 0
// (may be modified by the linker when executing BL/BLR instructions)
ALIAS!(X16 -> IP0);
// Intraprocedure call register 1 (may be modified by the linker when executing BL/BLR instructions)
// Intra proecdure call register 1
// (may be modified by the linker when executing BL/BLR instructions)
ALIAS!(X17 -> IP1);
// Platform Register (NEVER TOUCH THIS REGISTER (Unless you can prove Linux dosn't use it))
// Platform Register (NEVER TOUCH THIS REGISTER (Unless you can prove Linux doesn't use it))
ALIAS!(X18 -> PR);
// Frame Pointer (can be used as a normal register when not calling or returning)
ALIAS!(X29 -> FP);
......
......@@ -36,5 +36,5 @@ pub fn is_power_of_two(x: usize) -> Option<u8> {
pub fn align_up(x: usize, align: usize) -> usize {
//use ((x + align - 1)/align)*align if align is not a power of two
debug_assert!(align.is_power_of_two());
(x + align - 1) & !(align - 1)
(x + align - 1) & !(align - 1)
}
......@@ -28,7 +28,7 @@ def test_PyPy():
cmd = [pypy_dir.join('rpython/bin/rpython')]
flags = ['-O3', '--no-shared', '--backend=mu', '--mu-impl=zebu',
'--mu-suplibdir=%(bin_dir)s' % globals()]
'--mu-vmargs', '--gc-immixspace-size=10737418240', '--mu-suplibdir=%(bin_dir)s' % globals()]
# flags = ['-O3', '--no-shared', '--backend=c', '--no-profopt']
args = ['--no-allworkingmodules']
cmd.extend(flags)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment