-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#3544 RISC-V, part 9: Add arch files (#5605)
Add files with arch-specific symbols and definitions required to compile for RISC-V. Those definitions are used in multiple DynamoRIO modules but splitting them across multiple commits would likely involve merge dependencies. Therefore it seemed more straightforward to keep all of the files under core/arch/riscv64 in a single commit. NOTE: This code is not validated and mostly contains stubs as the main point was to achieve compilation and estimate the effort required for the port. Some of the trivial logic has been implemented though. Issue: #3544 Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
- Loading branch information
1 parent
097cb37
commit 91f3aa0
Showing
10 changed files
with
1,353 additions
and
3 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
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,103 @@ | ||
/* ********************************************************** | ||
* Copyright (c) 2022 Rivos, Inc. All rights reserved. | ||
* **********************************************************/ | ||
|
||
/* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* * Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* | ||
* * Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* * Neither the name of Rivos, Inc. nor the names of its contributors may be | ||
* used to endorse or promote products derived from this software without | ||
* specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL RIVOS, INC. OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
* DAMAGE. | ||
*/ | ||
|
||
#include "../globals.h" | ||
#include "arch.h" | ||
|
||
void | ||
analyze_callee_regs_usage(dcontext_t *dcontext, callee_info_t *ci) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} | ||
|
||
void | ||
analyze_callee_save_reg(dcontext_t *dcontext, callee_info_t *ci) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} | ||
|
||
void | ||
analyze_callee_tls(dcontext_t *dcontext, callee_info_t *ci) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} | ||
|
||
app_pc | ||
check_callee_instr_level2(dcontext_t *dcontext, callee_info_t *ci, app_pc next_pc, | ||
app_pc cur_pc, app_pc tgt_pc) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
return NULL; | ||
} | ||
|
||
bool | ||
check_callee_ilist_inline(dcontext_t *dcontext, callee_info_t *ci) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
return false; | ||
} | ||
|
||
void | ||
analyze_clean_call_aflags(dcontext_t *dcontext, clean_call_info_t *cci, instr_t *where) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} | ||
|
||
void | ||
insert_inline_reg_save(dcontext_t *dcontext, clean_call_info_t *cci, instrlist_t *ilist, | ||
instr_t *where, opnd_t *args) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} | ||
|
||
void | ||
insert_inline_reg_restore(dcontext_t *dcontext, clean_call_info_t *cci, | ||
instrlist_t *ilist, instr_t *where) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} | ||
|
||
void | ||
insert_inline_arg_setup(dcontext_t *dcontext, clean_call_info_t *cci, instrlist_t *ilist, | ||
instr_t *where, opnd_t *args) | ||
{ | ||
/* FIXME i#3544: Not implemented */ | ||
ASSERT_NOT_IMPLEMENTED(false); | ||
} |
Oops, something went wrong.