diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2/read.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index eb3c0a8..a79aabc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-02-14 Richard Biener <rguenther@suse.de> + + * dwarf2/read.c (lnp_state_machine::handle_special_opcode): Apply CSE + on expression with division operators. + 2020-02-13 Alok Kumar Sharma <AlokKumar.Sharma@amd.com> * MAINTAINERS (Write After Approval): Adding myself. diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 7edbd9d..e74383e 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -19812,16 +19812,16 @@ void lnp_state_machine::handle_special_opcode (unsigned char op_code) { unsigned char adj_opcode = op_code - m_line_header->opcode_base; - CORE_ADDR addr_adj = (((m_op_index - + (adj_opcode / m_line_header->line_range)) + unsigned char adj_opcode_d = adj_opcode / m_line_header->line_range; + unsigned char adj_opcode_r = adj_opcode % m_line_header->line_range; + CORE_ADDR addr_adj = (((m_op_index + adj_opcode_d) / m_line_header->maximum_ops_per_instruction) * m_line_header->minimum_instruction_length); m_address += gdbarch_adjust_dwarf2_line (m_gdbarch, addr_adj, true); - m_op_index = ((m_op_index + (adj_opcode / m_line_header->line_range)) + m_op_index = ((m_op_index + adj_opcode_d) % m_line_header->maximum_ops_per_instruction); - int line_delta = (m_line_header->line_base - + (adj_opcode % m_line_header->line_range)); + int line_delta = m_line_header->line_base + adj_opcode_r; advance_line (line_delta); record_line (false); m_discriminator = 0; |