/*
- * lttng-bytecode-specialize.c
- *
- * LTTng UST bytecode specializer.
+ * SPDX-License-Identifier: MIT
*
* Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * LTTng UST bytecode specializer.
*/
#define _LGPL_SOURCE
if (!stack_top->load.rev_bo)
insn->op = BYTECODE_OP_LOAD_FIELD_S64;
break;
+ case OBJECT_TYPE_SIGNED_ENUM:
+ dbg_printf("op load field signed enumeration\n");
+ stack_top->type = REG_PTR;
+ break;
case OBJECT_TYPE_U8:
dbg_printf("op load field u8\n");
stack_top->type = REG_U64;
if (!stack_top->load.rev_bo)
insn->op = BYTECODE_OP_LOAD_FIELD_U64;
break;
+ case OBJECT_TYPE_UNSIGNED_ENUM:
+ dbg_printf("op load field unsigned enumeration\n");
+ stack_top->type = REG_PTR;
+ break;
case OBJECT_TYPE_DOUBLE:
stack_top->type = REG_DOUBLE;
insn->op = BYTECODE_OP_LOAD_FIELD_DOUBLE;
itype = &field->type.u.enum_nestable.container_type->u.integer;
}
if (itype->signedness)
- load->object_type = OBJECT_TYPE_S64;
+ load->object_type = OBJECT_TYPE_SIGNED_ENUM;
else
- load->object_type = OBJECT_TYPE_U64;
+ load->object_type = OBJECT_TYPE_UNSIGNED_ENUM;
load->rev_bo = false;
break;
}