• Pierre Langlois's avatar
    [arm] Introduce UseScratchRegisterScope for VFP registers · 610a3610
    Pierre Langlois authored
    Replace hard-coded uses of `kScratchDoubleReg`, `kScratchDoubleReg2` and
    `kScratchQuadReg` with the safer `UseScratchRegisterScope`. The reason for doing
    this is to be able to safely use these scratch registers inside the assembler
    without having to worry about the code generator using them too.
    
    For instance, using this scope showed us that `TryInlineTruncateDoubleToI` is
    using a FP scratch register while the caller, the `DoubleToI` stub, is using it
    too. We are safe only because the stub passes the scratch register to
    `TryInlineTruncateDoubleToI` as an input. Using the scope forces us to
    explicitely use the input register instead of acquiring a new scratch.
    
    Bug: v8:6553
    Change-Id: I84c53cd851d31ea33b0e3ef398d7a858b7e3e3c4
    Reviewed-on: https://chromium-review.googlesource.com/895460Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
    Cr-Commit-Position: refs/heads/master@{#51061}
    610a3610
test-assembler-arm.cc 131 KB