From commits-return-11590-archive-asf-public=cust-asf.ponee.io@tvm.apache.org Fri Apr 17 06:59:23 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5B96F18066D for ; Fri, 17 Apr 2020 08:59:23 +0200 (CEST) Received: (qmail 44010 invoked by uid 500); 17 Apr 2020 06:59:22 -0000 Mailing-List: contact commits-help@tvm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tvm.apache.org Delivered-To: mailing list commits@tvm.apache.org Received: (qmail 43997 invoked by uid 99); 17 Apr 2020 06:59:22 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2020 06:59:22 +0000 From: GitBox To: commits@tvm.apache.org Subject: [GitHub] [incubator-tvm] FrozenGene commented on a change in pull request #5353: [RUNTIME] FastRPC interface for Hexagon runtime Message-ID: <158710676272.5368.11981887122702327319.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Fri, 17 Apr 2020 06:59:22 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit FrozenGene commented on a change in pull request #5353: [RUNTIME] FastRPC interface for Hexagon runtime URL: https://github.com/apache/incubator-tvm/pull/5353#discussion_r410027475 ########## File path: src/runtime/hexagon/target/fastrpc/src/tvm_remote_nd_imp.cc ########## @@ -0,0 +1,328 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include +#include +#include +#include + +#include + +#define FARF_ERROR 1 +#include "AEEStdDef.h" +#include "AEEStdErr.h" +#include "HAP_farf.h" +#include "HAP_mem.h" +#include "HAP_perf.h" +#include "qurt.h" +#include "tvm_hvx.h" +#include "tvm_remote_nd.h" + +struct msg_call { + uint32_t func_va; + uint32_t scalar_num; + uint32_t stack_num; + uint32_t data[]; +} __attribute__((packed)); + +__attribute__((naked)) uint32_t launcher(volatile msg_call* mc, + uint64_t* pcc) { + __asm__( + "// This function is intentionally written to be readable, \n" + "// rather than fast. \n" + "// r0 = value of 'volatile msg_call *mc' \n" + "// r1 = address where to store the program cycle count \n" + "{ memd(r29+#-16) = r21:20 \n" Review comment: Should be `memd(r29+#16)`? Because r29(SP) should add `+#16` to increase the address so that we could get procedure local data on stack. Or we could use r30(FP) `-#16` to decrease the address to get. Please note the code on the line 102, ` r21:20 = memd(r29+#16)` is right. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services