1st hunk:
Use static_cast instead of a potentially dangerous reinterpret_cast.
Doesn't matter since this file only supports riscv64 where unsigned long and
unsigned long long are actually the same size.
../deps/v8/src/codegen/riscv64/assembler-riscv64.cc:403:22: error: reinterpret_cast from 'v8::internal::Address' (aka 'unsigned long') to 'uint64_t' (aka 'unsigned long long') is not allowed

Other hunks:
Fix build errors due to type mismatch between intptr_t (long) and int64_t
(long long).

Index: deps/v8/src/codegen/riscv/assembler-riscv.cc
--- deps/v8/src/codegen/riscv/assembler-riscv.cc.orig
+++ deps/v8/src/codegen/riscv/assembler-riscv.cc
@@ -421,7 +421,7 @@ int Assembler::target_at(int pos, bool is_internal) {
       pc = target_constant_address_at(pc);
       uintptr_t instr_address =
           reinterpret_cast<uintptr_t>(buffer_start_ + pos);
-      uintptr_t imm = reinterpret_cast<uintptr_t>(pc);
+      uintptr_t imm = static_cast<uintptr_t>(pc);
       if (imm == kEndOfJumpChain) {
         return kEndOfChain;
       } else {
@@ -988,7 +988,7 @@ inline int64_t signExtend(uint64_t V, int N) {
 }
 
 #if V8_TARGET_ARCH_RISCV64
-void Assembler::RV_li(Register rd, int64_t imm) {
+void Assembler::RV_li(Register rd, intptr_t imm) {
   UseScratchRegisterScope temps(this);
   if (RecursiveLiCount(imm) > GeneralLiCount(imm, temps.CanAcquire())) {
     GeneralLi(rd, imm);
@@ -1978,7 +1978,7 @@ const size_t ConstantPool::kApproxMaxEntryCount = 512;
 //  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-void Assembler::RecursiveLi(Register rd, int64_t val) {
+void Assembler::RecursiveLi(Register rd, intptr_t val) {
   if (val > 0 && RecursiveLiImplCount(val) > 2) {
     unsigned LeadingZeros = base::bits::CountLeadingZeros((uint64_t)val);
     uint64_t ShiftedVal = (uint64_t)val << LeadingZeros;
@@ -1992,7 +1992,7 @@ void Assembler::RecursiveLi(Register rd, int64_t val) 
   RecursiveLiImpl(rd, val);
 }
 
-int Assembler::RecursiveLiCount(int64_t val) {
+int Assembler::RecursiveLiCount(intptr_t val) {
   if (val > 0 && RecursiveLiImplCount(val) > 2) {
     unsigned LeadingZeros = base::bits::CountLeadingZeros((uint64_t)val);
     uint64_t ShiftedVal = (uint64_t)val << LeadingZeros;
@@ -2007,7 +2007,7 @@ int Assembler::RecursiveLiCount(int64_t val) {
   return RecursiveLiImplCount(val);
 }
 
-void Assembler::RecursiveLiImpl(Register rd, int64_t Val) {
+void Assembler::RecursiveLiImpl(Register rd, intptr_t Val) {
   if (is_int32(Val)) {
     // Depending on the active bits in the immediate Value v, the following
     // instruction sequences are emitted:
@@ -2084,7 +2084,7 @@ void Assembler::RecursiveLiImpl(Register rd, int64_t V
   }
 }
 
-int Assembler::RecursiveLiImplCount(int64_t Val) {
+int Assembler::RecursiveLiImplCount(intptr_t Val) {
   int count = 0;
   if (is_int32(Val)) {
     // Depending on the active bits in the immediate Value v, the following
@@ -2165,7 +2165,7 @@ int Assembler::RecursiveLiImplCount(int64_t Val) {
   return count;
 }
 
-int Assembler::GeneralLiCount(int64_t imm, bool is_get_temp_reg) {
+int Assembler::GeneralLiCount(intptr_t imm, bool is_get_temp_reg) {
   int count = 0;
   // imitate Assembler::RV_li
   if (is_int32(imm + 0x800)) {
