1 /* |
1 /* |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
24 |
24 |
25 package org.graalvm.compiler.lir.gen; |
25 package org.graalvm.compiler.lir.gen; |
26 |
26 |
27 import org.graalvm.compiler.lir.LIRInstruction; |
27 import org.graalvm.compiler.lir.LIRInstruction; |
28 import org.graalvm.compiler.lir.StandardOp.SaveRegistersOp; |
28 import org.graalvm.compiler.lir.StandardOp.SaveRegistersOp; |
|
29 import org.graalvm.compiler.lir.StandardOp.ZapRegistersOp; |
|
30 |
29 import jdk.vm.ci.code.Register; |
31 import jdk.vm.ci.code.Register; |
30 import jdk.vm.ci.code.RegisterConfig; |
32 import jdk.vm.ci.code.RegisterConfig; |
31 import jdk.vm.ci.code.StackSlot; |
33 import jdk.vm.ci.code.StackSlot; |
32 import jdk.vm.ci.meta.JavaConstant; |
34 import jdk.vm.ci.meta.JavaConstant; |
33 import jdk.vm.ci.meta.Value; |
35 import jdk.vm.ci.meta.Value; |
39 |
41 |
40 /** |
42 /** |
41 * Creates a {@link SaveRegistersOp} that fills a given set of registers with known garbage |
43 * Creates a {@link SaveRegistersOp} that fills a given set of registers with known garbage |
42 * value. |
44 * value. |
43 * |
45 * |
44 * The set of registers actually touched might be {@link SaveRegistersOp#remove reduced} later. |
|
45 * |
|
46 * @param zappedRegisters registers to be zapped |
46 * @param zappedRegisters registers to be zapped |
47 * @param zapValues values used for zapping |
47 * @param zapValues values used for zapping |
48 * |
48 * |
49 * @see DiagnosticLIRGeneratorTool#createZapRegisters() |
49 * @see DiagnosticLIRGeneratorTool#createZapRegisters() |
50 */ |
50 */ |
51 SaveRegistersOp createZapRegisters(Register[] zappedRegisters, JavaConstant[] zapValues); |
51 ZapRegistersOp createZapRegisters(Register[] zappedRegisters, JavaConstant[] zapValues); |
52 |
52 |
53 /** |
53 /** |
54 * Creates a {@link SaveRegistersOp} that fills all |
54 * Creates a {@link SaveRegistersOp} that fills a given set of registers with a |
|
55 * {@link LIRGenerator#zapValueForKind known garbage value}. |
|
56 * |
|
57 * @param zappedRegisters registers to be zapped |
|
58 * |
|
59 * @see DiagnosticLIRGeneratorTool#createZapRegisters() |
|
60 */ |
|
61 ZapRegistersOp createZapRegisters(Register[] zappedRegisters); |
|
62 |
|
63 /** |
|
64 * Creates a {@link ZapRegistersOp} that fills all |
55 * {@link RegisterConfig#getAllocatableRegisters() allocatable registers} with a |
65 * {@link RegisterConfig#getAllocatableRegisters() allocatable registers} with a |
56 * {@link LIRGenerator#zapValueForKind known garbage value}. |
66 * {@link LIRGenerator#zapValueForKind known garbage value}. |
57 * |
67 * |
58 * The set of registers actually touched might be {@link SaveRegistersOp#remove reduced} later. |
|
59 * |
|
60 * @see DiagnosticLIRGeneratorTool#createZapRegisters(Register[], JavaConstant[]) |
68 * @see DiagnosticLIRGeneratorTool#createZapRegisters(Register[], JavaConstant[]) |
61 */ |
69 */ |
62 SaveRegistersOp createZapRegisters(); |
70 ZapRegistersOp createZapRegisters(); |
63 |
71 |
64 /** |
72 /** |
65 * Marker interface for {@link LIRInstruction instructions} that should be succeeded with a |
73 * Marker interface for {@link LIRInstruction instructions} that should be succeeded with a |
66 * {@link DiagnosticLIRGeneratorTool#createZapRegisters() ZapRegisterOp} if assertions are |
74 * {@link DiagnosticLIRGeneratorTool#createZapRegisters() ZapRegisterOp} if assertions are |
67 * enabled. |
75 * enabled. |