1// Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4package com.android.tools.r8.code;
5
6import com.android.tools.r8.ir.code.NumericType;
7import com.android.tools.r8.ir.conversion.IRBuilder;
8
9public class OrInt2Addr extends Format12x {
10
11  public static final int OPCODE = 0xb6;
12  public static final String NAME = "OrInt2Addr";
13  public static final String SMALI_NAME = "or-int/2addr";
14
15  OrInt2Addr(int high, BytecodeStream stream) {
16    super(high, stream);
17  }
18
19  public OrInt2Addr(int left, int right) {
20    super(left, right);
21  }
22
23  public String getName() {
24    return NAME;
25  }
26
27  public String getSmaliName() {
28    return SMALI_NAME;
29  }
30
31  public int getOpcode() {
32    return OPCODE;
33  }
34
35  @Override
36  public void buildIR(IRBuilder builder) {
37    builder.addOr(NumericType.INT, A, A, B);
38  }
39}
40