-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Incorrect evaluation of the T attribute in EQU statement
- Loading branch information
1 parent
fd9d73a
commit 72dad69
Showing
8 changed files
with
145 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
parser_library/src/context/ordinary_assembly/dependency_solver_redirect.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2022 Broadcom. | ||
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Broadcom, Inc. - initial API and implementation | ||
*/ | ||
|
||
#include "dependency_solver_redirect.h" | ||
|
||
#include "context/using.h" | ||
|
||
namespace hlasm_plugin::parser_library::context { | ||
|
||
const symbol* dependency_solver_redirect::get_symbol(id_index name) const { return m_base->get_symbol(name); } | ||
|
||
std::optional<address> dependency_solver_redirect::get_loctr() const { return m_base->get_loctr(); } | ||
|
||
id_index dependency_solver_redirect::get_literal_id(const std::shared_ptr<const expressions::data_definition>& lit) | ||
{ | ||
return m_base->get_literal_id(lit); | ||
} | ||
|
||
bool dependency_solver_redirect::using_active(id_index label, const section* sect) const | ||
{ | ||
return m_base->using_active(label, sect); | ||
} | ||
|
||
using_evaluate_result dependency_solver_redirect::using_evaluate( | ||
id_index label, const section* owner, int32_t offset, bool long_offset) const | ||
{ | ||
return m_base->using_evaluate(label, owner, offset, long_offset); | ||
} | ||
|
||
std::variant<const symbol*, symbol_candidate> dependency_solver_redirect::get_symbol_candidate(id_index name) const | ||
{ | ||
return m_base->get_symbol_candidate(name); | ||
} | ||
|
||
std::string dependency_solver_redirect::get_opcode_attr(id_index symbol) const | ||
{ | ||
return m_base->get_opcode_attr(symbol); | ||
} | ||
|
||
} // namespace hlasm_plugin::parser_library::context |
46 changes: 46 additions & 0 deletions
46
parser_library/src/context/ordinary_assembly/dependency_solver_redirect.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2022 Broadcom. | ||
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Broadcom, Inc. - initial API and implementation | ||
*/ | ||
|
||
#ifndef HLASMPLUGIN_PARSERLIBRARY_CONTEXT_DEPENDENCY_SOLVER_REDIRECT_H | ||
#define HLASMPLUGIN_PARSERLIBRARY_CONTEXT_DEPENDENCY_SOLVER_REDIRECT_H | ||
|
||
#include "dependable.h" | ||
|
||
namespace hlasm_plugin::parser_library::context { | ||
|
||
class dependency_solver_redirect : public dependency_solver | ||
{ | ||
dependency_solver* m_base; | ||
|
||
public: | ||
const symbol* get_symbol(id_index name) const override; | ||
std::optional<address> get_loctr() const override; | ||
id_index get_literal_id(const std::shared_ptr<const expressions::data_definition>& lit) override; | ||
bool using_active(id_index label, const section* sect) const override; | ||
using_evaluate_result using_evaluate( | ||
id_index label, const section* owner, int32_t offset, bool long_offset) const override; | ||
std::variant<const symbol*, symbol_candidate> get_symbol_candidate(id_index name) const override; | ||
std::string get_opcode_attr(id_index symbol) const override; | ||
|
||
protected: | ||
explicit dependency_solver_redirect(dependency_solver& base) | ||
: m_base(&base) | ||
{} | ||
|
||
~dependency_solver_redirect() = default; | ||
}; | ||
|
||
} // namespace hlasm_plugin::parser_library::context | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters